/* 하우지 손님 사이트 스타일 — 색상은 아래 :root 값만 바꾸면 전체에 반영됩니다 */
:root {
  --green: #4e7056;
  --green-d: #3d5a45;
  --green-l: #e7efe8;
  --mint: #f4f7f4;
  --line: #e3e9e3;
  --ink: #222;
  --sub: #6b736c;
  --white: #fff;
  --red: #d9534f;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(40, 70, 50, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--mint); color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg.i { width: 1.25em; height: 1.25em; flex: none; vertical-align: middle; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 상단 ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(244, 247, 244, .92); backdrop-filter: blur(10px); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; color: var(--green); letter-spacing: -.5px; }
.logo svg { width: 34px; height: 34px; }
.top-actions { display: flex; gap: 6px; }
.icon-btn { position: relative; width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent; display: grid; place-items: center; color: var(--ink); }
.icon-btn:hover { background: var(--green-l); }
.icon-btn svg { width: 26px; height: 26px; }
.count { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.count:empty { display: none; }

/* ---------- 히어로 ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(115deg, #f3f7f2 0%, #e9f0e7 55%, #dfe9dc 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 22px; padding-bottom: 86px; }
.hero .pill { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .75); font-size: 13px; color: #3c463e; }
.hero h1 { margin: 12px 0 8px; font-size: 27px; line-height: 1.3; letter-spacing: -1px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero p { margin: 0; color: #4b544c; font-size: 15px; }
.hero-img { position: absolute; inset: 0 0 0 auto; width: 62%; height: 100%; object-fit: cover; opacity: .95; -webkit-mask-image: linear-gradient(to right, transparent, #000 35%); mask-image: linear-gradient(to right, transparent, #000 35%); }
.hero-deco { position: absolute; right: -40px; bottom: 40px; width: 220px; height: 160px; opacity: .5; }

/* ---------- 검색 ---------- */
.search { position: relative; z-index: 2; margin-top: -70px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 14px; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.field { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 48px; background: #fff; }
.field svg { color: var(--sub); }
.field select, .field input { min-width: 0; text-overflow: ellipsis; border: 0; outline: 0; background: transparent; width: 100%; height: 100%; appearance: none; -webkit-appearance: none; font-size: 14px; }
.field.sel::after { content: ''; position: absolute; right: 14px; width: 7px; height: 7px; border-right: 1.8px solid #555; border-bottom: 1.8px solid #555; transform: rotate(45deg) translateY(-3px); pointer-events: none; }
.field.kw { background: #f6f8f6; border-color: transparent; }
.field:focus-within { border-color: var(--green); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; white-space: nowrap; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-d); }
.btn.ghost:hover { border-color: var(--green); color: var(--green); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.search .btn.primary { grid-column: 1 / -1; }

/* ---------- 바로가기 ---------- */
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 18px 0 8px; }
.quick button, .quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; background: #f8fbf8; border: 1px solid var(--line); border-radius: 14px; font-size: 13px; color: #333; }
.quick svg { width: 30px; height: 30px; color: var(--green); }
.quick button:hover, .quick a:hover { border-color: var(--green); background: #fff; }
.quick small { display: none; color: var(--sub); font-size: 12px; }

/* ---------- 본문 ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 14px 0 40px; }
.layout > * { min-width: 0; }
.panel { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 18px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; letter-spacing: -.5px; }
.sec-head h2 svg { color: var(--green); width: 24px; height: 24px; }
.more { font-size: 14px; color: #444; background: none; border: 0; display: inline-flex; align-items: center; gap: 2px; }
.row-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll .card { flex: 0 0 72%; scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.sort { height: 34px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; font-size: 14px; }
.notice { padding: 40px 10px; text-align: center; color: var(--sub); }
.notice .btn { margin-top: 12px; }
.filter-info { font-size: 13px; color: var(--sub); margin: -6px 0 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fav-ask { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: -4px 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--mint); font-size: 14px; }
.fav-ask[hidden] { display: none; }
.fav-ask .btn { white-space: nowrap; }
.fav-ask-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.sheet.share-sheet { padding: 26px 22px 24px; max-width: 420px; }
.share-sheet h3 { margin: 0 0 6px; font-size: 18px; }
.share-sheet p { margin: 0 0 16px; color: #6b736c; font-size: 14px; }
.share-to { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.share-to .btn { padding: 0 10px; }
.share-sheet .share-note { margin: -8px 0 14px; font-size: 12px; color: #8a918b; }
.share-to .btn.kakao { background: #fee500; border-color: #fee500; color: #191919; }
.share-sheet .share-state { margin: 0 0 12px; color: var(--green-d); font-weight: 700; font-size: 15px; }
.share-sheet .share-state.fail { color: #c0492f; }
.share-steps { margin: 0 0 16px; padding: 12px 14px 12px 32px; background: #f4f7f4; border-radius: 12px; font-size: 14px; line-height: 1.55; }
.share-steps li + li { margin-top: 4px; }
.share-steps small { display: block; color: #6b736c; font-size: 12.5px; }
.share-label { display: block; margin-bottom: 6px; font-size: 13px; color: #6b736c; }
.share-text { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 13px; line-height: 1.5; resize: none; background: #fff; color: #2a332b; }
.share-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.share-more [hidden] { display: none; }
/* 보낼 내용 고르기 */
.share-pick { margin: 0 0 14px; }
.share-pick .pick-h { margin: 10px 0 6px; font-size: 13px; font-weight: 700; color: #2a332b; }
.share-pick .pick-h small { font-weight: 500; color: #6b736c; margin-left: 4px; }
.pick { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; cursor: pointer; background: #fff; }
.pick input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); flex: none; }
.pick b { display: block; font-size: 14px; }
.pick small { display: block; color: #6b736c; font-size: 12.5px; margin-top: 2px; }
.pick:has(input:checked) { border-color: var(--green); background: #f3f8f2; }
.pick.cond em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--green); border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
/* 상담봇 조건 저장 표시줄 */
.cond-bar { display: flex; align-items: center; gap: 10px; margin: -4px 0 12px; padding: 10px 12px; border-radius: 14px; background: #eef5ed; border: 1px solid #d5e3d4; font-size: 14px; }
.cond-bar[hidden] { display: none; }
.cond-bar > div { flex: 1; min-width: 0; }
.cond-bar .cb-ico { color: var(--green); display: grid; place-items: center; }
.cond-bar .cb-ico .i { width: 26px; height: 26px; }
.cond-bar .cb-val { display: block; color: var(--green-d); font-weight: 700; margin-top: 2px; }
.cond-bar small { display: block; color: #6b736c; font-size: 12.5px; margin-top: 2px; }
.cond-bar .btn { flex: none; }
.auto-note { margin: -4px 0 12px; padding: 8px 12px; border-radius: 10px; background: #eef5ed; color: var(--green-d); font-size: 13px; font-weight: 600; }
.auto-note[hidden] { display: none; }
.closed-note { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #fff3e6; color: #a35a12; font-size: 14px; font-weight: 600; }
.closed-note[hidden] { display: none; }
.filter-info button { border: 0; background: var(--green-l); color: var(--green-d); border-radius: 8px; padding: 3px 8px; font-size: 12px; }

/* ---------- 매물 카드 ---------- */
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; text-align: left; padding: 0; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.thumb { position: relative; aspect-ratio: 4 / 3; background: #e8eee8; overflow: hidden; }
/* 사진은 자르지 않고 전체 표시(contain). 가로 4:3은 꽉 차고, 세로 3:4는 양옆을 같은 사진을 흐리게 채움 */
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb img.fg { position: relative; z-index: 1; }
.thumb img.bg, .slide img.bg { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(16px) brightness(.85); pointer-events: none; }
/* 사진을 못 불러왔을 때 (app.js) */
.thumb.img-err img, .slide.img-err img { visibility: hidden; }
.thumb.img-err::after, .slide.img-err::after { content: '사진 준비 중'; position: absolute; inset: 0; display: grid; place-items: center; color: #8a928b; font-size: 13px; background: #e8eee8; }
.thumb .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa59b; }
.badge { position: absolute; left: 10px; bottom: 10px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--green); color: #fff; z-index: 3; }
.badge.ing { background: #e8a23a; }
.badge.top { background: #d9573f; }
.heart { position: absolute; right: 8px; top: 8px; z-index: 4; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .18); color: #fff; display: grid; place-items: center; }
.heart svg { width: 22px; height: 22px; }
.heart.on { color: #ff5a6a; background: rgba(255, 255, 255, .9); }
.card .body { padding: 12px 14px 14px; }
.card .loc { font-size: 14px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .date { margin-top: 6px; font-size: 12px; color: #8a928b; }
.card .date.new { color: var(--green); font-weight: 700; }
.card .price { font-size: 18px; font-weight: 800; margin: 2px 0 6px; letter-spacing: -.3px; }
.card .price2 { margin: -4px 0 6px; font-size: 13px; font-weight: 600; color: var(--green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta { font-size: 13px; color: var(--sub); display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.card .meta i { flex: 0 0 1px; width: 1px; height: 11px; background: #ccd3cc; }

/* ---------- 사진 보호 ---------- */
.protect { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.protect img { pointer-events: none; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.protect::after { content: ''; position: absolute; inset: 0; z-index: 2; } /* 사진 위 투명 막 */
@media print { img, .thumb, .slider { display: none !important; } }

/* ---------- 상담봇 ---------- */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chat-head b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.chat-head b svg { width: 28px; height: 28px; color: var(--green); }
.chat-head .state { font-size: 12px; color: var(--sub); }
.chat-close { display: none; }
.chat-head .state { display: none; }
.chat-head b { white-space: nowrap; margin-right: auto; }
.chat-head .chat-reset { margin-left: 8px; }
.chat-head .chat-close { margin-left: 6px; }
.chat-reset { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--sub); white-space: nowrap; }
.chat-reset svg { width: 14px; height: 14px; }
.chat-reset:hover { color: var(--green-d); border-color: var(--green); }
.opts.multi button.on { background: var(--green); border-color: var(--green); color: #fff; }
.opts.multi button.on::before { content: "✓ "; }
.opts.list { flex-direction: column; align-items: stretch; }
.opts.list button { text-align: left; border-radius: 12px; padding: 9px 12px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 2px; display: flex; flex-direction: column; gap: 10px; min-height: 260px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14px; white-space: pre-line; }
.msg.bot { background: var(--mint); border-top-left-radius: 4px; }
.msg.me { align-self: flex-end; background: var(--green); color: #fff; border-top-right-radius: 4px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.opts button, .opts a { padding: 7px 12px; border-radius: 999px; border: 1px solid #cfdccf; background: #fff; font-size: 13px; color: var(--green-d); }
.opts button:hover, .opts a:hover { background: var(--green-l); }
.chat-input { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; height: 44px; border: 1px solid var(--line); border-radius: 22px; padding: 0 16px; outline: 0; }
.chat-input input:focus { border-color: var(--green); }
.chat-input button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--green); color: #fff; display: grid; place-items: center; }
.chat-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #eaf2e9; border: 1px solid #d5e3d4; box-shadow: var(--shadow); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.chat-banner svg { width: 36px; height: 36px; color: var(--green); }
.chat-banner div { flex: 1; font-size: 14px; line-height: 1.35; }
.chat-banner small { color: var(--sub); }
aside.chat-panel { display: none; }
aside.chat-panel.open { display: block; position: fixed; inset: 0; z-index: 60; border-radius: 0; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
aside.chat-panel.open .chat-close { display: grid; }

/* ---------- 모달 ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: none; background: rgba(20, 30, 22, .5); }
.modal.open { display: flex; align-items: flex-end; justify-content: center; }
.sheet { position: relative; background: #fff; width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0; animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-close { position: absolute; top: 10px; right: 10px; z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.slider { position: relative; background: #1d241e; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1 / 1; max-height: 70vh; overflow: hidden; }
.slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slide img.fg { position: relative; z-index: 1; }
.slide-count { position: absolute; right: 12px; bottom: 12px; z-index: 3; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; }
.slide-nav { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); display: none; place-items: center; }
.slide-nav.prev { left: 10px; } .slide-nav.next { right: 10px; }
.detail { padding: 18px 18px 24px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { padding: 3px 10px; border-radius: 8px; background: var(--green-l); color: var(--green-d); font-size: 12px; font-weight: 600; }
.tag.gray { background: #f0f2f0; color: #555; font-weight: 500; }
.detail h3 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.5px; }
.detail .loc { color: var(--sub); font-size: 14px; }
.detail .bigprice { font-size: 24px; font-weight: 800; color: var(--green-d); margin: 10px 0 14px; }
.detail .altprice { margin: -8px 0 14px; display: grid; gap: 2px; font-size: 16px; font-weight: 700; color: #3c463e; }
.detail .altprice span { font-weight: 500; color: var(--sub); font-size: 14px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); margin: 0 0 16px; }
.specs div { display: flex; justify-content: space-between; gap: 8px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.specs div:nth-child(odd) { padding-right: 12px; }
.specs div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
.specs dt { color: var(--sub); } .specs dd { margin: 0; text-align: right; font-weight: 600; }
.desc { white-space: pre-wrap; font-size: 15px; background: var(--mint); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .wide { grid-column: 1 / -1; }

/* 문의 폼 */
.form { padding: 22px 18px 24px; display: grid; gap: 12px; }
.form h3 { margin: 0; font-size: 20px; }
.form .about { margin: -6px 0 2px; color: var(--sub); font-size: 14px; white-space: pre-line; max-height: 140px; overflow-y: auto; }
.form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: #444; }
.form input, .form textarea, .form select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: 0; background: #fff; font-weight: 400; font-size: 15px; }
.form input:focus, .form textarea:focus { border-color: var(--green); }
.form .two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.consent { background: var(--mint); border-radius: 12px; padding: 12px; font-size: 13px; color: #444; }
.consent label { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-top: 8px; color: var(--ink); }
.consent label + label { margin-top: 4px; }
.consent small { display: block; margin-top: 6px; color: var(--sub); }
.consent small a { color: var(--green-d); text-decoration: underline; }
.consent input { flex: none; width: 18px; height: 18px; accent-color: var(--green); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .err { color: var(--red); font-size: 14px; min-height: 1em; }
.alert { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 30, 22, .45); }
.alert[hidden] { display: none; }
.alert-box { width: 100%; max-width: 340px; background: #fff; border-radius: 20px; padding: 28px 22px 20px; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); animation: pop .18s ease; }
.alert-box svg { width: 52px; height: 52px; color: var(--green); }
.alert-box h3 { margin: 8px 0 6px; font-size: 18px; }
.alert-box p { margin: 0 0 18px; color: #6b736c; font-size: 14px; line-height: 1.55; }
.alert-box .btn { width: 100%; justify-content: center; height: 46px; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* 메뉴 */
.drawer { position: fixed; inset: 0; z-index: 80; display: none; background: rgba(20, 30, 22, .4); }
.drawer.open { display: block; }
.drawer nav { position: absolute; right: 0; top: 0; bottom: 0; width: min(300px, 82vw); background: #fff; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.drawer nav a, .drawer nav button { display: flex; align-items: center; gap: 10px; padding: 13px 10px; border-radius: 10px; border: 0; background: none; text-align: left; font-size: 15px; }
.drawer nav a:hover, .drawer nav button:hover { background: var(--mint); }
.drawer nav svg { color: var(--green); }

/* 하단 */
footer { background: #fff; border-top: 1px solid var(--line); padding: 26px 0 110px; font-size: 13px; color: #555; }
footer b { color: var(--ink); font-size: 15px; }
footer ul { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
footer .links { display: flex; gap: 14px; margin-top: 8px; }
footer .links a { color: var(--green-d); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 99; transform: translateX(-50%); background: #263127; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.skeleton { background: linear-gradient(90deg, #eef2ee 25%, #f7f9f7 50%, #eef2ee 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; height: 260px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- 태블릿 이상 ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .row-scroll .card { flex-basis: 42%; }
  .modal.open { align-items: center; }
  .sheet { max-width: 720px; border-radius: 22px; }
}

/* ---------- PC ---------- */
@media (min-width: 1024px) {
  body { font-size: 15px; }
  .topbar .wrap { height: 72px; }
  .hero .wrap { padding-top: 46px; padding-bottom: 120px; }
  .hero h1 { font-size: 44px; }
  .hero p { font-size: 17px; }
  .hero-deco { width: 460px; height: 320px; right: 6%; }
  .search { grid-template-columns: 1fr 1fr 1fr 1.4fr auto; align-items: center; padding: 12px; border-radius: 22px; margin-top: -86px; }
  .search .btn.primary { grid-column: auto; padding: 0 30px; }
  .quick small { display: block; }
  .quick button, .quick a { flex-direction: row; justify-content: center; gap: 12px; padding: 16px 8px; text-align: left; font-size: 15px; font-weight: 600; }
  .layout { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .row-scroll .card { flex-basis: calc(25% - 9px); }
  aside.chat-panel { display: block; position: sticky; top: 90px; height: calc(100vh - 110px); max-height: 640px; }
  aside.chat-panel.open { position: sticky; inset: auto; z-index: auto; border-radius: 20px; }
  aside.chat-panel .chat-close { display: none !important; }
  .chat-banner { display: none; }
  .slide-nav { display: grid; }
  .slide { aspect-ratio: 16 / 10; }
  .sheet { max-width: 860px; }
  footer { padding-bottom: 40px; }
  .toast { bottom: 40px; }
}
@media (min-width: 1240px) { .grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 첫 화면 줄이기 (2026-11-22): 첫 화면에 매물 1줄이 보이도록 배너·검색·바로가기 높이 축소 ---------- */
.hero .wrap { padding-top: 14px; padding-bottom: 56px; }
.hero .pill { display: none; }
.hero h1 { margin: 0 0 4px; font-size: 22px; }
.hero p { font-size: 13px; }
.hero p br { display: none; }
.hero-deco { width: 150px; height: 110px; bottom: 24px; }
.search { margin-top: -40px; padding: 10px; gap: 8px; }
.quick { gap: 8px; margin: 12px 0 4px; }
.quick button, .quick a { padding: 8px 2px; gap: 4px; font-size: 12px; }
.quick svg { width: 24px; height: 24px; }
@media (min-width: 1024px) {
  .hero .wrap { padding-top: 22px; padding-bottom: 56px; }
  .hero h1 { font-size: 32px; margin: 0 0 6px; }
  .hero h1 br { display: none; }
  .hero p { font-size: 15px; }
  .hero-deco { width: 210px; height: 150px; right: 6%; bottom: 0; }
  .search { margin-top: -40px; padding: 10px; }
  .quick small { display: none; }
  .quick button, .quick a { padding: 12px 8px; font-size: 15px; }
  .quick svg { width: 26px; height: 26px; }
}
/* 인기 매물 카드도 PC에서 한 줄 3개 (전체 매물과 같은 폭 → 면적·방·층 정보가 잘리지 않게) */
@media (min-width: 1024px) { .row-scroll .card { flex-basis: calc(33.333% - 8px); } }

/* 맨 아래 개인 페이지 안내 (config.js PAGE_NOTE) */
.page-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #eef3ee; color: #4f5a51; font-size: 12.5px; line-height: 1.5; }
.foot-phone { margin: 10px 0 0; font-weight: 700; color: #2f3a31; }
.foot-phone a { color: inherit; }

/* ---------- 페이지 번호 (12개씩) ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager button { min-width: 38px; height: 38px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; color: #333; display: grid; place-items: center; }
.pager button svg { width: 16px; height: 16px; }
.pager button.on { background: var(--green); border-color: var(--green); color: #fff; }
.pager button:disabled { opacity: .35; }
.pager span { color: var(--sub); padding: 0 2px; }

/* ---------- 전체 매물 화면: 상담봇은 작은 버튼, 매물은 넓게 ---------- */
.back-home { display: none; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--green-d); margin-left: auto; margin-right: 8px; }
.back-home svg { width: 14px; height: 14px; }
body.mode-all .back-home { display: inline-flex; }
body.mode-all #popSec { display: none; }
body.mode-all .chat-banner { display: none; }
.chat-fab { display: none; position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40; width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--green); color: #fff; box-shadow: 0 8px 24px rgba(40, 70, 50, .28); flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 11px; font-weight: 700; }
.chat-fab svg { width: 28px; height: 28px; }
body.mode-all .chat-fab { display: flex; }
body.mode-all:has(#chatPanel.open) .chat-fab { display: none; }
body.mode-all footer { padding-bottom: 100px; } /* 동그란 버튼이 전화번호를 가리지 않게 */
/* 휴대폰: 한 줄에 2개 */
@media (max-width: 639px) {
  body.mode-all .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  body.mode-all .card .body { padding: 9px 10px 11px; }
  body.mode-all .card .loc { font-size: 12.5px; }
  body.mode-all .card .price { font-size: 15px; }
  body.mode-all .card .price2, body.mode-all .card .meta { font-size: 11.5px; }
  body.mode-all .card .meta { font-size: 11px; gap: 4px; letter-spacing: -.3px; }
  body.mode-all .card .meta svg { display: none; }
  body.mode-all .heart { width: 30px; height: 30px; }
}
/* PC: 상담봇 칸을 없애고 매물 한 줄 4개, 상담봇은 오른쪽 아래 작은 창으로 */
@media (min-width: 1024px) {
  body.mode-all .layout { grid-template-columns: minmax(0, 1fr); }
  body.mode-all .grid { grid-template-columns: repeat(4, 1fr); }
  body.mode-all aside.chat-panel { display: none; }
  body.mode-all aside.chat-panel.open { display: block; position: fixed; top: auto; left: auto; right: 24px; bottom: 24px; width: 360px; height: 560px; max-height: calc(100vh - 48px); z-index: 60; border-radius: 20px; box-shadow: 0 12px 40px rgba(40, 70, 50, .25); }
  body.mode-all aside.chat-panel.open .chat-close { display: grid !important; }
  body.mode-all .chat-fab { right: 24px; bottom: 24px; }
  body.mode-all footer { padding-bottom: 100px; }
}
/* 목록으로 이동할 때 제목이 위 고정 메뉴에 가리지 않게 */
#listSec { scroll-margin-top: 80px; }
@media (min-width: 1024px) { #listSec { scroll-margin-top: 88px; } }
/* 전체 매물 화면: 위 배너·바로가기는 숨기고 검색창만 남김 */
body.mode-all .hero, body.mode-all .quick { display: none; }
body.mode-all .search { margin-top: 14px; }
body.mode-all .layout { padding-top: 14px; }

/* 인기 매물 (휴대폰): 1위 한 장을 꽉 차게, 옆으로 넘기면 다음 순위 */
.pop-dots { display: none; }
@media (max-width: 639px) {
  .row-scroll .card { flex-basis: 100%; scroll-snap-stop: always; }
  .pop-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
  .pop-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: #cfd8cf; transition: width .2s, background .2s; }
  .pop-dots button.on { width: 20px; background: var(--green); }
}

/* ---------- PC 여백 줄이기 (2026-11-23): 넓은 화면에서 양옆 빈 공간·칸 사이 간격 축소 ---------- */
.chat-input input { min-width: 0; } /* 보내기 버튼이 상담봇 칸 밖으로 밀려나던 문제 */
@media (min-width: 1024px) {
  .wrap { padding: 0 24px; }
  .layout { gap: 16px; padding-top: 10px; }
  .panel { padding: 16px; }
  .sec-head { margin-bottom: 10px; }
  .grid { gap: 12px; }
  .row-scroll { gap: 12px; }
  #popSec { margin-bottom: 16px !important; }
  .quick { margin: 10px 0 2px; }
}
/* 큰 모니터(1440px 이상): 화면을 더 넓게 쓰고 한 줄에 매물 4개 (전체 매물 화면은 5개) */
@media (min-width: 1440px) {
  .wrap { max-width: 1680px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .row-scroll .card { flex-basis: calc(25% - 9px); }
  .layout { grid-template-columns: minmax(0, 1fr) 360px; }
  body.mode-all .grid { grid-template-columns: repeat(5, 1fr); }
}
