/* R4: czytelne ekrany operacyjne — ekran sali i dyspozytor. */
.stage-r4 [hidden], .dispatcher-r4 [hidden] { display: none !important; }
.stage-r4 {
  min-height: 100vh;
  overflow: auto;
  background: radial-gradient(circle at 50% -30%, #174b76 0, transparent 42rem), #020a13;
}
.stage-shell { width: calc(100% - 2rem); max-width: 1920px; margin: 0 auto; padding: .65rem 0 1rem; }
.stage-workspace { display: grid; gap: .75rem; }
.stage-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; padding: .45rem .25rem; }
.stage-identity { display: flex; align-items: center; min-width: 0; gap: .8rem; }
.stage-identity__mark { display: grid; flex: 0 0 auto; place-items: center; width: 46px; height: 46px; border: 3px solid var(--yellow); border-radius: 50%; color: var(--yellow); font-size: 1.35rem; }
.stage-identity .eyebrow { margin-bottom: .2rem; font-size: .65rem; }
.stage-identity h1 { overflow: hidden; margin: 0; max-width: 70vw; font-size: clamp(1.45rem, 3vw, 2.7rem); line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.stage-topbar__actions { display: flex; align-items: center; flex: 0 0 auto; gap: .55rem; }
.stage-call { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-height: 74px; padding: .8rem 1rem; border: 1px solid #a58117; border-left: 7px solid var(--yellow); border-radius: .7rem; background: linear-gradient(90deg, #4b3908, #17150d 72%); box-shadow: 0 12px 32px #0007; }
.stage-call > span { color: var(--yellow); font-size: .68rem; font-weight: 950; letter-spacing: .1em; }
.stage-call > strong { font-size: clamp(1.15rem, 2.4vw, 2.2rem); line-height: 1.15; text-align: center; }
.stage-call > small { color: #f8dfa0; font-size: 1rem; font-weight: 850; }
.stage-summary { display: grid; grid-template-columns: minmax(280px, 1.4fr) repeat(3, minmax(130px, .55fr)); overflow: hidden; border: 1px solid var(--line); border-radius: .75rem; background: #07192c; }
.stage-progress, .stage-summary__metric { min-height: 76px; padding: .8rem 1rem; border-right: 1px solid var(--line); }
.stage-summary > :last-child { border-right: 0; }
.stage-progress > div { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; margin-bottom: .6rem; }
.stage-progress span, .stage-summary__metric span { color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.stage-progress strong { color: var(--yellow); font-size: 1.35rem; }
.stage-progress i { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: #ffffff1a; }
.stage-progress i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f0b800, var(--yellow)); }
.stage-summary__metric { display: flex; align-items: center; gap: .65rem; }
.stage-summary__metric strong { color: var(--yellow); font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1; }
.stage-summary__metric strong { white-space: nowrap; }
.stage-summary__metric strong small { color: #d8e2ed; font-size: .45em; }
.stage-section, .stage-panel { min-width: 0; padding: .85rem; border: 1px solid #284966; border-radius: .75rem; background: #061526c7; }
.stage-section__head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; }
.stage-section__head .eyebrow { margin-bottom: .12rem; font-size: .62rem; }
.stage-section__head h2 { margin: 0; font-size: clamp(1.1rem, 1.8vw, 1.45rem); }
.stage-count { min-width: 36px; padding: .35rem .55rem; border: 1px solid var(--line); border-radius: 999px; color: var(--yellow); font-weight: 950; text-align: center; }
.stage-r4 .stage-board-grid { display: grid; grid-template-columns: repeat(var(--stage-board-columns, 1), minmax(0, 1fr)); gap: .6rem; }
.stage-section--boards { position: relative; }
.stage-board-card { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #416986; border-radius: .7rem; background: linear-gradient(145deg, #0b2a49, #051424); box-shadow: 0 10px 28px #0006; }
.stage-board-card > header { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .55rem .7rem; border-bottom: 1px solid #31516d; background: #102f4e; }
.stage-board-card > header strong { color: var(--yellow); font-size: 1rem; }
.stage-board-card > header span { color: var(--muted); font-size: .67rem; font-weight: 850; text-transform: uppercase; }
.stage-player { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 48px 48px minmax(90px, .52fr); align-items: center; min-height: 72px; border-bottom: 1px solid #294a6c; }
.stage-player.is-throwing { background: linear-gradient(90deg, #ffd23f18, transparent); box-shadow: inset 5px 0 var(--yellow); }
.stage-player__name { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-width: 0; gap: .15rem .45rem; padding: .5rem .75rem; }
.stage-player__name small { grid-column: 1 / -1; display: block; color: var(--yellow); font-size: .55rem; font-weight: 950; letter-spacing: .09em; }
.stage-player__name strong { display: block; min-width: 0; font-size: clamp(1rem, 1.5vw, 1.35rem); line-height: 1.08; overflow-wrap: anywhere; white-space: normal; }
.stage-player__name > .stage-player__average { flex: 0 0 auto; color: #fff; font-size: .8rem; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stage-player > b { padding: .35rem; font-size: 1.25rem; text-align: center; }
.stage-player > em { align-self: stretch; display: grid; place-items: center; border-left: 1px solid #31516d; color: var(--yellow); font-size: clamp(2rem, 3.4vw, 3.4rem); font-style: normal; font-weight: 950; font-variant-numeric: tabular-nums; }
.stage-board-card > footer { display: grid; grid-template-columns: minmax(0, 1fr) 48px 48px minmax(90px, .52fr); padding: .27rem 0; color: var(--muted); font-size: .52rem; font-weight: 900; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.stage-board-card > footer span:first-child { grid-column: 2; }
.stage-board-card.legs-only .stage-player { grid-template-columns: minmax(0, 1fr) 48px minmax(90px, .52fr); }
.stage-board-card.legs-only > footer { grid-template-columns: minmax(0, 1fr) 48px minmax(90px, .52fr); }
.stage-board-card.legs-only > footer span:first-child { grid-column: 2; }
.stage-board-marker { margin: 0; padding: .42rem .7rem; border-bottom: 1px solid #294a6c; background: #061a2d; color: var(--muted); font-size: .72rem; }
.stage-board-marker strong { color: #fff; }
.stage-topbar__actions #stageSoundToggle[aria-pressed="true"] { border-color: #55dfad; background: #0d5d45; color: #e7fff7; box-shadow: 0 0 18px #32e2a94d; }
.stage-score-effect { --effect-color: #ffd83d; position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; overflow: hidden; border: 3px solid var(--effect-color); border-radius: inherit; background: radial-gradient(circle at center, color-mix(in srgb, var(--effect-color) 42%, #06111d), #02070eef 72%); pointer-events: none; animation: stage-effect-in .28s cubic-bezier(.18,.84,.27,1.25) both; }
.stage-score-effect::before,.stage-score-effect::after { position: absolute; inset: 50% auto auto 50%; width: 12rem; height: 12rem; border: 5px solid var(--effect-color); border-radius: 50%; content: ""; opacity: .65; transform: translate(-50%,-50%) scale(.25); animation: stage-effect-ring 1.15s ease-out infinite; }
.stage-score-effect::after { animation-delay: .32s; }
.stage-score-effect--global { inset: .55rem; min-height: 70%; border-radius: .7rem; }
.stage-score-effect--100 { --effect-color: #ffe257; }
.stage-score-effect--140 { --effect-color: #4ad7ff; background: radial-gradient(circle at center, #0ea6d966, #03111aee 72%); }
.stage-score-effect--170 { --effect-color: #ff7043; background: radial-gradient(circle at center, #e52d276b, #170706f2 72%); }
.stage-score-effect--180 { --effect-color: #ffd83d; grid-template-columns: minmax(0,1fr) minmax(120px,.9fr); background: radial-gradient(circle at 72% 35%, #1a70a4a3, transparent 38%), radial-gradient(circle at 24% 52%, #ffc4005e, transparent 42%), #02070ef2; box-shadow: inset 0 0 60px #ffc40052; }
.stage-score-effect--leg { --effect-color: #55dfad; background: radial-gradient(circle at center,#16a77670,#041712f2 72%); }
.stage-score-effect--match { --effect-color: #ffd83d; background: radial-gradient(circle at 50% 45%,#7d3cff9c,transparent 35%),radial-gradient(circle at 20% 70%,#ffca0a75,transparent 34%),radial-gradient(circle at 82% 25%,#00d4ff66,transparent 34%),linear-gradient(145deg,#060310,#171038,#02070f); }
.stage-score-effect--fullscreen { position: fixed; inset: 0; z-index: 10000; grid-template-columns: 1fr; width: 100vw; height: 100vh; border: 0; border-radius: 0; background: radial-gradient(circle at 50% 44%, #256c9fd9 0 18%, transparent 43%), radial-gradient(circle at 18% 65%, #ffca0a75, transparent 35%), radial-gradient(circle at 82% 28%, #e91e6370, transparent 35%), linear-gradient(145deg,#02070f 0%,#081d35 52%,#02070f 100%); box-shadow: inset 0 0 12vw #000, inset 0 0 4vw #ffd83d5c; animation: stage-maximum-in .5s cubic-bezier(.15,.84,.25,1.2) both, stage-maximum-flash .8s ease-in-out .55s 3 alternate; }
.stage-score-effect--fullscreen .stage-score-effect__copy { position: absolute; inset: 3vh 0 auto; z-index: 6; justify-self: center; width: min(96vw,1200px); padding: 0; }
.stage-score-effect--fullscreen .stage-score-effect__copy small { font-size: clamp(1rem,2.2vw,2rem); }
.stage-score-effect--fullscreen .stage-score-effect__copy strong { font-size: clamp(8rem,24vw,22rem); line-height: .72; opacity: .93; text-shadow: 0 .04em .06em #000,0 0 .18em #ffca0a; }
.stage-score-effect--fullscreen .stage-score-effect__copy span { margin-top: .5rem; font-size: clamp(1.3rem,3.5vw,3.7rem); text-shadow: 0 .08em .12em #000,0 0 .45em #ffca0a; }
.stage-score-effect--match.stage-score-effect--fullscreen { background: radial-gradient(circle at 50% 45%,#7d3cff9c,transparent 35%),radial-gradient(circle at 20% 70%,#ffca0a75,transparent 34%),radial-gradient(circle at 82% 25%,#00d4ff66,transparent 34%),linear-gradient(145deg,#060310,#171038,#02070f); }
.stage-score-effect--match.stage-score-effect--fullscreen .stage-score-effect__copy { inset: 14vh 0 auto; }
.stage-score-effect--match.stage-score-effect--fullscreen .stage-score-effect__copy strong { font-size: clamp(7rem,20vw,18rem); line-height: .85; }
.stage-score-effect--match.stage-score-effect--fullscreen .stage-score-effect__copy span { max-width: 94vw; font-size: clamp(1.7rem,4vw,4.4rem); }
.stage-score-effect--fullscreen .stage-score-effect__announcer { position: absolute; z-index: 5; inset: auto 50% -4vh auto; width: auto; height: min(86vh,940px); max-height: none; transform: translateX(50%); filter: drop-shadow(0 0 2rem #ffd83dcc) drop-shadow(0 1.3rem 1rem #000); transform-origin: 50% 74%; animation: stage-announcer-fullscreen .82s cubic-bezier(.16,.82,.27,1.2) both, stage-announcer-pulse 1.25s ease-in-out 1s infinite alternate, stage-announcer-wobble .72s ease-in-out .9s infinite alternate; }
.stage-score-effect--fullscreen .stage-score-effect__particles i { width: .8rem; height: 2.2rem; animation-name: stage-effect-particle-fullscreen; animation-duration: 2s; }
.stage-score-effect__copy { position: relative; z-index: 3; display: grid; justify-items: center; align-content: center; min-width: 0; padding: .65rem; text-align: center; text-shadow: 0 3px 14px #000; animation: stage-effect-copy .52s cubic-bezier(.2,.82,.3,1.3) both; }
.stage-score-effect__copy small { max-width: 100%; overflow: hidden; color: #fff; font-size: clamp(.58rem,1vw,.82rem); font-weight: 950; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.stage-score-effect__copy strong { color: var(--effect-color); font-size: clamp(3.4rem,9vw,8rem); line-height: .86; font-variant-numeric: tabular-nums; filter: drop-shadow(0 0 16px color-mix(in srgb,var(--effect-color) 72%,transparent)); }
.stage-score-effect__copy span { margin-top: .35rem; color: #fff; font-size: clamp(.72rem,1.45vw,1.25rem); font-weight: 1000; letter-spacing: .08em; text-transform: uppercase; }
.stage-score-effect--180 .stage-score-effect__copy { justify-self: stretch; }
.stage-score-effect--180 .stage-score-effect__copy strong { font-size: clamp(4.5rem,10vw,9rem); }
.stage-score-effect--180 .stage-score-effect__copy span { color: #ffe46e; }
.stage-score-effect__announcer { position: relative; z-index: 2; align-self: end; justify-self: center; width: min(100%,360px); max-height: 112%; object-fit: contain; clip-path: ellipse(48% 49% at 50% 50%); filter: drop-shadow(0 0 20px #ffd83d99); transform-origin: 50% 80%; animation: stage-announcer-in .62s cubic-bezier(.16,.82,.27,1.25) both; }
.stage-score-effect__particles { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.stage-score-effect__particles i { position: absolute; top: 50%; left: 50%; width: .55rem; height: 1.5rem; border-radius: 999px; background: var(--effect-color); box-shadow: 0 0 10px var(--effect-color); opacity: .92; transform: rotate(calc(var(--particle) * 20deg)) translateY(-1.5rem); animation: stage-effect-particle 1.25s ease-out calc(var(--particle) * -35ms) infinite; }
.stage-score-effect__fireworks { position: absolute; inset: 0; z-index: 4; overflow: hidden; }
.stage-score-effect__fireworks b { position: absolute; top: var(--y); left: var(--x); width: .5rem; height: .5rem; border-radius: 50%; background: hsl(var(--hue) 100% 65%); color: hsl(var(--hue) 100% 65%); box-shadow: 0 -5.5rem 0 -.12rem currentColor,3.9rem -3.9rem 0 -.12rem currentColor,5.5rem 0 0 -.12rem currentColor,3.9rem 3.9rem 0 -.12rem currentColor,0 5.5rem 0 -.12rem currentColor,-3.9rem 3.9rem 0 -.12rem currentColor,-5.5rem 0 0 -.12rem currentColor,-3.9rem -3.9rem 0 -.12rem currentColor; opacity: 0; animation: stage-firework 1.55s ease-out calc(var(--firework) * .37s) infinite; }
.stage-score-effect__maximum-extras { position: absolute; inset: 0; z-index: 7; overflow: hidden; pointer-events: none; }
.stage-score-effect__maximum-extras b { position: absolute; font-size: clamp(2.4rem,6vw,6rem); filter: drop-shadow(0 .12em .12em #000) drop-shadow(0 0 .25em #ffd83d); animation: stage-maximum-extra 1.65s cubic-bezier(.18,.8,.25,1.18) infinite alternate; }
.stage-score-effect__maximum-extras b:nth-child(1){top:16%;left:8%;--extra-rotate:-18deg;animation-delay:-.2s}.stage-score-effect__maximum-extras b:nth-child(2){top:58%;left:10%;--extra-rotate:14deg;animation-delay:-.8s}.stage-score-effect__maximum-extras b:nth-child(3){top:22%;right:8%;--extra-rotate:16deg;animation-delay:-1.2s}.stage-score-effect__maximum-extras b:nth-child(4){top:62%;right:10%;--extra-rotate:-13deg;animation-delay:-.5s}.stage-score-effect__maximum-extras b:nth-child(5){top:42%;left:22%;--extra-rotate:20deg;animation-delay:-1.4s}.stage-score-effect__maximum-extras b:nth-child(6){top:44%;right:21%;--extra-rotate:-20deg;animation-delay:-1s}
.stage-board-card.is-score-celebrating { border-color: var(--yellow); animation: stage-board-celebrate .55s ease-in-out infinite alternate; }
.stage-board-card.score-tier-140 { border-color: #4ad7ff; }
.stage-board-card.score-tier-170 { border-color: #ff7043; }
.stage-board-card.score-tier-180 { border-color: #ffd83d; box-shadow: 0 0 35px #ffd83d80; }
.stage-board-card.score-tier-leg { border-color: #55dfad; box-shadow: 0 0 30px #55dfad85; }
.stage-board-card.score-tier-match { border-color: #c48cff; box-shadow: 0 0 35px #c48cff8c; }
@keyframes stage-effect-in { from { opacity: 0; transform: scale(.7) rotate(-1deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes stage-effect-copy { from { opacity: 0; transform: scale(.25); } to { opacity: 1; transform: scale(1); } }
@keyframes stage-effect-ring { 0% { opacity: .75; transform: translate(-50%,-50%) scale(.2); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.8); } }
@keyframes stage-effect-particle { 0% { opacity: 0; transform: rotate(calc(var(--particle) * 20deg)) translateY(-1rem) scale(1); } 18% { opacity: 1; } 100% { opacity: 0; transform: rotate(calc(var(--particle) * 20deg)) translateY(-12rem) scale(.2); } }
@keyframes stage-effect-particle-fullscreen { 0% { opacity: 0; transform: rotate(calc(var(--particle) * 20deg)) translateY(-4vh) scale(1.2); } 16% { opacity: 1; } 100% { opacity: 0; transform: rotate(calc(var(--particle) * 20deg)) translateY(-52vh) scale(.15); } }
@keyframes stage-announcer-in { from { opacity: 0; transform: translateY(55%) scale(.55) rotate(7deg); } to { opacity: 1; transform: translateY(8%) scale(1) rotate(0); } }
@keyframes stage-announcer-fullscreen { from { opacity: 0; transform: translate(50%,60%) scale(.35) rotate(8deg); } to { opacity: 1; transform: translate(50%,0) scale(1) rotate(0); } }
@keyframes stage-announcer-pulse { from { filter: drop-shadow(0 0 1.2rem #ffd83d9c) drop-shadow(0 1.3rem 1rem #000); } to { filter: drop-shadow(0 0 3.2rem #ffd83df0) drop-shadow(0 1.3rem 1rem #000); } }
@keyframes stage-announcer-wobble { from { transform: translateX(calc(50% - 7vw)) rotate(-7deg) scale(1.01); } to { transform: translateX(calc(50% + 7vw)) rotate(7deg) scale(1.08); } }
@keyframes stage-maximum-extra { from { opacity:.55;transform:translateY(1.5rem) rotate(var(--extra-rotate)) scale(.75); } to { opacity:1;transform:translateY(-1.5rem) rotate(calc(var(--extra-rotate) * -1)) scale(1.2); } }
@keyframes stage-maximum-in { from { opacity: 0; transform: scale(1.3); filter: brightness(3); } to { opacity: 1; transform: scale(1); filter: brightness(1); } }
@keyframes stage-maximum-flash { from { box-shadow: inset 0 0 12vw #000,inset 0 0 4vw #ffd83d5c; } to { box-shadow: inset 0 0 5vw #000,inset 0 0 12vw #fff3a080; } }
@keyframes stage-firework { 0% { opacity: 0; transform: scale(.05) rotate(0); } 18% { opacity: 1; } 70% { opacity: .9; } 100% { opacity: 0; transform: scale(1.35) rotate(22deg); } }
@keyframes stage-board-celebrate { from { box-shadow: 0 0 14px color-mix(in srgb,var(--effect-color,#ffd83d) 45%,transparent); } to { box-shadow: 0 0 32px color-mix(in srgb,var(--effect-color,#ffd83d) 85%,transparent); } }
@media (prefers-reduced-motion: reduce) {
  .stage-score-effect,.stage-score-effect::before,.stage-score-effect::after,.stage-score-effect__copy,.stage-score-effect__announcer,.stage-score-effect__particles i,.stage-score-effect__fireworks b,.stage-score-effect__maximum-extras b,.stage-board-card.is-score-celebrating { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.stage-call-countdown { --countdown-elapsed: 0; --countdown-color: hsl(calc(48 - (48 * var(--countdown-elapsed))) 100% 62%); display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: .55rem; min-height: 86px; padding: .4rem .7rem; border-bottom: 1px solid #294a6c; background: linear-gradient(90deg, color-mix(in srgb, var(--countdown-color) 13%, transparent), transparent); color: var(--countdown-color); }
.stage-call-countdown svg { width: 72px; height: 72px; transform: rotate(-90deg); }
.stage-call-countdown circle { fill: none; stroke-width: 8; }
.stage-call-countdown__track { stroke: #ffffff1c; }
.stage-call-countdown__progress { stroke: var(--countdown-color); stroke-linecap: round; stroke-dasharray: 264; stroke-dashoffset: calc(264 * var(--countdown-elapsed)); transition: stroke .8s linear, stroke-dashoffset .8s linear; }
.stage-call-countdown > div { display: grid; gap: .08rem; min-width: 0; }
.stage-call-countdown small { color: var(--muted); font-size: .57rem; font-weight: 950; letter-spacing: .08em; }
.stage-call-countdown strong { color: var(--countdown-color); font-size: clamp(1.55rem, 3vw, 2.3rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stage-call-countdown span { color: #e9f3ff; font-size: .68rem; font-weight: 850; }
.stage-call-countdown.is-expired { --countdown-color: #ff3b3b; background: linear-gradient(90deg, #ff3b3b2b, transparent); }
.stage-call-countdown.is-expired span { color: #ff8585; font-weight: 950; }
.stage-zero { display: grid; place-items: center; min-height: 155px; padding: 1.5rem; border: 1px dashed #416581; border-radius: .7rem; color: var(--muted); text-align: center; }
.stage-zero strong { color: var(--ink); font-size: 1.1rem; }
.stage-zero span { margin-top: .25rem; }
.stage-lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: .75rem; }
.stage-queue { display: grid; grid-template-columns: repeat(var(--stage-queue-columns, 5), minmax(0, 1fr)); gap: .45rem; }
.stage-queue__row { display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: .25rem .55rem; min-height: 74px; padding: .55rem; border: 1px solid #294a6c; border-radius: .6rem; background: #071a2d; }
.stage-queue__row > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #173958; color: var(--yellow); font-weight: 950; }
.stage-queue__row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-queue__row strong i { color: var(--muted); font-size: .7rem; font-style: normal; }
.stage-queue__row small { grid-column: 2; color: var(--muted); }
.stage-queue__empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 74px; padding: 1rem; border: 1px dashed #416581; border-radius: .6rem; color: var(--muted); text-align: center; }
.stage-queue__empty strong { color: var(--ink); }
.stage-follow { display: grid; grid-template-columns: minmax(0, 1fr) 78px; align-items: center; gap: .45rem .75rem; }
.stage-follow h2 { margin: 0; font-size: 1.05rem; }
.stage-follow > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.stage-follow .button { grid-column: 1 / -1; width: 100%; text-align: center; }
.stage-live-qr { grid-column: 2; grid-row: 1; overflow: hidden; padding: .3rem; border-radius: .45rem; background: #fff; }
.stage-live-qr svg { display: block; width: 100%; height: auto; }
.stage-announcements { display: grid; gap: .15rem; }
.stage-announcements > div { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: .6rem; padding: .4rem 0; border-bottom: 1px solid #294a6c; }
.stage-announcements span { color: var(--yellow); font-size: .72rem; font-weight: 850; }
.stage-announcements p { margin: 0; font-size: .82rem; line-height: 1.35; }
.stage-empty { width: min(680px, calc(100% - 1rem)); margin: 15vh auto 0; padding: 3rem; border: 1px solid var(--line); border-radius: 1rem; background: #071a2ee8; text-align: center; box-shadow: var(--shadow); }
.stage-empty__mark { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 1rem; border: 4px solid var(--yellow); border-radius: 50%; color: var(--yellow); font-size: 2rem; }
.stage-empty h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.stage-empty > p:not(.eyebrow) { max-width: 56ch; margin-right: auto; margin-left: auto; color: var(--muted); line-height: 1.6; }

/* Preserve every score field inside the available full-screen board area. */
.stage-r4.is-stage-fullscreen .stage-workspace { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
.stage-r4.is-stage-fullscreen .stage-section--boards { grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.stage-r4.is-stage-fullscreen .stage-board-grid { height: 100%; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
.stage-r4.is-stage-fullscreen .stage-board-card { display: grid; grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr) auto auto auto; min-height: 0; }
.stage-r4.is-stage-fullscreen .stage-player { min-height: 0; }
.stage-r4.is-stage-fullscreen .stage-player > em { min-width: 0; font-size: clamp(1.7rem, 3vw, 3.4rem); }

/* Five simultaneous boards need a guaranteed three-digit score column. */
.stage-r4[data-stage-board-count="5"] .stage-board-card.with-sets .stage-player { grid-template-columns: minmax(0, 1fr) 32px 32px minmax(112px, .75fr); }
.stage-r4[data-stage-board-count="5"] .stage-board-card.legs-only .stage-player { grid-template-columns: minmax(0, 1fr) 34px minmax(112px, .75fr); }
.stage-r4[data-stage-board-count="5"] .stage-board-card.with-sets > footer { grid-template-columns: minmax(0, 1fr) 32px 32px minmax(112px, .75fr); }
.stage-r4[data-stage-board-count="5"] .stage-board-card.legs-only > footer { grid-template-columns: minmax(0, 1fr) 34px minmax(112px, .75fr); }
.stage-r4[data-stage-board-count="5"] .stage-player > em { min-width: 0; overflow: visible; font-size: clamp(1.9rem, 2.8vw, 3rem); }

.dispatcher-r4 { background: radial-gradient(circle at 75% -15%, #143d62 0, transparent 38rem), var(--navy); }
.dispatcher-header { min-height: 72px; padding: .7rem 0; }
.dispatcher-header .brand > span:last-child { display: grid; line-height: 1.05; }
.dispatcher-header .brand small { margin-top: .2rem; color: var(--muted); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.dispatcher-layout { display: grid; gap: .85rem; width: min(1580px, calc(100% - 2rem)); margin: 0 auto 3rem; }
.dispatcher-layout > *, .dispatcher-workspace, .dispatcher-workspace > *, .dispatcher-overview > *, .dispatcher-columns > * { min-width: 0; }
.dispatcher-commandbar { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(300px, 520px) auto; align-items: end; gap: 1rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: .9rem; background: linear-gradient(135deg, #0b2b4f, #07192d); box-shadow: var(--shadow); }
.dispatcher-commandbar .eyebrow { margin-bottom: .15rem; }
.dispatcher-commandbar h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.7rem); }
.dispatcher-tournament { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.dispatcher-tournament select { min-height: 48px; text-transform: none; }
.dispatcher-workspace { display: grid; gap: .85rem; }
.dispatcher-overview { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .85rem; }
.dispatcher-readiness, .dispatcher-setup, .dispatcher-section, .dispatcher-empty { padding: 1rem; border: 1px solid var(--line); border-radius: .85rem; background: linear-gradient(145deg, #0a203a, #07192d); box-shadow: 0 12px 35px #0003; }
.dispatcher-readiness { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; }
#readiness > div { display: flex; align-items: center; gap: .7rem; }
#readiness > div > strong { overflow: hidden; font-size: 1.25rem; text-overflow: ellipsis; white-space: nowrap; }
.dispatcher-state { padding: .3rem .5rem; border-radius: 999px; background: #234563; color: #dcecff; font-size: .65rem; font-weight: 950; text-transform: uppercase; }
.dispatcher-state.running { background: #116044; color: #d8fff1; }
.dispatcher-state.paused { background: #7a5710; color: #fff2bb; }
#readiness dl { display: flex; flex-wrap: wrap; gap: .45rem 1.4rem; margin: .65rem 0 0; }
#readiness dl div { display: grid; }
#readiness dt { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
#readiness dd { margin: 0; font-size: 1.1rem; font-weight: 950; }
.dispatcher-primary-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.dispatcher-setup { display: grid; grid-template-columns: 110px auto auto; align-items: end; gap: .55rem; }
.dispatcher-setup button { white-space: nowrap; }
.dispatcher-setup small { grid-column: 1 / -1; color: var(--muted); }
.dispatcher-section__head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.dispatcher-section__head .eyebrow { margin-bottom: .12rem; }
.dispatcher-section__head h2 { margin: 0; }
.dispatcher-section__head p:last-child { margin: .3rem 0 0; color: var(--muted); }
.dispatcher-metric { min-width: 40px; padding: .4rem .65rem; border: 1px solid var(--line); border-radius: 999px; color: var(--yellow); font-weight: 950; text-align: center; }
.dispatcher-board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(315px, 1fr)); gap: .65rem; }
.dispatcher-board { overflow: hidden; border: 1px solid #355775; border-radius: .72rem; background: #06172a; }
.dispatcher-board.busy { border-color: #2d9e78; box-shadow: inset 0 3px var(--green); }
.dispatcher-board.free { border-color: #456b8c; }
.dispatcher-board.paused { border-color: #b07c18; box-shadow: inset 0 3px var(--yellow); }
.dispatcher-board.off { opacity: .65; }
.dispatcher-board > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem .75rem; border-bottom: 1px solid #294a6c; background: #0d2b49; }
.dispatcher-board > header strong { color: var(--yellow); font-size: 1.05rem; }
.dispatcher-board > header span { color: var(--muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.dispatcher-board__code { padding: .45rem .7rem; color: var(--muted); font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.dispatcher-player { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; align-items: center; gap: .55rem; min-height: 50px; padding: .35rem .7rem; border-top: 1px solid #294a6c; }
.dispatcher-player.throwing { box-shadow: inset 4px 0 var(--yellow); background: #ffd23f0e; }
.dispatcher-player > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatcher-player > span { color: var(--muted); font-size: .7rem; }
.dispatcher-player > b { color: var(--yellow); font-size: 1.55rem; text-align: right; }
.dispatcher-referee { margin: 0; padding: .45rem .7rem; color: var(--muted); font-size: .72rem; }
.dispatcher-board__actions { display: flex; flex-wrap: wrap; gap: .4rem; padding: .45rem .7rem .7rem; }
.dispatcher-board__actions button { min-height: 48px; padding: .5rem .65rem; font-size: .72rem; }
.dispatcher-call-plan { flex: 1 1 100%; margin: 0; padding: .45rem .6rem; border: 1px solid #355f7c; border-radius: .5rem; background: #0a2034; color: #d9e6f5; font-size: .72rem; line-height: 1.35; }
.dispatcher-call-plan strong { color: var(--yellow); }
.dispatcher-board__actions details { position: relative; margin: 0; padding: .45rem .6rem; }
.dispatcher-board__actions details[open] { width: 100%; }
.dispatcher-board__actions details summary { font-size: .72rem; }
.dispatcher-board__actions details button { margin: .5rem .35rem 0 0; }
.dispatcher-board__empty { display: grid; place-items: center; min-height: 155px; padding: 1rem; color: var(--muted); text-align: center; }
.dispatcher-board__empty span { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #347c66; border-radius: 50%; color: var(--green); font-size: 1.3rem; }
.dispatcher-board__empty strong { color: var(--ink); }
.dispatcher-board > footer { display: flex; justify-content: flex-end; gap: .4rem; padding: .55rem .7rem; border-top: 1px solid #294a6c; background: #061321; }
.dispatcher-board > footer button { min-height: 48px; padding: .45rem .6rem; font-size: .7rem; }
.dispatcher-columns { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: .85rem; }
.dispatcher-queue { display: grid; gap: .45rem; }
.dispatcher-queue-card { display: grid; grid-template-columns: 28px minmax(170px, 1fr) 130px auto; align-items: end; gap: .55rem; padding: .6rem; border: 1px solid #31516d; border-radius: .65rem; background: #06172a; }
.dispatcher-queue-card > span { align-self: center; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #173958; color: var(--yellow); font-weight: 950; }
.dispatcher-queue-card > div { align-self: center; min-width: 0; }
.dispatcher-queue-card small { display: block; color: var(--yellow); font-size: .63rem; font-weight: 900; }
.dispatcher-queue-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatcher-queue-card strong i { color: var(--muted); font-size: .7rem; font-style: normal; }
.dispatcher-queue-card em { display: block; margin-top: .18rem; color: #ffd982; font-size: .68rem; font-style: normal; }
.dispatcher-queue-card label { font-size: .62rem; text-transform: uppercase; }
.dispatcher-queue-card select, .dispatcher-queue-card button { min-height: 48px; }
.dispatcher-queue-card.held { border-color: #a77d25; background: #211b0b; }
.dispatcher-queue-card.held > span { background: #715619; }
.dispatcher-queue-card__actions { display: flex; gap: .35rem; }
.dispatcher-queue-card__actions button { padding-inline: .65rem; }
.dispatcher-held-heading { display: grid; gap: .15rem; margin-top: .5rem; padding: .65rem; border: 1px solid #a77d25; border-radius: .6rem; background: #171508; }
.dispatcher-held-heading strong { color: var(--yellow); }
.dispatcher-held-heading span { color: var(--muted); font-size: .75rem; }
.dispatcher-calls { display: grid; max-height: 32rem; overflow: auto; }
.dispatcher-call { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: .65rem; padding: .55rem .2rem; border-bottom: 1px solid #294a6c; }
.dispatcher-call time { color: var(--yellow); font-size: .72rem; font-weight: 850; }
.dispatcher-call strong { font-size: .75rem; text-transform: uppercase; }
.dispatcher-call p { margin: .15rem 0 0; color: #d9e6f5; font-size: .8rem; line-height: 1.4; }
.dispatcher-zero { display: grid; place-items: center; min-height: 110px; padding: 1rem; border: 1px dashed #3e607e; border-radius: .65rem; color: var(--muted); text-align: center; }
.dispatcher-zero strong { color: var(--ink); }
.dispatcher-devices .button-row { margin: 0; }
.dispatcher-device-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); gap: .85rem; }
.dispatcher-device-instructions { padding: .9rem; border: 1px solid #31516d; border-radius: .7rem; background: #06172a; }
.dispatcher-device-instructions > strong { color: var(--yellow); }
.dispatcher-device-instructions ol { margin: .65rem 0; padding-left: 1.25rem; color: #dce7f3; }
.dispatcher-device-instructions p { margin: 0; color: var(--muted); font-size: .78rem; }
.dispatcher-device { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem; border-bottom: 1px solid #294a6c; }
.dispatcher-device small { display: block; margin-top: .2rem; color: var(--muted); }
.dispatcher-device .danger { min-height: 48px; padding: .5rem .65rem; font-size: .72rem; }
.dispatcher-empty { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.25rem; padding: 2rem; }
.dispatcher-empty-logo { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 5px 12px #0008); }
.dispatcher-empty h2 { margin-bottom: .35rem; }
.dispatcher-empty p { margin: 0; max-width: 70ch; color: var(--muted); line-height: 1.55; }
.dispatcher-device-instructions .device-qr { max-width: 260px; }
.dispatcher-device-instructions .pairing-code { margin: .7rem 0; color: var(--yellow); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 950; letter-spacing: .12em; text-align: center; }
.dispatcher-dialog { width: min(520px, calc(100% - 1rem)); padding: 0; border: 1px solid #416986; border-radius: .85rem; background: #07192d; color: var(--ink); box-shadow: 0 24px 80px #000b; }
.dispatcher-dialog::backdrop { background: #01070edb; backdrop-filter: blur(4px); }
.dispatcher-dialog form { display: grid; gap: .85rem; padding: 1rem; }
.dispatcher-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.dispatcher-dialog__head h2 { margin: 0; }
.dispatcher-dialog .notice { margin: 0; }
.dispatcher-dialog .button-row { margin: 0; }

@media (max-width: 1100px) {
  .dispatcher-commandbar { grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr); }
  .dispatcher-commandbar #connection { grid-column: 1 / -1; justify-self: start; }
  .dispatcher-overview { grid-template-columns: 1fr; }
  .dispatcher-columns { grid-template-columns: 1fr; }
  .stage-r4:not(.is-stage-fullscreen) .stage-lower { grid-template-columns: 1fr; }
  .stage-r4:not(.is-stage-fullscreen) .stage-queue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-follow { grid-template-columns: minmax(0, 1fr) 92px; }
}

@media (max-width: 900px) {
  .dispatcher-header { align-items: center; flex-wrap: wrap; }
  .dispatcher-header .top-nav { display: flex; flex: 1 0 100%; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: .25rem; }
  .dispatcher-header .top-nav > * { flex: 0 0 auto; }
}

@media (max-width: 760px) {
  .stage-shell, .dispatcher-layout { width: calc(100% - 1rem); }
  .stage-topbar { align-items: flex-start; }
  .stage-identity__mark { display: none; }
  .stage-identity h1 { max-width: calc(100vw - 10rem); white-space: normal; }
  .stage-topbar__actions { align-items: flex-end; flex-direction: column; }
  .stage-call { grid-template-columns: 1fr auto; }
  .stage-call > strong { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .stage-summary { grid-template-columns: repeat(3, 1fr); }
  .stage-progress { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); }
  .stage-summary__metric { min-height: 64px; align-items: flex-start; flex-direction: column; gap: .25rem; padding: .65rem; }
  .stage-summary__metric strong { font-size: 1.7rem; }
  .stage-lower { grid-template-columns: 1fr; }
  .stage-queue { grid-template-columns: 1fr; }
  .stage-player { grid-template-columns: minmax(0, 1fr) 38px 38px 82px; }
  .stage-board-card > footer { grid-template-columns: minmax(0, 1fr) 38px 38px 82px; }
  .stage-board-card.legs-only .stage-player { grid-template-columns: minmax(0, 1fr) 38px 82px; }
  .stage-board-card.legs-only > footer { grid-template-columns: minmax(0, 1fr) 38px 82px; }
  .stage-player > em { font-size: 2rem; }
  .dispatcher-commandbar { grid-template-columns: 1fr; align-items: stretch; }
  .dispatcher-commandbar #connection { grid-column: auto; }
  .dispatcher-readiness { grid-template-columns: 1fr; }
  .dispatcher-setup { grid-template-columns: 1fr 1fr; }
  .dispatcher-setup label { grid-column: 1 / -1; }
  .dispatcher-queue-card { grid-template-columns: 28px minmax(0, 1fr); align-items: center; }
  .dispatcher-queue-card label, .dispatcher-queue-card > button, .dispatcher-queue-card__actions { grid-column: 2; }
  .dispatcher-queue-card__actions { flex-wrap: wrap; }
  .dispatcher-device-grid { grid-template-columns: 1fr; }
  .dispatcher-section__head { align-items: flex-start; flex-direction: column; }
  .dispatcher-devices .button-row { width: 100%; }
  .dispatcher-empty { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

@media (min-width: 761px) {
  .stage-r4.is-stage-fullscreen { display: flex; height: 100dvh; overflow: hidden; flex-direction: column; }
  .stage-r4.is-stage-fullscreen > .local-banner:not([hidden]) { flex: 0 0 auto; }
  .stage-r4.is-stage-fullscreen .stage-shell { flex: 1 1 auto; width: calc(100% - 1rem); min-height: 0; padding: .35rem 0; }
  .stage-r4.is-stage-fullscreen .stage-workspace { grid-template-rows: auto auto auto auto auto minmax(0, 1fr); height: 100%; gap: .45rem; }
  .stage-r4.is-stage-fullscreen .stage-section--boards { display: grid; grid-template-rows: auto auto; min-height: 0; }
  .stage-r4.is-stage-fullscreen .stage-board-grid { align-items: start; min-height: 0; grid-auto-rows: auto; }
  .stage-r4.is-stage-fullscreen .stage-board-card { align-self: start; }
  .stage-r4.is-stage-fullscreen .stage-queue__row { grid-template-columns: 24px minmax(0, 1fr); grid-template-rows: auto auto; min-height: 52px; padding: .35rem; gap: .12rem .35rem; }
  .stage-r4.is-stage-fullscreen .stage-queue__row > span { width: 22px; height: 22px; font-size: .72rem; }
  .stage-r4.is-stage-fullscreen .stage-queue__row strong { font-size: .72rem; }
  .stage-r4.is-stage-fullscreen .stage-queue__row small { font-size: .57rem; line-height: 1; }

  .stage-r4.stage-density-compact .stage-topbar { min-height: 50px; padding: .2rem; }
  .stage-r4.stage-density-compact .stage-identity .brand-logo { width: 36px; height: 36px; }
  .stage-r4.stage-density-compact .stage-identity h1 { font-size: clamp(1.2rem, 2.2vw, 2rem); }
  .stage-r4.stage-density-compact .stage-call { min-height: 54px; padding: .45rem .7rem; }
  .stage-r4.stage-density-compact .stage-call > strong { font-size: clamp(1rem, 1.8vw, 1.65rem); }
  .stage-r4.stage-density-compact .stage-progress,
  .stage-r4.stage-density-compact .stage-summary__metric { min-height: 56px; padding: .48rem .65rem; }
  .stage-r4.stage-density-compact .stage-progress > div { margin-bottom: .3rem; }
  .stage-r4.stage-density-compact .stage-summary__metric strong { font-size: 1.65rem; }
  .stage-r4.stage-density-compact .stage-section,
  .stage-r4.stage-density-compact .stage-panel { padding: .5rem; }
  .stage-r4.stage-density-compact .stage-section__head { margin-bottom: .35rem; }
  .stage-r4.stage-density-compact .stage-section__head h2 { font-size: 1.05rem; }
  .stage-r4.stage-density-compact .stage-board-card > header { padding: .35rem .5rem; }
  .stage-r4.stage-density-compact .stage-player { min-height: 50px; }
  .stage-r4.stage-density-compact .stage-player__name { padding: .3rem .5rem; }
  .stage-r4.stage-density-compact .stage-player__name strong { font-size: .95rem; }
  .stage-r4.stage-density-compact .stage-player > em { font-size: 2rem; }
  .stage-r4.stage-density-compact .stage-board-marker { padding: .27rem .5rem; font-size: .64rem; }
  .stage-r4.stage-density-compact .stage-board-card > footer { padding: .18rem 0; }
  .stage-r4.stage-density-compact .stage-queue__row { min-height: 52px; padding: .35rem; }
  .stage-r4.stage-density-compact .stage-queue__row strong { font-size: .76rem; }
  .stage-r4.stage-density-compact .stage-queue__row small { font-size: .62rem; }
  .stage-r4.stage-density-compact .stage-follow { grid-template-columns: minmax(0, 1fr) 58px; }
  .stage-r4.stage-density-compact .stage-follow > p { display: none; }
  .stage-r4.stage-density-compact .stage-follow .button { min-height: 48px; padding: .35rem .5rem; }

  .stage-r4.stage-density-tight .stage-player,
  .stage-r4.stage-density-tight .stage-board-card > footer { grid-template-columns: minmax(0, 1fr) 32px 32px 64px; }
  .stage-r4.stage-density-tight .stage-board-card.legs-only .stage-player,
  .stage-r4.stage-density-tight .stage-board-card.legs-only > footer { grid-template-columns: minmax(0, 1fr) 32px 64px; }
  .stage-r4.stage-density-tight .stage-player__name { grid-template-columns: minmax(0, 1fr); gap: .12rem; }
  .stage-r4.stage-density-tight .stage-player__name small { grid-column: 1; }
  .stage-r4.stage-density-tight .stage-player__name > .stage-player__average { justify-self: start; font-size: .64rem; }
  .stage-r4.stage-density-tight .stage-player > b { padding: .15rem; font-size: .95rem; }
  .stage-r4.stage-density-tight .stage-player > em { font-size: 1.65rem; }
  .stage-r4.stage-density-tight .stage-board-card > header span { font-size: .55rem; }
}

@media (max-width: 430px) {
  .stage-topbar__actions .secondary { display: none; }
  .stage-identity h1 { max-width: calc(100vw - 7.5rem); font-size: 1.25rem; }
  .stage-call { padding: .65rem; }
  .stage-call > small { font-size: .8rem; }
  .stage-player { grid-template-columns: minmax(0, 1fr) 31px 31px 70px; }
  .stage-board-card > footer { grid-template-columns: minmax(0, 1fr) 31px 31px 70px; }
  .stage-board-card.legs-only .stage-player { grid-template-columns: minmax(0, 1fr) 31px 70px; }
  .stage-board-card.legs-only > footer { grid-template-columns: minmax(0, 1fr) 31px 70px; }
  .stage-player__name { padding-left: .5rem; }
  .stage-player__name strong { font-size: .9rem; }
  .stage-player > b { font-size: 1rem; }
  .stage-player > em { font-size: 1.6rem; }
  .stage-queue__row { grid-template-columns: 26px minmax(0, 1fr); }
  .stage-queue__row small { grid-column: 2; }
  .dispatcher-layout { width: calc(100% - .65rem); }
  .dispatcher-commandbar, .dispatcher-readiness, .dispatcher-setup, .dispatcher-section { padding: .75rem; }
  .dispatcher-setup { grid-template-columns: 1fr; }
  .dispatcher-setup label, .dispatcher-setup small { grid-column: auto; }
  .dispatcher-board-grid { grid-template-columns: 1fr; }
  .dispatcher-player { grid-template-columns: minmax(0, 1fr) auto 56px; }
  .dispatcher-board > footer { justify-content: stretch; }
  .dispatcher-board > footer button { flex: 1; }
  .dispatcher-device { align-items: stretch; flex-direction: column; }
}

/* Final full-screen safeguard: no part of an active score card may be clipped. */
.stage-r4.is-stage-fullscreen .stage-workspace { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
.stage-r4.is-stage-fullscreen .stage-section--boards { grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.stage-r4.is-stage-fullscreen .stage-board-grid { height: 100%; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
.stage-r4.is-stage-fullscreen .stage-board-card { display: grid; grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr) auto auto; min-height: 0; }
.stage-r4.is-stage-fullscreen .stage-player { min-height: 0; }
.stage-r4.is-stage-fullscreen .stage-player > em { min-width: 0; font-size: clamp(1.7rem, 3vw, 3.4rem); }

@media print {
  .dispatcher-r4 body > * { display: none !important; }
  .dispatcher-r4 .local-banner, .dispatcher-r4 .dispatcher-header, .dispatcher-r4 .dispatcher-commandbar, .dispatcher-r4 .dispatcher-overview, .dispatcher-r4 .dispatcher-section:not(.dispatcher-devices), .dispatcher-r4 .dispatcher-devices > header, .dispatcher-r4 .dispatcher-device-grid > div:last-child, .dispatcher-r4 .dispatcher-device-instructions > *:not(.device-qr) { display: none !important; }
  .dispatcher-r4 .dispatcher-layout, .dispatcher-r4 .dispatcher-workspace, .dispatcher-r4 .dispatcher-devices, .dispatcher-r4 .dispatcher-device-grid, .dispatcher-r4 .dispatcher-device-instructions, .dispatcher-r4 .device-qr { display: block !important; border: 0; box-shadow: none; }
  .dispatcher-r4 .device-qr { width: 18cm; max-width: 90vw; }
}
