/* ============================================================
   买房子，找老许 —— 业务页面共享组件（配合 tokens.css 使用）
   ============================================================ */

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

html, body {
  background: var(--canvas);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

/* 内联 SVG 图标统一规格（sprite symbol 引用） */
.ic {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.ic-15 { width: 15px; height: 15px; }
.ic-16 { width: 16px; height: 16px; }
.ic-18 { width: 18px; height: 18px; }

/* 手机屏：390 x 844，内容区内部滚动 */
.phone {
  position: relative;
  width: 390px;
  height: 844px;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }

/* ---------- 顶部导航（标题 + 微信胶囊） ---------- */
.nav {
  position: relative;
  padding: 20px 16px 10px;
  display: flex;
  align-items: center;
  flex: none;
}
.nav .nav-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 6px;
  margin-left: -6px;
  color: var(--ink);
  text-decoration: none;
}
.nav .nav-center {
  flex: 1;
  text-align: center;
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: .5px;
}
.capsule {
  position: absolute;
  top: 18px;
  right: 12px;
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 16px;
  gap: 8px;
  z-index: 5;
}
.capsule .dots { display: flex; gap: 3px; align-items: center; }
.capsule .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--ink); display: block; }
.capsule .sep { width: 1px; height: 16px; background: var(--line); }
.capsule .ring {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--ink);
  position: relative;
}
.capsule .ring::after {
  content: ""; position: absolute; inset: 2.5px;
  border-radius: 50%; background: var(--ink);
}
.capsule.on-dark { background: rgba(255, 255, 255, .14); border-color: rgba(255,255,255,.22); }
.capsule.on-dark .dots i { background: #fff; }
.capsule.on-dark .sep { background: rgba(255,255,255,.25); }
.capsule.on-dark .ring { border-color: #fff; }
.capsule.on-dark .ring::after { background: #fff; }

/* 首页式大标题头 */
.head-brand { padding: 6px 20px 0; }
.head-brand h1 { font-size: var(--fs-title); font-weight: 700; letter-spacing: 1px; }
.head-brand .hello { margin-top: 4px; font-size: var(--fs-sm); color: var(--ink-2); letter-spacing: .3px; }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

/* 金色描边按钮（banner 内白底金字款在页面内自定义） */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #D8B978, var(--gold) 60%, #B98F3E);
  color: #fff;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: .5px;
  box-shadow: 0 4px 12px rgba(166, 133, 58, .35);
  text-decoration: none;
  border: none;
}
/* 全宽主按钮（表单页底部） */
.btn-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  border-radius: 25px;
  background: linear-gradient(135deg, #D8B978, var(--gold) 60%, #B98F3E);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(166, 133, 58, .35);
}
.btn-block.dark { background: #1C2220; box-shadow: none; }
.btn-block.ghost {
  background: var(--card);
  color: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: none;
  font-weight: 600;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--green-bg);
  color: var(--green);
  font-size: var(--fs-xs);
  line-height: 1;
}
.tag.gold { background: var(--gold-soft); color: var(--gold-deep); }

.price { color: var(--price); font-weight: 700; }

/* 区块标题行 */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 20px;
  margin: 22px 0 12px;
}
.sec-head h2 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: .5px; }
.sec-head .more {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  text-decoration: none;
}
.sec-head .more svg { margin-left: 2px; }

/* 老许说 */
.xu-say {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--ink-2);
}
.xu-say .who {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-weight: 600;
}

/* ---------- 底部 TabBar ---------- */
.tabbar {
  flex: none;
  display: flex;
  height: 62px;
  background: rgba(250, 249, 246, .96);
  border-top: 1px solid var(--line);
  padding-bottom: 8px;
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--ink-3);
  font-size: 10px;
  letter-spacing: .5px;
}
.tabbar a.on { color: var(--green); font-weight: 600; }
.tabbar a svg { display: block; }

/* 浮动按钮（问老许 / +） */
.fab {
  position: absolute;
  right: 16px;
  bottom: 84px;
  z-index: 10;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #D8B978, var(--gold) 60%, #B98F3E);
  color: #fff;
  box-shadow: 0 6px 16px rgba(166, 133, 58, .4);
  text-decoration: none;
}
.fab.fab-text { width: auto; height: 52px; padding: 0 18px; border-radius: 26px; gap: 8px; font-weight: 600; font-size: var(--fs-md); letter-spacing: 1px; }

/* 列表页行（我的页） */
.rows { background: var(--card); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.rows .row {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 18px;
  font-size: var(--fs-md);
  text-decoration: none;
  color: var(--ink);
  position: relative;
}
.rows .row + .row::before {
  content: "";
  position: absolute;
  left: 18px; right: 18px; top: 0;
  height: 1px;
  background: var(--line);
}
.rows .row .val { margin-left: auto; color: var(--ink-2); font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: 4px; }
.rows .row .chev { color: var(--ink-3); }
.rows .row .val + .chev { margin-left: 4px; }

/* 搜索框 */
.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  color: var(--ink-3);
  font-size: var(--fs-sm);
}

/* 筛选 chips */
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  height: 32px;
  padding: 0 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  letter-spacing: .5px;
}
.chip.on { background: #1C2220; color: #fff; border-color: #1C2220; font-weight: 600; }
.chip.on-gold { background: var(--gold-soft); color: var(--gold-deep); border-color: rgba(198,161,78,.45); font-weight: 600; }

/* 分段控件（页面内） */
.seg {
  display: flex;
  background: rgba(30, 36, 34, .06);
  border-radius: 12px;
  padding: 3px;
}
.seg span, .seg a {
  flex: 1;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
  color: var(--ink-2);
  border-radius: 9px;
  letter-spacing: 1px;
  text-decoration: none;
}
.seg .on {
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(30, 42, 38, .1);
}

/* 表单行（测算/发布页） */
.field { padding: 14px 0 0; }
.field .lb { font-size: var(--fs-sm); font-weight: 600; letter-spacing: .5px; display: flex; align-items: baseline; gap: 6px; }
.field .lb .hint { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 400; }
.field .box {
  margin-top: 8px;
  height: 46px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: var(--fs-md);
  gap: 6px;
}
.field .box .ph { color: var(--ink-3); }
.field .box .unit { margin-left: auto; color: var(--ink-2); font-size: var(--fs-sm); }

/* 免责小字 */
.fineprint { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.7; }

/* 通用 */
.muted { color: var(--ink-2); }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
