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

:root {
  --brand: #0e5aa7;
  --brand-dark: #0a4482;
  --brand-light: #e8f1fb;
  --accent: #c8551f;
  --ink: #1a1f28;
  --ink-2: #5b6673;
  --ink-3: #8d98a5;
  --line: #e6eaf0;
  --bg: #f2f5f9;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(16, 38, 68, .07);
  --shadow-lg: 0 8px 30px rgba(16, 38, 68, .14);
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--brand); text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- 顶部 ---------- */
.hd {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 14px) 0 12px;
  position: relative;
}
.hd-in { padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.hd-logo {
  width: 40px; height: 40px; border-radius: 9px; flex: 0 0 40px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; letter-spacing: -1px;
}
.hd-txt { min-width: 0; }
.hd-company {
  font-size: 16px; font-weight: 700; letter-spacing: .3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hd-sub { font-size: 11.5px; opacity: .82; margin-top: 1px; }
.hd-btn {
  margin-left: auto; flex: 0 0 auto;
  background: rgba(255, 255, 255, .17); border: 1px solid rgba(255, 255, 255, .3);
  color: #fff; border-radius: 20px; padding: 6px 13px; font-size: 12.5px;
}

/* ---------- 筛选 ---------- */
.filters {
  background: #fff; padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
  box-shadow: 0 2px 8px rgba(16, 38, 68, .05);
}
.sel-row { display: flex; gap: 8px; margin-bottom: 8px; }
.sel {
  flex: 1 1 0; min-width: 0;
  background: #f6f8fb; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px; font-size: 13.5px; color: var(--ink);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath fill='%238d98a5' d='M5.5 7L0 1h11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 26px; text-overflow: ellipsis;
}
.sel:focus { outline: none; border-color: var(--brand); background-color: #fff; }
.search-row { display: flex; gap: 8px; }
.search-in {
  flex: 1; background: #f6f8fb; border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 12px; font-size: 13.5px; min-width: 0;
}
.search-in:focus { outline: none; border-color: var(--brand); background: #fff; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 9px 0 1px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 4px 11px; border-radius: 15px; font-size: 12.5px;
  background: #f1f4f8; color: var(--ink-2); border: 1px solid transparent;
}
.chip.on { background: var(--brand); color: #fff; font-weight: 600; }

/* ---------- 主体 ---------- */
.wrap { padding: 12px 12px 76px; }
.count-bar {
  display: flex; align-items: baseline; gap: 8px; padding: 2px 2px 10px;
  font-size: 12.5px; color: var(--ink-2);
}
.count-bar b { color: var(--brand); font-size: 15px; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px;
  display: flex; transition: transform .12s ease;
}
.card:active { transform: scale(.985); }
.card-media {
  position: relative; flex: 0 0 132px; width: 132px; background: #e8ecf2;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; min-height: 118px; }
.card-media .ph {
  width: 100%; height: 100%; min-height: 118px;
  display: flex; align-items: center; justify-content: center;
  color: #aab4c0; font-size: 11px;
  background: linear-gradient(135deg, #eef2f7, #e2e8f0);
}
.card-media .badge {
  position: absolute; left: 7px; top: 7px;
  background: rgba(14, 90, 167, .92); color: #fff;
  font-size: 11px; padding: 2px 7px; border-radius: 5px; font-weight: 600;
}
.card-media .badge.v { background: rgba(200, 85, 31, .92); }
/* 置顶房源：卡片描边 + 右上角标识，让重点房源在一堆卡片里一眼可见 */
.card.pinned { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(200, 85, 31, .28); }
.card-media .pin-flag {
  position: absolute; right: 7px; top: 7px;
  background: rgba(200, 85, 31, .95); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 5px; font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.card.pinned .card-title { color: #b3541f; }

/* 第三方平台链接 */
.ext-list { display: flex; flex-direction: column; gap: 8px; }
.ext-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; background: #fafbfc;
  text-decoration: none; color: inherit;
}
.ext-item:active { background: var(--brand-light); border-color: var(--brand); }
.ext-ico {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 7px;
  background: #e8f0fa; color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.ext-tx { flex: 1; min-width: 0; }
.ext-tx b { display: block; font-size: 13.5px; }
.ext-tx span {
  display: block; font-size: 11.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ext-go { flex: 0 0 auto; color: var(--ink-3); font-size: 16px; }
.card-body { flex: 1; min-width: 0; padding: 11px 12px; }
.card-title {
  font-size: 14.5px; font-weight: 700; margin: 0 0 5px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-addr {
  font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tag {
  font-size: 11px; background: #f1f5fa; color: var(--ink-2);
  padding: 2px 7px; border-radius: 4px;
}
.tag.hot { background: #fdf0ea; color: var(--accent); }
.tag.co { background: #eaf4ec; color: #1d7a45; font-weight: 600; }
.price-row {
  display: flex; align-items: baseline; gap: 4px; margin-bottom: 5px;
}
.price {
  color: var(--accent); font-size: 19px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price-unit { font-size: 11.5px; color: var(--accent); opacity: .85; }
.price-tip { font-size: 11px; color: var(--ink-3); margin-left: 3px; }
.card-foot {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-2); border-top: 1px dashed var(--line);
  padding-top: 8px; margin-top: 2px;
}
.card-foot .who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot .tel {
  margin-left: auto; flex: 0 0 auto; background: var(--brand-light); color: var(--brand);
  border-radius: 14px; padding: 3px 11px; font-size: 12px; font-weight: 600;
}

/* ---------- 空状态 / 底部 ---------- */
.empty { text-align: center; padding: 64px 24px; color: var(--ink-3); }
.empty .ico { font-size: 44px; margin-bottom: 10px; opacity: .55; }
.empty .t { font-size: 15px; color: var(--ink-2); margin-bottom: 4px; }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px;
}
.dock-info { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; min-width: 0; flex: 1; }
.dock-info b { color: var(--ink); font-weight: 600; }
.btn-main {
  flex: 0 0 auto; background: var(--brand); color: #fff;
  border-radius: 22px; padding: 9px 22px; font-size: 14px; font-weight: 600;
}
.btn-main:active { background: var(--brand-dark); }
.btn-main.acc { background: var(--accent); }

/* ---------- 详情页 ---------- */
.gallery { background: #0d1116; position: relative; }
.gal-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; aspect-ratio: 1 / 1;
}
.gal-track::-webkit-scrollbar { display: none; }
.gal-item { flex: 0 0 100%; scroll-snap-align: start; position: relative; }
.gal-item img, .gal-item video { width: 100%; height: 100%; object-fit: contain; }
.gal-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; color: #4a5563; font-size: 13px;
  background: linear-gradient(135deg, #1c2530, #131a22);
}
.gal-count {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  background: rgba(0, 0, 0, .58); color: #fff; border-radius: 13px;
  padding: 3px 10px; font-size: 12px;
}
.gal-video-tag {
  position: absolute; left: 12px; top: 12px; z-index: 3;
  background: rgba(200, 85, 31, .92); color: #fff;
  border-radius: 5px; padding: 3px 8px; font-size: 11.5px; font-weight: 600;
}

/* 左右切换按钮 */
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; z-index: 4;
  background: rgba(0, 0, 0, .42); color: #fff;
  font-size: 27px; line-height: 1; backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .22);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .18s, background .18s;
}
.gal-nav:active { background: rgba(0, 0, 0, .68); }
.gal-prev { left: 10px; }
.gal-next { right: 10px; }
.gal-nav.off { opacity: .25; pointer-events: none; }

/* 图片计数 */
.gal-counter {
  position: absolute; right: 12px; bottom: 12px; z-index: 4;
  background: rgba(0, 0, 0, .55); color: #fff; border-radius: 12px;
  padding: 3px 11px; font-size: 12px; font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.gal-track img { cursor: zoom-in; }
/* 「点击放大」角标：让用户知道图能点（很多人以为点图没反应是坏了） */
.gal-zoom {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  background: rgba(0, 0, 0, .5); color: #fff; border-radius: 12px;
  padding: 3px 10px; font-size: 11.5px; pointer-events: none;
}
.nav-back {
  position: absolute; left: 12px; top: calc(env(safe-area-inset-top) + 12px); z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0, 0, 0, .42); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  backdrop-filter: blur(4px);
}
.gal-dots {
  position: absolute; left: 0; right: 0; bottom: 6px; z-index: 3;
  display: flex; justify-content: center; gap: 5px;
}
.gal-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .4); }
.gal-dots i.on { background: #fff; width: 16px; border-radius: 3px; }

.sheet {
  background: var(--bg); border-radius: 18px 18px 0 0;
  margin-top: -18px; position: relative; z-index: 2;
  padding: 16px 14px calc(80px + env(safe-area-inset-bottom));
  min-height: 60vh;
}
.sheet::before {
  content: ''; position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  width: 36px; height: 4px; border-radius: 2px; background: #d3dae3;
}
.d-ttl { font-size: 19px; font-weight: 800; line-height: 1.35; margin: 0 0 9px; }
.d-price {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  background: linear-gradient(135deg, #fff6f1, #fdeee5);
  border: 1px solid #f6d9c8; border-radius: 12px;
  padding: 11px 13px; margin-bottom: 13px;
}
.d-price .p { color: var(--accent); font-size: 27px; font-weight: 800; line-height: 1; }
.d-price .u { color: var(--accent); font-size: 13px; }
.d-price .n { margin-left: auto; font-size: 11.5px; color: var(--ink-3); text-align: right; }

.sec { background: #fff; border-radius: 12px; padding: 13px; margin-bottom: 11px; }
.sec-t {
  font-size: 14px; font-weight: 700; margin: 0 0 10px;
  padding-left: 9px; border-left: 3px solid var(--brand); line-height: 1.2;
}
.kv { display: flex; flex-wrap: wrap; }
.kv-item {
  width: 50%; padding: 7px 0; display: flex; gap: 6px; align-items: baseline;
  border-bottom: 1px dashed #f0f3f7; font-size: 13px;
}
.kv-item .k { color: var(--ink-3); flex: 0 0 auto; font-size: 12.5px; }
.kv-item .v { color: var(--ink); font-weight: 600; text-align: right; margin-left: auto; word-break: break-all; }
.kv-item.w { width: 100%; }

.hl { display: flex; flex-wrap: wrap; gap: 6px; }
.hl span {
  font-size: 12px; background: var(--brand-light); color: var(--brand);
  padding: 4px 10px; border-radius: 6px; font-weight: 500;
}
.desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.contact {
  display: flex; align-items: center; gap: 11px;
}
.contact .av {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 42px;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
}
.contact .ci { min-width: 0; flex: 1; }
.contact .cn { font-size: 15px; font-weight: 700; }
.contact .cp { font-size: 12.5px; color: var(--ink-2); }

.foot-note {
  text-align: center; font-size: 11.5px; color: var(--ink-3);
  padding: 16px 12px 6px; line-height: 1.7;
}

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  display: flex; gap: 9px; align-items: center;
}
.bar .who {
  flex: 0 0 auto; font-size: 11px; color: var(--ink-3); line-height: 1.3;
  max-width: 78px; overflow: hidden;
}
.bar .who b { display: block; color: var(--ink); font-size: 12.5px; }
.btn {
  flex: 1; border-radius: 22px; padding: 11px 0; font-size: 14.5px;
  font-weight: 700; text-align: center;
}
.btn-g { background: #eef3f9; color: var(--brand); }
.btn-b { background: var(--brand); color: #fff; }
.btn-o { background: var(--accent); color: #fff; }
.btn:active { opacity: .82; }

/* ---------- 表单 / 弹层 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(12, 22, 36, .55);
  z-index: 60; display: flex; align-items: flex-end;
}
.modal {
  background: #fff; border-radius: 18px 18px 0 0; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  animation: up .22s ease;
}
@keyframes up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-t { font-size: 17px; font-weight: 800; margin: 0 0 3px; }
.modal-s { font-size: 12.5px; color: var(--ink-3); margin: 0 0 15px; }
.fld { margin-bottom: 13px; }
.fld label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.fld label i { color: var(--accent); font-style: normal; }
.fld input, .fld select, .fld textarea {
  width: 100%; border: 1px solid var(--line); background: #f8fafc;
  border-radius: 10px; padding: 11px 12px; font-size: 15px; appearance: none;
  -webkit-appearance: none;
}
.fld textarea { min-height: 78px; resize: vertical; line-height: 1.6; }
.fld input:focus, .fld select:focus, .fld textarea:focus {
  outline: none; border-color: var(--brand); background: #fff;
}
.fld select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath fill='%238d98a5' d='M5.5 7L0 1h11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 28px;
}
.fld .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
.btn-row .btn { padding: 12px 0; }

.toast {
  position: fixed; left: 50%; top: 22%; transform: translateX(-50%);
  background: rgba(20, 28, 40, .92); color: #fff;
  padding: 11px 20px; border-radius: 10px; font-size: 14px; z-index: 90;
  max-width: 84%; text-align: center; line-height: 1.5;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.loading { text-align: center; padding: 40px 0; color: var(--ink-3); font-size: 13px; }
.spin {
  width: 22px; height: 22px; margin: 0 auto 9px;
  border: 2.5px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%; animation: sp .7s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- 底部操作表 ---------- */
.sheet2 {
  background: #fff; border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  width: 100%; animation: up .22s ease;
}
.share-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px; border: 1px solid var(--line); border-radius: 11px;
  margin-bottom: 9px; width: 100%; text-align: left;
}
.share-item:active { background: #f7f9fc; }
.share-ico {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 38px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: var(--brand-light);
}
.share-tx b { display: block; font-size: 14.5px; }
.share-tx span { font-size: 12px; color: var(--ink-3); }

/* ---------- 图片全屏查看器 ---------- */
.viewer {
  /* 不用 inset:0 —— 老 iOS（<14.5）不认识，全屏层会缩成一点，
     表现为「点了放大没反应」（v1.42 用户报的场景之一） */
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 95;
  background: rgba(8, 10, 14, .97);
  display: flex; flex-direction: column;
  animation: fade .16s ease;
}
.viewer-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 8px;
  color: #fff; flex: 0 0 auto;
}
.viewer-tip {
  font-size: 11.5px; color: rgba(255, 255, 255, .55); margin-left: auto; margin-right: 10px;
}
.viewer-idx { font-size: 13.5px; opacity: .85; font-variant-numeric: tabular-nums; }
.viewer-idx b { font-size: 17px; }
.viewer-x {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 17px;
}
.viewer-body {
  flex: 1 1 auto; min-height: 0; position: relative;
  display: flex; align-items: center; justify-content: center;
  /* 手势全由 JS 接管（捏合缩放/拖动），别让浏览器抢去做页面滚动 */
  touch-action: none;
}
.viewer-body img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  -webkit-user-select: none; user-select: none;
  transition: transform .16s ease;
  touch-action: none;
}
.viewer-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; z-index: 2;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 29px;
  display: flex; align-items: center; justify-content: center;
}
.viewer-nav.prev { left: 12px; }
.viewer-nav.next { right: 12px; }
.viewer-nav.off { opacity: .2; pointer-events: none; }
.viewer-dots {
  flex: 0 0 auto; display: flex; justify-content: center; gap: 6px;
  padding: 12px 0 calc(env(safe-area-inset-bottom) + 12px);
}
.viewer-dots i {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .32);
}
.viewer-dots i.on { background: #fff; width: 18px; border-radius: 4px; }
/* ---------- v1.47 后台资产列表顶部摘要行（admin.html 内联样式同款） ---------- */
.astrip { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0 0 9px; font-size: 12.5px; }
.astrip-item { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; background: #f2f5fa; border: 1px solid #e3e9f2; color: var(--ink-2, #4a5568); }
.astrip-item b { font-size: 13.5px; color: var(--ink, #1f2733); }
.astrip-item i { font-style: normal; font-size: 11px; color: #8b97a8; }
.astrip-item.warn { background: #fdf3ec; border-color: #f2ddc9; }
.astrip-total { background: #eaf1fd; border-color: #cddff9; color: #2b5dad; }
.astrip-total b { color: #2b5dad; }
/* ---------- v1.49 删除申请条 ---------- */
.dreq { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 7px 10px; border: 1px solid #f2ddc9; background: #fdf8f2; border-radius: 9px; margin: 0 0 6px; font-size: 12.5px; }
.dreq-t b { color: var(--ink, #1f2733); }
.dreq-a { color: #8b97a8; }
.dreq-r { color: #9a6b2f; flex: 1 1 220px; min-width: 200px; }
.dreq-ops { margin-left: auto; display: inline-flex; gap: 6px; }


.param-list-scan { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.param-list-scan label { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; cursor: pointer; }
