/* 고홈즈 공통 스타일 — 휴대폰 우선, 태블릿·PC로 확장 */
:root {
  --y: #ffc20e;
  --y-deep: #f2a900;
  --y-soft: #fff6d6;
  --ink: #141414;
  --ink2: #444;
  --mute: #8a8a8a;
  --line: #ececec;
  --bg: #f6f6f3;
  --card: #fff;
  --red: #e5322d;
  --green: #1f9d55;
  --blue: #2563eb;
  --radius: 14px;
  --gutter: 16px;
  --header-h: 56px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 2px 10px rgba(0,0,0,.06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px; line-height: 1.5; word-break: keep-all; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); }
.hidden { display: none !important; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

/* ── 헤더 ── */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: #fff; border-bottom: 1px solid var(--line);
}
.header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header .side { width: 44px; display: flex; }
.header .side.right { justify-content: flex-end; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; }
/* 헤더 로고: 흰 테두리를 잘라낸 영문 로고(assets/logo-en.png, 384px) */
.brand img { height: 46px; width: 46px; border-radius: 10px; object-fit: cover; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.brand .name { font-size: 16px; letter-spacing: -.3px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--y); color: var(--ink);
}
.icon-btn svg { width: 22px; height: 22px; }
.top-nav { display: none; gap: 4px; }
.top-nav a { padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--ink2); }
.top-nav a.on, .top-nav a:hover { background: var(--y-soft); color: var(--ink); }

