/* v25.0.0-dev.15.5.2.2 — Judge stability patch.
   Geometry/safety rules for the single supported Classic Judge theme. */

/* 1) Score geometry hotfix.
   1- and 2-digit values intentionally use exactly the same font size.
   Only 3+ digits shrink. The three score symbols are packed around the colon
   instead of stretching across the whole center column. */
.score{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  display:grid!important;
  grid-template-columns:max-content .22em max-content!important;
  align-items:baseline!important;
  justify-content:center!important;
  column-gap:.025em!important;
  letter-spacing:-.045em!important;
  white-space:nowrap!important;
  line-height:.86!important;
}
.score-side{
  min-width:0!important;
  width:auto!important;
  font-variant-numeric:tabular-nums lining-nums;
  font-feature-settings:"tnum" 1,"lnum" 1;
}
.score-side:first-child{text-align:right!important}
.score-side:nth-child(3){text-align:left!important}
.score-separator{
  width:.22em!important;
  min-width:.22em!important;
  text-align:center!important;
  line-height:1!important;
  letter-spacing:0!important;
  transform:none!important;
}
/* 1- and 2-digit score: no score-wide class and therefore no font-size jump. */
.score.score-wide{font-size:inherit!important}
/* Only 100+ needs a smaller type size. */
.score.score-very-wide{font-size:clamp(48px,6.1vw,66px)!important;letter-spacing:-.055em!important}
.score small{grid-column:1/-1!important;text-align:center;letter-spacing:0!important}

/* Keep enough central width for large type, while the score itself stays compact. */
.scoreboard{grid-template-columns:minmax(0,1fr) minmax(170px,210px) minmax(0,1fr)!important}
html[data-ui-theme="j1"] .scoreboard{grid-template-columns:minmax(0,1fr) minmax(180px,220px) minmax(0,1fr)!important}
html[data-ui-theme="j2"] .scoreboard{grid-template-columns:minmax(0,1fr) minmax(220px,260px) minmax(0,1fr)!important}
html[data-ui-theme="j2"] .score{min-width:0!important}
html[data-ui-theme="j2"] .score.score-very-wide{font-size:clamp(62px,7.2vw,78px)!important}

