:root {
  font-family: Inter, 'Segoe UI', sans-serif;
  color: #eef8f4;
  background: #15353d;
  font-synthesis: none;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #f5d169;
  outline-offset: 3px;
}
#game {
  width: 100vw;
  height: 100vh;
  display: block;
  outline: none;
  cursor: crosshair;
}
header {
  position: fixed;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 30px;
  background: linear-gradient(#12323de0, transparent);
  pointer-events: none;
}
header button {
  pointer-events: auto;
  background: #123640c9;
  border: 1px solid #ffffff26;
  padding: 11px 15px;
  border-radius: 8px;
  font-size: 14px;
}
.wordmark {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1.8px;
  font-style: italic;
  line-height: 1;
}
.wordmark span {
  color: #f2ce68;
}
.wordmark small {
  display: block;
  font-size: 10px;
  letter-spacing: 2.1px;
  font-style: normal;
  font-weight: 600;
  margin-top: 10px;
}
.session {
  display: grid;
  gap: 7px;
  text-align: center;
  font-size: 15px;
}
.version {
  font-size: 10px;
  letter-spacing: 2px;
  color: #b5cdcc;
}
.drills {
  position: fixed;
  left: 28px;
  top: 130px;
  width: 222px;
  background: #12343ad9;
  border: 1px solid #ffffff18;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 14px 35px #071f2220;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: #adc8c6;
}
nav {
  display: grid;
  gap: 7px;
  margin: 14px -7px 16px;
}
nav button {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  background: transparent;
  padding: 12px 8px;
  border-radius: 7px;
  font-size: 15px;
  border: 1px solid transparent;
}
nav button small {
  display: block;
  font-size: 11px;
  color: #a7c0c0;
  margin-top: 5px;
}
nav button.selected {
  background: #30606588;
  border-color: #d5e8d01c;
}
nav button.selected kbd {
  color: #f2ce68;
  border-color: #f2ce6866;
}
.primary {
  background: #f2ce68;
  color: #173138;
  width: 100%;
  padding: 12px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.primary:hover {
  background: #ffe19c;
}
.repeat {
  display: flex;
  gap: 7px;
  margin-top: 14px;
  font-size: 12px;
  color: #bbd0ce;
  align-items: center;
}
.repeat input {
  accent-color: #f2ce68;
  width: 15px;
  height: 15px;
}
.telemetry {
  position: fixed;
  right: 28px;
  top: 130px;
  width: 206px;
  padding: 18px;
  background: #12343ad9;
  border: 1px solid #ffffff18;
  border-radius: 12px;
}
.telemetry strong {
  display: block;
  font-size: 23px;
  font-weight: 600;
  margin: 12px 0;
}
.bar {
  height: 3px;
  background: #ffffff22;
  border-radius: 4px;
  overflow: hidden;
}
.bar i {
  display: block;
  width: 0;
  height: 100%;
  background: #f2ce68;
  transition: width 0.15s;
}
.stats {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}
.stats span {
  font-size: 10px;
  color: #a5bfbd;
}
.stats b {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: white;
  margin-top: 5px;
}
kbd {
  display: inline-block;
  font:
    600 11px 'Segoe UI',
    sans-serif;
  border: 1px solid #a2c4c44d;
  border-radius: 4px;
  padding: 3px 5px;
  color: #e7f2ef;
  white-space: nowrap;
}
.primary kbd {
  color: #173138;
  border-color: #1731384d;
}
#announcement {
  position: fixed;
  bottom: 114px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 40px);
  text-align: center;
  background: #12343ae6;
  border: 1px solid #ffffff22;
  border-radius: 30px;
  padding: 12px 24px;
  font-size: 15px;
  pointer-events: none;
  box-shadow: 0 4px 18px #12332d22;
}
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  padding: 19px 12px 20px;
  text-align: center;
  background: linear-gradient(transparent, #15363de6);
  font-size: 12px;
  color: #c0d5d3;
}
footer div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
footer small {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  color: #a5c2be;
}
footer small kbd {
  font-size: 10px;
  padding: 1px 4px;
}
#help {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(550px, 92vw);
  max-height: 85vh;
  overflow: auto;
  padding: 36px;
  background: #163b43f7;
  border: 1px solid #659590;
  border-radius: 14px;
  box-shadow: 0 24px 150px #001e36b3;
}
#help h1 {
  font-size: 26px;
  line-height: 1.15;
}
#help p {
  font-size: 15px;
  line-height: 1.55;
  color: #c4d9d5;
}
#help b {
  color: #fff;
}
#help-close {
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 28px;
  background: none;
}
#error {
  position: fixed;
  inset: 30%;
  padding: 30px;
  background: #442a28;
  font-size: 18px;
}
body.dragging #game {
  cursor: grabbing;
}
@media (max-width: 950px) {
  .drills {
    width: 184px;
    left: 14px;
    padding: 12px;
  }
  .telemetry {
    right: 14px;
    width: 170px;
    padding: 12px;
  }
  .wordmark {
    font-size: 24px;
  }
  header {
    padding: 18px;
  }
  .session {
    display: none;
  }
  nav button small {
    font-size: 10px;
  }
  #announcement {
    font-size: 13px;
    bottom: 103px;
  }
  footer div {
    gap: 5px;
    font-size: 10px;
  }
}
@media (max-width: 650px) {
  .drills {
    top: 91px;
    width: 156px;
  }
  .telemetry {
    top: 91px;
    width: 133px;
  }
  .telemetry strong {
    font-size: 17px;
  }
  .stats {
    flex-wrap: wrap;
    gap: 10px;
  }
  .repeat {
    font-size: 10px;
  }
  nav button {
    font-size: 13px;
  }
  .wordmark small {
    font-size: 8px;
  }
  footer div {
    flex-wrap: wrap;
  }
  footer small {
    font-size: 10px;
  }
}
#announcement {
  top: 88px;
  bottom: auto;
}
#timing-meter[data-anchor='cursor'] {
  bottom: auto;
  right: auto;
  width: 116px;
  z-index: 5;
}
#timing-meter[data-anchor='cursor'] .timing-dial {
  width: 84px;
  height: 84px;
}
#timing-meter[data-anchor='cursor'] .timing-center {
  inset: 20px 5px 17px;
  gap: 3px;
}
#timing-meter[data-anchor='cursor'] .timing-center b {
  font-size: 15px;
}
#timing-meter[data-anchor='cursor'] .timing-center span {
  font-size: 8px;
  letter-spacing: 0;
}
#timing-meter[data-anchor='cursor'] small {
  font-size: 9px;
  margin-top: 5px;
}
.aim-help {
  font-size: 11px;
  line-height: 1.5;
  color: #b8d0cc;
  margin-top: 17px;
}
#timing-meter {
  --green-start: 200deg;
  --green-end: 243deg;
  --angle: -135deg;
  position: fixed;
  left: calc(50% + 125px);
  bottom: 132px;
  width: 152px;
  text-align: center;
  pointer-events: none;
  color: #f4cf68;
}
.timing-dial {
  position: relative;
  width: 108px;
  height: 108px;
  margin: auto;
  background: #13373ded;
  border-radius: 50%;
  box-shadow: 0 5px 22px #05262b35;
}
.timing-sectors {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: conic-gradient(
    from 225deg,
    #efc55a 0deg var(--green-start),
    #72e4a3 var(--green-start) var(--green-end),
    #f27869 var(--green-end) 300deg,
    transparent 300deg
  );
  mask: radial-gradient(transparent 55%, black 58%);
  -webkit-mask: radial-gradient(transparent 55%, black 58%);
}
.timing-marker {
  position: absolute;
  inset: 4px;
  transform: rotate(var(--angle));
}
.timing-marker:after {
  content: '';
  position: absolute;
  left: calc(50% - 5px);
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  box-shadow:
    0 0 0 3px #113039,
    0 0 9px #ffffff80;
}
.timing-center {
  position: absolute;
  inset: 28px 7px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.timing-center b {
  font-size: 19px;
}
.timing-center span {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.4px;
}
#timing-meter small {
  display: block;
  margin-top: 8px;
  padding: 5px 6px;
  background: #143940de;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1.4;
  color: #d0dfd9;
}
#timing-meter[data-zone='green'] {
  color: #96f3b9;
}
#timing-meter[data-zone='green'] .timing-dial {
  box-shadow:
    0 0 0 2px #72e4a377,
    0 0 22px #72e4a330;
}
#timing-meter[data-zone='red'] {
  color: #ff9b8d;
}
#timing-meter[data-zone='red'] .timing-dial {
  box-shadow: 0 0 0 2px #f2786977;
}
#timing-meter[data-zone='idle'] {
  color: #d0dfd9;
}
@media (max-width: 650px) {
  #timing-meter {
    left: auto;
    right: 12px;
    bottom: 145px;
    width: 125px;
  }
  .timing-dial {
    width: 96px;
    height: 96px;
  }
  .timing-center {
    inset: 23px 7px 17px;
  }
}
@media (max-width: 650px) {
  #announcement {
    top: auto;
    bottom: 104px;
  }
  .eyebrow {
    letter-spacing: 0.6px;
  }
}
#rally-hud {
  position: fixed;
  right: 28px;
  top: 407px;
  width: 206px;
  padding: 16px 18px;
  background: #263750eb;
  border: 1px solid #b99bee55;
  border-radius: 12px;
  pointer-events: none;
}
#rally-phase {
  color: #d1baf9;
  letter-spacing: 0.9px;
}
.rally-scoreline {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font-size: 10px;
  color: #c8d1e0;
}
.rally-scoreline b {
  font-size: 15px;
  color: white;
  white-space: nowrap;
}
#rally-instruction {
  font-size: 12px;
  line-height: 1.5;
  color: #dfdff1;
  margin: 12px 0 0;
}
#setter-label {
  position: fixed;
  transform: translate(-50%, -100%);
  background: #584680dc;
  border: 1px solid #cdb3fc88;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 10px;
  letter-spacing: 0.5px;
  pointer-events: none;
}
#help {
  z-index: 10;
}
[hidden] {
  display: none !important;
}
@media (max-width: 950px) {
  #rally-hud {
    right: 14px;
    width: 170px;
    top: 408px;
    padding: 12px;
  }
}
@media (max-width: 650px) {
  #rally-hud {
    width: 133px;
    top: 402px;
  }
  #rally-instruction {
    font-size: 10px;
  }
  .rally-scoreline {
    flex-wrap: wrap;
  }
}
#pass-control {
  margin-top: 13px;
  border-top: 1px solid #ffffff20;
  padding-top: 12px;
}
.pass-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 8px;
  color: #adc8c6;
}
.pass-heading b {
  font-size: 10px;
  color: #ffe28a;
  white-space: nowrap;
}
.pass-track {
  height: 4px;
  background: #ffffff20;
  margin: 9px 0;
  border-radius: 4px;
  overflow: hidden;
}
.pass-track i {
  display: block;
  height: 100%;
  width: 65%;
  background: #ffe28a;
}
#pass-hint {
  display: block;
  font-size: 10px;
  color: #d0dfd9;
}
#pass-control[data-disabled='true'] {
  opacity: 0.5;
}
#rally-hud {
  top: 485px;
}
@media (max-width: 950px) {
  #rally-hud {
    top: 490px;
  }
  .pass-heading {
    flex-wrap: wrap;
  }
}
@media (max-height: 760px) and (min-width: 951px) {
  .telemetry {
    top: 130px;
    padding: 14px 18px;
  }
  .aim-help {
    margin-top: 12px;
  }
  #rally-hud {
    top: 472px;
    padding: 12px 18px;
  }
  #rally-instruction {
    margin-top: 8px;
  }
  .rally-scoreline {
    margin-top: 8px;
  }
}
nav {
  gap: 5px;
  margin: 12px -7px;
}
nav button {
  padding: 8px;
  font-size: 14px;
}
nav button small {
  margin-top: 3px;
  font-size: 10px;
}
#mouse-actions {
  font-weight: 700;
  color: #ffe28a !important;
}
#timing-meter[data-block='true'] .timing-sectors,
#timing-meter[data-block='true'] .timing-marker {
  display: none;
}
#timing-meter[data-block='true'] .timing-dial {
  box-shadow: inset 0 0 0 3px #a8c9ef;
}
#timing-meter[data-block='true'] {
  color: #c1dcff;
}
#timing-meter[data-block='true'] .timing-center b {
  font-size: 12px;
}
#timing-meter[data-anchor='cursor'] {
  width: 116px;
}
#timing-meter[data-anchor='cursor'] small {
  font-size: 9px;
}
#serve-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 10px;
  color: #c5d8d5;
  font-size: 11px;
}
#serve-profile {
  min-width: 119px;
  max-width: 135px;
  background: #28525a;
  color: #fff;
  border: 1px solid #749391;
  border-radius: 5px;
  padding: 6px;
  font: inherit;
}
#serve-profile:focus-visible {
  outline: 2px solid #ffe28a;
}
#serve-kind-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 11px;
  color: #c5d8d5;
}
#serve-kind {
  width: 100%;
  background: #28525a;
  color: white;
  border: 1px solid #749391;
  border-radius: 5px;
  padding: 7px;
  font: inherit;
}
.drills nav {
  max-height: calc(100vh - 385px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #72928c transparent;
}
.drills {
  max-height: calc(100vh - 225px);
  overflow-y: auto;
}
#serve-kind:focus-visible {
  outline: 2px solid #ffe28a;
}
.drills {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drills > :not(nav) {
  flex-shrink: 0;
}
.drills nav {
  min-height: 100px;
  flex: 1 1 auto;
  max-height: calc(100vh - 385px);
}
#match-options {
  margin-bottom: 10px;
}
#match-options label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: #c5d8d5;
}
#enemy-style {
  padding: 6px;
  background: #28525a;
  color: white;
  border: 1px solid #749391;
  border-radius: 5px;
  font: inherit;
}
#new-match {
  width: 100%;
  margin-top: 7px;
  padding: 7px;
  background: #ffffff12;
  border: 1px solid #ffffff20;
  border-radius: 5px;
  font-size: 10px;
}
.drills nav {
  min-height: 85px;
}
#our-server {
  padding: 6px;
  background: #28525a;
  color: white;
  border: 1px solid #749391;
  border-radius: 5px;
  font: inherit;
}
#match-options label + label {
  margin-top: 7px;
}
#target-meaning {
  color: #c8b1ff !important;
}
#indoor-options label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: #c5d8d5;
}
#indoor-role {
  padding: 7px;
  background: #28525a;
  color: white;
  border: 1px solid #749391;
  border-radius: 5px;
  font: inherit;
}
#role-description {
  display: block;
  font-size: 10px;
  line-height: 1.4;
  color: #cfe3df;
  margin: 7px 0;
}
#new-indoor {
  width: 100%;
  padding: 7px;
  background: #ffffff12;
  border: 1px solid #ffffff20;
  border-radius: 5px;
  font-size: 10px;
  margin-bottom: 8px;
}
#rotation-hud {
  position: fixed;
  right: 28px;
  top: 130px;
  width: 206px;
  padding: 14px 18px;
  background: #173c43ed;
  border: 1px solid #b1cdd144;
  border-radius: 12px;
  pointer-events: none;
}
#role-status {
  font-size: 12px;
  color: #c8f7ec;
}
.rotation-net {
  text-align: center;
  font-size: 8px;
  letter-spacing: 3px;
  border-bottom: 2px solid #fff9;
  padding: 9px 0 4px;
  margin-bottom: 6px;
}
#rotation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
#rotation-grid span {
  background: #ffffff10;
  border: 1px solid #ffffff22;
  border-radius: 5px;
  padding: 6px 2px;
  font-size: 10px;
  text-align: center;
}
#rotation-grid .human {
  background: #087d8d;
  border-color: #92ffee;
}
#rotation-grid .libero {
  color: #ffdb6e;
}
#rotation-caption {
  display: block;
  margin-top: 7px;
  font-size: 10px;
  color: #c4d9d6;
  line-height: 1.4;
}
.court-role {
  position: fixed;
  transform: translate(-50%, -100%);
  pointer-events: none;
  background: #103d46d9;
  color: #eafaf4;
  border: 1px solid #c9eeec55;
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 9px;
}
.court-role.enemy {
  background: #773b33d9;
}
.court-role.libero {
  color: #ffdf78;
}
.court-role.mine {
  border-color: #81ffef;
  font-weight: bold;
}
body[data-indoor='true'] .telemetry {
  display: none;
}
body[data-indoor='true'] #rally-hud {
  top: 385px;
}
@media (max-height: 760px) {
  body[data-indoor='true'] .drills {
    max-height: calc(100vh - 195px);
  }
  body[data-indoor='true'] #rally-hud {
    top: 380px;
  }
  #role-description {
    font-size: 9px;
  }
}
@media (max-width: 950px) {
  #rotation-hud {
    right: 14px;
    width: 170px;
    padding: 12px;
  }
}
#indoor-options label + label {
  margin-top: 7px;
}
#set-tempo,
#attack-assist {
  padding: 6px;
  background: #28525a;
  color: white;
  border: 1px solid #749391;
  border-radius: 5px;
  font: inherit;
}
#indoor-options #new-indoor {
  margin-top: 8px;
}
body[data-indoor='true'] .drills nav {
  min-height: 70px;
}
#set-tempo:focus-visible,
#attack-assist:focus-visible {
  outline: 2px solid #ffe28a;
}
/* Timing stays around the cursor, never over its target. Text lives in the HUD. */
#timing-meter,
#timing-meter[data-anchor='cursor'] {
  width: 46px;
  height: 46px;
}
#timing-meter .timing-dial,
#timing-meter[data-anchor='cursor'] .timing-dial {
  width: 46px;
  height: 46px;
  background: transparent;
  box-shadow: none;
}
#timing-meter .timing-sectors {
  inset: 1px;
  mask: radial-gradient(transparent 59%, black 63%);
  -webkit-mask: radial-gradient(transparent 59%, black 63%);
  filter: drop-shadow(0 1px 1px #10292e);
}
#timing-meter .timing-marker {
  inset: 0;
}
#timing-meter .timing-marker:after {
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 1.5px #113039;
}
#timing-meter .timing-center,
#timing-meter small {
  display: none;
}
#timing-meter[data-zone='idle'] {
  opacity: 0.6;
}
#timing-meter[data-zone='green'] .timing-dial {
  box-shadow: 0 0 0 1px #72e4a3;
}
#timing-meter[data-zone='red'] .timing-dial {
  box-shadow: 0 0 0 1px #f27869;
}
#timing-meter[data-buffered='true'] .timing-marker:after {
  background: #96f3b9;
}
#action-status {
  position: fixed;
  bottom: 91px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 340px;
  text-align: center;
  pointer-events: none;
  font-size: 11px;
  color: #e8f6f3;
  text-shadow: 0 1px 3px #10292e;
}
#action-status small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
#action-status[data-zone='green'] #mouse-actions {
  color: #96f3b9 !important;
}
#action-status[data-zone='red'] #mouse-actions {
  color: #ff9b8d !important;
}
#bot-level {
  width: 100%;
  accent-color: #81e3d0;
  margin: 3px 0;
}
#bot-level-value {
  font-weight: 700;
  color: #ffe28a;
}
#bot-level-help {
  display: block;
  color: #cfe3df;
  font-size: 9px;
  line-height: 1.3;
  margin: 4px 0 6px;
}
#watch-pause {
  width: 100%;
  padding: 7px;
  background: #226d73;
  color: white;
  border: 1px solid #84c6c1;
  border-radius: 5px;
  font: inherit;
  font-size: 11px;
}
body[data-spectator='true'] #indoor-options > label:first-child,
body[data-spectator='true'] #role-description,
body[data-spectator='true'] #indoor-options > label:has(#attack-assist) {
  display: none;
}
body[data-spectator='true'] #timing-meter,
body[data-spectator='true'] #action-status,
body[data-spectator='true'] footer > *,
body[data-spectator='true'] #rotation-grid,
body[data-spectator='true'] .rotation-net {
  display: none;
}
body[data-spectator='true'] footer:before {
  content: 'НАБЛЮДЕНИЕ · Все 12 игроков управляются ботами · Пауза и уровень — слева';
  font-size: 12px;
}
body[data-spectator='true'] #rally-hud {
  top: 280px;
}
body[data-indoor='true'] .drills {
  overflow-y: auto;
}

