/* RD Member — rd_console 墨青编辑部风格（令牌见 rd-editorial-tokens.css） */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.rd-member-page {
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.5;
  color: var(--text-0);
  background: var(--bg-0);
}

.rd-member-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5) var(--page-x-sm) var(--space-2);
}

.rd-member-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--text-0);
}

.rd-member-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--theme-accent);
  color: var(--theme-accent-contrast);
  font-size: 13px;
  font-weight: 700;
}

.rd-member-brand__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rd-wrap {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: var(--space-4) var(--page-x-sm) var(--space-7);
}

.rd-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-6) var(--space-5) var(--space-5);
}

.rd-card-title,
.rd-page-title,
.rd-wechat-only-title {
  margin: 0 0 var(--space-5);
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-0);
}

.rd-form-hint {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  margin: calc(var(--space-2) * -1) 0 var(--space-5);
  text-align: center;
}

.rd-field {
  margin-bottom: var(--space-4);
}

.rd-field input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-0);
  background: var(--surface-card);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.rd-field input:focus {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 18%, transparent);
}

.rd-field input::placeholder {
  color: var(--text-2);
}

.rd-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition), transform var(--dur-press);
}

.rd-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.rd-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rd-btn-dark,
.rd-btn-primary {
  background: var(--theme-accent);
  color: var(--theme-accent-contrast);
}

.rd-btn-dark:hover:not(:disabled),
.rd-btn-primary:hover:not(:disabled) {
  background: var(--theme-accent-hover);
}

.rd-captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: var(--space-4);
}

.rd-captcha-row input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-0);
  background: var(--surface-card);
  outline: none;
}

.rd-captcha-row input:focus {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 18%, transparent);
}

.rd-captcha-row img {
  flex-shrink: 0;
  width: 110px;
  height: 42px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-1);
}

.rd-msg {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: var(--space-4);
  display: none;
  line-height: 1.55;
}

.rd-msg.show {
  display: block;
}

.rd-msg.error {
  background: color-mix(in srgb, var(--accent-rose) 10%, var(--surface-card));
  border: 1px solid color-mix(in srgb, var(--accent-rose) 28%, var(--border));
  color: var(--accent-rose-fg);
}

.rd-msg.success {
  background: color-mix(in srgb, var(--accent-emerald) 10%, var(--surface-card));
  border: 1px solid color-mix(in srgb, var(--accent-emerald) 28%, var(--border));
  color: var(--accent-emerald-fg);
}

.rd-agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  margin-top: var(--space-4);
  line-height: 1.6;
  cursor: pointer;
}

.rd-agreement input {
  margin-top: 3px;
  flex-shrink: 0;
}

.rd-agreement a {
  color: var(--theme-accent-fg);
  text-decoration: none;
}

.rd-agreement a:hover {
  text-decoration: underline;
}

.rd-nav-links,
.rd-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--text-2);
}

.rd-nav-links a,
.rd-link-row a {
  color: var(--theme-accent-fg);
  text-decoration: none;
  font-weight: 500;
}

.rd-nav-links a:hover,
.rd-link-row a:hover {
  text-decoration: underline;
}

.rd-link-action {
  cursor: pointer;
}

.rd-social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: var(--space-5) 0 var(--space-3);
  font-size: 12px;
  color: var(--text-2);
}

.rd-social-divider::before,
.rd-social-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.rd-social-icons {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
}

.rd-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  color: #07c160;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--dur-press);
}

.rd-social-btn:hover {
  background: var(--surface-1);
  border-color: var(--border-strong);
}

.rd-social-btn:active {
  transform: scale(0.96);
}

.rd-social-btn .iconfont {
  font-size: 22px;
  line-height: 1;
}

.rd-wechat-panel {
  display: none;
  margin-top: var(--space-4);
}

.rd-wechat-panel.show {
  display: block;
}

.rd-wechat-area {
  padding: var(--space-2) 0;
}

.rd-qr-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: var(--space-4);
  border: 1px dashed var(--border-emphasis);
  border-radius: var(--radius);
  background: var(--surface-0);
}

.rd-qr-box img {
  display: block;
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.rd-qr-placeholder {
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rd-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--theme-accent);
  border-radius: 50%;
  animation: rd-spin 0.7s linear infinite;
}

@keyframes rd-spin {
  to { transform: rotate(360deg); }
}

.rd-scan-status,
.rd-code-hint {
  margin-top: var(--space-3);
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  line-height: 1.65;
}

.rd-code-display {
  margin-top: var(--space-3);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  color: var(--theme-accent-fg);
  font-family: var(--font-mono);
}

.rd-back-login {
  margin-top: var(--space-4);
  text-align: center;
  font-size: 13px;
}

.rd-back-login a {
  color: var(--theme-accent-fg);
  text-decoration: none;
}

.rd-back-login a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .rd-card {
    padding: var(--space-5) var(--space-4) var(--space-4);
  }

  .rd-member-header {
    padding-top: var(--space-4);
  }
}

:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
}
