:root {
  --gate-page-bg: #f4f4f2;
  --gate-surface: #ffffff;
  --gate-ink: #141414;
  --gate-muted: #74746f;
  --gate-line: #d8d8d2;
  --gate-accent: #0f766e;
  --gate-accent-pressed: #115e59;
  --gate-danger: #b42318;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  font-family:
    -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    sans-serif;
  color: var(--gate-ink);
  background: var(--gate-page-bg);
}

body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
}

button,
input {
  font: inherit;
}

.gate-page {
  min-height: calc(100vh - 86px);
  display: grid;
  place-items: center;
  padding: 48px 16px 28px;
}

.gate-form {
  display: grid;
  gap: 16px;
  width: min(340px, calc(100vw - 32px));
  justify-items: stretch;
}

.gate-brand {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-bottom: 4px;
}

.gate-logo,
.gate-logo-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid var(--gate-line);
  background: var(--gate-surface);
}

.gate-logo {
  object-fit: cover;
}

.gate-logo-mark {
  color: var(--gate-ink);
  font-size: 22px;
  font-weight: 700;
}

.gate-product {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 650;
}

.gate-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--gate-line);
  border-radius: 8px;
  background: var(--gate-surface);
  color: var(--gate-ink);
}

.gate-input::placeholder {
  color: #9a9a94;
}

.gate-input:focus {
  outline: 2px solid color-mix(in srgb, var(--gate-accent) 28%, transparent);
  outline-offset: 2px;
  border-color: var(--gate-accent);
}

.gate-message {
  min-height: 18px;
  margin: -4px 0 0;
  color: var(--gate-danger);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.gate-submit {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--gate-ink);
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 120ms ease, opacity 120ms ease;
}

.gate-submit:hover {
  background: var(--gate-accent);
}

.gate-submit:active {
  background: var(--gate-accent-pressed);
}

.gate-submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

.gate-footer {
  padding: 0 24px 18px;
  color: var(--gate-muted);
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
}

.gate-footer p {
  margin: 0;
}

.gate-beian-link,
.gate-beian-link:visited {
  color: inherit;
  text-decoration: none;
}

.gate-beian-link:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .gate-page {
    min-height: calc(100vh - 92px);
    padding: 32px 16px 20px;
  }

  .gate-logo,
  .gate-logo-mark {
    width: 68px;
    height: 68px;
    border-radius: 16px;
  }

  .gate-product {
    font-size: 18px;
  }

  .gate-footer {
    padding: 0 18px 14px;
    font-size: 9px;
  }
}
