/* ==========================================================================
   森寶木箱｜正式站樣式（CIS 版）
   所有視覺元素都從 LOGO 延伸，規範見 02_brand/森寶木箱_CIS規範.md
   - 色彩：LOGO 原檔 CMYK → sRGB（森林綠、五階木色）；紙白為網頁底色
   - 字體：中文一律「SB Sans」（思源黑體，內文 400／標題 700／品牌標語 900）；
           英文與數字「SB Mark」（Montserrat，對應 LOGO 的 SEN BAO WOODEN CRATE）
   - 圖形：三片木板（.plank）取自木箱的橫向木板；直角、細線、實拍照片，不加裝飾性特效
   - 動效：只用 transform／opacity；prefers-reduced-motion 全面關閉
   ========================================================================== */

:root {
  /* 色彩（LOGO） */
  --forest: #2B3628;
  --forest-deep: #1F271D;
  --forest-ink: #20261E;
  --leaf: #536440;
  --walnut: #6B4627;
  --grain: #98663D;
  --wood: #AA784A;
  --oak: #BD8D59;
  --oak-light: #CEA572;
  /* 延伸色（網頁） */
  --paper: #F6F3EC;
  --paper-2: #EFEADF;
  --paper-3: #E3DBCB;
  --white: #FFFFFF;
  --muted: #595F51;
  --muted-light: #B8BCAC;
  --error: #A3322A;
  --success: #3D6B3A;

  /* 字體 */
  --font-sans: "SB Sans", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  --font-mark: "SB Mark", "SB Sans", "Helvetica Neue", Arial, sans-serif;
  --fs-display: clamp(2.5rem, 4.6vw + 1.2rem, 5.5rem);
  --fs-h1: clamp(2rem, 1.9vw + 1.35rem, 3.25rem);
  --fs-h2: clamp(1.625rem, 1.15vw + 1.2rem, 2.5rem);
  --fs-h3: clamp(1.1875rem, 0.35vw + 1.05rem, 1.375rem);
  --fs-lead: clamp(1.0625rem, 0.25vw + 1rem, 1.1875rem);
  --fs-body: clamp(1rem, 0.1vw + 0.97rem, 1.0625rem);
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-label: 0.75rem;
  --lh-body: 1.9;
  --ls-body: 0.03em;
  --ls-head: 0.04em;

  /* 間距與版面 */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --gutter: clamp(20px, 2.4vw + 8px, 40px);
  --maxw: 1200px;
  --section-y: clamp(72px, 6vw + 32px, 128px);
  --header-h: 64px;
  --admin-bar: 0px;

  /* 動效 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-lid: cubic-bezier(0.76, 0, 0.24, 1);
  --dur: 240ms;

  /* 語意色（淺色段落） */
  --bg: var(--paper);
  --surface: var(--white);
  --text: var(--forest-ink);
  --text-muted: var(--muted);
  --heading: var(--forest);
  --label: var(--walnut);
  --plank: var(--wood);
  --line: rgba(43, 54, 40, 0.14);
  --line-strong: rgba(43, 54, 40, 0.34);
  --focus: var(--wood);
}
@media (min-width: 1600px) {
  :root { --maxw: 1360px; --fs-display: 6.25rem; --fs-h1: 3.5rem; --fs-h2: 2.75rem; --fs-lead: 1.25rem; --fs-body: 1.0625rem; }
  .nav a { font-size: 1rem; }
}
.admin-bar { --admin-bar: 32px; }
@media (max-width: 782px) { .admin-bar { --admin-bar: 46px; } }

/* 深色段落：同一套元件，換一組語意色 */
.section--dark, .hero, .site-footer, .call-card, .cta-band {
  --bg: var(--forest-deep); --surface: #263024; --text: #E4E2D9; --text-muted: var(--muted-light);
  --heading: var(--paper); --label: var(--oak-light); --plank: var(--oak-light);
  --line: rgba(246, 243, 236, 0.16); --line-strong: rgba(246, 243, 236, 0.4); --focus: var(--oak-light);
}

/* ---------- 基礎 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--admin-bar) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: var(--fs-body); font-weight: 400; line-height: var(--lh-body); letter-spacing: var(--ls-body); font-kerning: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img, video, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; text-underline-offset: 0.24em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
input, select, textarea { font: inherit; font-size: max(16px, 1rem); color: inherit; letter-spacing: 0.02em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--oak-light); color: var(--forest); }
.visually-hidden, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 20px; height: 20px; flex: none; }
.num { font-family: var(--font-mark); font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: lining-nums tabular-nums; }
h1, h2, h3, h4 { font-weight: 700; color: var(--heading); letter-spacing: var(--ls-head); }
/* 中文標題只在標點或空白處換行（避免「運送方／式」這種斷法）；真的放不下才強制折行 */
h1, h2, h3, .hero__headline, .lead-case__caption h3 { word-break: keep-all; overflow-wrap: anywhere; }
h2, .h2 { font-size: var(--fs-h2); line-height: 1.4; text-wrap: balance; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.5; }
.lead { font-size: var(--fs-lead); line-height: 1.9; color: var(--text-muted); }

.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 1100; padding: var(--s-3) var(--s-4); background: var(--forest); color: var(--paper); text-decoration: none; }
.skip-link:focus { top: calc(var(--admin-bar) + var(--s-4)); }

.container { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); background: var(--bg); color: var(--text); }
.section--tight { padding-block: clamp(40px, 3vw + 24px, 72px); }
.section--alt { --bg: var(--paper-2); }
.section-more { margin-top: var(--s-7); }
.empty { padding: var(--s-7) 0; color: var(--text-muted); font-size: var(--fs-lead); }

/* ---------- 品牌標記：三片木板（取自 LOGO 木箱的橫向木板） ---------- */
.plank { display: inline-block; flex: none; width: 18px; height: 11px; background: linear-gradient(var(--plank) 0 3px, transparent 3px 4px, var(--plank) 4px 7px, transparent 7px 8px, var(--plank) 8px 11px); }

/* ---------- 區塊標題：木板標記＋中文名＋英文名（雙語，同 LOGO 的「森寶木箱／SEN BAO WOODEN CRATE」） ---------- */
.label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; line-height: 1.4; }
.label__zh { font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.16em; color: var(--label); }
.label__en { font-family: var(--font-mark); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-muted); }
.sec-head { display: grid; gap: var(--s-4); max-width: 44rem; margin-bottom: clamp(40px, 3vw + 24px, 72px); }
.sec-head h2 { margin-top: 2px; }
.sec-head .lead { max-width: 38em; }
.sec-head--row { max-width: none; }
@media (min-width: 1024px) {
  .sec-head--row { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s-8); align-items: end; }
  .sec-head--row .label, .sec-head--row h2 { grid-column: 1; }
  .sec-head--row .lead { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
}