/* The front door. It sits over the live scene rather than over a flat colour,
   so the first thing anyone sees is the arena itself, slowly swinging past. */
#front-door {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 50% 18%, rgba(8, 28, 35, 0.1), rgba(6, 20, 26, 0.86) 72%),
    linear-gradient(to top, rgba(5, 17, 22, 0.94), rgba(5, 17, 22, 0) 46%);
  opacity: 1;
  transition:
    opacity 0.45s ease,
    visibility 0.45s;
}
#front-door[data-open='false'] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.door-plate {
  width: min(680px, 100%);
  text-align: center;
}
.door-mark {
  font-size: clamp(54px, 11vw, 112px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.035em;
  line-height: 0.92;
  color: #eafaf6;
  text-shadow: 0 10px 44px rgba(0, 0, 0, 0.55);
}
.door-mark span {
  color: #5fe0cf;
}
.door-sub {
  margin: 10px 0 30px;
  font-size: 13px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #8fb6bd;
}
.door-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.door-actions button {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  text-align: left;
  border-radius: 14px;
  background: rgba(16, 48, 57, 0.82);
  border: 1px solid rgba(123, 206, 203, 0.22);
  backdrop-filter: blur(6px);
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease;
}
.door-actions button:hover {
  transform: translateY(-2px);
  background: rgba(23, 68, 80, 0.92);
  border-color: rgba(123, 206, 203, 0.5);
}
.door-actions button strong {
  font-size: 17px;
  font-weight: 700;
}
.door-actions button small {
  font-size: 12px;
  color: #93bcc2;
}
.door-actions .door-primary {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #0e7f8d, #0b5f73);
  border-color: rgba(159, 238, 227, 0.45);
}
.door-actions .door-primary:hover {
  background: linear-gradient(135deg, #1297a6, #0d7187);
}
.door-actions .door-primary strong {
  font-size: 21px;
}
.door-actions .door-primary small {
  color: #cdf3ee;
}
.door-keys {
  margin: 26px 0 0;
  font-size: 12px;
  color: #7ea4ab;
  line-height: 1.9;
}
.door-keys kbd {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 2px 6px;
  font: inherit;
}
/* Everything the running game draws over the court steps aside for the door.
   There is no single HUD element to hide; the interface is these pieces. */
body[data-door='open'] header,
body[data-door='open'] .drills,
body[data-door='open'] .telemetry,
body[data-door='open'] #rally-hud,
body[data-door='open'] #rotation-hud,
body[data-door='open'] #indoor-labels,
body[data-door='open'] #setter-label,
body[data-door='open'] #action-status,
body[data-door='open'] #announcement,
body[data-door='open'] footer {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Team setup. Two identical columns so the two squads read as a comparison,
   with what you actually got printed under the dials you asked for. */
#party {
  position: fixed;
  inset: 0;
  z-index: 45;
  overflow: auto;
  display: grid;
  place-items: start center;
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, rgba(5, 17, 22, 0.97), rgba(5, 17, 22, 0.99));
}
#party[hidden] {
  display: none !important;
}
.party-plate {
  width: min(840px, 100%);
}
.party-plate h2 {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 900;
  font-style: italic;
  margin: 0 0 6px;
  color: #eafaf6;
}
.party-lede {
  margin: 0 0 22px;
  color: #93bcc2;
  font-size: 13px;
  line-height: 1.6;
  max-width: 64ch;
}
.party-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}
.party-team {
  background: rgba(16, 48, 57, 0.8);
  border: 1px solid rgba(123, 206, 203, 0.22);
  border-radius: 14px;
  padding: 16px 18px;
  min-width: 0;
}
.party-team h3 {
  margin: 0 0 10px;
  font-size: 17px;
}
.party-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.party-presets button {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(123, 206, 203, 0.3);
  background: transparent;
  color: #cdf3ee;
  cursor: pointer;
}
.party-presets button:hover,
.party-presets button[aria-pressed='true'] {
  background: rgba(14, 127, 141, 0.55);
  border-color: rgba(159, 238, 227, 0.6);
}
.party-dials label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93bcc2;
}
.party-dials input[type='range'] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #5fe0cf;
}
.party-dials b {
  font-variant-numeric: tabular-nums;
  color: #eafaf6;
  font-size: 14px;
}
.party-out {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #7fd4cf;
  font-variant-numeric: tabular-nums;
}
/* Your own player, on the same screen as the two squads. The sixteen sliders
   stay folded away until asked for: a match screen should open on a choice,
   not on a spreadsheet. */
