.survey-dialog {
  margin: auto; width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  padding: 32px; border: 1px solid #e4e0f0; border-radius: 24px;
  background: #fff; color: #18182b; box-shadow: 0 24px 90px #17102933;
  overflow-y: auto; font-family: inherit;
}
.survey-dialog::backdrop { background: #17132988; backdrop-filter: blur(4px); }
.survey-dialog [hidden] { display: none !important; }
.survey-invite .survey-actions { justify-content: center; }
.survey-illustration { display: none; }
.survey-dialog.is-complete { text-align: center; padding-bottom: 40px; }
.is-complete .survey-illustration { display: block; width: 240px; max-width: 100%; height: auto; margin: 0 auto 16px; }
.is-complete .survey-intro { max-width: 400px; margin: 0 auto; }
.survey-other { display: grid; margin: 0 0 6px; }
.survey-other input, .survey-number { width: 100%; padding: 12px 14px; border: 1px solid #dedee3; border-radius: 10px; font: inherit; color: #18182b; background: #fff; }
.survey-done.survey-actions { justify-content: center; }
.survey-dialog.is-invitation { text-align: center; }
.is-invitation .survey-illustration { display: block; width: 240px; max-width: 100%; height: auto; margin: -12px auto 4px; }
.is-invitation .survey-intro { max-width: 440px; margin: 0 auto; }
body:has(.survey-dialog[open]) { overflow: hidden; }
.survey-top { display: flex; justify-content: flex-end; align-items: center; }
.survey-dialog:not(.is-invitation):not(.is-complete) .survey-top { height: 0; }
.survey-dialog:not(.is-invitation):not(.is-complete) .survey-close { position: relative; top: 16px; }
.survey-dialog:not(.is-invitation):not(.is-complete) h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.survey-dialog:not(.is-invitation):not(.is-complete) .survey-intro { padding-right: 44px; min-height: 32px; display: flex; align-items: center; }
.survey-dialog:not(.is-invitation) h2 { margin-top: 10px; font-size: 25px; }
.survey-dialog:not(.is-invitation) .survey-progress { margin: 18px 0 22px; }
.survey-dialog form .survey-actions > .survey-primary { margin-left: auto; min-width: 100px; }
.survey-close { border: 0; background: #f4f2f8; color: #514963; border-radius: 50%; width: 36px; height: 36px; font-size: 24px; cursor: pointer; flex-shrink: 0; }
.survey-dialog h2 { font-size: 27px; line-height: 1.25; margin: 16px 0 10px; }
.survey-intro, .survey-hint { color: #716b80; font-size: 14px; }
.survey-progress { width: 100%; height: 5px; border: 0; border-radius: 4px; margin: 22px 0; accent-color: #8055e8; }
.survey-progress::-webkit-progress-bar { background: #efecf6; border-radius: 4px; }
.survey-progress::-webkit-progress-value { background: #8055e8; border-radius: 4px; }
.survey-dialog fieldset { border: 0; min-width: 0; }
.survey-dialog legend { font-size: 21px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.survey-options { display: grid; gap: 8px; margin-top: 16px; }
.survey-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #e4e0ed; border-radius: 12px; cursor: pointer; font-size: 14px; line-height: 1.4; }
.survey-option:has(input:checked) { border-color: #8055e8; background: #f5f0ff; }
.survey-option input { accent-color: #8055e8; width: 18px; height: 18px; flex-shrink: 0; }
.survey-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.survey-actions[hidden] { display: none; }
.survey-options > button { padding: 12px 20px; border-radius: 10px; font: inherit; cursor: pointer; }
.survey-actions button, .survey-actions a { font: inherit; font-size: 14px; cursor: pointer; border-radius: 10px; padding: 11px 20px; }
.survey-actions a { display: inline-block; text-decoration: none; }
.survey-primary { border: 1px solid #7750d8; background: #7750d8; color: white; font-weight: 700; }
.survey-secondary { border: 1px solid #e4e0ed; background: white; color: #62586f; }
.survey-error { color: #b42318; font-size: 14px; margin-top: 12px; }
.survey-dialog :focus-visible { outline: 3px solid #ab8aee; outline-offset: 3px; }
.survey-dialog .survey-other input:focus, .survey-dialog .survey-number:focus { outline: none; box-shadow: none; border-color: #dedee3; }
@media (max-width: 480px) {
  .survey-dialog { padding: 22px; border-radius: 18px; }
  .survey-dialog h2 { font-size: 23px; }
  .survey-dialog legend { font-size: 19px; }
}