/* ---------- 按鈕：直角，像木板一樣俐落 ---------- */
.btn {
  --btn-bg: var(--forest); --btn-fg: var(--paper); --btn-bd: var(--btn-bg);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border: 1.5px solid var(--btn-bd); border-radius: 0;
  background: var(--btn-bg); color: var(--btn-fg); font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.1em; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn .icon { width: 18px; height: 18px; }
.btn .num { font-size: 1.0625em; letter-spacing: 0.06em; }
.btn:hover { --btn-bg: #3A4735; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn--wood { --btn-bg: var(--oak-light); --btn-fg: var(--forest); }
.btn--wood:hover { --btn-bg: #DABB8D; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--heading); --btn-bd: var(--line-strong); }
.btn--ghost:hover { --btn-bg: rgba(43, 54, 40, 0.06); --btn-bd: var(--heading); }
.section--dark .btn--ghost:hover, .hero .btn--ghost:hover, .call-card .btn--ghost:hover, .cta-band .btn--ghost:hover { --btn-bg: rgba(246, 243, 236, 0.08); }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 1rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.1em; color: var(--heading); text-decoration: none; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover .icon, .link-arrow:focus-visible .icon { transform: translateX(4px); }

/* ---------- 頁首 ---------- */
.site-header { position: sticky; top: var(--admin-bar); z-index: 50; background: var(--paper); border-bottom: 1px solid rgba(43, 54, 40, 0.12); transition: box-shadow var(--dur) var(--ease); }
.site-header.is-stuck { box-shadow: 0 6px 24px -18px rgba(31, 39, 29, 0.55); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; flex: none; }
.brand img { height: 40px; width: auto; }
.nav { display: none; }
.nav ul { display: flex; align-items: center; gap: clamp(18px, 1.9vw, 36px); list-style: none; margin: 0; padding: 0; }
.nav a { position: relative; display: inline-flex; align-items: center; height: var(--header-h); font-size: var(--fs-sm); font-weight: 400; letter-spacing: 0.12em; color: var(--forest-ink); text-decoration: none; transition: color var(--dur) var(--ease); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0.12em; bottom: -1px; height: 3px; background: var(--wood); transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease); }
.nav a:hover { color: var(--walnut); }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"], .nav .current-menu-item > a { color: var(--forest); font-weight: 700; }
.nav a[aria-current="page"]::after, .nav .current-menu-item > a::after { transform: scaleX(1); background: var(--forest); }
.header-actions { display: flex; align-items: center; gap: var(--s-2); }
.header-call { display: none; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--forest); cursor: pointer; text-decoration: none; }
@media (min-width: 1024px) {
  :root { --header-h: 84px; }
  .brand img { height: 48px; }
  .nav { display: block; }
  .header-call { display: inline-flex; min-height: 46px; padding: 0 20px; }
  .menu-toggle, .header-actions .icon-btn--call { display: none; }
}
.mobile-nav { position: fixed; inset: calc(var(--header-h) + var(--admin-bar)) 0 0 0; z-index: 49; background: var(--paper); padding: var(--s-5) var(--gutter) calc(var(--s-8) + env(safe-area-inset-bottom)); overflow-y: auto; }
.mobile-nav[hidden] { display: none; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.mobile-nav li { border-bottom: 1px solid var(--line); }
/* 只套用在選單連結；下方的「來電洽詢」按鈕維持按鈕本身的配色（否則深綠字會蓋在深綠底上） */
.mobile-nav nav a { display: flex; justify-content: space-between; align-items: center; min-height: 60px; font-size: 1.125rem; font-weight: 400; letter-spacing: 0.12em; color: var(--forest); text-decoration: none; }
.mobile-nav nav a[aria-current="page"] { font-weight: 700; }
.mobile-nav nav a .icon { color: var(--wood); }
.mobile-nav__contact { margin-top: var(--s-6); display: grid; gap: var(--s-3); color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------- 首屏：實拍影片＋品牌標語 ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--forest-deep); color: var(--paper); min-height: calc(100svh - var(--header-h) - var(--admin-bar)); display: flex; flex-direction: column; }
.hero__media { position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; top: 36%; }
.hero__poster, .hero__poster img, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.hero__video { opacity: 0; }
.hero__fade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--forest-deep) 0%, rgba(31, 39, 29, 0.55) 20%, rgba(31, 39, 29, 0.08) 46%, rgba(31, 39, 29, 0) 62%, rgba(31, 39, 29, 0.6) 88%, var(--forest-deep) 100%),
              linear-gradient(to right, rgba(31, 39, 29, 0.75) 0%, rgba(31, 39, 29, 0) 60%); }
.hero__content { position: relative; padding-top: clamp(40px, 7vh, 96px); padding-bottom: clamp(220px, 34vh, 360px); }
.hero__label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.hero__label .en { font-family: var(--font-mark); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.28em; color: var(--oak-light); }
.hero__label .zh { font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0.16em; color: var(--muted-light); }
.hero__title { margin-top: clamp(20px, 2.4vw, 32px); font-size: var(--fs-display); font-weight: 900; line-height: 1.2; letter-spacing: 0.06em; color: var(--paper); }
.hero__title .seg, .slogan-band__text .seg { white-space: nowrap; }
.stop { position: relative; display: inline-block; width: 0.62em; color: transparent; }
.stop::after { content: ""; position: absolute; left: 0.2em; bottom: 0.2em; width: 0.17em; height: 0.17em; border-radius: 50%; background: var(--oak-light); }
.hero__headline { margin-top: var(--s-4); font-size: clamp(1.1875rem, 0.9vw + 0.95rem, 1.75rem); font-weight: 400; line-height: 1.6; letter-spacing: 0.08em; color: var(--paper); text-wrap: balance; }
.hero__services { margin-top: var(--s-5); display: flex; flex-wrap: wrap; gap: 6px 0; font-size: var(--fs-sm); font-weight: 400; letter-spacing: 0.2em; color: var(--oak-light); }
.hero__services .grp { white-space: nowrap; }
.hero__services .dot { margin-inline: 0.5em; color: rgba(206, 165, 114, 0.55); }
.hero__desc { margin-top: var(--s-4); max-width: 34rem; color: var(--muted-light); font-size: var(--fs-sm); line-height: 1.95; }
.hero__actions { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero__hours { margin-top: var(--s-3); font-size: var(--fs-xs); letter-spacing: 0.08em; color: var(--muted-light); }
.hero :focus-visible { outline-color: var(--oak-light); }
.hero__facts { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; pointer-events: none; }
.hero__facts .container { display: flex; align-items: flex-end; justify-content: flex-end; gap: var(--s-6); padding-bottom: clamp(12px, 1.6vw, 28px); }
.hero__facts dl { display: none; }
.hero__cluster { display: flex; align-items: center; gap: var(--s-3); pointer-events: auto; }
.hero__caption { display: none; font-size: var(--fs-xs); color: var(--muted-light); letter-spacing: 0.06em; }
.hero__toggle { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 16px 0 12px; border: 1px solid rgba(246, 243, 236, 0.35); border-radius: 0; background: rgba(31, 39, 29, 0.6); color: var(--paper); font-size: var(--fs-xs); letter-spacing: 0.08em; cursor: pointer; }
.hero__toggle .icon { width: 16px; height: 16px; }
.hero__toggle[hidden] { display: none; }
@media (min-width: 1024px) {
  .hero__content { padding-bottom: clamp(260px, 36vh, 380px); }
  .hero__facts .container { justify-content: space-between; }
  .hero__facts dl { display: grid; grid-template-columns: repeat(4, auto); gap: 0; margin: 0; border-top: 1px solid rgba(246, 243, 236, 0.22); pointer-events: auto; }
  .hero__facts dl > div { display: grid; gap: 2px; padding: 16px 40px 0 0; margin-right: 40px; border-right: 1px solid rgba(246, 243, 236, 0.16); }
  .hero__facts dl > div:last-child { border-right: 0; margin-right: 0; }
  .hero__facts dd { order: 1; margin: 0; white-space: nowrap; font-size: 1.1875rem; font-weight: 700; letter-spacing: 0.08em; color: var(--paper); line-height: 1.4; }
  .hero__facts dd.num { font-size: 1.3125rem; font-weight: 600; }
  .hero__facts dt { order: 2; font-size: var(--fs-xs); letter-spacing: 0.12em; color: var(--muted-light); }
  .hero__hours { display: none; }
}
@media (min-width: 1280px) { .hero__caption { display: inline-flex; } }
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .hero__facts dl > div { padding-right: 24px; margin-right: 24px; }
  .hero__facts dd { font-size: 1.0625rem; }
  .hero__facts dd.num { font-size: 1.1875rem; }
}
@media (max-width: 767.98px) {
  .hero__media { top: 60%; }
  .hero__content { padding-bottom: 42vh; }
  .hero__actions { display: grid; grid-template-columns: 1.35fr 1fr; width: 100%; }
  .hero__actions .btn { padding-inline: 12px; }
}
@media (max-width: 374.98px) {
  .hero__actions, .page-hero .hero__actions { grid-template-columns: 1fr; }
}
@media (max-width: 599.98px) {
  .hero__desc { display: none; }
  .hero__title { letter-spacing: 0.04em; }
  .hero__services { font-size: var(--fs-xs); letter-spacing: 0.14em; }
  .label-lg { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.rise { animation: rise 640ms var(--ease) both; }
.rise-1 { animation-delay: 80ms; } .rise-2 { animation-delay: 160ms; } .rise-3 { animation-delay: 240ms; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- 首頁載入動畫「組箱」（每次進入首頁都播放；JavaScript 控制時間，沒有 JavaScript 時 CSS 自動收起） ---------- */
/* 時間軸與 tools/brand/build_brand.py（LOGO 動畫）、inc/assets.php（HOLD 6500ms 後收起）一致；沒有 JavaScript 時 6.7 秒自動收起 */
.sb-intro { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--paper); transition: transform 720ms var(--ease-lid); animation: sb-intro-lid 720ms var(--ease-lid) 3.8s forwards; }
.sb-intro::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--wood); opacity: 0.55; transform: scaleX(0); transform-origin: 0 50%; animation: sbi-progress 3600ms linear forwards; }
.sb-intro--js { animation: none; }
.sb-intro[hidden], .sb-intro-seen .sb-intro { display: none; }
.sb-intro__inner { display: grid; justify-items: center; gap: 14px; transition: opacity 280ms ease, transform 720ms var(--ease-lid); }
.sb-intro__logo { width: min(62vw, 300px, 46vh); height: auto; overflow: visible; }
.sb-intro__en { display: flex; align-items: center; gap: 12px; margin-top: 4px; font-family: var(--font-mark); font-size: clamp(0.75rem, 0.5vw + 0.6rem, 0.875rem); font-weight: 600; letter-spacing: 0.34em; padding-left: 0.34em; white-space: nowrap; color: var(--forest); animation: sbi-text 450ms var(--ease) 2.15s both; }
.sb-intro__en::before, .sb-intro__en::after { content: ""; width: 28px; height: 1px; background: currentColor; transform-origin: 100% 50%; animation: sbi-rule 500ms var(--ease) 2.25s both; }
.sb-intro__en::after { transform-origin: 0 50%; }
.sb-intro__tag { font-size: clamp(0.875rem, 0.45vw + 0.75rem, 1rem); font-weight: 700; letter-spacing: 0.3em; padding-left: 0.3em; color: var(--walnut); }
.sb-intro__tag span { display: inline-block; animation: sbi-text 450ms var(--ease) 2.35s both; }
.sb-intro__tag span:nth-child(2) { animation: sbi-dot 320ms var(--ease) 2.45s both; }
.sb-intro__tag span:nth-child(3) { animation-delay: 2.5s; }
.sb-intro__tag span:nth-child(4) { animation: sbi-dot 320ms var(--ease) 2.6s both; }
.sb-intro__tag span:nth-child(5) { animation-delay: 2.65s; }
@keyframes sbi-text { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sbi-rule { from { transform: scaleX(0); } to { transform: none; } }
@keyframes sbi-dot { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: none; } }
@keyframes sbi-progress { to { transform: none; } }
.sb-intro.is-leaving { transform: translateY(-100%); }
.sb-intro.is-leaving .sb-intro__inner { opacity: 0; transform: translateY(-32px); }
.sb-intro-on body { overflow: hidden; }
.sb-intro-on .rise { animation-play-state: paused; }
@keyframes sb-intro-lid { to { transform: translateY(-100%); visibility: hidden; } }
@media (max-width: 374.98px) {
  .sb-intro__en { gap: 8px; letter-spacing: 0.24em; padding-left: 0.24em; }
  .sb-intro__en::before, .sb-intro__en::after { width: 16px; }
  .sb-intro__tag { letter-spacing: 0.22em; padding-left: 0.22em; }
}

