/* ==========================================================================
   有為全屋定制 · 品牌樣式
   簡約大氣：大量留白、細線分隔、暖木色點綴
   ========================================================================== */

:root {
  /* 色調取自品牌手冊（深墨綠 × 暖木 × 白）：手冊底色 #202820–#2b3228 */
  --bg: #ffffff;
  --bg-alt: #f5f7f3;
  --bg-warm: #edf1e9;
  --ink: #18211b;
  --ink-2: #4f5a51;
  --ink-3: #7d887f;
  --line: #e2e7df;
  --line-strong: #c9d2c6;
  --brand: #2f4a37;
  --brand-dark: #22382a;
  --brand-soft: #edf2ec;
  /* 深色帶專用：手冊封面的墨綠底色。比 --ink 略亮，綠色調才看得出來 */
  --deep: #212b23;
  --deep-2: #1a231c;
  --ok: #2f7d5d;
  --warn: #b4541f;
  --danger: #b23b3b;
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1200px;
  /* LINE 官方帳號的識別綠，只用於「加入好友」按鈕與 QR 卡 */
  --line-brand: #06c755;
  --line-brand-dark: #05a648;
  --line-brand-soft: #eef8f1;
  --shadow-sm: 0 1px 2px rgba(22, 24, 26, .05);
  --shadow: 0 1px 2px rgba(22, 24, 26, .04), 0 18px 40px -20px rgba(22, 24, 26, .18);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "PingFang TC", "Hiragino Sans TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: .01em;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.05rem; }
p { margin: 0; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-size: 1.02rem; font-weight: 600; letter-spacing: .02em; }
.brand-sub { font-size: .62rem; letter-spacing: .07em; color: var(--ink-3); white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.nav a {
  position: relative;
  /* nowrap 是關鍵：少了它，9 個項目在 1200px 附近會各自折成兩行，
     選單會變得像壞掉（高度 69px、字被切兩行）。 */
  white-space: nowrap;
  padding: 8px 12px;
  font-size: .92rem;
  color: var(--ink-2);
  border-radius: 8px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--bg-alt); }
.nav a.is-active { color: var(--ink); font-weight: 600; }
.nav a.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -12px;
  height: 2px; background: var(--brand); border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  cursor: pointer; color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ink); color: #fff;
  font-size: .94rem; font-weight: 500; font-family: inherit;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); padding: 8px 12px; }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: var(--danger); border-color: #eccfcf; }
.btn-danger:hover { background: #fdf4f4; }

/* 兩段式刪除：第一次點了之後按鈕轉紅並改字，再點一次才真的刪。
   取代 window.confirm（瀏覽器擋掉對話方塊時 confirm() 一律回傳 false，
   刪除鈕會看起來「點了沒反應」）。由 assets/js/app.js 的 YW.twice() 控制。 */
.btn.is-armed,
.is-armed {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--deep-2); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(11, 20, 14, .84) 0%, rgba(11, 20, 14, .56) 46%, rgba(11, 20, 14, .18) 100%);
}
.hero-inner { position: relative; padding: 122px 0 104px; max-width: 720px; color: #fff; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255, 255, 255, .72); margin-bottom: 22px;
}
.hero-eyebrow::before { content: ""; width: 34px; height: 1px; background: rgba(255, 255, 255, .55); }
.hero-title { color: #fff; }
.hero-sub { margin-top: 22px; font-size: 1.06rem; color: rgba(255, 255, 255, .82); max-width: 560px; }
.hero-actions { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn-line { color: #fff; border-color: rgba(255, 255, 255, .42); }
.hero-actions .btn-line:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }
.hero-facts { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 40px; }
.hero-fact b { display: block; font-size: 1.5rem; font-weight: 600; }
.hero-fact span { font-size: .84rem; color: rgba(255, 255, 255, .68); }

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section-alt { background: var(--bg-alt); }
.section-tight { padding: 64px 0; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brand);
}
.lead { margin-top: 18px; font-size: 1.02rem; color: var(--ink-2); }

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* 聯繫我們頁：表單欄較寬、資訊欄較窄（用 class 而非行內樣式，才能在手機版覆蓋） */
.contact-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-alt); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 24px 24px 26px; }
.card-title { font-size: 1.12rem; }
.card-text { margin-top: 10px; font-size: .92rem; color: var(--ink-2); }
.card-meta { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .86rem; color: var(--ink-3); }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: .74rem; letter-spacing: .06em;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tags .tag { background: var(--bg-alt); color: var(--ink-2); }

.price { font-size: 1rem; font-weight: 600; color: var(--ink); }
/* 「起」放在金額後面：NT$35,000 起 */
.price small { font-weight: 400; font-size: .78rem; color: var(--ink-3); margin-left: 3px; }

