/* ===================== 基础与变量 ===================== */
:root {
  --green-50: #ecfdf5;
  --green-100: #d1fae5;
  --green-200: #a7f3d0;
  --green-300: #6ee7b7;
  --green-400: #34d399;
  --green-500: #10b981;
  --green-600: #059669;
  --green-700: #047857;
  --green-800: #065f46;
  --ink-900: #102a24;
  --ink-800: #1b3a33;
  --ink-700: #2f4f47;
  --ink-600: #4a635b;
  --ink-500: #647b73;
  --ink-400: #8aa099;
  --ink-300: #b6c6bf;
  --line: #e6efeb;
  --line-soft: #eff5f1;
  --bg: #f7faf8;
  --white: #ffffff;
  --amber: #f59e0b;
  --price: #e8632c;
  --danger: #e05252;
  /* 多层柔和阴影：比单层更接近真实光照，观感更精致 */
  --shadow-sm: 0 1px 2px rgba(16, 60, 45, .04), 0 4px 14px rgba(16, 60, 45, .05);
  --shadow-md: 0 2px 6px rgba(16, 60, 45, .05), 0 14px 34px rgba(16, 60, 45, .10);
  --shadow-lg: 0 8px 20px rgba(16, 60, 45, .10), 0 28px 64px rgba(16, 60, 45, .18);
  --ring: 0 0 0 4px rgba(16, 185, 129, .12);
  --radius: 16px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.22, .8, .28, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink-800);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 全局细节：选中色、滚动条、键盘焦点（不影响布局） */
::selection { background: var(--green-200); color: var(--ink-900); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfe0d8; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--green-300); }
:focus-visible { outline: 2px solid var(--green-500); outline-offset: 3px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.container { width: min(1200px, 92%); margin: 0 auto; }

/* ===================== 按钮 ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px; padding: 11px 22px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s ease, color .25s ease;
  user-select: none;
}
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--green-500), var(--green-600)); color: #fff; box-shadow: 0 6px 16px rgba(16,185,129,.28); }
.btn-primary:hover { background: linear-gradient(135deg, var(--green-600), var(--green-700)); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16,185,129,.36); }

/* ===================== 顶部导航 ===================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner {
  width: min(1200px, 92%); margin: 0 auto;
  height: 70px; display: flex; align-items: center; gap: 40px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(16,185,129,.3);
}
.brand-icon svg { width: 21px; height: 21px; }
.brand-text { font-size: 23px; font-weight: 800; letter-spacing: -.5px; color: var(--ink-900); }
.brand-dot { color: var(--green-500); }

.main-nav { display: flex; align-items: center; gap: 34px; flex: 1; }
.main-nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-500);
  position: relative; padding: 6px 0; transition: color .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--green-600); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 3px; border-radius: 3px; background: var(--green-500);
}
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: none; width: 26px; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; height: 2.5px; background: var(--ink-700); border-radius: 3px; transition: .3s; }

/* ===================== Hero ===================== */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 50% -10%, #f6fefb 0%, transparent 70%),
              linear-gradient(135deg, #ecfdf5 0%, #f0fdf8 45%, #e6f7f1 100%);
  padding: 76px 0 92px;
}
.hero-decor { position: absolute; border-radius: 50%; pointer-events: none; }
.decor-1 { width: 380px; height: 380px; background: radial-gradient(circle, var(--green-200), transparent 70%); top: -120px; right: 6%; filter: blur(26px); opacity: .55; }
.decor-2 { width: 300px; height: 300px; background: radial-gradient(circle, var(--green-100), transparent 70%); bottom: -140px; left: 2%; filter: blur(24px); opacity: .6; }
.hero-inner { width: min(1200px, 92%); margin: 0 auto; position: relative; z-index: 1; }
.hero-copy { text-align: center; max-width: 720px; margin: 0 auto 42px; }
.hero-badge {
  display: inline-block; padding: 7px 18px; border-radius: 20px;
  background: rgba(16,185,129,.12); color: var(--green-700);
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
  border: 1px solid rgba(16,185,129,.18);
}
.hero-copy h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.2; font-weight: 800; color: var(--ink-900); letter-spacing: -1px; }
.hero-copy h1 span { color: var(--green-500); position: relative; }
.hero-copy h1 span::after {
  content: ""; position: absolute; left: 4%; right: 4%; bottom: 4px; height: 8px;
  background: linear-gradient(90deg, var(--green-200), var(--green-100));
  border-radius: 6px; z-index: -1; opacity: .85;
}
.hero-copy p { margin-top: 18px; font-size: 16px; color: var(--ink-500); }