/* ---------- 平滑捲動（Lenis 1.3 必要樣式；不採用會讓地圖 iframe 無法點擊的 iframe 規則） ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
/* 捲動動態（只在 smooth.js 啟用時生效；減少動態時不會加上 has-motion） */
.scroll-progress { position: fixed; z-index: 60; left: 0; right: 0; top: var(--admin-bar); height: 2px; background: var(--wood); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.has-motion .hero__media { will-change: transform; transform-origin: 50% 40%; transform: scale(1.06); }
.has-motion .hero__content { will-change: transform, opacity; }
.is-parallax { overflow: hidden; }
/* 視差：照片在相框內隨捲動移動（--py 由 smooth.js 寫入）；滑鼠移上時放大（--pz 以過場變化，位置則即時跟隨捲動） */
.has-motion .is-parallax img, .has-motion .svc-row:hover .is-parallax img, .has-motion .svc-row:focus-visible .is-parallax img,
.has-motion .work:hover .is-parallax img, .has-motion .work:focus-within .is-parallax img { transform: translate3d(0, var(--py, 0%), 0) scale(var(--pz)); transition: --pz 700ms var(--ease); will-change: transform; }
.has-motion .svc-row:hover .is-parallax img, .has-motion .svc-row:focus-visible .is-parallax img, .has-motion .work:hover .is-parallax img, .has-motion .work:focus-within .is-parallax img { --pz: 1.21; }
@property --pz { syntax: "<number>"; inherits: true; initial-value: 1.16; }

/* ---------- 常見問題：問答直接顯示（不收合），兩欄編號清單 ---------- */
.faq { display: grid; gap: 0; margin: 0; counter-reset: faq; border-top: 1px solid var(--line-strong); }
.faq__item { counter-increment: faq; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: var(--s-3); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.faq__item::before { content: "Q" counter(faq, decimal-leading-zero); grid-row: span 2; padding-top: 5px; font-family: var(--font-mark); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; color: var(--label); }
.faq dt { color: var(--heading); font-size: var(--fs-h3); font-weight: 700; line-height: 1.6; letter-spacing: var(--ls-head); }
.faq dd { margin: var(--s-2) 0 0; max-width: 40em; color: var(--text); line-height: var(--lh-body); }
@media (min-width: 900px) { .faq { grid-template-columns: 1fr 1fr; column-gap: var(--s-8); } .faq__item { padding: var(--s-6) 0; } }

/* ---------- 服務：規格索引 ---------- */
.svc-index { border-top: 1px solid var(--line-strong); }
.svc-row { display: grid; gap: var(--s-5); padding: clamp(28px, 2.6vw, 40px) 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.svc-row__media { overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-3); }
.svc-row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.svc-row__main { display: grid; gap: var(--s-3); align-content: start; }
.svc-row__title { font-size: clamp(1.375rem, 0.8vw + 1.1rem, 1.75rem); font-weight: 700; line-height: 1.4; }
.svc-row__main p { color: var(--text-muted); }
.svc-row__spec { margin: 0; display: grid; gap: 0; align-content: start; font-size: var(--fs-sm); }
.svc-row__spec > div { display: grid; grid-template-columns: 4.5em 1fr; gap: var(--s-3); padding: 10px 0; border-top: 1px solid var(--line); }
.svc-row__spec > div:last-child { border-bottom: 1px solid var(--line); }
.svc-row__spec dt { color: var(--text-muted); font-size: var(--fs-xs); letter-spacing: 0.1em; padding-top: 2px; }
.svc-row__spec dd { font-weight: 400; color: var(--heading); }
.svc-row__go { margin-top: var(--s-2); display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.1em; color: var(--walnut); }
.svc-row__go .icon { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.svc-row:hover .svc-row__media img, .svc-row:focus-visible .svc-row__media img { transform: scale(1.03); }
.svc-row:hover .svc-row__title { text-decoration: underline; text-decoration-color: var(--wood); text-decoration-thickness: 2px; }
.svc-row:hover .svc-row__go .icon, .svc-row:focus-visible .svc-row__go .icon { transform: translateX(4px); }
.svc-row:focus-visible { outline-offset: 6px; }
@media (min-width: 768px) { .svc-row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--s-6); } .svc-row__media { grid-row: 1 / span 2; } }
@media (min-width: 1024px) { .svc-row { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); column-gap: var(--s-7); align-items: start; } .svc-row__media { grid-row: auto; } }

