/* 자리봄 부동산 — 먹색·금색·한지, 휴대폰 화면 기준 */
:root {
  --ink: #1f1c1a;        /* 먹색 */
  --ink-2: #2e2a27;
  --ink-soft: #4a4440;
  --paper: #f6f1e7;      /* 한지 */
  --paper-2: #efe7d8;
  --card: #fffdf8;
  --gold: #b48a3c;       /* 금색 */
  --gold-2: #d6b46e;
  --gold-soft: #efe0bd;
  --seal: #b3261e;       /* 도장 빨강 */
  --muted: #6d655d;
  --line: #ddd2bf;
  --radius: 14px;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
  --sans: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.wrap { max-width: 600px; margin: 0 auto; padding: 0 16px; }

/* 개업 준비 중 띠 */
.prep-band {
  background: var(--gold);
  color: #fff;
  font-size: 14px;
  text-align: center;
  padding: 4px 8px;
  letter-spacing: .08em;
}

/* 머리 */
.top {
  background: var(--ink);
  color: var(--gold-soft);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 2px solid var(--gold);
}
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 700; color: #f3e6c6; letter-spacing: .06em; }
.brand-sub { display: block; font-size: 13px; color: var(--gold-2); letter-spacing: .1em; margin-top: -4px; }
.top .call { margin-left: auto; text-decoration: none; border: 1px solid var(--gold); color: var(--gold-soft); border-radius: 999px; padding: 6px 14px; font-size: 16px; white-space: nowrap; }

/* 빨간 네모 도장 */
.seal {
  width: 46px; height: 46px; flex: 0 0 auto;
  background: var(--seal);
  color: #fff4ec;
  border-radius: 6px;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 800;
  font-size: 15px; line-height: 1.05; text-align: center;
  box-shadow: inset 0 0 0 2px rgba(255, 240, 230, .55), inset 0 0 0 4px var(--seal);
  transform: rotate(-3deg);
}
.seal.big { width: 92px; height: 92px; font-size: 30px; border-radius: 10px; box-shadow: inset 0 0 0 3px rgba(255, 240, 230, .6), inset 0 0 0 7px var(--seal); }

/* 본문 */
main { padding: 20px 0 110px; min-height: 60vh; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.35; margin: 0 0 .5em; }
h1 { font-size: 30px; }
h2 { font-size: 25px; }
h3 { font-size: 21px; }
.lead { font-size: 19px; color: var(--ink-soft); }
.muted { color: var(--muted); font-size: 16px; }
.gold-rule { width: 56px; height: 3px; background: var(--gold); border: 0; margin: 14px 0 18px; }
.section { margin: 28px 0; }

/* 첫 화면 */
.hero {
  /* 배경: 아파트 위 밤하늘 + 천상열차분야지도(별자리 원은 그림의 오른쪽). 왼쪽은 글이 잘 읽히게 더 어둡게 덮는다 */
  background:
    linear-gradient(90deg, rgba(6, 9, 20, 0.72) 0%, rgba(6, 9, 20, 0.5) 45%, rgba(6, 9, 20, 0.12) 100%),
    url("../img/hero_bg.jpg") 72% 42% / cover no-repeat,
    #0b1226;
  color: #f3e6c6;
  border-radius: var(--radius);
  padding: 30px 22px 26px;
  position: relative; overflow: hidden;
  border: 1px solid #4a3f30;
}
@media (max-width: 480px) {
  /* 휴대폰 세로: 상자가 좁고 길어 그림이 커지므로, 별자리 원이 오른쪽 끝에서 잘리지 않게 그림을 조금 더 옮긴다 */
  .hero { background-position: 0 0, 84% 42%, 0 0; }
}
@media (max-width: 370px) {
  .hero { background-position: 0 0, 90% 42%, 0 0; }
}
.hero::after {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(214, 180, 110, .35); border-radius: 10px; pointer-events: none;
}
.hero h1 { color: #f6ead0; font-size: 34px; margin-top: 16px; }
.hero h1 small { display: block; font-size: 21px; color: var(--gold-2); font-weight: 600; margin-top: 6px; letter-spacing: .04em; }
.hero p { color: #d9ccb0; margin: 10px 0 0; }

.big-btns { display: grid; gap: 12px; margin-top: 20px; }
.big-btn {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--gold);
  border-radius: var(--radius); padding: 18px 18px; text-decoration: none;
  font-size: 21px; font-weight: 700; font-family: var(--serif);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .04);
}
.big-btn .ico { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--gold-2); display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.big-btn .desc { display: block; font-family: var(--sans); font-weight: 400; font-size: 15px; color: var(--muted); }
.big-btn .arrow { margin-left: auto; color: var(--gold); font-size: 24px; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 22px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--ink); color: #f3e6c6; font-weight: 700; font-size: 19px; text-decoration: none;
}
.btn.gold { background: var(--gold); color: #fff; }
.btn.line { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.block { width: 100%; }

/* 거르기 */
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 16px; font-size: 17px; cursor: pointer; min-height: 44px;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--gold-soft); border-color: var(--ink); }
.filter-label { font-size: 15px; color: var(--muted); margin-bottom: 4px; font-weight: 700; }
select.region { width: 100%; min-height: 48px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; font-size: 18px; }

