/* Direct console settings, independent match actions, and mirrored scoring controls. */
body.referee-focus #modal{max-height:calc(100dvh - 24px);max-width:calc(100% - 24px)}
body.referee-focus #modal .btn{background:var(--primary-bg)!important;color:var(--primary-ink)!important;border-color:var(--primary-bg)!important;white-space:normal;overflow-wrap:break-word;word-break:normal;line-height:1.25;min-width:0;max-width:100%;text-align:center;justify-content:center}
body.referee-focus #modal .btn.secondary,body.referee-focus #modal .settings-row{background:var(--control-bg)!important;color:var(--control-ink)!important;border-color:var(--control-edge)!important}
body.referee-focus #modal .btn[aria-pressed=true]{background:#cee5a5!important;color:#12323e!important;border-color:#a5c87a!important}
body.referee-focus #modal .btn>span{color:inherit}
body.referee-focus #modal .btn:disabled{opacity:.55;cursor:default}
body.referee-focus #modal .point-reason{background:#edf2e4!important;color:#12323e!important;white-space:normal;word-break:normal;overflow-wrap:break-word;line-height:1.25;min-height:86px;height:auto;font-size:18px;padding:12px 8px}
body.referee-focus #modal .point-reason:disabled{opacity:.45}
body.referee-focus #modal .history-row>*{color:inherit}
.judge-console-settings h2,.referee-match-menu h2{padding-right:24px;font-size:28px;margin:0 0 20px}
.judge-console-settings .judge-preferences{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:0 0 22px;padding:0}.judge-console-settings .judge-segment{gap:5px}.judge-console-settings .judge-segment button{min-height:42px;min-width:46px;padding:8px 12px}
.console-setting-group{margin:0 0 22px}.console-setting-group h3{font-size:17px;margin:0 0 10px}.console-setting-group .settings-choice>span{padding:10px 5px;min-height:54px}.console-setting-group .settings-choice b{font-size:16px;line-height:1.2;overflow-wrap:normal}.console-setting-group .mode-switch-hint:empty{display:none}.console-setting-group .mode-switch-hint{margin:12px 0 0;font-size:14px;line-height:1.4}
.console-switches{display:grid;gap:0;border-top:1px solid #ffffff26;border-bottom:1px solid #ffffff26;margin-bottom:18px}
body.referee-focus #modal .judge-switch{display:flex!important;align-items:center;justify-content:space-between;gap:16px;position:relative;font-size:17px;line-height:1.3;margin:0!important;padding:13px 0;cursor:pointer}.judge-switch+.judge-switch{border-top:1px solid #ffffff15}.judge-switch>span:first-child{min-width:0}.judge-switch input[type=checkbox]{position:absolute!important;right:0;width:48px!important;height:28px!important;margin:0!important;opacity:0!important;cursor:pointer}.judge-switch .judge-switch-track{display:block;position:relative;width:48px;height:28px;flex:0 0 48px;background:#647d85;border:1px solid #9ab0b4;border-radius:20px;transition:background .18s,border-color .18s}.judge-switch-track i{position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:#f4f6e9;box-shadow:0 1px 3px #0004;transition:transform .18s,background .18s}.judge-switch input:checked+.judge-switch-track{background:#cee5a5;border-color:#cee5a5}.judge-switch input:checked+.judge-switch-track i{transform:translateX(20px);background:#173a45}.judge-switch input:focus-visible+.judge-switch-track{outline:3px solid white;outline-offset:4px}
.console-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border-top:1px solid #ffffff26;margin-top:22px;padding-top:18px}.console-shortcuts a,.console-shortcuts button{display:flex;align-items:center;justify-content:center;text-decoration:none;background:#ffffff0a;border:1px solid #6f8f99;border-radius:7px;color:#f1f5e8!important;min-height:42px;padding:9px 6px;font-size:15px;line-height:1.2;cursor:pointer;white-space:normal;min-width:0}.console-shortcuts a:hover,.console-shortcuts button:hover{background:#ffffff18}.judge-console-settings .referee-menu-footer{display:flex;justify-content:space-between;margin-top:18px;font-size:14px}.judge-console-settings .referee-menu-footer a{color:#e1ebda!important}
.match-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.match-settings-grid .btn{margin:0;min-height:64px;padding:12px 8px;font-size:18px}.match-lifecycle-actions{display:grid;gap:10px;border-top:1px solid #ffffff26;padding-top:20px;margin-top:8px}.match-lifecycle-actions .btn{min-height:54px;font-size:18px;margin:0}.finish-match-editor .match-action-list{display:grid;gap:12px}.finish-match-editor .btns{display:grid;grid-template-columns:1fr 1fr;gap:10px}.finish-match-editor .btns .btn{font-size:17px;min-height:56px;padding:10px}.finish-winner{font-size:24px;font-weight:700;margin:0 0 8px}.finish-score{font-size:26px;font-weight:700;color:#d5e8aa;margin:0 0 18px}
body.referee-focus .referee-point-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
body.referee-focus .referee-point-buttons>button{display:grid;grid-template-columns:minmax(0,1fr) 64px;grid-template-rows:1fr 64px;grid-template-areas:"name name" "add score";gap:12px 10px;min-width:0;min-height:148px;padding:14px 16px 12px;align-items:center;align-content:stretch;text-align:center;border-radius:12px;line-height:1.15}
body.referee-focus .referee-point-buttons>button:nth-of-type(2){grid-template-columns:64px minmax(0,1fr);grid-template-areas:"name name" "score add";text-align:center}
body.referee-focus .referee-point-buttons .referee-point-name{grid-area:name;align-self:center;min-width:0;font-family:"Tour Oswald","Arial Narrow",Arial,sans-serif;font-size:clamp(24px,3vw,30px);font-weight:600;line-height:1.16;white-space:normal;word-break:normal;overflow-wrap:anywhere;width:100%;padding:0;margin:0;min-height:1.16em;color:inherit}
body.referee-focus .referee-point-buttons .referee-point-add{grid-area:add;font-family:Arial,sans-serif;font-size:60px;font-weight:400;line-height:1;text-align:left;padding:0;margin:0;align-self:center;color:#173a45}
body.referee-focus .referee-point-buttons>button:nth-of-type(2) .referee-point-add{text-align:right}
body.referee-focus .referee-point-buttons .referee-button-score{grid-area:score;display:flex;align-items:center;justify-content:center;align-self:stretch;width:64px;min-height:64px;border-radius:8px;background:#213e4a;color:#f5f7ea;font-size:40px;font-family:"Tour Oswald","Arial Narrow",Arial,sans-serif;font-weight:600;line-height:1;padding:6px 2px;margin:0;font-variant-numeric:tabular-nums;text-align:center}
body.referee-focus .referee-point-buttons>button[data-ref-point="1"] .referee-button-score{background:#245658;color:#f5f7ea}
body.referee-focus .referee-point-buttons>button:disabled .referee-point-add{color:inherit}.referee-workspace .referee-tools .btn{white-space:normal;word-break:normal;overflow-wrap:normal;line-height:1.2;padding:12px 5px;font-family:"Tour Oswald","Arial Narrow",Arial,sans-serif;font-size:19px;min-width:0;min-height:50px}.referee-workspace .referee-result-actions .btn{white-space:normal;line-height:1.25;height:auto;min-height:56px;font-size:17px}.match-time.serve-clock .time-actions .btn{white-space:normal;word-break:normal;overflow-wrap:break-word;line-height:1.2;padding:8px;font-size:18px}
body.referee-focus #modal .penalty-options{grid-template-columns:repeat(3,minmax(0,1fr))}body.referee-focus #modal [data-penalty-kind=default]{grid-column:1/-1;min-height:54px}body.referee-focus #modal .penalty-apply{display:flex;flex-wrap:wrap;gap:4px;line-height:1.3;min-height:56px;height:auto}.protocol-tools .btn{min-height:48px;height:auto}
@media(max-width:380px){body.referee-focus #modal{padding:22px 16px}.judge-console-settings h2,.referee-match-menu h2{font-size:25px}.console-setting-group .settings-choice b{font-size:14px}.console-setting-group .settings-choice>span{padding:9px 4px;min-height:50px}.match-settings-grid .btn{font-size:17px;padding:10px 6px}.referee-workspace .referee-tools .btn{font-size:16px}.match-time.serve-clock .time-actions .btn{font-size:16px}body.referee-focus #modal .point-reason{font-size:16px}body.referee-focus .referee-point-buttons{gap:10px}body.referee-focus .referee-point-buttons>button{padding:12px 12px 10px;grid-template-columns:minmax(0,1fr) 54px;grid-template-rows:1fr 58px;gap:10px 6px;min-height:140px}body.referee-focus .referee-point-buttons>button:nth-of-type(2){grid-template-columns:54px minmax(0,1fr)}body.referee-focus .referee-point-buttons .referee-button-score{width:54px;min-height:58px;font-size:36px}body.referee-focus .referee-point-buttons .referee-point-add{font-size:56px}}
@media(prefers-reduced-motion:reduce){.judge-switch-track,.judge-switch-track i{transition:none}}

/* A single clock row, current cue only, followed by the actions for this phase. */
.referee-workspace .match-time.compact-time{padding:10px 12px;margin:10px 0;border-radius:12px}
.match-time.compact-time.serve-clock>div.match-time-body{display:grid;grid-template-columns:auto minmax(0,1fr) 40px;align-items:start;gap:12px;margin:0;min-height:54px;height:auto;padding:0}
.match-time.compact-time .time-digits{min-width:76px;align-self:start;display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.match-time.compact-time .time-digits strong{font-size:40px;line-height:1;font-variant-numeric:tabular-nums}
.match-time.compact-time .time-limit{font-size:12px;line-height:1.1;margin:0;color:var(--muted)}
.match-time.compact-time .time-context{min-width:0;display:flex;flex-direction:column;gap:2px;padding:0;align-items:flex-start;justify-content:flex-start}
.match-time.compact-time .serve-clock-state{font-size:19px;line-height:1.15;font-weight:700;overflow-wrap:anywhere}
.match-time.compact-time .time-current{display:flex;align-items:center;gap:6px;min-width:0;max-width:100%}
.match-time.compact-time .time-current:empty{display:none}
.match-time.compact-time .time-announcement{font-size:16px;line-height:1.2;font-weight:700;color:#842a14}
.judge-dark.referee-focus .match-time.compact-time .time-announcement{color:#ffcfaa}
.match-time.compact-time .time-detail{font-size:15px;line-height:1.2;margin:0;color:var(--muted)}
.match-time.compact-time .time-menu-trigger{width:40px;height:44px;min-height:44px;padding:0;display:flex;align-items:flex-start;justify-content:center;position:static;align-self:start;border:0;background:transparent;color:var(--ink);border-radius:7px}
.match-time.compact-time .time-menu-trigger svg{display:block;width:24px;height:24px}
.match-time.compact-time .time-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:8px;min-height:0;height:auto;margin:8px 0 0;padding:0}
.match-time.compact-time .time-actions:empty{display:none}
.match-time.compact-time.serve-clock .time-actions .btn{font-size:17px;line-height:1.1;min-height:48px;height:auto;margin:0;padding:7px 8px;white-space:normal;overflow-wrap:normal;display:flex;align-items:center;justify-content:center}
.match-time.compact-time .time-progress{height:2px;margin:8px 0 0}
.match-time.compact-time .time-progress-empty{display:none}
@media(max-width:380px){.match-time.compact-time.serve-clock>div.match-time-body{gap:8px;grid-template-columns:auto minmax(0,1fr) 36px}.match-time.compact-time .time-digits{min-width:70px}.match-time.compact-time .time-digits strong{font-size:36px}.match-time.compact-time .serve-clock-state{font-size:17px}.match-time.compact-time .time-announcement{font-size:14px}.match-time.compact-time.serve-clock .time-actions .btn{font-size:15px;padding:7px 5px}.match-time.compact-time .time-menu-trigger{width:36px}.match-time.compact-time .time-current{flex-wrap:wrap}}
.match-time.compact-time .time-context{min-height:0}
.match-time.compact-time.serve-clock>div.time-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:1fr;min-height:0;gap:8px;margin:8px 0 0;padding:0}
.match-time.compact-time.serve-clock>div.time-actions:has(>.btn:only-child){grid-template-columns:minmax(0,1fr)}
.match-time.compact-time.serve-clock>div.time-actions:empty{display:none}
.match-time.compact-time.serve-clock>div.time-actions .btn{min-height:48px;height:auto}
.referee-workspace .match-time.compact-time{width:calc(100% - 24px);max-width:780px;margin:10px auto;padding:8px 12px}
.match-time.compact-time .time-digits strong{font-size:36px;line-height:1;margin:0;padding:0}
.match-time.compact-time.serve-clock>div.time-actions .btn{font-size:16px;line-height:1.1;padding:6px 7px;min-height:48px}
body.referee-focus .referee-point-buttons .referee-point-name{font-size:clamp(20px,5.5vw,30px)}
.judge-console-settings .mode-switch-hint:empty,.judge-console-settings .auth-error:empty{display:none}
.console-setting-group .settings-choice>span{padding-left:3px;padding-right:3px}
@media(max-width:440px){.console-setting-group .settings-choice b{font-size:14px}}
@media(max-width:360px){.console-setting-group .settings-choice b{font-size:13px}}
.console-setting-group:first-child .settings-choices{grid-template-columns:.8fr .8fr 1.4fr}
.console-setting-group:first-child .settings-choice b{font-size:16px}
.match-time.compact-time .time-current{flex-wrap:wrap}

/* The shared dialog close control aligns with the settings title. */
body.referee-focus #modal:has(.judge-console-settings){padding:32px}
body.referee-focus #modal:has(.judge-console-settings) .close{top:32px;right:32px;width:36px;height:36px;min-height:36px;display:grid;place-items:center;padding:0;line-height:1;margin:0}
.judge-console-settings h2{line-height:36px;padding-right:48px}
.match-time.compact-time.serve-clock>div.time-actions .btn{font-family:"Tour Oswald","Arial Narrow",Arial,sans-serif;overflow-wrap:anywhere}
@media(max-width:380px){body.referee-focus #modal:has(.judge-console-settings){padding:22px 16px}body.referee-focus #modal:has(.judge-console-settings) .close{top:22px;right:16px}}
/* Manual breaks share one compact form; medical stages stay in the clock. */
.referee-focus #modal .time-menu-grid>button:last-child:nth-child(odd){grid-column:1/-1}
.interval-start-editor fieldset{margin:0 0 18px;padding:0;border:0;min-width:0}
.interval-start-editor legend{font-size:17px;font-weight:700;margin:0 0 10px;padding:0}
.interval-start-editor .settings-choices{gap:8px}
.interval-start-editor .settings-choice>span{padding:10px 5px;min-height:52px}
.interval-start-editor .settings-choice b{font-size:16px;line-height:1.2;overflow-wrap:anywhere}
.interval-start-editor .interval-limit{font-size:18px;font-weight:700;margin:0 0 10px}
.interval-start-editor .interval-hint{font-size:14px;line-height:1.4;margin:0 0 18px}
.interval-extra{margin:14px 0 18px;border:0;padding:0}
.interval-extra summary{cursor:pointer;font-size:15px}
.interval-extra[open] summary{margin-bottom:12px}
.interval-start-editor button[type=submit]{width:100%;min-height:50px}
.match-time.compact-time.serve-clock>div.time-actions>.btn:last-child:nth-child(odd):not(:first-child){grid-column:1/-1}
/* Align visible capitals, not the fonts' extra space above the glyphs. */
.referee-workspace .match-time.compact-time{position:relative;padding:12px}
.match-time.compact-time .time-digits strong,.match-time.compact-time .serve-clock-state{line-height:1;text-box-trim:trim-start;text-box-edge:cap alphabetic}
.match-time.compact-time .time-menu-trigger{position:absolute;top:8px;right:8px;width:44px;height:44px;min-height:44px;padding:4px;display:flex;align-items:flex-start;justify-content:flex-end}
@supports not (text-box-trim:trim-start){.match-time.compact-time .time-digits strong{margin-top:-.14em}}
@media(max-width:380px){.interval-start-editor .settings-choice b{font-size:14px}}
.referee-focus #modal .penalty-options>.btn:last-child:nth-child(odd){grid-column:1/-1}
.referee-focus #modal .time-menu-grid .btn{font-family:"Tour Oswald","Arial Narrow",Arial,sans-serif;overflow-wrap:anywhere}
/* The last slot is a single, consistently placed undo control. */
body.referee-focus .referee-tools{grid-template-columns:repeat(3,minmax(0,1fr)) 48px}
body.referee-focus .referee-tools .referee-undo{display:flex;align-items:center;justify-content:center;padding:8px}
.penalty-editor textarea.penalty-note{display:block;width:100%;min-height:76px;margin:0 0 16px;resize:vertical}
/* Compact operator statistics; broadcast cards retain their own proportions. */
#judge-stats-dialog{max-width:560px;max-height:calc(100dvh - 20px)}
#judge-stats-dialog .stats-layer{padding:0;background:transparent;backdrop-filter:none}
#judge-stats-dialog .stats-card{padding:14px 16px 4px;border:0}
#judge-stats-dialog .stats-kicker{display:none}
#judge-stats-dialog .stats-card h2{font-size:24px;line-height:1.15;padding-right:36px;margin:0}
#judge-stats-dialog .stats-close{right:8px;top:6px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;padding:0;line-height:1;font-size:30px}
#judge-stats-dialog .stats-players{margin:12px 0 8px;gap:12px}
#judge-stats-dialog .stats-player{font-size:18px;line-height:1.15;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#judge-stats-dialog .stats-row{grid-template-columns:minmax(44px,1fr) minmax(0,2.2fr) minmax(44px,1fr);padding:6px 0;min-height:36px;line-height:1.1}
#judge-stats-dialog .stats-row span{font-size:15px;line-height:1.15}
#judge-stats-dialog .stats-row strong{font-size:23px;line-height:1.1}
#judge-stats-dialog .stats-net-note{display:none}
#judge-stats-dialog .judge-stat-scopes{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:6px;padding:8px 12px;margin:0}
#judge-stats-dialog .judge-stat-scopes button.btn{padding:8px 4px;min-height:40px;font-size:16px;line-height:1.1}
#judge-stats-dialog .judge-stat-air{padding:8px 12px 12px;position:static}
#judge-stats-dialog .judge-stat-air .btn{min-height:42px;padding:8px 12px}
#judge-stats-dialog .judge-stats-partial{padding:0 16px;margin:0 0 4px;font-size:11px;line-height:1.2}
@media(max-height:600px){#judge-stats-dialog .stats-card{padding-top:10px}#judge-stats-dialog .stats-players{margin:8px 0 6px}#judge-stats-dialog .stats-player{font-size:16px}#judge-stats-dialog .stats-row{padding:4px 0;min-height:30px}#judge-stats-dialog .stats-row span{font-size:14px}#judge-stats-dialog .stats-row strong{font-size:21px}#judge-stats-dialog .judge-stat-scopes{padding-top:6px;padding-bottom:6px}}
/* A single softly graduated edge belongs to the dialog, never a nested card. */
body.referee-focus #modal:not(:has(.rtt-protocol)),body.referee-focus #judge-stats-dialog{border:1px solid transparent;background:linear-gradient(145deg,#1b414f,#102d38) padding-box,linear-gradient(130deg,#9ad7c6b0,#dbe8b960 35%,#375d6740 65%,#8fb9b070) border-box;box-shadow:0 20px 70px #00182155;border-radius:14px}
#judge-stats-dialog .stats-card{background:transparent;border:0;box-shadow:none;border-radius:0}
#judge-stats-dialog .stats-card:before{display:none}

/* Player choices stay directly on the form, with two large touch targets. */
.interval-start-editor .interval-players .settings-choices{grid-template-columns:repeat(2,minmax(0,1fr))}
.interval-start-editor .interval-players .settings-choice>span{min-height:56px;padding:12px 8px}
.interval-start-editor .interval-players .settings-choice b{font-size:19px}
.interval-start-editor .interval-players .settings-choice:has(input[value=""]){grid-column:1/-1}
.interval-start-editor .interval-players .settings-choice:has(:checked)>span{background:#d5e8aa;color:#102d35;border-color:#b3d082;box-shadow:inset 0 0 0 2px #315641}
.interval-start-editor .interval-usage{font-size:15px;line-height:1.4;margin:0 0 16px;color:#d5e1dd}
.interval-extra textarea,.retirement-editor textarea.penalty-note,#interval-adjust-form textarea,#score-correction-form>textarea{display:block;width:100%;min-height:76px;margin:12px 0 16px;resize:vertical}

.interval-start-editor #interval-form{display:grid;gap:14px}
.interval-start-editor #interval-form>fieldset,.interval-start-editor #interval-form>.interval-limit,.interval-start-editor #interval-form>.interval-usage,.interval-start-editor #interval-form>.interval-extra,.interval-start-editor #interval-form>button{margin:0}
.interval-start-editor #interval-form>.auth-error:empty{display:none}
.interval-start-editor .interval-purpose .settings-choice b{font-size:15px;letter-spacing:0;overflow-wrap:normal}
@media(max-width:380px){.interval-start-editor .interval-purpose .settings-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.interval-start-editor .interval-purpose .settings-choice:last-child{grid-column:1/-1}.interval-start-editor .interval-purpose .settings-choice:last-child>span{min-height:42px}}

/* One sliding selection, shared by penalties, breaks and retirement. */
body.referee-focus #modal .player-switch{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:4px;margin:0 0 16px;border:1px solid #8da8a8;border-radius:12px;background:#e9efdf;isolation:isolate}
body.referee-focus #modal .player-switch .player-switch-option{position:relative;z-index:1;display:block;min-width:0;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:#173b46!important;min-height:56px}
body.referee-focus #modal .player-switch button.player-switch-option{padding:12px 8px!important;font-size:20px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:0}
body.referee-focus #modal .player-switch .settings-choice>span{display:flex;align-items:center;justify-content:center;min-height:56px;padding:12px 8px;background:transparent!important;border:0!important;box-shadow:none!important;color:#173b46;white-space:nowrap;overflow:hidden}
body.referee-focus #modal .player-switch .settings-choice b{font-size:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:0}
body.referee-focus #modal .player-switch-thumb{position:absolute;z-index:2;pointer-events:none;top:4px;bottom:4px;left:4px;width:calc(50% - 6px);display:flex;align-items:center;justify-content:center;padding:12px 8px;border-radius:8px;background:linear-gradient(120deg,#dcebbb,#b9d899);box-shadow:inset 0 0 0 2px #56764a,0 2px 5px #143d4b20;color:#102d35;font-size:20px;font-weight:800;line-height:1.2;letter-spacing:0;transition:transform .22s cubic-bezier(.2,.8,.2,1),opacity .15s}
.player-switch-thumb>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-switch[data-selected="1"] .player-switch-thumb{transform:translateX(calc(100% + 4px))}
.player-switch[data-selected=""] .player-switch-thumb{opacity:0}
.player-switch:has(:focus-visible){outline:3px solid #8dcfc2;outline-offset:3px}
.interval-start-editor #interval-form .player-switch{margin:0}
.interval-players>.settings-choices:not(.player-switch){margin-bottom:8px}
@media(prefers-reduced-motion:reduce){body.referee-focus #modal .player-switch-thumb{transition:none}}
body.referee-focus #modal .player-switch button.player-switch-option,body.referee-focus #modal .player-switch .settings-choice b,body.referee-focus #modal .player-switch-thumb{font-family:"Tour Oswald","Arial Narrow",Arial,sans-serif;font-size:24px;letter-spacing:0}
.interval-start-editor .interval-purpose .settings-choice b{font-family:"Tour Oswald","Arial Narrow",Arial,sans-serif;font-size:17px}

.interval-start-editor #interval-form>textarea{display:block;width:100%;min-height:64px;margin:0;resize:vertical}
.interval-start-editor legend.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

/* Presets and the editable duration share one compact, aligned row. */
.interval-start-editor .warmup-duration-controls{display:grid;grid-template-columns:minmax(0,1fr) 104px;align-items:stretch;gap:10px}
.interval-start-editor .warmup-duration-controls>.settings-choices{grid-template-columns:repeat(2,minmax(0,1fr))}
body.referee-focus #modal .warmup-minutes{display:flex;align-items:center;gap:6px;min-width:0;min-height:54px;margin:0;padding:0 10px;background:#edf1e3;border:1px solid #9aafb3;border-radius:8px;color:#172f39;line-height:1}
body.referee-focus #modal .warmup-minutes input{width:100%;min-width:0;min-height:0;height:auto;margin:0;padding:0;background:transparent;border:0;box-shadow:none;color:inherit;font-size:20px;font-weight:700;text-align:center;appearance:textfield;-moz-appearance:textfield}
.warmup-minutes input::-webkit-inner-spin-button,.warmup-minutes input::-webkit-outer-spin-button{appearance:none;margin:0}
.warmup-minutes>span{font-size:15px;white-space:nowrap}
.warmup-minutes:focus-within{outline:3px solid #8dcfc2;outline-offset:2px}
@media(max-width:380px){.interval-start-editor .warmup-duration-controls{grid-template-columns:minmax(0,1fr) 86px;gap:8px}}

/* Uniform point cards: one inset, whole-word labels and no separate penalty row. */
body.referee-focus #modal:has(.point-popup){box-sizing:border-box;width:min(680px,calc(100% - 24px));max-width:calc(100% - 24px);padding:18px;max-height:calc(100dvh - 24px)}
body.referee-focus #modal:has(.point-popup) #modal-content,.point-popup{padding:0;margin:0}
body.referee-focus #modal .point-popup h2{font-size:26px;line-height:32px;margin:0 44px 14px 0;overflow-wrap:break-word}
body.referee-focus #modal:has(.point-popup)>.close{top:14px;right:14px;width:40px;height:40px;min-height:40px;padding:0;display:grid;place-items:center;line-height:1}
body.referee-focus #modal .point-reasons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0}
body.referee-focus #modal .point-reasons>.point-reason{box-sizing:border-box;display:flex;align-items:center;justify-content:center;min-height:68px;height:100%;margin:0;padding:10px 4px;font-family:"Tour Oswald","Arial Narrow",Arial,sans-serif;font-size:clamp(18px,4.7vw,22px);font-weight:600;line-height:1.2;white-space:normal;word-break:normal;overflow-wrap:normal;hyphens:none;text-align:center}
.point-popup>.auth-error:empty{display:none;margin:0}
@media(max-width:600px){body.referee-focus #modal:has(.point-popup){width:calc(100% - 16px);max-width:calc(100% - 16px);padding:14px 12px;max-height:calc(100dvh - 16px)}body.referee-focus #modal .point-popup h2{font-size:24px;margin-bottom:12px}body.referee-focus #modal:has(.point-popup)>.close{top:10px;right:8px}}

/* Compact links sit under the corresponding player, outside the sliding thumb. */
.penalty-counts-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 12px}
body.referee-focus #modal .player-switch:has(+.penalty-counts-row){margin-bottom:2px}
body.referee-focus #modal .penalty-count-link{justify-self:start;min-height:40px;margin:0;padding:4px 0;background:transparent;border:0;border-radius:4px;color:#d8e9b8;font:500 16px/1.25 Arial,sans-serif;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
body.referee-focus #modal .penalty-count-link:last-child{justify-self:end}
.penalty-count-link b{font-weight:700}
#penalty-journal-dialog{box-sizing:border-box;width:min(600px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);padding:18px;color:#f1f6e9;border:1px solid transparent;background:linear-gradient(145deg,#1b414f,#102d38) padding-box,linear-gradient(130deg,#9ad7c6b0,#dbe8b960 35%,#375d6740 65%,#8fb9b070) border-box;border-radius:14px;box-shadow:0 20px 70px #00182155;overflow:auto}
.penalty-journal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin:0 0 14px}
#penalty-journal-dialog h2{font:700 24px/1.2 Arial,sans-serif;margin:0;overflow-wrap:break-word}
.penalty-journal-header h2>b{font-size:18px;color:#d8e9b8}
#penalty-journal-dialog [data-penalty-journal-close]{flex:none;display:grid;place-items:center;width:40px;height:40px;min-height:40px;margin:-6px -6px 0 0;padding:0;border:0;background:transparent;color:#f1f6e9;font-size:30px;line-height:1}
.penalty-journal-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:14px}
.penalty-journal-totals>button{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:5px;padding:10px;color:#f1f6e9;text-align:left;cursor:pointer;background:#ffffff0c;border:1px solid #89a7a64d;border-radius:8px;min-width:0}
.penalty-journal-totals strong{font-size:17px;overflow-wrap:anywhere}
.penalty-journal-totals b{font-size:22px;line-height:1;color:#d8e9b8}
.penalty-journal-totals small{grid-column:1/-1;font-size:13px;line-height:1.4;color:#c4d4d8}
.penalty-journal-list{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.penalty-journal-list>li{padding:12px;border:1px solid #89a7a64d;border-radius:8px;min-width:0}
.penalty-journal-event-heading{display:flex;align-items:baseline;gap:8px;min-width:0}
.penalty-journal-number{font-size:13px;color:#c4d4d8}
.penalty-journal-event-heading strong{font-size:18px;overflow-wrap:anywhere;min-width:0}
.penalty-journal-event-heading time{margin-left:auto;white-space:nowrap;font-size:13px;font-variant-numeric:tabular-nums;color:#c4d4d8}
#penalty-journal-dialog .penalty-journal-event-kind{font-size:17px;line-height:1.3;margin:7px 0 3px}
.penalty-journal-list small{font-size:13px;color:#c4d4d8}
#penalty-journal-dialog .penalty-journal-reason{font-size:16px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 0;color:#d8e9b8}
#penalty-journal-dialog .penalty-journal-empty{font-size:17px;text-align:center;margin:22px 0}
.penalty-count-link:focus-visible,#penalty-journal-dialog button:focus-visible{outline:3px solid #8dcfc2;outline-offset:3px}
@media(max-width:380px){#penalty-journal-dialog{padding:14px 12px}.penalty-journal-totals>button{padding:8px}.penalty-journal-event-heading{flex-wrap:wrap}.penalty-journal-totals strong{font-size:16px}}

/* Protocol controls stay outside the paper; only the document scrolls. */
body.referee-focus #modal:has(.protocol-preview){box-sizing:border-box;width:min(1120px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);padding:16px;overflow:hidden;border:1px solid transparent;background:linear-gradient(145deg,#1b414f,#102d38) padding-box,linear-gradient(130deg,#9ad7c6b0,#dbe8b960 35%,#375d6740 65%,#8fb9b070) border-box;border-radius:14px}
body.referee-focus #modal[open]:has(.protocol-preview){display:flex;flex-direction:column}
#modal:has(.protocol-preview) #modal-content{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
#modal:has(.protocol-preview)>.close{top:10px;right:10px;width:40px;height:40px;min-height:40px;padding:0;display:grid;place-items:center;line-height:1}
#modal .protocol-preview{display:flex;flex-direction:column;min-height:0;min-width:0;padding:0;margin:0;background:transparent;color:#f1f6e9;overflow:hidden}
#modal .protocol-tools{flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;margin:0;padding:0 48px 14px 0}
#modal .protocol-view-tabs{justify-self:start;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:4px;border:1px solid #7d9b9b;border-radius:10px;background:#ffffff0b;min-width:0}
body.referee-focus #modal .protocol-mode{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;margin:0;padding:8px 14px;border:0;border-radius:7px;background:transparent;color:#f1f6e9;font-size:17px;font-weight:700;line-height:1.2;white-space:nowrap}
body.referee-focus #modal .protocol-mode[aria-pressed=true]{background:linear-gradient(120deg,#dcebbb,#b9d899)!important;color:#12323e!important;box-shadow:0 1px 5px #00182130}
#modal .protocol-tools svg{display:block;flex:none;width:20px;height:20px}
body.referee-focus #modal .protocol-print{gap:8px;min-height:48px;margin:0;padding:10px 16px;font-size:17px;white-space:nowrap;border-radius:8px}
#modal .protocol-view-content{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;border-radius:8px;background:#fff;color:#132f39}
#modal .protocol-view-content>.match-protocol:not(.rtt-protocol){padding:22px;font-size:14px;line-height:1.5}
#modal .match-protocol:not(.rtt-protocol) header{margin-bottom:16px;gap:14px}
#modal .match-protocol:not(.rtt-protocol) h2{font-size:26px;line-height:1.2}
#modal .match-protocol:not(.rtt-protocol) h3{font-size:17px;margin:22px 0 10px}
#modal .match-protocol:not(.rtt-protocol) p{font-size:14px;line-height:1.5;margin:10px 0}
#modal .match-protocol:not(.rtt-protocol) table{font-size:13px;margin:0}
#modal .protocol-table-scroll{overflow-x:auto;overscroll-behavior-x:contain;margin:14px 0}
#modal .match-protocol:not(.rtt-protocol) td,#modal .match-protocol:not(.rtt-protocol) th{padding:8px}
#modal .match-protocol .protocol-log{min-width:520px}
#modal .match-protocol .protocol-log td:first-child{width:32px}
#modal .match-protocol .protocol-log td:nth-child(2){white-space:nowrap;width:54px}
#modal .match-protocol .protocol-log td:nth-child(3){width:36px}
#modal .match-protocol .protocol-log td:last-child{min-width:90px}
#modal .protocol-view-content>.rtt-protocol{padding:12px;background:#d6dfdf}
#modal .rtt-sheet{margin-bottom:12px;box-shadow:0 1px 8px #102d3620}
#modal .rtt-sheet:last-child{margin-bottom:0}
#modal .protocol-tools button:focus-visible{outline:3px solid #8dcfc2;outline-offset:3px}
#modal .protocol-tools button:disabled{opacity:.6}
@media(max-width:680px){body.referee-focus #modal:has(.protocol-preview){width:calc(100% - 16px);max-width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:12px}#modal .protocol-tools{grid-template-columns:minmax(0,1fr);gap:10px;padding:0 0 12px}#modal .protocol-view-tabs{width:calc(100% - 42px);justify-self:stretch}body.referee-focus #modal .protocol-mode{font-size:16px;padding:8px 6px;gap:6px}#modal .protocol-tools svg{width:18px;height:18px}body.referee-focus #modal .protocol-print{width:100%;font-size:16px;min-height:44px}#modal .protocol-view-content>.match-protocol:not(.rtt-protocol){padding:14px}#modal .match-protocol:not(.rtt-protocol) h2{font-size:22px}#modal .protocol-view-content>.rtt-protocol{padding:6px}}
@media print{
 
 body:has(.protocol-preview) #modal,body:has(.protocol-preview) #modal-content,body:has(.protocol-preview) .protocol-preview,body:has(.protocol-preview) .protocol-view-content,body:has(.protocol-preview) .protocol-table-scroll{display:block!important;height:auto!important;max-height:none!important;overflow:visible!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:white!important;box-shadow:none!important}
 body:has(.protocol-preview) .protocol-tools{display:none!important}
 body:has(.protocol-preview) #modal:has(.rtt-protocol),body:has(.protocol-preview) .protocol-preview:has(.rtt-protocol),body:has(.protocol-preview) .protocol-view-content:has(.rtt-protocol){width:297mm!important;max-width:none!important}
 body:has(.protocol-preview) #modal .match-protocol.rtt-protocol{padding:0!important}
 body:has(.protocol-preview) #modal .match-protocol:not(.rtt-protocol){padding:0!important;width:auto!important;color:#132f39!important}
 body:has(.protocol-preview) #modal:not(:has(.rtt-protocol)),body:has(.protocol-preview) .protocol-preview:not(:has(.rtt-protocol)),body:has(.protocol-preview) .protocol-view-content:not(:has(.rtt-protocol)){width:auto!important;max-width:none!important}
 body:has(.protocol-preview) #modal .protocol-log{min-width:0!important}
 body:has(.protocol-preview) #modal .rtt-sheet{margin:0!important;box-shadow:none!important}
}

#penalty-journal-dialog .penalty-journal-totals>button[aria-pressed=true]{border-color:#d8e9b8;background:#d8e9b819;box-shadow:inset 0 0 0 1px #d8e9b8}
#penalty-journal-dialog .penalty-journal-all{display:block;margin:0 0 12px;padding:6px 10px;border:1px solid #89a7a6;border-radius:6px;background:transparent;color:#f1f6e9;font-size:15px;cursor:pointer}
#penalty-journal-dialog .penalty-journal-all[aria-pressed=true]{background:#d8e9b8;color:#12323e;border-color:#d8e9b8}

#modal .protocol-log th:nth-child(2),#modal .protocol-log th:nth-child(3){white-space:nowrap}
#modal .protocol-log th:nth-child(2){width:64px}
@media print{
 body:has(.protocol-preview) #modal .match-protocol:not(.rtt-protocol){font-size:11px;line-height:1.3}
 body:has(.protocol-preview) #modal .match-protocol:not(.rtt-protocol) p{font-size:11px;line-height:1.3;margin:7px 0}
 body:has(.protocol-preview) #modal .match-protocol:not(.rtt-protocol) table{font-size:10px;line-height:1.3}
 body:has(.protocol-preview) #modal .match-protocol:not(.rtt-protocol) td,body:has(.protocol-preview) #modal .match-protocol:not(.rtt-protocol) th{padding:4px 5px}
 body:has(.protocol-preview) #modal .protocol-log th:nth-child(2){width:48px}
 body:has(.protocol-preview) #modal .protocol-log th:nth-child(3){width:30px}
 body:has(.protocol-preview) #modal .match-protocol h3{margin:14px 0 8px}
}
body.referee-focus #modal #match-penalty-form{gap:12px}
body.referee-focus #modal #match-penalty-form>.player-switch,body.referee-focus #modal #match-penalty-form>.penalty-note{margin:0}
body.referee-focus #modal #match-penalty-form>.penalty-counts-row{margin:-8px 0 -4px}
@media print{body:has(.protocol-preview) #modal:not(:has(.rtt-protocol)){width:100%!important}}
/* Score correction mirrors the two-row scoreboard, with explicit touch spinners. */
body.referee-focus #modal:has(.score-correction){width:min(760px,calc(100% - 24px));max-width:calc(100% - 24px);padding:20px;max-height:calc(100dvh - 24px)}
#modal .score-correction h2{font-size:25px;line-height:1.25;margin:0 40px 18px 0}
#modal #score-correction-form{display:grid;gap:12px;margin:0}
.correction-board-scroll{overflow-x:auto;border:1px solid #8eb5b0;border-radius:10px;background:linear-gradient(120deg,#25515b,#153a45)}
.correction-board{min-width:0}
.correction-board-heading,.correction-board-row{display:grid;grid-template-columns:minmax(84px,1fr) repeat(var(--correction-columns),minmax(46px,70px));min-width:calc(84px + var(--correction-columns)*46px)}
.correction-board-heading{align-items:center;min-height:36px;background:#ffffff09}
.correction-column-heading{position:relative;font-size:12px;line-height:1.1;text-align:center;color:#e7f1e9;white-space:nowrap}
.correction-column-heading:has(button){padding-right:14px}
#modal .correction-column-heading button{position:absolute;top:50%;right:0;transform:translateY(-50%);display:grid;place-items:center;min-width:22px;min-height:32px;padding:0;background:transparent;color:#e7f1e9;font-size:19px;line-height:1}
.correction-board-row+.correction-board-row{border-top:1px solid #96bdb340}
.correction-player{display:flex;align-items:center;gap:5px;min-width:0;padding:10px;color:#f3f7ec;font-family:"Tour Oswald","Arial Narrow",Arial,sans-serif;font-size:22px;font-weight:600;line-height:1.2}
.correction-player>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.correction-player>i{font:normal 14px/1 Arial;color:#d8e9b8}
.correction-cell{display:grid;grid-template-rows:28px 34px 28px;min-width:0;background:#ffffff0a;border-left:1px solid #ffffff0e}
.correction-cell-games{background:linear-gradient(120deg,#d8e9b8,#b3d598);color:#12323e}
.correction-cell-points{background:#102f3b;color:#e4efcb}
body.referee-focus #modal .correction-cell button{display:grid;place-items:center;min-height:28px;min-width:0;width:100%;margin:0;padding:0;background:transparent;border:0;border-radius:0;color:#e7f1e9}
body.referee-focus #modal .correction-cell-games button{color:#12323e}
.correction-cell button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}
body.referee-focus #modal .correction-cell input{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:0;height:34px;margin:0;padding:0 2px;border:0;border-radius:0;background:transparent;color:#f1f6e9;font:600 28px/1 "Tour Oswald","Arial Narrow",Arial,sans-serif;text-align:center;appearance:textfield;-moz-appearance:textfield;box-shadow:none}
body.referee-focus #modal .correction-cell-games input{color:#12323e}
body.referee-focus #modal .correction-cell-points input{color:#e4efcb}
.correction-cell input::-webkit-inner-spin-button,.correction-cell input::-webkit-outer-spin-button{appearance:none;margin:0}
.correction-cell input:focus-visible,.correction-cell button:focus-visible{outline:2px solid #8dcfc2;outline-offset:-2px}
.correction-set-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
body.referee-focus #modal .correction-set-actions>.btn{min-height:38px;padding:8px 12px;font-size:15px;margin:0;white-space:nowrap}
.correction-current-label{font-size:14px;line-height:1.2;color:#d6e2dc;text-align:right}
.correction-service>span{display:block;font-size:15px;margin:0 0 8px;color:#d6e2dc}
body.referee-focus #modal .correction-service .player-switch{margin:0}
body.referee-focus #modal #score-correction-form>textarea{min-height:64px;margin:0}
#score-correction-form .correction-preview{margin:0;font-size:14px;color:#f8d5a3;line-height:1.35}
#score-correction-form .correction-preview:empty{display:none}
#score-correction-form .auth-error{margin:0}
@media(max-width:600px){body.referee-focus #modal:has(.score-correction){width:calc(100% - 16px);max-width:calc(100% - 16px);padding:14px 12px;max-height:calc(100dvh - 16px)}#modal .score-correction h2{font-size:23px;margin-bottom:14px}.correction-player{font-size:19px;padding:8px 5px}.correction-column-heading{font-size:11px}.correction-column-heading:has(button)>span{display:none}.correction-board-heading{min-height:32px}}
body.referee-focus #modal #score-correction-form .correction-cell input{background:transparent;color:inherit;border:0;border-radius:0}
.correction-cell{color:#f1f6e9}
.correction-cell-games{color:#12323e}
.correction-cell-points{color:#e4efcb}

/* Compact service-order advice; corrections remain available to the umpire. */
.correction-service-warnings:empty{display:none}
.correction-service-warnings{display:grid;gap:8px}
body.referee-focus #modal .correction-service-warning{padding:12px;border:1px solid #d4bb80;border-radius:10px;background:#f3e6c6;color:#14313c;font:500 15px/1.4 Manrope,Arial,sans-serif}
body.referee-focus #modal .correction-service-warning p{margin:0 0 10px;font:inherit;color:inherit}
.correction-warning-actions{display:flex;flex-wrap:wrap;gap:8px}
body.referee-focus #modal .correction-warning-actions .btn{flex:1 1 130px;min-width:0;min-height:44px;padding:8px 10px;margin:0;border:1px solid #899b84;border-radius:7px;background:#d5e5b5;color:#102d36;font:800 14px/1.3 Manrope,Arial,sans-serif;white-space:normal;overflow-wrap:normal}
body.referee-focus #modal .correction-warning-actions .btn.secondary{background:#fffdf5;color:#102d36}

#judge-stats-dialog .stats-card h2{text-align:center;padding-inline:36px}
#judge-stats-dialog .stats-net-caption{display:block;font:500 11px/1.2 Manrope,Arial,sans-serif;color:#d4dedc;margin-top:3px}
#judge-stats-dialog .stats-net-caption i{display:block;font:inherit}
@media(max-width:450px){.match-time.compact-time .time-digits strong[data-time-hours=true]{font-size:clamp(26px,7vw,32px)}}
@media(max-width:450px){.match-time.compact-time.serve-clock:has([data-time-hours=true])>div.match-time-body{grid-template-columns:auto minmax(0,1fr);gap:8px;padding-right:32px}.match-time.compact-time:has([data-time-hours=true]) .serve-clock-state{font-size:clamp(14px,4vw,19px)}}
@media(max-width:360px){.match-time.compact-time .time-digits strong[data-time-hours=true]{font-size:22px}}
.referee-workspace .match-preparation{width:calc(100% - 24px);max-width:780px;margin:10px auto;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.match-preparation-heading{display:grid;gap:6px;margin-bottom:12px;font-size:14px;line-height:1.35}.match-preparation-heading>strong{font-size:17px}.match-preparation-heading>span{font-size:13px;color:var(--muted)}.match-preparation-actions{display:grid;grid-template-columns:1.6fr 1fr;gap:8px}.referee-workspace .match-preparation .btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:10px 8px;font-size:16px;line-height:1.2;white-space:normal}.match-preparation .btn svg{width:22px;height:22px;flex:none}.judge-dark .match-preparation{background:#203f49;border-color:#536e75}.judge-dark .match-preparation-heading>span{color:#bfd0d2}@media(max-width:360px){.referee-workspace .match-preparation .btn{font-size:14px;gap:5px}.match-preparation .btn svg{width:18px;height:18px}}