/* ---------- 案例 ---------- */
.lead-case { margin: 0 0 var(--s-8); }
.lead-case__media { aspect-ratio: 4 / 3; overflow: hidden; background: #111; }
.lead-case__media img { width: 100%; height: 100%; object-fit: cover; }
.lead-case__caption { display: grid; gap: var(--s-4); padding-top: var(--s-5); }
.lead-case__caption h3 { font-size: clamp(1.375rem, 0.8vw + 1.1rem, 1.875rem); }
.lead-case__caption a { color: inherit; text-decoration: none; }
.lead-case__caption a:hover { text-decoration: underline; text-decoration-color: var(--oak-light); }
.lead-case__caption dl { margin: 0; display: grid; gap: var(--s-3); font-size: var(--fs-sm); }
.lead-case__caption dl > div { display: grid; gap: 2px; padding-top: var(--s-3); border-top: 1px solid var(--line); }
.lead-case__caption dt { font-size: var(--fs-xs); letter-spacing: 0.12em; color: var(--text-muted); }
.lead-case__caption dd { color: var(--heading); font-weight: 400; }
@media (min-width: 768px) { .lead-case__caption dl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); } }
@media (min-width: 1024px) {
  .lead-case__media { aspect-ratio: 21 / 9; }
  .lead-case__caption { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-7); align-items: start; }
}
.works { display: grid; gap: var(--s-7) var(--s-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
@media (min-width: 1024px) { .works--b { grid-template-columns: repeat(4, minmax(0, 1fr)); } .works--archive { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.work { position: relative; display: grid; gap: var(--s-4); align-content: start; }
.work__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-3); }
.section--dark .work__media { background: #2A3428; }
.work__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.work:hover .work__media img, .work:focus-within .work__media img { transform: scale(1.03); }
.work__body { display: grid; gap: var(--s-2); align-content: start; }
.work__title { font-size: 1.125rem; line-height: 1.5; }
.work__link { color: inherit; text-decoration: none; }
.work__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.work__link:hover { text-decoration: underline; text-decoration-color: var(--wood); }
.work__meta { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s-3); margin: 0; font-size: var(--fs-xs); line-height: 1.7; }
.work__meta dt { color: var(--text-muted); letter-spacing: 0.1em; }
.work__meta dd { color: var(--text); }
.work__excerpt { color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------- 詢價前準備＋來電卡 ---------- */
.prepare { display: grid; gap: var(--s-7); }
.checklist { list-style: none; margin: 0; padding: 0; counter-reset: item; display: grid; }
.checklist li { counter-increment: item; display: grid; grid-template-columns: 36px 1fr; gap: var(--s-3); padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.checklist li::before { content: counter(item, decimal-leading-zero); font-family: var(--font-mark); font-weight: 600; font-size: var(--fs-xs); letter-spacing: 0.08em; color: var(--label); padding-top: 4px; }
.checklist strong { display: block; color: var(--heading); font-weight: 700; }
.checklist span { display: block; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.8; }
@media (min-width: 768px) { .checklist { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); } }
.call-card { display: grid; gap: var(--s-4); align-content: start; padding: clamp(28px, 3vw, 44px); background: var(--forest); color: var(--text); }
.call-card h3 { color: var(--paper); }
.call-card p { color: var(--muted-light); font-size: var(--fs-sm); }
.call-card .phone { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-mark); font-weight: 600; font-size: clamp(1.75rem, 1.1vw + 1.1rem, 2.75rem); letter-spacing: 0.04em; line-height: 1.2; white-space: nowrap; color: var(--paper); text-decoration: none; font-variant-numeric: tabular-nums; }
.call-card .phone:hover { color: var(--oak-light); }
.call-card .actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
@media (min-width: 1024px) { .prepare { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s-8); align-items: start; } .call-card { position: sticky; top: calc(var(--header-h) + var(--admin-bar) + 32px); } }

/* ---------- 製作流程：橫向工序（手機直向） ---------- */
.process { list-style: none; margin: 0; padding: 0; display: grid; position: relative; }
.process::before, .process::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; }
.process::before { background: var(--line-strong); }
.process::after { background: var(--oak-light); transform-origin: top; transform: scaleY(var(--progress, 1)); transition: transform 700ms var(--ease); }
.step { position: relative; display: grid; gap: var(--s-2); align-content: start; padding: 0 0 var(--s-6) var(--s-5); }
.step__num { font-family: var(--font-mark); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.24em; color: var(--label); }
.step h3 { font-size: 1.25rem; }
.step p { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.85; }
.step__media { margin-top: var(--s-3); overflow: hidden; aspect-ratio: 4 / 3; background: #111; }
.step__media img { width: 100%; height: 100%; object-fit: cover; }
/* 流程插畫（沒有照片的步驟）：同 4:3 相框，木色線條逐筆畫出 */
.step__media--art { display: grid; place-items: center; background: #2A3428; border: 1px solid rgba(206, 165, 114, 0.18); }
.process-art { width: 100%; height: 100%; fill: none; stroke: var(--oak-light); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.process-art .accent { stroke: var(--paper); stroke-width: 2; }
.process-art .tape { stroke: var(--oak); stroke-width: 3; }
.process-art .fill { fill: var(--oak-light); stroke: none; }
.process-art { -webkit-user-select: none; user-select: none; }
.process-art text { fill: var(--oak-light); stroke: none; font-family: var(--font-mark); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; }
.js-motion .process-art .d { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 900ms var(--ease) calc(var(--t, 0ms) + 250ms); }
.js-motion .process-art .f { opacity: 0; transition: opacity 500ms var(--ease) calc(var(--t, 0ms) + 250ms); }
.js-motion .step.is-in .process-art .d { stroke-dashoffset: 0; }
.js-motion .step.is-in .process-art .f { opacity: 1; }
.js-motion .step.is-in .process-art .wave { animation: art-wave 1.6s ease-in-out 1.4s infinite; }
.js-motion .step.is-in .process-art .blink { animation: art-blink 1.2s steps(2, jump-none) 2.6s infinite; }
.js-motion .step.is-in .process-art .stamp { transform-box: fill-box; transform-origin: 50% 50%; animation: art-stamp 520ms var(--ease) 1.5s both; }
@keyframes art-wave { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes art-blink { 0% { opacity: 1; } 100% { opacity: 0.2; } }
@keyframes art-stamp { 0% { transform: scale(1.5); opacity: 0; } 60% { transform: scale(0.94); opacity: 1; } 100% { transform: none; opacity: 1; } }
@media (min-width: 1024px) {
  .process { grid-template-columns: repeat(var(--steps, 5), minmax(0, 1fr)); column-gap: var(--s-5); }
  .process::before, .process::after { left: 0; right: 0; bottom: auto; width: auto; height: 1px; }
  .process::after { transform-origin: left; transform: scaleX(var(--progress, 1)); }
  .step { padding: var(--s-5) 0 0; display: flex; flex-direction: column; }
  /* 說明文字行數不同時，圖片仍對齊同一水平線（圖片推到每一欄底部，五格等高） */
  .step__media { margin-top: auto; }
  .step > p { padding-bottom: var(--s-3); }
}
.gallery--process { margin-top: var(--s-8); }

/* ---------- 數據列（工廠、關於、案例重點） ---------- */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 var(--s-7); border-top: 2px solid var(--heading); }
.facts > div { display: grid; gap: var(--s-1); align-content: start; padding: var(--s-5) var(--s-4) var(--s-5) 0; border-bottom: 1px solid var(--line); }
.facts dt { order: 2; font-size: var(--fs-xs); letter-spacing: 0.12em; color: var(--text-muted); }
.facts dd { order: 1; margin: 0; font-size: clamp(1.375rem, 1.1vw + 1rem, 2rem); font-weight: 700; line-height: 1.35; letter-spacing: 0.06em; color: var(--heading); }
.facts dd.num { font-size: clamp(1.625rem, 1.4vw + 1.1rem, 2.5rem); font-weight: 600; letter-spacing: 0.02em; }
@media (min-width: 1024px) { .facts { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); } .facts > div + div { padding-left: var(--s-5); border-left: 1px solid var(--line); } }
.facts--stack { grid-template-columns: 1fr; margin: 0; }
@media (min-width: 1024px) { .facts--stack { grid-template-columns: 1fr; } .facts--stack > div + div { padding-left: 0; border-left: 0; } }
.factory-photo { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-3); }
.factory-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) { .factory-photo { aspect-ratio: 21 / 8; } }

