:root {
  --bg: #edf3f8;
  --card: #ffffff;
  --text: #17202a;
  --muted: #607084;
  --line: #d7e1eb;
  --primary: #1261a6;
  --primary-dark: #0a477e;
  --danger: #c62828;
  --success: #1f7a4d;
  --shadow: 0 18px 42px rgba(23, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(18, 97, 166, 0.08), rgba(31, 122, 77, 0.06)),
    var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.register-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px 14px;
}

.register-card {
  width: min(460px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.register-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.brand-mark {
  flex: 0 0 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.field label {
  display: block;
  margin-bottom: 7px;
  color: #35465b;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

.field input[readonly] {
  background: #f3f6fa;
  color: #4f6075;
}

.field input:focus {
  outline: 3px solid rgba(18, 97, 166, 0.16);
  border-color: var(--primary);
}

.captcha-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 10px;
  align-items: start;
}

.captcha-button {
  height: 54px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 42px;
  align-items: center;
  gap: 6px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfe;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.captcha-button img {
  width: 100%;
  height: 46px;
  display: block;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
}

.submit-button {
  min-height: 46px;
  margin-top: 4px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.submit-button:hover {
  background: var(--primary-dark);
}

.error {
  min-height: 18px;
  display: block;
  margin-top: 4px;
  color: var(--danger);
  font-size: 13px;
}

.form-message {
  min-height: 22px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.form-message.success {
  color: var(--success);
  font-weight: 700;
}

.form-message.error {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .register-card {
    padding: 20px 16px;
  }

  .captcha-line {
    grid-template-columns: 1fr;
  }

  .captcha-button {
    grid-template-columns: minmax(0, 1fr) 48px;
  }
}
