:root {
  --sand: #F6EBD4;
  --sand-deep: #EADCBE;
  --ink: #153B59;
  --ink-soft: #3E5C75;
  --turquoise: #26C9D1;
  --ocean: #0879BC;
  --nature: #31572C;
  --white: #FFFFFF;
  --line-green: #06C755;
  --line-green-dark: #05A648;
  --placeholder: #E3D3B2;
  --radius: 10px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ocean); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; }
h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; color: var(--ocean); }
h4 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* 按鈕 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn-sm { padding: 6px 16px; font-size: 15px; }
.btn-line { background: var(--line-green); color: var(--white); }
.btn-line:hover { background: var(--line-green-dark); }
.btn-ghost { border-color: var(--white); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.15); }
.btn-ghost-dark { border-color: var(--ink); color: var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: var(--white); }

/* 照片（缺圖時顯示說明文字） */
.photo { position: relative; background: var(--placeholder); overflow: hidden; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.photo::after {
  content: none;
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 16px; text-align: center; font-size: 14px; color: var(--ink-soft);
}

/* 頁首 */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 235, 212, .95); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--sand-deep);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 900; color: var(--ink); text-decoration: none; font-size: 18px; white-space: nowrap; }
.brand span { font-weight: 500; color: var(--ink-soft); }
.nav { display: none; gap: 20px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ocean); }
.header-inner > .btn { margin-left: auto; }
@media (min-width: 960px) {
  .nav { display: flex; }
  .header-inner > .btn { margin-left: 0; }
}
@media (max-width: 420px) { .brand span { display: none; } }

/* 主視覺 */
.hero { position: relative; min-height: 560px; display: flex; align-items: flex-end; color: var(--white); }
.hero-photo { position: absolute; inset: 0; background: var(--ink); }
.hero-photo::after { color: rgba(255,255,255,.55); align-items: flex-start; justify-content: flex-end; font-size: 12px; }
.hero-shade { position: absolute; inset: 0; z-index: 2; background: linear-gradient(to top, rgba(21,59,89,.82) 0%, rgba(21,59,89,.35) 55%, rgba(21,59,89,0) 100%); }
.hero-content { position: relative; z-index: 3; padding-top: 120px; padding-bottom: 64px; width: 100%; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 900; }
.hero-sub { max-width: 620px; font-size: 18px; opacity: .95; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.eyebrow { color: var(--turquoise); font-weight: 700; letter-spacing: .04em; margin-bottom: 12px; }

.strip { background: var(--ink); color: var(--white); }
.strip-inner { display: grid; gap: 20px; padding-top: 28px; padding-bottom: 28px; }
.strip-inner strong { display: block; color: var(--turquoise); font-size: 18px; }
.strip-inner span { font-size: 15px; opacity: .9; }
@media (min-width: 768px) { .strip-inner { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

/* 區塊 */
.section { padding: 72px 0; }
.section-alt { background: var(--sand-deep); }
.kicker { color: var(--nature); font-weight: 700; letter-spacing: .08em; font-size: 14px; margin-bottom: 8px; }
.lead { font-size: 19px; color: var(--ink); }
.narrow { max-width: 720px; }
.sub-title { font-size: 22px; margin-top: 56px; margin-bottom: 20px; }
.fine { font-size: 14px; color: var(--ink-soft); margin: 12px 0 0; }
.sample-note {
  display: inline-block; background: var(--white); border-left: 4px solid var(--turquoise);
  padding: 8px 14px; font-size: 14px; color: var(--ink-soft); margin-bottom: 20px;
}
.sample-note[hidden] { display: none; }
.sync-note { font-size: 14px; color: var(--ink-soft); margin-bottom: 16px; }
.sync-note a { font-weight: 500; }
.card .community-line { font-size: 14px; margin: 10px 0 0; color: var(--nature); }
.detail-photos.single { grid-template-columns: 1fr; }
.detail-photos.single .photo { aspect-ratio: 16 / 9; min-height: 0; }
.detail-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.two-col { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .two-col { grid-template-columns: 5fr 7fr; gap: 56px; } }
.portrait { aspect-ratio: 4 / 5; border-radius: var(--radius); max-width: 440px; }

.reasons { display: grid; gap: 20px; }
@media (min-width: 860px) { .reasons { grid-template-columns: repeat(3, 1fr); } }
.reason { background: var(--white); border-radius: var(--radius); padding: 28px; }
.reason .num { display: block; color: var(--turquoise); font-weight: 900; font-size: 28px; margin-bottom: 8px; }
.reason p { margin: 0; color: var(--ink-soft); }

.services { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 720px) { .services { grid-template-columns: repeat(2, 1fr); } }
.service { background: var(--sand); border-top: 4px solid var(--ocean); padding: 24px 28px; border-radius: 0 0 var(--radius) var(--radius); }
.service p { margin: 0; color: var(--ink-soft); }

/* 物件 */
.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 8px 0 24px; }
.filters label { display: flex; flex-direction: column; font-size: 14px; font-weight: 500; gap: 4px; flex: 1 1 140px; max-width: 220px; }
.count { font-size: 14px; color: var(--ink-soft); padding-bottom: 10px; }
select, input, textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1px solid #CDBB97; border-radius: 8px; padding: 9px 12px; width: 100%;
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--turquoise); outline-offset: 1px; border-color: transparent; }