/* ── 현수막 광고 배너 (메인 맨 위) ── */
.hero-banner { margin-top: 14px; }
.hb-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 14px; }
.hb-track::-webkit-scrollbar { display: none; }
.hb-item { flex: 0 0 100%; scroll-snap-align: start; display: flex; gap: 14px; align-items: center; background: var(--y); color: var(--ink); padding: 14px; border-radius: 14px; min-width: 0; }
.hb-ph { width: 96px; height: 72px; border-radius: 10px; flex: none; background: #141414 center/cover; }
.hb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hb-info b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-info span { font-size: 13px; }
.hb-info .hb-tag { font-size: 12px; font-weight: 700; }
.hb-go { font-size: 28px; font-weight: 300; }
.hb-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.hb-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d6d6d6; }
.hb-dots i.on { background: var(--ink); width: 18px; border-radius: 4px; }
.sold-pop { position: relative; }
.sold-pop .btn { font-size: 15px; white-space: nowrap; padding: 0 8px; }
.pop-x { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; background: #f1f1ef; color: var(--ink2); font-size: 16px; }
.sold-msg { background: #f1f1ef; border-radius: 10px; padding: 14px 12px; font-size: 16px; font-weight: 700; line-height: 1.6; color: #333; }
.sold-note { margin-top: 10px; background: #f1f1ef; border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--ink2); }

/* ── PC 메인 지도·미리보기 (휴대폰에서는 숨김) ── */
.home-map, .home-brand { display: none; }
.map-count { position: absolute; left: 12px; top: 12px; z-index: 1000; background: #fff; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
/* PC 지도 핀 → 지도 위 작은 안내창 */
.map-pop { position: absolute; left: 12px; bottom: 12px; z-index: 1000; width: 420px; max-width: calc(100% - 24px); background: #fff; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.2); display: flex; gap: 12px; padding: 10px; align-items: center; }
.mp-ph { flex: 0 0 120px; height: 90px; border-radius: 8px; background: #ddd center/cover; }
.mp-info { flex: 1; min-width: 0; }
.mp-p { font-size: 18px; font-weight: 900; }
.mp-t { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-m { font-size: 12px; color: var(--mute); margin-top: 2px; }
.mp-go { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 700; background: var(--y); padding: 4px 12px; border-radius: 999px; }
.mp-x { position: absolute; right: 8px; top: 6px; color: #999; font-size: 14px; }

/* 메인 매물 카드 줄 (초급매·전속·주목): 휴대폰은 작은 카드 + 카드 위에 겹친 ‹ › 화살표 + 손가락 밀기 */
.home-side { display: none; }
.car-sec .sec-head h2 { font-size: 23px; font-weight: 900; letter-spacing: -.5px; }
.car-sec .sec-head h2 em { font-style: normal; background: linear-gradient(transparent 58%, #ffe27a 58%); }
.car { position: relative; }
.car-track { padding-top: 10px; scroll-padding: 0 var(--gutter); }
.hscroll.car-track > * { flex: 0 0 36%; }
.car-track .card .ph { aspect-ratio: auto; height: 72px; }
.car-track .card .badges { left: 5px; top: 5px; gap: 3px; }
.car-track .card .badge { height: 18px; padding: 0 5px; font-size: 10px; border-radius: 4px; }
.car-track .card .no { display: none; }
.car-track .card .body { padding: 7px 8px 9px; }
.car-track .card .price { font-size: 13px; }
.car-track .card .price .was { display: none; }
.car-track .card .ttl { font-size: 11px; min-height: 0; -webkit-line-clamp: 1; }
.car-track .card .meta { font-size: 10px; margin-top: 2px; }
.car-arr { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.25); font-size: 22px; line-height: 1; color: var(--ink); display: grid; place-items: center; padding-bottom: 3px; }
.car-arr.prev { left: -6px; }
.car-arr.next { right: -6px; }
.car-arr.off { display: none; }
.car-hint { text-align: center; font-size: 12px; color: var(--mute); margin: 2px 0 0; }

/* ── 검색 ── */
.search { margin: 16px 0 4px; position: relative; }
.search input {
  width: 100%; height: 48px; border-radius: 999px; border: 2px solid var(--ink);
  padding: 0 52px 0 20px; background: #fff; outline: none;
}
.search button {
  position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--y); display: grid; place-items: center;
}
.search button svg { width: 20px; height: 20px; }

/* ── 섹션 ── */
.sec { padding: 28px 0 8px; }
.sec-head { text-align: center; margin-bottom: 14px; }
.sec-head h2 { font-size: 21px; margin: 0; font-weight: 800; letter-spacing: -.3px; }
.sec-head p { margin: 4px 0 0; color: var(--mute); font-size: 14px; }
.sec-head.row { display: flex; align-items: flex-end; justify-content: space-between; text-align: left; }
.more-link { font-size: 14px; color: var(--ink2); font-weight: 600; padding: 8px 0; }
.empty { text-align: center; color: var(--mute); padding: 28px 0; font-size: 14px; }

/* ── 가로 스크롤 카드 ── */
.hscroll {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 12px;
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: 0 0 75%; scroll-snap-align: start; }

.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: block; position: relative;
}
.card .ph { aspect-ratio: 4 / 3; background: #ddd center/cover no-repeat; position: relative; }
.card .badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.card .no { position: absolute; right: 10px; top: 10px; }
.card .body { padding: 12px 14px 14px; }
.card .price { font-size: 18px; font-weight: 800; }
.card .price .was { font-size: 13px; color: var(--mute); text-decoration: line-through; font-weight: 500; margin-left: 6px; }
.card .ttl { font-size: 14px; color: var(--ink2); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.card .meta { font-size: 13px; color: var(--mute); margin-top: 6px; }
.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 700; background: var(--ink); color: #fff;
}
.badge.urgent { background: var(--y); color: var(--ink); }
.badge.excl { background: var(--ink); color: var(--y); }
.badge.feat { background: var(--blue); }
.badge.sold { background: #666; }
.badge.light { background: rgba(255,255,255,.92); color: var(--ink); }
.badge.off { background: #333; color: #fff; }
.badge.sample { background: #fff; color: var(--mute); border: 1px solid var(--line); }

/* ── 최신매물 목록 ── */
.rows { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); min-height: 88px; align-items: center; }
.row:last-child { border-bottom: 0; }
.row .thumb { width: 72px; height: 72px; border-radius: 10px; flex: none; background: #ddd center/cover; }
.row .info { flex: 1; min-width: 0; }
.row .ttl { font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .ttl b { color: var(--mute); font-weight: 600; margin-right: 4px; }
.row .price { font-weight: 800; margin-top: 2px; }

/* ── 소개 ── */
.about { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px 20px; }
.about .tag { display: inline-block; background: var(--y); color: var(--ink); font-weight: 800; padding: 4px 10px; border-radius: 6px; font-size: 13px; }
.about h3 { font-size: 21px; margin: 12px 0 8px; line-height: 1.4; }
.about p { color: #d6d6d6; margin: 0 0 12px; font-size: 15px; }
.about .sign { color: var(--y); font-weight: 700; }
.about .points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.about .points div { background: #222; border-radius: 10px; padding: 12px 6px; text-align: center; font-size: 13px; }
.about .points b { display: block; color: var(--y); font-size: 15px; margin-bottom: 2px; }
.mini-map { height: 200px; border-radius: 12px; overflow: hidden; background: #e8e8e8; margin-top: 4px; }

/* ── 의뢰 3단계 ── */
.steps-box { background: var(--y); border-radius: var(--radius); padding: 24px 20px; }
.steps-box .kicker { font-size: 13px; font-weight: 700; }
.steps-box h3 { font-size: 21px; margin: 4px 0 4px; }
.steps-box > p { margin: 0 0 16px; font-size: 14px; }
.step { display: flex; gap: 12px; background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 8px; }
.step .n { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--y); font-weight: 800; display: grid; place-items: center; flex: none; }
.step b { display: block; }
.step span { font-size: 13px; color: var(--ink2); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

/* ── 버튼·폼 ── */
.btn {
  height: 48px; padding: 0 18px; border-radius: 12px; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  background: var(--ink); color: #fff;
}
.btn.y { background: var(--y); color: var(--ink); }
.btn.w { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.red { background: var(--red); color: #fff; }
.btn.sm { height: 36px; font-size: 14px; padding: 0 12px; width: auto; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 20px; height: 20px; }
.form-box { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field > label .req { color: var(--red); }
.field .hint { font-size: 12px; color: var(--mute); margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; height: 48px; border: 1px solid #d9d9d9; border-radius: 10px; padding: 0 14px;
  background: #fff; outline: none;
}
.textarea { height: 120px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid #d9d9d9; background: #fff;
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 40px; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); }
.linkish { text-decoration: underline; color: var(--ink2); font-size: 13px; padding: 4px; }

/* ── 조건별 검색 타일 ── */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile {
  aspect-ratio: 1; border-radius: 12px; position: relative; overflow: hidden; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 10px;
  background: var(--ink);
}
.tile .ico { position: absolute; right: 8px; top: 8px; font-size: 26px; opacity: .95; }
.tile b { font-size: 15px; }
.tile span { font-size: 12px; opacity: .85; }

/* ── 하단 정보 ── */
.footer { background: #2b2b2b; color: #bdbdbd; margin-top: 32px; padding: 20px 0 calc(var(--nav-h) + 88px + var(--safe-b)); font-size: 13px; }
.footer .links { display: flex; flex-wrap: wrap; gap: 4px 14px; color: #fff; padding-bottom: 12px; border-bottom: 1px solid #444; margin-bottom: 12px; }
.footer .links a { padding: 4px 0; }
.footer .biz div { padding: 1px 0; }
.footer .biz b { color: #fff; font-size: 14px; display: block; margin-bottom: 4px; }
.footer .copy { margin-top: 12px; color: #888; display: flex; justify-content: space-between; align-items: center; }
.footer .admin-link { color: #777; font-size: 12px; padding: 6px 0; }
.footer .links .admin-link { color: #9a9a9a; font-size: 13px; padding: 4px 0; }
.pc-only { display: none !important; }

/* ── 하단 탭 메뉴 ── */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: var(--ink2); }
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a.on { color: var(--ink); font-weight: 800; }
.bottom-nav a.on svg { color: var(--y-deep); }
.bottom-nav a.center { position: relative; }
.bottom-nav a.center .bubble {
  width: 56px; height: 56px; border-radius: 50%; background: var(--y); display: grid; place-items: center;
  margin-top: -26px; box-shadow: 0 4px 12px rgba(0,0,0,.18); border: 4px solid #fff;
}
.bottom-nav a.center svg { color: var(--ink) !important; }

/* ── 떠 있는 상담 버튼 ── */
.fab {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + var(--safe-b)); z-index: 55;
  width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--y);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.fab svg { width: 22px; height: 22px; }

/* ── 간편상담문의 + 최근 상담 문의 목록 ── */
.privacy-note { font-size: 13px; background: var(--y-soft); color: #5c4400; border-radius: 10px; padding: 10px 12px; margin: -4px 0 12px; }
.feed-box { margin-top: 14px; }
.feed-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 15px; }
.feed-head span { font-size: 13px; color: var(--mute); }
.feed-view { height: 238px; overflow: hidden; }
.feed-list { display: flex; flex-direction: column; gap: 6px; }
.feed-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13px; min-height: 42px; }
.feed-row .st { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.feed-row .st.ing { background: var(--y); color: var(--ink); }
.feed-row .st.done { background: var(--ink); color: #fff; }
.feed-row .m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.feed-row .w { color: var(--mute); white-space: nowrap; }

/* ── 오른쪽 떠 있는 SNS 버튼 (상담 버튼 위) ── */
.sns-float { position: fixed; right: 22px; bottom: calc(var(--nav-h) + 16px + 56px + 10px + var(--safe-b)); z-index: 55; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.sns-btn { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.sns-btn span { display: none; font-size: 11px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.sns-btn svg { width: 22px; height: 16px; }
.sns-yt { border: 2px solid #ff0000; }
.sns-blog { border: 2px solid #d9d9d9; }
.sns-talk { border: 2px solid #fee500; }
.blog-ic { font-style: normal; font-weight: 800; font-size: 10px; color: #fff; background: #03c75a; border-radius: 5px; padding: 1px 4px; }
.talk-ic { font-style: normal; font-weight: 900; font-size: 9px; color: #fee500; background: #3c1e1e; border-radius: 5px; padding: 2px 4px; }
body.on-map .sns-float { display: none; }
/* 관리자 매물 등록: 건축물대장 불러오기 */
.bld-filled { background: #fff6d6 !important; border-color: #f0c64a !important; }
.bld-tag { display: inline-block; font-size: 11px; font-weight: 800; background: var(--y); color: var(--ink); padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; }
.bld-ok { background: #eaf7ee; border: 1px solid #bfe3c9; color: #1b6b34; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.6; }
.bld-none { background: #fff3f3; border: 1px solid #f3c7c7; color: #a11; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.bld-pick { border: 2px solid var(--y); border-radius: 12px; padding: 12px; background: #fffdf3; max-height: 360px; overflow-y: auto; }
.bld-opt { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 6px; background: #fff; font-size: 14px; }
.bld-opt:hover { border-color: var(--ink); }
.bld-opt small { color: var(--mute); white-space: nowrap; }

/* 왼쪽 고정 패널(테마 종류 + 공중전화 사진): 가운데 내용 왼쪽에 빈 공간이 있는 넓은 PC에서만 */
.side-panel { display: none; }
@media (min-width: 1860px) {
  /* 지도 아래 카드 줄은 왼쪽 패널과 겹치지 않게 가운데 내용(1200px) 왼쪽 끝에서 시작해요 */
  .home-cars { margin-left: calc((100vw - 1200px) / 2 + 16px - 32px); }
  .side-panel.show { display: flex; flex-direction: column; gap: 16px; position: fixed; left: 32px; top: 112px; width: 280px; z-index: 40; transform-origin: top left; }
  .sp-theme, .sp-emo { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
  .sp-th { background: var(--ink); color: var(--y); text-align: center; font-weight: 800; font-size: 21px; padding: 13px; }
  .sp-theme a { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 19px; font-weight: 700; color: var(--ink); }
  .sp-theme a:hover { background: var(--y-soft); }
  .sp-theme a i { font-style: normal; color: #bbb; }
  .sp-emo { text-align: center; }
  .sp-emo h3 { margin: 0; padding: 14px 10px 10px; font-size: 21px; line-height: 1.4; }
  .sp-ph { display: block; position: relative; aspect-ratio: 1747 / 1240; background: #222; }
  .sp-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s; }
  .sp-ph img.on { opacity: 1; }
  .sp-dots { display: flex; gap: 6px; justify-content: center; padding: 8px; }
  .sp-dots i { width: 7px; height: 7px; border-radius: 50%; background: #ccc; }
  .sp-dots i.on { background: var(--ink); }
  .sp-call { display: block; margin: 0 12px 12px; background: var(--y); border-radius: 999px; font-weight: 800; padding: 9px; font-size: 18px; color: var(--ink); }
}

/* ── 시트·팝업 ── */
.dim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.dim.center { align-items: center; padding: 16px; }
.sheet {
  background: #fff; width: 100%; max-width: 520px; border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(20px + var(--safe-b)); max-height: 88vh; overflow-y: auto;
}
.sheet h3 { margin: 0 0 14px; font-size: 18px; }
.sheet .opt { display: flex; align-items: center; gap: 12px; height: 56px; border-bottom: 1px solid var(--line); font-weight: 600; width: 100%; text-align: left; }
.sheet .opt:last-child { border-bottom: 0; }
.sheet .opt .oi { width: 36px; height: 36px; border-radius: 50%; background: var(--y-soft); display: grid; place-items: center; }
.sheet .opt .oi svg { width: 20px; height: 20px; }
.popup { width: 90%; max-width: 400px; background: #fff; border-radius: 16px; overflow: hidden; max-height: 86vh; display: flex; flex-direction: column; }
.popup .pbody { overflow-y: auto; }
.promo { aspect-ratio: 1; background: var(--y); padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.promo img { width: 46%; border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.promo h3 { margin: 4px 0 0; font-size: 22px; line-height: 1.35; }
.promo .kinds { font-size: 13px; font-weight: 700; background: var(--ink); color: var(--y); padding: 6px 12px; border-radius: 999px; }
.promo .tel { font-size: 24px; font-weight: 900; letter-spacing: .5px; }
.popup .pfoot { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--line); }
.popup .pfoot .check { font-size: 13px; }

/* ── 상세 ── */
.detail { padding-bottom: calc(var(--nav-h) + 80px); }
.gallery { position: relative; background: #111; margin: 0 calc(var(--gutter) * -1); }
.gallery .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery .track > div { flex: 0 0 100%; aspect-ratio: 4/3; background: #222 center/contain no-repeat; scroll-snap-align: start; }
.gallery .count { position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.d-head { padding: 16px 0 12px; border-bottom: 1px solid var(--line); }
.d-head .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.d-head h1 { font-size: 19px; margin: 0 0 6px; line-height: 1.4; }
.d-head .price { font-size: 24px; font-weight: 900; }
.d-head .price .was { font-size: 14px; color: var(--mute); text-decoration: line-through; font-weight: 500; margin-left: 6px; }
.d-head .loc { color: var(--ink2); font-size: 14px; margin-top: 4px; }
.spec { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 12px; overflow: hidden; margin: 16px 0; box-shadow: var(--shadow); }
.spec div { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.spec div:nth-child(odd) { border-right: 1px solid var(--line); }
.spec dt { font-size: 12px; color: var(--mute); }
.spec dd { margin: 0; font-weight: 700; font-size: 15px; }
.ptable { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); border-top: 2px solid var(--ink); }
.ptable th, .ptable td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
.ptable th { width: 38%; background: #fafafa; color: var(--ink2); font-weight: 600; }
.ptable td { font-weight: 600; word-break: break-all; }
.ptable tr:last-child th, .ptable tr:last-child td { border-bottom: 0; }
.d-desc { background: #fff; border-radius: 12px; padding: 16px; white-space: pre-wrap; box-shadow: var(--shadow); }
.d-title { font-size: 16px; font-weight: 800; margin: 20px 0 8px; }
.video { aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }
.d-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 58;
  background: #fff; border-top: 1px solid var(--line); padding: 10px var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.back-btn { display: inline-flex; align-items: center; gap: 4px; height: 44px; font-weight: 600; color: var(--ink2); }

/* ── 지도 검색 ── */
.map-page { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); }
.map-page .map { position: absolute; inset: 0; background: #e8e8e8; }
body.on-map .fab, body.on-map .demo-bar { display: none; }
/* 지도 내부 레이어가 헤더·메뉴 위로 올라오지 않게 */
.map, .mini-map, .pick-map { isolation: isolate; z-index: 0; }
.mini-map, .pick-map { position: relative; }
.map-page .leaflet-top { top: 52px; }
.map-filter { position: absolute; top: 10px; left: 0; right: 0; z-index: 1000; display: flex; gap: 6px; overflow-x: auto; padding: 0 12px; scrollbar-width: none; }
.map-filter::-webkit-scrollbar { display: none; }
.map-filter .chip { box-shadow: 0 2px 6px rgba(0,0,0,.12); border: 0; height: 36px; }
.map-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1001; background: #fff; border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,.12); max-height: 30%; display: flex; flex-direction: column; transition: max-height .25s;
}
.map-sheet.open { max-height: 75%; }
.map-sheet .grip { padding: 8px 16px 10px; text-align: center; font-weight: 700; font-size: 15px; width: 100%; }
.map-sheet .grip::before { content: ""; display: block; width: 40px; height: 4px; background: #ccc; border-radius: 2px; margin: 0 auto 8px; }
.map-sheet .list { overflow-y: auto; padding: 0 12px 12px; }
.map-sheet .row { border-radius: 10px; }
.pin {
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; padding: 5px 9px; border-radius: 8px;
  white-space: nowrap; position: relative; box-shadow: 0 2px 6px rgba(0,0,0,.3); cursor: pointer; transform: translateY(-8px);
}
.pin::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
.pin.urgent { background: var(--red); }
.pin.urgent::after { border-top-color: var(--red); }
.pin.on { background: var(--y); color: var(--ink); }
.pin.on::after { border-top-color: var(--y); }
.pin.sold { background: #777; }
.pin.sold::after { border-top-color: #777; }
.pin.office { background: var(--y); color: var(--ink); }
.pin.office::after { border-top-color: var(--y); }
.leaflet-div-icon { background: none !important; border: 0 !important; }
.map-note { position: absolute; left: 12px; bottom: 8px; z-index: 4; font-size: 11px; background: rgba(255,255,255,.9); padding: 2px 8px; border-radius: 6px; color: var(--ink2); }

/* ── 더보기 ── */
.menu-list { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.menu-list a, .menu-list button { display: flex; justify-content: space-between; align-items: center; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); width: 100%; font-weight: 600; }
.menu-list > :last-child { border-bottom: 0; }
.doc { background: #fff; border-radius: var(--radius); padding: 18px; font-size: 14px; color: var(--ink2); box-shadow: var(--shadow); }
.doc h4 { color: var(--ink); margin: 14px 0 4px; }

/* ── 알림 ── */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 90px + var(--safe-b)); transform: translateX(-50%); z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; max-width: 90%; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.demo-bar { background: #fff3cd; color: #7a5b00; font-size: 12px; text-align: center; padding: 6px 12px; }

/* ── 관리자 ── */
.admin body, body.admin { background: #f2f2ef; }
.login-box { max-width: 400px; margin: 0 auto; padding: 40px var(--gutter); }
.login-box .logo { width: 96px; margin: 0 auto 12px; border-radius: 16px; }
.login-box h1 { text-align: center; font-size: 20px; margin: 0 0 24px; }
.err { color: var(--red); font-size: 14px; min-height: 20px; margin-bottom: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.stat { background: #fff; border-radius: 12px; padding: 14px 8px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; }
.stat span { font-size: 12px; color: var(--mute); }
.big-btns { display: grid; gap: 8px; }
.big-btns .btn { height: 56px; justify-content: flex-start; padding: 0 18px; }
.admin-row { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.admin-row .top { display: flex; gap: 12px; }
.admin-row .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid .p { aspect-ratio: 1; border-radius: 10px; background: #ddd center/cover; position: relative; }
.photo-grid .p .x { position: absolute; right: 4px; top: 4px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; line-height: 28px; text-align: center; }
.photo-grid .p .first { position: absolute; left: 4px; bottom: 4px; }
.photo-grid .p .mv { position: absolute; left: 4px; top: 4px; display: flex; gap: 4px; }
.photo-grid .p .mv button { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 14px; }
.photo-grid .add { aspect-ratio: 1; border-radius: 10px; border: 2px dashed #ccc; display: grid; place-items: center; color: var(--mute); font-size: 13px; text-align: center; background: #fff; }
.pick-map { height: 260px; border-radius: 12px; overflow: hidden; background: #e8e8e8; margin-top: 8px; }
.fieldset { background: #fff; border-radius: var(--radius); padding: 18px 16px 6px; margin-bottom: 12px; box-shadow: var(--shadow); }
.fieldset > h3 { margin: 0 0 14px; font-size: 16px; }
.multi-row { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.contact-row { display: grid; grid-template-columns: 120px 1fr 1fr 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.row-x { width: 36px; height: 36px; border-radius: 50%; background: #f1f1ef; color: #888; font-size: 15px; }
.add-row { width: 100%; height: 44px; border: 1.5px dashed #c9c9c9; border-radius: 10px; background: #fafafa; color: var(--ink2); font-weight: 600; font-size: 14px; margin-bottom: 4px; }
@media (max-width: 560px) {
  .contact-row { grid-template-columns: 1fr 1fr 40px; }
  .contact-row [data-c="role"] { grid-column: 1 / 3; }
  .contact-row .row-x { grid-column: 3; grid-row: 1; }
}
.unit-input { display: flex; border: 1px solid #d9d9d9; border-radius: 10px; overflow: hidden; background: #fff; }
.unit-input:focus-within { border-color: var(--ink); }
.unit-input .input { border: 0; border-radius: 0; flex: 1; min-width: 0; }
.unit-input span { display: flex; align-items: center; padding: 0 14px; background: #f6f6f3; border-left: 1px solid #e6e6e2; font-weight: 600; color: var(--ink2); }
.date-sel { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.date-sel .select { width: auto; flex: 1 1 80px; min-width: 76px; padding: 0 8px; }
.date-sel select[name$="_dkind"] { flex: 1.6 1 120px; }
.date-sel span { font-size: 14px; color: var(--ink2); }
.fac-checks { display: flex; flex-wrap: wrap; gap: 0 14px; }
.fac-checks .check { min-height: 36px; }
.sold-opt { display: block; width: 100%; text-align: left; border: 1px solid #d9d9d9; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; background: #fff; }
.sold-opt b { display: block; font-size: 15px; }
.sold-opt span { font-size: 13px; color: var(--ink2); }
.sold-opt.on { border: 2px solid var(--ink); background: var(--y-soft); }
.field.missing > label { color: var(--red); }
.field.missing .input, .field.missing .select, .field.missing .chips .chip { border-color: var(--red); background: #fff5f5; }
.field.missing::after { content: "필수 입력 항목이에요"; display: block; color: var(--red); font-size: 12px; margin-top: 4px; }
.pick-map.missing { outline: 3px solid var(--red); }
.miss-list { margin: 0; padding: 12px 14px 12px 32px; background: #fff3f3; border-radius: 10px; color: #a11; font-weight: 700; font-size: 15px; line-height: 1.8; max-height: 40vh; overflow-y: auto; }
.save-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line);
  padding: 10px var(--gutter) calc(10px + var(--safe-b)); display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #eee; font-weight: 700; }
.pill.active { background: #e3f6ea; color: var(--green); }
.pill.hidden-s { background: #eee; color: #666; }
.pill.sold { background: #fde8e8; color: var(--red); }
.pill.draft { background: var(--y-soft); color: #7a5b00; }
.pill.new { background: var(--red); color: #fff; }

/* 좁은 휴대폰: 관리자 헤더에서 이름은 숨기고 버튼만 (이름은 첫 화면 인사에 나와요) */
@media (max-width: 480px) {
  #whoami { display: none; }
}

/* ── 태블릿 ── */
@media (min-width: 768px) {
  .hscroll > * { flex-basis: calc((100% - 24px) / 3); }
  .tiles { grid-template-columns: repeat(5, 1fr); }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .rows.grid { display: grid; grid-template-columns: 1fr 1fr; }
  .rows.grid .row:nth-child(odd) { border-right: 1px solid var(--line); }
}
/* ── PC ── */
@media (min-width: 1024px) {
  :root { --nav-h: 0px; }
  .bottom-nav { display: none; }
  .top-nav { display: flex; }
  .header .side { width: auto; }
  .hscroll { overflow: visible; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 4px 0 12px; }
  .hscroll > * { flex: none; }
  .hscroll > :nth-child(n+9) { display: none; }
  .tiles { grid-template-columns: repeat(9, 1fr); }
  .fab { bottom: 24px; right: 34px; width: 64px; height: 64px; font-size: 12px; }
  .fab svg { width: 26px; height: 26px; }
  .sns-float { right: 24px; bottom: calc(24px + 64px + 14px); gap: 12px; }
  .sns-btn { width: 84px; height: 84px; border-width: 4px; }
  .sns-btn span { display: block; font-size: 14px; margin-top: 4px; }
  .sns-btn svg { width: 36px; height: 26px; }
  .blog-ic { font-size: 14px; padding: 2px 7px; }
  .talk-ic { font-size: 12px; padding: 3px 7px; }
  .pc-only { display: inline !important; }
  .consult-wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; align-items: start; }
  .consult-wrap .feed-box { margin-top: 0; }
  .consult-wrap .feed-view { height: 382px; }
  /* PC 헤더: 화면 양 끝까지 넓게 — 로고는 왼쪽 끝, 메뉴는 로고 옆, 전화는 오른쪽 끝 */
  :root { --header-h: 96px; }
  .header .wrap { max-width: none; padding: 0 32px; justify-content: flex-start; gap: 36px; }
  .header .side.right { margin-left: auto; }
  #adminHeader .wrap { justify-content: space-between; }
  .header .side:empty { display: none; }
  .brand { gap: 12px; }
  .brand img { width: 80px; height: 80px; border-radius: 14px; }
  .brand .name { font-size: 23px; }
  .top-nav { gap: 8px; }
  .top-nav a { font-size: 18px; font-weight: 700; color: #222; padding: 9px 18px; }
  .header .icon-btn { width: 52px; height: 52px; }
  .header .icon-btn svg { width: 26px; height: 26px; }
  /* PC 메인 위쪽(검색창·지도·초급매 칸)도 화면 양 끝까지: 지도는 넓게, 오른쪽 칸은 360px 고정 */
  .home-wide { max-width: none; padding: 0 32px; }
  .home-top { display: grid; grid-template-columns: 1fr 360px; grid-template-rows: 600px; gap: 24px; align-items: stretch; }
  .home-map { display: block; position: relative; min-height: 600px; border-radius: 14px; overflow: hidden; background: #e8e8e8; }
  .home-map #homeMap { position: absolute; inset: 0; isolation: isolate; z-index: 0; }
  /* 지도 옆: 지도에 보이는 매물 목록(사진·번호·제목·종류/면적·가격), 칸 안에서 위아래 스크롤 */
  .home-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; overflow-y: auto; padding: 2px 4px 4px 2px; scrollbar-width: thin; }
  .home-side .empty { margin: auto; padding: 0; }
  .ms-it { display: flex; gap: 10px; background: #fff; border-radius: 12px; padding: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.06); flex: none; border: 3px solid transparent; transition: border-color .2s, transform .2s, box-shadow .2s; }
  .ms-it:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,.12); }
  .ms-it.on { border-color: var(--y); }
  .ms-ph { flex: 0 0 104px; height: 80px; border-radius: 8px; background: #ddd center/cover; }
  .ms-tx { min-width: 0; flex: 1; }
  .ms-no { font-size: 12px; color: var(--mute); }
  .ms-t { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 1px 0; }
  .ms-m { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ms-p { font-size: 16px; font-weight: 900; margin-top: 3px; }
  .ms-p .badge { height: 18px; padding: 0 5px; font-size: 11px; border-radius: 4px; margin-right: 4px; vertical-align: 2px; }
  /* 지도 아래 줄도 지도와 같은 칸 — 왼쪽 매물 미리보기(지도 폭), 오른쪽 고홈즈 마크(초급매 칸 아래 360px) */
  .home-bottom { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; margin-top: 16px; }
  /* PC 카드 줄: 4장씩, 화살표는 바깥 양옆, 마우스를 올리면 살짝 올라가요 */
  .home-cars { min-width: 0; max-width: 1200px; }
  .home-cars .sec:first-child { padding-top: 8px; }
  .car-sec .sec-head h2 { font-size: 24px; }
  .car { display: flex; align-items: center; gap: 12px; }
  .car-arr, .car-arr.prev, .car-arr.next { position: static; transform: none; flex: none; width: 44px; height: 44px; font-size: 26px; background: #fff; }
  .car-arr:hover { background: var(--y); }
  .car-arr.off { display: grid; opacity: .3; pointer-events: none; }
  .car-track { flex: 1; min-width: 0; margin: 0; padding: 12px 4px 14px; scroll-padding: 0; display: flex; overflow-x: auto; }
  .hscroll.car-track > *, .hscroll.car-track > :nth-child(n+9) { display: block; flex: 0 0 calc((100% - 36px) / 4); }
  .car-track .card .ph { height: auto; aspect-ratio: 4 / 3; }
  .car-track .card .badges { left: 10px; top: 10px; gap: 6px; }
  .car-track .card .badge { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
  .car-track .card .no { display: inline-flex; }
  .car-track .card .body { padding: 12px 14px 14px; }
  .car-track .card .price { font-size: 18px; }
  .car-track .card .price .was { display: inline; }
  .car-track .card .ttl { font-size: 14px; -webkit-line-clamp: 2; min-height: 42px; }
  .car-track .card .meta { font-size: 13px; margin-top: 6px; }
  .car-hint { display: none; }
  .card, .rows .row { transition: transform .25s ease, box-shadow .25s ease; }
  .card:hover { transform: translateY(-8px); box-shadow: 0 14px 28px rgba(0,0,0,.18); }
  .rows .row:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.12); background: #fff; position: relative; z-index: 1; }
  .home-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 0; }
  .home-brand img { width: 200px; height: 200px; border-radius: 22px; object-fit: cover; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
  .home-brand b { font-size: 19px; margin-top: 8px; }
  .home-brand span { font-size: 13px; color: var(--ink2); }
  .home-brand .hb-tel { margin-top: 6px; background: var(--y); color: var(--ink); font-weight: 800; padding: 8px 18px; border-radius: 999px; font-size: 15px; }
  .mobile-only { display: none !important; }
  .footer { padding-bottom: 40px; }
  .toast { bottom: 100px; }
  .map-page { bottom: 0; }
  .map-page .map { left: 380px; }
  .map-sheet, .map-sheet.open { left: 0; right: auto; top: 0; width: 380px; max-height: none; border-radius: 0; box-shadow: 2px 0 10px rgba(0,0,0,.08); }
  .map-sheet .grip::before { display: none; }
  .map-filter { left: 380px; }
  .d-bar { left: auto; right: 24px; bottom: 96px; width: 360px; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); }
  .detail .gallery { margin: 16px 0 0; border-radius: var(--radius); overflow: hidden; }
  .detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
  .dim { align-items: center; }
  .sheet { border-radius: 20px; }
  .save-bar { left: 50%; transform: translateX(-50%); max-width: 720px; border-radius: 14px 14px 0 0; }
  .admin-main { max-width: 720px; margin: 0 auto; }
}
