.profile-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: clamp(20px, 4vw, 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.profile-dialog [hidden], .profile-edit[hidden] { display: none !important; }
.profile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.profile-top h2 { margin: 0; }
.profile-top .tiny { margin: 0 0 2px; }
.profile-top .btn-ghost { flex: none; width: auto; min-height: 44px; margin: 0; padding: 7px 12px; }
.profile-intro { margin: 12px 0 22px; }
.profile-dialog fieldset { border: 0; padding: 0; margin: 0; }
.profile-dialog legend { font-weight: 700; font-size: 19px; margin-bottom: 12px; }
.profile-question + .profile-question { margin-top: 14px; }
.profile-question label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.profile-question select { width: 100%; min-height: 44px; font-size: 16px; }
.profile-question p { margin: 6px 0 0; }
.profile-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.profile-actions button { width: auto; min-height: 44px; }
[data-profile-text="large"] #exercise-zone .prompt,
[data-profile-text="large"] #exercise-zone .choice,
[data-profile-text="large"] #exercise-zone .inp,
[data-profile-text="large"] #feedback .fb-rule { font-size: 1.3em; }
@media (max-width: 380px) {
  .profile-actions { flex-direction: column-reverse; }
  .profile-actions button { width: 100%; }
}
