/* =========================================================================
   flex std. — 独立注册页
   ========================================================================= */

.rg-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(127, 255, 212, 0.22), transparent 60%),
    var(--bg, #fbfbfd);
  color: var(--ink, #061512);
  -webkit-font-smoothing: antialiased;
}

.rg-main {
  width: min(460px, calc(100vw - 32px));
  margin: 0 auto;
  padding: clamp(18px, 4vh, 44px) 0 40px;
}

.rg-brand {
  display: inline-block;
  margin-bottom: 16px;
  color: inherit;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.rg-card {
  padding: clamp(22px, 3.4vw, 32px);
  border-radius: 26px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(6, 21, 18, 0.05),
    0 26px 60px -34px rgba(6, 21, 18, 0.28);
}

.rg-eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted, #6b7674);
}

.rg-title {
  margin: 0 0 8px;
  font-size: clamp(24px, 5vw, 29px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.rg-desc {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted, #6b7674);
}

.rg-field {
  display: block;
  margin-bottom: 14px;
}

.rg-field > span,
.rg-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted, #6b7674);
}

.rg-field input,
.rg-verify-row input,
.rg-captcha input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(6, 21, 18, 0.14);
  border-radius: 12px;
  background: #fbfcfb;
  color: inherit;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.3;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.rg-field input:focus,
.rg-verify-row input:focus,
.rg-captcha input:focus {
  outline: none;
  border-color: var(--aqua-strong, #0e8f72);
  background: #fff;
}

.rg-verify {
  margin-bottom: 14px;
}

.rg-verify-row {
  display: grid;
  grid-template-columns: 132px auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.rg-verify-row input {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 16px;
  letter-spacing: 0.12em;
}

.rg-send {
  padding: 12px 14px;
  border: 1px solid rgba(6, 21, 18, 0.14);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.rg-send:hover:not(:disabled) {
  border-color: rgba(6, 21, 18, 0.3);
}

.rg-send:disabled {
  opacity: 0.5;
  cursor: default;
}

.rg-captcha {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.rg-captcha-q {
  padding: 10px 13px;
  border-radius: 11px;
  background: #f1f4f3;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 14px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.rg-captcha-refresh {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(6, 21, 18, 0.14);
  border-radius: 50%;
  background: #fff;
  color: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.rg-captcha-refresh:hover {
  border-color: rgba(6, 21, 18, 0.3);
}

.rg-captcha input {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 15px;
}

.rg-hint {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted, #6b7674);
}

.rg-submit {
  width: 100%;
  margin-top: 18px;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--aqua, #7fffd4);
  color: #061512;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.rg-submit:hover:not(:disabled) {
  filter: brightness(0.97);
}

.rg-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

.rg-status {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted, #6b7674);
}

.rg-status.is-error { color: #b5341f; }
.rg-status.is-ok { color: var(--aqua-ink, #0e8f72); }

.rg-done {
  padding: 6px 0 2px;
}

.rg-done-title {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.rg-done-mail {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f4faf7;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 13px;
  word-break: break-all;
}

.rg-done-hint {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--muted, #6b7674);
}

.rg-back {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid rgba(6, 21, 18, 0.14);
  border-radius: 12px;
  color: inherit;
  font-size: 13px;
  text-decoration: none;
}

.rg-back:hover {
  border-color: rgba(6, 21, 18, 0.3);
}

.rg-foot {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(6, 21, 18, 0.08);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted, #6b7674);
}

.rg-fine {
  margin: 18px 4px 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted, #6b7674);
  text-align: center;
}

@media (max-width: 480px) {
  .rg-main {
    width: calc(100vw - 24px);
    padding-top: 24px;
  }

  .rg-card {
    padding: 24px 20px;
    border-radius: 22px;
  }
}

/* 邮箱验证码右侧状态 */
.rg-code-status {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted, #6b7674);
}

.rg-code-status.is-ok { color: var(--aqua-ink, #0e8f72); }
.rg-code-status.is-error { color: #b5341f; }

@media (max-width: 520px) {
  .rg-verify-row {
    grid-template-columns: 110px auto;
  }

  .rg-code-status {
    grid-column: 1 / -1;
  }
}

/* 语言选择器 */
.rg-lang {
  position: absolute;
  top: 24px;
  right: 24px;
  appearance: none;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(6, 21, 18, .16);
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
