:root {
  --page: #f6f7f5;
  --panel: #ffffff;
  --line: #d9dfd8;
  --ink: #16201c;
  --muted: #66706b;
  --green: #235f4c;
  --green-dark: #174638;
  --green-soft: #e9f4ef;
  --amber-soft: #fff4d7;
  --red: #a9443c;
  --red-soft: #fff0ee;
  --blue: #365f91;
  --blue-soft: #eef4ff;
  --shadow: 0 18px 42px rgba(22, 32, 28, 0.08);
  --font: "Aptos", "Microsoft YaHei UI", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  letter-spacing: 0;
}

a {
  color: inherit;
}

.lang {
  display: none;
}

body[data-lang="zh"] .lang-zh,
body[data-lang="en"] .lang-en {
  display: inline;
}

.shell {
  width: min(100% - 32px, 520px);
  margin: 56px auto;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.text-link,
.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible,
.text-button:hover,
.text-button:focus-visible {
  text-decoration: underline;
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9faf8;
}

button {
  font: inherit;
}

.lang-btn,
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.lang-btn {
  min-height: 32px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.lang-btn.is-active {
  background: var(--panel);
  color: var(--green);
  box-shadow: 0 0 0 1px var(--line);
}

.panel-body {
  padding: 28px 24px 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.16;
}

.subtitle,
.helper {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.form-stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}

input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(35, 95, 76, 0.16);
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.checkline input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--green);
}

.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.code-row {
  display: flex;
  align-items: end;
  gap: 12px;
}

.grow {
  flex: 1;
}

.primary-btn,
.secondary-btn {
  min-height: 46px;
  padding: 0 16px;
}

.primary-btn {
  width: 100%;
  background: var(--green);
  color: #fff;
  font-size: 15px;
}

.primary-btn:hover,
.primary-btn:focus-visible {
  background: var(--green-dark);
}

.secondary-btn {
  white-space: nowrap;
  background: var(--green-soft);
  color: var(--green);
  font-size: 14px;
}

.secondary-btn:disabled,
.primary-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.notice {
  padding: 12px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.notice[data-tone="info"] {
  background: var(--blue-soft);
  color: var(--blue);
}

.notice[data-tone="success"] {
  background: var(--green-soft);
  color: var(--green);
}

.notice[data-tone="warning"] {
  background: var(--amber-soft);
  color: #73520f;
}

.notice[data-tone="error"] {
  background: var(--red-soft);
  color: var(--red);
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 16px, 520px);
    margin: 16px auto;
  }

  .topbar,
  .topbar-actions,
  .code-row {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    gap: 12px;
  }

  .language-switch {
    width: 100%;
  }

  .lang-btn {
    flex: 1;
  }

  .panel-body {
    padding: 22px 18px 20px;
  }

  h1 {
    font-size: 30px;
  }

  .checkline {
    width: 100%;
  }

  .form-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}
