.aw-dialog {
  width: min(552px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 34px 36px 22px;
  border-radius: 26px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  box-shadow: 0 32px 120px #10152755;
}
.aw-dialog::backdrop { background: #12172b99; backdrop-filter: blur(7px); }
.aw-dialog[open] { animation: aw-dialog-in .2s ease-out; }
.aw-dialog__close {
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 50%;
  color: #52596d;
  background: #f2f4f9;
}
.aw-dialog__close:hover { color: #315ed2; background: #e7edff; }
.aw-dialog__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.aw-dialog__header { margin-bottom: 24px; padding-right: 30px; }
.aw-dialog__header h2, .aw-form-result h2 {
  font-size: clamp(28px, 3.6vw, 36px);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -.035em;
  outline: none;
}
.aw-dialog__header h2 span { color: #396dee; white-space: nowrap; }
.aw-dialog .aw-form { grid-template-columns: minmax(0, 1fr); gap: 17px; }
.aw-dialog .aw-field--task, .aw-dialog .aw-checkbox, .aw-dialog .aw-form__status { grid-column: 1 / -1; }
.aw-dialog .aw-field > label {
  position: static;
  display: block;
  pointer-events: auto;
  margin: 0 0 7px;
  font-size: 15px;
  font-weight: 500;
  color: #25283d;
}
.aw-dialog .aw-field small { margin-left: 5px; font-size: 13px; font-weight: 400; color: #646a7a; }
.aw-dialog .aw-field input, .aw-dialog .aw-field textarea {
  display: block;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #d4daea;
  border-radius: 12px;
  background: #f8f9fc;
  font-size: 16px;
  line-height: 1.45;
  outline: none;
}
.aw-dialog .aw-field textarea { min-height: 70px; }
.aw-dialog .aw-field input::placeholder, .aw-dialog .aw-field textarea::placeholder { color: #697285; opacity: 1; }
.aw-dialog .aw-field input:focus, .aw-dialog .aw-field textarea:focus { border-color: #396dee; background: white; box-shadow: 0 0 0 3px #396dee20; }
.aw-dialog .aw-field [aria-invalid=true] { border-color: #bf3549; background: #fff9fa; }
.aw-field__error { display: block; margin-top: 5px; font-size: 13px; line-height: 1.4; color: #ac2d40; }
.aw-form__consents > .aw-field__error { margin-left: 30px; }
.aw-dialog .aw-checkbox { align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; color: #51586c; }
.aw-dialog .aw-checkbox input { width: 20px; height: 20px; flex: none; accent-color: #396dee; }
.aw-dialog .aw-checkbox input[aria-invalid=true] { outline: 2px solid #bf3549; outline-offset: 2px; }
.aw-dialog .aw-checkbox a { color: #405c9c; text-underline-offset: 2px; }
.aw-dialog .aw-checkbox a:hover { color: #2c54bd; }
.aw-form__submit .aw-button, .aw-form-result > .aw-button {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  gap: 10px;
  border-radius: 14px;
  font-size: 16px;
  background: #3969df;
}
.aw-form__submit .aw-button:hover, .aw-form-result > .aw-button:hover { background: #2e58c3; }
.aw-dialog :is(a,button,input[type=checkbox]):focus-visible { outline: 2px solid #315ed2; outline-offset: 3px; }
.aw-dialog__alternative { margin-top: 9px; text-align: center; font-size: 14px; font-weight: 600; }
.aw-dialog__alternative a { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; color: #315ed2; }
.aw-dialog__alternative a:hover { text-decoration: underline; text-underline-offset: 3px; }
.aw-dialog__alternative .aw-ui-icon { width: 15px; height: 15px; }
.aw-dialog .aw-form__status { margin: 0; padding: 10px 12px; border-radius: 10px; background: #eef3ff; color: #3459a6; font-size: 14px; line-height: 1.45; }
.aw-dialog .aw-form__status[data-state=error] { color: #a32d3f; background: #fff0f2; }
.aw-form__spinner { display: none; width: 17px; height: 17px; flex: none; border: 2px solid #ffffff55; border-top-color: white; border-radius: 50%; animation: aw-form-spin .75s linear infinite; }
.aw-form[aria-busy=true] .aw-form__spinner { display: block; }
.aw-form[aria-busy=true] .aw-form__arrow { display: none; }
.aw-form[aria-busy=true] .aw-button { opacity: 1; cursor: progress; }
.aw-form-result { padding: 8px 0; text-align: center; }
.aw-form-result__icon { margin: 0 auto 18px; width: 64px; height: 64px; padding: 9px; border-radius: 20px; background: #edf3ff; }
.aw-form-result__icon svg { fill: none; stroke: #396dee; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.aw-form-result__icon circle { stroke: #396dee22; }
.aw-form-result__intro { margin: 14px auto 24px; max-width: 38ch; font-size: 16px; line-height: 1.55; }
.aw-form-result__intro strong { color: #315ed2; white-space: nowrap; }
@keyframes aw-dialog-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes aw-form-spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  .aw-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); padding: 26px 20px 12px; border-radius: 22px; }
  .aw-dialog__header { margin-bottom: 20px; }
  .aw-dialog .aw-form { gap: 15px; }
  .aw-dialog__close { top: 8px; right: 8px; }
  .aw-dialog__alternative a { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .aw-dialog[open], .aw-form__spinner { animation: none; }
}
