#start-overlay #best-scores-host {
  width: min(96vw, 580px);
}

#start-overlay #best-scores-host .best-scores {
  width: 100%;
}

#start-overlay .start-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
}

#start-overlay .start-screen-player-name {
  margin: 0 0 4px;
  font-size: clamp(2.75rem, 14vw, 4.25rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
}

#start-overlay .start-screen-player-name.is-hidden {
  display: none;
}

#start-overlay .start-play-mode-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

#start-overlay .start-play-normal {
  background: #4ade80;
  color: #0c0e14;
  border-color: rgba(74, 222, 128, 0.55);
}

#start-overlay .start-play-hardcore {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.55);
}

#start-overlay .start-play-hardcore:hover {
  background: rgba(248, 113, 113, 0.32);
}

#start-overlay .start-primary,
#start-overlay .start-secondary {
  min-width: 220px;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

#start-overlay .start-primary {
  background: #4ade80;
  color: #0c0e14;
}

#start-overlay .start-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  min-width: 220px;
}

#start-overlay #enter-name-btn {
  margin-top: 4px;
}

#start-overlay .start-reset {
  min-width: 220px;
  margin-top: 0;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  color: rgba(248, 113, 113, 0.95);
  border: 1px solid rgba(248, 113, 113, 0.45);
}

#start-overlay .start-reset:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#start-overlay .start-reset:first-of-type {
  margin-top: 8px;
}

.autoplay-panel {
  width: min(92vw, 320px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.autoplay-panel.is-hidden {
  display: none;
}

.autoplay-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.autoplay-field--inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.autoplay-field select,
.autoplay-field input[type="number"] {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
}

.autoplay-duration {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.autoplay-run-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.autoplay-run-row .start-primary {
  flex: 1;
  min-width: 0;
}

.autoplay-error {
  margin: 0;
  font-size: 12px;
  color: #f87171;
  text-align: center;
}

.autoplay-error.is-hidden {
  display: none;
}

.autoplay-completion {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
}

.autoplay-completion-inner {
  width: min(92vw, 420px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 10px;
  background: rgba(12, 14, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.autoplay-completion-title {
  margin: 0;
  font-size: 18px;
  text-align: center;
  color: #fff;
}

.autoplay-completion-level {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

.autoplay-completion-summary {
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}
