:root {
  --paper: #f6efe1;
  --paper-2: #efe5cf;
  --card: #fffdf7;
  --ink: #2c2a24;
  --muted: #7a7365;
  --gold: #b78a2f;
  --gold-soft: #d4b76a;
  --seal: #b0342a;
  --line: #e3d8bf;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Noto Serif SC", Georgia, serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -100px, #fdf9ee 0%, transparent 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------- 顶部 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 239, 225, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-seal {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--seal);
  color: #fff;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
  flex: none;
  box-shadow: 0 0 0 2px var(--gold-soft);
}
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
}
.top-counter {
  font-size: 13px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
}
.top-counter b { color: var(--seal); font-weight: 700; }

/* ---------- Hero ---------- */
.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 20px 40px;
  text-align: center;
}
.hero-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 3px;
}
.hero-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(34px, 8vw, 54px);
  line-height: 1.15;
  letter-spacing: 2px;
}
.hero-title em {
  font-style: normal;
  color: var(--gold);
}
.hero-sub {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 16px;
}
.hero-counter {
  margin: 0 auto 30px;
  max-width: 420px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(120, 90, 40, 0.06);
}
.hero-counter-num {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 56px;
  line-height: 1;
  color: var(--seal);
  font-variant-numeric: tabular-nums;
}
.hero-counter-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
.hero-counter-label b { color: var(--ink); }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, #c79a35, #b78a2f);
  color: #fff;
  box-shadow: 0 6px 18px rgba(183, 138, 47, 0.32);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(183, 138, 47, 0.42); }
.btn-ghost {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--gold-soft); }
.btn-block { width: 100%; }

/* ---------- 通用 section ---------- */
.section {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px;
}
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(24px, 5vw, 32px);
  letter-spacing: 1px;
}
.gold { color: var(--gold); }
.section-sub { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- 生成器 ---------- */
.gen-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) {
  .gen-layout { grid-template-columns: 1.4fr 1fr; }
}
.gen-form, .gen-aside-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.field { display: block; margin-bottom: 16px; }
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}
.field-label i { font-style: normal; color: var(--muted); font-weight: 400; }
.field input[type="text"], .field textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  font-family: var(--sans);
  color: var(--ink);
  background: #fbf7ec;
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
}
.field input[type="text"]:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}
.field-anon {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.field-anon input { margin-top: 3px; accent-color: var(--gold); }
.form-error {
  margin: 0 0 14px;
  padding: 10px 14px;
  background: #fbe9e7;
  color: var(--seal);
  border-radius: 10px;
  font-size: 13px;
}
.form-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

.gen-aside-card .gen-aside-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 10px;
}
.gen-aside-card p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }

/* ---------- 联名墙 ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.tag {
  font-size: 12px;
  color: var(--gold);
  background: #f5ead2;
  border: 1px solid #eadcc0;
  padding: 4px 10px;
  border-radius: 999px;
}
.wall-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 420px) {
  .wall-grid { grid-template-columns: 1fr; }
}
.wall-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.wall-card .thumb {
  background: #fdf8ec;
  border-bottom: 1px solid var(--line);
}
.wall-card .thumb canvas { width: 100%; height: auto; display: block; }
.wall-card .body { padding: 12px 14px; flex: 1; }
.wall-card .nick {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.wall-card .msg {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wall-card .meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}
.wall-like {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  font-size: 13px;
  color: var(--muted);
  background: #faf5e9;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.wall-like:hover { border-color: var(--gold-soft); }
.wall-like.liked { color: var(--seal); background: #fbe9e7; border-color: #e8c7c2; }
.wall-like b { font-weight: 700; }
.wall-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
  font-size: 14px;
}
.wall-more { text-align: center; margin-top: 20px; }

/* ---------- about ---------- */
.about { background: var(--paper-2); border-radius: 24px; max-width: 720px; margin: 24px auto; }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .about-grid { grid-template-columns: repeat(3, 1fr); } }
.about-block h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
}
.about-block p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- 弹层 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-mask { position: absolute; inset: 0; background: rgba(30, 24, 12, 0.5); }
.modal-card {
  position: relative;
  background: var(--card);
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}
.modal-close {
  position: absolute;
  top: 10px; right: 12px;
  border: none; background: none;
  font-size: 26px; color: var(--muted);
  cursor: pointer; line-height: 1;
}
.modal-title { margin: 4px 0 6px; font-family: var(--serif); font-size: 20px; }
.modal-sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.modal-sub b { color: var(--seal); }
.cert-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.modal-actions { display: flex; gap: 10px; margin-bottom: 12px; }
.modal-actions .btn { flex: 1; }
.modal-hint { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  margin-top: 40px;
}
.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.footer-tag { font-size: 12px; color: var(--muted); }
.disclaimer { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.8; }
