:root {
  --bg: #f6f3ee;
  --ink: #1c1917;
  --muted: #78716c;
  --card: #fff;
  --line: #e7e0d6;
  --blue: #2563eb;
  --gold: #f59e0b;
  --danger: #b91c1c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #0f172a;
  color: #fff;
}
.brand { font-weight: 700; letter-spacing: .02em; }
.brand span { color: var(--gold); font-weight: 500; margin-left: 8px; font-size: 14px; }
.who { font-size: 13px; color: #e7e5e4; display: flex; gap: 10px; align-items: center; }
.who button { background: transparent; color: #fff; border: 1px solid #475569; border-radius: 8px; padding: 4px 10px; }
main { max-width: 820px; margin: 0 auto; padding: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(28,25,23,.04);
}
h1, h2 { margin: 0 0 8px; font-size: 22px; }
h3 { margin: 0 0 6px; font-size: 15px; color: var(--blue); }
.muted { color: var(--muted); font-size: 14px; margin-top: 0; }
label { display: block; font-size: 14px; margin: 12px 0 0; font-weight: 600; }
input, textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  background: #fffdfb;
}
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row .btn { margin-top: 6px; white-space: nowrap; }
.row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.between { justify-content: space-between; align-items: center; }
.btn {
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: .6; }
.pill {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  white-space: nowrap;
}
.msg { min-height: 1.2em; font-size: 14px; color: var(--danger); }
article { border-top: 1px solid var(--line); padding: 12px 0; }
article pre {
  white-space: pre-wrap;
  margin: 0;
  font-family: inherit;
  font-size: 15px;
}
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.plan.on { border-color: var(--blue); background: #eff6ff; }
.plan strong { font-size: 28px; }
.plan strong span { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan span { color: var(--muted); font-size: 13px; }
.history button {
  width: 100%;
  text-align: left;
  background: #fffdfb;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font: inherit;
}
.hidden { display: none !important; }
@media (max-width: 640px) {
  .plans { grid-template-columns: 1fr; }
  .top { align-items: flex-start; flex-direction: column; }
}