/* 2) Custom confirmation sheet — replaces browser confirm() in every Judge mode. */
.confirm-dialog{
  position:fixed;
  inset:0;
  z-index:2147483200;
  display:grid;
  place-items:center;
  padding:18px;
}
.confirm-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.48);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}
.confirm-card{
  position:relative;
  width:min(100%,520px);
  max-height:calc(100dvh - 36px);
  overflow:auto;
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  gap:14px 16px;
  padding:20px;
  border:1px solid #e5e7eb;
  border-radius:20px;
  background:#fff;
  color:#182230;
  box-shadow:0 28px 90px rgba(15,23,42,.28);
}
.confirm-icon{
  grid-row:1/3;
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:#fff4d6;
  color:#9a6700;
  font-size:26px;
  font-weight:950;
  line-height:1;
}
.confirm-card.danger .confirm-icon{background:#fee4e2;color:#b42318}
.confirm-copy{min-width:0}
.confirm-eyebrow{
  margin-bottom:5px;
  color:#98a2b3;
  font-size:9px;
  line-height:1.2;
  font-weight:950;
  letter-spacing:.10em;
}
.confirm-card h3{margin:0;color:inherit;font-size:21px;line-height:1.15}
.confirm-card p{margin:8px 0 0;color:#667085;font-size:12px;line-height:1.5}
.confirm-details{
  grid-column:2;
  display:grid;
  gap:6px;
  margin-top:1px;
}
.confirm-detail-row{
  display:grid;
  grid-template-columns:minmax(90px,.75fr) minmax(0,1.25fr);
  gap:10px;
  align-items:start;
  padding:8px 10px;
  border:1px solid #eaecf0;
  border-radius:10px;
  background:#f9fafb;
}
.confirm-detail-row span{color:#667085;font-size:10px;font-weight:800}
.confirm-detail-row strong{
  min-width:0;
  color:#101828;
  font-size:11px;
  line-height:1.35;
  text-align:right;
  overflow-wrap:anywhere;
  font-variant-numeric:tabular-nums lining-nums;
}
.confirm-actions{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:1fr 1.35fr;
  gap:9px;
  margin-top:4px;
}
.confirm-actions button{min-height:48px;border-radius:12px;font-weight:900;cursor:pointer}
.confirm-accept{border:0;background:#f59e0b;color:#111827}
.confirm-card.danger .confirm-accept{background:#d92d20;color:#fff}

/* Classic compatibility / geometry guard */
html[data-ui-theme="j1"] .confirm-card{border-radius:16px}
html[data-ui-theme="j2"] .confirm-card{width:min(100%,620px);border-radius:22px;padding:24px}
html[data-ui-theme="j2"] .confirm-actions button{min-height:56px;font-size:14px}
html[data-ui-theme="j3"] .confirm-backdrop{background:rgba(0,0,0,.66)}
html[data-ui-theme="j3"] .confirm-card{
  background:#111820;
  border-color:#2b3743;
  color:#f4f7fa;
  box-shadow:0 30px 100px rgba(0,0,0,.56);
}
html[data-ui-theme="j3"] .confirm-card p,
html[data-ui-theme="j3"] .confirm-eyebrow,
html[data-ui-theme="j3"] .confirm-detail-row span{color:#8492a0}
html[data-ui-theme="j3"] .confirm-detail-row{background:#0d141c;border-color:#29333f}
html[data-ui-theme="j3"] .confirm-detail-row strong{color:#edf2f7}
html[data-ui-theme="j3"] .confirm-card .ghost{background:#111820;border-color:#303b47;color:#d7e0e9}
html[data-ui-theme="j3"] .confirm-icon{background:#3b2a0c;color:#fbbf24}
html[data-ui-theme="j3"] .confirm-card.danger .confirm-icon{background:#3a1819;color:#fb7185}

/* Busy writes should not visually corrupt freshly rendered disabled states. */
html.judge-write-busy{cursor:progress}

/* Mobile/tablet score limits. Single and double digits stay the same size. */
@media(max-width:860px){
  .scoreboard,
  html[data-ui-theme="j1"] .scoreboard,
  html[data-ui-theme="j2"] .scoreboard{
    grid-template-columns:minmax(0,1fr) minmax(150px,180px) minmax(0,1fr)!important;
  }
  .score.score-very-wide,
  html[data-ui-theme="j2"] .score.score-very-wide{font-size:46px!important}
}
@media(max-width:620px){
  .scoreboard,
  html[data-ui-theme="j1"] .scoreboard,
  html[data-ui-theme="j2"] .scoreboard{
    grid-template-columns:minmax(0,1fr) 118px minmax(0,1fr)!important;
  }
  .score{font-size:54px!important}
  .score.score-very-wide,
  html[data-ui-theme="j2"] .score.score-very-wide{font-size:34px!important}
  .confirm-dialog{align-items:end;padding:7px}
  .confirm-card{
    width:100%!important;
    max-height:calc(100dvh - 14px);
    grid-template-columns:42px minmax(0,1fr);
    gap:11px;
    padding:16px;
    border-radius:20px 20px 14px 14px!important;
  }
  .confirm-icon{width:40px;height:40px;border-radius:12px;font-size:22px}
  .confirm-details{grid-column:1/-1}
  .confirm-detail-row{grid-template-columns:1fr}
  .confirm-detail-row strong{text-align:left}
  .confirm-actions{grid-template-columns:1fr}
  .confirm-actions #confirmAccept{order:1}
  .confirm-actions #confirmCancel{order:2}
}
@media(prefers-reduced-motion:reduce){
  .confirm-backdrop{backdrop-filter:none;-webkit-backdrop-filter:none}
}

/* v25.0.0-dev.15.5.2.3 — Judge clarity/readiness hotfix. */

/* Active state: one obvious title instead of technical LIVE eyebrow + revision. */
.active-match-section-head{
  justify-content:flex-start!important;
  margin-bottom:14px!important;
}
.active-match-title{
  display:inline-flex;
  align-items:center;
  min-height:46px;
  margin:0!important;
  padding:8px 14px;
  border:2px solid var(--primary,#eb2424);
  border-radius:13px;
  background:rgba(235,36,36,.045);
  color:#15171a;
  font-size:clamp(22px,2.8vw,30px)!important;
  line-height:1.05;
  font-weight:950;
  letter-spacing:-.025em;
  box-shadow:0 0 0 4px rgba(235,36,36,.04);
}
html[data-ui-theme="j3"] .active-match-title{
  color:#f4f7fa;
  background:rgba(239,68,68,.07);
  border-color:#ef4444;
  box-shadow:0 0 0 4px rgba(239,68,68,.035);
}

/* Volleyball: the set-finish action must look like a primary operational action. */
.volleyball-set-actions .half-end:not(:disabled){
  border-color:#2563eb!important;
  background:linear-gradient(180deg,#3478f6,#2563eb)!important;
  color:#fff!important;
  box-shadow:0 7px 18px rgba(37,99,235,.18)!important;
}
.volleyball-set-actions .half-end:not(:disabled):hover{filter:brightness(.98)}
html[data-ui-theme="j3"] .volleyball-set-actions .half-end:not(:disabled){
  border-color:#3b82f6!important;
  background:linear-gradient(180deg,#3b82f6,#2563eb)!important;
  color:#fff!important;
}

/* Completed volleyball sets are read-only, but they should still be immediately legible. */
.completed-sets{
  gap:10px!important;
  padding:11px 13px!important;
  font-size:14px!important;
  line-height:1.35!important;
}
.completed-sets strong{
  font-size:13px!important;
  font-weight:900!important;
}
.completed-sets span{
  font-size:16px!important;
  font-weight:850!important;
  color:#344054;
  font-variant-numeric:tabular-nums lining-nums;
}
html[data-ui-theme="j3"] .completed-sets span{color:#e5edf5}

/* Readiness checklist: advisory only, never connected to disabled/action logic. */
.readiness-section{overflow:hidden}
.readiness-head{align-items:center!important}
.readiness-note{
  flex:0 0 auto;
  padding:5px 8px;
  border:1px solid #f2d89b;
  border-radius:999px;
  background:#fff8e8;
  color:#8a5a00;
  font-size:9px;
  font-weight:900;
  white-space:nowrap;
}
.readiness-summary{
  display:grid;
  gap:3px;
  padding:11px 12px;
  margin-bottom:9px;
  border:1px solid #dcefe3;
  border-radius:12px;
  background:#f4fbf6;
}
.readiness-summary.warn{border-color:#f0d79f;background:#fff8e8}
.readiness-summary strong{font-size:12px;line-height:1.25}
.readiness-summary span{color:#667085;font-size:10px;line-height:1.4}
.readiness-list{display:grid;gap:6px}
.readiness-item{
  display:grid;
  grid-template-columns:28px minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  min-width:0;
  padding:9px 10px;
  border:1px solid #e7ebef;
  border-radius:11px;
  background:#fcfcfd;
}
.readiness-item.warn{border-color:#f0d79f;background:#fffaf0}
.readiness-icon{
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#eaf7ee;
  color:#168a4b;
  font-size:13px;
  font-weight:950;
}
.readiness-item.warn .readiness-icon{background:#fff0c8;color:#946200}
.readiness-item>div{min-width:0;display:grid;gap:2px}
.readiness-item strong{font-size:11px;line-height:1.25;overflow-wrap:anywhere}
.readiness-item small{color:#667085;font-size:9px;line-height:1.35;overflow-wrap:anywhere}
.readiness-status{
  color:#168a4b;
  font-size:9px;
  font-weight:900;
  white-space:nowrap;
}
.readiness-item.warn .readiness-status{color:#946200}
html[data-ui-theme="j3"] .readiness-note{background:#2d2511;border-color:#51421b;color:#f7c65b}
html[data-ui-theme="j3"] .readiness-summary{background:#102019;border-color:#244a33;color:#edf7f0}
html[data-ui-theme="j3"] .readiness-summary.warn{background:#241f12;border-color:#51421b}
html[data-ui-theme="j3"] .readiness-summary span,
html[data-ui-theme="j3"] .readiness-item small{color:#8f9dab}
html[data-ui-theme="j3"] .readiness-item{background:#0d141c;border-color:#27323d;color:#dfe7ef}
html[data-ui-theme="j3"] .readiness-item.warn{background:#201c11;border-color:#4d401d}
html[data-ui-theme="j3"] .readiness-icon{background:#153322;color:#69e99a}
html[data-ui-theme="j3"] .readiness-item.warn .readiness-icon{background:#392f14;color:#f8cb64}

@media(max-width:620px){
  .active-match-title{min-height:42px;padding:7px 11px;font-size:21px!important;border-radius:11px}
  .readiness-head{align-items:flex-start!important}
  .readiness-note{margin-top:1px}
  .readiness-item{grid-template-columns:26px minmax(0,1fr);gap:8px}
  .readiness-status{grid-column:2;justify-self:start}
  .completed-sets{font-size:13px!important}
  .completed-sets span{font-size:15px!important}
}

/* v25.0.0-dev.15.5.2.4 — compact system panels + stage metadata hotfix. */
.judge-system-grid{
  display:grid;
  grid-template-columns:minmax(260px,.82fr) minmax(340px,1.18fr);
  gap:12px;
  align-items:start;
  margin-bottom:14px;
}
.judge-system-grid>.section{margin-bottom:0;min-width:0}
.last-action-section,.readiness-section{padding:13px 14px!important}
.system-fold{min-width:0}
.system-fold>summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:34px;
  cursor:pointer;
  font-weight:900;
  color:#253041;
  user-select:none;
}
.system-fold>summary::-webkit-details-marker{display:none}
.system-fold>summary::before{
  content:'›';
  flex:0 0 auto;
  font-size:22px;
  line-height:1;
  color:#8290a3;
  transform:rotate(0deg);
  transition:transform .16s ease;
}
.system-fold[open]>summary::before{transform:rotate(90deg)}
.system-fold-title{font-size:14px;line-height:1.2;margin-right:auto}
.system-fold-count{
  flex:0 0 auto;
  min-width:26px;
  min-height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 8px;
  border:1px solid #dce3eb;
  background:#f4f6f8;
  color:#667085;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  white-space:nowrap;
}
.readiness-count.warn,.readiness-fold.has-warnings .readiness-count{
  background:#fff3d6;
  border-color:#ebcf91;
  color:#8a5a00;
}
.last-action-preview{
  margin-top:9px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:45px;
  padding:8px 9px 8px 11px;
  border:1px solid #e2e7ed;
  background:#f8f9fb;
  border-radius:11px;
}
.last-action-copy{min-width:0;display:grid;gap:2px}
.last-action-copy strong{font-size:11px;line-height:1.3;overflow-wrap:anywhere}
.last-action-copy small{font-size:9px;color:#7b8797;font-variant-numeric:tabular-nums}
.last-action-empty{font-size:11px;color:#7b8797;font-weight:750}
.last-action-preview .undo-btn{padding:7px 9px;font-size:10px;border-radius:9px;flex:0 0 auto}
.recent-actions-list{display:grid;gap:5px;margin:8px 0 1px}
.recent-action-row{
  display:grid;
  grid-template-columns:22px minmax(0,1fr) auto;
  gap:7px;
  align-items:center;
  border-top:1px solid #edf0f3;
  padding:7px 1px 2px;
}
.recent-action-index{
  width:20px;height:20px;border-radius:50%;display:grid;place-items:center;
  background:#eef2f6;color:#748094;font-size:9px;font-weight:900;
}
.recent-action-row>div{min-width:0;display:grid;gap:1px}
.recent-action-row strong{font-size:10px;line-height:1.3;overflow-wrap:anywhere}
.recent-action-row small{font-size:9px;color:#8490a0;font-variant-numeric:tabular-nums}
.recent-action-latest{font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;color:#2563eb;background:#edf4ff;border-radius:999px;padding:4px 6px}
.readiness-fold #matchReadiness{margin-top:9px}
.readiness-fold .readiness-summary{margin-bottom:7px}
.readiness-fold .readiness-list{gap:5px}
.readiness-fold .readiness-item{padding:7px 8px;min-height:40px}

/* Stage metadata in the live-card is now a clear hierarchy: venue · stage · match. */
.live-head>span:first-child{font-weight:850;letter-spacing:.005em}

html[data-ui-theme="j3"] .system-fold>summary{color:#e8eef5}
html[data-ui-theme="j3"] .system-fold-count{background:#111923;border-color:#2b3744;color:#9ba8b8}
html[data-ui-theme="j3"] .readiness-count.warn,
html[data-ui-theme="j3"] .readiness-fold.has-warnings .readiness-count{background:#302713;border-color:#5b481d;color:#f6cb6d}
html[data-ui-theme="j3"] .last-action-preview{background:#0d141c;border-color:#27323d}
html[data-ui-theme="j3"] .last-action-copy strong{color:#e8eef5}
html[data-ui-theme="j3"] .recent-action-row{border-top-color:#27323d}
html[data-ui-theme="j3"] .recent-action-index{background:#17212b;color:#9ba8b8}
html[data-ui-theme="j3"] .recent-action-row strong{color:#dce5ee}
html[data-ui-theme="j3"] .recent-action-latest{background:#132b4f;color:#88b9ff}

@media(max-width:760px){
  .judge-system-grid{grid-template-columns:1fr;gap:10px}
  .last-action-section,.readiness-section{padding:12px!important}
  .system-fold-title{font-size:13px}
}
@media(max-width:430px){
  .system-fold>summary{gap:7px}
  .system-fold-count{font-size:9px;padding:4px 7px}
  .last-action-preview{align-items:flex-start}
  .recent-action-row{grid-template-columns:20px minmax(0,1fr)}
  .recent-action-latest{grid-column:2;justify-self:start}
}

/* v25.0.0-dev.15.5.2.5 — Кроссфит judge workspace hotfix. */
.cf-live-metrics{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(250px,.85fr);
  gap:12px;
  align-items:stretch;
}
.cf-stage-workspace{
  min-width:0;
  padding:18px!important;
  border:1px solid #dfe5ec!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.cf-stage-workspace .cf-stage-kicker,
.cf-total-kicker{
  font-size:10px;
  line-height:1.2;
  font-weight:950;
  letter-spacing:.12em;
  color:#8390a1;
}
.cf-stage-workspace .cf-stage-number{
  margin-top:1px;
  font-size:clamp(38px,5vw,52px)!important;
  line-height:1;
  letter-spacing:-.035em;
  font-weight:950;
}
.cf-stage-workspace label{margin-top:7px}
.cf-stage-workspace .cf-score-input{
  width:100%;
  min-width:0;
  min-height:68px!important;
  padding:8px 12px!important;
  font-size:clamp(34px,5vw,46px)!important;
  line-height:1!important;
  font-weight:950!important;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.025em;
  border-radius:14px!important;
}
.cf-save-next{
  width:100%;
  min-height:52px;
  border:0;
  border-radius:14px;
  padding:12px 16px;
  background:#2563eb;
  color:#fff;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 7px 18px rgba(37,99,235,.16);
}
.cf-save-next:active{transform:translateY(1px)}
.cf-total-card{
  min-width:0;
  min-height:100%;
  border:1px solid #dfe5ec;
  border-radius:18px;
  background:#f8fafc;
  padding:18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.cf-total-score{
  display:block;
  max-width:100%;
  margin:10px 0 4px;
  font-size:clamp(62px,9vw,86px);
  line-height:.88;
  letter-spacing:-.055em;
  font-weight:950;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.cf-total-score.compact{font-size:clamp(50px,7.5vw,72px)}
.cf-total-note{font-size:11px;color:#667085;font-weight:750;line-height:1.35}
.cf-total-actions{
  width:100%;
  display:grid;
  gap:7px;
  margin-top:16px;
}
.cf-total-actions .ghost{
  width:100%;
  min-height:42px;
  padding:9px 11px;
  font-size:11px;
  font-weight:900;
}
.cf-finish-run{
  max-width:none!important;
  min-height:54px!important;
  background:#e5252a!important;
  box-shadow:0 7px 20px rgba(229,37,42,.14);
}

/* Stages occupy the whole content width and the current border is never clipped. */
.cf-stage-grid-wrap{
  width:100%;
  overflow-x:auto;
  overflow-y:visible;
  padding:4px 4px 8px;
  margin:-4px -4px 0;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
}
.cf-stage-grid{
  width:100%;
  display:grid!important;
  grid-template-columns:repeat(7,minmax(105px,1fr))!important;
  gap:9px!important;
  overflow:visible!important;
  padding:3px!important;
}
.cf-stage-mini{
  min-width:0!important;
  min-height:94px;
  padding:12px 10px!important;
  border:1px solid #dfe5ec!important;
  border-radius:14px!important;
  box-shadow:none;
  opacity:1!important;
}
.cf-stage-mini.current{
  border:2px solid #2563eb!important;
  outline:0!important;
  background:#eff6ff!important;
  box-shadow:0 0 0 3px rgba(37,99,235,.10)!important;
}
.cf-stage-mini.done{background:#f6f8fa!important;border-color:#d8e0e8!important}
.cf-stage-mini.future{background:#fff!important;opacity:.72!important}
.cf-stage-mini span{font-size:11px!important;font-weight:850}
.cf-stage-mini strong{font-size:24px!important;line-height:1;font-variant-numeric:tabular-nums}
.cf-stage-mini small{font-size:10px!important}

/* Available athletes: LIVE first, upcoming next, completed at the bottom. */
.cf-runs-stack{display:grid;gap:14px}
.cf-run-group{display:grid;gap:7px}
.cf-run-group-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 3px;
}
.cf-run-group-head strong{font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:#697586}
.cf-run-group-head span{min-width:24px;height:22px;padding:0 7px;border-radius:999px;background:#eef2f6;color:#667085;display:grid;place-items:center;font-size:10px;font-weight:900}
.cf-run-group-list{display:grid;gap:7px}
.cf-run-row{transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}
.cf-run-row.current-live{
  border:2px solid #ef3340!important;
  background:#fff5f5!important;
  box-shadow:0 5px 18px rgba(239,51,64,.08);
}
.cf-run-row.current-live .cf-run-status{background:#ef3340!important;color:#fff!important}
.cf-run-row.busy-live{border-color:#f3b4ba!important;background:#fff9f9!important}
.cf-run-row.busy-live .cf-run-status{background:#ffe5e8!important;color:#b42335!important}
.cf-run-row.next-run{
  border:2px solid #8db7ff!important;
  background:#f2f7ff!important;
}
.cf-run-row.next-run .cf-run-status{background:#2563eb!important;color:#fff!important}
.cf-run-row.queued-run{border-color:#d9e6f7!important;background:#fbfdff!important}
.cf-run-row.queued-run .cf-run-status{background:#eaf2ff!important;color:#2459a9!important}
.cf-run-row.finished{
  opacity:1!important;
  border-color:#b8dec8!important;
  background:#f2fbf6!important;
}
.cf-run-row.finished .cf-run-status{background:#daf2e4!important;color:#18743f!important}
.cf-run-row .cf-start-btn{min-width:105px}

html[data-ui-theme="j3"] .cf-stage-workspace,
html[data-ui-theme="j3"] .cf-total-card{background:#0d141c!important;border-color:#29333f!important;color:#eef4fa}
html[data-ui-theme="j3"] .cf-total-card{background:#101821!important}
html[data-ui-theme="j3"] .cf-total-note{color:#8f9dab}
html[data-ui-theme="j3"] .cf-stage-mini.done{background:#111923!important;border-color:#2c3946!important}
html[data-ui-theme="j3"] .cf-stage-mini.future{background:#0d141c!important;border-color:#29333f!important}
html[data-ui-theme="j3"] .cf-stage-mini.current{background:#10233c!important;border-color:#4b8fff!important;box-shadow:0 0 0 3px rgba(75,143,255,.12)!important}
html[data-ui-theme="j3"] .cf-run-row.current-live{background:#281115!important;border-color:#e24b56!important}
html[data-ui-theme="j3"] .cf-run-row.busy-live{background:#211318!important;border-color:#63323a!important}
html[data-ui-theme="j3"] .cf-run-row.next-run{background:#10213a!important;border-color:#3f74c9!important}
html[data-ui-theme="j3"] .cf-run-row.queued-run{background:#0d141c!important;border-color:#293b50!important}
html[data-ui-theme="j3"] .cf-run-row.finished{background:#102019!important;border-color:#28523a!important}
html[data-ui-theme="j3"] .cf-run-group-head strong{color:#9ba8b8}
html[data-ui-theme="j3"] .cf-run-group-head span{background:#17212b;color:#a8b4c2}

@media(max-width:760px){
  .cf-live-metrics{grid-template-columns:1fr;gap:10px}
  .cf-total-card{min-height:220px}
  .cf-stage-grid{width:max-content;grid-template-columns:repeat(7,108px)!important}
}
@media(max-width:480px){
  .cf-stage-workspace,.cf-total-card{padding:14px!important}
  .cf-total-score{font-size:64px}
  .cf-run-row{grid-template-columns:1fr!important}
  .cf-run-row .cf-start-btn{width:100%}
}


/* v25.0.0-dev.15.5.2.6 — Кроссфит layout hotfix: stages under scoreboard + three compact controls. */
.crossfit-layout #protocolSection{
  margin-top:10px;
  margin-bottom:10px;
}
.crossfit-layout #protocolSection .section-head{
  margin-bottom:8px;
}
.crossfit-layout #protocolSection .section-head .eyebrow{
  display:none;
}
.crossfit-layout #protocolSection .section-head h2{
  font-size:17px;
  line-height:1.2;
}
.crossfit-layout .cf-stage-grid-wrap{
  overflow-x:auto!important;
  overflow-y:visible!important;
  padding:4px 4px 7px!important;
}
.crossfit-layout .cf-stage-grid{
  display:grid!important;
  width:100%!important;
  min-width:700px;
  grid-template-columns:repeat(7,minmax(86px,1fr))!important;
  grid-auto-flow:column;
  gap:8px!important;
  padding:3px!important;
  overflow:visible!important;
}
.crossfit-layout .cf-stage-mini{
  min-width:86px!important;
  min-height:88px!important;
}
.crossfit-layout .cf-hint{
  margin-top:7px;
}
.crossfit-layout .judge-system-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  align-items:start;
  margin-top:0;
}
.crossfit-layout .judge-system-grid>.section{
  min-width:0;
  margin:0!important;
}
.crossfit-layout .last-action-section,
.crossfit-layout .readiness-section,
.crossfit-layout .cf-athletes-section{
  padding:12px 13px!important;
  border-radius:14px!important;
}
.cf-athletes-toggle{
  width:100%;
  border:0;
  background:transparent;
  color:#344054;
  padding:2px 0;
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  text-align:left;
  cursor:pointer;
  font:inherit;
}
.cf-athletes-toggle-title{
  min-width:0;
  display:flex;
  align-items:center;
  gap:7px;
}
.cf-athletes-toggle-title strong{
  font-size:14px;
  line-height:1.2;
  overflow-wrap:anywhere;
}
.cf-athletes-chevron{
  display:inline-block;
  flex:0 0 auto;
  color:#8a96a5;
  font-size:20px;
  line-height:1;
  transform-origin:center;
  transition:transform .16s ease;
}
.cf-athletes-toggle.open .cf-athletes-chevron{transform:rotate(90deg)}
.cf-athletes-section #upcomingList{
  margin-top:9px;
}
.cf-athletes-collapsed{display:none!important}
.crossfit-layout .cf-athletes-section.expanded{
  grid-column:1/-1;
}
.crossfit-layout .cf-athletes-section.expanded #upcomingList{
  display:block;
}
html[data-ui-theme="j3"] .cf-athletes-toggle{color:#e8eef5}
html[data-ui-theme="j3"] .cf-athletes-chevron{color:#7f8c9a}

@media(min-width:980px){
  .crossfit-layout .cf-stage-grid{min-width:0}
}
@media(max-width:900px){
  .crossfit-layout .judge-system-grid{grid-template-columns:1fr!important}
  .crossfit-layout .cf-athletes-section.expanded{grid-column:auto}
}
@media(max-width:760px){
  .crossfit-layout .cf-stage-grid{
    width:max-content!important;
    min-width:700px!important;
    grid-template-columns:repeat(7,92px)!important;
  }
  .crossfit-layout .cf-stage-mini{min-width:92px!important}
}

/* v25.0.0-dev.15.5.2.6.1 — Кроссфит stage-row placement hotfix.
   The stages section is always a full-width row between the active scoreboard
   and the three compact system panels below it. */
.crossfit-layout #primaryJudgeSection{
  grid-column:1 / -1!important;
  width:100%!important;
}
.crossfit-layout #protocolSection{
  grid-column:1 / -1!important;
  width:100%!important;
  align-self:start!important;
}
.crossfit-layout #judgeSystemGrid{
  grid-column:1 / -1!important;
  width:100%!important;
  align-self:start!important;
}
/* Theme J2 defines explicit columns for the second/third .section; Кроссфит
   must override that so “Этапы” never shares a row with system controls. */
html[data-ui-theme="j2"] .crossfit-layout #protocolSection,
html[data-ui-theme="j1"] .crossfit-layout #protocolSection,
html[data-ui-theme="j3"] .crossfit-layout #protocolSection,
html[data-ui-theme="classic"] .crossfit-layout #protocolSection{
  grid-column:1 / -1!important;
}

/* v25.0.0-dev.15.5.2.6.2 — Кроссфит available-athletes column hotfix.
   Opening “Доступные спортсмены” only expands downward inside column 3.
   It never spans the system grid or changes its width. */
.crossfit-layout #judgeSystemGrid > .cf-athletes-section,
.crossfit-layout #judgeSystemGrid > .cf-athletes-section.expanded{
  grid-column:auto!important;
  width:auto!important;
  min-width:0!important;
  align-self:start!important;
}
.crossfit-layout .cf-athletes-section #upcomingList{
  width:100%!important;
  min-width:0!important;
  overflow:visible!important;
}
/* Neutralize the previous 15.5.2.6 full-row expansion rule. */
.crossfit-layout .cf-athletes-section.expanded{
  grid-column:auto!important;
}

/* v25.0.0-dev.15.5.2.6.3 — Кроссфит “Следующие” heading hotfix.
   Group wrappers use namespaced classes and must never inherit the generic
   .upcoming match-card grid. The group title stays above its athlete cards,
   exactly like “Сейчас” and “Завершённые”. */
.crossfit-layout .cf-runs-stack > .cf-run-group{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  align-items:stretch!important;
  gap:7px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.crossfit-layout .cf-runs-stack > .cf-run-group > .cf-run-group-head{
  grid-column:1!important;
  width:100%!important;
  min-width:0!important;
}
.crossfit-layout .cf-runs-stack > .cf-run-group > .cf-run-group-list{
  grid-column:1!important;
  width:100%!important;
  min-width:0!important;
}

/* v25.0.0-dev.15.5.2.6.4 — Кроссфит final-stage lock hotfix.
   After stage 7 is saved, the main stage workspace stays visible but becomes
   neutral/read-only until the judge explicitly finishes the run. */
.crossfit-layout .cf-stage-workspace.cf-stage-locked{
  background:#f2f4f7!important;
  border-color:#d6dce4!important;
  color:#667085!important;
  box-shadow:none!important;
}
.crossfit-layout .cf-stage-workspace.cf-stage-locked .cf-stage-kicker,
.crossfit-layout .cf-stage-workspace.cf-stage-locked label{
  color:#7b8492!important;
}
.crossfit-layout .cf-stage-workspace.cf-stage-locked .cf-stage-number{
  color:#4b5563!important;
}
.crossfit-layout .cf-stage-workspace.cf-stage-locked .cf-score-input:disabled{
  opacity:1!important;
  color:#4b5563!important;
  -webkit-text-fill-color:#4b5563!important;
  background:#e5e7eb!important;
  border-color:#cfd5dd!important;
  cursor:not-allowed!important;
}
.crossfit-layout .cf-stage-workspace.cf-stage-locked .cf-save-next:disabled{
  opacity:1!important;
  color:#667085!important;
  background:#dfe3e8!important;
  box-shadow:none!important;
  cursor:not-allowed!important;
  transform:none!important;
}
.crossfit-layout .cf-awaiting-finish-note{
  margin-top:2px;
  padding:10px 12px;
  border:1px solid #d5dae1;
  border-radius:12px;
  background:#fff;
  color:#667085;
  font-size:11px;
  line-height:1.4;
  font-weight:800;
}
html[data-ui-theme="j3"] .crossfit-layout .cf-stage-workspace.cf-stage-locked{
  background:#151a20!important;
  border-color:#303842!important;
  color:#9ca7b4!important;
}
html[data-ui-theme="j3"] .crossfit-layout .cf-stage-workspace.cf-stage-locked .cf-stage-number{
  color:#c1c9d2!important;
}
html[data-ui-theme="j3"] .crossfit-layout .cf-stage-workspace.cf-stage-locked .cf-score-input:disabled{
  color:#b7c0ca!important;
  -webkit-text-fill-color:#b7c0ca!important;
  background:#20262d!important;
  border-color:#343d47!important;
}
html[data-ui-theme="j3"] .crossfit-layout .cf-stage-workspace.cf-stage-locked .cf-save-next:disabled{
  color:#9aa5b1!important;
  background:#2a3139!important;
}
html[data-ui-theme="j3"] .crossfit-layout .cf-awaiting-finish-note{
  background:#11161c;
  border-color:#303842;
  color:#9ca7b4;
}

/* v25.0.0-dev.15.5.2.6.4.1 — Кроссфит mobile last-action preview hotfix.
   On phones the global mobile .undo-btn width rule used to consume almost the
   whole preview row and squeeze the latest action text into a few characters.
   Keep the latest action and Undo in two stable columns; history below is
   untouched and only the latest action remains undoable. */
@media (max-width:620px){
  .crossfit-layout .last-action-preview{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) max-content!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
  }
  .crossfit-layout .last-action-preview .last-action-copy{
    min-width:0!important;
    width:auto!important;
  }
  .crossfit-layout .last-action-preview .last-action-copy strong{
    display:block!important;
    min-width:0!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    hyphens:auto;
  }
  .crossfit-layout .last-action-preview .undo-btn{
    width:auto!important;
    min-width:88px!important;
    max-width:116px!important;
    justify-self:end!important;
    align-self:center!important;
    flex:none!important;
    white-space:nowrap!important;
    padding:8px 10px!important;
  }
}
@media (max-width:360px){
  .crossfit-layout .last-action-preview{
    gap:7px!important;
    padding-left:9px!important;
    padding-right:8px!important;
  }
  .crossfit-layout .last-action-preview .undo-btn{
    min-width:82px!important;
    padding-left:8px!important;
    padding-right:8px!important;
  }
}


/* v25.0.0-dev.15.5.2.6.4.3 — offline write buffer status */
.connection.warn span{background:#f59e0b;box-shadow:0 0 0 4px rgba(245,158,11,.12)}
.connection.warn{border-color:#f0d6a2;background:#fff9ef;color:#8a5a12}
@media(max-width:620px){.connection{white-space:normal;line-height:1.15}.undo-btn{white-space:normal}}

/* v25.0.0-dev.15.5.2.6.4.5 — quick futsal fouls + blue first-half action */
.futsal-foul-actions{margin-top:-4px}
.futsal-foul-actions>div{background:#fff8eb;border-color:#f1d5a5}
.futsal-foul-actions small{color:#8a5b12}
.futsal-foul-actions .foul-score-btn{width:100%;border:1px solid transparent;border-radius:12px;min-height:54px;font-size:20px;font-weight:950;cursor:pointer;transition:transform .08s ease,filter .12s ease}
.futsal-foul-actions .foul-score-btn:active{transform:scale(.985)}
.futsal-foul-actions .foul-score-btn.minus{background:#f6c45b;color:#553800;border-color:#e6ad36}
.futsal-foul-actions .foul-score-btn.plus{background:#2f6df6;color:#fff;border-color:#2f6df6}
.futsal-foul-actions .foul-score-btn:hover{filter:brightness(.97)}
.half-actions .futsal-half-end:not(:disabled){background:#2f6df6!important;border-color:#2f6df6!important;color:#fff!important;box-shadow:0 6px 18px rgba(47,109,246,.18)}
.half-actions .futsal-half-end:not(:disabled):hover{filter:brightness(.98)}
html[data-ui-theme="j3"] .futsal-foul-actions>div{background:#15120b;border-color:#4c3b19;color:#f7edd7}
html[data-ui-theme="j3"] .futsal-foul-actions small{color:#e8c879}
html[data-ui-theme="j3"] .futsal-foul-actions .foul-score-btn.minus{background:#a36b09;color:#fff4d5;border-color:#c48719}
html[data-ui-theme="j3"] .futsal-foul-actions .foul-score-btn.plus{background:#2f6df6;color:#fff;border-color:#4a7df4}
html[data-ui-theme="j3"] .half-actions .futsal-half-end:not(:disabled){background:#2f6df6!important;border-color:#4a7df4!important;color:#fff!important}


/* v25.0.0-dev.15.5.2.6.4.13 — sticky header stability hotfix.
   Sticky behaviour is isolated from visual theming: polish.css owns the Classic appearance
   the single source of truth for header background/text in Classic/J1/J2/J3. */
.topbar{
  position:sticky!important;
  top:0;
  z-index:1200;
  isolation:isolate;
}
.judge-top-statuses{display:grid;justify-items:end;gap:7px;min-width:min(360px,44vw)}
.judge-top-state{
  max-width:100%;padding:6px 10px;border-radius:999px;background:#f2f4f7;color:#475467;
  font-size:10px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.judge-top-state.live{background:#fee4e2;color:#b42318}
.judge-top-state.finishing{background:#fff4d6;color:#8a5a00}
.judge-top-state.next{background:#eaf2ff;color:#175cd3}
html[data-ui-theme="j3"] .judge-top-state{background:#1c2631;color:#cbd5df}
html[data-ui-theme="j3"] .judge-top-state.live{background:#3a1819;color:#fb7185}
html[data-ui-theme="j3"] .judge-top-state.finishing{background:#3b2a0c;color:#fbbf24}

#offlineCenter{margin:10px 0 14px}
.offline-center{border:1px solid #f0d79f;background:#fffaf0;border-radius:16px;padding:13px;display:grid;gap:10px}
.offline-center.offline,.offline-center.conflict{border-color:#f5b7b1;background:#fff5f4}
.offline-center-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.offline-center-head>div{display:grid;gap:3px;min-width:0}
.offline-center-head strong{font-size:13px}
.offline-center-head span{font-size:10px;line-height:1.4;color:#667085}
.offline-center-head b{min-width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:#fff;border:1px solid #ead7a8;font-variant-numeric:tabular-nums}
.offline-actions{display:grid;gap:5px}
.offline-action{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 8px;border:1px solid #eee7d8;border-radius:9px;background:#fff}
.offline-action span,.offline-action small{font-size:9px;color:#667085}
.offline-action strong{min-width:0;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.offline-center-buttons{display:flex;justify-content:flex-end;gap:8px}
html[data-ui-theme="j3"] .offline-center{background:#241e12;border-color:#5a4723}
html[data-ui-theme="j3"] .offline-center.offline,html[data-ui-theme="j3"] .offline-center.conflict{background:#2b1618;border-color:#643238}
html[data-ui-theme="j3"] .offline-action,html[data-ui-theme="j3"] .offline-center-head b{background:#101820;border-color:#34404b;color:#f1f5f9}

.next-match-hero{border:1px solid #dbe7fb;background:#f8fbff;border-radius:16px;padding:14px;display:grid;gap:11px;margin-bottom:10px}
.next-match-kicker{font-size:9px;letter-spacing:.1em;font-weight:950;color:#175cd3}
.next-match-main{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.next-match-main>div{display:grid;gap:3px;min-width:0}
.next-match-main strong{font-size:16px;line-height:1.2}
.next-match-main span{font-size:10px;color:#667085}
.next-status{padding:5px 8px;border-radius:999px;background:#f2f4f7;color:#475467;font-size:9px;font-weight:900;white-space:nowrap}
.next-status.ready{background:#dcfae6;color:#067647}
.upcoming-secondary{display:grid;gap:8px}
.inline-preflight{display:grid;gap:10px;border-top:1px solid #dbe7fb;padding-top:10px}
.preflight-checks{display:grid;gap:6px}
.preflight-check{display:grid;grid-template-columns:26px minmax(0,1fr);gap:8px;align-items:start;padding:8px;border:1px solid #eaecf0;border-radius:10px;background:#fff}
.preflight-check i{width:24px;height:24px;display:grid;place-items:center;border-radius:50%;font-style:normal;font-weight:950;background:#eaf7ee;color:#168a4b}
.preflight-check.warn i{background:#fff0c8;color:#946200}.preflight-check.bad i{background:#fee4e2;color:#b42318}
.preflight-check>div{display:grid;gap:2px}.preflight-check strong{font-size:10px}.preflight-check span{font-size:9px;color:#667085;line-height:1.35}
.inline-preflight-actions{display:flex;justify-content:flex-end}
.finishing-card{border-color:#f0d79f!important;background:linear-gradient(180deg,#fffdf6,#fff)!important}
.live-badge.finishing{background:#f59e0b!important;color:#111827!important}
.finish-review{display:grid;gap:13px;padding:12px 0 2px}
.finish-review-title{text-align:center;font-size:18px;font-weight:950}
.finish-review-teams{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center}
.finish-review-teams span:first-child{text-align:right}.finish-review-teams span:last-child{text-align:left}
.finish-review-teams span{font-size:15px;font-weight:850}.finish-review-teams strong{font-size:34px;font-variant-numeric:tabular-nums}
.finish-review-sets{text-align:center;color:#475467;font-size:11px;font-weight:800}
.finish-review p{margin:0;text-align:center;color:#667085;font-size:11px;line-height:1.45}
.finish-review-actions{display:grid;grid-template-columns:1fr 1.3fr;gap:9px}
.finish-review-actions button{min-height:50px;border-radius:12px;font-weight:900}
html[data-ui-theme="j3"] .next-match-hero{background:#121d28;border-color:#2d4358}
html[data-ui-theme="j3"] .preflight-check{background:#101820;border-color:#2c3844}
html[data-ui-theme="j3"] .finishing-card{background:#161710!important;border-color:#67521d!important}
@media(max-width:620px){
  .topbar{padding-top:max(10px,env(safe-area-inset-top))}
  .judge-top-statuses{min-width:0;max-width:48vw}
  .judge-top-state{font-size:8px}
  .next-match-main{display:grid}
  .finish-review-teams{grid-template-columns:1fr}.finish-review-teams span{text-align:center!important}.finish-review-actions{grid-template-columns:1fr}
  .offline-action{grid-template-columns:42px minmax(0,1fr)}
  .offline-action small{display:none}
}

/* v25.0.0-dev.15.5.2.6.4.13 — standings matrix parity */
.context-matrix-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}.context-matrix-card{min-width:0;border:1px solid #e1e7ee;border-radius:13px;background:#fff;overflow:hidden}.context-matrix-title{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 11px;border-bottom:1px solid #edf1f5;background:#fafbfd}.context-matrix-title h4{margin:0;font-size:12px}.context-matrix-title span{font-size:8px;color:#667085;font-weight:800}.context-matrix-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.context-matrix{width:100%;min-width:570px;border-collapse:collapse}.context-matrix th,.context-matrix td{padding:7px 5px;border-right:1px solid #edf1f5;border-bottom:1px solid #edf1f5;text-align:center;font-size:9px;line-height:1.25;font-variant-numeric:tabular-nums}.context-matrix th{background:#f7f9fc;color:#667085;font-size:8px;font-weight:900;white-space:nowrap}.context-matrix th:nth-child(2),.context-matrix-team{text-align:left;min-width:130px}.context-matrix td small{display:block;color:#7b8797;font-size:7px;margin-top:1px}.context-matrix .qualifier{background:#f2fbf5}.context-matrix .qualifier td:first-child{box-shadow:inset 3px 0 0 #22c55e}.context-matrix .fifth{background:#faf7ff}.context-matrix .fifth td:first-child{box-shadow:inset 3px 0 0 #8b5cf6}.context-matrix-diagonal{background:#f8fafc;color:#aab4c0;font-weight:900}.context-matrix-score{display:inline-flex;min-width:31px;justify-content:center;padding:3px 5px;border-radius:6px;font-weight:900}.context-matrix-score.win{background:#dcfce7;color:#166534}.context-matrix-score.loss{background:#fee2e2;color:#991b1b}.context-matrix-score.draw{background:#f1f5f9;color:#475569}.context-matrix-score.live{background:#fee2e2;color:#b91c1c}.context-matrix-score.upcoming,.context-matrix-score.empty{background:#f8fafc;color:#98a2b3}.context-matrix-points strong{font-size:10px}
@media(max-width:900px){.context-matrix-grid{grid-template-columns:1fr}}


/* Judge 25.0.0-dev.15.5.2.6.4.14 — mobile responsive stability */
@media(max-width:620px){
  html,body{max-width:100%;overflow-x:hidden}.shell{width:100%;max-width:100%;overflow:clip}.topbar,.panel,.section,.live-card,.scoreboard,.team-actions,.action-side,.penalty-box,.penalty-teams,.last-action-preview,.finish-review,.offline-center{max-width:100%;min-width:0}
  .topbar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:9px!important}.top-actions{width:100%!important;max-width:none!important;justify-content:space-between!important}.judge-top-statuses{min-width:0;flex:1 1 auto}.connection,.judge-top-state{max-width:100%;white-space:normal!important;overflow-wrap:break-word}
  .last-action-preview{display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:start!important;gap:7px!important}.last-action-copy{width:100%!important;min-width:0!important}.last-action-copy strong{font-size:11px!important;line-height:1.35!important;overflow-wrap:break-word!important;word-break:normal!important;hyphens:none!important}.last-action-preview .undo-btn{width:100%!important;max-width:100%!important;min-width:0!important;white-space:normal!important;overflow-wrap:break-word!important;padding:9px 10px!important}
  .penalty-box{margin-left:5px!important;margin-right:5px!important;overflow:hidden!important}.penalty-title{align-items:center!important;gap:8px!important}.penalty-title span{min-width:0;overflow-wrap:break-word}.penalty-teams{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:7px!important}.penalty-teams>div{min-width:0!important;width:100%!important}.penalty-teams small{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:break-word!important}.penalty-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}.penalty-btn{width:100%!important;min-width:0!important}
  .scoreboard{width:100%!important}.team-name{overflow-wrap:break-word!important;word-break:normal!important}.team-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}.judge-btn,.score-btn,.half-end,.finish-match,.primary,.ghost{max-width:100%}
  .modal-card{max-width:100%!important}.modal-actions{grid-template-columns:1fr!important}.finish-review-actions{grid-template-columns:1fr!important}.offline-action{grid-template-columns:42px minmax(0,1fr)!important}.offline-action small{display:none!important}
}
@media(max-width:390px){
  .team-actions{grid-template-columns:1fr!important}.scoreboard{grid-template-columns:minmax(0,1fr) 76px minmax(0,1fr)!important}.score{min-width:76px!important;font-size:44px!important}.top-actions{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important}.judge-top-statuses{min-width:0!important}.topbar .ghost{white-space:nowrap!important}
}

/* Judge 25.0.0-dev.15.5.2.6.4.15 — responsive action/header/foul stability. */

/* Latest action must remain readable at every desktop width. The Undo control
   is deliberately placed on its own row instead of competing with the action
   text inside the compact system column. */
.last-action-preview{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  align-items:start!important;
  gap:8px!important;
  min-width:0!important;
}
.last-action-preview .last-action-copy{
  width:100%!important;
  min-width:0!important;
}
.last-action-preview .last-action-copy strong{
  display:block!important;
  max-width:100%!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  hyphens:none!important;
}
.last-action-preview .undo-btn{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  justify-self:stretch!important;
  white-space:normal!important;
  overflow-wrap:break-word!important;
}

/* Quick-foul cards are always two equal columns. Children are allowed to
   shrink; long team labels reduce their font instead of widening the card. */
.futsal-foul-actions{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
.futsal-foul-actions>div,.futsal-foul-actions .point-controls,.futsal-foul-actions .foul-score-btn{
  min-width:0!important;
  max-width:100%!important;
}
.futsal-foul-actions small.quick-foul-team-label{
  width:100%!important;
  min-width:0!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  line-height:1.15!important;
}
.futsal-foul-actions small.quick-foul-team-label.label-sm{font-size:10px!important;letter-spacing:-.01em}
.futsal-foul-actions small.quick-foul-team-label.label-xs{font-size:8.5px!important;letter-spacing:-.025em}

@media(max-width:620px){
  /* Header bottom row: LIVE match | System online | Exit. */
  .topbar{grid-template-columns:minmax(0,1fr)!important}
  .top-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1.25fr) minmax(0,.95fr) auto!important;
    align-items:center!important;
    gap:5px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .judge-top-statuses{display:contents!important}
  .judge-top-state,.connection,.topbar .ghost{
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
  }
  .judge-top-state{
    display:block!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    text-align:center!important;
    font-size:8.5px!important;
    padding:7px 8px!important;
  }
  .connection{
    justify-content:center!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    font-size:8.5px!important;
    padding:7px 8px!important;
    line-height:1!important;
  }
  .connection span{flex:0 0 auto!important}
  .topbar .ghost{
    justify-self:end!important;
    white-space:nowrap!important;
    padding:7px 9px!important;
    font-size:8.5px!important;
  }

  .futsal-foul-actions{
    padding-left:5px!important;
    padding-right:5px!important;
    gap:5px!important;
    overflow:hidden!important;
  }
  .futsal-foul-actions>div{padding:6px!important;border-radius:10px!important;overflow:hidden!important}
  .futsal-foul-actions .point-controls{gap:4px!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
  .futsal-foul-actions .foul-score-btn{min-height:50px!important;padding:5px 2px!important;font-size:19px!important}
  .futsal-foul-actions small.quick-foul-team-label{font-size:9.5px!important;margin-bottom:6px!important}
  .futsal-foul-actions small.quick-foul-team-label.label-sm{font-size:8.5px!important}
  .futsal-foul-actions small.quick-foul-team-label.label-xs{font-size:7.4px!important;letter-spacing:-.035em}
}
@media(max-width:360px){
  .top-actions{grid-template-columns:minmax(0,1.12fr) minmax(0,.9fr) auto!important;gap:4px!important}
  .judge-top-state,.connection,.topbar .ghost{font-size:7.6px!important;padding-left:6px!important;padding-right:6px!important}
  .futsal-foul-actions small.quick-foul-team-label{font-size:8.6px!important}
  .futsal-foul-actions small.quick-foul-team-label.label-sm{font-size:7.8px!important}
  .futsal-foul-actions small.quick-foul-team-label.label-xs{font-size:6.9px!important}
}

/* Judge 25.0.0-dev.15.5.2.6.4.18 — finish-confirmation geometry hotfix. */
.finish-review{width:min(100%,860px);margin:0 auto}
.finish-review-scoreboard{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:14px;width:100%;min-width:0;padding:4px 0}
.finish-review-team{min-width:0;font-size:clamp(15px,1.6vw,22px);font-weight:950;line-height:1.15;overflow-wrap:break-word;word-break:normal}
.finish-review-team.left{text-align:right}.finish-review-team.right{text-align:left}
.finish-review-score{display:grid;justify-items:center;gap:3px;min-width:88px}
.finish-review-score strong{font-size:clamp(38px,5vw,58px);line-height:.95;font-weight:950;font-variant-numeric:tabular-nums;white-space:nowrap}
.finish-review-score small{font-size:10px;font-weight:850;color:#667085;white-space:nowrap}
@media(max-width:620px){.finish-review{padding-left:2px;padding-right:2px}.finish-review-scoreboard{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:7px}.finish-review-team{font-size:clamp(12px,3.6vw,16px);text-align:center!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.finish-review-score{min-width:74px}.finish-review-score strong{font-size:clamp(34px,10vw,48px)}.finish-review-score small{font-size:8.5px}.finish-review-sets{line-height:1.45}}
@media(max-width:380px){.finish-review-scoreboard{gap:5px}.finish-review-team{font-size:11.5px}.finish-review-score{min-width:68px}.finish-review-score strong{font-size:36px}}
