/* =========================================================
   寓見 YUJIAN｜樣式
   版面依設計稿（1536 × 1024）量測：導覽列 60px、首屏 30／70 分割（照片高 413px）、
   搜尋框跨出照片下緣 47px、左右留邊 66px、物件卡片三欄。
   斷點：桌機 ≥1024、平板 640–1023、手機 <640。
   ========================================================= */
:root {
  --bg: #FFFFFF;
  --bg-2: #F8F8F5;
  --yellow: #FFE34A;
  --yellow-d: #F5D31F;
  --yellow-l: #FFF8D1;
  --ink: #252525;
  --ink-2: #4A4A47;
  --muted: #6B6B66;
  --line: #E4E4DF;
  --line-2: #D6D6D0;
  --r: 8px;
  --gl: 66px;
  --nav-h: 60px;
  --shadow: 0 4px 18px rgba(37, 37, 37, .06);
  --zh: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --en: "Inter", var(--zh);
  --ease: cubic-bezier(.2, .6, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
html.lock { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.7 var(--zh); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { list-style: none; padding: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
.en { font-family: var(--en); }
.i { width: 16px; height: 16px; flex: none; }
.i-20 { width: 20px; height: 20px; }
.i-24 { width: 24px; height: 24px; }
.i-32 { width: 32px; height: 32px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sp { flex: 1; }
.wrap { padding-inline: var(--gl); max-width: 1680px; margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--bg); border: 1px solid var(--ink); border-radius: 6px; }
.skip:focus { top: 10px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }
.sq { display: inline-block; width: 18px; height: 18px; background: var(--yellow); flex: none; }

/* ---------- 按鈕 ---------- */
.btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 37px; padding: 0 22px; border: 1.5px solid var(--ink); border-radius: 6px; font-weight: 500; background: #fff; transition: background .15s; }
.btn-line:hover { background: var(--bg-2); }
.btn-line.sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-dark { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 500; }
.btn-dark:hover { background: #000; }
.btn-go { display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: var(--yellow); color: var(--ink); border-radius: 6px; font-weight: 700; transition: background .15s; }
.btn-go:hover { background: var(--yellow-d); }
.link { text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); font-size: 15px; min-height: 44px; }
.link:hover { color: var(--ink); }
.note { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }

/* ---------- 導覽列 ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.nav-in { height: var(--nav-h); display: flex; align-items: center; padding-left: 70px; padding-right: 55px; }
.logo { display: inline-flex; align-items: center; gap: 15px; min-height: 44px; }
.logo-mark svg { width: 32px; height: 36px; display: block; color: var(--ink); }
.logo-txt { display: inline-flex; align-items: baseline; gap: 9px; white-space: nowrap; }
.logo-txt b { font-size: 25px; font-weight: 500; letter-spacing: .04em; }
.logo-txt i { font-style: normal; font-size: 17px; color: var(--ink-2); }
.logo-txt em { font-style: normal; font-size: 20px; font-weight: 500; letter-spacing: .06em; }
.nav-links { display: flex; align-items: center; }
.nav-links::before { content: ""; width: 1px; height: 24px; background: var(--line-2); margin: 0 44px 0 42px; }
.nav-links ul { display: flex; gap: 62px; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 18px; font-weight: 500; letter-spacing: .02em; }
.nav-links a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.nav-act { margin-left: auto; display: flex; align-items: center; gap: 27px; }
.nav-fav { position: relative; width: 44px; height: 44px; display: grid; place-items: center; }
.nav-fav .i { width: 30px; height: 30px; }
.badge { position: absolute; top: 3px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--yellow); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.nav-pub { font-size: 17px; min-height: 37px; padding: 0 22px; }
.burger { display: none; width: 44px; height: 44px; place-items: center; }
.mmenu { border-top: 1px solid var(--line); background: #fff; }
.mmenu ul { padding: 8px var(--gl) 16px; }
.mmenu a, .mmenu button { display: flex; align-items: center; width: 100%; min-height: 52px; font-size: 17px; font-weight: 500; border-bottom: 1px solid var(--line); }
.mmenu li:last-child button { border-bottom: 0; }

/* ---------- 首屏 ---------- */
.hero { display: grid; grid-template-columns: 462fr 1074fr; height: 380px; margin-top: 1px; }
.hero-txt { padding: 55px 12px 0 67px; }
.hero-txt .sq { width: 23px; height: 22px; }
.hero h1 { margin-top: 16px; font-size: 48px; line-height: 1.3; font-weight: 700; letter-spacing: .04em; }
.hero h1 span { display: block; white-space: nowrap; }
.hero p { margin-top: 14px; font-size: clamp(16px, 1.24vw, 19px); letter-spacing: .06em; color: var(--ink); }
.hero-ph { overflow: hidden; background: var(--bg-2); }
.hero-ph img { width: 100%; height: 100%; object-fit: cover; object-position: var(--fx); }
@media (min-width: 1024px) { .hero-ph img { object-position: 50% 0; } }

/* ---------- 搜尋 ---------- */
.search { position: relative; z-index: 20; margin-top: -14px; padding-right: calc(var(--gl)); }
.sbox { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); max-width: 1403px; }
.srow { display: flex; align-items: center; height: 102px; padding: 0 25px 0 0; }
.sf { position: relative; height: 100%; display: flex; align-items: center; }
.sf + .sf::before { content: ""; position: absolute; left: 0; top: 26px; bottom: 18px; width: 1px; background: var(--line-2); }
.sf[data-field="area"] { flex: 0 0 407px; }
.sf[data-field="rent"] { flex: 0 0 342px; }
.sf[data-field="type"] { flex: 1 1 auto; }
.sf-btn { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; width: 100%; height: 100%; padding: 0 20px 0 40px; text-align: left; border-radius: 6px; }
.sf[data-field="rent"] .sf-btn { padding-left: 55px; }
.sf[data-field="type"] .sf-btn { padding-left: 63px; }
.sf-lbl { font-size: 16px; color: var(--ink-2); }
.sf-val { display: flex; align-items: center; gap: 12px; max-width: 100%; font-size: 22px; font-weight: 500; letter-spacing: .02em; }
.sf-val > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-val .chev { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.sf.open .chev { transform: rotate(180deg); }
.sf-btn:hover .sf-val > span { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.srow .btn-go { flex: 0 0 256px; height: 57px; margin-left: auto; font-size: 23px; letter-spacing: .08em; }
.smore { margin: 0 29px; border-top: 1px solid var(--line); display: flex; justify-content: center; }
.more-btn { display: inline-flex; align-items: center; gap: 14px; min-height: 51px; padding: 0 16px; font-size: 17px; letter-spacing: .06em; }
.more-btn .i { width: 24px; height: 24px; }
.more-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--yellow); font-size: 12px; font-weight: 600; line-height: 20px; letter-spacing: 0; }

/* 下拉面板 */
.pop { position: absolute; left: 16px; top: calc(100% - 6px); z-index: 30; width: 380px; max-height: min(520px, 70vh); overflow: auto; overscroll-behavior: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgba(37, 37, 37, .12); padding: 6px 20px 18px; }
#pop-area { width: 460px; }
.pop-h { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.pop-h b { font-size: 16px; font-weight: 700; }
.x { width: 44px; height: 44px; margin-right: -12px; display: grid; place-items: center; border-radius: 6px; }
.x:hover { background: var(--bg-2); }
.pop fieldset + fieldset { margin-top: 14px; }
legend, .more-body legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
legend small { font-size: 12px; color: var(--muted); margin-left: 4px; font-weight: 400; }
.pop-f { display: flex; justify-content: flex-end; margin-top: 16px; }
.pop-f .btn-dark { min-width: 96px; }

/* 選項元件（原生 radio／checkbox，支援鍵盤） */
.opt-chip, .opt-chk, .opt-row { position: relative; display: block; cursor: pointer; }
.opt-chip input, .opt-chk input, .opt-row input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 15px; }
.opt-chip input:checked + span { background: var(--yellow); border-color: var(--yellow); font-weight: 500; }
.opt-chip input:focus-visible + span, .opt-chk input:focus-visible + span, .opt-row input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opt-chk span { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; }
.opt-chk .ck { width: 14px; height: 14px; padding: 1px; border: 1px solid var(--line-2); border-radius: 3px; color: transparent; }
.opt-chk input:checked + span { background: var(--yellow-l); border-color: #EBD565; }
.opt-chk input:checked + span .ck { background: var(--yellow); border-color: var(--ink); color: var(--ink); }
.opts { display: grid; }
.opt-row span { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 12px; border-radius: 6px; font-size: 16px; }
.opt-row:hover span { background: var(--bg-2); }
.opt-row .ck { color: transparent; }
.opt-row input:checked + span { background: var(--yellow-l); font-weight: 500; }
.opt-row input:checked + span .ck { color: var(--ink); }
.custom { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.range { display: flex; align-items: center; gap: 8px; }
.range input { width: 0; flex: 1; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 6px; font-family: var(--en); font-size: 16px; }
.range input:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: transparent; }
.range .unit { font-size: 15px; color: var(--ink-2); }
.err { min-height: 0; font-size: 13px; color: #C2410C; }
.err:not(:empty) { margin-top: 8px; }

/* ---------- 物件列表 ---------- */
.list { padding-top: 48px; padding-bottom: 72px; scroll-margin-top: calc(var(--nav-h) + 8px); }
.sec-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 0; min-height: 44px; padding-left: 0; }
.sec-h h2 { display: flex; align-items: center; gap: 18px; font-size: 30px; font-weight: 700; letter-spacing: .06em; line-height: 1.3; }
.sec-note { display: inline-flex; align-items: center; font-size: 17px; color: var(--ink-2); letter-spacing: .04em; }
.sec-note::before { content: ""; width: 1px; height: 20px; background: var(--ink-2); margin: 0 21px 0 29px; }
.sec-note b { font-weight: 600; margin: 0 4px; }
.more-all { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 17px; font-weight: 500; letter-spacing: .04em; }
.more-all .i { width: 22px; height: 22px; transition: transform .2s var(--ease); }
.more-all:hover .i { transform: translateX(3px); }
.sorts { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.sorts button { min-height: 40px; padding: 0 14px; font-size: 14px; }
.sorts button + button { border-left: 1px solid var(--line-2); }
.sorts button[aria-pressed="true"] { background: var(--yellow); font-weight: 500; }
.conds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.conds span { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 15px; font-size: 14px; }
.conds .link { margin-left: 6px; min-height: 30px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 20px; margin-top: 20px; }
@media (min-width: 1440px) { .grid { margin-inline: -15px; } .list .sec-h { margin-left: -8px; } .list .conds, .list .empty { margin-left: -15px; } }
.card { position: relative; cursor: pointer; }
.card-ph { position: relative; aspect-ratio: 1125 / 568; overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.card-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-ph img { transform: scale(1.03); }
.fav { position: absolute; top: 6px; right: 8px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); }
.fav .i { width: 27px; height: 27px; grid-area: 1 / 1; filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 6px rgba(255, 255, 255, .95)); }
.fav .h-fill { color: #fff; }
.fav.on .h-fill { color: var(--yellow); }
.fav:hover .h-fill { color: var(--yellow-l); }
.fav.on:hover .h-fill { color: var(--yellow-d); }
.card-tx { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; padding: 4px 10px 0; }
.card h3 { grid-column: 1 / -1; font-size: 22px; font-weight: 500; letter-spacing: .04em; line-height: 1.4; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card h3 a:focus-visible { outline: none; }
.card:has(h3 a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
.card-m .dot { margin: 0 7px; }
.card-m { font-size: 16px; color: var(--ink-2); letter-spacing: .02em; line-height: 1.5; }
.card-p { font-size: 15px; white-space: nowrap; line-height: 1.3; }
.card-p b { font-size: 21px; font-weight: 700; letter-spacing: 0; }
.card-p span { color: var(--ink-2); }
.empty { margin-top: 28px; padding: 48px 24px; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--bg-2); display: grid; justify-items: center; gap: 14px; text-align: center; }
.empty p { font-size: 17px; }

/* ---------- 租屋指南 ---------- */
.guide { background: var(--bg-2); border-top: 1px solid var(--line); padding: 64px 0 56px; scroll-margin-top: var(--nav-h); }
.posts { margin-top: 22px; border-top: 1px solid var(--line-2); }
.posts li { border-bottom: 1px solid var(--line-2); }
.posts a { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 16px; padding: 22px 4px; }
.posts .no { font-size: 15px; color: var(--muted); }
.posts .pt { display: grid; gap: 2px; }
.posts small { font-size: 13px; color: var(--muted); }
.posts b { font-size: 19px; font-weight: 500; letter-spacing: .03em; }
.posts em { font-style: normal; font-size: 15px; color: var(--ink-2); }
.posts .go { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.posts a:hover b { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.guide .note { margin-top: 16px; }

/* ---------- 頁尾 ---------- */
.foot { border-top: 1px solid var(--line); background: #fff; }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; padding-top: 40px; padding-bottom: 32px; }
.foot-brand p { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.foot-links { display: flex; gap: 32px; align-items: flex-start; }
.foot-links a, .foot-links button { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; }
.foot-links a:hover, .foot-links button:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-contact { font-size: 14px; color: var(--ink-2); }
.foot-note { grid-column: 1 / -1; padding-top: 18px; gap: 8px; border-top: 1px solid var(--line); }
.foot-copy { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* ---------- 提示 ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 300; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 14px; transition: .25s var(--ease); max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 彈窗 ---------- */
.mdl { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.mdl-bd { position: absolute; inset: 0; background: rgba(37, 37, 37, .42); opacity: 0; transition: opacity .2s; }
.mdl-box { position: relative; width: min(560px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; background: #fff; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .18); transform: translateY(12px); opacity: 0; transition: .22s var(--ease); }
.mdl.on .mdl-bd { opacity: 1; }
.mdl.on .mdl-box { transform: none; opacity: 1; }
.mdl-h { display: flex; align-items: center; gap: 12px; padding: 10px 16px 6px 24px; min-height: 60px; }
.mdl-t { flex: 1; font-size: 20px; font-weight: 700; letter-spacing: .03em; }
.mdl-t small { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.mdl-b { overflow: auto; overscroll-behavior: contain; padding: 4px 24px 24px; }
.mdl-b > p + p { margin-top: 10px; }
.mdl-f { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); }
.mdl-f .btn-line { min-height: 44px; }
.mdl-note .mdl-b p { color: var(--ink-2); }
.more-body fieldset + fieldset { margin-top: 22px; }
.needs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mdl-more .range { max-width: 360px; }

/* 收藏清單：右側抽屜 */
.mdl-side { place-items: stretch end; padding: 0; }
.mdl-side .mdl-box { width: min(440px, 100%); max-height: none; height: 100%; border-radius: 0; transform: translateX(24px); }
.fav-list { display: grid; gap: 12px; }
.fav-item { position: relative; }
.fav-item a { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); }
.fav-item a:hover { background: var(--bg-2); }
.fav-item img { width: 132px; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; }
.fav-item span { display: grid; gap: 2px; padding-right: 36px; }
.fav-item b { font-size: 16px; font-weight: 500; }
.fav-item small { font-size: 13px; color: var(--ink-2); }
.fav-item em { font-style: normal; font-weight: 700; font-size: 16px; }
.fav-item em i { font-style: normal; font-weight: 400; font-size: 13px; color: var(--ink-2); }
.fav-sm { top: 50%; right: 6px; transform: translateY(-50%); }
.fav-sm .i { width: 22px; height: 22px; }
.fav-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 48px 12px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.fav-empty .i { color: var(--muted); }
.fav-empty small { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.mdl-favs .note { margin-top: 16px; }

/* 物件詳情 */
.mdl-detail .mdl-box { width: min(1080px, 100%); }
.mdl-detail .mdl-h { position: absolute; top: 0; right: 0; z-index: 3; padding: 8px; min-height: 0; }
.mdl-detail .mdl-h .x { margin: 0; background: rgba(255, 255, 255, .92); }
.mdl-detail .mdl-b { padding: 0; }
.dt { display: grid; grid-template-columns: 1.25fr 1fr; }
.gal { padding: 24px; border-right: 1px solid var(--line); }
.gal-main { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; background: var(--bg-2); }
.gal-main img { width: 100%; height: 100%; object-fit: cover; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.gal-nav.prev { left: 12px; } .gal-nav.next { right: 12px; }
.gal-n { position: absolute; right: 12px; bottom: 12px; padding: 2px 10px; border-radius: 12px; background: rgba(37, 37, 37, .7); color: #fff; font-size: 13px; }
.gal-th { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.gal-th button { border-radius: 4px; overflow: hidden; outline-offset: 2px; opacity: .65; border: 2px solid transparent; }
.gal-th button[aria-current="true"] { opacity: 1; border-color: var(--yellow); }
.gal-th img { aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover; }
.gal .note { margin-top: 12px; }
.dt-info { padding: 28px 28px 28px; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 4px; background: var(--yellow-l); border: 1px solid #EBD565; font-size: 12px; font-weight: 500; }
.dt-info h2 { margin-top: 10px; font-size: 26px; font-weight: 700; letter-spacing: .04em; }
.dt-p { margin-top: 2px; font-size: 15px; color: var(--ink-2); }
.dt-p b { font-size: 26px; color: var(--ink); }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.specs div { padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs dt { font-size: 12px; color: var(--muted); }
.specs dd { font-size: 15px; font-weight: 500; }
.dt-info h3 { margin-top: 20px; margin-bottom: 8px; font-size: 15px; font-weight: 700; }
.equip { display: flex; flex-wrap: wrap; gap: 6px; }
.equip li { padding: 2px 10px; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; }
.needs-l { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; }
.needs-l li { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.needs-l .y .i { color: var(--ink); background: var(--yellow); border-radius: 3px; padding: 1px; }
.needs-l .n { color: #A3A39E; }
.desc { font-size: 15px; color: var(--ink-2); }
.addr { display: flex; align-items: flex-start; gap: 6px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.addr .i { margin-top: 3px; }
.dt-act { display: flex; gap: 10px; margin-top: 20px; }
.fav-line { position: static; flex: none; width: 52px; height: 52px; border: 1px solid var(--line-2); border-radius: 6px; }
.fav-line .i { filter: none; }
.fav-line .h-fill { color: transparent; }
.dt-act .btn-go { flex: 1; min-height: 52px; font-size: 17px; }

/* 文章 */
.mdl-post .mdl-box { width: min(640px, 100%); }
.mdl-post .meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.mdl-post .lead { margin-top: 14px; font-size: 17px; }
.steps { margin-top: 14px; display: grid; gap: 10px; counter-reset: s; }
.steps li { position: relative; padding-left: 34px; color: var(--ink-2); counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 4px; background: var(--yellow); color: var(--ink); font: 600 13px/24px var(--en); text-align: center; }
.mdl-post .note { margin-top: 18px; }

/* =========================================================
   大桌機（≥1680）：內容置中
   ========================================================= */
@media (min-width: 1680px) {
  .nav-in { max-width: 1680px; margin-inline: auto; }
}

/* =========================================================
   桌機窄版 1024–1439：依比例縮小
   ========================================================= */
@media (max-width: 1439px) {
  :root { --gl: 48px; }
  .nav-in { padding-left: 48px; padding-right: 40px; }
  .nav-links::before { margin: 0 32px; }
  .nav-links ul { gap: 44px; }
  .hero { height: 380px; }
  .hero-txt { padding-left: 48px; }
  .hero h1 { font-size: clamp(36px, 3.2vw, 46px); }
  .sf[data-field="area"] { flex-basis: 30%; }
  .sf[data-field="rent"] { flex-basis: 25%; }
  .sf-btn, .sf[data-field="rent"] .sf-btn, .sf[data-field="type"] .sf-btn { padding-left: 32px; }
  .srow .btn-go { flex-basis: 200px; }
}

/* =========================================================
   平板 640–1023
   ========================================================= */
@media (max-width: 1023px) {
  :root { --gl: 32px; }
  .nav-in { padding-inline: 32px 24px; }
  .nav-links::before { margin: 0 24px; }
  .nav-links ul { gap: 28px; }
  .nav-links a, .nav-pub { font-size: 16px; }
  .nav-act { gap: 12px; }
  .hero { display: block; height: auto; }
  .hero-txt { padding: 40px 32px 28px; }
  .hero-txt .sq { width: 18px; height: 18px; }
  .hero h1 { margin-top: 20px; font-size: 40px; }
  .hero h1 span { display: inline; }
  .hero p { margin-top: 12px; }
  .hero-ph { height: 46vw; max-height: 440px; }
  .hero-ph img { object-position: var(--ft); }
  .search { margin-top: -40px; }
  .srow { flex-wrap: wrap; height: auto; padding: 8px 20px 20px; }
  .sf { flex: 1 1 0 !important; height: 84px; }
  .sf-btn, .sf[data-field="rent"] .sf-btn, .sf[data-field="type"] .sf-btn { padding: 4px 12px 0 16px; }
  .sf-val { font-size: 18px; gap: 8px; }
  .srow .btn-go { flex: 1 1 100%; height: 52px; margin-top: 8px; font-size: 19px; }
  .smore { margin: 0 20px; }
  .pop { left: 0; }
  .sf[data-field="type"] .pop { left: auto; right: 0; }
  #pop-area { width: min(460px, calc(100vw - 64px)); }
  .list { padding-top: 44px; }
  .sec-h h2 { font-size: 26px; gap: 14px; }
  .sec-note::before { margin: 0 14px 0 18px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 18px; }
  .card-ph { aspect-ratio: 16 / 10; }
  .card h3 { font-size: 19px; }
  .card-m { font-size: 14px; }
  .card-p b { font-size: 20px; }
  .card-tx { padding-inline: 2px; }
  .sorts { margin-top: 4px; }
  .dt { grid-template-columns: 1fr; }
  .gal { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* 平板窄：導覽改為選單 */
@media (max-width: 860px) {
  .nav-links, .nav-pub { display: none; }
  .burger { display: grid; }
}

/* =========================================================
   手機 <640
   ========================================================= */
@media (max-width: 639px) {
  :root { --gl: 18px; --nav-h: 56px; }
  body { font-size: 15px; }
  .nav-in { padding-inline: 16px 8px; }
  .logo { gap: 10px; }
  .logo-mark svg { width: 26px; height: 30px; }
  .logo-txt { gap: 6px; }
  .logo-txt b { font-size: 20px; }
  .logo-txt i { font-size: 14px; }
  .logo-txt em { font-size: 16px; }
  .nav-act { gap: 2px; }
  .nav-fav .i { width: 26px; height: 26px; }
  .mmenu ul { padding-inline: 18px; }
  .hero-txt { padding: 28px 18px 22px; }
  .hero-txt .sq { width: 16px; height: 16px; }
  .hero h1 { margin-top: 16px; font-size: 28px; line-height: 1.4; letter-spacing: .03em; }
  .hero h1 span { display: block; }
  .hero p { font-size: 15px; margin-top: 10px; }
  .hero-ph { height: auto; aspect-ratio: 4 / 3; max-height: none; }
  .hero-ph img { object-position: var(--fm); }
  .search { margin-top: 16px; }
  .sbox { box-shadow: 0 2px 10px rgba(37, 37, 37, .05); }
  .srow { display: block; padding: 4px 16px 16px; }
  .sf { height: auto; display: block; }
  .sf + .sf::before { display: none; }
  .sf { border-bottom: 1px solid var(--line); }
  .sf-btn, .sf[data-field="rent"] .sf-btn, .sf[data-field="type"] .sf-btn { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 0 2px; }
  .sf-lbl { font-size: 14px; flex: none; }
  .sf-val { font-size: 16px; min-width: 0; justify-content: flex-end; }
  .srow .btn-go { display: flex; width: 100%; height: 52px; margin-top: 16px; font-size: 18px; }
  .smore { margin: 0 16px; }
  .more-btn { min-height: 48px; font-size: 15px; }
  /* 下拉面板 → 底部抽屜 */
  .pop, #pop-area { position: fixed; left: 0 !important; right: 0 !important; top: auto; bottom: 0; width: 100%; max-height: 82vh; max-height: 82dvh; border-radius: 14px 14px 0 0; border: 0; padding: 4px 18px calc(18px + env(safe-area-inset-bottom)); z-index: 90; }
  body.sheet-on::after { content: ""; position: fixed; inset: 0; z-index: 80; background: rgba(37, 37, 37, .42); }
  body.sheet-on .search { z-index: 85; }
  body.sheet-on .nav { z-index: 10; }
  .dgrid { grid-template-columns: repeat(3, 1fr); }
  .opt-chk span { min-height: 44px; padding: 0 8px; font-size: 14px; }
  .opt-chip span { min-height: 44px; }
  .list { padding-top: 40px; padding-bottom: 52px; }
  .sec-h h2 { font-size: 22px; gap: 12px; }
  .sec-h .sq { width: 14px; height: 14px; }
  .sec-note { font-size: 14px; }
  .sec-note::before { margin: 0 12px; height: 16px; }
  .more-all { font-size: 15px; }
  .sorts { width: 100%; }
  .conds .link { min-height: 44px; }
  .sorts button { flex: 1; min-height: 44px; padding: 0 6px; font-size: 13px; }
  .grid { grid-template-columns: 1fr; gap: 26px; margin-top: 16px; }
  .card h3 { font-size: 18px; }
  .card-m { font-size: 14px; }
  .card-p b { font-size: 19px; }
  .guide { padding: 44px 0 40px; }
  .posts a { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .posts .no { display: none; }
  .posts b { font-size: 17px; }
  .posts em { font-size: 14px; }
  .foot-in { grid-template-columns: 1fr; padding-top: 32px; }
  .foot-links { flex-wrap: wrap; gap: 0 24px; }
  /* 彈窗 → 底部抽屜／全螢幕 */
  .mdl { padding: 0; place-items: end stretch; }
  .mdl-box { width: 100%; max-height: 90vh; max-height: 90dvh; border-radius: 14px 14px 0 0; transform: translateY(24px); }
  .mdl-f { padding-bottom: calc(14px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .mdl-h { padding-left: 18px; }
  .mdl-b { padding-inline: 18px; }
  .needs { grid-template-columns: repeat(2, 1fr); }
  .mdl-side { place-items: end stretch; }
  .mdl-side .mdl-box { height: auto; max-height: 90dvh; border-radius: 14px 14px 0 0; transform: translateY(24px); }
  .fav-item a { grid-template-columns: 104px 1fr; }
  .fav-item img { width: 104px; }
  .mdl-detail .mdl-box { height: 100%; max-height: 100dvh; border-radius: 0; }
  .gal { padding: 0 0 16px; }
  .gal-main { border-radius: 0; }
  .gal-th { padding: 0 18px; }
  .gal .note { padding: 0 18px; }
  .dt-info { padding: 20px 18px 28px; }
  .dt-info h2 { font-size: 22px; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .needs-l { grid-template-columns: repeat(2, 1fr); }
  .dt-act { position: sticky; bottom: 0; background: #fff; padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); margin-bottom: -16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
