:root {
    color-scheme: dark;
    font-family: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
    background: #08090d;
    color: #f6f7fb;
}

* { box-sizing: border-box; }

html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    background: radial-gradient(circle at top, #1d2340 0, #0a0c14 48%, #050609 100%);
}

body {
    display: grid;
    place-items: center;
    padding: 18px;
}

.pageFrame {
    position: relative;
    width: min(1400px, 100%);
    min-width: 0;
    min-height: 0;
}

.shell {
    width: 100%;
    display: grid;
    gap: 0;
    transform-origin: top left;
}

body.fitViewport {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.playerControls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 68px;
    margin-bottom: 12px;
}

.sessionControl { order: 1; }
.volumeControl { order: 2; }

.roleReviewGroup {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    order: 3;
}

.viewerUtilities {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    order: 0;
    margin-left: 0;
}

.communicationPanel { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-height: 30px; margin: 0; order: 4; flex: 0 1 auto; }
.communicationIndicator { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 5px 10px; border: 1px solid #30394a; border-radius: 999px; background: #171c27; color: #8994a5; font: 650 11px/1.2 "Segoe UI", Arial, sans-serif; white-space: nowrap; cursor: pointer; }
.communicationIndicator[hidden] { display: none; }
.communicationIndicator:hover:not(:disabled) { border-color: #9eb9df; background: #2d4565; }
.communicationIndicator:disabled { opacity: 1; cursor: default; }
.communicationIndicator.active { border-color: #39845f; background: #16452f; color: #f1fff6; box-shadow: none; }
.communicationIndicator.unknown { border-color: #2b3342; color: #737e90; }
.communicationDot { width: 12px; height: 12px; flex: none; border: 1px solid #414b5c; border-radius: 50%; background: #626d7d; box-shadow: inset 0 1px 2px #0008; }
.communicationIndicator.active .communicationDot { width: 13px; height: 13px; border-color: #c4ffdc; background: #63ffa1; box-shadow: 0 0 5px #63ffa1, 0 0 12px #31e887aa; }
.communicationIndicator.unknown .communicationDot { border-color: #343c4b; background: #4e5868; box-shadow: inset 0 1px 2px #0008; }
.communicationFeedback { min-height: 1em; color: #f2bc8a; font: 600 11px/1.2 "Segoe UI", Arial, sans-serif; }
.communicationIndicator.justActivated { animation: communicationButtonPulse 850ms ease-in-out 3; }
.communicationAlerts { position: absolute; z-index: 10; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 14px; overflow: hidden; pointer-events: none; }
.communicationAlert { position: relative; display: flex; align-items: center; gap: 12px; width: min(420px, 100%); min-height: 78px; flex: 0 0 auto; padding: 13px 17px; border: 3px solid #fff; border-radius: 12px; color: #14202a; box-shadow: 0 12px 42px #000b, 0 0 0 5px var(--alert-glow); }
.communicationAlert.judges-ready { --alert-glow: #ffcf3d99; background: linear-gradient(115deg, #fff18a, #ffc72e); }
.communicationAlert.tech-panel-ready { --alert-glow: #3be08d99; background: linear-gradient(115deg, #a3f0bf, #42cf82); }
.communicationAlert.competitor-scored { --alert-glow: #36aaff99; background: linear-gradient(115deg, #a8dcff, #4aaaff); }
.communicationAlert.judges-ready.ready-first, .communicationAlert.tech-panel-ready.ready-first { --alert-glow: #ffcf3d99; background: linear-gradient(115deg, #fff18a, #ffc72e); }
.communicationAlert.judges-ready.ready-second, .communicationAlert.tech-panel-ready.ready-second { --alert-glow: #3be08d99; background: linear-gradient(115deg, #a3f0bf, #42cf82); }
.communicationAlert.hidden { display: none; }
.communicationAlert.judges-ready.not-ready, .communicationAlert.tech-panel-ready.not-ready { --alert-glow: #ff334dcc; background: linear-gradient(115deg, #ff8a94, #e51d38); color: #26070b; }
.communicationAlertCopy strong.hidden, .communicationAlertCheck .hidden { display: none; }
.communicationAlert.judges-ready.not-ready, .communicationAlert.tech-panel-ready.not-ready { --alert-glow: #ff334dcc; background: linear-gradient(115deg, #ff8a94, #e51d38); color: #26070b; }
.communicationAlertCopy strong.hidden, .communicationAlertCheck .hidden { display: none; }
.communicationAlertCheck { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 3px solid currentColor; border-radius: 50%; font-size: 31px; font-weight: 900; line-height: 1; }
.communicationAlertCopy { display: grid; gap: 4px; min-width: 0; }
.communicationAlertCopy strong { font-size: clamp(18px, 3vw, 25px); font-weight: 900; line-height: 1.1; }
.communicationAlert.visible { animation: communicationAlertPulse 750ms ease-in-out 3; }
.viewer.scoredFrameAlert { animation: competitorScoredFrameGlow 520ms ease-in-out infinite; }
.viewer.scoredFrameAlert::after { content: ""; position: absolute; z-index: 9; inset: 0; border: 12px solid #14baff; border-radius: inherit; box-shadow: inset 0 0 0 3px #fff, inset 0 0 42px 12px #00aaff; pointer-events: none; animation: competitorScoredFramePulse 520ms ease-in-out infinite; }
@keyframes communicationButtonPulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; } 45% { transform: scale(1.1); box-shadow: 0 0 0 7px var(--alert-glow, #ffe27a99); } }
@keyframes communicationAlertPulse { 0%, 100% { filter: brightness(1); box-shadow: 0 12px 42px #000b, 0 0 0 5px var(--alert-glow); } 45% { filter: brightness(1.18); box-shadow: 0 12px 42px #000b, 0 0 0 13px var(--alert-glow); } }
@keyframes competitorScoredFramePulse { 0%, 100% { opacity: .78; border-color: #008cff; box-shadow: inset 0 0 0 2px #dff8ff, inset 0 0 30px 8px #00aaff; } 50% { opacity: 1; border-color: #b8f1ff; box-shadow: inset 0 0 0 5px #fff, inset 0 0 58px 18px #008cff; } }
@keyframes competitorScoredFrameGlow { 0%, 100% { box-shadow: 0 0 0 7px #008cff, 0 0 0 13px #008cffcc, 0 0 28px 16px #008cffaa, 0 24px 80px rgba(0,0,0,.38); } 50% { box-shadow: 0 0 0 11px #e7faff, 0 0 0 20px #00aaff, 0 0 58px 27px #008cff, 0 24px 80px rgba(0,0,0,.38); } }
[data-communication-indicator="judges-ready"].justActivated.ready-first, [data-communication-indicator="tech-panel-ready"].justActivated.ready-first { --alert-glow: #ffcf3d99; }
[data-communication-indicator="judges-ready"].justActivated.ready-second, [data-communication-indicator="tech-panel-ready"].justActivated.ready-second { --alert-glow: #3be08d99; }
[data-communication-indicator="competitor-scored"].justActivated { --alert-glow: #36aaff99; }
@media (max-width: 600px) {
    .communicationAlert { min-height: 54px; gap: 8px; padding: 7px 11px; border-width: 2px; }
    .communicationAlertCheck { width: 36px; height: 36px; border-width: 2px; font-size: 23px; }
    .communicationAlertCopy { gap: 2px; }
    .communicationAlertCopy strong { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .communicationIndicator.justActivated, .communicationAlert.visible, .viewer.scoredFrameAlert, .viewer.scoredFrameAlert::after { animation-duration: 1ms; animation-iteration-count: 1; }
    .viewer.scoredFrameAlert { box-shadow: 0 0 0 8px #fff, 0 0 0 16px #008cff, 0 0 36px 18px #008cff, 0 24px 80px rgba(0,0,0,.38); }
    .viewer.scoredFrameAlert::after { opacity: 1; border-color: #00aaff; box-shadow: inset 0 0 0 5px #fff, inset 0 0 50px 16px #008cff; }
}

.refreshButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 102px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #7197de;
    border-radius: 7px;
    background: #2b58a8;
    color: #f6f7fb;
    font: 600 12px/1 "Segoe UI", Arial, sans-serif;
    cursor: pointer;
}

.refreshButton:hover { background: #3469bd; }
.refreshButton:active { background: #214889; }

.refreshButton svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.languageControl {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 128px;
    height: 44px;
    padding: 4px 8px;
    border: 1px solid #3c4567;
    border-radius: 7px;
    background: #0c0f1b;
}

.languageButton {
    width: 100%;
    height: 34px;
    padding: 5px 24px 5px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #f6f7fb;
    font: 600 12px/1 "Segoe UI", Arial, sans-serif;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.languageControl:focus-within {
    border-color: #7b8cff;
    box-shadow: 0 0 0 2px rgba(123, 140, 255, 0.2);
}

.languageMenu {
    position: absolute;
    z-index: 31;
    top: calc(100% - 2px);
    right: 0;
    width: 100%;
    overflow: hidden;
    border: 1px solid #56608b;
    border-radius: 7px;
    background: #080a12;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.languageMenu.hidden { display: none; }

.languageMenu button {
    width: 100%;
    padding: 9px 10px;
    border: 0;
    background: transparent;
    color: #fff;
    font: 600 12px/1.2 "Segoe UI", Arial, sans-serif;
    text-align: left;
    cursor: pointer;
}

.languageMenu button:hover,
.languageMenu button[aria-selected="true"] {
    background: #243b79;
}

.controlGroup {
    position: relative;
    display: block;
    min-inline-size: 0;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 4px 8px;
    border: 1px solid #3c4567;
    border-radius: 7px;
    background: #0c0f1b;
}

.controlGroup:focus-within {
    border-color: #7b8cff;
    box-shadow: 0 0 0 2px rgba(123, 140, 255, 0.2);
}

.panelControl {
    position: relative;
    z-index: 30;
    width: max-content;
    margin-left: 8px;
    flex: 0 0 auto;
}

.panelTypeButton {
    width: max-content;
    min-height: 34px;
    display: grid;
    grid-template-columns: max-content auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 27px 5px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font: 700 13px/1 "Segoe UI", Arial, sans-serif;
    cursor: pointer;
}

.panelTypeButton #panelTypeLabel,
.panelTypeButton .panelTypeSizer {
    grid-column: 1;
    grid-row: 1;
}

.panelTypeSizer { visibility: hidden; }
.panelTypeButton .panelChevron { grid-column: 2; grid-row: 1; }

.panelChevron {
    font-size: 18px;
    line-height: 0.7;
}

.panelTypeMenu {
    position: absolute;
    z-index: 20;
    top: calc(100% - 2px);
    right: 0;
    width: 100%;
    min-width: 190px;
    overflow: hidden;
    border: 1px solid #56608b;
    border-radius: 7px;
    background: #080a12;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.panelTypeMenu.hidden { display: none; }

.panelTypeMenu button {
    width: 100%;
    padding: 9px 12px;
    border: 0;
    background: transparent;
    color: #fff;
    font: 700 13px/1.2 "Segoe UI", Arial, sans-serif;
    text-align: left;
    cursor: pointer;
}

.panelTypeMenu button[data-panel-type=""] { min-height: 34px; }

.panelTypeMenu button:hover,
.panelTypeMenu button[aria-selected="true"] {
    background: #243b79;
}

.reviewIndicator {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 158px;
    color: #f6f7fb;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.reviewIndicator.hidden { display: none; }

.reviewIndicatorDot {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border-radius: 50%;
    background: #e53935;
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.2);
}

.reviewIndicator.review .reviewIndicatorDot { display: none; }

.reviewIndicator.review {
    width: 112px;
    min-width: 112px;
    flex: 0 0 112px;
    justify-content: center;
    padding: 5px 10px 6px;
    border: 1px solid #d2daec;
    border-radius: 7px;
    background: #e8edf8;
    color: #17213b;
    letter-spacing: normal;
    text-align: center;
}

.reviewTimeBlock {
    display: grid;
    justify-items: center;
    gap: 1px;
}

.reviewTimeLabel {
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reviewTimeValue {
    font-size: 24px;
    font-weight: 850;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.reviewIndicator.live .reviewIndicatorDot {
    background: #e53935;
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.26);
    animation: livePulse 900ms ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.28; transform: scale(0.78); }
}

.networkIndicator {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    min-width: 256px;
    padding: 0 2px;
    color: #8f96ac;
    font: 750 13px/19px "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.035em;
    transition: color 160ms ease;
}

.networkIndicator.good {
    color: #37d67a;
}

.networkIndicator.slow,
.networkIndicator.disconnected {
    color: #ff5c67;
}

.wifiIcon {
    width: 19px;
    height: 19px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
}

.wifiIcon circle {
    fill: currentColor;
    stroke: none;
}

#networkLatency {
    min-width: 76px;
    text-align: left;
}

.networkTransferSeparator {
    color: #8f96ac;
}

#networkTransfer,
#networkCache {
    min-width: 64px;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.vroConnectionStatus {
    flex: 0 0 auto;
    font: 750 13px/19px "Segoe UI", Arial, sans-serif;
    white-space: nowrap;
}

.vroConnectionStatus.connected { color: #37d67a; }
.vroConnectionStatus.disconnected { color: #ff5c67; }

.viewer {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid #343b5c;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 24px 80px rgba(0,0,0,0.38);
    margin-bottom: 1px;
}

.playbackStatus {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    max-width: calc(100% - 16px);
    padding: 3.5px 11px;
    overflow: hidden;
    border-radius: 0 0 6px 0;
    background: #666;
    color: #fff;
    font: 600 14px/1.2 "Segoe UI", Arial, sans-serif;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.connectedClientBadges {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    display: flex;
    max-width: calc(100% - 16px);
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    pointer-events: none;
}

.connectedClientBadge {
    min-width: 38px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 6px;
    background: rgba(8, 12, 20, 0.86);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
    font: 800 13px/1.1 "Segoe UI", Arial, sans-serif;
    text-align: center;
}

video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
    transform-origin: 0 0;
    will-change: transform;
}

video[data-viewer-role="announcer"],
video[data-viewer-role="data-specialist"],
video[data-viewer-role="judging"],
video[data-viewer-role="observer-judge"],
video[data-viewer-role="referee"] {
    transform: none !important;
}

video.preloading {
    visibility: hidden;
}

.liveTransitionFrame {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    pointer-events: none;
}

.liveTransitionFrame.visible { display: block; }

.emptyState {
    --audio-test-control-width: 170px;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    color: #c7cce0;
    text-align: center;
    font-size: clamp(16px, 2.2vw, 25px);
    pointer-events: none;
}

.testPattern {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    /* SMPTE-style bars: bright top bars, a dark calibration strip, then pluge blocks. */
    background: linear-gradient(to right,
        #c9c9c9 0 14.2857%,
        #f1ef00 14.2857% 28.5714%,
        #00d9dc 28.5714% 42.8571%,
        #00ce20 42.8571% 57.1428%,
        #d900cf 57.1428% 71.4285%,
        #e00012 71.4285% 85.7142%,
        #0919d8 85.7142% 100%)
        top / 100% 64.5% no-repeat;
}

.testPattern::before,
.testPattern::after {
    position: absolute;
    right: 0;
    left: 0;
    content: "";
}

.testPattern::before {
    top: 64.5%;
    height: 14.5%;
    background: linear-gradient(to right,
        #0b19da 0 14.2857%,
        #050505 14.2857% 28.5714%,
        #d900cf 28.5714% 42.8571%,
        #050505 42.8571% 57.1428%,
        #00d9dc 57.1428% 71.4285%,
        #050505 71.4285% 85.7142%,
        #c9c9c9 85.7142% 100%);
}

.testPattern::after {
    top: 79%;
    bottom: 0;
    background: linear-gradient(to right,
        #082654 0 17.5%,
        #f4f4f4 17.5% 35.5%,
        #3d087a 35.5% 53.5%,
        #202020 53.5% 71.5%,
        #030303 71.5% 76.5%,
        #242424 76.5% 86%,
        #171717 86% 100%);
}

.emptyState.waitingForVideo .testPattern,
.emptyState.operatorOffline .testPattern { display: block; }

.testPatternLabel {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: max-content;
    max-width: calc(100% - 24px);
    padding: 8px clamp(18px, 4vw, 48px);
    transform: translate(-50%, -50%);
    background: #030303;
    color: #fff;
    font: 400 clamp(28px, 5vw, 70px)/1.2 Arial, sans-serif;
    letter-spacing: 0.02em;
    text-align: center;
}

.emptyState.waitingForVideo .emptyStateMessage,
.emptyState.operatorOffline .emptyStateMessage {
    display: none;
}

.audioTestButton {
    display: none;
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    width: var(--audio-test-control-width);
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    font: 700 14px/1.2 "Segoe UI", Arial, sans-serif;
    cursor: pointer;
    pointer-events: auto;
}

.emptyState.enterRinkId .audioTestButton,
.emptyState.waitingForVideo .audioTestButton,
.emptyState.operatorOffline .audioTestButton { display: flex; }
.audioTestButton:hover { background: #1b2342; }
.audioTestButton:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.audioTestButton svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.audioTestFeedback {
    display: none;
    position: absolute;
    right: 18px;
    bottom: 66px;
    z-index: 2;
    width: var(--audio-test-control-width);
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.emptyState.enterRinkId .audioTestFeedback.active,
.emptyState.waitingForVideo .audioTestFeedback.active,
.emptyState.operatorOffline .audioTestFeedback.active { display: flex; }

.audioTestLevel {
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    font: 700 13px/1.2 "Segoe UI", Arial, sans-serif;
    text-align: center;
}

.audioTestWave {
    width: 72px;
    height: 24px;
    overflow: hidden;
    fill: none;
    stroke: #80e6ff;
    stroke-width: 2;
    stroke-linecap: round;
    opacity: 0.4;
}

.audioTestFeedback.audible .audioTestWave { opacity: 1; }
.audioTestFeedback.audible .audioTestWave path { animation: testToneWave 900ms linear infinite; }

@keyframes testToneWave {
    to { transform: translateX(-24px); }
}

@media (prefers-reduced-motion: reduce) {
    .audioTestFeedback.audible .audioTestWave path { animation: none; }
}

.emptyStateMessage {
    position: relative;
    z-index: 1;
    line-height: 1.25;
    white-space: pre-line;
}

.emptyState.enterRinkId .emptyStateMessage,
.emptyState.selectRole .emptyStateMessage {
    color: #f5f5f5;
    font-weight: 800;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
}

.emptyState.hidden { display: none; }

label {
    display: grid;
    gap: 6px;
    color: #c7cce0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sessionControl {
    width: calc(7ch + 47px);
    flex: 0 0 calc(7ch + 47px);
    font: 700 14px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.sessionControl input[type="text"] {
    display: block;
    width: 100%;
    min-width: 0;
    font: inherit;
    padding: 5px 2px;
    text-align: center;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.controlLabel {
    color: #c7cce0;
    font-size: 10px;
    font-weight: 600;
    line-height: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    position: absolute;
    top: -7px;
    left: 5px;
    z-index: 1;
    margin: 0;
    padding: 0 3px;
    background: #0c0f1b;
}

.languageLabel {
    position: absolute;
    top: -7px;
    left: 5px;
    z-index: 1;
    padding: 0 3px;
    color: #c7cce0;
    background: #0c0f1b;
    font-size: 10px;
    font-weight: 600;
    line-height: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.visuallyHidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

input[type="text"] {
    min-height: 34px;
    padding: 5px 9px;
    border: 1px solid #56608b;
    border-radius: 7px;
    background: #080a12;
    color: #fff;
    font: 800 17px/1 monospace;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.volumeControl {
    width: 201.6px;
    flex: 0 0 201.6px;
}

.volumeInputRow {
    width: 100%;
    height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.volumeSliderControl {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: center;
}

.volumeSlider {
    width: 100%;
    height: 18px;
    min-height: 0;
    margin: 0;
    accent-color: #7b8cff;
}

.volumeSlider:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.muteControl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    margin: 0;
}

.muteControl input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #7b8cff;
}

.muteControl span {
    font-size: 10px;
}

.timelineSection {
    display: grid;
    gap: 0;
}

.timelineSection[hidden] { display: none; }

.timelineSection.diagnosticsOnly .timelineControlRow { display: none; }

.timelineControlRow {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.timelineControlRow[hidden] {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.refereeTimer {
    position: absolute;
    z-index: 8;
    bottom: calc(100% - 5px);
    min-width: 50px;
    padding: 3px 7px 4px;
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font: 700 16.5px/1 "Segoe UI", Arial, sans-serif;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

.refereeTimer.hidden { display: none; }

.replayProgramTimeIndicator {
    position: absolute;
    top: -26px;
    z-index: 7;
    padding: 3px 8px;
    transform: translateX(-50%);
    border: 1px solid #666;
    border-radius: 0;
    background: #b7b7b7;
    color: #000;
    font: 400 14px/1.1 "Segoe UI", Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
}

.replayProgramTimeIndicator.hidden { display: none; }

.timelineMetaRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.timelineCanvas {
    display: block;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    height: 58px;
    border: 1px solid #343b5c;
    border-radius: 5px;
    background: #142b35;
    pointer-events: none;
}

.timelineCanvas.interactive {
    cursor: pointer;
    pointer-events: auto;
    touch-action: none;
}

.judgingTransport {
    position: absolute;
    z-index: 5;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.judgingTransport.hidden { display: none; }

.judgingPlayPause {
    width: 86px;
    height: 49px;
    border: 1px solid #56608b;
    border-radius: 6px;
    background: #243b79;
    color: #fff;
    font: 800 14px/1 "Segoe UI", Arial, sans-serif;
    cursor: pointer;
}

.judgingPlayPause:hover { background: #3152a8; }
.judgingPlayPause:focus-visible { outline: 3px solid rgba(123, 140, 255, 0.45); }

.refereeStopwatch {
    width: 49px;
    height: 49px;
    display: grid;
    place-items: center;
    padding: 9px;
    border: 1px solid #56608b;
    border-radius: 6px;
    background: #243b79;
    color: #fff;
    cursor: pointer;
}

.refereeStopwatch:hover { background: #3152a8; }
.refereeStopwatch.active {
    border-color: #59ef43;
    background: #1f6630;
    color: #dfffd9;
}
.refereeStopwatch.hidden { display: none; }
.refereeStopwatch svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.videoFileName {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 19px;
    padding: 0 2px;
    color: #c7cce0;
    font: 13px/19px "Segoe UI", Arial, sans-serif;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

input:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(123, 140, 255, 0.4);
    outline-offset: 2px;
}

.controlGroup input:focus-visible,
.controlGroup button:focus-visible,
.languageControl button:focus-visible {
    outline: 0;
}

@media (max-width: 680px) {
    body { padding: 8px; }
    .networkIndicator { min-width: 0; }
    #networkLatency { min-width: 68px; }
}

@media (max-width: 1024px) {
    .playerControls {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 5px 6px;
        min-height: 44px;
        margin-bottom: 6px;
    }

    .roleReviewGroup { gap: 6px; }
    .panelControl { margin-left: 0; }
}

@media (max-width: 640px) {
    .playerControls {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 5px 6px;
    }

    .sessionControl {
        width: calc(7ch + 47px);
        margin: 0;
        flex: 0 0 calc(7ch + 47px);
    }

    .volumeControl {
        width: auto;
        min-width: 0;
        margin: 0;
        flex: 1 1 145px;
    }

    .roleReviewGroup {
        width: max-content;
        gap: 5px;
    }

    .communicationPanel { flex: 0 1 auto; gap: 4px; }

    .panelControl {
        width: max-content;
        margin: 0;
        flex: 0 0 auto;
    }

    .viewerUtilities {
        width: max-content;
        margin-left: 0;
    }

    .languageControl { width: 128px; }

    .panelTypeButton { width: 100%; }
    .muteControl { flex: 0 0 auto; }
}
