/* ============================================================
   蔚禾身心診所 WayHeal Clinic — Global Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500&family=Noto+Serif+TC:wght@300;400;500&family=Noto+Sans+TC:wght@300;400;500&display=swap');

/* ── Variables ── */
:root {
  --green:      #35553B;
  --green-mid:  #3B6C59;
  --green-light:#7A9E82;
  --bg:         #F3F2EB;
  --bg-warm:    #EDEAE3;
  --bg-dark:    #1A1C19;
  --text:       #1A1A18;
  --text-mid:   #4A4A46;
  --text-light: #8A8A84;
  --border:     #D8D5CE;
  --divider-gray: #DADADA;
  --white:      #FFFFFF;
  --warn:       #A14A38;   /* #28 克制警示色：陶土／磚紅，對 --bg 達 AA 5.3:1；唯一用途＝附件錯誤/移除 */
  --serif:      'Noto Serif TC', serif;
  --sans:       'Noto Sans', 'Noto Sans TC', sans-serif;   /* 英數用 Noto Sans（拉丁），中文 fallback 回 Noto Sans TC */
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Photo Placeholder ── */
.photo {
  background: linear-gradient(135deg, #C8C5BE 0%, #B8B5AE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.photo::after {
  content: attr(data-label);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 300;
}
.photo-hero   { height: 100vh; min-height: 560px; }
.photo-tall   { height: 70vh;  min-height: 480px; }
.photo-med    { height: 400px; }
.photo-sm     { height: 240px; }
.photo-thumb  { height: 200px; }
.photo-card   { height: 200px; }
.photo-avatar { width: 64px; height: 64px; border-radius: 50%; }

/* ── Navigation ── */
/* iOS 26 Safari 從頂部 fixed 元素的 background-color 取樣染狀態列（忽略 ::before 偽元素／漸層／theme-color）。
   故用「真實 fixed 元素＋實心 background-color」當取樣條，兼視覺填滿安全區，全平台一致（桌機 env()=0 自動隱形）。*/
.ios-statusbar-fill{
  position: fixed; top: 0; left: 0; right: 0;
  height: env(safe-area-inset-top);
  background-color: #F7F4EC; z-index: 210; pointer-events: none;
}

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  padding-top: calc(24px + env(safe-area-inset-top));   /* 底色填進 iOS 狀態列安全區，與 header 一體 */
  transition: background 0.4s var(--ease), padding 0.3s var(--ease);
}
.site-nav.transparent { background: transparent; }
.site-nav.solid {
  background: #F7F4EC;                                   /* 不透明米白（去 0.96/blur），各平台一致 */
  padding: 16px 40px;
  padding-top: calc(16px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--white);
  transition: color 0.3s;
  line-height: 0;   /* A：移除行高 leading，logo 盒縮回圖高，flex 才能把它下降對齊右側三標籤同一水平線 */
}
.site-nav.solid .nav-logo { color: var(--green); }
.nav-logo a { color: inherit; }

/* ── Brand Logo (real <img>, white / green swap by context) ── */
.logo-img { display: block; width: auto; }
.nav-logo .logo-img    { height: 36px; }
.menu-logo .logo-img   { height: 34px; }
.footer-logo .logo-img { height: 46px; }
/* nav: single <img>, src swapped via updateNav() — white on transparent, green on solid */
.nav-logo a { display: inline-flex; align-items: center; }
/* keep white logo readable over a bright hero */
.site-nav.transparent .logo-img { filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35)); }
.nav-hamburger {
  width: 32px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  height: 1px;
  background: var(--white);
  transition: background 0.3s, transform 0.3s;
}
.site-nav.solid .nav-hamburger span { background: var(--text); }

/* ── Menu Overlay ── */
.menu-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  z-index: 200;
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 36px;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  box-shadow: -8px 0 32px rgba(0,0,0,0.06);
}
.menu-overlay.open { transform: translateX(0); }
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(26,26,24,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}
.menu-backdrop.open { opacity: 1; pointer-events: auto; }
.menu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}
.menu-logo {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--green);
}
.menu-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-light);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  transition: color 0.2s;
}
.menu-close:hover { color: var(--text); }
.menu-links { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; gap: 0; }
.menu-link {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.06em;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}
.menu-link:hover { color: var(--green); }
.menu-link span { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-light); font-family: var(--sans); font-weight: 300; }
.menu-bottom {
  margin-top: 40px;
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.08em;
}

/* ── Sections ── */
.section { padding: 96px 40px; }
.section-md { padding: 72px 40px; }
.section-sm { padding: 48px 40px; }
/* 統一內容容器：section 負責全寬背景＋padding，內層限寬 1100 並居中（各 section 標題左緣一致） */
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-tag {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 16px;
  font-family: var(--sans);
  font-weight: 300;
}
.section-tag-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section-tag-line::after {
  content: '';
  flex: 1;
  max-width: 40px;
  height: 1px;
  background: var(--border);
}

/* ── Typography ── */
.h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.0;   /* #12/21：頁面標題行距 1.0（su 指定的特例；.h1 只用於 home hero 大標）；可退回 1.4 */
  color: var(--text);
}
.h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.5;   /* 區段標題回原樣 1.5（su 指定：line-height:1.0 是「頁面標題」的特例，不套用一般 .h2） */
  color: var(--text);
}
.h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}
.body-text {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 2;
  letter-spacing: 0.04em;
  max-width: 560px;
}
.caption {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.08em;
}

/* ── Link / CTA ── */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-top: 24px;
  padding-bottom: 3px;
  position: relative;
  transition: color 0.3s ease;
}
/* 方案 A 融合：常駐淡底線(::before) + hover 實線從左 scaleX 重描(::after)，
   柔和彈簧，與全站 hover 基調統一；currentColor 自動適配深淺底變體 */
.text-link::before {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor; opacity: 0.35;
}
.text-link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s cubic-bezier(.22, 1, .36, 1);
}
.text-link:hover::after { transform: scaleX(1); }
.text-link-light {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.4);
}
.text-link-light:hover { color: var(--white); }

/* ── Two Column ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }
.two-col-text { padding: 24px 0; }

/* ── News Cards ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  display: block;                /* 卡片可為 <a>（連 article）時維持區塊排版 */
  background: var(--white);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease);
}
.card:hover { transform: translateY(-4px); }
.card-img { height: 200px; }
.card-body { padding: 20px; }
.card-date {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.card-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
  letter-spacing: 0.03em;
}

/* ── Article List ── */
.article-list { border-top: 1px solid var(--border); }
.article-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.article-item:hover { background: rgba(58,82,64,0.02); }
.article-thumb { width: 100px; height: 72px; flex-shrink: 0; }
.article-info { flex: 1; padding-top: 2px; }
.article-date { font-size: 11px; color: var(--text-light); letter-spacing: 0.1em; margin-bottom: 6px; }
.article-title {
  font-family: var(--serif);
  font-size: 17px;   /* 對齊 .card-title(17px) 標題階：文章/消息標題全站同字級 */
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
}
.article-excerpt { font-size: 13px; color: var(--text-light); line-height: 1.7; }