/* ---------- 證明文件（投保證明等） ---------- */
.certs { display: grid; gap: var(--s-5); margin-top: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.factory-photo + .certs { margin-top: var(--s-5); }
.cert { display: grid; grid-template-columns: 1fr; gap: var(--s-5); align-items: start; max-width: 780px; padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); }
.cert__doc { width: min(56%, 220px); }
.cert--wide { grid-template-columns: 1fr; }
/* 文件縮圖：完整顯示（不裁切），點開在本頁放大檢視（viewer.js） */
.cert__doc { position: relative; display: block; aspect-ratio: 1 / 1.414; overflow: hidden; background: var(--white); border: 1px solid var(--line); box-shadow: 0 10px 24px -18px rgba(31, 39, 29, 0.55); transition: transform var(--dur) var(--ease); cursor: zoom-in; }
.cert__doc img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 0%; }
.cert__doc:hover { transform: translateY(-2px); }
.cert__body { display: grid; gap: var(--s-2); align-content: start; }
.cert__kind { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.16em; color: var(--label); }
.cert h3 { font-size: 1.25rem; }
.cert dl { margin: var(--s-2) 0 0; display: grid; font-size: var(--fs-sm); }
.cert dl > div { display: grid; grid-template-columns: 5.5em 1fr; gap: var(--s-3); padding: 6px 0; border-top: 1px solid var(--line); }
.cert dt { color: var(--text-muted); font-size: var(--fs-xs); letter-spacing: 0.1em; padding-top: 2px; }
.cert .link-arrow { margin-top: var(--s-2); color: var(--walnut); }
.cert__note { font-size: var(--fs-xs); color: var(--text-muted); }
@media (min-width: 600px) { .cert { grid-template-columns: 168px 1fr; } .cert__doc { width: auto; } }

/* ---------- 聯絡 ---------- */
.contact { display: grid; gap: var(--s-7); }
@media (min-width: 1024px) { .contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--s-8); } }
.contact__info { display: grid; gap: var(--s-5); align-content: start; }
.contact__phone { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-mark); font-weight: 600; font-size: clamp(2.25rem, 2vw + 1.5rem, 3.25rem); line-height: 1.15; letter-spacing: 0.03em; white-space: nowrap; color: var(--heading); text-decoration: none; font-variant-numeric: tabular-nums; }
.contact__phone:hover { color: var(--walnut); }
.contact__list { display: grid; margin: 0; }
.contact__list > div { display: grid; grid-template-columns: 5.5em 1fr; gap: var(--s-3); padding: 12px 0; border-top: 1px solid var(--line); }
.contact__list > div:last-child { border-bottom: 1px solid var(--line); }
a.email { overflow-wrap: anywhere; word-break: break-all; }
.contact__list dt { color: var(--text-muted); font-size: var(--fs-xs); letter-spacing: 0.12em; padding-top: 3px; }
.map-shell { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-3); display: grid; place-items: center; text-align: center; padding: var(--s-5); }
.map-shell iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-shell__cover { display: grid; justify-items: center; gap: var(--s-2); }
.map-shell__cover > .icon { width: 28px; height: 28px; color: var(--wood); }
.map-shell__cover p { color: var(--text-muted); font-size: var(--fs-xs); max-width: 22rem; }
.map-shell__actions { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); justify-content: center; align-items: center; margin-top: var(--s-3); }

