:root {
  --gold: #b8912f;
  --gold-dark: #8f6f1c;
  --gold-light: #e8d9a8;
  --ink: #2b2a28;
  --ink-soft: #6b675f;
  --line: #e6e0d2;
  --bg: #f7f4ec;
  --white: #ffffff;
  --danger: #c0392b;
  --ok: #2e7d5b;
  --shadow: 0 6px 24px rgba(90, 70, 20, 0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 0 0 60px; }

.hero {
  background: linear-gradient(135deg, #2c2a26 0%, #4a4130 60%, #6b5a2e 100%);
  color: #f6efdc;
  padding: 38px 24px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -60px;
  width: 260px; height: 260px;
  transform: translateX(-50%);
  border: 1px solid rgba(232, 217, 168, 0.25);
  border-radius: 50%;
}
.hero .brand {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--gold-light);
  margin-bottom: 14px;
}
.hero h1 {
  margin: 0;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 3px;
}
.hero .sub {
  margin-top: 12px;
  font-size: 13px;
  color: #cfc4a6;
  letter-spacing: 1px;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: -22px auto 0;
  position: relative;
  z-index: 2;
  max-width: 460px;
  padding: 0 16px;
}
.step-dot {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #a9a294;
}
.step-dot .num {
  width: 30px; height: 30px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: all .25s;
}
.step-dot.active .num {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.step-dot.done .num {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.step-dot.active { color: var(--gold-dark); font-weight: 600; }

.card {
  background: var(--white);
  margin: 18px 14px;
  border-radius: 14px;
  padding: 22px 18px;
  box-shadow: var(--shadow);
  border: 1px solid #efe9da;
}
.card h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}
.card .hint {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--ink-soft);
}

.identities { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ident-item {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  font-size: 15px;
  transition: all .18s;
  background: #fff;
  user-select: none;
}
.ident-item:active { transform: scale(.97); }
.ident-item.sel {
  border-color: var(--gold);
  background: #fdf8e9;
  color: var(--gold-dark);
  font-weight: 600;
}
.ident-item.wide { grid-column: 1 / -1; }

label.field { display: block; margin-bottom: 16px; }
label.field .lb {
  display: block;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 500;
}
label.field .lb b { color: var(--danger); font-weight: 400; }
input[type=text], input[type=tel], select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .18s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { resize: vertical; min-height: 76px; }

.counter { display: flex; align-items: center; gap: 14px; }
.counter button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: #fff;
  color: var(--gold-dark);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.counter button:disabled { opacity: .35; cursor: not-allowed; }
.counter .val { font-size: 24px; font-weight: 700; min-width: 30px; text-align: center; }
.counter .unit { color: var(--ink-soft); font-size: 14px; }

.person-block {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px 12px 4px;
  margin-bottom: 14px;
  background: #fcfbf7;
}
.person-block .ptitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.person-block .ptitle .badge {
  background: var(--gold);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.dup-warn {
  background: #fdecea;
  color: var(--danger);
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 10px;
  display: none;
}
.dup-warn.show { display: block; }

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .18s, transform .12s;
}
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(184, 145, 47, .3);
}
.btn-ghost {
  background: #fff;
  color: var(--ink-soft);
  border: 1.5px solid var(--line);
}
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

.actions { margin: 22px 14px 0; }

.tip {
  font-size: 12px;
  color: #9a9384;
  text-align: center;
  margin-top: 14px;
  line-height: 1.7;
}

.success {
  text-align: center;
  padding: 50px 26px;
}
.success .mark {
  width: 72px; height: 72px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  box-shadow: 0 6px 20px rgba(46, 125, 91, .28);
}
.success h2 { font-size: 22px; margin: 0 0 14px; }
.success p { color: var(--ink-soft); font-size: 15px; line-height: 1.9; margin: 0 0 8px; }

.hidden { display: none !important; }

/* 后台 */
.admin-bar {
  background: #2c2a26;
  color: #f6efdc;
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-bar .t { font-size: 16px; font-weight: 600; letter-spacing: 1px; }
.admin-bar a { color: var(--gold-light); font-size: 13px; text-decoration: none; }
.admin-wrap { max-width: 960px; margin: 0 auto; padding: 0 14px 50px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.stat {
  background: #fff; border: 1px solid #efe9da; border-radius: 11px;
  padding: 14px 10px; text-align: center; box-shadow: var(--shadow);
}
.stat .n { font-size: 25px; font-weight: 700; color: var(--gold-dark); }
.stat .l { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab {
  flex: 1; padding: 10px; text-align: center; border-radius: 8px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 14px;
}
.tab.sel { background: var(--gold); color: #fff; border-color: var(--gold); font-weight: 600; }
.query-box { display: flex; gap: 8px; margin-bottom: 16px; }
.query-box input { flex: 1; }
.query-box button { width: 92px; padding: 10px; }
.group-card {
  background: #fff; border: 1px solid #efe9da; border-radius: 12px;
  margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.group-head {
  padding: 13px 15px; background: #fbf8f0; border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
}
.tag {
  background: var(--gold-light); color: var(--gold-dark);
  padding: 3px 9px; border-radius: 5px; font-size: 12px; font-weight: 600;
}
.group-head .meta { font-size: 13px; color: var(--ink-soft); }
.group-head .time { font-size: 12px; color: #a9a294; margin-left: auto; }
.person-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 15px; border-bottom: 1px solid #f2efe7;
}
.person-row:last-child { border-bottom: none; }
.person-row .info { flex: 1; min-width: 0; }
.person-row .nm { font-weight: 600; font-size: 15px; }
.person-row .ph { color: var(--ink-soft); font-size: 13px; }
.person-row .nt {
  font-size: 12px; color: #9a9384; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pill {
  font-size: 12px; padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}
.pill.wait { background: #fdf3d8; color: #9a7410; }
.pill.done { background: #e4f3eb; color: var(--ok); }
.mini-btn {
  border: none; border-radius: 7px; padding: 8px 12px;
  font-size: 13px; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.mini-btn.go { background: var(--ok); color: #fff; }
.mini-btn.undo { background: #f2efe7; color: var(--ink-soft); }
.empty {
  text-align: center; color: #a9a294; padding: 50px 10px; font-size: 14px;
}
.login-box { max-width: 380px; margin: 80px auto; }
.login-box .card { margin: 0 14px; }

@media (max-width: 480px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .group-head .time { margin-left: 0; width: 100%; }
}