.party-me {
  display: block;
  margin: 14px 0 0;
  background: rgba(16, 48, 57, 0.8);
  border: 1px solid rgba(123, 206, 203, 0.22);
  border-radius: 14px;
  padding: 16px 18px;
}
.party-me h3 {
  margin: 0;
  font-size: 17px;
}
.me-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
#me-advanced {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(123, 206, 203, 0.3);
  background: transparent;
  color: #cdf3ee;
  cursor: pointer;
}
#me-advanced:hover,
#me-advanced[aria-expanded='true'] {
  background: rgba(14, 127, 141, 0.55);
  border-color: rgba(159, 238, 227, 0.6);
}
.me-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 14px;
  margin-bottom: 14px;
}
.me-top label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93bcc2;
  min-width: 0;
}
.me-top input,
.me-top select {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(123, 206, 203, 0.3);
  background: rgba(7, 26, 33, 0.85);
  color: #eafaf6;
  font: inherit;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}
.me-sliders[hidden] {
  display: none !important;
}
.me-sliders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 4px 20px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(123, 206, 203, 0.18);
}
.me-group {
  min-width: 0;
}
.me-group > .eyebrow {
  display: block;
  margin: 2px 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #6fb3b9;
}
.me-sliders label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  margin-bottom: 9px;
  font-size: 12px;
  color: #93bcc2;
}
.me-sliders label span {
  min-width: 0;
}
.me-sliders input[type='range'] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #5fe0cf;
}
.me-sliders b {
  font-variant-numeric: tabular-nums;
  color: #eafaf6;
  font-size: 13px;
}
.me-note {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: #93bcc2;
}
.me-note a {
  color: #8df0cf;
}
.party-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.party-actions button {
  padding: 14px 22px;
  border-radius: 12px;
}
.door-actions .door-secondary {
  background: rgba(16, 48, 57, 0.9);
  border-color: rgba(123, 206, 203, 0.35);
}
.door-actions .door-secondary:hover {
  background: rgba(23, 68, 80, 0.95);
}