/* ── Doctor Cards ── */
.doctors-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.doctor-card {
  padding: 32px;
  border: 1px solid var(--border);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--white);
}
.doctor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
}
.doctor-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 4px;
}
.doctor-role {
  font-size: 12px;
  color: var(--green);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.doctor-bio { font-size: 13px; color: var(--text-mid); line-height: 1.8; }

/* ── History List ── */
.history-list { border-top: 1px solid var(--border); }
.history-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.history-date {
  width: 80px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.history-text { font-size: 14px; color: var(--text-mid); line-height: 1.7; }

/* ── Schedule Table ── */
.schedule-wrap { overflow-x: auto; }
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid var(--border);   /* 只加外圈：內部維持水平細線 */
}
.schedule-table th {
  background: var(--green);
  color: rgba(255,255,255,0.9);
  padding: 12px 16px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: center;
  font-size: 12px;
}
.schedule-table td {
  padding: 16px 18px;
  border: none;
  border-bottom: 1px solid var(--border);   /* 只留水平細線，去掉直向框線的試算表感 */
  text-align: center;
  color: var(--text-mid);
}
.schedule-table tr:nth-child(even) td { background: var(--bg-warm); }
.sched-time { white-space: nowrap; }   /* 桌機：時間 10:00–12:00 不折行 */
.dot-yes::before { content: '●'; color: var(--green); font-size: 12px; }
.dot-no::before  { content: '—'; color: var(--text-light); }
/* 半填充圓：時段與平日不同（如週二下午），左實右空＝「部分/不同」、純展示 */
.dot-alt::before {
  content: '';
  display: inline-block;
  width: 12px; height: 12px;
  border: 1.5px solid var(--green);
  border-radius: 50%;
  background: linear-gradient(90deg, var(--green) 0 50%, transparent 50% 100%);
  vertical-align: middle;
}
/* 圖例符號（caption 內）：三者統一成同尺寸 CSS 形狀＋同 vertical-align，
   解決「字符 glyph（● —）vs CSS 圓（◐）」混用造成的墨量不均與基線不齊 */
.lg-dot { display: inline-block; width: 10px; height: 10px; vertical-align: middle; margin-right: 3px; border-radius: 50%; }
.lg-dot--yes { background: var(--green); }                    /* 有門診：實心 */
.lg-dot--alt { border: 1.5px solid var(--green);              /* 時段不同：半填充 */
               background: linear-gradient(90deg, var(--green) 50%, transparent 50%); }
.lg-dot--no  { height: 0; border-radius: 0;                   /* 休診：CSS 橫槓（2.5px 補墨量，色不加深） */
               border-top: 2.5px solid var(--text-light); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── 醫師門診篩選器（about）：chip 點選＝上表只亮該醫師時段、其餘淡 35%；取代靜態「醫師出診對應」 ── */
.doc-filter { margin-top: 40px; padding: 24px 20px; background: var(--bg-warm); border: 1px solid var(--border); }   /* 左右 padding 對齊課表「診次」文字左緣(border1+20=21px)，文字切齊 */
.doc-filter__title { font-size: 12px; letter-spacing: 0.1em; color: var(--text-light); margin-bottom: 16px; text-transform: uppercase; }
.doc-filter__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.doc-chip {
  font-family: var(--serif); font-size: 14px; color: var(--text-mid);
  padding: 8px 18px; border: 1px solid var(--border); border-radius: 999px;
  background: transparent; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.doc-chip:hover { border-color: var(--green); color: var(--green); }
.doc-chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.doc-chip:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* 上表淡化：JS 對未聚焦的格（含休診）逐格加 .is-dim；全部模式＝無 .is-dim＝全亮。淡到 35%、過渡 .15s 讓切換有感 */
.schedule-table td.dot-yes::before,
.schedule-table td.dot-alt::before,
.schedule-table td.dot-no::before { transition: opacity .15s ease; }
.schedule-table td.is-dim::before { opacity: .35; }

/* 門診表手機版：日期收成單字「一二三四五」避免「週X」斷行；「週」字視覺隱藏(sr-only)但保留給讀屏→仍讀「週一」 */
@media (max-width: 768px){
  .schedule-table thead th .day-prefix{
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  .sched-time { white-space: normal; }   /* 手機：欄窄，時間恢復換行避免撐寬表格出現水平捲動 */
}

/* ── Map Placeholder ── */
.map-placeholder {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 32px;
}

/* ── Info Row ── */
.info-row { display: flex; gap: 48px; flex-wrap: wrap; }
.info-item { flex: 1; min-width: 120px; }
.info-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}
.info-val {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.8;
  letter-spacing: 0.03em;
}
/* 門診時間詳版（home/contact）：星期＝內文錨點(500)、診次組左側連續直線、診次=註解淡灰/時間=答案中灰、間距收緊 */
.hours-group { margin-top: 24px; }
.hours-group:first-child { margin-top: 0; }
.hours-day { font-size: 1rem; color: var(--text-mid); letter-spacing: 0.03em; margin-bottom: 10px; }   /* 星期＝內文設定 400（守 06-17 定案「去粗」＋整欄與地址/電話一致）；階層交給字級落差＋垂直線承擔 */
.hours-rows { border-left: 1px solid var(--text-light); margin-left: 1px; padding-left: 13px; }   /* 視覺對齊：線右移 1px 對到「星」墨跡主體（非框左 x=0）；padding 同步 14→13 守住診次內縮間距 */
.hours-row { display: flex; gap: 14px; margin: 0; line-height: 1.6; }   /* margin 0、行距收緊時間間距 */
.hours-sess { font-size: 0.875rem; color: #7A7A74; min-width: 44px; }   /* 14px；診次＝註解，比時間淡但降一階過 WCAG AA */
.hours-time { font-size: 0.875rem; color: var(--text-mid); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }   /* 14px；時間＝答案，--text-mid */
/* 門診資訊：寬屏左右兩欄（左標題＋CTA、右資訊橫排），h2 與 info 上緣齊頭；窄屏堆疊 */
/* 窄屏單列：標題 / 資訊 / 連結（DOM 順序）；lg 兩欄：左 h2+cta、右 info 頂齊 h2 */
.clinic-cols { display: grid; gap: 24px; }
.clinic-cta .text-link { margin-top: 0; }
@media (min-width: 768px) {
  .clinic-cols {
    grid-template-columns: 28% 1fr;
    grid-template-areas: "h2 info" "cta info";
    column-gap: 40px; row-gap: 0;
    align-items: start;
  }
  .clinic-h2 { grid-area: h2; }
  .clinic-info { grid-area: info; gap: 32px; }  /* #14 桌機縮窄三塊間距，只限 home（contact 仍 48px）*/
  .clinic-cta { grid-area: cta; margin-top: 32px; }
}

/* ── Contact Form ── */
.contact-form { max-width: 520px; }
.form-field { margin-bottom: 24px; }
.form-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  font-size: 14px;
  font-family: var(--sans);
  color: var(--text);
  background: transparent;
  letter-spacing: 0.04em;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus { border-color: var(--green); }
.form-input::placeholder { color: var(--text-light); }
.form-textarea { height: 100px; resize: none; }
.form-btn {
  padding: 14px 40px;
  background: var(--green);
  color: var(--white);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--green);
  transition: background 0.2s, color 0.2s;
}
.form-btn:hover { background: transparent; color: var(--green); }

/* ── LINE Button ── */
.line-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 40px;
  border: 1px solid var(--text);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
  margin-bottom: 48px;
}
.line-btn:hover { background: var(--text); color: var(--white); }
.line-icon {
  width: 24px;
  height: 24px;
  background: #06C755;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

/* ── Divider ── */
.divider-text {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.12em;
  margin: 40px 0;
}
.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--border);
}

/* ── #28 聯絡表單附件：「承接」式 dropzone（前端 UI；後端寄信串接待排程）── */
.form-attach { position: relative; margin-bottom: 24px; }
.form-attach > input[type="file"] {      /* 視覺隱藏、由 zone 按鈕代觸發 */
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.form-attach__zone {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 20px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-rest);          /* 靜止克制圓角，固定不放大（客戶不要圓角放大）*/
  background: transparent;
  color: var(--text-light);
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.04em;
  text-align: left;
  transition: border-color .2s, background .2s, color .2s, padding .4s var(--spring);
}
.form-attach__zone:hover { border-color: var(--green); color: var(--text-mid); }
.form-attach__zone:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
/* 拖放承接：框加高張開＋淡綠暈，容器溫柔接住檔案（圓角固定不放大，呼應客戶「移除圓角放大」）*/
.form-attach__zone.is-drag {
  border-color: var(--green); background: rgba(53, 85, 59, .06);
  padding: 32px 16px; color: var(--green);
}
.form-attach__icon { flex-shrink: 0; width: 18px; height: 18px; stroke: currentColor; }
.form-attach__hint { margin-top: 8px; font-size: 11px; letter-spacing: .08em; color: var(--text-light); }
.form-attach__list { list-style: none; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.form-attach__chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--bg-warm); border-radius: var(--r-rest);
  font-size: 12px; color: var(--text-mid); letter-spacing: .03em;
}
.form-attach__chip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-attach__chip-size { flex-shrink: 0; font-size: 11px; color: var(--text-light); }
.form-attach__chip-remove {
  flex-shrink: 0; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1; color: var(--text-light);
  transition: color .2s;
}
.form-attach__chip-remove:hover { color: var(--warn); }
.form-attach__error { margin-top: 10px; font-size: 12px; letter-spacing: .04em; color: var(--warn); }

