/* Studio edition: calm broadcast chrome; court and ball remain the focal point. */
:root {
  --ink: #101e2d;
  --panel: #122536ee;
  --line: #d1e9fa22;
  --muted: #93aabb;
  --mint: #8fe1d3;
  --gold: #f1cc78;
  color: #f3f5f3;
  background: var(--ink);
}
header {
  padding: 24px 28px;
  background: linear-gradient(#101e2d88, transparent);
  align-items: flex-start;
  z-index: 6;
}
.wordmark {
  font-size: 29px;
  letter-spacing: -1.7px;
  color: #f7f6ec;
}
.wordmark span {
  color: var(--gold);
}
.wordmark small {
  font-size: 8px;
  letter-spacing: 3.1px;
  color: #9cafba;
  margin-top: 9px;
}
.header-actions {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
header button {
  background: #162b3beb;
  border-color: var(--line);
  font-size: 11px;
  padding: 11px 13px;
  border-radius: 7px;
  transition: background 0.15s;
}
header button:hover {
  background: #294456;
}
header button[aria-expanded='true'] {
  border-color: var(--mint);
  color: var(--mint);
}
.session {
  position: fixed;
  bottom: 21px;
  left: 28px;
  text-align: left;
  font-size: 11px;
  gap: 4px;
  color: #c4d2d8;
}
.version {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #839ba9;
}
.drills,
body[data-indoor='true'] .drills {
  top: 90px;
  left: 28px;
  width: 256px;
  max-height: calc(100dvh - 116px);
  padding: 17px;
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 18px 70px #030b1666;
  z-index: 7;
  backdrop-filter: blur(16px);
  border-radius: 10px;
  transition:
    opacity 0.16s,
    transform 0.16s,
    visibility 0.16s;
}
body:not([data-panel='open']) .drills {
  visibility: hidden;
  opacity: 0;
  transform: translateX(-14px);
  pointer-events: none;
}
.drills nav {
  max-height: calc(100dvh - 430px);
  min-height: 90px;
  scrollbar-color: #587080 transparent;
}
nav button {
  border-radius: 5px;
  font-size: 12px;
  padding: 9px 8px;
  gap: 10px;
}
nav button small {
  font-size: 10px;
  color: #8fa9b8;
}
nav button:hover {
  background: #ffffff08;
}
nav button.selected {
  background: #77d7c31a;
  border-color: #90decc38;
}
nav button.selected kbd {
  color: var(--mint);
  border-color: #90decc66;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #8faab9;
}
.primary {
  background: var(--gold);
  padding: 11px;
  border-radius: 5px;
  font-size: 12px;
}
.primary:hover {
  background: #ffe0a0;
}
select,
#serve-kind,
#serve-profile,
#indoor-role,
#enemy-style,
#our-server,
#set-tempo,
#attack-assist {
  background: #1b3345;
  border-color: #537080;
  color: #f2f5f4;
}
#watch-pause {
  background: #255c66;
  border-color: #5c999f;
}
#new-indoor,
#new-match {
  border-color: var(--line);
}
.repeat {
  font-size: 10px;
}
.repeat input {
  accent-color: var(--mint);
}
/* A compact scoreboard, not a second sidebar over the receiving team. */
#rally-hud,
body[data-indoor='true'] #rally-hud,
body[data-spectator='true'] #rally-hud {
  top: 20px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 300px;
  padding: 12px 18px 11px;
  border: 1px solid #9eafc22b;
  border-radius: 8px;
  background: linear-gradient(115deg, #173948f5, #202c3ef5);
  box-shadow: 0 7px 28px #030e1c28;
  z-index: 4;
}
#rally-hud:before {
  content: '';
  position: absolute;
  top: -1px;
  left: 28%;
  right: 28%;
  height: 2px;
  background: linear-gradient(90deg, #70dccc 50%, #ed947c 50%);
}
#rally-phase {
  display: block;
  text-align: center;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #b1c2d0;
}
.rally-scoreline {
  align-items: center;
  gap: 14px;
  margin-top: 5px;
  font-size: 10px;
  color: #bacad4;
}
.rally-scoreline b {
  font-size: 29px;
  font-weight: 750;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}
