.profile-onboarding-open {
  overflow: hidden;
}

.profile-onboarding {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(17, 28, 31, 0.56);
  backdrop-filter: blur(8px);
}

.profile-onboarding-dialog {
  width: min(680px, 100%);
  max-height: min(92vh, 760px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(12, 24, 28, 0.28);
  padding: clamp(16px, 3vw, 26px);
  scrollbar-color: #8ea3a0 transparent;
  scrollbar-width: thin;
}

.profile-onboarding-dialog::-webkit-scrollbar {
  width: 8px;
}

.profile-onboarding-dialog::-webkit-scrollbar-track {
  background: transparent;
}

.profile-onboarding-dialog::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #8ea3a0;
}

.profile-onboarding-dialog h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.05;
}

.profile-onboarding-dialog form,
.profile-field {
  display: grid;
  gap: 8px;
}

.profile-field {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-field input,
.profile-field select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.profile-field small,
.profile-onboarding-status {
  min-height: 14px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.profile-field small:empty {
  min-height: 0;
}

.profile-fieldset {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-fieldset legend {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-choice-helper {
  margin: -3px 0 1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.profile-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-choice {
  position: relative;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #eef1ef;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.profile-choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.profile-choice span {
  position: relative;
  z-index: 1;
}

.profile-choice:hover {
  border-color: #b7cec5;
  background: #e6f0ec;
}

.profile-choice:has(input:checked) {
  border-color: #3f8975;
  background: #d9efe6;
  color: #1e604f;
  box-shadow: inset 0 0 0 1px rgba(63, 137, 117, 0.22);
}

.profile-choice:has(input:focus-visible) {
  outline: 3px solid rgba(63, 137, 117, 0.22);
  outline-offset: 2px;
}

.profile-choice:has(input:disabled:not(:checked)) {
  opacity: 0.48;
  cursor: not-allowed;
}

.profile-choice input:disabled {
  cursor: not-allowed;
}

.profile-onboarding-submit {
  min-height: 42px;
  margin-top: 4px;
  border: 1px solid #1d5f54;
  border-radius: 8px;
  background: #236b5e;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(35, 107, 94, 0.18);
}

@media (max-width: 640px) {
  .profile-onboarding {
    align-items: stretch;
    padding: 10px;
  }

  .profile-onboarding-dialog {
    max-height: calc(100vh - 20px);
  }

  .profile-choice {
    min-height: 34px;
  }
}
