/* Big screens: the bout board and the awards screen */

.screen-board { background: #070d17; color: #fff; }
.board { --s: 1; display: flex; flex-direction: column; height: 100vh; padding: calc(var(--s) * 1.2vh) 1vw; gap: calc(var(--s) * 1vh); font-size: calc(var(--s) * min(1.9vh, 2.6vw)); overflow: hidden; }
.bd-head { display: flex; align-items: baseline; gap: 1.5vw; flex: none; }
.bd-title { font-size: 1.7em; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bd-sub { font-size: .9em; color: #8ea0b8; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.bd-time { margin-left: auto; font-size: 1.5em; font-weight: 700; color: #cbd6e4; white-space: nowrap; }
.bd-next { margin-left: auto; font-size: 1.05em; color: #fde68a; background: rgba(250, 204, 21, .1); border: 1px solid rgba(250, 204, 21, .35); border-radius: .4em; padding: .15em .6em; white-space: nowrap; }
.bd-next + .bd-time { margin-left: .8em; }
.bd-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), auto); gap: calc(var(--s) * 1vh) 1vw; flex: 1; min-height: 0; }
.bd-mat { min-width: 0; min-height: 0; overflow: hidden; background: #111d2e; border: 2px solid #22324a; border-radius: .7em; padding: .6em .8em; display: flex; flex-direction: column; gap: .4em; }
.bd-mat.live { border-color: #e11d48; }
.bd-mat-name { font-size: 1.7em; font-weight: 900; color: #facc15; line-height: 1.05; }
.bd-mat-name small { font-size: .5em; color: #9fb0c7; margin-left: .6em; font-weight: 600; }
.bd-label { display: flex; gap: .6em; font-size: .75em; color: #8ea0b8; font-weight: 700; flex-wrap: wrap; align-items: center; }
.bd-label span:first-child { color: #fff; background: #1d4ed8; padding: 0 .45em; border-radius: .3em; }
.bd-mat.live .bd-now .bd-label span:first-child { background: #e11d48; }
.bd-clock { margin-left: auto; color: #4ade80 !important; background: none !important; font-size: 1.3em; }
.bd-w { display: flex; align-items: center; gap: .5em; font-size: 1em; padding: .05em 0; min-width: 0; }
.bd-w.big { font-size: 1.25em; font-weight: 700; }
.bd-color { width: .7em; height: .7em; border-radius: 50%; flex: none; display: inline-block; }
.bd-color.c-red { background: var(--red); }
.bd-color.c-green { background: var(--green); }
.bd-wn { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a long name on the board wraps to a second line rather than being cut */
.bd-w.big .bd-wn { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.05; }
.bd-wt { flex: 1 1 0; min-width: 0; color: #9fb0c7; font-weight: 400; font-size: .8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.bd-wtext { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.bd-wtext .bd-wt { text-align: left; font-size: .6em; flex: none; }
.bd-sc { font-size: 1.4em; font-weight: 900; min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }
.bd-deck { border-top: 1px solid #22324a; padding-top: .35em; }
.bd-deck .bd-label span:first-child { background: #334155; }
.bd-empty { color: #94a3b8; font-size: 1.1em; padding: .5em 0; }
.bd-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 1vw; flex: none; max-height: 32vh; overflow: hidden; }
.bd-list { background: #111d2e; border-radius: .6em; padding: .5em .8em; display: flex; flex-direction: column; gap: .2em; font-size: .9em; color: #cbd6e4; overflow: hidden; min-height: 0; }
.bd-list b { color: #facc15; }
.bd-list-items { columns: 2; column-gap: 1.5em; overflow: hidden; }
.bd-list-items span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-msg { flex: none; background: #1d4ed8; color: #fff; font-size: 1.15em; font-weight: 700; padding: .35em .8em; border-radius: .5em; text-align: center; }
.bd-msg.alert { background: #facc15; color: #111; }
.bd-msg.bd-final { background: #14532d; }
.bd-offline { position: fixed; top: 10px; right: 10px; background: #b91c1c; padding: 6px 14px; border-radius: 8px; }
.board.phone { height: auto; min-height: 100vh; overflow: visible; font-size: 15px; padding: 10px; gap: 10px; }
.board.phone .bd-grid { display: flex; flex-direction: column; }
.board.phone .bd-mat { overflow: visible; }
.board.phone .bd-foot { grid-template-columns: 1fr; max-height: none; }
.board.phone .bd-list-items { columns: 1; }
.board.phone .bd-list-items span { white-space: normal; }
.board.phone .bd-sub { display: none; }
.board.phone .bd-title { font-size: 1.35em; }
.bd-home { flex: none; display: inline-flex; align-items: center; gap: 4px; color: #cbd6e4; background: rgba(255,255,255,.1); border-radius: 8px; padding: 6px 10px; font-size: 14px; text-decoration: none !important; }
.bd-home svg.ic { width: 16px; height: 16px; }
.sb { height: 100vh; display: flex; flex-direction: column; }
.sb-top { display: flex; justify-content: space-between; padding: 1.5vh 2vw; font-size: 3vh; color: #cbd6e4; background: #0b1220; }
.sb-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.sb-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2vw; text-align: center; min-width: 0; }
/* the name box is always two lines tall (long names wrap, never more than two), so both scores sit level */
.sb-name { flex: none; font-size: 6vh; font-weight: 800; line-height: 1.1; height: 2.2em; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.sb-name span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.sb-team { flex: none; font-size: 3.5vh; opacity: .85; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-score { font-size: 32vh; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.sb-timers { font-size: 3vh; color: #fde68a; min-height: 4vh; }
.sb-center { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 3vw; background: #000; min-width: 26vw; }
.sb-period { font-size: 5vh; color: #9fb0c7; text-transform: uppercase; }
.sb-clock { font-size: 16vh; font-weight: 900; font-variant-numeric: tabular-nums; }
.sb-wait { flex: 1; display: grid; place-items: center; font-size: 5vh; color: #94a3b8; }
/* a TV on its side: red on top, the clock in the middle, green below */
@media (orientation: portrait) {
  .sb-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); }
  .sb-center { min-width: 0; padding: 2vh 3vw; }
  .sb-name { font-size: min(4.5vh, 7vw); }
  .sb-team { font-size: min(2.8vh, 4.2vw); }
  .sb-score { font-size: min(18vh, 40vw); }
  .sb-clock { font-size: min(12vh, 26vw); line-height: 1.05; }
  .sb-period { font-size: min(4vh, 6vw); }
  .sb-top { font-size: min(3vh, 3.6vw); gap: 2vw; }
}
.board-msg-form { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 14px; flex-wrap: wrap; }
.board-msg-form.on { border-color: #f5c27a; background: #fffaf0; }
.board-msg-form input { flex: 1; min-width: 240px; }
.corner-home { position: fixed; bottom: 10px; left: 10px; background: rgba(255,255,255,.12); color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 14px; opacity: 0; transition: opacity .3s; z-index: 20; text-decoration: none !important; }
body.mouse-moved .corner-home { opacity: .35; }
.corner-home:hover { opacity: 1 !important; }

.sb { position: relative; }
.sb-fs { position: fixed; bottom: 10px; right: 10px; z-index: 20; background: rgba(15,23,42,.85); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer; opacity: 0; transition: opacity .3s; }
/* bottom-right, next to Main menu (bottom-left): like the menu chip, it only shows when the mouse is over the screen */
body.mouse-moved .sb-fs, .sb-fs:focus-visible { opacity: 1; }
.sb.is-fs .sb-fs, .sb.is-fs .corner-home { display: none; }
.sb-tvbar { position: relative; flex: none; z-index: 30; display: flex; gap: 10px; align-items: center; background: #1d4ed8; color: #fff; padding: 8px 12px; font-size: 14px; }
.sb-tvbar span { flex: 1; }
.sb-tvbar button { background: #fff; color: #111; border: 0; border-radius: 7px; padding: 7px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.sb-tvbar button[data-closewin] { background: rgba(255,255,255,.2); color: #fff; }
.sb.is-fs .sb-tvbar { display: none; }
.bd-label .bd-wait { background: #b45309 !important; color: #fff; padding: 0 .4em; border-radius: .3em; }
.bd-break { font-weight: 900; letter-spacing: .08em; display: flex; flex-direction: column; gap: 4px; }
.bd-break small { font-weight: 600; letter-spacing: 0; opacity: .8; }
.bd-brk-tag { margin-left: 8px; font-size: .5em; background: #a16207; color: #fff; border-radius: 6px; padding: 2px 6px; vertical-align: middle; letter-spacing: .06em; }
.bd-mat.paused { opacity: 1; border-color: #a16207; }
.bd-mat.paused .bd-break { color: #facc15; font-size: 1.6em; }
.bd-mat.paused .bd-break small { color: #fde68a; font-size: .6em; }
body.screen-awards { background: radial-gradient(ellipse at top, #1d3363, #070d18 70%); color: #fff; overflow: hidden; }
.aw { height: 100vh; display: flex; flex-direction: column; }
.aw-inner { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh; padding: 3vh 4vw; transform-origin: top center; }
.aw-head { text-align: center; }
.aw-head.idle h1 { font-size: min(12vh, 13vw); }
.aw-kicker { font-size: min(2.4vh, 3vw); letter-spacing: .2em; text-transform: uppercase; color: #9fb0c7; font-weight: 700; }
.aw-head h1 { font-size: min(9vh, 10vw); margin: 0; color: #facc15; line-height: 1.05; }
.aw-note { color: #9fb0c7; font-size: min(2.4vh, 3.4vw); }
.aw-podium { display: flex; align-items: flex-end; justify-content: center; gap: 2vw; width: 100%; }
.aw-step { display: flex; flex-direction: column; align-items: center; text-align: center; width: 26vw; min-width: 0; }
@media (orientation: portrait) { .aw .aw-step { width: 30vw; } .aw .aw-name { font-size: min(5vh, 4vw); } .aw .aw-sponsor { font-size: min(1.9vh, 2.2vw); } }
.aw-place { font-size: min(4vh, 5vw); font-weight: 900; color: #facc15; }
.aw-step.p2 .aw-place { color: #e5e7eb; } .aw-step.p3 .aw-place { color: #f0a36b; }
.aw-name { font-size: min(5vh, 5.5vw); font-weight: 900; line-height: 1.1; overflow-wrap: break-word; max-width: 100%; }
.aw-team { font-size: min(2.8vh, 3.4vw); color: #cbd6e4; margin-top: .6vh; }
.aw-block { width: 100%; margin-top: 1.6vh; border-radius: 1vh 1vh 0 0; background: linear-gradient(#facc15, #b45309); height: 22vh; }
.aw-step.p2 .aw-block { background: linear-gradient(#e5e7eb, #6b7280); height: 15vh; }
.aw-step.p3 .aw-block { background: linear-gradient(#f0a36b, #7c2d12); height: 10vh; }
.aw-rest { display: flex; flex-wrap: wrap; gap: 1vh 3vw; justify-content: center; font-size: min(3vh, 3.6vw); }
.aw-rest b { color: #facc15; margin-right: .6vw; }
.aw-rest span { color: #9fb0c7; margin-left: .6vw; }
.aw-ows { display: flex; flex-wrap: wrap; gap: 3vh 6vw; justify-content: center; max-width: 100%; }
@media (orientation: portrait) { .aw-ows { flex-direction: column; } }
.aw-ow { text-align: center; min-width: 0; max-width: 100%; }
.aw-ow-name { font-size: min(8vh, 9vw); font-weight: 900; line-height: 1.1; }
.aw-sponsor { flex: none; height: clamp(56px, 8.5vh, 160px); display: flex; align-items: center; justify-content: center; gap: 1.6vw; padding: 0 2vw; background: rgba(0,0,0,.35); font-size: clamp(14px, min(1.9vh, 2.6vw), 30px); color: #cbd6e4; }
.aw-sponsor img { height: 72%; max-width: 26vw; object-fit: contain; background: #fff; border-radius: .4em; padding: .2em .4em; box-sizing: border-box; }
.aw-sponsor b, .aw-sponsor span { white-space: nowrap; }
.aw-sponsor b { color: #fff; font-size: 1.2em; }
.aw-menu { position: fixed; left: 8px; bottom: 8px; color: #334155; text-decoration: none; }
.race-bar { display: flex; height: 12px; background: #f2f4f7; border-radius: 6px; overflow: hidden; }
.race-bar .now { background: var(--accent, #2563eb); }
.race-bar .pot { background: repeating-linear-gradient(45deg, #b2ccff, #b2ccff 4px, #d1e0ff 4px, #d1e0ff 8px); }
tr.row-on td { background: #eff4ff; }
.bd-sponsor { position: fixed; inset: 0; z-index: 500; background: #070d18; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh; animation: pop .5s ease-out; transition: opacity .6s; }
.bd-sponsor.out { opacity: 0; }
.bd-sponsor img { max-width: 80vw; max-height: 62vh; object-fit: contain; background: #fff; border-radius: 2vh; padding: 2vh; }
.bd-sp-text { text-align: center; color: #fff; display: flex; flex-direction: column; gap: 1vh; }
.bd-sp-text b { font-size: 6vh; }
.bd-sp-text span { font-size: 3vh; color: #cbd6e4; }
.bd-sponsor small { color: #64748b; font-size: 2vh; letter-spacing: .15em; text-transform: uppercase; }
.aw-menu svg.ic { width: 22px; height: 22px; }
.aw-head h1 svg.ic { width: .9em; height: .9em; stroke-width: 1.6; color: #facc15; vertical-align: -0.1em; }

/* ---- Livestream overlay (#/overlay/<mat>): see-through page for a browser source; sizes follow the width */
html.overlay-html, html.overlay-html body.overlay-body { background: transparent !important; overflow: hidden; }
body.overlay-body #toasts, body.overlay-body .corner-home { display: none !important; }
html.overlay-html body.overlay-preview { background: repeating-conic-gradient(#5b6474 0% 25%, #3b4250 0% 50%) 0 0 / 40px 40px !important; min-height: 100vh; }
.ov-help { font: 16px system-ui, sans-serif; color: #fff; background: rgba(0,0,0,.7); padding: 12px 16px; margin: 20px; border-radius: 8px; display: inline-block; }
.ov-bar, .ov-bug { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: #fff; position: fixed; }
.ov-bar { left: 50%; bottom: 3.2vw; transform: translateX(-50%); width: 74vw; }
.ovs-top { display: inline-block; background: rgba(8,12,22,.9); color: #fde047; font-size: max(.95vw, 14px); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .35vw .9vw; border-radius: .5vw .5vw 0 0; margin-left: 1.2vw; }
.ovs-main { display: flex; align-items: stretch; height: 4.8vw; background: rgba(8,12,22,.93); border-radius: .6vw; overflow: hidden; box-shadow: 0 .3vw 1.2vw rgba(0,0,0,.45); }
.ovs-side { flex: 1; min-width: 0; display: flex; align-items: center; gap: .9vw; padding-right: 1vw; }
.ovs-side i { align-self: stretch; width: .55vw; flex: 0 0 auto; }
.ovs-side.right { flex-direction: row-reverse; padding: 0 0 0 1vw; text-align: right; }
.ovs-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ovs-nm b { font-size: 1.75vw; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovs-nm span { font-size: max(.95vw, 14px); color: #b6c2d4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovs-side em { font-style: normal; font-weight: 900; font-size: 3vw; min-width: 4.4vw; text-align: center; font-variant-numeric: tabular-nums; }
.ovs-mid { flex: 0 0 9.5vw; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ovs-mid span { font-size: max(.95vw, 14px); font-weight: 800; color: #b6c2d4; letter-spacing: .08em; text-transform: uppercase; }
.ovs-mid b { font-size: 2.3vw; font-weight: 900; color: #fde047; font-variant-numeric: tabular-nums; line-height: 1.05; }
.ov-bug { width: 21vw; background: rgba(8,12,22,.93); border-radius: .5vw; overflow: hidden; box-shadow: 0 .3vw 1.2vw rgba(0,0,0,.45); }
.ov-bug.ov-tl { top: 2.4vw; left: 2.4vw; } .ov-bug.ov-tr { top: 2.4vw; right: 2.4vw; }
.ov-bug.ov-bl { bottom: 2.4vw; left: 2.4vw; } .ov-bug.ov-br { bottom: 2.4vw; right: 2.4vw; }
.ovb-row { display: flex; align-items: center; gap: .6vw; height: 2.5vw; padding-right: .7vw; border-bottom: 1px solid rgba(255,255,255,.08); }
.ovb-row i { align-self: stretch; width: .45vw; }
.ovb-row b { flex: 1; min-width: 0; font-size: 1.3vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* team codes in a column of their own, so both rows line up */
.ovb-row span { flex: none; width: 3.6em; font-size: max(.95vw, 14px); color: #b6c2d4; white-space: nowrap; overflow: hidden; }
.ovb-row em { font-style: normal; font-weight: 900; font-size: 1.7vw; font-variant-numeric: tabular-nums; }
.ovb-foot { display: flex; align-items: center; gap: .6vw; padding: .3vw .7vw; background: #000; font-size: max(.95vw, 14px); }
.ovb-foot span { color: #b6c2d4; font-weight: 800; text-transform: uppercase; }
.ovb-foot b { color: #fde047; font-size: 1.15vw; font-variant-numeric: tabular-nums; }
.ovb-foot .ovb-meta { margin-left: auto; font-weight: 600; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- the overlay picker (#/overlay with no mat: head-table staff) */
body.ovp-body { background: var(--bg); }
.ovp { max-width: 980px; margin: 0 auto; padding: 24px 16px; }
.ovp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; box-shadow: 0 4px 18px rgba(15,27,45,.06); }
.ovp-card h1 { font-size: 22px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.ovp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* overlay team logos (&logos=1) */
.ov-logo { flex: 0 0 auto; object-fit: contain; background: #fff; border-radius: .35vw; }
.ovs-side .ov-logo { width: 3.2vw; height: 3.2vw; padding: .2vw; }
.ovb-row .ov-logo { width: 1.7vw; height: 1.7vw; padding: .1vw; }
/* awards screen: leaders of the day */
.aw-lead { list-style: none; margin: 0; padding: 0; width: min(92vw, 150vh); display: grid; gap: 1.4vh; }
.aw-lead li { display: grid; grid-template-columns: 6vh minmax(0, 1fr) auto; gap: 2vw; align-items: center; background: rgba(255,255,255,.06); border-radius: 1.4vh; padding: 1.6vh 2vw; }
.aw-lead li.first { background: rgba(250,204,21,.14); box-shadow: inset 0 0 0 2px rgba(250,204,21,.5); }
.aw-lp { font-size: min(5vh, 5vw); font-weight: 900; color: #facc15; text-align: center; }
.aw-ln { font-size: min(5vh, 5vw); font-weight: 900; line-height: 1.1; min-width: 0; overflow-wrap: anywhere; }
.aw-ln small { display: block; font-size: .5em; font-weight: 600; color: #cbd6e4; margin-top: .4vh; }
.aw-lv { font-size: min(5.5vh, 5.5vw); font-weight: 900; font-variant-numeric: tabular-nums; }
.aw-lgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.6vh 1.4vw; width: 96vw; }
@media (orientation: portrait) { .aw-lgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aw-lcard { background: rgba(255,255,255,.06); border-radius: 1.2vh; padding: 1.4vh 1.2vw; min-width: 0; }
.aw-lt { color: #facc15; font-weight: 800; font-size: min(2.4vh, 2.6vw); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .8vh; }
.aw-lr { display: flex; justify-content: space-between; gap: .8vw; font-size: min(2.3vh, 2.4vw); padding: .4vh 0; border-top: 1px solid rgba(255,255,255,.08); }
.aw-lr:first-of-type { border-top: 0; font-weight: 800; }
.aw-lr span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-lr b { font-variant-numeric: tabular-nums; flex: none; }

/* the tournament's logo (Setup → Event): on a white tile so a dark logo still shows on the dark screens. Fixed
   heights, so the screen is laid out the same before and after the picture loads */
.aw-kicker { display: flex; align-items: center; justify-content: center; gap: .7em; }
.aw-logo { height: 2.2em; width: auto; max-width: 6em; object-fit: contain; background: #fff; border-radius: .3em; padding: .15em .25em; box-sizing: border-box; flex: none; }
.aw-idle-logo { display: block; height: min(22vh, 30vw); width: auto; max-width: 60vw; object-fit: contain; margin: 0 auto 3vh; background: #fff; border-radius: 1.2vh; padding: 1vh 1.4vh; box-sizing: border-box; }
.bd-logo { flex: none; align-self: center; height: 1.9em; width: auto; max-width: 5em; object-fit: contain; background: #fff; border-radius: .25em; padding: .1em .2em; box-sizing: border-box; }
.board.phone .bd-logo { height: 1.6em; }

/* ---- dual meets (render/dualday.js): the mat's TV scoreboard, the bout board, the livestream overlay */
.sb-dual { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 2vw; padding: .6vh 2vw; background: #0b1220; border-top: 1px solid #1e293b; font-size: 3.2vh; color: #cbd6e4; }
.sbd-team { display: flex; align-items: center; gap: .5em; min-width: 0; }
.sbd-team.right { flex-direction: row-reverse; }
.sbd-tn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbd-team b { font-size: 1.6em; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; line-height: 1; margin-left: auto; }
.sbd-team.right b { margin-left: 0; margin-right: auto; }
.sbd-team b.lead { color: #facc15; }
.sbd-mid { text-transform: uppercase; letter-spacing: .08em; font-size: .7em; font-weight: 800; color: #8ea0b8; white-space: nowrap; }
.sb-dual .tb { font-size: .6em; padding: .05em .35em; }
@media (orientation: portrait) { .sb-dual { font-size: min(2.6vh, 3.4vw); } }
/* overlay: the team score row (the bug's first row; beside the bar's top tab) */
.ovb-team, .ovs-team { display: flex; align-items: center; gap: .35vw; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ovb-team { height: 2.3vw; padding: 0 .7vw; background: #111a2c; border-bottom: 1px solid rgba(255,255,255,.12); }
.ovs-tabs { display: flex; justify-content: space-between; align-items: flex-end; gap: 1vw; }
.ovs-team { background: rgba(8,12,22,.9); padding: .25vw .9vw; border-radius: .5vw .5vw 0 0; margin-right: 1.2vw; }
.ov-bug.has-dual { width: 23vw; }
.ovs-team .b { margin-left: .6vw !important; }
.ovb-team .t, .ovs-team .t { font-size: max(.95vw, 13px); font-weight: 800; color: #b6c2d4; letter-spacing: .04em; }
.ovb-team .n, .ovs-team .n { font-size: 1.45vw; font-weight: 900; color: #fff; min-width: 1.1em; text-align: center; }
.ovb-team .n.lead, .ovs-team .n.lead { color: #fde047; }
.ovb-team .d, .ovs-team .d { color: #6f84a3; font-weight: 700; }
.ovb-team .b, .ovs-team .b { margin-left: auto; font-size: max(.85vw, 12px); color: #b6c2d4; font-weight: 700; white-space: nowrap; padding-left: .3vw; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ovb-team .k, .ovs-team .k { font-size: max(.75vw, 11px); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #0b0e14; background: #fde047; border-radius: .25vw; padding: .05vw .35vw; margin-right: .2vw; }
/* bout board: several duals — each mat card's team score line */
.bd-dual { display: flex; align-items: center; gap: .45em; font-size: 1em; color: #cbd6e4; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.bd-dual b { font-size: 1.35em; font-weight: 900; color: #fff; }
.bd-dual b.lead { color: #facc15; }
.bd-dual .d { color: #6f84a3; }
.bd-dual .st { margin-left: auto; font-size: .8em; color: #8ea0b8; font-weight: 700; }
.board .tb { display: inline-block; font-size: .62em; font-weight: 800; letter-spacing: .05em; color: #dbe7f7; border: 1px solid #3a4f73; background: #16233a; border-radius: .3em; padding: .05em .4em; line-height: 1.35; vertical-align: .18em; }
/* bout board: one dual — the whole dual on the screen */
.db-main { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: calc(var(--s) * 1vh); }
.db-score { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1em; background: #111d2e; border: 2px solid #22324a; border-radius: .7em; padding: .35em 1.1em; overflow: hidden; }
.db-team { display: flex; align-items: center; gap: .7em; min-width: 0; }
.db-team.right { flex-direction: row-reverse; text-align: right; }
.db-tn { display: flex; flex-direction: column; min-width: 0; }
.db-tn b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.45em; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1; }
.db-tn span { color: #9fb0c7; font-size: .8em; margin-top: .15em; }
.db-pts { font-size: 4.4em; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; margin-left: auto; }
.db-team.right .db-pts { margin-left: 0; margin-right: auto; }
.db-pts.lead { color: #facc15; }
.db-mid { text-align: center; display: grid; gap: .15em; }
.db-mid .k { font-size: .75em; font-weight: 800; letter-spacing: .12em; color: #8ea0b8; }
.db-mid .bn { font-size: 1.5em; font-weight: 900; white-space: nowrap; }
.db-mid .ded { font-size: .62em; color: #fca5a5; max-width: 24em; margin: 0 auto; }
.db-mid .ded.tie { color: #fde68a; }
.db-row { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.7fr 1fr; gap: 1vw; }
.db-row > .bd-mat:only-child { grid-column: 1 / -1; }
.db-now { gap: .5em; }
.db-now .bd-w.big { font-size: 2em; }
.db-now .bd-sc { font-size: 1.5em; }
.db-bout { display: grid; gap: .3em; }
.db-bout + .db-bout { border-top: 1px solid #22324a; padding-top: .4em; }
.db-bout .bd-wtext .bd-wt { font-size: .5em; }
.db-bout.ex .bd-label span:first-child { background: #7c3aed !important; }
.db-worth { margin-top: auto; font-size: .72em; color: #9fb0c7; border-top: 1px solid #22324a; padding-top: .45em; }
.db-worth b { color: #fde68a; }
.db-final { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .2em; text-align: center; }
.db-final span { font-size: 1.6em; font-weight: 800; color: #cbd6e4; }
.db-final b { font-size: 3.4em; font-weight: 900; font-variant-numeric: tabular-nums; }
.db-side .bd-w { font-size: 1.15em; }
.db-side .bd-deck:first-child { border-top: 0; padding-top: 0; }
.db-side .bd-wt { flex: none; }
.db-side .bd-wn { flex: 1; }
.db-ff { color: #fca5a5; font-style: normal; font-size: .85em; }
.db-exh { margin-top: auto; border-top: 1px solid #22324a; padding-top: .45em; font-size: .7em; color: #9fb0c7; line-height: 1.4; }
.db-exh b { color: #cbd6e4; }
.db-strip-h { flex: none; display: flex; gap: 1.2em; align-items: baseline; font-size: .7em; color: #8ea0b8; white-space: nowrap; overflow: hidden; }
.db-strip-h b { color: #fff; font-size: 1.1em; }
.db-strip-h span { overflow: hidden; text-overflow: ellipsis; }
.db-strip { flex: none; display: grid; grid-template-columns: repeat(var(--n, 14), minmax(0, 1fr)); gap: .3em; }
.db-t { background: #111d2e; border: 2px solid #22324a; border-radius: .45em; padding: .35em .45em .4em; display: flex; flex-direction: column; gap: .12em; min-width: 0; overflow: hidden; font-size: .72em; line-height: 1.2; color: #cbd6e4; min-height: 7.4em; }
.db-t .w { font-size: 1.5em; font-weight: 900; color: #facc15; }
.db-t .who { font-weight: 900; color: #fff; font-size: 1.05em; display: flex; align-items: center; gap: .3em; white-space: nowrap; }
.db-t .who .tb { font-size: .85em; vertical-align: 0; }
.db-t .who.dff { color: #8ea0b8; }
.db-t .how { color: #9fb0c7; overflow-wrap: anywhere; }
.db-t .run { margin-top: auto; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-t .ded { color: #fca5a5; font-weight: 700; font-size: .85em; }
.db-t .tag { align-self: flex-start; font-weight: 800; letter-spacing: .04em; font-size: .7em; line-height: 1.15; border-radius: .3em; padding: 0 .35em; max-width: 100%; overflow-wrap: anywhere; box-sizing: border-box; }
.db-t.now { border-color: #e11d48; background: #2a1020; }
.db-t.now .tag { color: #fff; background: #e11d48; }
.db-t.deck, .db-t.hole, .db-t.verify { border-color: #3b4f70; }
.db-t.deck .tag, .db-t.hole .tag, .db-t.verify .tag { color: #fff; background: #334155; }
.db-t.later { opacity: .72; }
.db-t .vs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e5ecf5; }
.db-t .vs.ff { color: #fca5a5; }
/* a phone: one column, the weights four across */
.board.phone.dual .db-score { gap: .5em; padding: .5em .7em; }
.board.phone.dual .db-pts { font-size: 2.6em; }
.board.phone.dual .db-tn b { font-size: 1.05em; white-space: normal; }
.board.phone.dual .db-mid .bn { font-size: 1.05em; white-space: normal; }
.board.phone.dual .db-row { grid-template-columns: 1fr; }
.board.phone.dual .db-now .bd-w.big { font-size: 1.3em; }
.board.phone.dual .db-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.board.phone.dual .db-t { font-size: .8em; min-height: 0; }
.board.phone.dual .db-strip-h { white-space: normal; flex-wrap: wrap; gap: .2em .8em; }
.board.phone.dual .db-strip-h span { white-space: normal; }
.board.phone.dual .bd-title { white-space: normal; line-height: 1.15; }
.board.phone.dual .db-team, .board.phone.dual .db-team.right { flex-direction: column-reverse; align-items: flex-start; gap: .15em; }
.board.phone.dual .db-team.right { align-items: flex-end; }
.board.phone.dual .db-pts, .board.phone.dual .db-team.right .db-pts { margin: 0; }
.board.phone.dual .db-tn span { font-size: .75em; }
.ovb-team .t.tc-green, .ovs-team .t.tc-green { color: #6ee7b7; }
.ovb-team .t.tc-red, .ovs-team .t.tc-red { color: #fca5a5; }
.board .tb.tb-green { background: #0e4a31; border-color: #22a06b; color: #fff; }
.board .tb.tb-red { background: #5e1414; border-color: #d14343; color: #fff; }
/* the corner Main menu link stays clear of the first weight tile */
.board.dual.tv { padding-bottom: 44px; }
.db-final .sub { font-size: 1em; font-weight: 600; color: #9fb0c7; }
/* a mat with nothing on it in a dual meet: its duals (finals, next here) */
.bd-dlist { display: grid; gap: .35em; padding-top: .2em; }
.bd-dl { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; font-size: .95em; color: #cbd6e4; }
.bd-dl .k { font-size: .7em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: #334155; border-radius: .3em; padding: 0 .4em; }
.bd-dl .k.live { background: #e11d48; }
.bd-dl .nm { font-weight: 700; color: #fff; }
.bd-dl .sc, .bd-dl .when { margin-left: auto; font-variant-numeric: tabular-nums; }
.bd-dl .sc b { font-weight: 900; color: #fff; }
.bd-dl .sc b.lead { color: #facc15; }
.bd-dl .d { color: #6f84a3; margin: 0 .2em; }
/* ---- dual tournaments (0.38): tournament names, a pool's standings between rounds, the final places */
.bd-dl .nm i { font-style: normal; color: #facc15; font-weight: 800; margin-right: .2em; }
.bd-poolbox { min-width: 0; }
.bd-pool { margin-top: .5em; border-top: 1px solid #22324a; padding-top: .45em; }
.bd-pool-h { display: flex; align-items: baseline; gap: .6em; font-size: .85em; color: #8ea0b8; }
.bd-pool-h b { color: #fff; font-size: 1.15em; }
.bd-pool-t { width: 100%; border-collapse: collapse; font-size: .9em; font-variant-numeric: tabular-nums; margin-top: .2em; }
.bd-pool-t td { padding: .12em .3em; border-bottom: 1px solid #1c2a40; color: #cbd6e4; white-space: nowrap; }
.bd-pool-t td.rk { color: #facc15; font-weight: 900; width: 1.4em; }
.bd-pool-t td.tn { color: #fff; font-weight: 700; width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bd-pool-t td.wl { font-weight: 800; text-align: right; }
.bd-pool-t td.pf { color: #8ea0b8; text-align: right; }
.bd-pool-note { font-size: .75em; color: #fde68a; margin-top: .3em; }
.db-side.bd-poolbox .bd-pool-t { font-size: 1.1em; }
.db-places { align-items: center; justify-content: center; gap: calc(var(--s) * 2vh); }
.db-places-h { font-size: 2.4em; font-weight: 900; color: #facc15; letter-spacing: .04em; }
.db-places-fin { font-size: 1.1em; color: #cbd6e4; display: flex; align-items: center; gap: .5em; flex-wrap: wrap; justify-content: center; }
.db-places-fin b { color: #fff; font-size: 1.3em; font-variant-numeric: tabular-nums; }
.db-places-l { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: repeat(var(--r, 4), auto); gap: .5em 3vw; width: min(100%, 70em); }
.db-places-l li { display: flex; align-items: baseline; gap: .7em; background: #111d2e; border: 2px solid #22324a; border-radius: .5em; padding: .35em .8em; min-width: 0; }
.db-places-l .pl { font-weight: 900; color: #8ea0b8; width: 2.6em; flex: none; }
.db-places-l .tn { font-weight: 800; font-size: 1.3em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-places-l li.p1 { border-color: #facc15; } .db-places-l li.p1 .pl { color: #facc15; }
.db-places-l li.p2 .pl { color: #e5e7eb; } .db-places-l li.p3 .pl { color: #f0a36b; }
.board.phone .db-places-l { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
.db-next-n { font-size: 1.15em; font-weight: 800; color: #fff; padding: .15em 0; }
.db-side .bd-pool .bd-pool-t { font-size: 1.05em; }
.board.phone .db-places { justify-content: flex-start; }
.db-places-l .pl small { font-size: .6em; font-weight: 700; }
.db-places-l .pl { width: auto; min-width: 2.6em; }

/* ---- Mat Scoreboard (0.39): the dual line's "Home" tag, and the bottom bar — On deck · In the hole on this mat,
   big enough to read across a gym (sized by the screen's height, capped by its width for screens that aren't 16:9) */
.sb { --sbn-h: 10.5vh; }
.sb-dual .home-tag { font-size: .5em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; border: .12em solid currentColor; border-radius: .35em; padding: .05em .45em; opacity: .75; flex: none; }
.sb-next { flex: none; height: var(--sbn-h); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #0b1220; border-top: 1px solid #1e293b; color: #cbd6e4; }
.sbn-item { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: .5vh; padding: 0 2vw; }
.sbn-item + .sbn-item { border-left: 1px solid #1e293b; }
.sbn-h { display: flex; align-items: baseline; gap: .7em; font-size: min(2.7vh, 1.5vw); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbn-h b { color: #facc15; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; flex: none; }
.sbn-h span { color: #9fb0c7; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.sbn-who { font-size: min(4.2vh, 2.35vw); font-weight: 800; color: #fff; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-next.one { grid-template-columns: minmax(0, 1fr); }
.sbn-msg { font-size: min(3.6vh, 2vw); font-weight: 700; color: #cbd6e4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
/* Main menu and Full screen sit just above the bar */
.sb.has-next .corner-home, .sb.has-next .sb-fs { bottom: calc(var(--sbn-h) + 10px); }
@media (orientation: portrait) {
  .sb { --sbn-h: 13vh; }
  .sb-next { grid-template-columns: minmax(0, 1fr); grid-auto-rows: minmax(0, 1fr); }
  .sbn-item + .sbn-item { border-left: 0; border-top: 1px solid #1e293b; }
  .sbn-h { font-size: min(1.8vh, 3.4vw); }
  .sbn-who { font-size: min(2.6vh, 4.6vw); }
}

/* ---- Livestream Overlay (0.39): the home team's small "H" tag; the preview's Main menu link (never in OBS); the
   overlay page's Main menu and mat cards (light page) */
.ovb-team .h, .ovs-team .h { font-size: max(.6vw, 9px); font-weight: 900; color: #0b0e14; background: #b6c2d4; border-radius: .2vw; padding: 0 .25vw; line-height: 1.35; }
body.overlay-body.overlay-preview .corner-home.ov-home { display: inline-flex !important; gap: 4px; align-items: center; }
.ovp-top { margin-bottom: 12px; }
.ovp .btn-home { background: var(--panel); color: var(--ink); border-color: var(--line); }
.ovp-h2 { font-size: 14px; margin: 8px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ovp-mats { margin-bottom: 14px; }
.ovp-mats .mat-pick { background: #fff; border: 2px solid var(--line); color: var(--ink); padding: 14px 16px; text-align: left; font: inherit; cursor: pointer; }
.ovp-mats .mat-pick b { font-size: 20px; }
.ovp-mats .mat-pick .mp-now { color: var(--ink); }
.ovp-mats .mat-pick .mp-sub, .ovp-mats .mat-pick .mp-loc { color: var(--muted); }
.ovp-mats .mat-pick.on { border-color: var(--brand, #2563eb); background: #eef4ff; }
.ovp-mats .mat-pick:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
/* Bout Board (0.39): the strip's WRESTLING / REPORT NOW / ON DECK / IN THE HOLE tags stay on one line, a touch smaller so
   they fit a narrow tile */
.db-t.now .tag, .db-t.deck .tag, .db-t.hole .tag, .db-t.verify .tag { overflow-wrap: normal; white-space: nowrap; overflow: hidden; letter-spacing: 0; font-size: .58em; }
/* a TV on its side: the dual line keeps the badges, the Home tag and the scores (the team names are on the sides) */
@media (orientation: portrait) {
  .sb-dual .sbd-tn { display: none; }
  .sb-dual .sbd-mid { font-size: .55em; }
}

/* ---- Mat Scoreboard: a break / medical timeout with no bout being wrestled, and the medical band over a bout */
.sb-held { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.6vh; padding: 0 3vw; background: #000; }
.sbh-title { display: flex; align-items: center; gap: 1.4vw; color: #facc15; font-size: min(8vh, 6.5vw); line-height: 1; }
.sbh-title b { font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.sbh-title svg { width: 1.05em; height: 1.05em; flex: none; }
.sb-held.med .sbh-title { color: #fbbf24; }
.sbh-clock { font-size: min(36vh, 26vw); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
.sbh-clock.soon { font-size: min(9vh, 6vw); white-space: nowrap; line-height: 1.2; color: #facc15; }
.sbh-note { font-size: min(14vh, 9vw); font-weight: 900; line-height: 1.1; color: #fff; max-width: 92vw; overflow-wrap: anywhere; }
.sbh-sub { font-size: min(6.4vh, 4vw); font-weight: 800; color: #cbd6e4; }
.sbh-hint { font-size: min(4.2vh, 3vw); color: #8ea0b8; }
.sb-med { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 2vw; padding: 1vh 2vw; background: #f59e0b; color: #1c1206; }
.sb-med[hidden] { display: none; }
.sbm-what { display: flex; align-items: center; gap: 1vw; font-size: min(7vh, 4.4vw); font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.sbm-what svg { width: 1.1em; height: 1.1em; flex: none; }
.sbm-clock { font-size: min(7vh, 4.4vw); font-weight: 900; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: .5em; }
.sbm-clock small { font-size: .55em; letter-spacing: .1em; font-weight: 800; }
.sbm-clock i { width: .5em; }
.sb.is-med .sb-clock, .sb.is-med .sb-period { opacity: .5; }
.sb-timers { font-size: 4.4vh; font-weight: 800; }

/* 0.44 — the Bout Board for one gym: switch gyms from the corner (hover, like Main menu) */
.corner-gyms { position: fixed; bottom: 10px; left: 150px; display: flex; gap: 4px; z-index: 20; opacity: 0; transition: opacity .3s; }
body.mouse-moved .corner-gyms { opacity: .35; }
.corner-gyms:hover { opacity: 1 !important; }
.corner-gyms a { background: rgba(255,255,255,.12); color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 14px; text-decoration: none !important; }
.corner-gyms a.on { background: #facc15; color: #111; font-weight: 700; }
.ovp-mats .pick-loc { color: var(--muted); margin: 12px 0 8px; }
.ovp-mats .pick-loc:first-child { margin-top: 0; }
.ovp-mats .mat-pick-grid + .pick-loc { margin-top: 16px; }

/* 0.51 — big screens read from across the gym: the on-deck rows bigger, a mat calling its wrestlers in amber (red
   is for the one wrestling), the mat's name and the period plain on the scoreboard, the overlay readable on a phone */
.bd-mat.live { border-color: #3a4c68; }
.bd-mat.report { border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, .35) inset; }
.bd-mat.report .bd-now .bd-label span:first-child { background: #f59e0b; color: #111; }
.bd-label { font-size: .9em; }
.bd-deck .bd-w { font-size: 1.12em; }
.bd-deck .bd-wt { font-size: .82em; }
.bd-wtext .bd-wt { font-size: .72em; }
.bd-list-items { columns: 1; }
body:not(.mouse-moved) .board.tv, body:not(.mouse-moved) .sb { cursor: none; }
.sb-top > span:first-child { font-size: 1.6em; font-weight: 800; color: #fff; }
.sb-period { font-weight: 700; color: #e2e8f0; }
.ovs-nm span, .ovs-mid span { font-size: max(1.2vw, 18px); }

/* 0.51 — the Bout Board's cards line up: each name on one line (a little smaller to fit, else cut short), the tag
   line on one line (the clock keeps its place at the end), and On deck / In the hole grow into the room left at the
   bottom of the card (--d, set by fit() in board.js) */
.bd-w.big .bd-wn { display: block; white-space: nowrap; -webkit-line-clamp: none; line-clamp: none; line-height: 1.15; }
.bd-label { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; min-height: 1.35em; }
.bd-label > span { flex: none; }
.bd-label > span:nth-child(2) { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bd-clock { line-height: 1; padding-left: .3em; }
.bd-deck { font-size: calc(var(--d, 1) * 1em); }
.bd-grid .bd-deck { margin-top: calc(var(--g, 0) * 1em); }
/* 0.51 — Mat Scoreboard: the bout line sits level with the big mat name */
.sb-top { align-items: baseline; gap: 2vw; }
.sb-top > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sb-top > span:first-child { flex: none; max-width: 70%; }

/* 0.51 — Livestream overlay: the small words 18px or more on a 1280×720 canvas too (the names never smaller than
   them), each on one line; REPORT NOW fits the middle */
.ovs-top, .ovb-row span, .ovb-foot, .ovb-team .t, .ovs-team .t, .ovb-team .b, .ovs-team .b { font-size: max(.95vw, 18px); }
.ovs-top { max-width: calc(100% - 2.4vw); box-sizing: border-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovs-tabs .ovs-top { min-width: 0; }
.ovb-team .k, .ovs-team .k { font-size: max(.75vw, 14px); }
.ovs-mid { flex-basis: max(9.5vw, 150px); padding: 0 .4vw; }
.ovs-mid span { white-space: nowrap; letter-spacing: .04em; }
.ovs-mid b { font-size: max(2.3vw, 30px); }
.ov-bug { width: max(21vw, 300px); }
.ov-bug.has-dual { width: max(23vw, 370px); }
.ovb-row { height: max(2.5vw, 34px); }
.ovb-row b { font-size: max(1.3vw, 20px); }
.ovb-row em { font-size: max(1.7vw, 24px); }
.ovb-foot b { font-size: max(1.15vw, 20px); }

/* 0.51 — Awards Screen: no sponsor bar without sponsors; the waiting screen shows them big, one at a time */
.aw-sponsor[hidden] { display: none; }
.aw-idle-sp { margin-top: 4vh; display: flex; flex-direction: column; align-items: center; gap: 1.2vh; animation: aw-sp-in .6s ease-out; }
.aw-idle-sp img { max-width: 50vw; max-height: 26vh; object-fit: contain; background: #fff; border-radius: 1.4vh; padding: 1.4vh 2vh; box-sizing: border-box; }
.aw-idle-sp b { font-size: min(6vh, 7vw); color: #fff; line-height: 1.1; }
.aw-idle-sp span { font-size: min(3vh, 3.6vw); color: #cbd6e4; }
.aw-idle-sp small { font-size: min(2vh, 2.6vw); color: #8ea0b8; letter-spacing: .15em; text-transform: uppercase; margin-top: 1vh; }
@keyframes aw-sp-in { from { opacity: 0; } }

/* 0.51 — Announcer (the station's styles are in stations.css): each call's tag in the status colors — amber Report
   now, red Wrestling, blue On deck / In the hole; the custom announcement on top, one line on a wide screen */
.an-call.st-report .an-kind { background: #f59e0b; color: #111; }
.an-call.st-wrestling .an-kind { background: #dc2626; }
.an-call.st-deck .an-kind, .an-call.st-hole .an-kind { background: #1d4ed8; }
.an-call.st-hole .an-kind { background: #e8f0ff; color: #1d4ed8; box-shadow: inset 0 0 0 1px #9db4ee; }
.an-call.st-wrestling .an-names { opacity: .8; }
.st-main > .an-custom { margin-bottom: 14px; }
.an-custom h2 { margin: 0; font-size: 15px; }
.an-custom-row { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.an-custom-row textarea { flex: 1 1 320px; min-height: 38px; resize: vertical; }
.an-custom-row .row { flex: 0 1 auto; min-width: 0; margin: 0; flex-wrap: wrap; }

/* 0.51 review: the bout tag on a board card — number and weight whole, the round cut first */
.bd-label > span:nth-child(2) { display: flex; min-width: 0; }
.bd-key { flex: none; font-weight: inherit; }
.bd-rnd { font-style: normal; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-left: .3em; }
.bd-rnd::before { content: "· "; }

/* ---- 0.52: the gym screens match Live Results — Barlow (bundled, css/fonts.css), deep navy, and one meaning per
   colour with a word beside it: red wrestling, amber Report now (and medical), blue on deck / in the hole, green
   done, grey idle (a break). Names, mat numbers, scores and clocks in the condensed face. */
.screen-board { background: #0a1020; }
.board { font-family: var(--f-text); font-variant-numeric: tabular-nums; }
.bd-head { align-items: center; }
.bd-wm { flex: none; font-size: 1.55em; }
.bd-div { flex: none; width: 1px; align-self: stretch; margin: .3em 0; background: #2a3654; }
.bd-title { font-family: var(--f-cond); font-weight: 800; font-size: 1.95em; letter-spacing: .005em; }
.bd-sub { color: #9aa6bd; }
.bd-time { font-family: var(--f-cond); font-weight: 800; font-size: 1.75em; color: #facc15; }
.bd-mat { background: #121a2e; border-color: #24304a; }
.bd-mat.live { border-color: #ef4444; }
.bd-mat.report { border-color: #f59e0b; }
.bd-mat-name { font-family: var(--f-cond); font-weight: 800; font-size: 1.95em; color: #eef2f8; letter-spacing: .005em; }
.bd-mat-name small { font-family: var(--f-text); color: #9aa6bd; }
.bd-label { color: #9aa6bd; }
.bd-label span:first-child { font-family: var(--f-cond); font-weight: 800; letter-spacing: .06em; padding: .02em .5em; }
.bd-mat.live .bd-now .bd-label span:first-child { background: #ef4444; color: #fff; }
.bd-mat.report .bd-now .bd-label span:first-child { background: #f59e0b; color: #1a1205; }
.bd-deck { border-top-color: #24304a; }
.bd-deck .bd-label span:first-child { background: #2563eb; color: #fff; }
.bd-deck.hole .bd-label span:first-child { background: transparent; color: #93c5fd; box-shadow: inset 0 0 0 .1em #3b82f6; }
/* the clock was green, which means done: white, pale red while the bout runs */
.bd-clock { font-family: var(--f-cond); font-weight: 800; color: #eef2f8 !important; }
.bd-mat.live .bd-clock { color: #fca5a5 !important; }
.bd-w.big { font-family: var(--f-cond); font-weight: 700; }
.bd-wtext .bd-wt { font-family: var(--f-text); font-weight: 500; }
.bd-w:not(.big) .bd-wn { font-weight: 500; }
.bd-wt { color: #9aa6bd; }
.bd-sc { font-family: var(--f-cond); font-weight: 800; font-size: 1.6em; }
.bd-empty { color: #9aa6bd; }
.bd-list { background: #121a2e; color: #c8d1e1; }
.bd-list b { color: #facc15; }
/* a break is idle (grey); a medical timeout is a real warning (amber) */
.bd-mat.paused { border-color: #3a4766; }
.bd-mat.paused .bd-break { color: #c8d1e1; font-family: var(--f-cond); }
.bd-mat.paused .bd-break small { color: #9aa6bd; font-family: var(--f-text); }
.bd-mat.paused.medical { border-color: #f59e0b; }
.bd-mat.paused.medical .bd-break { color: #fbbf24; }
.bd-brk-tag { background: #3a4766; font-family: var(--f-text); }
.bd-brk-tag.medical { background: #f59e0b; color: #1a1205; }
/* Results on your phone · wrestle.live/t/… (only when the event is online) — a fixed size, not scaled with the cards */
.bd-addr { flex: none; display: flex; align-items: baseline; justify-content: center; gap: .7em; font-size: min(2.1vh, 2.4vw); color: #c8d1e1; line-height: 1.2; }
.bd-addr b { font-family: var(--f-cond); font-weight: 800; font-size: 1.45em; color: #facc15; letter-spacing: .01em; }
.board.dual .db-pts, .board .db-score b { font-family: var(--f-cond); }

/* the mat scoreboard */
.sb { font-family: var(--f-text); background: #0a1020; font-variant-numeric: tabular-nums; }
.sb-top { background: #0a1020; border-bottom: 1px solid #24304a; }
.sb-top > span:first-child { font-family: var(--f-cond); font-weight: 800; letter-spacing: .01em; }
.sb-name { font-family: var(--f-cond); font-weight: 700; }
.sb-score, .sb-clock { font-family: var(--f-cond); font-weight: 800; }
.sb-center { background: #05080f; }
.sb-period { font-family: var(--f-cond); font-weight: 800; letter-spacing: .06em; color: #c8d1e1; }
.sb-period.report { color: #fbbf24; }
.sb-period.live { color: #fca5a5; }
.sb-period.done { color: #86efac; }
.sb-next, .sb-dual { background: #0a1020; border-top-color: #24304a; }
.sbn-item + .sbn-item { border-left-color: #24304a; }
.sbn-h b { color: #93c5fd; }
.sbn-who { font-family: var(--f-cond); font-weight: 700; }
.sb-wait { font-family: var(--f-cond); font-weight: 700; color: #9aa6bd; }

/* the awards screen and the livestream overlay: the same type */
body.screen-awards, body.overlay-body { font-family: var(--f-text); }
