/* 顧問式找房（/consult.html，2026-11-16）。全部 iPhone 式圓角，沒有直角的框。
   沒列在 _headers 的 immutable 清單：改了會回源驗證，但引用處仍帶 ?v= 方便辨識版本。 */
/* iOS 風格：系統字、分組圓角卡片、分段控制（Segmented Control）、大圓角實心按鈕；顏色沿用全站色票 */
.page-consult { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Noto Sans TC", "Helvetica Neue", sans-serif; background: var(--bg); }
.cf-hero { max-width: 720px; margin: 0 auto; padding: 20px var(--gutter) 8px; }
.cf-eyebrow { margin: 14px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; color: var(--accent-strong); text-transform: none; }
.cf-title { margin: 0 0 10px; font-size: clamp(26px, 5.6vw, 36px); line-height: 1.28; font-weight: 700; letter-spacing: 0.01em; }
.cf-lead { margin: 0 0 18px; font-size: 15px; line-height: 1.65; color: var(--text-secondary); }
.cf-wrap { max-width: 720px; margin: 0 auto; padding: 8px var(--gutter) calc(var(--agent-bar-h) + 40px); }
.cf-form { display: flex; flex-direction: column; gap: 16px; }
.cf-card[hidden], .cf-form[hidden], .cf-chips[hidden], .cf-hint[hidden], .cf-error[hidden], .cf-progress[hidden], .cf-field input[hidden], .cf-line-off[hidden], .cf-line-on[hidden] { display: none; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 16px;
}
.cf-card-title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.cf-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cf-label { font-size: 14px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cf-req { font-size: 11.5px; font-weight: 600; color: var(--danger); background: rgba(180, 72, 59, 0.08); padding: 2px 8px; border-radius: 999px; }
.cf-plus { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--accent-strong); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
.cf-hint { margin: 0; font-size: 12.5px; color: var(--text-secondary); }
.cf-field input[type=text], .cf-field input[type=tel], .cf-field input[type=date], .cf-field textarea, .cf-count select {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text-primary);
  font: inherit; font-size: 16px; box-sizing: border-box; -webkit-appearance: none; appearance: none;
}
.cf-field input[type=date] { display: block; min-width: 0; }
.cf-field textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.cf-field input:focus-visible, .cf-field textarea:focus-visible, .cf-count select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.cf-field .is-invalid { border-color: var(--danger); background: rgba(180, 72, 59, 0.04); }
.cf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-chip {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-primary); font: inherit; font-size: 14.5px; cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.cf-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
/* 單選：iOS 分段控制 */
.cf-chips:not(.cf-chips-multi) { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 2px; padding: 3px; background: var(--surface-secondary); border-radius: 14px; }
.cf-chips:not(.cf-chips-multi) .cf-chip { min-height: 38px; padding: 0 6px; border: 0; border-radius: 11px; background: transparent; font-size: 14.5px; font-weight: 500; color: var(--text-primary); }
.cf-chips:not(.cf-chips-multi) .cf-chip[aria-pressed="true"] { background: var(--surface); color: var(--text-primary); font-weight: 600; box-shadow: 0 1px 2px rgba(29,28,26,0.12), 0 3px 8px rgba(29,28,26,0.08); }
.cf-chip:active { transform: scale(0.97); }
.cf-districts { padding: 12px; border-radius: var(--radius); background: var(--surface-secondary); max-height: 220px; overflow-y: auto; }
.cf-districts .cf-chip { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.cf-row { display: flex; gap: 12px; }
.cf-count { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-secondary); }
.cf-count select { flex: 1; text-align: center; padding-right: 14px; }
.cf-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; cursor: pointer; }
.cf-agree input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: 0 0 auto; }
.cf-error { margin: 0; padding: 12px 16px; border-radius: var(--radius); background: rgba(180, 72, 59, 0.08); color: var(--danger); font-size: 14px; }
.cf-submit { width: 100%; min-height: 54px; font-size: 17px; border-radius: 16px; letter-spacing: 0.02em; }
.cf-done-actions .btn { border-radius: 14px; }
.cf-done { align-items: center; text-align: center; padding: 36px 24px; }
.cf-done p { margin: 0; color: var(--text-secondary); line-height: 1.6; }
.cf-done-mark { width: 56px; height: 56px; border-radius: 999px; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-size: 26px; font-weight: 700; }
.cf-done-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
/* 2026-11-17 改版：信任標語、進度條、三步驟、加減人數、LINE 驗證、完成頁摘要 */
.cf-trust { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cf-trust li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-soft); font-size: 12.5px; color: var(--text-secondary); line-height: 1.35; min-width: 0; }
.cf-trust li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.cf-trust b { color: var(--text-primary); font-size: 13.5px; font-weight: 600; }
.cf-trust-ico { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.cf-progress { position: sticky; top: var(--header-h); z-index: 5; margin: 0 0 12px; padding: 12px 16px; border-radius: 18px; background: rgba(250, 248, 244, 0.92); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 8px); }
.cf-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.cf-progress-time { font-size: 12.5px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }
.cf-progress-bar { height: 6px; border-radius: 999px; background: var(--surface-secondary); overflow: hidden; }
.cf-progress-bar span { display: block; height: 100%; width: 33.3%; border-radius: 999px; background: var(--ink); transition: width .35s var(--ease); }
.cf-step[hidden] { display: none; }
.cf-sub { font-size: 12.5px; font-weight: 500; color: var(--text-tertiary); }
.cf-card-title .cf-sub { display: block; margin-top: 4px; }
.cf-mini { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.cf-why { margin: -2px 0 0; font-size: 12.5px; color: var(--accent-strong); }
.cf-why::before { content: "💡 "; }
.cf-chips-pill { display: flex !important; flex-wrap: wrap; gap: 8px !important; padding: 0 !important; background: none !important; }
.cf-chips-pill .cf-chip { min-height: 40px !important; padding: 0 16px !important; border: 1px solid var(--border-strong) !important; border-radius: 999px !important; background: var(--surface) !important; box-shadow: none !important; }
.cf-chips-pill .cf-chip[aria-pressed="true"] { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--surface) !important; }
.cf-field.is-invalid .cf-chips, .cf-field.is-invalid input { box-shadow: 0 0 0 2px rgba(180, 72, 59, 0.35); border-radius: 14px; }
.cf-field.is-invalid::after { content: attr(data-msg); font-size: 13px; color: var(--danger); font-weight: 600; }
.cf-hint.is-bad { color: var(--danger); font-weight: 600; }
.cf-nav { display: flex; gap: 10px; margin-top: 4px; }
.cf-nav .btn { flex: 1; min-height: 52px; border-radius: 16px; font-size: 16.5px; }
.cf-nav .cf-back { flex: 0 0 34%; }
.cf-nav-only-back { justify-content: center; margin-top: -4px; }
.cf-link { border: 0; background: none; color: var(--text-secondary); font: inherit; font-size: 14px; padding: 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cf-stepper { flex: 1; display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 14px; background: var(--surface-secondary); }
.cf-stepper-label { padding: 0 6px 0 8px; font-size: 14.5px; color: var(--text-secondary); }
.cf-stepper button { width: 40px; height: 38px; border: 0; border-radius: 11px; background: var(--surface); color: var(--text-primary); font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 1px 2px rgba(29,28,26,0.12); }
.cf-stepper button:disabled { opacity: .35; cursor: default; }
.cf-stepper output { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.cf-line { padding: 14px; border-radius: 18px; background: var(--surface-secondary); }
.cf-line-off { display: flex; flex-direction: column; gap: 8px; }
.cf-line-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; border: 0; border-radius: 14px; background: #06C755; color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; }
.cf-line-btn svg { width: 22px; height: 22px; }
.cf-line-btn:active { transform: scale(0.98); }
.cf-line-on { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.cf-line-on > span:nth-child(2) { flex: 1; min-width: 0; }
.cf-line-ok { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 999px; background: #06C755; color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.cf-fine { margin: -4px 0 0; font-size: 12px; color: var(--text-tertiary); text-align: center; line-height: 1.5; }
.cf-line-add { max-width: 320px; min-height: 54px; font-size: 17px; border-radius: 16px; }
.cf-summary { width: 100%; max-width: 420px; margin: 4px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--surface-secondary); display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; text-align: left; font-size: 14px; }
.cf-summary dt { color: var(--text-secondary); white-space: nowrap; }
.cf-summary dd { margin: 0; color: var(--text-primary); word-break: break-word; }
@media (max-width: 767.98px) {
  .cf-trust { gap: 6px; }
  .cf-trust li { flex-direction: column; align-items: center; text-align: center; padding: 10px 6px; gap: 4px; font-size: 12px; }
  .cf-trust li > span:last-child { align-items: center; }
  .cf-trust b { font-size: 13px; }
  .cf-progress { top: var(--header-h); padding: 10px 14px; }
  .cf-hero { padding: 8px 16px 4px; }
  .cf-wrap { padding: 4px 16px calc(var(--agent-bar-h) + 32px); }
  .cf-card { padding: 16px; border-radius: 20px; gap: 14px; }
}
/* 320px 小螢幕：標題不留單字一行、分段控制不換行 */
.cf-chips:not(.cf-chips-multi) .cf-chip { white-space: nowrap; }
@media (max-width: 360px) {
  .cf-title { font-size: 22px; }
  .cf-chips:not(.cf-chips-multi) .cf-chip { font-size: 13.5px; padding: 0 4px; }
  .cf-trust b { font-size: 12.5px; }
}
/* 完成頁：先看符合需求的物件（2026-11-17） */
.cf-match { width: 100%; max-width: 320px; min-height: 52px; border-radius: 16px; font-size: 16.5px; }
.cf-match-note { margin: -6px 0 0 !important; font-size: 12.5px; color: var(--text-tertiary) !important; }