#rally-instruction {
  font-size: 10px;
  line-height: 1.4;
  color: #a4bac9;
  margin: 5px 0 0;
  padding-top: 6px;
  border-top: 1px solid #ffffff0e;
}
#rotation-hud {
  top: 100px;
  right: 28px;
  width: 185px;
  padding: 12px 14px;
  background: #122738cc;
  border-color: #d3e8f31a;
  border-radius: 7px;
}
#role-status {
  font-size: 11px;
  color: #b5e4da;
}
#rotation-caption {
  font-size: 9px;
  color: #96acb9;
}
#indoor-arc {
  display: block;
  font-size: 9px;
  line-height: 1.6;
  color: #b9cdd7;
  margin-top: 4px;
}
body[data-spectator='true'] #rotation-hud {
  top: auto;
  bottom: 22px;
  right: 28px;
  pointer-events: none;
  background: none;
  border: 0;
  padding: 0;
  text-align: right;
  width: 230px;
}
body[data-spectator='true'] #rotation-caption {
  display: none;
}
.court-role {
  background: #173d48b8;
  border: 0;
  border-left: 2px solid #78dbc8;
  font-size: 8px;
  letter-spacing: 0.2px;
  padding: 2px 4px;
  border-radius: 2px;
  opacity: 0.75;
  text-shadow: 0 1px 2px #0006;
}
.court-role.enemy {
  background: #713d39bb;
  border-left-color: #f2a38f;
}
.court-role.libero {
  border-left-color: #f4ce66;
  color: #fff0b3;
}
.court-role.engaged,
.court-role.mine {
  opacity: 1;
  background: #132a3de8;
  box-shadow: 0 2px 8px #00122555;
}
.telemetry {
  top: 104px;
  right: 28px;
  width: 190px;
  padding: 15px;
  background: #132a3bde;
  border-color: var(--line);
  border-radius: 8px;
}
.telemetry strong {
  font-size: 21px;
}
.aim-help {
  font-size: 10px;
  color: #a7beca;
}
#announcement {
  top: auto;
  bottom: 117px;
  max-width: min(560px, calc(100vw - 48px));
  padding: 8px 16px;
  font-size: 12px;
  background: #132738db;
  border-color: #b2d4e126;
  border-radius: 6px;
  box-shadow: none;
  z-index: 3;
}
body[data-spectator='true'] #announcement {
  bottom: 73px;
  font-size: 11px;
}
footer {
  padding: 14px 240px 17px;
  background: linear-gradient(transparent, #101e2d9e);
  font-size: 11px;
  pointer-events: none;
}
footer div {
  gap: 7px;
}
footer small {
  font-size: 10px;
  color: #8fa6b4;
}
body[data-spectator='true'] footer {
  padding: 18px 260px 23px;
}
body[data-spectator='true'] footer:before {
  content: 'АВТОМАТЧ · РЕАЛЬНОЕ ВРЕМЯ';
  font-size: 9px;
  letter-spacing: 2px;
  color: #9eb6c2;
}
#action-status {
  bottom: 83px;
  padding: 5px 12px;
  background: #122738ce;
  border-radius: 5px;
}
#help {
  background: #152b3ef7;
  border-color: #6b8e9b;
  box-shadow: 0 24px 120px #020b19aa;
}
footer div {
  text-shadow: 0 1px 3px #081925;
}
#error {
  z-index: 20;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
@media (max-width: 1050px) {
  header {
    padding: 20px;
  }
  .wordmark {
    font-size: 24px;
  }
  .wordmark small {
    font-size: 7px;
    letter-spacing: 2px;
  }
  .header-actions {
    gap: 5px;
  }
  header button {
    font-size: 10px;
    padding: 9px;
  }
  .session {
    display: none;
  }
  footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  #rally-hud,
  body[data-indoor='true'] #rally-hud,
  body[data-spectator='true'] #rally-hud {
    width: 255px;
  }
  .drills,
  body[data-indoor='true'] .drills {
    left: 20px;
  }
}
@media (max-width: 760px) {
  header {
    padding: 15px;
  }
  .wordmark {
    font-size: 22px;
  }
  .wordmark small {
    display: none;
  }
  .header-actions {
    gap: 5px;
  }
  #help-toggle {
    font-size: 0;
    padding: 7px;
  }
  #help-toggle kbd {
    font-size: 10px;
  }
  #rally-hud,
  body[data-indoor='true'] #rally-hud,
  body[data-spectator='true'] #rally-hud {
    top: 66px;
    width: 244px;
    padding: 9px 13px;
  }
  .rally-scoreline b {
    font-size: 24px;
  }
  #rally-instruction {
    max-height: 42px;
    overflow: hidden;
  }
  #rotation-hud {
    right: 12px;
    top: 185px;
    width: 145px;
    padding: 9px;
  }
  body[data-spectator='true'] #rotation-hud {
    right: 14px;
    bottom: 16px;
    width: 200px;
  }
  body[data-spectator='true'] footer {
    padding: 14px;
    text-align: left;
  }
  body[data-spectator='true'] footer:before {
    font-size: 8px;
    letter-spacing: 0.6px;
  }
  .telemetry {
    top: 180px;
    right: 12px;
    width: 150px;
    padding: 10px;
  }
  .aim-help {
    font-size: 9px;
  }
  .drills,
  body[data-indoor='true'] .drills {
    top: 63px;
    left: 12px;
    width: 250px;
    max-height: calc(100dvh - 78px);
  }
  #announcement {
    bottom: 125px;
    font-size: 10px;
  }
  #action-status {
    bottom: 94px;
  }
  .drills nav {
    max-height: calc(100dvh - 420px);
  }
}
@media (max-height: 650px) {
  .drills,
  body[data-indoor='true'] .drills {
    top: 66px;
    max-height: calc(100dvh - 78px);
  }
  .drills nav {
    max-height: 170px;
    min-height: 70px;
    flex: none;
  }
  .drills {
    overflow-y: auto;
  }
  #announcement {
    bottom: 112px;
  }
  body[data-spectator='true'] #announcement {
    bottom: 62px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .drills,
  header button {
    transition: none;
  }
}
.sound-options {
  border-top: 1px solid #a6cddd25;
  padding-top: 10px;
}
.sound-options label {
  display: flex;
  justify-content: space-between;
}
.sound-options input {
  width: 100%;
  accent-color: #78decd;
}
.sound-options small {
  display: block;
  font-size: 10px;
  color: #abc0ca;
  margin-top: 4px;
}