/* ---------- Feature list ---------- */
.feature { padding: 30px 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.feature-no {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: .82rem; font-weight: 600;
}
.feature h3 { margin-bottom: 8px; }
.feature p { font-size: .92rem; color: var(--ink-2); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 30px 22px 6px; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step-no { font-size: .76rem; letter-spacing: .18em; color: var(--brand); }
.step h3 { margin: 14px 0 8px; font-size: 1rem; }
.step p { font-size: .88rem; color: var(--ink-2); }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.split-media { border-radius: var(--radius); overflow: hidden; }
.split-media img { width: 100%; }
.check-list { margin: 26px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 26px; margin-bottom: 12px; font-size: .95rem; color: var(--ink-2); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--brand);
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--deep); color: #fff; padding: 74px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .72); margin-top: 12px; }
.cta-band .btn-primary { background: var(--brand); }
.cta-band .btn-line { color: #fff; border-color: rgba(255, 255, 255, .4); }
.cta-band .btn-line:hover { border-color: #fff; }

/* ---------- Page hero ---------- */
.page-hero { padding: 76px 0 60px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.page-hero .eyebrow { margin-bottom: 12px; }
.page-hero p { margin-top: 16px; max-width: 620px; color: var(--ink-2); }
.crumb { font-size: .82rem; color: var(--ink-3); margin-bottom: 16px; }
.crumb a:hover { color: var(--brand); }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.tab {
  padding: 9px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: .9rem; font-family: inherit; cursor: pointer;
  transition: all .18s var(--ease);
}
.tab:hover { border-color: var(--line-strong); color: var(--ink); }
.tab.is-active { background: var(--deep); border-color: var(--deep); color: #fff; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .86rem; color: var(--ink-2); }
.field .req { color: var(--brand); }
.input.is-bad, .textarea.is-bad {
  border-color: #b3341f;
  box-shadow: 0 0 0 3px rgba(179, 52, 31, .16);
}
.input, .select, .textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
  font-size: .95rem; font-family: inherit;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 74, 55, .16);
}
.textarea { min-height: 116px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-note { font-size: .82rem; color: var(--ink-3); }

/* ---------- 預約表單：附件上傳 ---------- */
.field-hint { font-size: .8rem; color: var(--ink-3); line-height: 1.6; margin: 0; }
.att-input { padding: 10px 12px; font-size: .84rem; background: #fff; cursor: pointer; }
.att-list { display: grid; gap: 8px; }
.att-head { font-size: .8rem; color: var(--ink-3); }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.att-item {
  position: relative; display: flex; gap: 10px; align-items: center;
  padding: 8px 8px 8px 8px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg-alt);
}
.att-thumb {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 8px; overflow: hidden;
  background: #fff; display: flex; align-items: center; justify-content: center;
}
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-ext { font-size: .66rem; font-weight: 700; color: var(--brand-dark); letter-spacing: .04em; }
.att-meta { min-width: 0; flex: 1 1 auto; }
.att-name {
  font-size: .8rem; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-size { font-size: .74rem; color: var(--ink-3); }
.att-del {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink-3);
  font-size: .8rem; line-height: 1; cursor: pointer;
}
.att-del:hover { border-color: #b3341f; color: #b3341f; }

/* 服務範圍與收費說明：單獨成塊，避免被忽略 */
.section-note {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 30px; padding: 18px 22px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-alt); font-size: .9rem; color: var(--ink-2);
}
.section-note .ico {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; margin-top: 1px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: .78rem; font-weight: 700;
}
.section-note b { color: var(--brand-dark); font-weight: 600; }
.section-note p + p { margin-top: 8px; }
.code-row { display: flex; gap: 10px; }
.code-row .input { flex: 1; }

/* ---------- Panels ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-head h3 { font-size: 1.05rem; }
.panel-head .hint { font-size: .82rem; color: var(--ink-3); }

/* ---------- Lists ---------- */
.list-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row strong { font-weight: 600; font-size: .95rem; }
.list-row .sub { font-size: .82rem; color: var(--ink-3); }
.empty { padding: 34px 0; text-align: center; color: var(--ink-3); font-size: .92rem; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 6px;
  font-size: .74rem; background: var(--bg-alt); color: var(--ink-2);
}
.badge-new { background: #eef6f1; color: var(--ok); }
.badge-done { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; }
.auth-tabs { display: flex; padding: 4px; background: var(--bg-alt); border-radius: 999px; margin-bottom: 26px; }
.auth-tabs button {
  flex: 1; padding: 9px 8px; border: 0; background: transparent;
  border-radius: 999px; font-size: .9rem; font-family: inherit; color: var(--ink-2); cursor: pointer;
  transition: all .18s var(--ease);
}
.auth-tabs button.is-active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.alert {
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 18px;
}
.alert-error { background: #fdf3f3; color: var(--danger); border: 1px solid #f0d9d9; }
.alert-ok { background: #f1f8f4; color: var(--ok); border: 1px solid #d5e9de; }
.alert-info { background: var(--bg-alt); color: var(--ink-2); border: 1px solid var(--line); }

/* ---------- Member ---------- */
.member-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 34px; align-items: start; }
.member-aside { position: sticky; top: 96px; }
/* 側欄就地改名：客戶要求「名稱要在這裡直接改」，不要逼他進「帳號設定」 */
.m-id-row { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; }
.m-id-row strong { min-width: 0; word-break: break-all; line-height: 1.4; }
.m-id-edit {
  flex: none; margin-top: 1px; width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-3);
  font-size: .82rem; line-height: 1; cursor: pointer; transition: all .18s var(--ease);
}
.m-id-edit:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.m-nick-edit { margin-top: 10px; display: grid; gap: 8px; }
.m-nick-edit .input { width: 100%; }
.m-nick-actions { display: flex; gap: 8px; }
.m-nick-actions .btn { flex: 1; }
#memberEmail { margin-top: 4px; word-break: break-all; line-height: 1.4; }

/* ---------- 我的選配清單（panel-picks） ---------- */
.mp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.mp-sum {
  display: grid; gap: 6px; background: var(--brand-soft); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 14px;
}
.mp-sum b { color: var(--brand-dark, #22382a); font-size: 1.02rem; }
.mp-sum .mp-warn { font-size: .8rem; color: var(--warn, #b4541f); }
.mp-sum .mp-tip { font-size: .76rem; color: var(--ink-3); line-height: 1.5; }
.mp-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 8px; background: #fff;
}
.mp-item .mp-main { flex: 1 1 220px; min-width: 0; }
.mp-item .mp-main strong { display: block; line-height: 1.45; word-break: break-word; }
.mp-item .mp-main .sub { margin-top: 4px; font-size: .78rem; color: var(--ink-3); line-height: 1.5; }
.mp-item .mp-price { flex: none; font-weight: 700; color: var(--brand-dark, #22382a); }
.mp-item .mp-price .mp-none { font-weight: 400; color: var(--ink-3); font-size: .86rem; }
.mp-item .btn { flex: none; }

@media (max-width: 640px) {
  .mp-item { align-items: flex-start; }
  .mp-item .mp-price { flex: 1 0 auto; }
}
.member-nav { display: grid; gap: 4px; margin-top: 14px; }
.member-nav button, .member-nav a {
  text-align: left; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 0; background: transparent; color: var(--ink-2);
  font-family: inherit; font-size: .92rem; cursor: pointer;
  transition: all .18s var(--ease);
}
.member-nav button:hover, .member-nav a:hover { background: var(--bg-alt); color: var(--ink); }
.member-nav button.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
/* 產品選配目錄：帶去 catalog.html 的連結，用底色標示成「可外連」 */
.member-nav a.is-link { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.member-nav a.is-link:hover { background: var(--brand); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.stat b { display: block; font-size: 1.6rem; font-weight: 600; }
.stat span { font-size: .82rem; color: var(--ink-3); }

.uploader {
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 26px; text-align: center; background: var(--bg-alt);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.uploader.is-over { border-color: var(--brand); background: var(--brand-soft); }
.uploader p { font-size: .88rem; color: var(--ink-2); }
.uploader .small { color: var(--ink-3); margin-top: 6px; }

.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.thumb { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-alt); }
.thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.thumb-body { padding: 10px 12px 12px; }
.thumb-body .t { font-size: .84rem; }
.thumb-body .s { font-size: .74rem; color: var(--ink-3); }
.thumb-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.thumb-actions .btn { padding: 5px 10px; font-size: .76rem; }
/* 兩段式刪除：武裝後字變長（「再點一次刪除」），卡片窄時讓它獨占一行才讀得清楚 */
.thumb-actions .btn.is-armed { flex: 1 1 100%; white-space: nowrap; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(16, 18, 20, .52);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal-card {
  width: 100%; max-width: 760px; max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  transform: translateY(10px); transition: transform .22s var(--ease);
}
.modal.is-open .modal-card { transform: translateY(0); }
.modal-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-alt); }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 30px 32px 34px; }
.modal-close {
  position: absolute; top: 20px; right: 20px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: var(--ink);
  cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.modal-close:hover { background: #fff; }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 120; display: grid; gap: 10px; justify-items: center;
  pointer-events: none;
}
.toast {
  padding: 12px 20px; border-radius: 999px;
  background: rgba(22, 24, 26, .94); color: #fff;
  font-size: .88rem; box-shadow: var(--shadow);
  animation: toastIn .26s var(--ease);
  max-width: 86vw;
}
.toast-error { background: #8f2f2f; }
.toast-ok { background: #27624a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Skeleton ---------- */
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, #edf1e9 30%, #f7f9f5 50%, #edf1e9 70%);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer { from { background-position: 140% 0; } to { background-position: -40% 0; } }
.sk-card { height: 320px; }
.sk-line { height: 14px; margin-bottom: 10px; border-radius: 7px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 66px 0 30px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-col h4 { font-size: .84rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; font-weight: 600; }
.footer-col a, .footer-col p { display: block; font-size: .9rem; color: var(--ink-2); margin-bottom: 9px; }
/* 段落內的聯絡資訊（電話／LINE 連結）維持行內，避免標籤與內容斷行 */
.footer-col p a, .footer-col p span { display: inline; margin-bottom: 0; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: .82rem; color: var(--ink-3);
}
/* 管理後台入口：刻意做得很低調，滑鼠移過去才變品牌色 */
.footer-bottom a { border-bottom: 1px solid transparent; }
.footer-bottom a:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* ==========================================================================
   品牌手冊內容元件：數據帶、對比、表格、工期時間軸、付款階段、FAQ
   ========================================================================== */

/* ---------- 數據帶 ---------- */
.data-band {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.data-cell { padding: 30px 26px; border-right: 1px solid var(--line); }
.data-cell:last-child { border-right: 0; }
.data-cell b { display: block; font-size: clamp(1.35rem, 2.4vw, 1.8rem); font-weight: 600; letter-spacing: .01em; }
.data-cell span { display: block; margin-top: 8px; font-size: .88rem; color: var(--ink-2); }
.data-cell .sub { margin-top: 4px; font-size: .78rem; color: var(--ink-3); }

/* ---------- 對比式說明（一般做法 vs 有為做法） ---------- */
.cmp {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff;
}
.cmp-col { padding: 28px 26px 30px; }
.cmp-col + .cmp-col { border-left: 1px solid var(--line); }
.cmp-col h4 { font-size: 1rem; }
.cmp-tag {
  display: inline-block; margin-bottom: 14px; padding: 2px 10px; border-radius: 999px;
  font-size: .72rem; letter-spacing: .08em;
}
.cmp-good { background: var(--brand-soft); }
.cmp-good .cmp-tag { background: var(--brand); color: #fff; }
.cmp-good h4 { color: var(--brand-dark); }
.cmp-bad { background: var(--bg-alt); }
.cmp-bad .cmp-tag { background: #dbe2d8; color: var(--ink-2); }
.cmp-bad h4 { color: var(--ink-2); }
.cmp ul { margin: 16px 0 0; padding: 0; list-style: none; }
.cmp li { position: relative; padding-left: 22px; margin-bottom: 10px; font-size: .92rem; color: var(--ink-2); }
.cmp li:last-child { margin-bottom: 0; }
.cmp li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 8px; height: 8px; border-radius: 50%; }
.cmp-good li::before { background: var(--brand); }
.cmp-bad li::before { background: #c9d2c6; }
.cmp li b { color: var(--ink); font-weight: 600; }

/* ---------- 比較表 ---------- */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .9rem; }
.table th, .table td {
  padding: 16px 18px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.table thead th { background: var(--bg-alt); font-size: .84rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.table td { color: var(--ink-2); }
.table .cell-note { display: block; margin-top: 6px; font-size: .8rem; color: var(--ink-3); }

/* ---------- 甲醛等級視覺化 ---------- */
.grade { display: grid; gap: 16px; }
.grade-row { display: grid; grid-template-columns: 104px 1fr; gap: 18px; align-items: center; }
.grade-name { font-size: .92rem; font-weight: 600; }
.grade-name small { display: block; margin-top: 2px; font-size: .76rem; font-weight: 400; color: var(--ink-3); }
.grade-track { height: 36px; border-radius: 8px; background: var(--bg-alt); overflow: hidden; }
.grade-fill {
  height: 100%; border-radius: 8px; display: flex; align-items: center;
  padding-left: 12px; font-size: .8rem; color: #fff; white-space: nowrap;
}
.grade-fill.is-best { background: var(--brand); }
.grade-fill.is-mid { background: #7f9a84; }
.grade-fill.is-base { background: #c9d2c6; color: var(--ink-2); }

/* ---------- 服務流程卡（10 步） ---------- */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.flow-card { padding: 24px 22px 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.flow-no { font-size: .74rem; letter-spacing: .16em; color: var(--brand); }
.flow-card h4 { margin: 12px 0 8px; font-size: .98rem; }
.flow-card p { font-size: .87rem; color: var(--ink-2); }

/* ---------- 工期時間軸 ---------- */
.timeline {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff;
}
.tl-item { padding: 26px 22px 28px; border-right: 1px solid var(--line); }
.tl-item:last-child { border-right: 0; }
.tl-no { font-size: .72rem; letter-spacing: .16em; color: var(--brand); }
.tl-item h4 { margin: 12px 0 6px; font-size: 1rem; }
.tl-days { font-size: .86rem; font-weight: 600; color: var(--brand-dark); }
.tl-item p { margin-top: 10px; font-size: .86rem; color: var(--ink-2); }

/* ---------- 分階段付款 ---------- */
.pay { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.pay-bar { display: flex; height: 52px; }
.pay-bar div { display: grid; place-items: center; font-size: .82rem; color: #fff; }
.pay-bar div:nth-child(1) { flex: 5; background: var(--brand-dark); }
.pay-bar div:nth-child(2) { flex: 4; background: var(--brand); }
.pay-bar div:nth-child(3) { flex: 4; background: #6c8a72; }
.pay-bar div:nth-child(4) { flex: 1; background: #c2d0c1; color: var(--ink); }
.pay-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pay-list > div { padding: 24px 26px 26px; border-top: 1px solid var(--line); }
.pay-list > div:nth-child(odd) { border-right: 1px solid var(--line); }
.pay-list h4 { display: flex; align-items: baseline; gap: 10px; font-size: .98rem; }
.pay-list .pct { color: var(--brand); font-weight: 600; }
.pay-list p { margin-top: 8px; font-size: .88rem; color: var(--ink-2); }

/* ---------- 引述句 ---------- */
.pull-quote {
  margin-top: 34px; padding: 22px 26px;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 1.02rem; font-weight: 500;
}

/* ---------- 合作品牌列 ---------- */
.brand-row { display: flex; flex-wrap: wrap; gap: 12px; }
.brand-chip {
  flex: 1 1 180px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.brand-chip b { display: block; font-size: .92rem; font-weight: 600; }
.brand-chip small { display: block; margin-top: 4px; font-size: .78rem; color: var(--ink-3); line-height: 1.6; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-item { padding: 24px 0; border-bottom: 1px solid var(--line); }
.faq-item h4 { font-size: .98rem; }
.faq-item h4::before {
  content: "Q"; display: inline-grid; place-items: center;
  width: 22px; height: 22px; margin-right: 10px; vertical-align: 2px;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark);
  font-size: .72rem; font-weight: 700;
}
.faq-item p { margin-top: 10px; padding-left: 32px; font-size: .92rem; color: var(--ink-2); }

/* ---------- 展間相簿 ---------- */
.gal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gal-item {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-alt); overflow: hidden; cursor: zoom-in;
  transition: border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.gal-item:hover, .gal-item:focus-visible { border-color: var(--line-strong); box-shadow: var(--shadow); outline: none; }
.gal-item img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  transition: transform .6s var(--ease);
}
.gal-item:hover img { transform: scale(1.045); }
/* 首頁／單頁主視覺：跨 2×2，維持直式比例填滿 */
.gal-item.gal-lead { grid-column: span 2; grid-row: span 2; }
.gal-item.gal-lead img { aspect-ratio: auto; flex: 1 1 auto; min-height: 0; }
.gal-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 14px 12px; color: #fff;
  font-size: .8rem; line-height: 1.5; letter-spacing: .03em;
  background: linear-gradient(to top, rgba(13, 22, 16, .78), rgba(13, 22, 16, 0));
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.gal-item:hover .gal-cap, .gal-item:focus-visible .gal-cap { opacity: 1; transform: none; }
.gal-note { margin-top: 18px; font-size: .84rem; color: var(--ink-3); }
.gal-note a { color: var(--brand-dark); }

/* 觸控裝置沒有 hover，說明文字固定顯示 */
@media (hover: none) {
  .gal-cap, .case-thumb-cap { opacity: 1; transform: none; }
}

/* 燈箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  padding: 5vh 5vw; background: rgba(10, 11, 12, .93);
  opacity: 0; pointer-events: none; transition: opacity .24s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 100%; max-height: 84vh; width: auto; height: auto;
  border-radius: var(--radius-sm); box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}
.lb-btn {
  position: absolute; display: grid; place-items: center;
  width: 46px; height: 46px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .24); border-radius: 50%;
  background: rgba(255, 255, 255, .08); color: #fff;
  font-size: 1.15rem; line-height: 1; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.lb-btn:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .5); }
.lb-close { top: 18px; right: 20px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  color: rgba(255, 255, 255, .68); font-size: .82rem; letter-spacing: .1em;
}
body.lb-lock { overflow: hidden; }

/* ---------- 展間位置與 Google 導航 ---------- */
.loc { display: grid; grid-template-columns: 1.18fr 1fr; gap: 44px; align-items: start; }
.loc-map {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-alt); box-shadow: var(--shadow-sm);
}
.loc-map iframe { display: block; width: 100%; height: 424px; border: 0; }
.loc-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.loc-list li { display: flex; gap: 20px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.loc-key { flex: 0 0 84px; padding-top: 2px; font-size: .78rem; letter-spacing: .1em; color: var(--ink-3); }
.loc-val { font-size: .95rem; color: var(--ink-2); }
.loc-val a { color: var(--brand-dark); border-bottom: 1px solid var(--line-strong); transition: border-color .2s var(--ease); }
.loc-val a:hover { border-bottom-color: var(--brand); }
.loc-actions { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.loc-note { margin-top: 16px; font-size: .82rem; line-height: 1.7; color: var(--ink-3); }
.loc-note b { font-weight: 600; color: var(--ink-2); }

/* ---------- 加入官方 LINE（QR 好友招募卡） ---------- */
/* 版位：預設「QR 在左、文案在右」；空間不足時自動換為上下堆疊並置中。
   首頁（.loc 下方，滿版）與聯繫頁（網格上方，滿版）共用同一個元件。 */
.line-card {
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap;
  padding: 26px 30px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, var(--line-brand-soft) 100%);
}
.line-card-qr {
  flex: none; display: block; width: 214px; padding: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.line-card-qr:hover, .line-card-qr:focus-visible {
  border-color: var(--line-brand); box-shadow: var(--shadow); outline: none;
}
.line-card-qr img { display: block; width: 100%; height: auto; }
.line-card-body { flex: 1 1 320px; min-width: 0; }
.line-card-kicker {
  display: block; font-size: .72rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--line-brand-dark);
}
.line-card-title { margin: 9px 0 0; font-size: 1.42rem; letter-spacing: .02em; }
.line-card-id {
  margin: 6px 0 0; font-size: 1.06rem; font-weight: 700;
  letter-spacing: .04em; color: var(--ink);
}
.line-card-text { margin: 14px 0 0; font-size: .92rem; line-height: 1.75; color: var(--ink-2); }
.line-card-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.line-card-hint { margin: 12px 0 0; font-size: .8rem; line-height: 1.6; color: var(--ink-3); }
/* LINE 的識別綠只用在這個按鈕上 —— 它是全站唯一的綠色元素，辨識度最高 */
.btn-line-brand { background: var(--line-brand); border-color: var(--line-brand); color: #fff; }
.btn-line-brand:hover { background: var(--line-brand-dark); border-color: var(--line-brand-dark); color: #fff; }

/* ---------- 頁尾：官方 LINE QR（8 個頁面共用） ---------- */
.footer-line {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line);
}
.footer-line .footer-line-qr {
  flex: none; display: block; width: 126px; padding: 7px; margin-bottom: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .24s var(--ease);
}
.footer-line .footer-line-qr:hover,
.footer-line .footer-line-qr:focus-visible { border-color: var(--line-brand); outline: none; }
.footer-line-qr img { display: block; width: 100%; height: auto; }
.footer-line .footer-line-cap {
  display: block; margin: 0; font-size: .78rem; line-height: 1.6; color: var(--ink-3);
}
/* 登入頁是精簡頁尾（沒有四欄），QR 改置中、不加分隔線 */
.footer-line--solo {
  justify-content: center; text-align: center;
  margin-top: 0; padding-top: 0; padding-bottom: 26px; border-top: 0;
}

/* ---------- 完工案例 ---------- */
/* 首頁精選：固定比例格線，只用橫式照片所以不會被裁掉內容 */
.case-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.case-thumb {
  position: relative; display: block; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-alt);
  transition: border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.case-thumb:hover, .case-thumb:focus-visible { border-color: var(--line-strong); box-shadow: var(--shadow); outline: none; }
/* height:auto 不可省：img 帶了 width/height 屬性時，aspect-ratio 會被屬性的高度值蓋掉 */
.case-thumb img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--ease); }
.case-thumb:hover img { transform: scale(1.045); }
/* 地區角標：常駐顯示（不用 hover），客戶一眼看得出是哪裡的案場 */
.case-loc {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 4px 11px; border-radius: 999px;
  background: rgba(13, 22, 16, .74); color: #fff;
  font-size: .74rem; letter-spacing: .04em; line-height: 1.5;
  pointer-events: none;
}
.case-thumb-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 14px 12px; color: #fff; font-size: .8rem; line-height: 1.5; letter-spacing: .03em;
  background: linear-gradient(to top, rgba(13, 22, 16, .78), rgba(13, 22, 16, 0));
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.case-thumb:hover .case-thumb-cap, .case-thumb:focus-visible .case-thumb-cap { opacity: 1; transform: none; }

/* 案例頁：瀑布流排版，橫式與直式照片都完整呈現、不裁切 */
.case-grid { columns: 3; column-gap: 14px; }
.case-item { break-inside: avoid; margin: 0 0 20px; }
.case-link {
  display: block; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-alt);
  transition: border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.case-link:hover, .case-link:focus-visible { border-color: var(--line-strong); box-shadow: var(--shadow); outline: none; }
/* height:auto 是必要的：img 標籤帶了 width/height 屬性（避免載入時跳版），
   若不覆寫，瀏覽器會沿用屬性的高度值 → 照片被縱向拉伸 */
.case-link img { width: 100%; height: auto; transition: transform .6s var(--ease); }
.case-link:hover img { transform: scale(1.035); }
.case-cap { margin-top: 10px; font-size: .84rem; line-height: 1.6; color: var(--ink-3); letter-spacing: .02em; }

/* 案場分組：每個案場一個小標題 + 自己的瀑布流（客戶依建案分類） */
.case-group + .case-group { margin-top: 54px; }
.case-proj {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 20px; padding-bottom: 12px;
  font-size: 1.06rem; font-weight: 600; letter-spacing: .04em; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.case-proj::before {
  content: ""; flex: none; width: 4px; height: 15px; border-radius: 2px; background: var(--brand);
}
.case-proj-n { font-size: .76rem; font-weight: 400; letter-spacing: .08em; color: var(--ink-3); }
.case-grid--two { columns: 2; }

/* ---------- 分頁籤（案例依地區分組） ---------- */
.case-tabs {
  display: flex; flex-wrap: wrap;
  margin: 0 0 30px;
  border-bottom: 1px solid var(--line);
}
.case-tab {
  appearance: none; -webkit-appearance: none;
  background: none; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; padding: 12px 2px;
  font: inherit; font-size: .98rem; letter-spacing: .02em;
  color: var(--ink-3); cursor: pointer;
  transition: color .22s var(--ease), border-color .22s var(--ease);
}
.case-tab + .case-tab { margin-left: 30px; }
.case-tab:hover { color: var(--ink); }
.case-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
.case-tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); }
.case-tab-n {
  display: inline-block; min-width: 20px; margin-left: 7px; padding: 1px 7px;
  font-size: .72rem; letter-spacing: 0; line-height: 1.5; text-align: center;
  color: var(--ink-3); background: var(--bg-alt);
  border: 1px solid var(--line); border-radius: 999px;
  vertical-align: 1px;
}
.case-tab.active .case-tab-n {
  color: var(--brand-dark); background: var(--brand-soft); border-color: var(--brand-soft);
}
.case-region-note {
  margin: 0 0 24px; padding: 14px 18px;
  font-size: .88rem; line-height: 1.7; color: var(--ink-2);
  background: var(--bg-alt); border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .header-inner { gap: 16px; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; font-size: .89rem; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-cell:nth-child(2n) { border-right: 0; }
  .data-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-item:nth-child(2n) { border-right: 0; }
  .tl-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { border-bottom: 1px solid var(--line); }
  .step:nth-child(2n) { border-right: 0; }
  .split { grid-template-columns: 1fr; gap: 38px; }
  .loc { grid-template-columns: 1fr; gap: 30px; }
  .loc-map iframe { height: 360px; }
  .case-grid { columns: 2; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 一定要用 minmax(0, 1fr)：手機版 .member-nav 是橫向排列（max-content），
     若寫成 1fr，欄位最小尺寸會被「內容寬度」撐開 → 整頁橫向溢出、側欄變 858px 寬。 */
  .member-layout { grid-template-columns: minmax(0, 1fr); }
  .member-aside { position: static; min-width: 0; }
  .member-main { min-width: 0; }
  .member-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .member-aside .panel { min-width: 0; }
  .member-aside strong, .member-aside .mono { display: block; overflow-wrap: anywhere; }
  .gal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* 導覽有 9 個項目（2026-10-03 加了「家居商城」）。
   這裡只給一個「合理起點」：1300px 以下先收進漢堡。
   真正的判斷在 assets/js/app.js（量實際寬度），排不下就加 .nav-fit，
   排得下就拿掉 —— 所以中段某些寬度還是看得到完整選單，不會白白浪費空間。
   只處理頁首導覽，不動這個區間的其他版面規則。 */
@media (max-width: 1300px) and (min-width: 901px) {
  .nav { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .site-header.is-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; left: 0; right: 0; top: 72px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 24px 18px;
  }
  .nav a { padding: 12px 8px; white-space: normal; }
  .nav a.is-active { background: var(--bg-alt); }
  .nav a.is-active::after { display: none; }
}
/* JS 量測結果：空間不夠就收漢堡（同一組展開樣式，避免兩種狀態長得不一樣） */
.site-header.nav-fit .nav { display: none; }
.site-header.nav-fit .nav-toggle { display: grid; place-items: center; }
.site-header.nav-fit.is-open .nav {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  position: absolute; left: 0; right: 0; top: 72px;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 12px 24px 18px;
}
.site-header.nav-fit .nav a { padding: 12px 8px; white-space: normal; }
.site-header.nav-fit .nav a.is-active { background: var(--bg-alt); }
.site-header.nav-fit .nav a.is-active::after { display: none; }

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .site-header.is-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; left: 0; right: 0; top: 72px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 24px 18px;
  }
  .nav a { padding: 12px 8px; white-space: normal; }
  .nav a.is-active { background: var(--bg-alt); }
  .nav a.is-active::after { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* 手機與平板：取消主視覺跨格，維持統一 3:4 節奏 */
  .gal-item.gal-lead { grid-column: auto; grid-row: auto; }
  .gal-item.gal-lead img { aspect-ratio: 3 / 4; flex: 0 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .cmp { grid-template-columns: 1fr; }
  .cmp-col + .cmp-col { border-left: 0; border-top: 1px solid var(--line); }
  .pay-list { grid-template-columns: 1fr; }
  .pay-list > div:nth-child(odd) { border-right: 0; }
  .grade-row { grid-template-columns: 84px 1fr; gap: 12px; }
  .hero-inner { padding: 88px 0 72px; }
  .section { padding: 66px 0; }
  .field-row { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  /* LINE 卡：平板起改為上下堆疊並置中 */
  .line-card { flex-direction: column; align-items: center; gap: 22px; padding: 24px 22px; }
  .line-card-body { flex: 1 1 auto; text-align: center; }
  .line-card-actions { justify-content: center; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .data-band { grid-template-columns: 1fr; }
  .data-cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .data-cell:last-child { border-bottom: 0; }
  .flow { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .tl-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .tl-item:last-child { border-bottom: 0; }
  .pay-bar { height: 44px; }
  .pay-bar div { font-size: .72rem; }
  .brand-chip { flex: 1 1 100%; }
  /* 手機版：收緊頁首，避免品牌名斷行 */
  .header-inner { gap: 10px; }
  .brand { gap: 9px; }
  .brand-name { font-size: .92rem; }
  .header-actions { gap: 6px; }
  .header-actions .btn { padding: 8px 12px; font-size: .84rem; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
  /* 相簿：手機縮小間距與燈箱按鈕 */
  .gal { gap: 8px; }
  .gal-cap { display: none; }
  .lightbox { padding: 12px; }
  .lb-btn { width: 40px; height: 40px; font-size: 1rem; }
  .lb-close { top: 10px; right: 10px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-count { bottom: 10px; }
  /* 展間位置：地圖降高，資訊列改上下排列 */
  .loc-map iframe { height: 280px; }
  .loc-list li { flex-direction: column; gap: 3px; }
  .loc-key { flex: none; padding-top: 0; }
  /* 案例：手機改單欄，照片看得清楚 */
  .case-grid { columns: 1; }
  .case-strip { grid-template-columns: 1fr; }
  /* 分頁籤：手機收緊間距 */
  .case-tabs { margin-bottom: 22px; }
  .case-tab { padding: 10px 2px; font-size: .92rem; }
  .case-tab + .case-tab { margin-left: 20px; }
  .case-region-note { padding: 12px 14px; font-size: .84rem; }
  /* 案場分組：手機收緊標題間距 */
  .case-group + .case-group { margin-top: 40px; }
  .case-proj { font-size: .98rem; margin-bottom: 16px; padding-bottom: 10px; }
  /* LINE 卡：手機縮小 QR，按鈕改全寬（好按） */
  .line-card { padding: 22px 18px; }
  .line-card-qr { width: 158px; padding: 10px; }
  .line-card-title { font-size: 1.24rem; }
  .line-card-actions .btn { width: 100%; }
}

/* ===== 工作人員提示：會員中心只放本人資料，客戶資料一律在管理後台 ===== */
.staff-note {
  margin-bottom: 18px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--brand-soft); border: 1px solid var(--line-strong);
  font-size: .85rem; line-height: 1.65; color: var(--ink-2);
}
.staff-note b { color: var(--brand-dark); }
.staff-entry { margin-top: 14px; background: var(--bg-alt); }

/* ===== 報價免責提醒（產品目錄／線上估價共用）=====
   客戶要求：頁面只要有出現數字，就要提醒「僅供參考、可能會浮動」。
   做成統一的 .quote-disc（左側品牌色短豎線＋圓形 ! 圖示），不要只寫一行灰字。 */
.quote-disc {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 12px 0 0; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--bg-warm); color: var(--ink-2);
  font-size: .86rem; line-height: 1.65;
}
.quote-disc b { color: var(--ink); }
.quote-disc::before {
  content: "!";
  flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px;
  border-radius: 50%; background: var(--brand); color: #fff;
  font-size: .72rem; font-weight: 700; line-height: 17px; text-align: center;
}
.est-total .quote-disc { margin-top: 14px; }
@media (max-width: 640px) {
  .quote-disc { font-size: .82rem; padding: 9px 12px; gap: 8px; }
}

/* ==========================================================================
   獲客轉化元件（2026-10 第一波）
   ========================================================================== */

/* 第一屏：較弱的第三入口，用文字連結而不是按鈕，避免跟主 CTA 抢注意力 */
.hero-alt { margin: 18px 0 0; font-size: .92rem; }
.hero-alt a {
  color: rgba(255, 255, 255, .82);
  border-bottom: 1px solid rgba(255, 255, 255, .34);
}
.hero-alt a:hover { color: #fff; border-bottom-color: #fff; }

/* 預算速查：表格下方的按鈕列 */
.budget-actions {
  margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}

/* 手機／平板底部固定行動列。桌面版不顯示，免得擋住頁尾內容 */
.mcta { display: none; }
@media (max-width: 860px) {
  .mcta {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px -12px rgba(22, 24, 26, .3);
  }
  .mcta a {
    flex: 1 1 0; min-width: 0;
    display: flex; align-items: center; justify-content: center;
    height: 46px; padding: 0 6px; border-radius: var(--radius-sm);
    font-size: .88rem; font-weight: 600; line-height: 1.2;
    text-decoration: none; text-align: center; white-space: nowrap;
  }
  .mcta .mcta-plan { background: var(--brand); color: #fff; }
  .mcta .mcta-line { background: var(--line-brand); color: #fff; }
  .mcta .mcta-est {
    background: #fff; color: var(--brand-dark);
    border: 1px solid var(--line-strong);
  }
  /* 固定列會蓋住頁尾最後幾行，補回等高留白 */
  body { padding-bottom: 72px; }
}

/* 想做哪些空間：勾選格（比下拉選單好點，手機上一目了然） */
.chk-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 10px; margin-top: 10px;
}
.chk {
  display: flex; align-items: center; gap: 8px; margin: 0;
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; font-size: .92rem; cursor: pointer; user-select: none;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.chk:hover { border-color: var(--brand); }
.chk input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: var(--brand); }
.chk:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
@media (max-width: 560px) {
  .chk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 表單送出後的「下一步建議」：不要只丟一句「提交成功」就結束 */
.next-steps {
  margin-top: 22px; padding: 18px 20px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg-warm);
}
.next-title { margin: 0 0 10px; font-weight: 600; color: var(--ink); }
.next-list { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: .92rem; line-height: 1.85; }
.next-list a { color: var(--brand-dark); font-weight: 600; }

/* 會員中心的「聯絡資料補填提示」：
   刻意做成提醒條而不是彈窗，避免舊會員一登入就被蓋住整個畫面。 */
.nudge-panel {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 24px; padding: 20px 22px;
  background: var(--brand-soft);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--brand);
}
.nudge-title { display: block; font-size: 1rem; color: var(--brand-dark); }
.nudge-text { margin: 6px 0 0; font-size: .9rem; line-height: 1.7; color: var(--ink-2); }
.nudge-actions { flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .nudge-panel { flex-direction: column; }
  .nudge-actions .btn { flex: 1 1 auto; }
}