/* The score sheet. Who actually earned the points, in the same shirt numbers
   that are on the court. Pauses the match while it is up, because reading a
   table while a serve is coming is not reading. */
#scoresheet {
  position: fixed;
  inset: 0;
  z-index: 46;
  overflow: auto;
  display: grid;
  place-items: start center;
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, rgba(5, 17, 22, 0.94), rgba(5, 17, 22, 0.98));
}
#scoresheet[hidden] {
  display: none !important;
}
.sheet-plate {
  width: min(900px, 100%);
}
.sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sheet-head h2 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 900;
  font-style: italic;
  margin: 0;
  color: #eafaf6;
}
.sheet-scope button {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(123, 206, 203, 0.3);
  background: transparent;
  color: #cdf3ee;
  cursor: pointer;
}
.sheet-scope button + button {
  margin-left: 6px;
}
.sheet-scope button[aria-pressed='true'],
.sheet-scope button:hover {
  background: rgba(14, 127, 141, 0.55);
  border-color: rgba(159, 238, 227, 0.6);
}
#sheet-score {
  margin: 8px 0 18px;
  color: #93bcc2;
  font-size: 13px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.sheet-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.sheet-team {
  background: rgba(16, 48, 57, 0.8);
  border: 1px solid rgba(123, 206, 203, 0.22);
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 0;
  overflow-x: auto;
}
.sheet-team h3 {
  margin: 0 0 10px;
  font-size: 16px;
}
.sheet-team table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.sheet-team th {
  text-align: right;
  font-weight: 600;
  color: #6fb3b9;
  padding: 0 0 6px 8px;
  white-space: nowrap;
}
.sheet-team th:first-child,
.sheet-team td:first-child,
.sheet-team th:nth-child(2),
.sheet-team td:nth-child(2) {
  text-align: left;
  padding-left: 0;
}
.sheet-team td {
  text-align: right;
  padding: 4px 0 4px 8px;
  color: #cdf3ee;
  border-top: 1px solid rgba(123, 206, 203, 0.12);
}
.sheet-team td:nth-child(3) {
  color: #eafaf6;
  font-weight: 700;
}
.sheet-team .sheet-shirt {
  color: #f9d25c;
  font-weight: 700;
}
.sheet-team .sheet-empty {
  margin: 0;
  color: #6fb3b9;
  font-size: 12.5px;
}
.sheet-hint {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: #93bcc2;
}