/* ── Scroll hint ── */
.scroll-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 28px;              /* 距 hero 下緣（自 1.2N 再上移，避免太貼底） */
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
/* .scroll-line（下方垂直線段）已移除 */

/* ── Text overlay (on hero) ── */
.hero-overlay-text {
  position: absolute;
  bottom: 80px;
  left: 40px;
  color: var(--white);
}

/* ── Footer ── */
.site-footer {
  background: var(--green);
  padding: 56px 40px 32px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom));   /* viewport-fit=cover 後避開 home indicator */
}
.footer-inner {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-bottom: 48px;
}
/* footer 分左 logo 區 + 齊右資訊區（與 header 同調：左標誌、右內容；左右 padding 40 一致） */
.footer-col { flex: 0 0 auto; }
.footer-col:first-child { margin-right: auto; }
.footer-logo {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.8);
  margin-bottom: 4px;   /* 中英標題靠攏成一塊；英文（下方 12px 較淺）維持備注感 */
}
.footer-brand-en {       /* logo 下方品牌英文：12px、較淺；取代各頁重複的 inline font-size/color */
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.footer-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3); /* 對齊 B 線稿 footer label 透明度（低調；低於 AA，屬輔助小標，主資訊在 footer-val） */
  margin-bottom: 8px;
}
.footer-val {
  font-size: 0.875rem;          /* 13→14px：footer 主資訊（電話/門診/地址），要好讀好複製（#16）*/
  color: rgba(255,255,255,0.7);
  line-height: 1.9;
}
.footer-sns { display: flex; gap: 12px; margin-top: 24px; }  /* 加大與診所名間距，分出「品牌名／社群」兩層級 */
.footer-sns a {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;          /* A：圓形描邊，呼應全站去直角圓潤系統 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255,255,255,0.65); /* AA over --green (#35553B): 4.62:1 */
  transition: border-color 0.2s, color 0.2s;
}
.footer-sns a:hover { border-color: rgba(255,255,255,0.6); color: rgba(255,255,255,0.85); }

/* 手機版：診所名（左）＋ SNS（右），中間 auto 撐開；桌機維持上下排 */
@media (max-width: 768px) {
  .footer-col--brand { display: flex; align-items: center; justify-content: space-between; width: 100%; }  /* 撐滿整寬，space-between 才有空間把 SNS 推到右端 */
  .footer-col--brand .footer-sns { margin-top: 0; }
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.06em;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  position: relative;
  height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 0 40px 40px;
  background: linear-gradient(135deg, #3A5240 0%, #2A3E30 100%);
  overflow: hidden;
}
.page-hero-title {
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.0;   /* #12/21：內頁大標行距 1.0（頁面標題特例，同 .h1 hero；一般 .h2 不套此值） */
  color: rgba(255,255,255,0.9);
  position: relative;
  z-index: 1;
}
.page-hero-en {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 10px;   /* 內頁 en→中標題間距（配合標題行距 1.0）*/
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.15;
}
@media (max-width: 767px){
  /* #21 手機版頁面標題左緣對齊工具列／內文（24px，蓋過桌機 40px）*/
  .page-hero{ padding-left: 24px; padding-right: 24px; }
}

/* ── Utilities ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 40px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.bg-warm { background: var(--bg-warm); }
.bg-white { background: var(--white); }

/* ── Sitemap page ── */
.sitemap-header {
  background: linear-gradient(135deg, var(--green), #2A3E30);
  color: var(--white);
  padding: 48px 40px 36px;
}
.sitemap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; padding: 40px; }
.sitemap-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-light);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.sitemap-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text);
  border-radius: 2px;
  transition: border-color 0.15s, color 0.15s;
}
.sitemap-link:hover { border-color: var(--green); color: var(--green); }
.sitemap-url { font-size: 11px; color: var(--text-light); font-family: monospace; }

