.auth-pending body {
  visibility: hidden;
}

.auth-pending body::before {
  content: '正在确认登录状态…';
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: visible;
  background: #24251f;
  color: #e6d064;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.auth-overlay {
  overflow-y: auto;
  padding: 28px 16px;
  background:
    linear-gradient(135deg, rgba(230, 208, 100, 0.16) 0 25%, transparent 25% 100%),
    #24251f;
}

.auth-card {
  width: min(440px, 94vw);
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 32px;
  border: 1px solid #24251f;
  background: #f2ede3;
  box-shadow: 9px 9px 0 #e86f16;
}

#registerCard {
  width: min(540px, 94vw);
}

.auth-brand {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #9d9688;
}

.auth-kicker {
  color: #e86f16;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.auth-brand h2 {
  margin: 6px 0 4px;
  font-size: 25px;
  letter-spacing: 0.02em;
}

.auth-brand p,
.auth-note {
  margin: 0;
  color: #766f61;
  font-size: 12px;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 6px;
  color: #514c42;
  font-size: 12px;
  font-weight: 900;
}

.auth-field[hidden] {
  display: none;
}

.auth-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-input {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #766f61;
  border-radius: 0;
  background: #fffaf0;
  outline: none;
}

.auth-input:focus {
  border-color: #e86f16;
  box-shadow: 3px 3px 0 rgba(232, 111, 22, 0.28);
}

.auth-error {
  min-height: 18px;
  margin: 0;
  color: #a33a31;
  font-size: 12px;
  font-weight: 900;
}

.auth-submit {
  min-height: 42px;
  background: #e6d064;
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
  color: #766f61;
  font-size: 12px;
}

.auth-switch button,
.auth-tabs button,
.auth-action-row button {
  box-shadow: none;
}

.auth-switch button {
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: #e86f16;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 18px;
  border: 1px solid #24251f;
}

.auth-tabs button {
  border: 0;
  background: #e4ded2;
}

.auth-tabs button + button {
  border-left: 1px solid #24251f;
}

.auth-tabs button.active {
  background: #e6d064;
}

.auth-avatar {
  display: flex;
  justify-content: center;
}

#regAvatarPreview {
  width: 76px;
  height: 76px;
  padding: 0;
  overflow: hidden;
  border: 2px dashed #766f61;
  border-radius: 50%;
  background: #fffaf0 center / cover no-repeat;
  box-shadow: none;
  color: #766f61;
  font-size: 11px;
}

#regAvatarPreview.has-image span {
  display: none;
}

.auth-action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.auth-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

@media (max-width: 600px) {
  .auth-overlay { align-items: flex-start; padding: 14px 10px; }
  .auth-card { max-height: none; padding: 24px 20px; box-shadow: 6px 6px 0 #e86f16; }
  .auth-field-grid { grid-template-columns: 1fr; }
}
