/* =========================================================
   房產內座山｜張毓珊 — Forest Storybook 手繪風格
   ========================================================= */
:root {
  --bg: #DCE6B5;
  --text: #263D2B;
  --text-2: #5C6445;
  --accent: #D5A34F;
  --forest-dark: #172D1D;
  --forest: #355C35;
  --leaf: #79A65A;
  --sun: #E8D98A;
  --earth: #896444;
  --pink: #C95782;
  --blue: #347B91;
  --cream: #E8D8B6;
  --paper: #F4EED9;
  --radius: 22px;
  --line: 2.5px solid var(--forest-dark);
  --shadow: 4px 5px 0 rgba(23, 45, 29, .18);
  --font-head: "LXGW WenKai TC", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  padding-bottom: 72px; /* 手機底部 CTA 空間 */
  overflow-x: hidden;
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

img, svg { max-width: 100%; display: block; }
a { color: var(--forest); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.35; margin: 0 0 .5em; color: var(--forest-dark); letter-spacing: .02em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.section { padding: 56px 0; position: relative; }
.section--paper { background: var(--paper); }
.section--cream { background: var(--cream); }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head p { color: var(--text-2); max-width: 640px; margin: 0 auto; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-size: .95rem;
  color: var(--earth); background: var(--sun); padding: 2px 14px; border-radius: 999px;
  border: 2px solid var(--earth); margin-bottom: 10px;
}

/* ---------- 手繪感卡片 ---------- */
.card {
  background: var(--paper);
  border: var(--line);
  border-radius: var(--radius) 18px 24px 16px / 16px 24px 18px 22px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 700;
  padding: 11px 22px; border-radius: 999px; border: var(--line);
  text-decoration: none; cursor: pointer; box-shadow: 3px 3px 0 var(--forest-dark);
  transition: transform .15s, box-shadow .15s; color: var(--forest-dark); background: var(--sun);
  min-height: 48px;
}
.btn:hover { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--forest-dark); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--forest-dark); }
.btn--line { background: #06C755; color: #fff; }
.btn--green { background: var(--forest); color: var(--paper); }
.btn--ghost { background: var(--paper); }
.btn--sm { font-size: .95rem; padding: 6px 16px; min-height: 40px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(220, 230, 181, .95); backdrop-filter: blur(6px);
  border-bottom: var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest-dark); }
.brand svg { width: 40px; height: 40px; }
.brand strong { font-family: var(--font-head); font-size: 1.2rem; display: block; line-height: 1.1; }
.brand small { font-size: .75rem; color: var(--text-2); }
.nav { display: none; }
.nav a {
  font-family: var(--font-head); text-decoration: none; color: var(--forest-dark);
  padding: 6px 10px; border-radius: 12px; font-size: 1.02rem;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--sun); }
