.auth-gate[hidden] {
  display: none !important;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: rgba(15, 18, 22, .62);
  opacity: 0;
  transition: opacity .18s ease;
  overscroll-behavior: contain;
}

.auth-gate--visible {
  opacity: 1;
}

.auth-gate__surface {
  width: min(100%, 24rem);
  padding: 1.5rem 1.25rem 1.25rem;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 .75rem 2.5rem rgba(0, 0, 0, .2);
  text-align: center;
  transform: translateY(.5rem);
  transition: transform .18s ease;
}

.auth-gate--visible .auth-gate__surface {
  transform: translateY(0);
}

.auth-gate__mark {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  background: #07c160;
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: 0;
}

.auth-gate__title {
  margin: 0;
  color: #171a1f;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0;
}

.auth-gate__message {
  min-height: 2.75rem;
  margin: .625rem 0 0;
  color: #60656f;
  font-size: .875rem;
  line-height: 1.55;
  letter-spacing: 0;
}

.auth-gate__message--error {
  color: #c0362c;
}

.auth-gate__agreement {
  margin-top: 1rem;
  color: #737984;
  font-size: .75rem;
  line-height: 1.7;
  letter-spacing: 0;
}

.auth-gate__agreement-link {
  margin: 0 .125rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1769aa;
  font: inherit;
  line-height: inherit;
  text-decoration: underline;
}

.auth-gate__actions {
  width: 100%;
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .75rem;
}

.auth-gate__button {
  width: 100%;
  min-width: 0;
  height: 3rem;
  padding: 0 .75rem;
  box-sizing: border-box;
  border-radius: .5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
}

.auth-gate__button--cancel {
  border: 1px solid #d8dce2;
  background: #fff;
  color: #343941;
}

.auth-gate__button--confirm {
  border: 1px solid #07c160;
  background: #07c160;
  color: #fff;
}

.auth-gate__button--confirm:active {
  border-color: #059e4e;
  background: #059e4e;
}

.auth-gate__button--loading::before {
  width: .875rem;
  height: .875rem;
  margin-right: .5rem;
  display: inline-block;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  content: '';
  vertical-align: -.125rem;
  animation: auth-gate-spin .75s linear infinite;
}

.auth-gate__button:disabled {
  cursor: wait;
  opacity: .65;
}

@keyframes auth-gate-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 22rem) {
  .auth-gate {
    padding-right: .75rem;
    padding-left: .75rem;
  }

  .auth-gate__surface {
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-gate,
  .auth-gate__surface {
    transition: none;
  }

  .auth-gate__button--loading::before {
    animation: none;
  }
}