/* ── Responsive (basic) ── */
@media (max-width: 768px) {
  .site-nav { padding: 20px 24px; padding-top: calc(20px + env(safe-area-inset-top)); }
  .site-nav.solid { padding-left: 24px; padding-right: 24px; }  /* solid 態左右 padding 同步對齊 section（24），蓋過桌機 40px；top 沿用 solid 的 calc(16+safe) */
  .site-footer { padding-left: 24px; padding-right: 24px; }  /* 窄屏左右 padding 對齊 section（24） */
  .section, .section-md { padding: 64px 24px; }
  .section-sm { padding: 40px 24px; }
  .hero-overlay-text { left: 24px; }  /* 手機首圖左緣對齊內文 section 的 24px（桌機仍 40px） */
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .cards-grid { grid-template-columns: 1fr; }
  .doctors-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .info-row { gap: 28px; }
  .menu-overlay { padding: 24px; }
}

/* ── Tag Filter Bar (news.html) ── */
.tag-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 32px 24px 0;
  max-width: 900px;
  margin: 0 auto;
}
.tag-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-light);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.tag-btn:hover { color: var(--text-mid); }
.tag-btn.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* 文章分頁器（news；前端示範，實際分頁邏輯待後台串接）。藥丸語言與 doc-chip／lightbox 圓鈕一致 */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 56px; }
.pager-num, .pager-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 6px;
  font-size: 14px; color: var(--text-mid);
  border: 1px solid var(--border); border-radius: 999px;
  text-decoration: none; transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.pager-num:hover, .pager-arrow:not(.is-disabled):hover { border-color: var(--green); color: var(--green); }
.pager-num.is-current { background: var(--green); border-color: var(--green); color: #fff; }   /* 當前頁 */
.pager-arrow.is-disabled { color: var(--text-light); opacity: .4; cursor: not-allowed; }       /* 首頁時上一頁停用 */

/* ── Appointment CTA (home.html) ── */
.appt-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  margin-top: 56px;
  padding: 52px 64px;
  background: var(--green);
}
.appt-cta-en {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
  font-family: var(--sans);
}
.appt-cta-title {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.appt-cta-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
  line-height: 1.9;
  margin: 0;
}
.appt-cta-btn {
  flex-shrink: 0;
  display: inline-block;
  padding: 16px 36px;
  border: 1px solid rgba(255,255,255,0.45);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--white);
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.appt-cta-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.8);
}
@media (max-width: 768px) {
  .appt-cta { flex-direction: column; align-items: flex-start; padding: 40px 24px; gap: 32px; }
}

/* ── Nav Links (desktop horizontal nav) ── */
.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav-link {
  font-family: var(--sans);
  font-size: 0.875rem;          /* 12→14px：主要導覽是高頻找路控制，客戶在意可操作性（#16）*/
  letter-spacing: 0.14em;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--green); }