/* 表單 */
.form { display: grid; gap: var(--s-5); padding: clamp(24px, 3vw, 44px); background: var(--white); border: 1px solid var(--line); }
.form h3 { font-size: 1.375rem; }
.form__intro { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--s-2); }
.form__row { display: grid; gap: var(--s-5); }
@media (min-width: 768px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.form__more { display: grid; gap: var(--s-5); margin-top: var(--s-3); }
.field { display: grid; gap: var(--s-2); align-content: start; }
.field label { font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.08em; color: var(--forest); }
.field .req { margin-left: 8px; font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; color: var(--error); }
.field .opt { margin-left: 8px; font-size: var(--fs-label); font-weight: 400; letter-spacing: 0.08em; color: var(--muted); }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid rgba(43, 54, 40, 0.45); border-radius: 0; background: #fff; color: var(--forest-ink); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.field textarea { min-height: 136px; resize: vertical; line-height: 1.8; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--forest); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--wood); outline-offset: 0; border-color: var(--forest); }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: var(--error); box-shadow: inset 3px 0 0 var(--error); }
.field__error { display: none; color: var(--error); font-size: var(--fs-xs); font-weight: 700; }
.field.is-invalid .field__error { display: block; }
.form details { border-top: 1px solid var(--line); padding-top: var(--s-3); }
.form summary { cursor: pointer; font-weight: 700; letter-spacing: 0.06em; color: var(--forest); min-height: 44px; display: flex; align-items: center; }
.form__foot { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; padding-top: var(--s-2); }
.form__foot p { font-size: var(--fs-xs); color: var(--muted); max-width: 28rem; }
.form-status { display: none; padding: var(--s-4); font-size: var(--fs-sm); }
.form-status.is-shown { display: block; }
.form-status--success { background: #EAF2E7; color: var(--success); border-left: 3px solid var(--success); font-weight: 700; }
.form-status--error { background: #FBEDEA; color: var(--error); border-left: 3px solid var(--error); }
.form--fallback p { color: var(--text-muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; user-select: none; }
.hp__label::before { content: "請勿填寫此欄"; }
.form__noscript { margin-top: 6px; color: var(--walnut); }

/* 送出前確認視窗 */
.confirm { width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; background: var(--paper); color: var(--forest-ink); box-shadow: 0 32px 80px -32px rgba(31, 39, 29, 0.6); overflow: auto; }
.confirm[open] { animation: confirm-in 280ms var(--ease) both; }
.confirm::backdrop { background: rgba(31, 39, 29, 0.64); }
.confirm__panel { padding: clamp(24px, 4vw, 40px); }
.confirm__ask, .confirm__done { display: grid; gap: var(--s-4); }
.confirm h3 { font-size: 1.375rem; }
.confirm__desc { font-size: var(--fs-sm); color: var(--muted); }
.confirm__list { display: grid; margin: var(--s-2) 0 0; border-top: 2px solid var(--forest); }
.confirm__list > div { display: grid; grid-template-columns: 6.5em 1fr; gap: var(--s-3); padding: 12px 0; border-bottom: 1px solid var(--line); }
.confirm__list dt { font-size: var(--fs-xs); letter-spacing: 0.1em; color: var(--muted); padding-top: 3px; }
.confirm__list dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.confirm__status:empty { display: none; }
.confirm__status { padding: var(--s-3) var(--s-4); background: #FBEDEA; color: var(--error); border-left: 3px solid var(--error); font-size: var(--fs-sm); }
.confirm__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: flex-end; margin-top: var(--s-2); }
.confirm__done { display: none; }
.confirm.is-done .confirm__ask { display: none; }
.confirm.is-done .confirm__done { display: grid; }
.confirm.is-sending [data-confirm-back] { visibility: hidden; }
@keyframes confirm-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 599.98px) {
  .confirm { width: 100vw; max-width: 100vw; margin: auto 0 0; max-height: 92dvh; }
  .confirm__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .confirm__done .confirm__actions { grid-template-columns: 1fr; }
  .confirm__list > div { grid-template-columns: 5.5em 1fr; }
}

/* ---------- 內頁 ---------- */
.breadcrumb { font-size: var(--fs-xs); letter-spacing: 0.08em; color: var(--text-muted); padding-top: var(--s-3); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.breadcrumb li + li::before { content: "／"; margin-right: var(--s-2); color: var(--line-strong); }
.breadcrumb a { text-decoration: none; display: inline-flex; min-height: 44px; min-width: 44px; justify-content: center; align-items: center; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { display: inline-flex; min-height: 44px; align-items: center; }
.page-hero { display: grid; gap: var(--s-6); padding-block: var(--s-5) var(--section-y); align-items: center; }
.page-hero h1 { margin-top: var(--s-5); font-size: var(--fs-h1); line-height: 1.32; text-wrap: balance; }
.page-hero .lead { margin-top: var(--s-5); max-width: 36em; }
.page-hero .hero__actions { margin-top: var(--s-6); }
.page-hero__hours { margin-top: var(--s-3); font-size: var(--fs-xs); letter-spacing: 0.08em; color: var(--text-muted); }
.page-hero__media { overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-3); }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__media .viewer-link { height: 100%; }
.page-hero__facts { margin: var(--s-5) 0 0; display: grid; max-width: 36em; font-size: var(--fs-sm); border-top: 1px solid var(--line); }
.page-hero__facts > div { display: grid; grid-template-columns: 5.5em 1fr; gap: var(--s-3); padding: 10px 0; border-bottom: 1px solid var(--line); }
.page-hero__facts dt { color: var(--text-muted); font-size: var(--fs-xs); letter-spacing: 0.1em; padding-top: 3px; }
.page-hero__facts dd { margin: 0; color: var(--heading); }
.page-hero--text { padding-bottom: clamp(32px, 3vw + 12px, 56px); }
@media (min-width: 1024px) { .page-hero { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s-8); } .page-hero__media { aspect-ratio: 3 / 2; } .page-hero--text { grid-template-columns: minmax(0, 9fr); } }
@media (max-width: 599.98px) { .page-hero .hero__actions { display: grid; grid-template-columns: 1.35fr 1fr; } .page-hero .hero__actions .btn { padding-inline: 12px; } }
/* 320–374px 的小手機：兩顆按鈕上下排（上一行的兩欄規則寫在後面，會蓋過首屏區的單欄規則，所以這裡再指定一次） */
@media (max-width: 374.98px) { .page-hero .hero__actions { grid-template-columns: 1fr; } }
.fit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.fit-list li { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.fit-list .icon { width: 20px; height: 20px; color: var(--wood); margin-top: 5px; }
.fit-list strong { color: var(--heading); font-weight: 400; }
.types { display: grid; gap: var(--s-7) var(--s-5); }
@media (min-width: 768px) { .types { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.type { position: relative; display: grid; gap: var(--s-3); align-content: start; }
.type__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-3); }
.type__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.type p { color: var(--text-muted); font-size: var(--fs-sm); }
/* 整張卡可點進產品頁（標題連結延伸到整張卡，只有一個連結） */
.type__link { color: inherit; text-decoration: none; }
.type__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.type__link:hover { text-decoration: underline; text-decoration-color: var(--wood); text-decoration-thickness: 2px; }
.type__go { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.1em; color: var(--walnut); }
.type__go .icon { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.type:hover .type__media img, .type:focus-within .type__media img { transform: scale(1.03); }
.has-motion .type:hover .is-parallax img, .has-motion .type:focus-within .is-parallax img { transform: translate3d(0, var(--py, 0%), 0) scale(var(--pz)); --pz: 1.21; }
.type:hover .type__go .icon, .type:focus-within .type__go .icon { transform: translateX(4px); }
.gallery { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery figure { overflow: hidden; background: var(--paper-3); }
.section--dark .gallery figure { background: #2A3428; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: var(--s-2) 0 0; font-size: var(--fs-xs); color: var(--text-muted); background: var(--bg); }
/* 看照片：相簿、頁首照片、證明文件縮圖都可以點開（viewer.js）；角落圖示提示可放大 */
.viewer-link { position: relative; display: block; color: inherit; cursor: zoom-in; }
.viewer-link:focus-visible { outline-offset: -3px; }
.viewer-hint { position: absolute; right: 10px; bottom: 10px; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; background: rgba(31, 39, 29, 0.72); color: var(--paper); opacity: 0; transform: translateY(4px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); pointer-events: none; }
.viewer-hint .icon { width: 18px; height: 18px; }
.viewer-link:hover .viewer-hint, .viewer-link:focus-visible .viewer-hint { opacity: 1; transform: none; }
/* 觸控裝置沒有滑鼠移上：頁首照片與證明文件常駐提示（相簿標題下已有「點照片可以放大」說明） */
@media (hover: none) { .page-hero__media .viewer-hint, .cert__doc .viewer-hint { opacity: 0.9; transform: none; width: 32px; height: 32px; } }
/* 證書、文件（.is-document）：完整顯示不裁切，四周留白如同放在紙上 */
.gallery img.is-document, .page-hero__media img.is-document, .svc-row__media img.is-document, .type__media img.is-document, .product__media img.is-document,
.work__media img.is-document, .lead-case__media img.is-document, .step__media img.is-document, .factory-photo img.is-document { object-fit: contain; object-position: 50% 50%; padding: 4%; background: var(--paper-2); }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); } .gallery--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .gallery--process { grid-template-columns: repeat(4, minmax(0, 1fr)); } .gallery--case { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.related { display: grid; gap: 0 var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); border-top: 1px solid var(--line-strong); }
.related a { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 72px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--heading); font-weight: 700; letter-spacing: 0.06em; }
.related a .icon { color: var(--wood); transition: transform var(--dur) var(--ease); }
.related a:hover { color: var(--walnut); }
.related a:hover .icon, .related a:focus-visible .icon { transform: translateX(4px); }
.cta-band { display: grid; gap: var(--s-5); align-items: center; padding: clamp(32px, 4vw, 64px); background: var(--forest); color: var(--text); }
.cta-band h2 { color: var(--paper); font-size: clamp(1.5rem, 1vw + 1.15rem, 2.125rem); }
.cta-band p { color: var(--muted-light); margin-top: var(--s-2); font-size: var(--fs-sm); }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (min-width: 1024px) { .cta-band { grid-template-columns: minmax(0, 7fr) auto; } }

/* 產品型錄 */
.products { display: grid; gap: var(--s-6) var(--s-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
@media (min-width: 1024px) { .products--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 產品頁的「其他產品」：手機改成兩欄精簡卡（照片＋名稱），不必連滑三張大卡；看全部請點下方連結 */
@media (max-width: 599.98px) {
  .products--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-3); }
  .products--3 > :nth-child(n+3) { display: none; }
  .products--3 .product__body { padding: var(--s-3) var(--s-3) var(--s-4); gap: var(--s-2); }
  .products--3 .product__body p { display: none; }
  .products--3 .product__title { font-size: 1.0625rem; }
  .products--3 .product__go { padding-top: 0; font-size: var(--fs-xs); letter-spacing: 0.06em; gap: 6px; }
  .products--3 .product__count { right: 6px; bottom: 6px; padding: 4px 7px; }
}
.product { position: relative; display: grid; grid-template-rows: auto 1fr; background: var(--white); scroll-margin-top: calc(var(--header-h) + var(--admin-bar) + 24px); }
.product:target { outline: 2px solid var(--wood); outline-offset: 4px; }
.product__media { position: relative; aspect-ratio: 4 / 3; background: var(--paper-3); overflow: hidden; }
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.product:hover .product__media img, .product:focus-within .product__media img { transform: scale(1.03); }
/* 照片張數（右下角）：讓訪客知道點進去還有更多照片 */
.product__count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: rgba(31, 39, 29, 0.8); color: var(--paper); font-size: var(--fs-xs); line-height: 1; }
.product__count .icon { width: 16px; height: 16px; }
.product__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.product__title { font-size: var(--fs-h3); line-height: 1.5; }
/* 整張卡可點進產品頁（標題連結延伸到整張卡，只有一個連結） */
.product__link { color: inherit; text-decoration: none; }
.product__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.product__link:hover { text-decoration: underline; text-decoration-color: var(--wood); text-decoration-thickness: 2px; }
.product__go { margin-top: auto; padding-top: var(--s-2); display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.1em; color: var(--walnut); }
.product__go .icon { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.product:hover .product__go .icon, .product:focus-within .product__go .icon { transform: translateX(4px); }
.product__body p { color: var(--text-muted); font-size: var(--fs-sm); }
.product__meta { margin: 0; display: grid; font-size: var(--fs-sm); }
.product__meta > div { display: grid; grid-template-columns: 3em 1fr; gap: var(--s-3); padding: 8px 0; border-top: 1px solid var(--line); }
.product__meta dt { color: var(--text-muted); font-size: var(--fs-xs); letter-spacing: 0.1em; padding-top: 2px; }

/* 案例分類：文字頁籤 */
.chips { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); margin-bottom: var(--s-7); border-bottom: 1px solid var(--line); }
.chips a { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 48px; font-size: var(--fs-sm); font-weight: 400; letter-spacing: 0.1em; color: var(--muted); text-decoration: none; }
.chips a:hover { color: var(--forest); }
.chips a[aria-current="page"] { color: var(--forest); font-weight: 700; }
.chips a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--wood); }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; margin-top: var(--s-7); }
.page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 var(--s-3); border: 1px solid var(--line); font-family: var(--font-mark); font-weight: 600; text-decoration: none; color: var(--forest); }
.page-numbers.current { background: var(--forest); color: var(--paper); border-color: var(--forest); }