.search-panel {
  display: grid; grid-template-columns: 1fr 1.3fr 1fr auto; gap: 12px;
  background: #fff; padding: 14px; border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(16,60,45,.05), 0 20px 50px rgba(16,60,45,.14);
  border: 1px solid rgba(255,255,255,.9);
  max-width: 1000px; margin: 0 auto;
  align-items: end;
}
.search-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.search-field > label { font-size: 12px; font-weight: 600; color: var(--ink-500); padding-left: 4px; }
.select-wrap, .input-wrap { position: relative; display: flex; align-items: center; }
.field-icon { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--green-500); pointer-events: none; }
.select-wrap select, .input-wrap input {
  width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 11px;
  background: #fbfdfc; padding: 0 12px 0 40px; color: var(--ink-800);
  font-size: 14px; outline: none; transition: all .2s; appearance: none;
}
.select-wrap select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23647b73' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
.select-wrap select:focus, .input-wrap input:focus { border-color: var(--green-400); background-color: #fff; box-shadow: 0 0 0 4px rgba(16,185,129,.1); }
.input-wrap input::placeholder { color: var(--ink-400); }
.btn-search {
  height: 48px; padding: 0 26px; border-radius: 11px;
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(16,185,129,.32); transition: all .25s;
}
.btn-search svg { width: 18px; height: 18px; }
.btn-search:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(16,185,129,.42); }

