/* 接力站 v2：暖纸底、墨字、细线、大留白，等宽字体显示邀请码 */
:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #1d1a16;
  --muted: #6e675e;
  --faint: #a39a8e;
  --line: #e9e2d7;
  --danger: #b3352b;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 248, 244, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar-in { height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.topbar nav { display: flex; gap: 20px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.topbar nav a:hover { color: var(--ink); }

/* Hero */
.hero { text-align: center; padding: 56px 0 8px; }
.eyebrow { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.hero h1 { font-size: 42px; line-height: 1.25; letter-spacing: -.01em; margin: 0; font-weight: 600; }
.h1-soft { display: block; font-weight: 400; color: var(--muted); }
.lede { color: var(--muted); font-size: 17px; max-width: 560px; margin: 16px auto 0; }
.stats { margin: 18px 0 0; color: var(--muted); font-size: 15px; }
.stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sample-code {
  font-family: var(--mono);
  font-size: 52px; letter-spacing: .18em; text-indent: .18em;
  color: var(--faint); user-select: none;
  filter: blur(9px); margin: 14px 0 20px;
}

/* 按钮 */
button { font-family: inherit; cursor: pointer; }
.btn-dark {
  background: var(--ink); color: var(--bg);
  border: none; border-radius: var(--radius);
  height: 52px; padding: 0 28px; font-size: 16px; font-weight: 500;
  transition: opacity .15s;
}
.btn-dark:hover { opacity: .88; }
.btn-dark:disabled { opacity: .5; cursor: default; }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  height: 40px; padding: 0 16px; font-size: 14px;
}
.btn-ghost:hover { border-color: var(--faint); }
.btn-ghost.danger { color: var(--danger); }
.row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.row.center { justify-content: center; }

/* 取码结果 */
#handout-result { margin-top: 22px; }
.code-big code {
  font-family: var(--mono); font-size: 34px; letter-spacing: .14em; text-indent: .14em;
  font-weight: 600;
}
#report-msg { margin-top: 10px; min-height: 20px; }

/* 三步 */
.steps {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.steps li { display: flex; gap: 12px; }
.num {
  flex: none; width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 500; color: var(--muted);
}
.steps h2 { font-size: 16px; margin: 4px 0 4px; font-weight: 600; }
.steps p { margin: 0; font-size: 14px; color: var(--muted); }

/* 分享 */
.share { margin-top: 56px; border-top: 1px solid var(--line); padding-top: 40px; text-align: center; }
.share-title { display: block; font-size: 19px; font-weight: 600; margin-bottom: 14px; }
.share-row { display: flex; gap: 12px; max-width: 560px; margin: 0 auto; }
.code-input {
  flex: 1; min-width: 0; height: 52px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 0 16px;
  font-family: var(--mono); font-size: 17px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink);
}
.code-input::placeholder { font-family: inherit; letter-spacing: normal; text-transform: none; color: var(--faint); font-size: 15px; }
.code-input:focus { outline: none; border-color: var(--faint); }
.share .btn-dark { flex: none; }
#submit-msg { min-height: 20px; margin: 10px 0 4px; }

/* 最近加入 */
.recent { margin-top: 56px; }
.recent-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.recent-head h2 { font-size: 20px; margin: 0; font-weight: 600; }
.recent-list {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden;
}
.recent-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--line);
}
.recent-list li:first-child { border-top: none; }
.recent-code { font-family: var(--mono); font-size: 17px; font-weight: 600; letter-spacing: .1em; }
.recent-meta { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.recent-meta span { display: block; }
.recent-meta .left { color: var(--faint); font-variant-numeric: tabular-nums; }
.btn-use {
  flex: none; height: 40px; padding: 0 14px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 14px; color: var(--ink);
}
.btn-use:hover { border-color: var(--faint); }

/* FAQ */
.faq { margin-top: 56px; }
.faq h2 { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 600; font-size: 15px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .pm { position: relative; flex: none; width: 14px; height: 14px; color: var(--faint); }
.faq .pm::before, .faq .pm::after {
  content: ""; position: absolute; background: currentColor; left: 0; top: 6px; width: 14px; height: 2px;
}
.faq .pm::after { transform: rotate(90deg); }
.faq details[open] .pm::after { display: none; }
.faq details p { margin: 8px 0 2px; color: var(--muted); font-size: 15px; }

footer { margin: 56px 0 0; padding: 24px 20px 40px; text-align: center; border-top: 1px solid var(--line); }
footer p { margin: 0; }

/* 移动 */
@media (max-width: 640px) {
  .hero { padding-top: 40px; }
  .hero h1 { font-size: 32px; }
  .sample-code { font-size: 40px; }
  .steps { grid-template-columns: 1fr; gap: 18px; margin-top: 44px; }
  .share-row { flex-direction: column; }
  .share .btn-dark { width: 100%; }
  .code-big code { font-size: 28px; }
  .recent-code { font-size: 15px; }
}