/* 關於：品牌標語 */
.slogan-band { text-align: center; padding-block: clamp(72px, 7vw, 136px); }
.slogan-band .label { justify-content: center; }
.slogan-band__text { margin-top: var(--s-5); font-size: clamp(2.5rem, 6vw, 5.5rem); font-weight: 900; line-height: 1.2; letter-spacing: 0.08em; color: var(--paper); }
.slogan-band__tagline { margin-top: var(--s-5); font-size: var(--fs-sm); letter-spacing: 0.32em; color: var(--oak-light); }
.about { display: grid; gap: var(--s-7); }
@media (min-width: 1024px) { .about { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: var(--s-8); align-items: start; } }

/* 內文 */
.prose { max-width: 42rem; font-size: var(--fs-body); line-height: 1.95; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.375rem, 0.8vw + 1.1rem, 1.75rem); margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose a { color: var(--walnut); }
.prose--lead { font-size: var(--fs-lead); }
.prose-updated { margin-top: var(--s-6); font-size: var(--fs-xs); color: var(--text-muted); }

/* 404 */
.notfound { padding-block: clamp(56px, 8vw, 136px); max-width: 44rem; }
.notfound__code { font-family: var(--font-mark); font-weight: 600; font-size: clamp(4.5rem, 10vw, 8rem); line-height: 1; letter-spacing: 0.04em; color: var(--oak); }
.notfound h1 { margin-top: var(--s-5); font-size: var(--fs-h1); line-height: 1.3; }
.notfound .lead { margin-top: var(--s-4); }
.notfound__links { margin-top: var(--s-7); padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.notfound__links a { display: inline-flex; min-height: 44px; align-items: center; color: var(--forest); letter-spacing: 0.08em; }

/* ---------- 看照片（全螢幕檢視，viewer.js） ----------
   深色底讓照片與文件本身最清楚；按鈕沿用直角細框。手機：左右滑切換、點照片放大，放大後用手指拖曳查看 */
html.viewer-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(20, 26, 19, 0.97); color: var(--paper); overscroll-behavior: contain; }
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: viewer-in 220ms var(--ease) both; }
.viewer::backdrop { background: rgba(20, 26, 19, 0.6); }
.viewer :focus-visible { outline: 2px solid var(--oak-light); outline-offset: 2px; }
.viewer__bar { display: flex; align-items: center; gap: var(--s-3); min-height: 64px; padding: calc(env(safe-area-inset-top) + 10px) var(--gutter) 10px; border-bottom: 1px solid rgba(246, 243, 236, 0.12); }
.viewer__count { flex: none; min-width: 3.6em; font-size: var(--fs-sm); color: var(--oak-light); }
.viewer__count[hidden] { display: none; }
.viewer__title { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 700; line-height: 1.5; letter-spacing: 0.08em; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer__btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(246, 243, 236, 0.32); border-radius: 0; background: transparent; color: var(--paper); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; cursor: pointer; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.viewer__btn:hover { background: rgba(246, 243, 236, 0.08); border-color: var(--paper); }
@media (hover: none) { .viewer__btn:hover { background: transparent; border-color: rgba(246, 243, 236, 0.32); } }
.viewer__btn .icon { width: 18px; height: 18px; }
.viewer__btn [data-icon] { display: inline-grid; }
.viewer__btn [data-icon][hidden] { display: none; }
.viewer.is-zoomed .viewer__btn--zoom { background: var(--oak-light); border-color: var(--oak-light); color: var(--forest); }
.viewer__stage { position: relative; display: grid; place-items: center; overflow: hidden; padding: clamp(8px, 2vw, 24px) clamp(56px, 7vw, 104px); touch-action: pan-y pinch-zoom; }
.viewer__img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; cursor: zoom-in; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; transition: opacity 180ms ease; }
.viewer.is-loading .viewer__img { opacity: 0.3; }
.viewer.is-zoomed .viewer__stage { display: block; overflow: auto; padding: 0; touch-action: pan-x pan-y pinch-zoom; cursor: grab; }
.viewer.is-zoomed .viewer__stage:active { cursor: grabbing; }
.viewer.is-zoomed .viewer__img { max-width: none; max-height: none; margin-inline: auto; cursor: zoom-out; }
.viewer__status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: calc(100% - 32px); padding: 10px 16px; background: rgba(31, 39, 29, 0.92); border: 1px solid rgba(246, 243, 236, 0.2); font-size: var(--fs-sm); color: var(--paper); text-align: center; }
.viewer__status[hidden] { display: none; }
.viewer__nav { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px; padding: 0; border: 1px solid rgba(246, 243, 236, 0.32); border-radius: 0; background: rgba(31, 39, 29, 0.72); color: var(--paper); cursor: pointer; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
@media (hover: hover) { .viewer__nav:hover { background: var(--oak-light); border-color: var(--oak-light); color: var(--forest); } }
.viewer__nav:active { background: var(--oak-light); border-color: var(--oak-light); color: var(--forest); }
.viewer__nav .icon { width: 24px; height: 24px; }
.viewer__nav--prev { left: clamp(4px, 1.6vw, 28px); }
.viewer__nav--next { right: clamp(4px, 1.6vw, 28px); }
.viewer__nav[hidden], .viewer.is-zoomed .viewer__nav { display: none; }
.viewer__caption { padding: 12px var(--gutter) calc(env(safe-area-inset-bottom) + 16px); font-size: var(--fs-sm); line-height: 1.7; color: var(--muted-light); text-align: center; }
.viewer__caption[hidden] { display: block; visibility: hidden; padding-block: 0 calc(env(safe-area-inset-bottom) + 8px); }
@keyframes viewer-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 767.98px) {
  .viewer__bar { gap: var(--s-2); min-height: 56px; padding-inline: 12px; }
  .viewer__btn { padding: 0 10px; }
  .viewer__stage { padding: 8px 0; }
  /* 手機：上一張／下一張放在底部說明列兩側，不蓋住照片與文件內容（也可以左右滑） */
  .viewer__nav { top: auto; bottom: calc(env(safe-area-inset-bottom) + 10px); width: 48px; height: 48px; margin-top: 0; }
  .viewer__nav--prev { left: 12px; }
  .viewer__nav--next { right: 12px; }
  .viewer__caption, .viewer__caption[hidden] { display: flex; align-items: center; justify-content: center; min-height: 68px; padding: 10px 72px calc(env(safe-area-inset-bottom) + 10px); }
  .viewer.is-single .viewer__caption { min-height: 0; padding-inline: var(--gutter); }
  .viewer.is-single .viewer__caption[hidden] { display: none; }
}
@media (max-width: 374.98px) { .viewer__btn--zoom [data-v-zoom-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
@media (prefers-reduced-motion: reduce) { .viewer[open] { animation: none; } .viewer__img { transition: none; } }

/* ---------- 頁尾 ---------- */
.site-footer { background: var(--forest-deep); color: #C9CCBF; font-size: var(--fs-sm); padding-block: var(--s-9) calc(var(--s-6) + 72px); }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--oak-light); }
.footer-grid { display: grid; gap: var(--s-7); }
.footer-brand img { width: 132px; height: auto; }
.footer-about { margin-top: var(--s-5); line-height: 1.9; color: var(--muted-light); }
.footer-about strong { display: block; color: var(--paper); font-weight: 700; letter-spacing: 0.08em; }
.footer-cols { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.footer-cols h2 { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s-3); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.2em; color: var(--oak-light); }
.footer-cols h2 .en { font-family: var(--font-mark); font-weight: 600; letter-spacing: 0.24em; color: var(--muted-light); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer-cols li { min-height: 36px; display: flex; align-items: center; line-height: 1.7; }
.footer-cols li a { display: inline-flex; min-height: 44px; align-items: center; }
.footer-bottom { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid rgba(246, 243, 236, 0.14); display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); align-items: center; justify-content: space-between; color: var(--muted-light); font-size: var(--fs-xs); letter-spacing: 0.06em; }
.footer-bottom__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-6); }
.footer-bottom a { display: inline-flex; min-height: 44px; align-items: center; }
/* 製作標示：平常為低調單色，滑鼠移上顯示原色（不搶森寶的品牌色） */
.credit { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--muted-light) !important; }
.credit__label { font-size: var(--fs-label); letter-spacing: 0.16em; }
.credit img { height: 26px; width: auto; filter: grayscale(1) brightness(1.3); opacity: 0.7; transition: filter var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.credit:hover { text-decoration: none !important; }
.credit:hover img, .credit:focus-visible img { filter: none; opacity: 1; }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--s-8); } .site-footer { padding-bottom: var(--s-6); } }

