:root {
  --bg: #FFFCF6;
  --card: #FFFFFF;
  --ink: #1F1B16;
  --ink-2: #6B6259;
  --ink-3: #A39A8F;
  --line: #EDE6DB;
  --brand: #E8590C;
  --brand-soft: #FDF0E6;
  --brand-ink: #B8430A;
  --green: #1D7A5F;
  --green-soft: #E7F4EF;
  --red: #C0392B;
  --red-soft: #FBEDEB;
  --radius: 16px;
}

* { 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", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-ink); text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,252,246,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 640px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.logo span { color: var(--brand); }
.topbar .who { font-size: 13px; color: var(--ink-2); }
.topbar .who b { color: var(--ink); font-weight: 600; }

/* ---------- 通用 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
}
.card-tight { padding: 12px 14px; }
h1 { font-size: 22px; line-height: 1.35; margin: 18px 0 8px; letter-spacing: -.02em; }
h2 { font-size: 16px; margin: 0 0 10px; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 0 0 6px; }
p { margin: 0 0 10px; }
.muted { color: var(--ink-2); }
.tiny { font-size: 12px; color: var(--ink-3); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack > * + * { margin-top: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 13px 18px;
  border-radius: 12px; border: 0;
  background: var(--brand); color: #fff;
  font-size: 16px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: transform .06s ease, opacity .15s;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
}
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn-sm { width: auto; padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-danger { background: var(--red-soft); color: var(--red); }

/* ---------- 表单 ---------- */
label { display: block; font-size: 13px; color: var(--ink-2); margin: 14px 0 6px; }
input[type=text], input[type=tel], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink);
  font-size: 16px; font-family: inherit;
  outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 84px; resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 14px; color: var(--ink-2); cursor: pointer;
  font-family: inherit;
}
.chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }

/* ---------- 标签 / 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand-ink);
}
.badge-gray { background: #F4F1EC; color: var(--ink-2); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }

/* ---------- 饭局卡片 ---------- */
.deal {
  display: block; color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  margin: 10px 0;
  transition: border-color .15s, transform .08s;
}
.deal:active { transform: scale(.995); }
.deal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.deal-title { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.deal-sub { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.deal-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.deal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); }
.seats { display: flex; gap: 4px; align-items: center; }
.seat { width: 9px; height: 9px; border-radius: 50%; background: #E9E3D9; }
.seat.on { background: var(--brand); }

/* ---------- 头像 ---------- */
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: #fff; flex: 0 0 auto;
}
.avatar-sm { width: 30px; height: 30px; font-size: 13px; }

/* ---------- 空状态 / 提示条 ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.notice {
  padding: 11px 14px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-ink);
  font-size: 13px; margin: 12px 0;
}
.notice-gray { background: #F4F1EC; color: var(--ink-2); }
.notice-green { background: var(--green-soft); color: var(--green); }
.notice-red { background: var(--red-soft); color: var(--red); }

/* ---------- 底部操作条 ---------- */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255,252,246,.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.bottombar-in { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }

/* ---------- 数字 ---------- */
.price { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.price small { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }

/* ---------- 进度条 ---------- */
.steps { display: flex; gap: 6px; margin: 16px 0; }
.steps i { flex: 1; height: 3px; border-radius: 2px; background: #E9E3D9; }
.steps i.on { background: var(--brand); }

/* ---------- 表格 ---------- */
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--ink-2); }
.kv span:last-child { font-weight: 500; }
