/* 法辅在线 — 复刻版样式
   设计令牌取自 Craft Anything 的 web_site_capture 取证（capture-dg-house/README.md） */

:root {
  --red: #C8102E;
  --red-dark: #9A0C23;
  --red-soft: #FDECEE;
  --ink: #1A1A1A;
  --ink-2: #5A5F66;
  --ink-3: #8B9098;
  --line: #E8EAED;
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --gold: #B8860B;
  --gold-soft: #FFF7E8;
  --blue-soft: #EEF2FF;
  --blue: #3B4CCA;
  --green-soft: #E7F6EC;
  --green: #1B7F45;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .05);
  --r-sm: 5px;
  --r-md: 9px;
  --r-lg: 14px;
  --r-xl: 16px;
  --head-h: 176px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}

img { display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input { font-family: inherit; }

/* ---------- 顶部 ---------- */
#hdr {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
}

.hdr-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 6px;
}

.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }

.logo {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  letter-spacing: .5px;
  flex: 0 0 auto;
}

.brand-txt { min-width: 0; }
.brand-sub {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: .3px;
  line-height: 1.2;
}
.brand-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: .5px;
  line-height: 1.25;
  margin: 0;
}

.login-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  flex: 0 0 auto;
}

.search-wrap { padding: 4px 14px 8px; }

.search-row { display: flex; align-items: center; gap: 8px; }

.btn-map {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 4px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap;
}
.btn-map:active { background: var(--red-dark); }

.search-box {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: var(--bg);
  border-radius: var(--r-md);
}
.search-box svg { flex: 0 0 auto; opacity: .5; }
.search-box input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: none;
  font-size: 13px; color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-3); }
.search-clear { font-size: 11px; color: var(--ink-3); padding: 2px 4px; display: none; }
.search-box.filled .search-clear { display: block; }

/* 统计页签（2026-11-10 版：全部 / 在售 / 已结束 / 已撤回 / 推荐） */
.stats {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px 8px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.stat-tabs {
  display: flex; align-items: center; gap: 6px;
  flex: 1; min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.stat-tabs::-webkit-scrollbar { display: none; }

.stat-tab {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 0;
  min-width: 46px;
  padding: 2px 6px 3px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  line-height: 1.15;
}
.stat-tab .n {
  font-size: 14px; font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-tab .l { font-size: 10px; color: var(--ink-3); }
.stat-tab.on { background: var(--red-soft); }
.stat-tab.on .n { color: var(--red); }
.stat-tab.on .l { color: var(--red); font-weight: 600; }

.btn-long {
  flex: 0 0 auto;
  height: 26px; padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 11px; font-weight: 700;
  white-space: nowrap;
}

.stat-plain { flex: 0 0 auto; }
.stat-plain b { color: var(--red); font-weight: 700; }
.stat-sep { color: var(--line); }

/* 筛选/日期条 */
.filterbar {
  position: sticky;
  top: var(--head-h);
  z-index: 25;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  box-shadow: 0 2px 6px rgba(16,24,40,.03);
}
.filterbar::-webkit-scrollbar { display: none; }

.btn-filter {
  display: inline-flex; align-items: center; gap: 4px;
  height: 30px; padding: 0 12px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12.5px; font-weight: 600;
  flex: 0 0 auto;
}
.btn-filter.on { background: var(--red-dark); }
.btn-filter .caret { font-size: 9px; opacity: .9; }

.day-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.day-chip svg { opacity: .45; }
.day-chip.on {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
  font-weight: 600;
}
.day-chip b { font-weight: 700; }

/* ---------- 列表 ---------- */
#main { padding: 0 0 96px; }

.day-sep {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 14px 8px;
  font-size: 13.5px; font-weight: 700;
  color: var(--ink);
}
.day-sep .tag-y {
  font-size: 10px; font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  background: var(--red-soft);
  color: var(--red);
  letter-spacing: .3px;
}
.day-sep .day-right {
  margin-left: auto;
  font-size: 10.5px; font-weight: 500;
  color: var(--ink-3);
}

.list { padding: 0 14px; display: flex; flex-direction: column; gap: 10px; }

.card {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .12s ease;
}
.card:active { transform: scale(.993); }

.card-thumb {
  position: relative;
  width: 108px; height: 108px;
  flex: 0 0 auto;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb .noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--ink-3);
  background: var(--bg);
  text-align: center;
  padding: 4px;
}
/* 无图占位：显示小区首字（原站 2026-11-10 版样式） */
.card-thumb .noimg-big {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 700;
  color: var(--red);
  background: #FBF7F8;
  letter-spacing: 0;
}

/* 继续加载 */
.more-btn {
  display: block;
  width: calc(100% - 28px);
  margin: 14px 14px 4px;
  height: 42px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow);
}
.more-end {
  padding: 16px;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-3);
}
.thumb-count {
  position: absolute; right: 4px; bottom: 4px;
  padding: 1px 5px;
  border-radius: var(--r-sm);
  background: rgba(26,26,26,.6);
  color: #fff;
  font-size: 9.5px;
  font-weight: 500;
}