.hero-hot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; font-size: 13px; color: var(--ink-500); }
.hot-tag { padding: 5px 14px; border-radius: 16px; border: 1px solid var(--green-200); background: rgba(255,255,255,.7); color: var(--green-700); font-size: 12px; transition: all .22s var(--ease); }
.hot-tag:hover { background: var(--green-500); color: #fff; border-color: var(--green-500); transform: translateY(-1px); }

/* ===================== 数据统计条 ===================== */
.stats-strip { background: #fff; border-bottom: 1px solid var(--line); }
.stats-inner { width: min(1200px, 92%); margin: 0 auto; display: flex; align-items: center; justify-content: space-around; padding: 26px 0; }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-item strong { font-size: 26px; font-weight: 800; color: var(--green-600); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-item span { font-size: 13px; color: var(--ink-500); }
.stat-divider { width: 1px; height: 34px; background: var(--line); }

/* ===================== 房源区 ===================== */
.houses-section { padding: 80px 0 90px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.section-head.center { justify-content: center; text-align: center; }
.section-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--green-500); margin-bottom: 10px; }
.section-head h2 { font-size: clamp(26px, 3.5vw, 34px); font-weight: 800; color: var(--ink-900); letter-spacing: -.5px; }
.section-head p { margin-top: 8px; font-size: 15px; color: var(--ink-500); }
.sort-wrap { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-500); }
.sort-wrap select { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; background: #fff; color: var(--ink-700); font-size: 13px; outline: none; cursor: pointer; }
.sort-wrap select:focus { border-color: var(--green-400); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter-chip { padding: 8px 20px; border-radius: 20px; border: 1px solid var(--line); background: #fff; color: var(--ink-500); font-size: 13px; font-weight: 500; transition: all .22s var(--ease); }
.filter-chip:hover { border-color: var(--green-300); color: var(--green-600); }
.filter-chip.active { background: var(--green-500); color: #fff; border-color: var(--green-500); box-shadow: 0 4px 12px rgba(16,185,129,.25); }

.house-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.house-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s ease;
  cursor: pointer;
}
.house-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--green-200); }
.house-cover { position: relative; height: 200px; overflow: hidden; }
.house-cover .cover-art { width: 100%; height: 100%; position: relative; }
/* 用渐变模拟房间插画的背景 */
.cover-art { background-size: cover; background-position: center; }
.cover-1 { background: linear-gradient(135deg,#d9f2e6,#a8dcc4); }
.cover-2 { background: linear-gradient(135deg,#fde8cf,#f3c89a); }
.cover-3 { background: linear-gradient(135deg,#dbe7fb,#a9c6ef); }
.cover-4 { background: linear-gradient(135deg,#f3dcee,#dcaed4); }
.cover-5 { background: linear-gradient(135deg,#d7f0ef,#9fd8d4); }
.cover-6 { background: linear-gradient(135deg,#eae4fb,#c3b3ec); }
.cover-7 { background: linear-gradient(135deg,#fbead0,#eecb95); }
.cover-8 { background: linear-gradient(135deg,#dcefd9,#a9d3a0); }
.cover-9 { background: linear-gradient(135deg,#e3e9f0,#b7c4d2); }
.cover-room {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 74px; opacity: .95;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.16));
  transition: transform .45s var(--ease);
}
.house-card:hover .cover-room { transform: scale(1.08) rotate(-3deg); }
.cover-photo { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.house-card:hover .cover-photo { transform: scale(1.06); }
.video-badge { position: absolute; right: 14px; bottom: 14px; padding: 4px 10px; border-radius: 8px; background: rgba(16,34,28,.68); color: #fff; font-size: 11px; font-weight: 600; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.16); }
.house-no-tag { position: absolute; left: 14px; bottom: 14px; padding: 4px 10px; border-radius: 8px; background: rgba(16,185,129,.94); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .3px; backdrop-filter: blur(4px); box-shadow: 0 2px 8px rgba(16,185,129,.35); }
.house-cover:has(.video-badge) .house-no-tag { bottom: auto; top: 48px; }

.house-body { padding: 18px 18px 20px; }
.house-title { font-size: 16px; font-weight: 700; color: var(--ink-900); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.house-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-500); margin-bottom: 14px; }
.house-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-400); }
.house-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.house-tags span { padding: 3px 9px; border-radius: 5px; background: var(--green-50); color: var(--green-700); font-size: 11px; font-weight: 500; }
.house-bottom { display: flex; align-items: flex-end; justify-content: space-between; padding-top: 14px; border-top: 1px dashed var(--line); }
.price { color: var(--price); font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: -.3px; }
.price small { font-size: 12px; font-weight: 500; }
.price-unit { font-size: 12px; color: var(--ink-400); }

.empty-state { text-align: center; padding: 70px 20px; }
.empty-icon { font-size: 54px; margin-bottom: 14px; }
.empty-state h3 { font-size: 20px; color: var(--ink-800); margin-bottom: 6px; }
.empty-state p { color: var(--ink-500); font-size: 14px; margin-bottom: 20px; }
.load-more-wrap { text-align: center; margin-top: 40px; }
.btn-load { padding: 12px 34px; border: 1.5px solid var(--green-300); color: var(--green-700); background: transparent; border-radius: 10px; }
.btn-load:hover { background: var(--green-50); }

/* ===================== 服务保障 ===================== */
.why-section { padding: 80px 0; background: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; margin-top: 40px; }
.why-card { padding: 32px 24px; border-radius: var(--radius); border: 1px solid var(--line); text-align: center; transition: all .3s; background: var(--bg); }
.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-sm); background: #fff; }
.why-icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 18px; }
.why-icon svg { width: 29px; height: 29px; }
.icon-green { background: var(--green-100); color: var(--green-600); }
.icon-teal { background: #d3f3ef; color: #0d9488; }
.icon-amber { background: #fef0d5; color: #d97706; }
.icon-violet { background: #ece8fb; color: #7c3aed; }
.why-card h3 { font-size: 17px; font-weight: 700; color: var(--ink-900); margin-bottom: 8px; }
.why-card p { font-size: 13px; color: var(--ink-500); line-height: 1.75; }

/* ===================== CTA ===================== */
.cta-section { padding: 70px 0; }
.cta-card {
  background: linear-gradient(120deg, var(--green-700), var(--green-600) 55%, var(--green-500));
  border-radius: var(--radius-lg); padding: 44px 50px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  box-shadow: 0 16px 40px rgba(16,150,105,.28); position: relative; overflow: hidden;
}
.cta-card::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; border: 30px solid rgba(255,255,255,.08); right: -60px; top: -100px; }
.cta-card::before { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); left: 30%; bottom: -110px; }
.cta-copy h2 { font-size: 27px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.cta-copy p { color: rgba(255,255,255,.85); font-size: 14px; }
.btn-cta { background: #fff; color: var(--green-700); padding: 13px 28px; border-radius: 10px; font-size: 15px; position: relative; z-index: 1; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.btn-cta span { font-size: 18px; }

/* ===================== 页脚 ===================== */
.site-footer { background: var(--ink-900); color: rgba(255,255,255,.62); }
.footer-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; padding: 60px 0 50px; }
.site-footer .brand-text { color: #fff; }
.site-footer .brand-icon { box-shadow: none; }
.footer-brand p { margin-top: 18px; font-size: 13px; line-height: 1.9; }
.footer-contact h4 { color: #fff; font-size: 16px; margin-bottom: 10px; font-weight: 600; }
.footer-contact > p { font-size: 13px; color: rgba(255,255,255,.5); margin-bottom: 20px; }
.footer-contact ul { list-style: none; display: flex; flex-wrap: wrap; gap: 16px 40px; }
.footer-contact li { display: flex; align-items: center; gap: 12px; }
.contact-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: rgba(16,185,129,.15); color: var(--green-400);
  display: grid; place-items: center;
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-info { display: flex; flex-direction: column; gap: 1px; }
.contact-label { font-size: 12px; color: rgba(255,255,255,.45); }
.contact-value {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; background: none; padding: 2px 6px 2px 0; border-radius: 6px;
  font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .3px;
  cursor: pointer; transition: color .2s;
}
.contact-value:hover { color: var(--green-300); }
.copy-icon { width: 15px; height: 15px; color: rgba(255,255,255,.45); transition: color .2s; }
.contact-value:hover .copy-icon { color: var(--green-400); }
.contact-value.copied { color: var(--green-400); }
.contact-value.copied .copy-icon { color: var(--green-400); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.4); }

/* ===================== 房源详情弹窗 ===================== */
.detail-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(9, 30, 24, .58); backdrop-filter: blur(7px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .28s var(--ease), visibility .28s;
}
.detail-overlay.open { opacity: 1; visibility: visible; }
.detail-modal {
  position: relative; width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.96); transition: transform .34s var(--ease);
}
.detail-overlay.open .detail-modal { transform: translateY(0) scale(1); }
.detail-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 34px; height: 34px; border: none; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink-700); display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.12); transition: all .2s; }
.detail-close svg { width: 18px; height: 18px; }
.detail-close:hover { background: var(--green-500); color: #fff; transform: rotate(90deg); }
.detail-cover { width: 100%; height: 240px; position: relative; background: var(--green-50); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.detail-cover .detail-emoji { width: 100%; height: 100%; display: grid; place-items: center; font-size: 96px; }
.detail-content { padding: 26px 30px 30px; }
.detail-content h3 { font-size: 22px; font-weight: 800; color: var(--ink-900); margin-bottom: 12px; }
.detail-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 18px; }
.gallery-item { position: relative; border-radius: 10px; overflow: hidden; background: var(--green-50); }
.gallery-item img, .gallery-item video { display: block; width: 100%; height: 150px; object-fit: cover; background: #000; }
.gallery-item:not(.video) img { cursor: zoom-in; }
/* 标签放到左上角并忽略鼠标事件，右上角留给放大按钮 */
.gallery-item .gallery-label {
  position: absolute; left: 8px; top: 8px; right: auto; bottom: auto;
  padding: 3px 9px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px;
  pointer-events: none;
}
/* 视频用 contain 完整显示 */
.gallery-item video { object-fit: contain; }
/* 小窗放大按钮：不遮挡原生播放控件 */
.video-zoom {
  position: absolute; right: 8px; top: 8px; z-index: 2;
  width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.28); border-radius: 8px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 16px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; transition: all .2s var(--ease);
}
.video-zoom:hover { background: var(--green-500); border-color: var(--green-500); transform: scale(1.06); }
/* 视频播放失败的提示 */
.video-error {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 12px; color: #fff; background: rgba(9,30,24,.82); font-size: 12px; line-height: 1.5;
}
.video-error.show { display: flex; }
.video-error span { font-size: 24px; }

/* ===================== 图片放大预览（Lightbox） ===================== */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 1600;
  background: rgba(6, 22, 17, .92); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s;
}
.lightbox-overlay.open { opacity: 1; visibility: visible; }
.lightbox-stage { position: relative; width: min(1080px, 100%); height: 100%; display: flex; align-items: center; justify-content: center; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 24px 80px rgba(0,0,0,.5); transform: scale(.96); transition: transform .25s var(--ease); }
.lightbox-overlay.open .lightbox-stage img { transform: scale(1); }
.lightbox-stage video {
  display: block; max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 12px; background: #000; box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.lightbox-stage [hidden] { display: none !important; }
/* 视频编码不兼容时的提示（只声音无画面时给出可操作建议） */
.video-warning {
  position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 40px)); padding: 22px 24px; border-radius: 14px;
  background: rgba(9, 30, 24, .94); border: 1px solid rgba(255,255,255,.14);
  color: #fff; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.video-warning strong { display: block; font-size: 16px; margin-bottom: 8px; }
.video-warning p { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.75); margin-bottom: 14px; }
.video-warning a {
  display: inline-block; padding: 8px 18px; border-radius: 8px;
  background: var(--green-500); color: #fff; font-size: 13px; font-weight: 600;
}
.video-warning a:hover { background: var(--green-600); }
.lightbox-btn {
  position: absolute; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.12); color: #fff;
  display: grid; place-items: center; backdrop-filter: blur(6px); transition: all .2s var(--ease);
}
.lightbox-btn:hover { background: rgba(255,255,255,.24); transform: scale(1.08); }
.lightbox-btn svg { width: 22px; height: 22px; }
.lightbox-close { top: 18px; right: 20px; }
.lightbox-fullscreen { top: 18px; right: 76px; }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover, .lightbox-next:hover { transform: translateY(-50%) scale(1.08); }
.lightbox-counter {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  padding: 6px 16px; border-radius: 16px; background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9); font-size: 13px; font-weight: 600; backdrop-filter: blur(6px);
}
.lightbox-hint { position: absolute; bottom: 18px; right: 20px; color: rgba(255,255,255,.5); font-size: 12px; }
@media (max-width: 560px) {
  .lightbox-overlay { padding: 56px 12px; }
  .lightbox-btn { width: 38px; height: 38px; }
  .lightbox-hint { display: none; }
}
.detail-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.detail-fact { display: flex; flex-direction: column; gap: 3px; }
.detail-fact span { font-size: 11px; color: var(--ink-400); }
.detail-fact strong { font-size: 15px; color: var(--ink-800); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.detail-tags span { padding: 4px 11px; border-radius: 6px; background: var(--green-50); color: var(--green-700); font-size: 12px; }
.detail-desc { font-size: 14px; color: var(--ink-700); line-height: 1.9; margin-bottom: 20px; }
.detail-desc h4 { font-size: 14px; color: var(--ink-900); margin-bottom: 8px; }
.detail-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); }
.detail-foot .price { font-size: 26px; }
.detail-contact { padding: 10px 20px; border-radius: 10px; background: linear-gradient(135deg, var(--green-500), var(--green-600)); color: #fff; font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: all .2s; }
.detail-contact:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,185,129,.35); }

/* ===================== 联系房东弹窗 ===================== */
.contact-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(9, 30, 24, .6); backdrop-filter: blur(7px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .28s var(--ease), visibility .28s;
}
.contact-overlay.open { opacity: 1; visibility: visible; }
.contact-modal {
  position: relative; width: min(430px, 100%);
  background: #fff; border-radius: 20px; padding: 34px 32px 28px;
  box-shadow: var(--shadow-lg); transform: translateY(20px) scale(.96);
  transition: transform .34s var(--ease);
}
.contact-overlay.open .contact-modal { transform: translateY(0) scale(1); }
.contact-head { text-align: center; margin-bottom: 24px; }
.contact-head-icon { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--green-400), var(--green-600)); color: #fff; box-shadow: 0 8px 20px rgba(16,185,129,.3); }
.contact-head-icon svg { width: 28px; height: 28px; }
.contact-head h3 { font-size: 21px; font-weight: 800; color: var(--ink-900); margin-bottom: 6px; }
.contact-head p { font-size: 12px; color: var(--ink-500); }
.contact-house-no { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 18px; border-radius: 11px; background: var(--green-50); border: 1px dashed var(--green-300); }
.contact-house-no > span { font-size: 12px; color: var(--ink-500); flex-shrink: 0; }
.contact-house-no strong { font-size: 17px; font-weight: 800; color: var(--green-700); letter-spacing: .5px; flex: 1; }
.contact-copy-small { border: none; background: var(--green-500); color: #fff; font-size: 11px; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.contact-copy-small:hover { background: var(--green-600); }
.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-row { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s; }
.contact-row:hover { border-color: var(--green-300); }
.contact-row-icon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; background: var(--green-50); color: var(--green-600); }
.contact-row-icon svg { width: 21px; height: 21px; }
.contact-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.contact-row-label { font-size: 11px; color: var(--ink-400); }
.contact-row-info .selectable { font-size: 18px; font-weight: 800; color: var(--ink-900); letter-spacing: .5px; }
.selectable { user-select: all; -webkit-user-select: all; cursor: text; }
.contact-copy { border: none; background: var(--green-500); color: #fff; font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; transition: all .2s; }
.contact-copy:hover { background: var(--green-600); transform: translateY(-1px); }
.contact-copy.copied { background: var(--ink-500); }
.contact-tip { text-align: center; font-size: 11px; color: var(--ink-400); margin-top: 20px; }

/* ===================== Toast ===================== */
.toast-container { position: fixed; top: 88px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 340px;
  padding: 13px 18px; border-radius: 12px; background: #fff; color: var(--ink-800);
  font-size: 13px; box-shadow: var(--shadow-md); border-left: 4px solid var(--green-500);
  transform: translateX(120%); opacity: 0; transition: transform .4s var(--ease), opacity .3s ease;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.error { border-left-color: var(--danger); }
.toast-icon { font-size: 17px; line-height: 1; }

/* ===================== 响应式 ===================== */
@media (max-width: 1080px) {
  .house-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .main-nav {
    position: absolute; top: 70px; left: 0; right: 0; flex-direction: column;
    align-items: stretch; gap: 0; background: #fff; padding: 8px 4% 16px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 10px; }
  .main-nav a.active::after { display: none; }
  .nav-toggle { display: flex; }
  .search-panel { grid-template-columns: 1fr 1fr; }
  .btn-search { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .hero { padding: 54px 0 62px; }
  .hero-copy h1 { font-size: 38px; }
  .stats-inner { flex-wrap: wrap; gap: 22px 0; }
  .stat-item { width: 45%; }
  .stat-divider { display: none; }
  .houses-section { padding: 60px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head.center { align-items: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
  .cta-card { flex-direction: column; align-items: flex-start; padding: 34px 28px; }
}

@media (max-width: 560px) {
  .header-inner { gap: 12px; }
  .search-panel { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .house-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .house-cover { height: 220px; }
  .toast-container { right: 14px; left: 14px; }
  .toast { max-width: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .footer-contact ul { flex-direction: column; gap: 18px; }
}

@media (max-width: 380px) {
  .btn-primary { padding: 10px 14px; font-size: 13px; }
  .hero-copy h1 { font-size: 32px; }
}