/* The replay badge. Says what it is and where it is looking from, because a
   camera that cuts without saying so reads as a glitch. */
#replay-badge {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 44;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(5, 17, 22, 0.82);
  border: 1px solid rgba(249, 210, 92, 0.45);
  color: #f3fbf8;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}
#replay-badge[hidden] {
  display: none !important;
}
#replay-badge b {
  color: #f9d25c;
  font-weight: 800;
}
#replay-badge .replay-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e2574c;
  animation: replay-pulse 1.1s ease-in-out infinite;
}
@keyframes replay-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}
#replay-bar {
  width: 96px;
  height: 3px;
  border-radius: 2px;
  background: rgba(159, 238, 227, 0.25);
  overflow: hidden;
}
#replay-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: #5fe0cf;
}
body[data-door='open'] #replay-badge {
  display: none !important;
}
#replay-badge small {
  color: #93bcc2;
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 11px;
}

/* ---- the room ------------------------------------------------------- */
/* Fourteen seats with a bot in every one nobody has taken. That is the
   normal state of a volleyball room, not a half-empty one, so the screen
   draws the bots rather than fourteen blanks waiting to be filled. */
#lobby {
  position: fixed;
  inset: 0;
  z-index: 46;
  overflow: auto;
  display: grid;
  place-items: start center;
  align-content: start;
  gap: 12px;
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, rgba(5, 17, 22, 0.97), rgba(5, 17, 22, 0.99));
}
#lobby[hidden] {
  display: none !important;
}
#lobby h2 {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 900;
  font-style: italic;
  margin: 0;
  color: #eafaf6;
}
#lobby .lobby-hint {
  margin: 0;
  max-width: 54ch;
  color: #93bcc2;
  font-size: 13px;
  line-height: 1.6;
}
.lobby-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(560px, 100%);
}
#lobby input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(123, 206, 203, 0.3);
  background: rgba(10, 32, 39, 0.9);
  color: #eafaf6;
  font: inherit;
}
#lobby-code {
  flex: 0 0 110px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
}
#lobby button {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(123, 206, 203, 0.35);
  background: rgba(16, 48, 57, 0.9);
  color: #eafaf6;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#lobby button:hover:not(:disabled) {
  border-color: rgba(123, 206, 203, 0.7);
}
#lobby button:disabled {
  opacity: 0.55;
  cursor: default;
}
#lobby-start {
  background: #1d6f6a;
  border-color: #2fa39a;
}
#lobby-teams {
  color: #93bcc2;
  font-size: 13px;
}
#lobby-teams select {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(123, 206, 203, 0.3);
  background: rgba(10, 32, 39, 0.9);
  color: #eafaf6;
  font: inherit;
}
#lobby-code-banner {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #7bcecb;
}
#lobby-status {
  margin: 0;
  min-height: 1.2em;
  color: #c9e6e2;
  font-size: 13px;
}
#lobby-seats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  width: min(640px, 100%);
}
.lobby-side h3 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6fa3a8;
}
.lobby-seat {
  display: grid;
  grid-template-columns: 2.2em 5.5em 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 6px;
  text-align: left;
  font-weight: 600 !important;
}
.lobby-seat b {
  font-size: 17px;
  font-weight: 900;
  font-style: italic;
  color: #7bcecb;
}
.lobby-seat .lobby-role {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6fa3a8;
}
.lobby-seat .lobby-who {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lobby-seat[data-taken='false'] .lobby-who {
  color: #6fa3a8;
  font-style: italic;
}
.lobby-seat[data-mine='true'] {
  border-color: #2fa39a;
  background: rgba(29, 111, 106, 0.55);
}

/* The match is still being played; this browser has stopped hearing about
   it. Said over the court rather than by throwing the lobby back up,
   because the seat is still theirs and in a second or two they are back. */
#net-dropped {
  position: fixed;
  left: 50%;
  top: calc(16px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 44;
  max-width: calc(100vw - 32px);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(214, 140, 90, 0.5);
  background: rgba(58, 26, 12, 0.92);
  color: #ffd9bb;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#net-dropped[hidden] {
  display: none !important;
}