.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.card-head { display: flex; align-items: flex-start; gap: 6px; }
.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-title .town { color: var(--ink-2); font-weight: 600; }

.badge-promo {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: var(--r-sm) 0 var(--r-sm) 0;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag {
  font-size: 10px;
  line-height: 1.5;
  padding: 1px 5px;
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--ink-2);
  white-space: nowrap;
}
.tag.t-town { background: var(--blue-soft); color: var(--blue); }
.tag.t-round { background: #F2F3F5; color: var(--ink-2); }
.tag.t-kind { background: var(--green-soft); color: var(--green); }
.tag.t-state-doing { background: var(--red-soft); color: var(--red); }
.tag.t-state-soon { background: var(--gold-soft); color: var(--gold); }
.tag.t-state-end { background: #F2F3F5; color: var(--ink-3); }

.card-meta {
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--ink-2);
  display: flex; flex-wrap: wrap; gap: 0 10px;
  align-items: baseline;
}
.card-meta .v-area { color: var(--blue); font-weight: 700; font-size: 12px; }
.card-meta .v-unit { color: var(--red); font-weight: 600; }
.card-meta .u { font-size: 10px; color: var(--ink-3); font-weight: 400; margin-left: 1px; }

.card-foot {
  margin-top: auto;
  display: flex; align-items: flex-end;
  padding-top: 8px;
}
.price-big {
  display: flex; align-items: baseline; gap: 1px;
  color: var(--red);
  font-weight: 800;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
}
.price-big .num { font-size: 25px; line-height: 1; letter-spacing: -.5px; }
.price-big .unit { font-size: 11px; font-weight: 600; margin-left: 1px; }
.price-big .tail { font-size: 10px; font-weight: 500; color: var(--ink-2); margin-left: 4px; }

.card-foot .kpr {
  margin-left: auto;
  text-align: right;
  font-size: 10px;
  color: var(--ink-3);
  line-height: 1.45;
}
.card-foot .kpr b { display: block; font-size: 11px; color: var(--ink-2); font-weight: 600; }
.card-foot .kpr.urgent b { color: var(--red); }

.empty {
  padding: 56px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.empty .big { font-size: 15px; color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }

/* ---------- 底部导航 ---------- */
.bnav {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bnav button {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 0 6px;
  font-size: 10px;
  color: var(--ink-3);
}
.bnav button.on { color: var(--red); font-weight: 600; }
.bnav svg { width: 21px; height: 21px; }

/* ---------- 抽屉 / 弹层 ---------- */
.mask {
  position: fixed; inset: 0;
  z-index: 50;
  background: rgba(16, 24, 40, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.mask.on { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 60;
  max-height: 82vh;
  background: #fff;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  transform: translateY(100%);
  transition: transform .26s cubic-bezier(.32,.72,0,1);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.on { transform: translateY(0); }

.sheet-hd {
  display: flex; align-items: center;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.sheet-hd h2 { margin: 0; font-size: 15px; font-weight: 700; }
.sheet-close { margin-left: auto; font-size: 18px; color: var(--ink-3); padding: 0 4px; line-height: 1; }
.sheet-bd { overflow-y: auto; padding: 12px 16px 16px; -webkit-overflow-scrolling: touch; }
.sheet-ft {
  display: flex; gap: 10px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
}
.btn-reset {
  flex: 0 0 auto; padding: 0 20px; height: 42px;
  border-radius: var(--r-md);
  background: var(--bg); color: var(--ink-2);
  font-size: 14px; font-weight: 600;
}
.btn-apply {
  flex: 1; height: 42px;
  border-radius: var(--r-md);
  background: var(--red); color: #fff;
  font-size: 14px; font-weight: 700;
}

.fgroup { margin-bottom: 16px; }
.fgroup h3 {
  margin: 0 0 8px;
  font-size: 12.5px; font-weight: 700; color: var(--ink);
}
.fopts { display: flex; flex-wrap: wrap; gap: 8px; }
.fopt {
  padding: 7px 13px;
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 12.5px;
  border: 1px solid transparent;
}
.fopt.on {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(200,16,46,.35);
  font-weight: 700;
}
.fopt.multi { position: relative; }

/* ---------- 详情 ---------- */
.detail-page {
  position: fixed; inset: 0; z-index: 70;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 104px;
}
.detail-page.on { transform: translateX(0); }

.d-topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.d-back { font-size: 18px; color: var(--ink); padding: 0 6px; line-height: 1; }
.d-topbar .t {
  font-size: 14px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.d-topbar .fav { margin-left: auto; font-size: 17px; color: var(--ink-3); padding: 0 4px; }
.d-topbar .fav.on { color: var(--gold); }

.gallery {
  display: flex; gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  background: #111;
  padding: 0;
}
.gallery::-webkit-scrollbar { height: 0; }
.gallery img {
  width: 100%; flex: 0 0 100%;
  height: 260px;
  object-fit: cover;
  scroll-snap-align: center;
}
.gallery .ph {
  width: 100%; flex: 0 0 100%; height: 260px;
  display: flex; align-items: center; justify-content: center;
  color: #777; font-size: 12px; background: #1d1d1d;
}
.gal-idx {
  position: sticky; left: 100%;
  transform: translate(-100%, -24px);
  width: max-content;
  padding: 2px 8px;
  margin-right: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff; font-size: 10.5px;
}

.d-sec { background: #fff; margin-top: 8px; padding: 14px; }
.d-sec:first-of-type { margin-top: 0; }
.d-sec h2 {
  margin: 0 0 10px;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.d-sec h2::before {
  content: ""; width: 3px; height: 12px; border-radius: 2px;
  background: var(--red);
}

.d-title { font-size: 17px; font-weight: 700; line-height: 1.35; }
.d-sub { margin-top: 5px; font-size: 12px; color: var(--ink-2); }

.d-price {
  display: flex; align-items: flex-end; gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.d-price .main { color: var(--red); font-weight: 800; display: flex; align-items: baseline; }
.d-price .main .n { font-size: 30px; line-height: 1; letter-spacing: -1px; }
.d-price .main .u { font-size: 12px; margin-left: 2px; }
.d-price .side { margin-left: auto; text-align: right; font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.d-price .side b { display: block; font-size: 13px; color: var(--ink-2); font-weight: 600; }

.d-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }

.kv { display: grid; grid-template-columns: 84px 1fr; gap: 8px 10px; font-size: 12.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.kv dd.hl { color: var(--red); font-weight: 700; }

.disc-box {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--gold-soft);
  margin-bottom: 10px;
}
.disc-box .big { font-size: 19px; font-weight: 800; color: var(--gold); }
.disc-box .txt { font-size: 11.5px; color: var(--ink-2); line-height: 1.45; }

.cd-box {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--red-soft);
}
.cd-box .lbl { font-size: 11.5px; color: var(--red-dark); font-weight: 600; }
.cd-box .val {
  margin-left: auto;
  font-size: 17px; font-weight: 800; color: var(--red);
  font-variant-numeric: tabular-nums;
  letter-spacing: .5px;
}

.bands { display: flex; flex-direction: column; gap: 6px; }
.band {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  background: var(--bg);
}
.band.cur { background: var(--blue-soft); }
.band .r { color: var(--ink-2); width: 72px; flex: 0 0 auto; }
.band .m { font-weight: 700; color: var(--ink); }
.band .n { margin-left: auto; font-size: 10.5px; color: var(--ink-3); }
.band .cur-tag { font-size: 9.5px; color: var(--blue); font-weight: 700; }

.note-hint {
  font-size: 11.5px; color: var(--ink-3); line-height: 1.6;
  margin-top: 8px;
}

/* ---- 小区档案（2026-11-10 新版） ---- */
.addr-row {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 10px;
}
.addr-main { flex: 1; min-width: 0; }
.addr {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  line-height: 1.4;
  word-break: break-all;
}
.addr-row .prec {
  display: inline-block;
  margin-left: 6px;
  font-size: 10.5px;
  padding: 0 5px;
  border-radius: 4px;
  vertical-align: 1px;
  background: #F2F3F5;
  color: var(--ink-3);
}
.addr-row .coord {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.addr-row .go {
  flex: none; align-self: center;
  font-size: 12px;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 14px;
  padding: 4px 11px;
  text-decoration: none;
  white-space: nowrap;
}

.hist { border-top: 1px solid var(--line); padding-top: 10px; }
.hist-h {
  font-size: 12px; font-weight: 700; color: var(--ink);
  margin-bottom: 8px;
}
.hist-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-2);
}
.hist-row:last-child { border-bottom: 0; }
.hist-row .hd { width: 74px; flex: 0 0 auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hist-row .hr { flex: 0 0 auto; color: var(--ink-2); }
.hist-row .ha { flex: 0 0 auto; }
.hist-row .hp { margin-left: auto; font-weight: 700; color: var(--red); }
.hist-row .hist-go {
  flex: 0 0 auto;
  font-size: 10px;
  color: var(--blue);
  text-decoration: none;
  border: 1px solid var(--blue-soft);
  border-radius: 4px;
  padding: 1px 4px;
}

/* ---- 生成房源长图 ---- */
.long-wrap { padding: 0 4px; }
.long-wrap img { width: 100%; border-radius: var(--r-md); box-shadow: var(--shadow); }

.d-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
  display: flex; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.d-foot .ghost {
  flex: 0 0 auto; padding: 0 18px; height: 44px;
  border-radius: var(--r-md);
  background: var(--bg); color: var(--ink-2);
  font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center;
}
.d-foot .primary {
  flex: 1; height: 44px;
  border-radius: var(--r-md);
  background: var(--red); color: #fff;
  font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* 全屏看图 */
.viewer {
  position: fixed; inset: 0; z-index: 90;
  background: #000;
  display: none;
}
.viewer.on { display: flex; align-items: center; }
.viewer img { width: 100%; max-height: 100%; object-fit: contain; }
.viewer .vclose {
  position: absolute; top: 14px; right: 16px;
  color: #fff; font-size: 24px; line-height: 1;
}

/* 笔记图预览 */
.note-wrap { text-align: center; }
.note-wrap img { width: 100%; max-width: 360px; margin: 0 auto; border-radius: var(--r-lg); box-shadow: var(--shadow); }

/* 宽屏：居中一列 */
@media (min-width: 720px) {
  body { background: #EDEFF2; }
  #hdr, .filterbar, #main, .bnav {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }
  .bnav { left: 50%; right: auto; transform: translateX(-50%); width: 100%; max-width: 720px; }
  /* 宽屏改为「向上滑出」，横移会在 720px 列外露出半屏 */
  .detail-page {
    left: 50%;
    right: auto;
    margin: 0;
    width: 100%;
    max-width: 720px;
    transform: translate(-50%, 100%);
  }
  .detail-page.on { transform: translate(-50%, 0); }
  .sheet {
    left: 50%;
    right: auto;
    width: 100%;
    max-width: 720px;
    transform: translate(-50%, 100%);
  }
  .sheet.on { transform: translate(-50%, 0); }
  .gallery img, .gallery .ph { height: 340px; }
  .list { gap: 12px; }
}

/* 骨架屏 */
.skel { padding: 0 14px; }
.skel-row {
  height: 128px; border-radius: var(--r-lg);
  background: linear-gradient(90deg, #fff 0%, #f7f8fa 50%, #fff 100%);
  background-size: 200% 100%;
  animation: sk 1.2s infinite linear;
  margin-bottom: 10px;
}
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ================= 地图找房 ================= */
.map-view {
  position: fixed; inset: 0; z-index: 80;
  display: none;
  flex-direction: column;
  background: #fff;
}
.map-view.on { display: flex; }

.map-top {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.map-back { font-size: 20px; line-height: 1; padding: 0 6px; color: var(--ink); }
.map-title { flex: 1; min-width: 0; line-height: 1.3; }
.map-title b { font-size: 14.5px; font-weight: 700; }
.map-title span { font-size: 10.5px; color: var(--ink-3); margin-left: 4px; }
.map-reset {
  flex: 0 0 auto;
  font-size: 12px; color: var(--red);
  border: 1px solid var(--red); border-radius: 999px;
  padding: 4px 11px; background: #fff;
}

.map-body { position: relative; flex: 1 1 auto; min-height: 0; }
.map-canvas { position: absolute; inset: 0; background: #EEF1F4; }

.map-legend {
  position: absolute; left: 10px; top: 10px; z-index: 500;
  display: flex; gap: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 2px 8px rgba(16,24,40,.12);
  font-size: 10.5px; color: var(--ink-2);
}
.map-legend .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 3px; vertical-align: 0;
}
.dot-on { background: #C8102E; }
.dot-end { background: #8B9098; }
.dot-promo { background: #B8860B; }

.map-fallback {
  position: absolute; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  background: rgba(244,245,247,.96);
  text-align: center; font-size: 13px; color: var(--ink-2);
  padding: 24px;
}

.map-sheet {
  flex: 0 0 auto;
  max-height: 42vh;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
  background: #fff;
}
.ms-head {
  display: flex; align-items: baseline; gap: 6px;
  padding: 9px 14px 6px;
  flex: 0 0 auto;
}
.ms-head b { font-size: 13px; font-weight: 700; }
.ms-head span { font-size: 10.5px; color: var(--ink-3); }
.ms-list { overflow-y: auto; padding: 0 14px 12px; -webkit-overflow-scrolling: touch; }

.ms-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.ms-row:last-child { border-bottom: 0; }
.ms-thumb {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: var(--r-sm); overflow: hidden; background: var(--bg);
}
.ms-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-thumb .ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 20px; font-weight: 700; color: var(--red); background: #FBF7F8;
}
.ms-info { flex: 1; min-width: 0; }
.ms-name {
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ms-name .prec {
  font-size: 9.5px; font-weight: 400; color: var(--ink-3);
  background: #F2F3F5; border-radius: 3px; padding: 0 4px; margin-left: 4px;
}
.ms-meta { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.ms-price {
  flex: 0 0 auto;
  font-size: 15px; font-weight: 800; color: var(--red);
  font-variant-numeric: tabular-nums;
}
.ms-price i { font-size: 10px; font-weight: 600; font-style: normal; margin-left: 1px; }
.ms-empty { padding: 26px 0; text-align: center; font-size: 12px; color: var(--ink-3); }

.map-tip {
  font-size: 11px !important;
  border-radius: 5px !important;
  box-shadow: 0 2px 10px rgba(16,24,40,.16) !important;
}
.map-tip b { font-size: 12px; }

/* 地图标记：小区名 + 最低价 + 套数（复刻原站胶囊样式） */
.mk-wrap { background: none; border: 0; }
.mk-wrap .mk {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: #fff;
  border: 1px solid rgba(200, 16, 46, .38);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .22);
  white-space: nowrap;
  font-size: 10.5px;
  line-height: 1.35;
  cursor: pointer;
  transition: transform .12s ease;
}
.mk-wrap .mk:hover { transform: translate(-50%, -50%) scale(1.06); }
.mk .nm {
  font-weight: 600; color: var(--ink);
  max-width: 104px; overflow: hidden; text-overflow: ellipsis;
}
.mk .pr { font-weight: 800; color: var(--red); }
.mk .n { color: var(--ink-3); font-size: 9.5px; }

/* 合并后的簇标记 */
.mk-wrap .mk-cluster {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 3px 10px rgba(200, 16, 46, .34);
}
.mk-cluster .nm, .mk-cluster .pr, .mk-cluster .n { color: #fff; }
