@media (max-width: 640px) {
  .auth-modal {
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
  }
  .auth-modal__dialog,
  .auth-modal__dialog--wide {
    max-width: 420px !important;
    width: 100%;
  }
  .auth-modal .auth-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 16px;
    max-height: min(88dvh, 640px);
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
    background: #fff;
  }
  .auth-modal .auth-card__visual {
    position: relative;
    flex: 0 0 88px;
    height: 88px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffc9da 0%, #fb7299 55%, #6ec5f0 100%);
  }
  .auth-modal .auth-card__visual::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 24px;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.72) 55%,
      #fff 100%
    );
    pointer-events: none;
    z-index: 2;
  }
  .auth-modal .auth-card__visual picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    pointer-events: none;
  }
  .auth-modal .auth-card__art {
    opacity: 1;
    object-fit: cover;
    object-position: center top;
  }
  .auth-modal .auth-card__visual-shade {
    background:
      linear-gradient(105deg, rgba(251, 114, 153, 0.28) 0%, rgba(251, 114, 153, 0.1) 45%, rgba(110, 197, 240, 0.06) 100%),
      linear-gradient(
        180deg,
        rgba(8, 10, 14, 0.04) 0%,
        rgba(8, 10, 14, 0.01) 40%,
        rgba(255, 255, 255, 0.35) 78%,
        rgba(255, 255, 255, 0.92) 100%
      );
  }
  .auth-modal .auth-card__brand {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 48px 0 14px;
    box-sizing: border-box;
  }
  .auth-modal .auth-card__logo {
    width: 32px;
    height: 32px;
    padding: 5px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .auth-modal .auth-card__welcome {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    flex: 1;
    min-width: 0;
  }
  .auth-modal .auth-card__hint { display: none; }
  .auth-modal .auth-card__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px 16px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: 16px;
    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.92) 10px,
        #fff 22px,
        #fff 100%
      );
  }
  .auth-modal .auth-card__head { display: none; }
  .auth-modal .auth-field { margin-bottom: 10px; }
  .auth-modal .auth-field:first-child { margin-top: 0; }
  .auth-modal .auth-field__label {
    margin-bottom: 4px;
    font-size: 12px;
  }
  .auth-modal .auth-field__input {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 16px;
    border-radius: var(--radius);
  }
  .auth-modal .auth-captcha__img { height: 40px; }
  .auth-modal .auth-form__submit {
    min-height: 40px;
    margin-top: 2px;
    font-size: 14px;
    border-radius: var(--radius);
  }
  .auth-modal .auth-form__row { gap: 6px; }
  .auth-modal .auth-form__row .auth-field { margin-bottom: 6px; }
  .auth-modal .auth-recovery__tabs {
    margin-top: 0;
    margin-bottom: 8px;
    padding: 3px;
  }
  .auth-modal .auth-recovery__tab {
    min-height: 32px;
    font-size: 11px;
  }
  .auth-modal .auth-steps { margin-bottom: 10px; }
  .auth-modal .auth-card__foot {
    margin-top: 12px;
    padding-top: 0;
    padding-bottom: 4px;
    font-size: 12px;
    flex-shrink: 0;
  }
  .auth-modal .auth-modal__close {
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 2px 10px rgba(251, 114, 153, 0.14);
    color: rgba(24, 28, 32, 0.72);
  }
}
