.auth-backdrop {
  z-index: 60;
}

.auth-sheet {
  position: relative;
  width: min(390px, 100vw);
  max-height: min(720px, calc(100vh - 28px));
  overflow-y: auto;
  padding: 24px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: #fff;
  box-shadow: 0 -18px 48px rgb(11 22 19 / 0.18);
  animation: sheet-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-sheet > .icon-button {
  position: absolute;
  top: 16px;
  right: 16px;
}

.auth-heading {
  padding-right: 48px;
}

.auth-heading > span {
  color: var(--brand-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.auth-heading h2 {
  margin: 6px 0 7px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
}

.auth-heading p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 11px;
  line-height: 1.65;
}

.auth-sms-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field label {
  font-size: 11px;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-default);
  border-radius: 3px;
  background: #fff;
  font-size: 13px;
  outline: 0;
}

.auth-field input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgb(19 82 74 / 0.1);
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 8px;
}

.auth-code-row button {
  border: 1px solid var(--brand-primary);
  border-radius: 3px;
  background: #fff;
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.auth-code-row button:disabled {
  border-color: var(--line-default);
  color: var(--ink-secondary);
  cursor: default;
}

.auth-error {
  min-height: 16px;
  margin: -4px 0 0;
  color: var(--error);
  font-size: 10px;
  line-height: 1.5;
}

.auth-sms-submit,
.auth-wechat-button {
  width: 100%;
  min-height: 48px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-sms-submit {
  border: 0;
  background: var(--brand-primary);
  color: #fff;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--ink-secondary);
  font-size: 9px;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: var(--line-default);
  content: "";
}

.auth-wechat-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--brand-primary);
  background: var(--brand-soft);
  color: var(--brand-primary);
}

.auth-wechat-button svg {
  width: 18px;
  height: 18px;
}

.auth-wechat-note,
.auth-prototype-note {
  margin: 8px 0 0;
  color: var(--ink-secondary);
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

.auth-prototype-note {
  color: #8b9491;
}

@media (max-width: 359px) {
  .auth-sheet {
    padding-inline: 16px;
  }

  .auth-code-row {
    grid-template-columns: minmax(0, 1fr) 92px;
  }
}