/* ---------- 手機固定操作列 ---------- */
.mobile-bar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s-2); padding: var(--s-2) var(--gutter) calc(var(--s-2) + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); transition: transform 250ms var(--ease); }
.mobile-bar .btn { min-height: 48px; padding-inline: 12px; }
.mobile-bar.is-hidden, .mobile-bar.is-away { transform: translateY(110%); visibility: hidden; transition: transform 250ms var(--ease), visibility 0s linear 250ms; }
@media (min-width: 1024px) { .mobile-bar { display: none; } }

/* ---------- 浮動聯絡鈕（Facebook、電話）：森林綠方塊＋木色圖示、直角、上方木板飾條 ---------- */
.quick-contact { position: fixed; z-index: 45; right: 0; top: 50%; transform: translateY(-50%); display: grid; justify-items: end; gap: 1px; }
.quick-contact::before { content: ""; justify-self: stretch; width: 56px; margin-left: auto; height: 11px; background: linear-gradient(var(--wood) 0 3px, transparent 3px 4px, var(--wood) 4px 7px, transparent 7px 8px, var(--wood) 8px 11px); }
.quick-contact__item { position: relative; display: flex; align-items: center; justify-content: flex-end; width: 56px; height: 56px; overflow: hidden; background: var(--forest); color: var(--paper); text-decoration: none; box-shadow: -10px 12px 28px -16px rgba(31, 39, 29, 0.55); transition: width 360ms var(--ease), background-color var(--dur) var(--ease); }
.quick-contact__item .icon { position: absolute; right: 16px; top: 16px; width: 24px; height: 24px; color: var(--oak-light); transition: transform var(--dur) var(--ease); }
.quick-contact__label { flex: none; padding: 0 64px 0 22px; color: var(--paper); font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.1em; white-space: nowrap; opacity: 0; transition: opacity 200ms var(--ease); }
.quick-contact__label .num { font-family: var(--font-mark); font-size: 1.0625rem; letter-spacing: 0.06em; }
.quick-contact__item:hover, .quick-contact__item:focus-visible { width: 240px; background: var(--forest-deep); color: var(--paper); text-decoration: none; }
.quick-contact__item:hover .quick-contact__label, .quick-contact__item:focus-visible .quick-contact__label { opacity: 1; transition-delay: 90ms; }
.quick-contact__item:hover .icon, .quick-contact__item:focus-visible .icon { transform: scale(1.08); }
.quick-contact__item:focus-visible { outline: 2px solid var(--oak-light); outline-offset: -4px; }
/* 手機、平板：右下角、手機操作列上方；只顯示圖示（文字留給螢幕報讀） */
@media (max-width: 1023.98px) {
  .quick-contact { top: auto; transform: none; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); gap: 8px; }
  .quick-contact::before { display: none; }
  .quick-contact__item, .quick-contact__item:hover, .quick-contact__item:focus-visible { width: 52px; height: 52px; }
  .quick-contact__item { border-top: 3px solid var(--wood); box-shadow: 0 10px 24px -10px rgba(31, 39, 29, 0.6); }
  .quick-contact__item .icon { right: 14px; top: 12px; }
  .quick-contact__label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* 首屏的來電按鈕還看得到、或正在填表（軟鍵盤）時先收起，和手機操作列同步出現 */
  .quick-contact { transition: opacity 250ms var(--ease), transform 250ms var(--ease), visibility 0s; }
  .mobile-bar.is-away ~ .quick-contact, .mobile-bar.is-hidden ~ .quick-contact { opacity: 0; transform: translateY(16px); visibility: hidden; pointer-events: none; transition: opacity 250ms var(--ease), transform 250ms var(--ease), visibility 0s linear 250ms; }
}
@media (prefers-reduced-motion: reduce) { .quick-contact__item, .quick-contact__label, .quick-contact__item .icon, .quick-contact { transition: none; } }
@media (max-width: 1023.98px) { body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); } }

/* ---------- 捲動進場（僅在 JavaScript 與動態許可時） ---------- */
.js-motion [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 560ms var(--ease), transform 560ms var(--ease); transition-delay: var(--d, 0ms); }
.js-motion [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 降低動態 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .svc-row:hover .svc-row__media img, .work:hover .work__media img { transform: none; }
  .sb-intro.is-leaving { transform: none; opacity: 0; }
  .sb-intro::after { display: none; }
}

/* ---------- 列印 ---------- */
/* 後台多行欄位（常見問題回答、首屏簡短說明、頁首說明、流程說明、產品規格說明、區塊說明與產品分類說明）：業主在欄位裡按 Enter 換行，網站照樣換行（2026-10-06） */
.faq dd, .hero__desc, .page-hero .lead, .step > p, .product dd, .page-hero dd, .sec-head .lead { white-space: pre-line; }

@media print {
  .site-header, .mobile-bar, .quick-contact, .hero__media, .hero__cluster, .map-shell, .form, .mobile-nav, .sb-intro { display: none !important; }
  .hero, .section--dark, .site-footer { background: #fff !important; color: #000 !important; }
  .hero__title, .section--dark h2 { color: #000 !important; }
}
