.draft-scouting-section {
  margin-top: 24px;
}

.draft-setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 11px;
  padding: 14px;
  border-color: rgba(243, 190, 70, .28);
  background: linear-gradient(135deg, rgba(243, 190, 70, .09), rgba(24, 201, 232, .04));
}

.draft-setup > div:first-child strong,
.draft-setup > div:first-child small {
  display: block;
}

.draft-setup > div:first-child strong {
  margin-top: 4px;
  color: #f5fbf8;
  font-size: 14px;
}

.draft-setup > div:first-child small {
  margin-top: 3px;
  max-width: 230px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.draft-setup > div:last-child {
  display: grid;
  gap: 7px;
}

.draft-order-button,
.draft-start-button {
  min-width: 116px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 1000;
  cursor: pointer;
}

.draft-order-button {
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05);
  color: #e7f1ed;
}

.draft-start-button {
  border: 1px solid rgba(117, 214, 90, .48);
  background: linear-gradient(135deg, #75d65a, #36b78e);
  color: #07120f;
}

.draft-setup button:disabled,
.pick-button:disabled,
.submit[data-draft-best-available]:disabled {
  border-color: rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .035);
  color: #60736a;
  cursor: not-allowed;
  opacity: .72;
}

.draft-waiting .draft-clock {
  border-color: #71877d;
  color: #9aaba3;
  box-shadow: none;
}

.draft-order-overlay {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 16px;
  background: rgba(2, 8, 6, .82);
  backdrop-filter: blur(8px);
}

.draft-order-dialog {
  width: min(100%, 430px);
  max-height: min(88vh, 720px);
  margin: 0 auto;
  padding: 17px;
  overflow: auto;
  border: 1px solid rgba(24, 201, 232, .26);
  border-radius: 22px 22px 14px 14px;
  background: #101d18;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .45);
}

.draft-order-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.draft-order-dialog h2 {
  margin-top: 4px;
  font-size: 22px;
}

.draft-order-dialog header > button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  color: var(--ink);
  font-size: 18px;
}

.draft-order-dialog > p {
  margin: 6px 0 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.draft-order-list {
  display: grid;
  gap: 6px;
}

.draft-order-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
}

.draft-order-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(24, 201, 232, .11);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 1000;
}

.draft-order-list strong,
.draft-order-list small {
  display: block;
}

.draft-order-list strong { font-size: 11px; }
.draft-order-list small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.draft-order-buttons {
  display: flex;
  gap: 5px;
}

.draft-order-buttons button {
  width: 29px;
  height: 29px;
  border: 1px solid rgba(24, 201, 232, .22);
  border-radius: 8px;
  background: rgba(24, 201, 232, .07);
  color: #d8fbff;
}

.draft-order-buttons button:disabled { opacity: .2; }

.draft-order-actions {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 7px;
  margin-top: 14px;
}

.draft-order-actions button {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
}

.draft-order-actions .submit {
  border-color: rgba(117, 214, 90, .4);
  background: #75d65a;
  color: #07120f;
}

.draft-scouting-section .section-head {
  align-items: end;
}

.draft-scouting-section h2 {
  max-width: 235px;
  font-size: 18px;
  line-height: 1.1;
}

.draft-eligible {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid rgba(24, 201, 232, .24);
  border-radius: 999px;
  background: rgba(24, 201, 232, .07);
  color: var(--cyan);
  font-size: 8px;
  font-weight: 1000;
  text-transform: uppercase;
}

.draft-ranking-note {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.draft-pool .scouting-player {
  grid-template-columns: 16px 46px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 4px;
  padding: 10px 9px;
}

.scouting-player .portrait {
  grid-column: 2;
  grid-row: 1;
  width: 46px;
  height: 54px;
}

.scouting-rank {
  grid-column: 1;
  grid-row: 1;
  color: #71877d;
  font-size: 9px;
  font-weight: 1000;
  text-align: center;
}

.scouting-player-copy {
  grid-column: 3;
  grid-row: 1 / span 2;
  min-width: 0;
  align-self: center;
}

.scouting-player-copy > strong,
.scouting-player-copy > small {
  display: block;
}

.scouting-player-copy > strong {
  font-size: 12px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.scouting-player-copy .player-name-link {
  white-space: normal;
  overflow-wrap: anywhere;
}

.scouting-player-copy > small {
  margin-top: 2px;
  color: #71877d;
  font-size: 7px;
}

.draft-scouting-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 50px;
  gap: 3px;
  margin-top: 4px;
}

.draft-scouting-stats > span {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  margin: 0;
  padding: 5px 2px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 6px;
  background: rgba(0, 0, 0, .15);
  text-align: center;
}

.draft-scouting-stats small,
.draft-scouting-stats strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-scouting-stats small {
  color: #b4c8be;
  font-size: 9px;
  font-size: clamp(8px, 20cqi, 9px);
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.draft-scouting-stats strong {
  margin-top: 3px;
  color: #eaf7f1;
  font-size: 14px;
}

.draft-scouting-stats > span:nth-child(2) strong {
  color: var(--green);
}

.draft-scouting-stats > span:nth-child(3) strong {
  color: var(--cyan);
}

.draft-scouting-stats > span:nth-child(4) strong {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  overflow: visible;
  text-overflow: clip;
}

.scouting-player .pick-button {
  grid-column: 1 / 3;
  grid-row: 2;
  width: 100%;
  min-height: 28px;
  padding: 5px 8px;
  font-size: 10px;
}

.draft-card-stats {
  grid-template-columns: repeat(4, 1fr);
}

.draft-card-stats strong {
  font-size: 14px;
}

.draft-card-stats span {
  font-size: 6px;
}

.draft-clock-warning {
  border-color: #ff6f75;
  color: #ff9da1;
  box-shadow: 0 0 18px rgba(255, 111, 117, .18);
  animation: draft-clock-pulse 1s ease-in-out infinite alternate;
}

.auto-pick-note {
  max-width: 250px;
  margin: 11px auto 0;
  color: #b5c8bf;
  font-size: 9px;
  line-height: 1.45;
}

@keyframes draft-clock-pulse {
  to {
    transform: scale(1.04);
    box-shadow: 0 0 28px rgba(255, 111, 117, .3);
  }
}

@media (max-width: 390px) {
  .draft-setup {
    grid-template-columns: 1fr;
  }

  .draft-setup > div:last-child {
    grid-template-columns: 1fr 1fr;
  }

  .draft-order-button,
  .draft-start-button {
    min-width: 0;
  }

  .draft-pool .scouting-player {
    grid-template-columns: 16px 46px minmax(0, 1fr);
  }

  .scouting-player .portrait {
    width: 46px;
    height: 54px;
  }

}

.submit[data-draft-best-available] {
  width: 50%;
  min-height: 44px;
  padding: 10px 4px;
  font-size: clamp(10px, 3vw, 12px);
  line-height: 1.2;
  white-space: nowrap;
}