.listing-grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .listing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .listing-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden; cursor: pointer;
  text-align: left; border: 0; padding: 0; font: inherit; color: inherit;
  display: flex; flex-direction: column; transition: transform .15s;
}
.card:hover { transform: translateY(-3px); }
.card:focus-visible { outline: 3px solid var(--turquoise); }
.card .photo { aspect-ratio: 4 / 3; }
.card-body { padding: 18px 20px 22px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--sand); color: var(--ink-soft); }
.tag-sample { background: var(--turquoise); color: var(--white); }
.card h4 { margin-bottom: 4px; }
.card .price { font-size: 26px; font-weight: 900; color: var(--ocean); }
.card .price small { font-size: 15px; font-weight: 500; }
.card .meta { font-size: 14px; color: var(--ink-soft); margin: 0; }
.card .view { font-size: 14px; margin: 10px 0 0; color: var(--nature); }
.empty { padding: 40px; text-align: center; background: var(--white); border-radius: var(--radius); color: var(--ink-soft); }

/* 詳情 */
.detail {
  width: min(880px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0;
  border: 0; border-radius: var(--radius); background: var(--sand); color: var(--ink);
}
.detail::backdrop { background: rgba(21, 59, 89, .6); }
.detail-close {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  box-shadow: 0 1px 4px rgba(21, 59, 89, .25);
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--white);
  font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink);
}
.detail-photos { display: grid; gap: 4px; grid-template-columns: 1fr 1fr; }
.detail-photos .photo { aspect-ratio: 1 / 1; }
@media (min-width: 720px) { .detail-photos { grid-template-columns: 3fr 2fr; } .detail-photos .photo { aspect-ratio: auto; min-height: 320px; } }
.detail-inner { padding: 24px 20px 32px; }
@media (min-width: 720px) { .detail-inner { padding: 32px 40px 40px; } }
.detail h3 { font-size: 26px; font-weight: 900; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--sand-deep); border-radius: 8px; overflow: hidden; margin: 16px 0 24px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts div { background: var(--white); padding: 12px 14px; }
.facts dt { font-size: 13px; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 700; }
.layer { background: var(--white); border-radius: 8px; padding: 18px 20px; margin-bottom: 12px; }
.layer h4 { font-size: 16px; color: var(--ocean); margin-bottom: 6px; }
.layer p, .layer ul { margin: 0; color: var(--ink); }
.layer ul { padding-left: 1.2em; }
.layer-risk { border-left: 4px solid #C9752B; }
.layer .source { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.detail .btn { margin-top: 12px; }

/* 商圈 */
.watch { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 720px) { .watch { grid-template-columns: repeat(4, 1fr); } }
.watch div { border-top: 3px solid var(--nature); padding-top: 12px; }
.watch strong { display: block; font-size: 18px; }
.watch span { font-size: 15px; color: var(--ink-soft); }
.community-grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .community-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .community-grid { grid-template-columns: repeat(3, 1fr); } }
.community { background: var(--sand); border-radius: var(--radius); overflow: hidden; }
.community .photo { aspect-ratio: 16 / 9; }
.community-body { padding: 18px 20px 22px; }
.community dl { margin: 8px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 15px; }
.community dt { color: var(--ink-soft); }
.community dd { margin: 0; }

/* 實績 */
.case-grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .case-grid { grid-template-columns: repeat(2, 1fr); } }
.case { background: var(--white); border-radius: var(--radius); padding: 26px 28px; }
.case dl { margin: 12px 0 0; }
.case dt { font-size: 14px; font-weight: 700; color: var(--nature); margin-top: 10px; }
.case dd { margin: 2px 0 0; }
.case blockquote { margin: 18px 0 0; padding: 14px 18px; background: var(--sand); border-left: 4px solid var(--turquoise); border-radius: 0 8px 8px 0; }

/* 試算 */
.tools { display: grid; gap: 28px; margin-top: 24px; }
@media (min-width: 900px) { .tools { grid-template-columns: 3fr 2fr; } }
.calc, .links { background: var(--sand); border-radius: var(--radius); padding: 26px 28px; }
.calc-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin-top: 12px; }
@media (max-width: 480px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 500; }
.calc-out { margin-top: 20px; background: var(--white); border-radius: 8px; padding: 18px 20px; }
.calc-out .big { font-size: 30px; font-weight: 900; color: var(--ocean); }
.calc-out .row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; border-top: 1px solid var(--sand-deep); padding-top: 6px; margin-top: 6px; }
.calc-out .warn { color: #A85A16; font-size: 15px; margin-top: 10px; }
.calc-out .ok { color: var(--nature); font-size: 15px; margin-top: 10px; }
.link-card { display: block; background: var(--white); border-radius: 8px; padding: 14px 18px; margin-top: 12px; text-decoration: none; color: var(--ink); border-left: 4px solid var(--ocean); }
.link-card strong { display: block; }
.link-card span { font-size: 14px; color: var(--ink-soft); }
.link-card:hover { border-left-color: var(--turquoise); }

/* 聯絡 */
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.contact-form { background: var(--white); border-radius: var(--radius); padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; }
.contact-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 500; }
.contact-form .btn { align-self: flex-start; }

/* 手機固定列 */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: 2fr 1fr; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(246, 235, 212, .97); border-top: 1px solid var(--sand-deep);
}
.mobile-bar .btn { padding: 10px; }
@media (min-width: 960px) { .mobile-bar { display: none; } }

/* 頁尾 */
.site-footer { background: var(--ink); color: rgba(255,255,255,.9); padding: 48px 0 110px; font-size: 15px; }
@media (min-width: 960px) { .site-footer { padding-bottom: 48px; } }
.footer-inner { display: grid; gap: 28px; }
@media (min-width: 860px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer-brand { font-weight: 900; font-size: 18px; color: var(--white); margin-bottom: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a { color: var(--turquoise); }
.disclosure { font-style: normal; line-height: 1.85; border-left: 3px solid var(--turquoise); padding-left: 16px; color: var(--white); }
