.username-onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  /* A FIRST-RUN GATE, so it outranks decoration for the same reason the consent
     gate does. At 10000 the invite arrival ticket (10050) painted over it and
     swallowed the clicks on Save — an invited player could not choose a
     username. Kept just below the consent gate, which is answered first.
     Contract: tests/unit/styles/consentGateOutranksOverlays.test.js */
  z-index: 10190;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.username-onboarding-card {
  background: #14101f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.username-onboarding-card h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: #fff;
}

.username-onboarding-sub {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.4;
}

.username-onboarding-row {
  display: flex;
  gap: 8px;
}

.username-onboarding-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
}

.username-onboarding-input:focus {
  outline: none;
  border-color: #8b6fff;
}

.username-onboarding-shuffle {
  flex: 0 0 auto;
  width: 48px;
  font-size: 1.2rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: #fff;
}

.username-onboarding-shuffle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.username-onboarding-error {
  min-height: 18px;
  margin: 8px 0 0;
  color: #ff8080;
  font-size: 0.85rem;
}

.username-onboarding-save {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c5cff, #a06bff);
}

.username-onboarding-save:hover {
  filter: brightness(1.1);
}

.username-onboarding-save:disabled {
  opacity: 0.6;
  cursor: default;
}