@media (min-width: 769px) {
  .nav-hamburger { display: none; }
  .nav-links { display: flex; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── Footer pages col (hide on desktop) ── */
@media (min-width: 769px) { .footer-col-pages { display: none; } }

/* ── Space Grid (4-col photo layout; shared by home + about) ── */
.space-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  max-width: 100%;
}
/* 空間照變體（home 3 張 / about 5 張 共用同一套橫滾邏輯）：排版見下方 flex 區塊 */
.space-photo {
  height: 320px;
  cursor: pointer;
  transition: opacity 0.2s;
  position: relative;
}
.space-photo:hover { opacity: 0.85; }
.space-photo-expand {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  border-radius: 2px;
}
.space-photo:hover .space-photo-expand { opacity: 1; }
/* #4：about 照片也可點擊放大 → 沿用 ⊕ 展開徽章的 hover 提示 */
.about-photo:hover .space-photo-expand { opacity: 1; }
/* 照片序號標（左上角；數字寫在 HTML：home 1/3~3/3、about 1/5~5/5） */
.space-photo-num{
  position: absolute;
  top: 12px; left: 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.3);
  padding: 2px 8px;
  border-radius: 2px;
  z-index: 2;
  pointer-events: none;
}
@media (max-width: 768px) {
  .space-grid { grid-template-columns: repeat(2, 1fr); }
  .space-photo { height: 200px; }
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  /* 米白柔和取代黑屏整屏接管（calm／品牌米白／去黑屏） */
  background: rgba(247,244,236,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.lightbox.open { display: flex; }
.lb-content {
  /* 框採圖片原始比例 4:3（1448×1086），cover 即填滿不裁切；寬度同時受 80vw 與 80vh 限制 */
  aspect-ratio: 4 / 3;
  width: min(80vw, calc(80vh * 4 / 3), 960px);
  height: auto;
  position: relative;   /* 供 .lb-count 定位在照片下緣外側 */
  /* 圖在米白底上柔和浮起 */
  box-shadow: 0 12px 48px rgba(42,46,44,0.18);
}
.lb-photo {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
/* 隱藏彈窗大圖的佔位 data-label 提示字（看大圖不需要那層文字疊加） */
.lb-photo::after { display: none; }
/* lightbox 照片張數計數：照片下緣外側、置中（米白底→深字） */
.lb-count {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--text-mid);
}
.lb-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: rgba(42,46,44,0.5);
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  transition: color 0.25s ease, transform 0.4s cubic-bezier(.22,1,.36,1);
  line-height: 1;
}
.lb-close:hover { color: #35553B; transform: scale(1.12); }
.lb-prev, .lb-next {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(42,46,44,0.18);
  font-size: 0;                       /* 隱藏原 ‹›字元，改用 ::before 畫 chevron */
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.4s cubic-bezier(.22,1,.36,1);
  flex-shrink: 0;
}
.lb-prev::before, .lb-next::before {
  content: "";
  width: 10px; height: 10px;
  border: solid rgba(42,46,44,0.5);
  border-width: 1.5px 1.5px 0 0;      /* 標準細 chevron */
  transition: border-color 0.2s;
}
/* 光學視覺置中：border chevron 旋轉後筆畫偏向開口反側，往中心回補（非絕對幾何置中） */
.lb-prev::before { transform: translateX(3px) rotate(-135deg); }   /* 左 ‹：筆畫偏左 → 往右回中 */
.lb-next::before { transform: translateX(-3px) rotate(45deg); }    /* 右 ›：筆畫偏右 → 往左回中 */
.lb-prev:hover, .lb-next:hover { border-color: #35553B; }
.lb-prev:hover { transform: scale(1.06) translateX(-3px); }  /* 向左微移暗示翻頁 */
.lb-next:hover { transform: scale(1.06) translateX(3px); }   /* 向右微移暗示翻頁 */
.lb-prev:hover::before, .lb-next:hover::before { border-color: #35553B; }

/* ── Intro Page (multi-photo layout) ── */
.intro-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 80px 40px 40px;
  min-height: 100vh;
  background: #1A1C19;
}
.intro-photo-item {
  position: relative;
  height: 60vh;
  min-height: 300px;
  cursor: pointer;
  overflow: hidden;
}
.intro-photo-item:hover .space-photo-expand { opacity: 1; }
.intro-slide-bg {
  width: 100%;
  height: 100%;
  transition: transform 0.3s var(--ease);
}
.intro-photo-item:hover .intro-slide-bg { transform: scale(1.02); }
.intro-enter-btn {
  display: block;
  width: fit-content;
  margin: 0 auto 64px;
  padding: 14px 48px;
  border: 1px solid rgba(255,255,255,0.45);
  color: rgba(255,255,255,0.8);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  background: transparent;
}
.intro-enter-btn:hover {
  border-color: rgba(255,255,255,0.8);
  color: #fff;
  background: rgba(255,255,255,0.06);
}
/* 手機版 intro：單欄 + 箭頭切換 */
.intro-mobile-slider {
  display: none;
  position: relative;
  background: #1A1C19;
  padding-top: 72px;
}
.intro-mobile-slide {
  display: none;
  width: 100%;
  height: 100vw;
  min-height: 300px;
}
.intro-mobile-slide.active { display: block; }
.intro-mobile-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
  font-size: 22px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.intro-mobile-arrow:hover { border-color: rgba(255,255,255,0.6); color: #fff; }
.intro-mobile-arrow.prev { left: 16px; }
.intro-mobile-arrow.next { right: 16px; }
@media (max-width: 768px) {
  .intro-photo-grid { display: none; }
  .intro-mobile-slider { display: block; }
}
@media (min-width: 769px) {
  .intro-mobile-slider { display: none; }
  .intro-photo-grid { display: grid; }
}

/* ── What You Get (about.html) ── */
.what-you-get-list { display: flex; flex-direction: column; gap: 0; }
.wyg-item {
  display: flex;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.wyg-item:first-child { border-top: 1px solid var(--border); }
.wyg-num {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-light);
  padding-top: 4px;
  min-width: 28px;
}
.wyg-title {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--text);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.wyg-desc {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 2;
  letter-spacing: 0.04em;
  margin: 0;
}

/* ============================================================
   Intro Landing (B-faithful rewrite) — 全部 scoped 在 .intro-b
   原生重現 B 版 approved 進場：平滑捲動 + 視差 + 模式切換 morph。
   B 配色與 V3 既有 token 不同（B 米白 cream，V3 是 --bg #F3F2EB），
   故新增 intro 專屬 token；--green / --green-mid 與 B 森林綠相符則重用。
   ============================================================ */
.intro-b {
  /* 配色（精確抽自 B main-D2Hw2uRp.css / index-DfBPFAi8.css） */
  --ib-cream:        #F7F4EC; /* bg-cream / 根畫布 */
  --ib-cream-50:     #FBF9F4; /* 側欄底、文字反白 */
  --ib-cream-200:    #EDE8DD; /* ph-reveal 底 */
  --ib-forest:       var(--green-mid); /* #3B6C59 — 與 V3 token 相符，重用 */
  --ib-forest-deep:  #2F5446; /* lightbox 深綠底 / enter hover */
  --ib-ink:          #2A2E2C; /* 主文字 */
  --ib-ink-soft:     #4A4F4D;
  --ib-ink-mute:     #7B807E;
  --ib-grain:        #D3D3A2; /* callout 底 */
  --ib-forest-700:   #2F5446; /* label 字色 */
  /* 動態（精確抽自 index-DfBPFAi8.css / index-B9tfUenr.js） */
  --ib-ease-out-back: cubic-bezier(.22, 1, .36, 1);
  --ib-ease-panel:    cubic-bezier(.7, 0, .2, 1);
  --ib-ease-enter:    cubic-bezier(.62, .04, .2, 1);

  background-color: var(--ib-cream);
  color: var(--ib-ink);
  font-family: 'Noto Sans', 'Noto Sans TC', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.intro-b[data-fade-on-load] { opacity: 0; transition: opacity .7s ease-out; }
.intro-b[data-fade-on-load].is-loaded { opacity: 1; }

/* ── Logo（左上小方標，連回 home.html）── */
.intro-b .ib-logo {
  position: fixed; top: calc(1rem + env(safe-area-inset-top)); left: 1rem;
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  text-decoration: none; z-index: 60;
  transition: opacity .4s ease-out;
}
.intro-b .ib-logo:hover { opacity: .7; }
.intro-b .ib-logo:focus-visible {
  outline: 2px solid rgba(59, 108, 89, .4); outline-offset: 4px; border-radius: 4px;
}
.intro-b .ib-logo img {
  width: 2rem; height: 2rem; display: block;
}
@media (min-width: 1024px) {
  .intro-b .ib-logo { top: 1.5rem; left: 1.5rem; width: 3rem; height: 3rem; }
  .intro-b .ib-logo img { width: 2.5rem; height: 2.5rem; }
}

/* ── 進入主站 CTA（右上，素淨 serif + 箭頭右移） ── */
.intro-b .ib-enter {
  position: fixed; top: calc(1.25rem + env(safe-area-inset-top)); right: 1.25rem; z-index: 60;
  display: inline-flex; align-items: baseline; gap: .45rem;
  padding: .35rem .15rem;
  font-family: 'Cormorant Garamond', 'Noto Serif TC', serif;
  font-size: .9375rem; letter-spacing: .14em;
  color: var(--ib-forest-700, #3B6C59);
  text-decoration: none;
  transition: color .35s ease, opacity .35s ease;
}
@media (min-width: 1024px) {
  .intro-b .ib-enter { top: 1.5rem; right: 1.75rem; font-size: 1rem; letter-spacing: .18em; }
}
.intro-b .ib-enter__label {
  position: relative;
}
.intro-b .ib-enter__label::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.2em;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right center;
  transition: transform .45s var(--ib-ease-out-back, cubic-bezier(.16,.84,.36,1));
}
.intro-b .ib-enter__arrow {
  display: inline-block; line-height: 1;
  transition: transform .45s var(--ib-ease-out-back, cubic-bezier(.16,.84,.36,1));
}
.intro-b .ib-enter:hover,
.intro-b .ib-enter:focus-visible { color: var(--ib-forest-deep, #2F5446); }
.intro-b .ib-enter:hover .ib-enter__label::after,
.intro-b .ib-enter:focus-visible .ib-enter__label::after { transform: scaleX(1); transform-origin: left center; }
.intro-b .ib-enter:hover .ib-enter__arrow,
.intro-b .ib-enter:focus-visible .ib-enter__arrow { transform: translateX(4px); }
.intro-b .ib-enter:focus-visible { outline: 2px solid rgba(59,108,89,.4); outline-offset: 4px; border-radius: 2px; }

/* ── 溶接層（進站時米白頁面溶接，「走進蔚禾」跳頁用）── */
.intro-b .ib-page-dissolve {
  position: fixed; inset: 0; background: var(--ib-cream);
  opacity: 0; pointer-events: none; transition: opacity .7s ease; z-index: 200;
}
.intro-b .ib-page-dissolve.is-active { opacity: 1; pointer-events: auto; }

/* ── 平滑捲動畫布 ── */
/* 原生捲動：wrapper / content 不再虛擬定位，回歸正常文檔流 */
.intro-b .ib-smooth-wrapper img { -webkit-user-drag: none; user-drag: none; }
.intro-b .ib-smooth-content { width: 100%; }
.intro-b .ib-main { padding: 4.5rem 0 7.5rem; }   /* 手機/平板：照片牆整體上移、更靠近上方操作列（頂 7.5→4.5rem）*/
@media (min-width: 1024px) { .intro-b .ib-main { padding: 10rem 0; } }
.intro-b .ib-photo-list { margin: 0; padding: 0; list-style: none; }
.intro-b .ib-photo-list > li {
  padding: 0 1.5rem;
  transition: padding .5s var(--ib-ease-out-back), margin-bottom .5s var(--ib-ease-out-back);
}
@media (min-width: 768px)  { .intro-b .ib-photo-list > li { padding: 0 3rem; } }
@media (min-width: 1024px) { .intro-b .ib-photo-list > li { padding: 0 5rem; } }
@media (min-width: 1280px) { .intro-b .ib-photo-list > li { padding: 0 7.5rem; } }
.intro-b .ib-photo-list > li:not(:last-child) { margin-bottom: 1rem; }
@media (min-width: 1024px) { .intro-b .ib-photo-list > li:not(:last-child) { margin-bottom: 2rem; } }

/* 照片框 */
.intro-b .ib-figure { max-width: 88rem; margin: 0 auto; transition: max-width .5s var(--ib-ease-out-back); }
.intro-b .ib-photo-frame {
  width: 100%; cursor: pointer;
  /* 純靜態：自動進場 float-up、scroll 驅動的呼吸與視差皆已移除（B 退役／calm／只留點擊觸發） */
}
@media (min-width: 1024px) {
  .intro-b .ib-photo-frame { width: 65%; margin-right: auto; }
}
/* @keyframes ib-float-up-y / ib-float-up-fade 已移除（規範 P1：拔除自動進場動態） */
.intro-b .ib-slot {
  position: relative; width: 100%;
  aspect-ratio: 14 / 3;
  /* 固定 14:3；僅撐高/收合時過渡（呼吸已移除） */
  transition: aspect-ratio .6s var(--ib-ease-out-back);
}
.intro-b .ib-reveal {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(135deg, rgba(59,108,89,.07), rgba(95,140,146,.04) 50%, rgba(211,211,162,.05)), var(--ib-cream-200);
  transition: transform .5s var(--ib-ease-out-back);
}
/* hover 凸排：原「圖橫移凸排」概念恢復，幅度收斂 1.5% ＋柔和彈簧，與全站 hover 基調統一（使用者觸發，不違反自動播放❌） */
@media (min-width: 1024px) {
  .intro-b .ib-photo-frame:hover .ib-reveal { transform: translateX(1.5%); }
}
.intro-b .ib-bg { position: absolute; inset: 0; }
.intro-b .ib-bg img {
  /* 視差已移除：圖片正常填滿，無溢出位移 */
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}

/* ── 照片 credit：固定右側空白區中央，隨捲動切換（lg 顯示；窄屏照片滿寬故隱藏）── */
.intro-b .ib-credit {
  position: fixed;
  top: 50%;
  left: 81%;
  transform: translate(-50%, -50%);
  z-index: 50;
  width: auto;                        /* #3：收成一行，寬度隨內容（原 11rem 為兩行而設）*/
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  opacity: 0;                         /* 預設隱藏：只在撐高該張時顯示（credit 第二層） */
  transition: opacity .5s ease;
}
.intro-b.has-expanded.has-credit .ib-credit { opacity: 1; }
.intro-b .ib-credit__place {
  display: inline;                    /* #3：地點與攝影者同一行 */
  font-family: 'Noto Sans', 'Noto Sans TC', sans-serif;  /* 統一成後方 __name 低調樣式（同字體）*/
  font-size: .68rem;
  line-height: 1.4;
  color: var(--ib-ink-mute);          /* 與 __name 同淡色，去「前深後淡」階級 */
  letter-spacing: .12em;
}
.intro-b .ib-credit__name {
  display: inline;                    /* #3：地點與攝影者同一行 */
  font-family: 'Noto Sans', 'Noto Sans TC', sans-serif;
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--ib-ink-mute);
}
.intro-b .ib-credit__place:not(:empty) + .ib-credit__name::before {  /* 地點與攝影者之間的分隔點：地點有資料時才出現 */
  content: '·';
  margin: 0 .45em;
  color: var(--ib-ink-mute);
}
@media (max-width: 1023px) {
  /* 窄視窗：credit 移到撐高照片「下方間隙（gap）」（JS 移進 li、圖之後），不壓在照片上；
     gap 為米白底，用墨色字、右對齊照片右緣 */
  .intro-b .ib-credit {
    position: static;
    transform: none;
    width: auto;
    text-align: right;
    padding-top: 0.7rem;
    text-shadow: none;
  }
  .intro-b .ib-credit__place { color: var(--ib-ink-mute); }  /* 窄屏也統一低調，不比 __name 深 */
  .intro-b .ib-credit__name { color: var(--ib-ink-mute); }
  /* 無 credit 文案：完全移出流排（非僅透明），撐高照片前後 gap 維持一致 */
  .intro-b:not(.has-credit) .ib-credit { display: none; }
}

/* ── 點圖原地撐高（用戶要求偏離 B）：14:3 ribbon → 4:3，在直欄 flow 裡原地撐高，
     露出更多畫面、平順推開下方照片。維持米白底，無黑屏 / 無整屏接管。── */
.intro-b .ib-photo-list > li.is-expanded .ib-slot {
  aspect-ratio: 4 / 3;
  /* 撐高 / 收合用慢過渡（蓋過呼吸的短 transition） */
  transition: aspect-ratio .6s var(--ib-ease-out-back);
}

/* 照片標題暫移除（用戶 2026-05-28 要求）：
   撐高態僅露出 4:3 照片，不再渲染編號 / 攝影師 / 地點 caption。
   JS 已停止生成 .ib-caption DOM，相關 styles 一併移除，避免 dead code。
   若未來恢復 caption，PHOTOS 陣列 place / photographer 仍可消費。 */

/* ── Reduced motion fallback：關閉平滑捲動，回退原生捲動 ── */
@media (prefers-reduced-motion: reduce) {
  .intro-b { overflow: visible !important; height: auto !important; }
  .intro-b .ib-smooth-wrapper {
    position: static; overflow: visible; touch-action: auto;
  }
  .intro-b .ib-smooth-content { transform: none !important; }
  .intro-b .ib-photo-list > li { transform: none !important; }
  .intro-b .ib-slot { aspect-ratio: 14 / 3 !important; transition: none !important; }
  .intro-b .ib-photo-frame {
    opacity: 1 !important; animation: none !important;
    transition: none !important; transform: none !important;
  }
  .intro-b .ib-reveal, .intro-b .ib-bg, .intro-b .ib-figure { transition: none !important; }
  .intro-b .ib-enter,
  .intro-b .ib-enter__label::after,
  .intro-b .ib-enter__arrow { transition: none !important; }
}

/* ===== #17 軟Q圓潤化（往 B）＋ #16/#22/#25 可讀性 — 純 CSS、低負荷 =====
   原則：border-radius 為主（零成本）；陰影多層但模糊小、低 alpha（仍輕）；
   hover 只動 transform/background/box-shadow（GPU、不 reflow）。全幅 hero 維持方正。
   CTA 走「柔色圓角 hover」文字連結，不做實心按鈕（守『不強迫』）。 */
:root{
  --r: 18px;             /* 內容卡片/照片圓角（hover 綻放／觸控靜態）*/
  --r-lg: 24px;          /* 較大區塊（lightbox）*/
  --r-rest: 5px;         /* 靜止克制圓角（桌機 hover 才 spring 綻放到 --r）*/
  --soft: 0 2px 6px rgba(40,46,42,.04), 0 10px 28px rgba(40,46,42,.06);    /* 雙層柔陰影、暖綠 tint、低負荷 */
  --soft-hover: 0 4px 10px rgba(40,46,42,.06), 0 16px 36px rgba(40,46,42,.10);
  --spring: cubic-bezier(.34,1.56,.64,1);       /* Q彈 spring，呼應動態 dentbounce */
}
/* —— 面（卡片/照片）：圓角統一靜態 5px，不隨 hover 綻放（#1/#5：移除圓角擴大、桌機/手機/觸控一致）—— */
.card{
  border-radius: var(--r-rest);
  box-shadow: var(--soft);
  transition: transform .45s var(--spring), box-shadow .35s ease;
}
.card:hover{ box-shadow: var(--soft-hover); }   /* 保留浮起/陰影，移除圓角放大 */
.space-photo{ border-radius: var(--r-rest); transition: opacity .3s ease; }

/* —— 空間照（home #17 / about）：橫滾相簿 —— home（3 張）平均撐滿；about（>3 張）以數學固定「任何寬度都 3 整張 + ⅓ 第 4 張」可滑（見下方 :has 規則）。比例一律 4:3、不裁切 ——
   不用 scroll-snap：自由捲動「放開即止、滑到哪停哪」，呼應不強迫（桌機拖曳與手機觸控一致） */
.space-grid--3{
  display: flex;
  gap: 12px;
  padding: 0 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                /* 藏捲軸；以「露出右方下一張」當可滑提示 */
}
.space-grid--3::-webkit-scrollbar{ display: none; }
.space-grid--3 .space-photo{
  flex: 1 1 0;            /* ≤3 張（home）：平均撐滿 */
  min-width: 0;
  height: auto;
  aspect-ratio: 4 / 3;    /* 比例維持（原圖 1448×1086＝4:3），任何寬度都不裁切變形 */
  border-radius: var(--r-rest);
}
/* 超過 3 張（about 5 張）：用數學固定每張寬，任何視窗寬度都維持「3 張完整 + ⅓ 第 4 張」，其餘橫滾。
   推導：3p + 3×gap + p/3 = 100%  ⟹  p = 30% − 0.9×gap（gap=12px → 30% − 10.8px） */
.space-grid--3:has(.space-photo:nth-child(4)) .space-photo{
  flex: 0 0 calc(30% - 10.8px);
  min-width: 340px;        /* 單張算出來 <340px（窄視窗）就被接住，回到「每張≥340、橫滾」原規則；與 calc 取大值、交界處連續 */
}
@media (max-width: 768px){
  .space-grid--3{ padding: 0 24px; }
  /* home（3 張）手機版也固定每張寬 → 與 about 一致「露出一張大圖＋下一張」可橫滑。
     about（5 張）由上方 :has 規則固定為 340（更高 specificity），不受此影響、維持原樣。 */
  .space-grid--3 .space-photo{ flex: 0 0 340px; }
}
/* 桌機滑鼠拖曳橫滑（觸控走原生捲動，不受影響）：只有「內容真的溢出可滑」時才由 JS 掛 .is-draggable
   → home 3 張填滿不溢出＝無 grab、無拖曳；about 5 張溢出＝grab 提示可拖。拖曳中換 grabbing 並暫關 snap */
.space-grid--3.is-draggable{ cursor: grab; user-select: none; -webkit-user-select: none; }
.space-grid--3.is-dragging{ cursor: grabbing; scroll-behavior: auto; }
.two-col .photo{ border-radius: var(--r-rest); }   /* about 照片：靜態 5px，與卡片/空間照一致 */
.lb-photo{ border-radius: var(--r-rest); }          /* lightbox 焦點圖：收成未 hover 小圓角 5px */
/* #5：觸控裝置不再跳放到 18px，與桌機同為靜態 5px（電腦/手機圓角一致）*/

/* —— CTA：hover 不變色（底色＝背景色），純靠底部柔陰影「浮起」分層 —— */
/* 最大化不強迫/柔軟：無色塊高亮，只是一塊與底同色的圓角面，被柔陰影輕輕托起 */
/* #2：CTA 視覺層級提升——靜態即見柔邊膠囊（描邊非實心、字重 500），hover 再淡填＋浮起。守『不強迫』 */
.text-link{ padding: 8px 18px; border-radius: 999px;
  border: 1px solid rgba(53,85,59,.30); font-weight: 500;
  transition: color .3s ease, background-color .35s var(--ease), box-shadow .35s var(--ease), border-color .3s ease; }
.text-link::before, .text-link::after{ display: none; }
.text-link:hover{ background-color: var(--bg); border-color: rgba(53,85,59,.55); box-shadow: 0 5px 14px rgba(40,46,42,.13); }
.bg-warm .text-link:hover{ background-color: var(--bg-warm); }   /* news 區同其底色 */
.text-link-light{ margin-left: -16px; }
.text-link-light:hover{ background-color: var(--green); box-shadow: 0 5px 14px rgba(0,0,0,.22); }

/* —— 可讀性（#16：閱讀文字放大到舒適；標籤維持小但清楚、不加粗。改用 rem 隨裝置/瀏覽器字級縮放）——
   分層靠字級＋字距＋色階（品牌方法），非字重。rem 基準＝根 16px。 */
.body-text{ font-size: 1rem; }                                  /* 15→16px 內文舒適閱讀 */
.info-val{ font-size: 1rem; }                                   /* 15→16px 資訊值同內文 */
.card-title{ font-size: 1.0625rem; }                            /* 15→17px 標題略大一階 */
.section-tag{ font-size: .6875rem; color: var(--text-mid); font-weight: 400; }   /* 11px #22 小標，不加粗 */
.info-label{ font-size: .75rem; color: var(--text-mid); }       /* 12px */
.card-date{ font-size: .75rem; color: var(--text-mid); }        /* 12px */
.footer-label{ font-size: .6875rem; color: rgba(255,255,255,.7); }  /* 11px #25：≈AA，看得清 */

/* —— 標題＋右側 CTA：CTA 文字壓回與主標題同一條水平基線（補償膠囊上下 padding 把字頂高）—— */
.sec-head-row{ display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:40px; }
.sec-head-row > * { margin-top:0; }
.sec-head-row .text-link{ margin-bottom:-8px; }   /* 抵銷膠囊下 8px padding，CTA 字落在標題基線 */

/* —— intro 圓角同步 home：靜態 5px、不隨 hover 綻放（#1 全站移除圓角擴大；保留撐高動態）—— */
.intro-b .ib-reveal{ border-radius: var(--r-rest);
  transition: transform .5s var(--ib-ease-out-back); }

/* —— 全站 reduced-motion 保護（補上：原 @media 只管 .intro-b，未涵蓋 home 新增的卡片 spring/CTA/hover）——
   對動態敏感/焦慮族群（身心診所）友善；既有 .intro-b 結構性 reduced-motion 區塊保留，這裡再加全站動畫/過渡關閉。 */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* —— #17 尾巴：提案頁可見的小控制圓潤一致（用「圓」收齊，與面的軟語言一致）—— */
.space-photo-expand{ border-radius: 50%; }   /* ⊕ 展開徽章：2px 方角 → 圓 */
.lb-prev, .lb-next{ border-radius: 50%; }     /* lightbox 翻頁鈕：方框 → 圓 */
.lb-content{ border-radius: var(--r-rest); }  /* lightbox：收成未 hover 小圓角 5px（陰影隨之）*/

/* 手機 lightbox（解法 B）：圖放大 ~92vw、翻頁鈕移到圖片下方一排置中 */
@media (max-width: 768px){
  .lightbox{ flex-wrap: wrap; align-content: center; gap: 20px 96px; }  /* 欄距 28→96px：兩箭頭左右拉開，騰出中間放張數 */
  .lb-content{ order: 0; flex-shrink: 0; width: min(92vw, calc(85vh * 4 / 3)); }
  .lb-prev{ order: 1; }   /* 放不下 92vw 旁邊 → 自動換到下一列 */
  .lb-next{ order: 2; }   /* 與 prev 同列、justify-content:center 置中成一排 */
  /* 張數從「照片下緣置中」下移到與箭頭同一橫列、置於兩箭頭正中。
     count 絕對置中於 lb-content(92vw 置中)＝畫面中央＝箭頭對的中點。
     垂直對齊：行框與箭頭列同起點(margin-top=列距20)＋同高(48)，文字在 48px 行框內置中 → 必落在箭頭中線，不靠字體度量猜值。 */
  .lb-count{ margin-top: 20px; height: 48px; line-height: 48px; }
}

/* —— #19/E intro 手機版頂部工具列底色：下滑時淡入「上100%→下0% 漸層」（工具列區清楚、下緣柔淡出無硬線；僅 ≤767）—— */
.intro-b .ib-topbar{
  position: fixed; top: 0; left: 0; right: 0;
  height: calc(6rem + env(safe-area-inset-top));        /* 含 iOS 狀態列安全區，底色延伸進系統列 */
  z-index: 50; pointer-events: none; display: none;     /* 在 logo/enter(z60) 之下 */
  background: linear-gradient(to bottom, #F7F4EC 78%, transparent);  /* 米白實心區→下緣柔化漸層 */
  opacity: 0; transition: opacity .35s var(--ease);                 /* 捲到頂淡出→第一張照片滿版不被蓋；捲動 .is-scrolled 才淡入（狀態列另由 .ios-statusbar-fill 顧）*/
}
@media (max-width: 767px){
  .intro-b .ib-topbar{ display: block; }
  .intro-b .ib-topbar.is-scrolled{ opacity: 1; }
}

/* —— #20 相片 credit：跟隨撐高照片、貼其「右下外側 20px」、文字齊左、字收小低調（桌機）—— */
.intro-b .ib-credit__place{ font-size: .64rem; }   /* 與 __name 同字級，統一低調 */
.intro-b .ib-credit__name{ font-size: .64rem; }
.intro-b.has-expanded.has-credit .ib-credit{ opacity: .85; }
@media (min-width: 1024px){
  .intro-b .ib-photo-frame{ position: relative; }          /* credit 錨點（維持 65% 寬左對齊、右側留白）*/
  .intro-b .ib-photo-frame > .ib-credit{
    position: absolute; left: 100%; bottom: 0; margin-left: 20px;  /* 照片右緣外 20px、貼齊底 */
    top: auto; right: auto; transform: none;
    width: 11rem; text-align: left;                         /* 齊左 */
    transition: left .5s var(--ib-ease-out-back), opacity .5s ease; /* 與照片 hover 同步、同 easing */
  }
  /* hover：照片 .ib-reveal 右移 1.5% 框寬，credit 同步右移等量（left 100%→101.5%＝+1.5% 框寬）*/
  .intro-b .ib-photo-frame:hover > .ib-credit{ left: 101.5%; }
}

/* —— #21 intro 項次15：第一張照片上緣＝工具列上緣（齊平）＋工具列下降(加高上方空間)＋相片往右延伸 —— */
@media (min-width: 1024px){
  .intro-b .ib-logo{ top: 2.5rem; }          /* 工具列下降、加高螢幕頂邊→工具列的空間（1.5→2.5rem）*/
  .intro-b .ib-enter{ top: 2.5rem; }
  .intro-b .ib-main{ padding-top: 2.5rem; }  /* 第一張上緣對齊工具列上緣（同 2.5rem 同一條線）*/
  .intro-b .ib-photo-frame{ width: 72%; }    /* 顯示範圍往右延伸（65%→72%）*/
  .intro-b .ib-photo-list > li:not(:last-child){ margin-bottom: 1.5rem; }  /* B：照片串聚攏（2rem→1.5rem，集中視覺）*/
}
