:root {
  --bg: #f5f7f5;
  --card: #ffffff;
  --line: #d8e0dc;
  --ink: #17272b;
  --muted: #5f6f73;
  --teal: #176c67;
  --teal-soft: #e7f3f0;
  --sand: #f8fbf9;
  --error: #b5534c;
  --info: #496e8f;
  --shadow: 0 14px 34px rgba(31, 45, 47, 0.08);
  --font-display: "Bahnschrift SemiBold", "Aptos Display", "Trebuchet MS", sans-serif;
  --font-body: "Aptos", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, #fbfcfb 0%, var(--bg) 100%);
}

.lang {
  display: none !important;
}

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

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

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 14px;
  border-bottom: 1px solid #e8eee9;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.brand::before {
  content: "RS";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

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

.text-btn,
.link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--teal);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.text-btn:hover,
.link:hover {
  background: var(--teal-soft);
}

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

.lang-btn,
.primary-btn,
.secondary-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.lang-btn {
  min-height: 30px;
  background: transparent;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.lang-btn[data-lang-value="en"] {
  font-size: 0;
}

.lang-btn[data-lang-value="en"]::after {
  content: "EN";
  font-size: 12px;
}

.lang-btn.is-active {
  background: #fff;
  color: var(--teal);
}

.card-body {
  padding: 26px 28px 28px;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 36px);
}

.subtitle,
.hint {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.fields {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

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

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

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

input:focus {
  border-color: rgba(23, 102, 95, 0.55);
  box-shadow: 0 0 0 3px rgba(23, 102, 95, 0.12);
  outline: none;
}

.row,
.inline-fields {
  display: flex;
  gap: 12px;
}

.row {
  justify-content: space-between;
  align-items: center;
}

.inline-fields {
  align-items: end;
}

.grow {
  flex: 1;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

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

.message {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.message[data-tone="error"] {
  background: #faefed;
  color: var(--error);
}

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

.message[data-tone="info"] {
  background: #eef4fb;
  color: var(--info);
}

.primary-btn,
.secondary-btn {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 14px;
}

.primary-btn {
  width: 100%;
  margin-top: 4px;
  background: var(--teal);
  color: #fff;
}

.secondary-btn {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--sand);
  color: var(--ink);
}

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

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

  .card-body {
    padding: 18px;
  }
}