.header-line { display: none; }
.nav-toggle {
  background: var(--paper); border: var(--line); border-radius: 12px; width: 46px; height: 46px;
  display: grid; place-items: center; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2.5px; background: var(--forest-dark); border-radius: 2px; position: relative; content: "";
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
.nav.open {
  display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
  background: var(--paper); border-bottom: var(--line); padding: 10px 16px 18px;
}
.nav.open a { padding: 12px; font-size: 1.1rem; border-bottom: 1px dashed var(--leaf); }
@media (min-width: 1100px) {
  .nav { display: flex; gap: 0; }
  .nav a { padding: 6px 8px; }
  .nav-toggle { display: none; }
}
@media (min-width: 1280px) { .header-line { display: inline-flex; } }
.scene { width: 100%; height: clamp(110px, 20vw, 230px); }
.site-footer .scene-top { height: clamp(80px, 14vw, 170px); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 28px 0 0; }
.hero-inner { display: grid; gap: 18px; align-items: end; position: relative; z-index: 2; }
.hero-photo {
  position: relative; width: min(56vw, 260px); margin: 0 auto;
}
.photo-ph { border: 2.5px dashed var(--earth); border-radius: 50% 50% 18px 18px; background: rgba(244, 238, 217, .6); padding: 12px; }
.hero-photo .sun-disc {
  position: absolute; inset: 8% 4% 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #F6EDB5 0%, var(--sun) 55%, rgba(232, 217, 138, 0) 72%);
}
.hero-photo img, .hero-photo .photo-ph { position: relative; z-index: 1; width: 100%; aspect-ratio: 4/5; object-fit: contain; object-position: bottom; }
.hero-photo img { aspect-ratio: 600/816; height: auto; }
.photo-ph {
  display: grid; place-items: center; text-align: center; color: var(--text-2);
  font-family: var(--font-head); font-size: .95rem;
}
.hero-text { text-align: center; padding-bottom: 24px; }
.hero-text .tagline { font-size: clamp(1.05rem, 2.6vw, 1.35rem); color: var(--forest); font-family: var(--font-head); }
.hero-text .lead { color: var(--text-2); max-width: 520px; margin-inline: auto; }
.hero .btn-row { justify-content: center; }
.hero-scene { position: relative; z-index: 1; margin-top: -40px; }
@media (min-width: 820px) {
  .hero { padding-top: 48px; }
  .hero-inner { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .hero-text { text-align: left; order: 1; }
  .hero-text .lead { margin-inline: 0; }
  .hero .btn-row { justify-content: flex-start; }
  .hero-photo { order: 2; width: 100%; max-width: 420px; }
}

/* 快速服務按鈕 */
.quick-services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
@media (min-width: 640px) { .quick-services { grid-template-columns: repeat(4, 1fr); } }
.qs {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  text-decoration: none; color: var(--forest-dark); background: var(--paper);
  border: var(--line); border-radius: 18px; padding: 12px 8px; box-shadow: var(--shadow);
  font-family: var(--font-head); font-size: 1.02rem;
}
.qs:hover { background: var(--sun); }
.qs svg { width: 44px; height: 44px; }

/* ---------- 頁面標題橫幅 ---------- */
.page-banner { position: relative; overflow: hidden; padding: 40px 0 0; text-align: center; }
.page-banner p { color: var(--text-2); max-width: 640px; margin-inline: auto; }
.page-banner .scene { margin-top: 8px; }

/* ---------- 列表 / 標籤 ---------- */
.tag {
  display: inline-block; font-size: .8rem; padding: 1px 10px; border-radius: 999px;
  background: var(--cream); border: 1.5px solid var(--earth); color: var(--earth); margin: 0 4px 4px 0;
}
.tag--green { background: #E3EDCB; border-color: var(--forest); color: var(--forest); }
.tag--pink { background: #F5DCE6; border-color: var(--pink); color: var(--pink); }
.tag--blue { background: #D8EAF0; border-color: var(--blue); color: var(--blue); }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding-left: 30px; position: relative; margin-bottom: 8px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px;
  background: var(--leaf); border-radius: 0 70% 0 70%; border: 2px solid var(--forest-dark);
}
.pending { color: var(--pink); font-weight: 700; }

/* ---------- 服務 ---------- */
.service { scroll-margin-top: 84px; }
.service .icon { width: 64px; height: 64px; margin-bottom: 8px; }
.service:target { outline: 4px dashed var(--accent); outline-offset: 4px; }
.service h4 { font-family: var(--font-body); font-size: 1rem; color: var(--forest); margin-top: 14px; }

/* ---------- 物件 ---------- */
.filters {
  display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 24px;
}
@media (min-width: 760px) { .filters { grid-template-columns: repeat(4, 1fr); } }
.filters label { display: flex; flex-direction: column; font-family: var(--font-head); font-size: .95rem; gap: 4px; }
select, input, textarea {
  font: inherit; color: var(--text); background: #FFFDF4; border: 2px solid var(--forest-dark);
  border-radius: 12px; padding: 10px 12px; min-height: 46px; width: 100%;
}
select:focus, input:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.listing-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.listing-card .thumb { aspect-ratio: 16/10; background: var(--cream); border-bottom: var(--line); }
.listing-card .thumb img, .listing-card .thumb svg { width: 100%; height: 100%; object-fit: cover; }
.listing-card .body { padding: 16px 18px 20px; }
.listing-card .price { font-family: var(--font-head); font-size: 1.35rem; color: var(--earth); }
.listing-card:hover { transform: translateY(-3px); }
.result-count { color: var(--text-2); margin-bottom: 12px; }
.empty { text-align: center; padding: 40px; }

.detail-grid { display: grid; gap: 24px; }
@media (min-width: 880px) { .detail-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 8px; border-bottom: 1.5px dashed var(--leaf); vertical-align: top; }
.spec-table th { width: 34%; font-family: var(--font-head); color: var(--forest); font-weight: 700; }

/* ---------- 表格（費用） ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fee-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 560px; background: #FFFDF4; border: var(--line); border-radius: 16px; overflow: hidden; }
.fee-table th, .fee-table td { padding: 12px 14px; border-bottom: 1.5px solid #CFD8A8; text-align: left; vertical-align: top; }
.fee-table thead th { background: var(--forest); color: var(--paper); font-family: var(--font-head); font-size: 1.02rem; }
.fee-table tbody tr:last-child td { border-bottom: 0; }
.fee-table td:first-child { font-weight: 700; color: var(--forest-dark); white-space: nowrap; }
@media (max-width: 680px) {
  .fee-table { min-width: 0; }
  .fee-table thead { display: none; }
  .fee-table, .fee-table tbody, .fee-table tr, .fee-table td { display: block; width: 100%; }
  .fee-table tr { padding: 12px 14px; border-bottom: 1.5px solid #CFD8A8; }
  .fee-table tbody tr:last-child { border-bottom: 0; }
  .fee-table td { padding: 2px 0; border: 0; }
  .fee-table td:first-child { font-family: var(--font-head); font-size: 1.15rem; color: var(--forest); white-space: normal; }
  .fee-table td:nth-child(2) { font-weight: 700; color: var(--earth); }
  .fee-table td:nth-child(3) { font-size: .93rem; color: var(--text-2); }
}
.note { font-size: .9rem; color: var(--text-2); background: var(--cream); border-left: 5px solid var(--accent); padding: 10px 14px; border-radius: 0 12px 12px 0; }

/* ---------- 流程（森林小徑） ---------- */
.path { list-style: none; margin: 0; padding: 0; position: relative; counter-reset: step; }
.path::before {
  content: ""; position: absolute; left: 27px; top: 10px; bottom: 10px; width: 6px;
  background: repeating-linear-gradient(to bottom, var(--earth) 0 12px, transparent 12px 22px); border-radius: 3px;
}
.path li { position: relative; padding: 0 0 22px 76px; counter-increment: step; min-height: 60px; }
.path li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 60px; height: 52px;
  display: grid; place-items: center; font-family: var(--font-head); font-size: 1.4rem; font-weight: 700;
  background: var(--leaf); color: var(--paper); border: var(--line);
  border-radius: 50% 45% 50% 40% / 55% 50% 45% 50%;
}
.path li h3 { margin-bottom: .2em; padding-top: 10px; }
.path li p { margin: 0; color: var(--text-2); }

/* ---------- 分頁籤 ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 24px; }
.tabs button { font: inherit; font-family: var(--font-head); font-size: 1.05rem; padding: 8px 20px; border-radius: 999px; border: var(--line); background: var(--paper); cursor: pointer; min-height: 46px; }
.tabs button[aria-selected="true"] { background: var(--forest); color: var(--paper); }
.tab-panel[hidden] { display: none; }

/* ---------- 試算 ---------- */
.calc { display: grid; gap: 12px; }
.calc label { font-family: var(--font-head); display: flex; flex-direction: column; gap: 4px; }
.calc-result { background: var(--forest); color: var(--paper); border-radius: 18px; padding: 16px 18px; border: var(--line); }
.calc-result strong { font-family: var(--font-head); font-size: 1.6rem; color: var(--sun); display: block; }
.calc-result dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 8px 0 0; font-size: .95rem; }
.calc-result dt { opacity: .85; }
.calc-result dd { margin: 0; text-align: right; font-weight: 700; }

/* ---------- 商圈地圖 ---------- */
.area-map { background: #FFFDF4; border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; }
.area-map svg { width: 100%; height: auto; }
.area-map .pin { cursor: pointer; }
.area-map .pin:hover circle, .area-map .pin:focus circle { fill: var(--pink); }
.area-card { scroll-margin-top: 84px; }

/* ---------- 見證 ---------- */
.quote { position: relative; padding-top: 34px; }
.quote::before {
  content: "“"; position: absolute; top: -6px; left: 18px; font-family: Georgia, serif;
  font-size: 4.5rem; color: var(--accent); line-height: 1;
}
.quote cite { display: block; margin-top: 10px; font-style: normal; color: var(--text-2); font-size: .9rem; }

/* ---------- Footer（揭露資訊，強制） ---------- */
.site-footer { background: var(--forest-dark); color: var(--cream); position: relative; }
.site-footer .scene-top { display: block; width: 100%; height: auto; margin-bottom: -2px; background: var(--bg); }
.footer-inner { padding: 28px 0 32px; display: grid; gap: 22px; }
@media (min-width: 820px) { .footer-inner { grid-template-columns: 1.3fr 1fr; } }
.footer-slogan { font-family: var(--font-head); font-size: clamp(1.15rem, 2.6vw, 1.5rem); color: var(--sun); margin: 0 0 12px; }
.disclosure { font-size: .98rem; line-height: 1.9; color: #F4EED9; font-style: normal; }
.disclosure a { color: var(--sun); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-links a { color: var(--cream); font-size: .95rem; }
.footer-copy { font-size: .82rem; color: #C9C3A6; border-top: 1px solid rgba(232, 216, 182, .25); padding: 14px 0; }

/* ---------- 手機底部 CTA（每頁都有） ---------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1.3fr 1fr 1fr;
  gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--paper); border-top: var(--line);
}
.mobile-cta a {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-radius: 14px;
  font-family: var(--font-head); font-weight: 700; text-decoration: none; border: 2px solid var(--forest-dark); color: var(--forest-dark); font-size: 1rem;
}
.mobile-cta .m-line { background: #06C755; color: #fff; }
.mobile-cta .m-tel { background: var(--sun); }
.mobile-cta .m-form { background: var(--cream); }
@media (min-width: 900px) { .mobile-cta { display: none; } }

/* 桌機浮動 LINE */
.float-line {
  display: none; position: fixed; right: 22px; bottom: 22px; z-index: 60;
}
@media (min-width: 900px) { .float-line { display: block; } }

[data-icon] { display: inline-block; }
[data-icon] svg { width: 64px; height: 64px; }
.qs [data-icon] svg { width: 44px; height: 44px; }
h3 [data-icon] { vertical-align: middle; }
h3 [data-icon] svg { width: 44px; height: 44px; }

/* ---------- 雜項 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { text-align: center; }
.stat b { font-family: var(--font-head); font-size: 1.6rem; color: var(--earth); display: block; }
.two-col { display: grid; gap: 28px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; align-items: center; } }
.compare { display: grid; gap: 18px; }
@media (min-width: 760px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .card h3 { display: flex; align-items: center; gap: 8px; }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-family: var(--font-head); }
.form-msg { margin-top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.small { font-size: .88rem; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
