.queue-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.queue-summary strong {
  color: #0d2e57;
  font-size: 36px;
}

.queue-summary span {
  font-weight: 800;
}

.queue-summary small {
  margin-left: auto;
  color: #667085;
}

.queue-progress {
  width: 100%;
  display: grid;
  gap: 7px;
  margin-top: 6px;
}

.queue-progress[hidden] {
  display: none;
}

.queue-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8f7;
}

.queue-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1769e0, #27b47e);
  transition: width .35s ease;
}

.queue-progress small {
  width: 100%;
  margin: 0;
  color: #47617f;
}

.requeue-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border-color: #88c6a7;
  background: linear-gradient(135deg, #ffffff, #edfff7);
}

.requeue-prompt[hidden] {
  display: none;
}

.requeue-prompt h2,
.requeue-prompt p {
  margin: 4px 0;
}

.request-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 9999;
  height: 4px;
  overflow: hidden;
  background: #dce8f7;
}

.request-progress[hidden] {
  display: none;
}

.request-progress span {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, #1769e0, #27b47e);
  animation: request-progress-slide 1.05s ease-in-out infinite;
}

@keyframes request-progress-slide {
  from { transform: translateX(-110%); }
  to { transform: translateX(350%); }
}

.queue-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1769e0;
  color: white;
  font-weight: 800;
}

.match-create-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.match-create-controls label {
  margin: 0;
  min-width: 105px;
}

.session-rule {
  padding: 9px 12px;
  border-radius: 999px;
  color: #0d2e57;
  background: #deecff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.queue-mode-chooser {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.queue-mode-chooser button {
  background: white;
  color: #1769e0;
  border: 1px solid #bdd5f8;
}

.queue-mode-chooser button.active {
  background: #1769e0;
  color: white;
}

.selection-bar {
  position: sticky;
  top: 82px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 15px;
  border-radius: 12px;
  background: #0d2e57;
  color: white;
  box-shadow: 0 8px 20px #0d2e5730;
}

.selection-bar[hidden] {
  display: none !important;
}

.selectable-player.selected {
  outline: 2px solid #1769e0;
  background: #eef5ff;
}

.selectable-player.disabled {
  opacity: .58;
}

.match-create-controls select {
  margin-top: 5px;
}

.courts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.court-card {
  position: relative;
  min-height: 170px;
}

.empty-match-card {
  color: #667085;
  text-align: center;
}

.court-card.available {
  background: linear-gradient(135deg, #fff, #edfff7);
}

.court-card.occupied {
  border-color: #9fc4fa;
}

.court-card.pending {
  border-style: dashed;
  background: #fffaf0;
}

.court-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.match-live-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef5ff;
  color: #0d2e57;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.match-timer b {
  min-width: 38px;
  letter-spacing: .04em;
}

.court-label {
  color: #0d2e57;
  font-size: 24px;
  font-weight: 900;
}

.action.pending {
  color: #8b5a00;
  background: #fff0c7;
}

.court-state {
  display: inline-block;
  color: #087848;
  background: #dff7eb;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.match-team {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.match-team strong {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #1769e0;
  background: #deecff;
}

.score-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.score-entry input {
  width: 72px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .courts-grid {
    grid-template-columns: 1fr;
  }

  .queue-summary {
    flex-wrap: wrap;
  }

  .queue-summary small {
    width: 100%;
    margin-left: 0;
  }

  .match-create-controls {
    width: 100%;
  }

  .queue-mode-chooser {
    grid-template-columns: 1fr;
  }

  .requeue-prompt {
    align-items: stretch;
    flex-direction: column;
  }
}
