/* 하우지 손님 사이트 스타일 — 색상은 아래 :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; }
.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; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.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 .meta { font-size: 13px; color: var(--sub); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card .meta i { 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-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: 4 / 3; }
.slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.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; }
.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; }
.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 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; }
.done { text-align: center; padding: 40px 18px; }
.done svg { width: 54px; height: 54px; color: var(--green); }

/* 메뉴 */
.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); } }