/* 매물 카드 */
.cards { display: grid; gap: 16px; margin-top: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; display: block; }
.card .ph { position: relative; aspect-ratio: 3 / 2; background: var(--ink-2); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .ph .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold-2); font-size: 17px; }
.card .body { padding: 14px 16px 16px; }
.price { font-family: var(--serif); font-size: 25px; font-weight: 800; color: var(--ink); }
.price .deal { display: inline-block; font-family: var(--sans); font-size: 15px; font-weight: 700; color: #fff; background: var(--gold); border-radius: 6px; padding: 1px 8px; margin-right: 8px; vertical-align: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 16px; color: var(--ink-soft); margin: 6px 0; }
.summary { font-size: 17px; margin: 6px 0 0; }
.tag-type { position: absolute; left: 10px; top: 10px; background: rgba(31, 28, 26, .85); color: var(--gold-soft); font-size: 14px; padding: 2px 10px; border-radius: 6px; }

/* 샘플 표시 */
.sample-badge {
  position: absolute; right: 10px; top: 10px;
  background: var(--seal); color: #fff; font-weight: 800; font-size: 15px;
  padding: 3px 10px; border-radius: 6px; letter-spacing: .1em;
}
.sample-note { background: #fbeaea; border: 1px solid #e7b9b5; color: #8a1f19; border-radius: 10px; padding: 10px 12px; font-size: 16px; margin: 10px 0; }

/* 상세 */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; border-radius: var(--radius); background: var(--ink-2); }
.gallery img { scroll-snap-align: center; flex: 0 0 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery-count { font-size: 15px; color: var(--muted); text-align: right; margin-top: 4px; }
.photo-wrap { position: relative; }
.map { height: 260px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--paper-2); }
.map-empty { height: 120px; border-radius: var(--radius); border: 1px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-size: 16px; text-align: center; padding: 10px; }

table.spec { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 17px; }
table.spec th, table.spec td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
table.spec th { width: 36%; background: var(--paper-2); color: var(--ink-soft); font-weight: 700; font-size: 16px; }
table.spec tr:last-child th, table.spec tr:last-child td { border-bottom: 0; }
.prep { color: var(--muted); }
.detail-text { white-space: pre-line; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }

/* 양식 */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 17px; }
.form input, .form select, .form textarea {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; font-size: 18px; min-height: 52px; font-weight: 400;
}
.form textarea { min-height: 120px; resize: vertical; }
.notice { background: var(--gold-soft); border: 1px solid var(--gold-2); border-radius: 12px; padding: 12px 14px; font-size: 17px; }
.notice.strong { background: var(--ink); color: var(--gold-soft); border-color: var(--ink); }

/* 동네 카드 */
.town { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.town h3 { display: flex; align-items: center; gap: 10px; }
.town h3::before { content: ""; width: 10px; height: 10px; background: var(--seal); border-radius: 2px; transform: rotate(45deg); }
.town dl { margin: 8px 0 0; display: grid; grid-template-columns: 88px 1fr; gap: 6px 10px; font-size: 17px; }
.town dt { color: var(--gold); font-weight: 700; }
.town dd { margin: 0; }

/* 소개 */
.profile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; }
.profile .row { border-left: 4px solid var(--gold); padding-left: 12px; }
.profile .row b { display: block; font-family: var(--serif); font-size: 19px; }

.fengshui-hero { background: var(--ink); color: #f1e4c4; border-radius: var(--radius); padding: 26px 20px; position: relative; overflow: hidden; }
.fengshui-hero .compass { position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; border: 2px solid rgba(214, 180, 110, .35); box-shadow: inset 0 0 0 18px rgba(214, 180, 110, .08), inset 0 0 0 38px rgba(214, 180, 110, .05); }
.fengshui-hero h2 { color: #f6ead0; position: relative; }
.fengshui-hero p { color: #d9ccb0; position: relative; }

/* 아래 탭 */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--ink); border-top: 2px solid var(--gold); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.tabbar .wrap { display: grid; grid-template-columns: repeat(5, 1fr); padding: 0; }
.tabbar a { text-decoration: none; color: #cbbd9c; text-align: center; padding: 8px 2px 9px; font-size: 14px; line-height: 1.3; }
.tabbar a .t-ico { display: block; font-size: 20px; }
.tabbar a.on { color: var(--gold-2); font-weight: 700; }

/* 꼬리말 */
footer { background: var(--ink); color: #bfb294; font-size: 15px; padding: 24px 0 96px; border-top: 3px solid var(--gold); }
footer .f-name { font-family: var(--serif); font-size: 19px; color: #f1e4c4; font-weight: 700; }
footer .f-name a { color: var(--gold-2); text-decoration: none; white-space: nowrap; }
footer dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 10px 0; }
footer dt { color: #8f846c; }
footer dd { margin: 0; }
footer .f-small { font-size: 13px; color: #8f846c; }

.back { display: inline-block; margin-bottom: 12px; text-decoration: none; color: var(--gold); font-weight: 700; font-size: 17px; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

@media (min-width: 640px) {
  .big-btns { grid-template-columns: 1fr 1fr; }
}
