/* 版面：手機優先、米色底、奶茶色線條與底色、駝色輔助文字；蘿蔔橘用在標題重點、行動按鈕與選取狀態，葉子綠用在「可以」的條件 */
:root {
  --bg: #F5EDE1; --surface: #FFFBF5; --sunk: #EADBC8; --ink: #3A2A1F; --muted: #7D624C; --line: #DFCCB5;
  --carrot: #F0904F; --carrot-ink: #3B1F0B; --carrot-soft: #FBE3CF; --carrot-deep: #A8410A; --carrot-text: #D2621F;
  --tea: #E8D6C0; --camel: #7F512C;
  --leaf: #2E7444; --leaf-soft: #E1F0E3; --gray: #85654B; --gray-soft: #EEE1D0;
  --line-green: #06C755; --line-ink: #FFFFFF;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --r: 16px; --shadow: 0 1px 2px rgba(90, 60, 30, .07), 0 6px 18px rgba(90, 60, 30, .07); color-scheme: light;
}
/* 不跟著系統深色模式切換：米色＋奶茶＋淡橘是品牌配色，所有訪客都看同一套 */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; padding-bottom: env(safe-area-inset-bottom, 0px); }
[hidden] { display: none !important; }
.wrap { max-width: 1100px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
a { color: inherit; }
button, select, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--carrot); outline-offset: 2px; }

/* 導覽列 */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.nav .wrap { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; margin-right: auto; min-width: 0; }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo b { font-size: 18px; font-weight: 900; white-space: nowrap; }
.logo b span { color: var(--carrot-text); }
.nav nav { display: none; gap: 22px; font-size: 14.5px; font-weight: 500; }
.nav nav a { text-decoration: none; color: var(--muted); white-space: nowrap; }
.nav nav a:hover { color: var(--carrot-deep); }
.btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--line-green); color: var(--line-ink); text-decoration: none; font-weight: 700; padding: 9px 16px; border-radius: 999px; white-space: nowrap; }
.btn-line svg { width: 18px; height: 18px; flex: none; }
.nav .btn-line { padding: 7px 14px; font-size: 14px; }
@media (min-width: 980px) { .nav nav { display: flex; } }

/* 標語區 */
.hero { position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 32px; align-items: center; padding-block: 34px 30px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; justify-self: start; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 13.5px; color: var(--muted); box-shadow: var(--shadow); }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-green); flex: none; }
/* 招租狀況：三個大字方塊（幾間空屋、幾個行政區、最近更新） */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; justify-self: stretch; max-width: 520px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 11px; box-shadow: var(--shadow); display: grid; gap: 4px; min-width: 0; }
.stat b { font-size: clamp(26px, 7.4vw, 36px); line-height: 1; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .01em; }
.stat span { font-size: 13px; line-height: 1.35; color: var(--muted); font-weight: 500; }
.stat.live { background: var(--carrot); border-color: var(--carrot); }
.stat.live b, .stat.live span { color: var(--carrot-ink); }
.stat.live i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7CF2A6; margin-right: 5px; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(124, 242, 166, .3); }
@media (prefers-reduced-motion: no-preference) { .stat.live i { animation: ch-pulse 2s ease-in-out infinite; } }
@keyframes ch-pulse { 50% { box-shadow: 0 0 0 6px rgba(124, 242, 166, 0); } }
.hero h1 { margin: 14px 0 0; font-size: clamp(34px, 9vw, 58px); line-height: 1.22; font-weight: 900; letter-spacing: .02em; }
.hero h1 em { font-style: normal; color: var(--carrot-text); }
.hero .lead { margin: 14px 0 0; color: var(--muted); font-size: 16px; max-width: 30em; text-wrap: pretty; }
.hero .lead-note { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; max-width: 34em; text-wrap: pretty; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.q-main { display: inline-flex; align-items: center; gap: 7px; background: var(--carrot); color: var(--carrot-ink); text-decoration: none; font-weight: 700; border-radius: 999px; padding: 9px 18px; }
.q-main svg { width: 16px; height: 16px; }
.q { display: inline-flex; align-items: center; text-decoration: none; background: var(--surface); border: 1px solid var(--tea); color: var(--camel); border-radius: 999px; padding: 8px 15px; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.q:hover { border-color: var(--carrot); color: var(--carrot-deep); }
.art { display: none; }
.art svg { width: 100%; height: auto; display: block; }
@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); padding-block: 56px 48px; }
  .art { display: block; grid-row: 1 / span 5; grid-column: 2; }
}

/* 區塊標題 */
.sec { padding-block: 26px; }
.sec-h { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 21px; font-weight: 900; }
.sec-h::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--carrot); flex: none; }
.sec-h small { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); }

/* 最新上架：橫向滑動 */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 72%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 14px; margin: 0 -2px; overscroll-behavior-x: contain; scrollbar-width: thin; }
@media (min-width: 640px) { .rail { grid-auto-columns: minmax(230px, 40%); } }
@media (min-width: 960px) { .rail { grid-auto-columns: calc((100% - 42px) / 4); } }
.mini { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; display: grid; box-shadow: var(--shadow); min-width: 0; }
.mini:hover { border-color: var(--carrot); }
.mini .cover { position: relative; height: 112px; background: var(--tea); display: grid; align-content: end; padding: 12px 14px; overflow: hidden; }
.mini .cover svg { position: absolute; right: -8px; top: -6px; width: 104px; height: 104px; opacity: .9; }
.mini .cover b { position: relative; font-size: 24px; font-weight: 900; color: var(--carrot-deep); line-height: 1.1; }
.mini .cover span { position: relative; font-size: 12.5px; color: var(--carrot-deep); font-weight: 500; }
.mini .body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.mini .road { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .price { font-size: 19px; }
.mini .cover.has-img { height: 140px; background: var(--sunk); }
.mini .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini .cover.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(0, 0, 0, .62)); }
.mini .cover.has-img b, .mini .cover.has-img span { color: #fff; z-index: 1; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }

/* 物件照片：卡片最上方滿版封面，點了開瀏覽視窗 */
.card .ph { margin: -18px -18px 2px; position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0; background: var(--sunk); }
.card .ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .ph.novid { display: grid; place-items: center; background: var(--tea); color: var(--camel); font-weight: 900; font-size: 18px; text-decoration: none; aspect-ratio: 16 / 7; }
.ph .phc { position: absolute; left: 10px; bottom: 10px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
/* 有影片的物件：封面左上角標「影片賞屋」 */
em.vb { position: absolute; top: 10px; left: 10px; z-index: 2; font-style: normal; background: var(--carrot); color: var(--carrot-ink); font-size: 12.5px; font-weight: 700; line-height: 1.5; padding: 2px 10px; border-radius: 999px; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.ph .phc:empty { display: none; }

/* 照片與影片瀏覽視窗：全螢幕、左右滑動 */
#gal { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 9, 7, .97); color: #fff; overflow: hidden; }
#gal::backdrop { background: rgba(0, 0, 0, .8); }
#gal[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.g-top { grid-row: 1; } .g-track { grid-row: 3; }
/* 相簿切換：太多本時可以左右滑 */
.g-tabs { grid-row: 2; display: flex; gap: 6px; padding: 0 14px 10px; overflow-x: auto; scrollbar-width: none; }
.g-tabs::-webkit-scrollbar { display: none; }
.g-tabs button { flex: none; border: 1px solid rgba(255, 255, 255, .28); background: transparent; color: #fff; border-radius: 999px; padding: 4px 13px; font-size: 13.5px; cursor: pointer; }
.g-tabs button[aria-pressed="true"] { background: var(--carrot); border-color: var(--carrot); color: var(--carrot-ink); font-weight: 700; }
html:has(#gal[open]) { overflow: hidden; }
.g-top { display: flex; align-items: center; gap: 12px; padding: max(10px, env(safe-area-inset-top, 0px)) 14px 10px; font-size: 14px; }
#g-t { font-weight: 700; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#g-n { opacity: .75; font-variant-numeric: tabular-nums; flex: none; }
#g-x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 18px; cursor: pointer; }
.g-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; grid-template-rows: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-width: none; min-height: 0; }
.g-track::-webkit-scrollbar { display: none; }
.g-s { scroll-snap-align: center; scroll-snap-stop: always; min-width: 0; min-height: 0; height: 100%; overflow: hidden; position: relative; }
.g-s img, .g-s video { position: absolute; inset: 0 0 max(14px, env(safe-area-inset-bottom, 0px)); width: 100%; height: calc(100% - max(14px, env(safe-area-inset-bottom, 0px))); object-fit: contain; display: block; }
.g-s video { background: #000; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; display: none; }
.g-nav.prev { left: 16px; } .g-nav.next { right: 16px; }
@media (hover: hover) and (min-width: 760px) { .g-nav { display: block; } .g-nav:disabled { opacity: .25; cursor: default; } }

/* 找房：篩選＋卡片 */
#find .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 14px; box-shadow: var(--shadow); }
html:not(.js) .filters, html:not(.js) .sumrow { display: none; }
.frow { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; }
.field { display: grid; gap: 5px; min-width: 0; }
.field label, .flabel { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
select { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 16px; min-width: 9.5em; max-width: 100%; }
/* 月租預算：最低～最高，手機寬度也排在同一行 */
.rent-range { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.rent-range select { min-width: 0; width: 8.2em; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--muted); padding: 8px 16px; cursor: pointer; font-size: 15px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--carrot); color: var(--carrot-ink); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 5px 13px; font-size: 14px; cursor: pointer; display: inline-flex; gap: 5px; align-items: baseline; }
.chip small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--carrot); border-color: var(--carrot); color: var(--carrot-ink); }
.chip[aria-pressed="true"] small { color: inherit; opacity: .85; }
.sumrow { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.sumrow h2 { margin: 0; font-size: 18px; }
.sumrow h2 b { color: var(--carrot-text); font-variant-numeric: tabular-nums; }
.linkbtn { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; font-size: 14px; }
.note { color: var(--muted); font-size: 13px; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: 16px; align-items: start; }
/* 地圖找房 */
.viewseg { margin-left: auto; }
.viewseg button { padding: 7px 14px; font-size: 14px; }
.mapwrap { display: grid; gap: 8px; }
#map { height: min(70vh, 600px); min-height: 360px; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; background: var(--sunk); }
.pin { position: absolute; transform: translate(-50%, calc(-100% - 8px)); background: var(--carrot); color: var(--carrot-ink); border: 2px solid #fff; border-radius: 999px; padding: 3px 10px; font: 700 13px/1.3 var(--font); white-space: nowrap; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--carrot); }
.pin:hover, .pin:focus-visible { background: var(--carrot-deep); color: #fff; z-index: 2; }
.iw { display: grid; gap: 3px; max-width: 230px; font-family: var(--font); color: #2A1F17; }
.iw img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.iw b { font-size: 15px; }
.iw span { font-size: 12.5px; color: #6E6158; }
.iw strong { font-size: 17px; color: #D2560E; }
.iw-act { display: flex; gap: 6px; margin-top: 6px; }
.iw-act button, .iw-act a { flex: 1; text-align: center; border-radius: 999px; padding: 6px 8px; font: 700 13px/1.2 var(--font); cursor: pointer; text-decoration: none; }
.iw-act button { border: 1px solid #D2560E; background: #fff; color: #D2560E; }
.iw-act a { border: 0; background: #06C755; color: #fff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 10px; min-width: 0; box-shadow: var(--shadow); }
.card.flash { outline: 3px solid var(--carrot); outline-offset: 2px; }
.card .top { display: flex; gap: 10px; justify-content: space-between; align-items: start; }
.card h3 { margin: 0; font-size: 17px; line-height: 1.35; text-wrap: balance; }
.card .type { color: var(--muted); font-size: 13.5px; margin: 2px 0 0; }
.cat { flex: none; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--carrot-soft); color: var(--carrot-deep); white-space: nowrap; }
.price { font-size: 23px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.2; color: var(--carrot-text); }
.price small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.units { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 14px; }
.units li { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.units b { font-variant-numeric: tabular-nums; }
.units li.in b { color: var(--carrot-deep); }
.units span { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 12.5px; padding: 1px 9px; border-radius: 6px; background: var(--leaf-soft); color: var(--leaf); }
.tag.hit { background: var(--carrot); color: var(--carrot-ink); font-weight: 700; }
.tag.no { background: var(--gray-soft); color: var(--gray); }
details summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
details ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 14px; }
details p { margin: 6px 0 0; font-size: 14px; }
.card .foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border-top: 1px dashed var(--line); padding-top: 12px; }
.code { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.card .btn-line { padding: 7px 14px; font-size: 14px; }
.fee { font-size: 13px; color: var(--muted); margin: 0; }
.map { justify-self: start; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; color: var(--carrot-deep); text-decoration: none; }
.map:hover { text-decoration: underline; }
.map svg { width: 17px; height: 17px; flex: none; }
.map small { font-weight: 400; font-size: 12px; color: var(--muted); }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 28px 18px; text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.empty b { color: var(--ink); font-size: 16px; }

/* 為什麼找蘿蔔 */
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.why div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.why .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--tea); color: var(--camel); display: grid; place-items: center; font-size: 21px; }
.why h3 { margin: 12px 0 4px; font-size: 17px; }
.why p { margin: 0; color: var(--muted); font-size: 14.5px; }
.why .tag { display: inline-block; }

/* 租屋補助試算 */
.sub { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.sub-kicker { margin: 0; font-size: 13px; font-weight: 700; color: var(--carrot-deep); letter-spacing: .04em; }
.sub h3 { margin: 4px 0 8px; font-size: 20px; line-height: 1.4; text-wrap: balance; }
.sub h3 b { color: var(--carrot-text); font-variant-numeric: tabular-nums; }
.sub-main > p:not(.sub-kicker) { margin: 0; color: var(--muted); font-size: 14.5px; }
.sub-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sub-tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.sub-tbl caption { text-align: left; font-weight: 700; font-size: 13px; color: var(--muted); padding-bottom: 6px; }
.sub-tbl th, .sub-tbl td { border-bottom: 1px solid var(--line); padding: 9px 6px; text-align: right; vertical-align: top; }
.sub-tbl thead th { background: var(--tea); color: var(--camel); font-size: 13px; white-space: nowrap; }
.sub-tbl th[scope="row"], .sub-tbl thead th:first-child { text-align: left; }
.sub-tbl th[scope="row"] small { display: block; word-break: keep-all; font-weight: 400; font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.sub-tbl td { font-weight: 700; white-space: nowrap; }
.sub-notes { grid-column: 1 / -1; margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--muted); font-size: 13.5px; }
.sub-notes b { color: var(--ink); }
@media (min-width: 860px) { .sub { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); padding: 26px 28px; gap: 20px 32px; } }
.faq a { color: var(--carrot-deep); }

/* 常見問題 */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.faq summary { color: var(--ink); font-weight: 700; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--carrot-deep); font-weight: 900; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); font-size: 14.5px; margin-top: 8px; }

/* 租屋小知識：文章入口卡片，點了到 /guide/ 的文章頁 */
.guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.gd { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); text-decoration: none; }
.gd:hover { border-color: var(--carrot); }
.gd .ico { grid-row: span 2; width: 42px; height: 42px; border-radius: 12px; background: var(--tea); display: grid; place-items: center; font-size: 20px; line-height: 1; }
.gd b { font-size: 16px; line-height: 1.45; }
.gd span:last-child { color: var(--muted); font-size: 14px; }
.sec-h small a { color: var(--carrot-deep); }

/* 收尾的找蘿蔔區塊與頁尾 */
.cta { background: var(--carrot); color: var(--carrot-ink); border-radius: 22px; padding: 26px 22px; display: grid; gap: 14px; justify-items: start; }
.cta h2 { margin: 0; font-size: 22px; line-height: 1.35; }
.cta p { margin: 0; opacity: .92; }
.cta .btn-line { background: var(--surface); color: var(--ink); }
.cta .btn-line svg { color: var(--line-green); }
@media (min-width: 760px) { .cta { grid-template-columns: 1fr auto; align-items: center; padding: 30px 36px; } .cta .btn-line { grid-row: 1 / span 2; grid-column: 2; } }
footer.site { margin-top: 26px; border-top: 1px solid var(--line); background: var(--surface); }
footer.site .wrap { padding-block: 22px 30px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
footer.site b { color: var(--ink); }
footer.site a { color: var(--carrot-deep); }

/* 底部固定按鈕列：手機和電腦都顯示；電腦版按鈕集中在中間，不拉滿整個螢幕 */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-inline: max(0px, calc((100% - 900px) / 2)); box-shadow: 0 -4px 14px rgba(80, 45, 15, .06); }
.dock a { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 9px; text-decoration: none; font-size: 12px; font-weight: 500; color: var(--muted); }
.dock a:hover { color: var(--carrot-deep); }
.dock svg { width: 22px; height: 22px; }
.dock a.go { color: var(--line-green); font-weight: 700; }
body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 760px) { .dock a { font-size: 13.5px; padding-block: 9px 10px; } body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: no-preference) { .chip, .seg button, .q, .mini { transition: background-color .15s, color .15s, border-color .15s; } }

/* 卡片連到物件專屬頁、房號旁的看照片 */
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--carrot-deep); text-decoration: underline; }
.more { justify-self: start; font-size: 14px; font-weight: 700; color: var(--carrot-deep); text-decoration: none; }
.more:hover { text-decoration: underline; }
.rm-ph { font-size: 13px; color: var(--carrot-deep); text-decoration: underline; }

/* 物件專屬頁（listing.php） */
.lp-back { margin: 0 0 12px; font-size: 14px; }
.lp-back a { color: var(--muted); text-decoration: none; }
.lp-back a:hover { color: var(--carrot-deep); }
.lp-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.lp-media { display: grid; gap: 10px; min-width: 0; scroll-margin-top: 76px; }
/* 一張大圖＋小圖列：照片再多頁面也不會變長。直式照片不裁切，兩側留底色 */
.lp-stage { position: relative; }
.lp-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: var(--r); background: var(--sunk); }
.lp-track::-webkit-scrollbar { display: none; }
.lp-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--camel); font-weight: 700; text-decoration: none; min-width: 0; }
.lp-slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lp-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255, 251, 245, .94); color: var(--carrot-deep); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .22); }
.lp-nav.prev { left: 10px; } .lp-nav.next { right: 10px; }
.lp-nav:disabled { opacity: .35; cursor: default; }
.lp-count { position: absolute; left: 10px; bottom: 10px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.lp-thumbs { position: relative; display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.lp-thumbs a { flex: 0 0 76px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--tea); color: var(--camel); display: grid; place-items: center; text-decoration: none; font-weight: 700; opacity: .72; }
.lp-thumbs a[aria-current] { opacity: 1; outline: 2px solid var(--carrot); outline-offset: 1px; }
.lp-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lp-cap { font-weight: 700; color: var(--camel); }
/* 房號按鈕：租金一起顯示，不用一間一間點才能比價 */
.lp-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.lp-rooms button { display: grid; gap: 1px; justify-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 6px 4px; cursor: pointer; min-width: 0; }
.lp-rooms b { font-size: 14.5px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lp-rooms small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lp-rooms button:hover { border-color: var(--carrot); }
.lp-rooms button[aria-pressed="true"] { background: var(--carrot); border-color: var(--carrot); color: var(--carrot-ink); }
.lp-rooms button[aria-pressed="true"] small { color: inherit; }
.lp-pricebar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.lp-noph { display: grid; justify-items: center; gap: 8px; padding: 36px 16px; border-radius: var(--r); background: var(--tea); color: var(--camel); text-align: center; }
.lp-noph svg { width: 72px; height: 72px; }
.lp-info h1 { margin: 0; font-size: 22px; line-height: 1.35; text-wrap: balance; }
.lp-list { margin: 0; padding-left: 1.2em; font-size: 14.5px; }
.lp-feat { margin: 0; font-size: 14.5px; }
.lp-act { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lp-share { border: 1px solid var(--camel); background: var(--surface); color: var(--camel); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.lp-share:hover { border-color: var(--carrot-deep); color: var(--carrot-deep); }
.lp-loc { display: grid; gap: 8px; min-width: 0; }
.lp-loc h2 { margin: 0; font-size: 17px; }
.lp-loc iframe { display: block; width: 100%; height: 300px; border: 0; border-radius: 12px; background: var(--tea); }
.lp-gone { margin-bottom: 8px; }
.lp-more { margin-top: 26px; }
@media (min-width: 900px) { .lp-cols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 24px; } .lp-media, .lp-loc { grid-column: 1; } .lp-info { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 76px; } .lp-loc iframe { height: 340px; } .lp-thumbs a { flex-basis: 92px; } }

/* 找房篩選：類型是可複選的下拉選單（有間數），條件收在「更多條件」，手機不用滑過一大塊表單才看到物件 */
.fpop { position: relative; }
.fpop > summary, .fmore > summary { list-style: none; cursor: pointer; color: var(--ink); }
.fpop > summary::-webkit-details-marker, .fmore > summary::-webkit-details-marker { display: none; }
.fpop > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 9.5em; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 16px; }
.fpop > summary::after { content: "▾"; color: var(--muted); font-size: 13px; }
.fpop[open] > summary { border-color: var(--carrot); }
.fpanel { position: absolute; z-index: 15; top: calc(100% + 6px); left: 0; width: min(260px, calc(100vw - 64px)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(80, 45, 15, .18); padding: 6px; display: grid; }
.fopt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 8px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.fopt:hover { background: var(--bg); }
.fopt input { width: 18px; height: 18px; margin: 0; accent-color: var(--carrot); }
.fopt small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.fopt.off { opacity: .45; cursor: default; }
.fmore { border-top: 1px dashed var(--line); padding-top: 10px; }
.fmore > summary { font-size: 14.5px; font-weight: 700; color: var(--camel); }
.fmore > summary::after { content: " ▾"; color: var(--muted); }
.fmore[open] > summary::after { content: " ▴"; }
.fmore .note { margin: 6px 0; }
/* 手機首屏：標語與數字縮小，第一屏就看得到找房 */
@media (max-width: 640px) {
  .hero .wrap { padding-block: 16px 10px; }
  .stats { gap: 6px; }
  .stat { padding: 7px 9px; gap: 2px; border-radius: 12px; }
  .stat b { font-size: 20px; }
  .stat span { font-size: 11.5px; }
  .stat span br { display: none; }
  .hero h1 { margin-top: 10px; font-size: clamp(25px, 7.2vw, 32px); }
  .hero .lead { margin-top: 8px; font-size: 14.5px; }
  .hero .lead-note { margin-top: 5px; font-size: 12.5px; }
  .quick { margin-top: 12px; }
  .sec { padding-block: 16px; }
  .frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .frow > .field:last-child { grid-column: 1 / -1; }
  .frow select, .fpop > summary { width: 100%; min-width: 0; }
  .rent-range select { width: auto; flex: 1; }
}
