/*
Theme Name: 謝炳賢醫師網站
Theme URI: https://github.com/gingerdesigndev/wp-theme-starter-kit
Author: 野薑設計
Description: 野薑設計的 WordPress 自刻主題起案包。古典 PHP 模板 + ACF，不使用 Gutenberg。用 起案.sh 改名後開始開發。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: neuro-guardian-theme
*/

/* ══════════════════════════════════════════════════════════
   §1 Tokens
   ⚠️ 顏色是中性佔位值，起案後**必須**換成客戶品牌色，並同步更新
      design-system.md。不要在任何 CSS 或 PHP 裡硬編色碼——
      那是之後全站改色時的地獄。
   ══════════════════════════════════════════════════════════ */
:root {
  /* 顏色：2026-11-04 依 Figma「PHP架站 全站色彩＆字型設定」（node 4778-1110）定稿。
     左邊註解是 Figma 變數名，兩邊要一直對得上；對應表見 design-system.md。 */
  --color-main:    #14426A; /* color/main        主色 */
  --color-accent:  #E638A4; /* color/accent      強調色、CTA、連結 */
  --color-text:    #3E3E3E; /* color/text        主文字（標題、內文） */
  --color-muted:   #6D7078; /* color/text-muted  次要文字（摘要、日期、說明） */
  --color-bg:      #FFFFFF; /* color/bg          主背景（頁面底） */
  --color-bg-alt:  #F3F5F7; /* color/bg-alt      次背景（footer、區塊底、卡片底） */
  --color-line:    #3D6D97; /* color/line        框線、分隔線 */

  /* 專案專用色（超出起案包 7 色的部分，同樣只能透過 token 引用） */
  --color-accent-hover:     #BA0F79; /* color/link-hover、color/btn-hover  連結與按鈕 hover */
  --color-brand-main-dark:  #11283B; /* color/brand-main-dark  區塊標題、深色區塊底 */
  --color-brand-sub:        #816FC1; /* color/brand-sub        卡片、標籤、圖表、次要按鈕 */
  --color-brand-sub-light:  #EFECF7; /* color/brand-sub-light  用途待設計端填 */
  --color-brand-decorate:   #F6E4EF; /* color/brand-decorate   點綴淺調 */
  --color-brand-card-base:  #8DA9C4; /* color/brand-card-base  卡片背景、影像灰底 */
  --color-selection-bg:     #6D7078; /* color/selection-bg     文字選取反白底 */
  --color-selection-text:   #FFFFFF; /* color/selection-text   文字選取反白字 */
  --color-clinic-3:         #133553; /* 門診資訊院所卡片排序 3 底色（使用者 2026-11-05 指定，Figma 色盤沒有） */
  --color-clinic-4:         #517697; /* 門診資訊院所卡片排序 4 底色（同上） */

  /* 間距（8 倍數查表，全專案通用，不要改） */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
  --space-6: 24px;  --space-8: 32px;  --space-12: 48px; --space-16: 64px;
  --space-20: 80px; --space-24: 96px;

  /* 版面：2026-11-04 依 Figma「Frame 版面」（node 4881-4481）定稿。
     桌機畫布 1440，頁面開版 1200，文章內頁正文（不含側欄）760；--gutter 維持出廠常數。 */
  --container: 1200px;   /* 內容開版上限（桌機頁面開版） */
  --measure:   760px;    /* 長文行寬上限（文章內容寬度） */
  --gutter:    20px;     /* 全站常數，不隨斷點變 */

  /* 首頁區塊之間的垂直間距：設計稿首頁（4276:10882）各區塊上下距逐一量過都是 160
     （620→780、1417→1577、2186→2346、2965→3125），偏離起案包預設 96，依據記在 design-system.md。
     手機不需要 160 那麼空：隨視窗縮，最小 80（11.1vw 在 1440 剛好 160）。 */
  --section-gap: clamp(80px, 11.1vw, 160px);

  /* 字體：Figma 定稿 Noto Sans TC（標題與內文）、Noto Serif（襯線）。
     載入：functions.php 以 Google Fonts 載 Noto Sans TC 400/500/700（2026-11-04 比照蕙林）；
     襯線字族用途未定，定了再加進同一個 enqueue。 */
  --font-sans:  "Noto Sans TC", system-ui, -apple-system, "PingFang TC", sans-serif;
  --font-serif: "Noto Serif", "Noto Serif TC", Georgia, serif;

  /* 圓角：頁首 CTA 與下拉選單共用（Figma 4140:906 圓角 5） */
  --radius: 5px;

  /* 字級：野薑全專案通用標準，來源 ~/.claude/skills/typography-scale/SKILL.md
     ⚠️ 這一組**不要**每站重訂。rem 以根字級 16px 為準；字距用 em 會隨字級縮放。
     標題群（H1–H6）一律 Bold（700）、字距 10%；內文群（p、small）一律 regular（400）、字距 5%。 */
  --fs-h1: 2.25rem;     /* 36px */
  --fs-h2: 1.75rem;     /* 28px */
  --fs-h3: 1.375rem;    /* 22px */
  --fs-h4: 1.25rem;     /* 20px */
  --fs-h5: 1.125rem;    /* 18px */
  --fs-h6: 1rem;        /* 16px */
  --fs-p:  1rem;        /* 16px，內文 */
  --fs-small: 0.875rem; /* 14px */

  --fw-bold:    700; /* 標題群 */
  --fw-regular: 400; /* 內文群 */
  --fw-medium:  500; /* 例外：只給導覽列與 CTA 按鈕用（Figma 頁首定稿 Medium，2026-11-04 設計端裁定接受），不進字級表 */

  --lh-h1: 1.3;
  --lh-h2: 1.3;
  --lh-h3: 1.3;
  --lh-h4: 1.5;
  --lh-h5: 1.5;
  --lh-h6: 1.85;
  --lh-p:  2.0;
  --lh-small: 1.85;

  --ls-heading: 0.1em;  /* 標題群字距 10% */
  --ls-body:    0.05em; /* 內文群字距 5% */
}

/* ══════════════════════════════════════════════════════════
   §2 版面公式（全站唯一真相源）

   內容開版：width: min(var(--container), 100% - var(--gutter) * 2);
   文章寬度：width: min(var(--measure),   100% - var(--gutter) * 2);

   硬規則（違反會讓版面出現兩個互相打架的定義）：
   1. 文字框不得超出開版寬，手機端不可貼齊螢幕邊緣。
   2. 滿版元素用 100vw 跳出容器是允許的，但其內部文字必須回到開版寬。
   3. 不要用 padding-inline 造留白——留白由 --gutter 經公式產生。
   4. 區塊要收窄就覆寫 --container，不要另寫 max-width。
      例：.ng-post-cards{ --container: 1040px; }
   5. 不要為了排版反應去開新斷點——欄數變化用 auto-fit / minmax() 自己降欄。
   ══════════════════════════════════════════════════════════ */
.ng-wrap {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}
.ng-measure {
  width: min(var(--measure), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* ══════════════════════════════════════════════════════════
   §3 全站基礎
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-p);
  line-height: var(--lh-p);
  letter-spacing: var(--ls-body);
  color: var(--color-text);
  background: var(--color-bg);
}
img { max-width: 100%; height: auto; }
a { color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-heading);
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); }
h5 { font-size: var(--fs-h5); line-height: var(--lh-h5); }
h6 { font-size: var(--fs-h6); line-height: var(--lh-h6); }

p {
  font-size: var(--fs-p);
  font-weight: var(--fw-regular);
  line-height: var(--lh-p);
  letter-spacing: var(--ls-body);
  margin: 0 0 var(--space-4);
}
small {
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  line-height: var(--lh-small);
  letter-spacing: var(--ls-body);
}

/* 防止滿版 100vw 元素產生水平捲動 */
.site-main { overflow-x: clip; }
/* 首頁最後一塊與頁尾之間也空 --section-gap（使用者 2026-11-06：首頁最底部要 160）。
   加在 main 上而不是最後一塊：最後一塊沒資料整區不輸出時，間距照樣在 */
body.home .site-main { padding-bottom: var(--section-gap); }

/* 只給螢幕閱讀器的文字（表單 label、icon 按鈕的說明） */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ══════════════════════════════════════════════════════════
   §4 元件
   新增元件請同步寫進 design-system.md（硬性規則，見 docs/03）
   ══════════════════════════════════════════════════════════ */
/* ── 頁首（Figma 桌機 4140:973、平板 2544:176、手機 2544:197；2026-11-04）──
   結構：.site-header（滿版白底、底線 2px）> .site-header__inner.ng-wrap（開版公式）>
         Logo ｜ 主選單（靠右）｜ 放大鏡 ｜ CTA ｜ 漢堡（≤1180 才出現）
         + .site-search-bar（absolute 貼 header 下緣的下拉搜尋列，三個寬度共用）
         + .site-drawer（header.php 裡 header 之後的手機抽屜，重用同一份主選單）
   高度：設計稿桌機 72（含底線 2）、平板與手機 75；統一取 72，差 3px 不另開例外。
   不吸頂（2026-11-04 設計端裁定）。
   選單 7 項 + 放大鏡 + CTA 在 1440 量得 1105px，加最小間距後 ≤1180 塞不下 → 收成漢堡，
   登記在 §5。≤480 依手機稿縮 Logo 與 CTA。 */
.site-header {
  position: relative;            /* 下拉搜尋列與子選單的定位基準 */
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-bg-alt);
  z-index: 60;                   /* 高於頁面內容，讓子選單與搜尋列蓋得過去 */
}
.site-header__inner {
  display: flex; align-items: center;
  gap: 15px;                     /* 設計稿群組間距 15 */
  height: 70px;                  /* 72 − 底線 2 */
}
.site-logo { display: flex; align-items: center; flex-shrink: 0; margin-right: auto; }
.site-logo img { display: block; height: 50px; width: auto; }   /* 設計稿 130×50.6 */

/* 主選單（桌機橫列） */
.site-nav { display: flex; }
.site-menu { display: flex; align-items: center; gap: 10px; list-style: none; margin: 0; padding: 0; }
.site-menu li { position: relative; }
.site-menu a {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px;             /* 設計稿 Frame 24–30 的內距 */
  font-weight: var(--fw-medium);
  font-size: var(--fs-p);
  line-height: 1;
  letter-spacing: var(--ls-body); /* 0.8px ≈ 0.05em */
  color: var(--color-main);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease-out;
}
.site-menu a:hover,
.site-menu .current-menu-item > a,
.site-menu .current-menu-ancestor > a { color: var(--color-accent); }
/* 有子選單的項目：向下箭頭（設計稿 FA chevron 12px，改 CSS 畫，顏色跟文字走） */
.site-menu .menu-item-has-children > a::after {
  content: ""; width: 6px; height: 6px; margin-left: 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
/* 下拉子選單：設計稿未畫展開狀態（2026-11-04 裁定比照蕙林，用既有 token 組） */
.site-menu ul.sub-menu {
  position: absolute; top: 100%; left: 0; z-index: 50;
  display: none; flex-direction: column; min-width: max-content;
  margin: 0; padding: var(--space-2) 0; list-style: none;
  background: var(--color-bg);
  border: 1px solid var(--color-bg-alt); border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}
/* 打開子選單的三條路：
   - :hover 只在有滑鼠游標的裝置生效。觸控裝置不能讓 :hover 改變顯示，否則 iOS Safari 會把
     第一下點擊當成 hover、不送 click，再加上 JS 的「第一下只展開」就變成要點三下才跳頁
     （審查 2026-11-04 指出）。
   - :focus-within 給鍵盤 Tab。
   - .is-open 給觸控裝置的第一下點擊（functions.php ng-header）。 */
@media (hover: hover) {
  .site-menu li:hover > ul.sub-menu { display: flex; }
}
.site-menu li:focus-within > ul.sub-menu,
.site-menu li.is-open > ul.sub-menu { display: flex; }
/* Esc 關閉後的強制收合：焦點會回到母項目，:focus-within／:hover 仍成立，要靠這條蓋過去。
   特異性與上面三條相同，靠排在後面勝出；焦點或滑鼠離開該項目時 JS 會拿掉 .is-dismissed。 */
.site-menu li.is-dismissed > ul.sub-menu { display: none; }
.site-menu ul.sub-menu a { padding: 8px 20px; color: var(--color-text); }
.site-menu ul.sub-menu a:hover { color: var(--color-accent); }

/* 放大鏡：icon 20px、強調色（設計稿 4140:904 的 frame 是 29×29）。
   觸控範圍做到 44×44，左右各用 −7.5px 抵掉多出來的 15px，版面佔位仍是 29、畫面位置不變
   （審查 2026-11-04 第 4 項）。320 寬時左右鄰居各只剩 0.5px 縫，不重疊。 */
.site-search-toggle {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; margin-inline: -7.5px;
  padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--color-accent); cursor: pointer;
  transition: color .2s ease-out;
}
.site-search-toggle:hover,
.site-search-toggle[aria-expanded="true"] { color: var(--color-accent-hover); }
.site-search-toggle svg { width: 20px; height: 20px; }

/* 下拉搜尋列：貼 header 下緣、滿版白底；表單走文章寬度公式 */
.site-search-bar {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 55;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-bg-alt);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
  padding-block: var(--space-4);
}
.site-search-bar[hidden] { display: none; }
.site-search-bar__form {
  display: flex; gap: var(--space-2);
  width: min(var(--measure), 100% - var(--gutter) * 2);
  margin-inline: auto;
}
.site-search-bar__form input[type="search"] {
  flex: 1; min-width: 0;
  padding: 10px 16px;
  font: inherit; color: var(--color-text);
  border: 1px solid var(--color-line); border-radius: var(--radius);
  background: var(--color-bg);
}
.site-search-bar__form input[type="search"]:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.site-search-bar__form button {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; padding: 0; border: 0; border-radius: var(--radius);
  background: var(--color-accent); color: var(--color-bg); cursor: pointer;
}
.site-search-bar__form button svg { width: 20px; height: 20px; }

/* 主要按鈕（2026-11-05 從頁首 CTA 抽出，頁首 .site-cta 與頁尾 .site-footer__cta-btn 共用）：
   強調色底、白字、--radius、內距 10×20、箭頭用 ::after 畫（後台改字不會弄丟）；
   hover 換 --color-accent-hover＋上移 2px＋陰影，active 回原位（design-system.md「互動規格」）。
   字級、字重、字距、箭頭間距由各自的 class 決定。之後新增主要按鈕直接加這個 class，不要再複製一份。 */
.ng-btn-primary {
  display: inline-flex; align-items: center;
  padding: 10px 20px;
  background: var(--color-accent); color: var(--color-bg);
  border-radius: var(--radius);
  text-decoration: none; white-space: nowrap;
  transition: background .2s ease-out, transform .2s ease-out, box-shadow .2s ease-out;
}
.ng-btn-primary::after { content: "→"; }
.ng-btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--color-accent) 28%, transparent);
}
.ng-btn-primary:active { transform: none; box-shadow: none; }
/* 大尺寸：18 Medium、內距 15×20（Figma 按鈕元件 4158:1160；首頁醫師簡介、四大特色共用，2026-11-05 晉升） */
.ng-btn-primary--lg {
  gap: 6px; padding: 15px 20px;
  font-weight: var(--fw-medium); font-size: var(--fs-h5); line-height: 1;
  letter-spacing: var(--ls-body);
}

/* 頁首 CTA「我要掛號 →」（設計稿 4140:906）：外觀走 .ng-btn-primary，這裡只管字與排版 */
.site-cta {
  gap: 6px; flex-shrink: 0;
  font-weight: var(--fw-medium); font-size: var(--fs-p); line-height: 1;
  letter-spacing: var(--ls-body);
}

/* 漢堡：CSS 畫三條線，開啟時變 ×；桌機不顯示。
   設計稿 bars-solid（Font Awesome，2544:195）向量實測：線粗 2.625、中心距 6.5625、整組高 15.75
   （外框 18×21 含 FA 圖示上下留白，不能照外框撐）。
   但小數值會讓線落在半個像素上、被反鋸齒畫成半透明，看起來粗細不一（使用者 2026-11-04 指出第三條變細），
   所以取整數：線粗 3、中心距 7、線間空白 4（稿 3.94）、整組高 17。
   中間那條要落在整數像素：header 內高 70、按鈕 44 置中（top 13），線高 3 置中會落在 .5，
   用 .site-burger__bars 的 margin-top:1px 把它推到整數（外框 4 置中 → top 20 → 線在 21）。 */
.site-burger {
  --bar-gap: 7px;
  display: none; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; margin-right: -13px;   /* 觸控區 44，圖示右緣仍切齊開版（44−18）/2 */
  padding: 0; border: 0; background: none; cursor: pointer;
}
.site-burger__bars,
.site-burger__bars::before,
.site-burger__bars::after {
  display: block; width: 18px; height: 3px; border-radius: 1.5px;
  background: var(--color-accent);
  transition: transform .25s ease-out, background .2s ease-out;
}
.site-burger__bars { position: relative; margin-top: 1px; }   /* 對齊整數像素，見上方註解 */
.site-burger__bars::before,
.site-burger__bars::after { content: ""; position: absolute; left: 0; }
.site-burger__bars::before { top: calc(var(--bar-gap) * -1); }
.site-burger__bars::after  { top: var(--bar-gap); }
.site-burger[aria-expanded="true"] .site-burger__bars { background: transparent; }
.site-burger[aria-expanded="true"] .site-burger__bars::before { transform: translateY(var(--bar-gap)) rotate(45deg); }
.site-burger[aria-expanded="true"] .site-burger__bars::after  { transform: translateY(calc(var(--bar-gap) * -1)) rotate(-45deg); }

/* 手機抽屜：固定在 header 下緣到視窗底（top 由 JS 在開啟當下量 header 實際下緣）。
   設計稿未畫展開狀態（2026-11-04 裁定比照蕙林，用既有 token 組）。 */
.site-drawer {
  position: fixed; inset: 72px 0 0 0; z-index: 40;
  overflow-y: auto;
  background: var(--color-bg);
  padding: var(--space-2) var(--gutter) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
}
.site-drawer[hidden] { display: none; }
.site-drawer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.site-drawer__menu li { border-bottom: 1px solid var(--color-bg-alt); }
.site-drawer__menu a {
  display: block; padding: 14px 0;
  font-weight: var(--fw-medium); font-size: var(--fs-p); letter-spacing: var(--ls-body);
  color: var(--color-main); text-decoration: none;
}
.site-drawer__menu .current-menu-item > a { color: var(--color-accent); }
.site-drawer__menu ul.sub-menu { list-style: none; margin: 0; padding: 0 0 8px 16px; }
.site-drawer__menu ul.sub-menu li { border-bottom: 0; }
.site-drawer__menu ul.sub-menu a { padding: 8px 0; font-weight: var(--fw-regular); font-size: var(--fs-small); color: var(--color-text); }
body.has-drawer-open { overflow: hidden; }   /* 抽屜開著時鎖背景捲動 */

/* ── 頁尾（Figma 桌機 4238:8029、平板 2545:142、手機 4584:5887；2026-11-05）──
   結構：.site-footer >
         .site-footer__cta（滿版掛號橫幅，高 200）
         .site-footer__main > .site-footer__inner.ng-wrap（Logo ｜ 院所 ｜ 選單）
         .site-footer__bottom > .ng-wrap（灰底：法規聲明＋SEO 關鍵字）
   開版：內層一律走 .ng-wrap 公式，這裡不再套寬度（公式只能有一個施加點，見 §2）。
   平板（≤1180）、手機（≤759）的排法登記在 §5。 */
.site-footer { background: var(--color-bg); }

/* 1. 掛號橫幅：底圖是 Figma 三層合成後的一張圖，cover 置中；圖沒載到時還有主色底 */
.site-footer__cta {
  display: flex; align-items: center; justify-content: center;
  height: 200px;
  background: var(--color-main) url("assets/img/footer-cta-bg.webp") center / cover no-repeat;
}
/* 外觀與 hover 走 .ng-btn-primary（與頁首 CTA 同一份），這裡只管字 */
.site-footer__cta-btn {
  gap: .3em;
  font-weight: var(--fw-bold); font-size: 1.5rem; line-height: 1.5;   /* 24px，字級表例外（照稿，使用者 2026-11-05 裁定），見 design-system.md */
  letter-spacing: var(--ls-heading);
}

/* 2. 主區：桌機三欄 space-between，選單右側空 120（設計稿選單右緣在 1200，開版右緣 1320） */
.site-footer__main { padding-block: var(--space-20) var(--space-24); }   /* 稿：上 83、下約 106 */
.site-footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-8);
}
.site-footer__logo { display: block; flex-shrink: 0; }
.site-footer__logo img { display: block; height: 78px; width: auto; }   /* 設計稿 200×77.84 */

.site-footer__clinics { display: flex; flex-direction: column; gap: 36px; }   /* 稿：兩院所間距 36 */
.site-footer__clinic { display: flex; flex-direction: column; gap: 6px; }   /* 稿 10，但稿的行高是 100%；行高加大後縮段距，總高相近 */
.site-footer__clinic p {
  margin: 0;
  font-size: var(--fs-small); line-height: 1.4;
  letter-spacing: var(--ls-heading);   /* 稿 1.4px = 0.1em */
  color: var(--color-text);
}
.site-footer__clinic .site-footer__clinic-name {
  font-family: var(--font-serif); font-weight: var(--fw-bold);
  font-size: var(--fs-h4); line-height: 1.3;   /* 稿 20 Bold，平板／手機 16（§5） */
  word-break: keep-all; overflow-wrap: anywhere;   /* 窄寬時從空白處斷（「…附設醫院／蘭陽院區」），塞不下才硬斷 */
  color: var(--color-brand-main-dark);
}
.site-footer__clinic a { color: inherit; text-decoration: none; }
.site-footer__clinic a:hover { color: var(--color-accent-hover); }

.site-footer__nav { flex-shrink: 0; margin-inline-end: 120px; }
.site-footer__menu {
  display: grid;
  grid-template-rows: repeat(4, auto);   /* 每欄 4 項，滿了往右開一欄 */
  grid-auto-flow: column;
  grid-auto-columns: minmax(87px, max-content);   /* 稿：欄寬 87 */
  gap: 20px 30px;
  margin: 0; padding: 0; list-style: none;
}
.site-footer__menu a {
  display: block;
  font-size: var(--fs-p); line-height: 1;
  letter-spacing: var(--ls-heading);   /* 稿 1.6px = 0.1em */
  color: var(--color-main); text-decoration: none; white-space: nowrap;
}
.site-footer__menu .current-menu-item > a,
.site-footer__menu a:hover { color: var(--color-accent); }

/* 3. 灰底：法規聲明＋SEO 關鍵字（12px 是字級表例外，見 design-system.md） */
.site-footer__bottom {
  padding-block: 30px;
  background: var(--color-bg-alt);
  font-size: 0.75rem;   /* 12px */
  letter-spacing: var(--ls-heading);   /* 稿 1.2px = 0.1em */
  color: var(--color-brand-main-dark);
}
.site-footer__legal { max-width: 857px; }   /* 稿：桌機聲明寬 857。任何寬度都以 857 為上限，開版窄於 857 時才滿版；下方關鍵字列不受限 */
.site-footer__legal p { margin: 0; font-size: inherit; line-height: var(--lh-small); letter-spacing: inherit; color: inherit; }
.site-footer__keywords {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 10px 0 0; padding: 0; list-style: none;
  line-height: 21px;
}
.site-footer__keywords a { color: inherit; text-decoration: underline; text-underline-position: from-font; }
.site-footer__keywords a:hover { color: var(--color-accent-hover); }

/* ── 首頁第 2 塊：醫師簡介（template-parts/section-home-about.php；Figma 4389:1545；2026-11-05）──
   照片 423×620 壓在灰底帶上，灰底帶上下各內縮 28（照片凸出）；文字欄從 664 起、寬 656、上下 60 內距。
   ≤1180 照片縮成 360、間距 48；≤759 單欄（§5）。 */
.ng-home-about { position: relative; margin-top: var(--section-gap); }
.ng-home-about::before {
  content: ""; position: absolute; inset: 28px 0;
  background: var(--color-bg-alt);
}
.ng-home-about__inner {
  position: relative;   /* 疊在灰底帶上面 */
  display: grid; grid-template-columns: 423px minmax(0, 1fr);
  column-gap: 120px; align-items: center;
}
.ng-home-about__photo {
  position: relative; aspect-ratio: 423 / 620;
  border-radius: var(--radius); overflow: hidden;
}
.ng-home-about__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom;   /* 稿：object-bottom */
}
/* 手寫簽名：稿上 119×60、旋轉 9.26°，外框左上 (242, 427)；換成相對照片的百分比，照片縮放時跟著縮 */
.ng-home-about__sign {
  position: absolute; left: 58.2%; top: 70.3%; width: 28.1%; height: auto;
  transform: rotate(9.26deg);
}
.ng-home-about__text {
  display: flex; flex-direction: column; gap: 30px;
  padding-block: 88px;   /* 灰底帶內縮 28 ＋ 稿的內距 60 */
}
.ng-home-about__text p { margin: 0; }
.ng-home-about__title {
  margin: 0;
  font-family: var(--font-serif); font-weight: var(--fw-bold);
  font-size: 2rem; line-height: 1; letter-spacing: .2em;   /* 32px，字級表例外；稿行高 100%（一行標題），平板以下會換行時改 1.3（§5） */
  color: var(--color-brand-main-dark);
}
.ng-home-about__lead p {
  font-family: var(--font-serif); font-weight: var(--fw-bold);
  font-size: 1.5rem; line-height: 1.5; letter-spacing: .2em;   /* 24px，字級表例外 */
  color: var(--color-brand-main-dark);
}
.ng-home-about__body p {
  font-weight: var(--fw-medium);   /* 稿是 Medium，字重例外 */
  font-size: var(--fs-h5); line-height: 1.25; letter-spacing: .1em;   /* 18px */
  color: var(--color-main);
}
.ng-home-about__body p + p { margin-top: 1.25em; }   /* 稿上段與段之間空一行 */
/* 窄欄時減少段落最後一行只剩一兩個字（審查 2fd4150 建議 a）；不支援的瀏覽器直接忽略 */
.ng-home-about__lead p, .ng-home-about__body p { text-wrap: pretty; }
.ng-home-about__cta { align-self: flex-end; margin-top: 20px; }   /* 稿：按鈕外框 pt 20，靠右；外觀走 .ng-btn-primary--lg */

/* ── 共用：區塊標題（template-parts/section-title.php；Figma 元件「文章標題」；2026-11-05）──
   英文小標＋H2，H2 兩側：最外 100px 漸淡 → 實線 → 圓點（20px 細圈＋中心 8px 強調色點帶光暈）。
   顏色全走 currentColor：預設深色字，深底區塊加 --on-dark。寬上限 846（稿）。 */
.ng-section-title {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: min(846px, 100%); margin-inline: auto;
  color: var(--color-main);   /* 淺底版：標題、線、圓圈都是主色（Figma 4163:1256） */
}
.ng-section-title--on-dark { color: var(--color-bg); }
.ng-section-title__eyebrow {
  margin: 0; color: var(--color-accent);   /* 淺底版小標是強調色；深底版跟著變白（下一條） */
  font-family: var(--font-serif); font-weight: var(--fw-bold);
  font-size: var(--fs-p); line-height: 1; letter-spacing: .2em;   /* 稿 16、字距 3.2px */
}
.ng-section-title--on-dark .ng-section-title__eyebrow { color: inherit; }
.ng-section-title__row { display: flex; align-items: center; gap: 20px; width: 100%; }
.ng-section-title__text {
  margin: 0; flex: none;
  font-family: var(--font-serif); font-weight: var(--fw-bold);
  font-size: var(--fs-h2); line-height: 1; letter-spacing: .2em;   /* 稿 28、字距 5.6px */
  color: inherit; white-space: nowrap;
}
.ng-section-title__br { display: none; }   /* 只在手機換行（§5 打開） */
/* 左線（圓點在右端靠標題）；右線用 scaleX(-1) 鏡像 */
.ng-section-title__line {
  position: relative; flex: 1 1 0; min-width: 0; height: 20px;
  background: linear-gradient(to right, transparent, currentColor 100px) left center / calc(100% - 20px) 1px no-repeat;
}
.ng-section-title__line--end { transform: scaleX(-1); }
.ng-section-title__line::after {   /* 細圓圈 */
  content: ""; position: absolute; right: 0; top: 0;
  width: 20px; height: 20px; box-sizing: border-box;
  border: .5px solid currentColor; border-radius: 50%;
}
.ng-section-title__line::before {   /* 中心強調色點＋光暈（稿：模糊 10、--color-brand-decorate） */
  content: ""; position: absolute; right: 6px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 10px var(--color-brand-decorate);
}

/* ── 首頁第 3 塊：回診時的笑容（template-parts/section-home-moments.php；Figma 4239:8114；2026-11-05）──
   深藍底圖滿版、上下 80（2026-11-17 起箭頭搬到頁碼兩側，開版回到預設 1200）。
   一次 3 張 387×273、間距 20；下方 60 是頁碼列「‹ 3 / 20 ›」。≤1180 兩張、≤759 一張、照片撐滿開版（§5）。 */
.ng-home-moments {
  margin-top: var(--section-gap); padding-block: 80px;
  background: var(--color-main) url("assets/img/moments-bg.webp") center / cover no-repeat;
  color: var(--color-bg);
}
/* ── 首頁第 7 塊：寫給謝醫師的話（template-parts/section-home-letters.php；Figma 4449:4055；2026-11-05）──
   淺灰底滿版、上 80／下 100，照片輪播用共用 .ng-gallery（頁碼與箭頭主色）。 */
.ng-home-letters {
  margin-top: var(--section-gap); padding-block: 80px 100px;
  background: var(--color-bg-alt); color: var(--color-main);
}

/* ── 共用：照片輪播 .ng-gallery（template-parts/gallery-carousel.php；醫病合照、感謝小卡共用，2026-11-05 晉升）──
   照片列（一次 3 張 387×273、間距 20，撐滿開版 1200），下方 60 是「‹ 3 / 20 ›」頁碼列。顏色走 currentColor（區塊決定深底白字或淺底主色）。
   2026-11-17 客戶回饋「數字看不懂意義」：圓點全改成頁碼、箭頭從照片兩側搬到頁碼兩側（使用者裁定拿掉兩側箭頭）。
   一頁放得下時 JS 藏頁碼列。≤1180 兩張、≤759 一張（§5）。 */
.ng-gallery__carousel {
  --per-view: 3;   /* ng-carousel.js 讀這個值決定一次幾張 */
  display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 80px;
}
.ng-gallery__viewport { overflow: hidden; }
.ng-gallery__track {
  display: flex; column-gap: var(--ng-gallery-gap, 20px); margin: 0; padding: 0; list-style: none;
  transition: transform .6s ease;
}
@media (prefers-reduced-motion: reduce) { .ng-gallery__track { transition: none; } }
.ng-gallery__slide {
  flex: 0 0 calc((100% - var(--ng-gallery-gap, 20px) * (var(--per-view) - 1)) / var(--per-view)); min-width: 0;
  aspect-ratio: var(--ng-gallery-ratio, 387 / 273); border-radius: var(--radius); overflow: hidden;
}
.ng-gallery__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }   /* 稿：直式照片貼上緣裁（合照的臉多在上半部） */
/* 頁碼列：‹ 3 / 20 ›。箭頭按鈕 44×44（觸控範圍），畫出來 20；稿上照片 → 頁碼 60，扣回按鈕上下多出的 10 */
.ng-gallery__pager {
  justify-self: center; display: flex; align-items: center; gap: 8px;
  margin-block: 50px -10px;
}
.ng-gallery__pager[hidden] { display: none; }   /* 照片一頁就放得下時，JS 會藏起來 */
.ng-gallery__arrow[hidden] { display: none; }   /* JS 也會個別藏箭頭；平常外層 pager 一起藏，這行是保險（審查 c22df07 建議 b） */
.ng-gallery__arrow {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; background: none;
  color: inherit; cursor: pointer; transition: color .2s ease-out;
}
.ng-gallery__arrow svg { width: 20px; height: 20px; }
.ng-gallery__arrow:hover { color: var(--color-accent); }
/* 說明小字（$args['note']，例：評論的免責聲明）：照片列下方、靠照片列右緣；12px 是法規小字例外（同頁尾） */
.ng-gallery__note {
  justify-self: end; margin: 30px 0 0;
  font-size: .75rem; line-height: 1.5; letter-spacing: .05em; color: var(--color-bg-alt);
}
.ng-gallery__note + .ng-gallery__pager { margin-top: 20px; }   /* 稿：說明下 30，扣回箭頭觸控範圍多出的 10 */
/* 頁碼文字（ng-carousel.js 產生；data-dot-max="1"＝一律頁碼）。最小寬度放得下「20 / 20」，換頁時箭頭不會左右跳 */
.ng-gallery__counter {
  display: block; min-width: 5.5em; height: 24px; text-align: center;
  font-size: var(--fs-p); line-height: 24px; letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
}

/* ── 首頁第 4 塊：精準，是為了讓你安心（template-parts/section-home-why.php；Figma 4239:8115；2026-11-05）──
   白底＋淺色點狀波紋底圖，區塊本身沒有上下內距（稿上底圖就是內容的範圍），與上下區塊都是 --section-gap。
   標題 → 四欄 → 按鈕，間距都是 80。四欄各 270、間距 40（合計 1200）。≤1180 兩欄、≤759 一欄（§5）。 */
.ng-home-why {
  margin-top: var(--section-gap);
  background: var(--color-bg) url("assets/img/why-bg.webp") center top / cover no-repeat;
}
.ng-home-why__inner { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.ng-home-why__list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 270px)); justify-content: center;
  gap: 40px; width: 100%; margin: 0; padding: 0; list-style: none;
}
.ng-home-why__item { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.ng-home-why__icon { display: block; width: 150px; height: 150px; }
img.ng-home-why__icon { object-fit: contain; }   /* 後台上傳的圖示（2026-11-17）不是正方形時不壓扁（同診療流程） */
.ng-home-why__title {
  margin: 0;
  font-family: var(--font-serif); font-weight: var(--fw-bold);
  font-size: var(--fs-h4); line-height: 1.85; letter-spacing: .1em;   /* 稿 20、字距 2px */
  color: var(--color-main); text-align: center;
}
.ng-home-why__body {
  margin: 0; padding-inline: 10px;   /* 稿：說明文字框左右各內縮 10 */
  font-size: var(--fs-p); line-height: 1.85; letter-spacing: .1em;   /* 稿 16、字距 1.6px */
  color: var(--color-text); text-align: justify;   /* 不加 text-wrap: pretty：WebKit 會把其中兩段多排一行（稿上四段都是 4 行） */
}

/* ── 首頁第 5 塊：每個數字，都是一次信任（template-parts/section-home-records.php；Figma 4239:8123；2026-11-05）──
   深色底＋脊椎影像滿版，上 120／下 180；標題 → 數字列 80；4 組間距 60、每組內距 20。
   數字 serif 48（帶強調色向下陰影）、項目 serif 24（月桂葉夾著、半透明強調色陰影）。≤1180 兩欄、≤759 一欄（§5）。 */
.ng-home-records {
  margin-top: var(--section-gap); padding-block: 120px 180px;
  background: var(--color-brand-main-dark) url("assets/img/records-bg.webp") center / cover no-repeat;
  color: var(--color-bg);
}
.ng-home-records__list {
  display: flex; justify-content: center;
  /* 稿上間距 60；四組本身約 1020 寬，開版剛超過 1180（1141）時 60 會溢出 → 隨開版縮，最少 20 */
  column-gap: clamp(20px, calc(100% - 1140px), 60px);
  margin: 80px 0 0; padding: 0; list-style: none;
}
.ng-home-records__item { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; }
.ng-home-records__num, .ng-home-records__label {
  margin: 0; font-family: var(--font-serif); font-weight: var(--fw-bold);
  line-height: 1.85; letter-spacing: .1em; white-space: nowrap; color: inherit;
}
.ng-home-records__num {
  display: flex; gap: 10px;   /* 稿：數字與「+」是兩個文字框，間距 10 */
  font-size: 3rem;   /* 48，字級表例外 */
  filter: drop-shadow(0 4px 2px var(--color-accent));
}
.ng-home-records__label {
  display: flex; align-items: flex-end; gap: 5px;
  font-size: 1.5rem;   /* 24，字級表例外 */
  filter: drop-shadow(0 4px 2px color-mix(in srgb, var(--color-accent) 50%, transparent));
}
.ng-home-records__laurel { display: block; width: 31.663px; height: 37px; }
.ng-home-records__laurel--end { transform: scaleX(-1); }   /* 右片＝左片鏡像（稿上是 rotate(-150°) scaleY(-1)，數學上相同） */

/* ── 首頁第 6 塊：主治項目（template-parts/section-home-treatments.php；Figma 4239:9619；2026-11-05）──
   左 6 張療程卡（2 欄 × 305×203、間距 20）｜間距 40｜右說明面板 530（高度跟卡片群一樣，內容多時撐高）。
   選中的卡：主色底、強調色框、淡粉陰影、圖示強調色底；未選：淺灰底、--color-line 框、圖示與字灰藍。
   ≤1180 面板移到卡片下方、卡片 3 欄；≤759 卡片 2 欄（§5）。互動 JS：assets/js/ng-tabs.js。 */
.ng-home-treat { margin-top: var(--section-gap); }
.ng-home-treat__inner { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.ng-home-treat__body { display: flex; align-items: stretch; gap: 40px; width: 100%; }
.ng-home-treat__tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 305px));
  grid-auto-rows: minmax(203px, 1fr);   /* 稿 203；說明面板比卡片群高時（最長那段 675 > 649），三列平均撐高，左右下緣對齊 */
  gap: 20px; flex: 0 1 630px;
}
.ng-home-treat__tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 10px; border: 1px solid var(--color-line); border-radius: 10px;
  background: var(--color-bg-alt); cursor: pointer;
  color: var(--color-line);   /* 名稱字色。稿是 --color-brand-card-base（#8DA9C4，在 bg-alt 上只有 2.23:1），使用者 2026-11-05 改用框線藍（5.01:1）；圖示圓底仍是 brand-card-base */
  font: inherit;
  transition: background .2s ease-out, border-color .2s ease-out, box-shadow .2s ease-out, color .2s ease-out;
}
.ng-home-treat__tab:hover { border-color: var(--color-accent); }
.ng-home-treat__tab.is-active {
  background: var(--color-main); border-color: var(--color-accent); color: var(--color-bg);
  box-shadow: 5px 5px 5px var(--color-brand-decorate);
}
.ng-home-treat__icon { display: block; width: 100px; height: 100px; }
.ng-home-treat__icon svg { display: block; width: 100%; height: 100%; }
.ng-home-treat__icon .ng-ic-bg { fill: var(--color-brand-card-base); transition: fill .2s ease-out; }
.ng-home-treat__icon .ng-ic-ring { stroke: var(--color-brand-card-base); }
.ng-home-treat__tab.is-active .ng-ic-bg { fill: var(--color-accent); }
.ng-home-treat__tab.is-active .ng-ic-ring { stroke: var(--color-brand-decorate); }
/* 後台上傳的圖示（2026-11-20）：客戶只傳白色圖案（透明背景），圓底與外圈由這裡畫，配色同主題 SVG 的 .ng-ic-bg／.ng-ic-ring */
.ng-treat-ic {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  border-radius: 50%; background: var(--color-brand-card-base);
  box-shadow: inset 0 0 0 2px var(--color-brand-card-base);
  transition: background .2s ease-out;
}
/* 圖示填滿整個圓：圖檔自己留邊（範例圖在素材資料夾「主治項目圖示」，四周約留 8%），跟主題內建 SVG 的比例一致（2026-11-20） */
.ng-treat-ic__img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ng-home-treat__tab.is-active .ng-treat-ic,
.ng-treat-card__icon .ng-treat-ic { background: var(--color-accent); box-shadow: inset 0 0 0 2px var(--color-brand-decorate); }
.ng-home-treat__name {
  font-family: var(--font-serif); font-weight: var(--fw-bold);
  font-size: var(--fs-h5); line-height: 1.85; letter-spacing: .1em; text-align: center;   /* 稿 18 */
}

/* 6 個面板疊在同一格：高度＝最長的那個，切換療程時下面的內容不會上下跳（各療程字數不同）。
   沒選的用 visibility 藏（仍不可聚焦、螢幕閱讀器讀不到，文字留在 HTML 給搜尋引擎） */
.ng-home-treat__panels { flex: 1 1 530px; min-width: 0; display: grid; }
.ng-home-treat__panel {
  grid-area: 1 / 1; display: flex; flex-direction: column; gap: 40px;
  padding: 60px; border: 1px solid var(--color-accent); border-radius: 10px;
  background: var(--color-main); color: var(--color-bg);
  filter: drop-shadow(5px 5px 2.5px var(--color-brand-decorate));
}
.ng-home-treat__panel[hidden] { display: flex; visibility: hidden; }
.ng-home-treat__panel:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
.ng-home-treat__head {
  display: flex; flex-direction: column; gap: 20px;
  padding-bottom: 40px; border-bottom: 1px solid var(--color-brand-decorate);   /* 稿：名稱下方 40 一條淡粉線，線下再 40 */
  margin-bottom: 0;
}
.ng-home-treat__title, .ng-home-treat__en {
  margin: 0; font-family: var(--font-serif); font-weight: var(--fw-bold); line-height: 1.4; letter-spacing: .1em; color: inherit;   /* 稿 1；長名稱在窄寬斷兩行時太擠（使用者 2026-11-05） */
}
.ng-home-treat__title { font-size: 1.5rem; }   /* 24，字級表例外（同頁尾 CTA） */
.ng-home-treat__en { font-size: var(--fs-small); }   /* 14 */
.ng-home-treat__text {
  margin: 0;
  font-size: var(--fs-h5); line-height: 1.85; letter-spacing: .1em; color: inherit;   /* 18（稿 20；使用者 2026-11-05 定 18，文字之後會縮短） */
  text-align: justify;
}
.ng-home-treat__text + .ng-home-treat__text { margin-top: -20px; }   /* 段距 20（面板 gap 40 扣回 20） */
/* 了解更多：淺灰底深字，尺寸同 .ng-btn-primary--lg；推到面板最下方 */
.ng-home-treat__more {
  align-self: flex-start; margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px; padding: 15px 20px;
  border-radius: var(--radius); background: var(--color-bg-alt); color: var(--color-brand-main-dark);
  font-weight: var(--fw-medium); font-size: var(--fs-h5); line-height: 1; letter-spacing: var(--ls-body);
  text-decoration: none; transition: background .2s ease-out, transform .2s ease-out;
}
.ng-home-treat__more::after { content: "→"; }
.ng-home-treat__more:hover { background: var(--color-bg); transform: translateY(-2px); }

/* ── 首頁第 8 塊：最新消息（template-parts/section-home-news.php；Figma 4208:6409；2026-11-05）──
   主色底＋神經影像（稿：影像 50% 不透明疊在主色上，合成成一張 news-bg.webp）、上下 80；緊接上一塊的淺灰底，不加 --section-gap。
   標題 ｜ 60 ｜ 分頁膠囊列（間距 15，排不下換行）｜ 20 ｜ 白卡 862（框強調色、圓角 20、內距 60×100）＋醫師照片欄 333。
   醫師照片 615×922 從照片欄左 −137、上 −49 開始，往下超出區塊被切掉（overflow: hidden），左側手臂壓到白卡右下角。
   ≤1180 照片移到白卡下方置中、貼區塊下緣（§5）。互動 JS：assets/js/ng-tabs.js。 */
.ng-home-news {
  position: relative; overflow: hidden;   /* 醫師照片往下、往右超出區塊的部分切掉 */
  padding-block: 80px;
  background: var(--color-main) url("assets/img/news-bg.webp") center bottom / cover no-repeat;
}
.ng-home-news__inner { display: flex; flex-direction: column; gap: 60px; }
.ng-home-news__body { display: flex; flex-direction: column; gap: 20px; }
.ng-home-news__tabs { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px 15px; }
.ng-home-news__tab {
  padding: 8px 24px; border: 1px solid var(--color-brand-card-base); border-radius: 20px;   /* 稿 8×30；2026-11-11 使用者同意改 24，1440 寬時 7 顆（含「預防醫學及輔助療程」）排得下一排 */
  background: var(--color-bg-alt); color: var(--color-muted); cursor: pointer;
  font: inherit; font-weight: var(--fw-bold); font-size: var(--fs-h6); line-height: 1.85; letter-spacing: var(--ls-heading);   /* 稿 16 Bold、字距 1.6px */
  white-space: nowrap;
  transition: background .2s ease-out, border-color .2s ease-out, color .2s ease-out;
}
.ng-home-news__tab:hover { border-color: var(--color-accent); color: var(--color-main); }
.ng-home-news__tab.is-active { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.ng-home-news__tab:focus-visible { outline: 2px solid var(--color-bg); outline-offset: 2px; }

.ng-home-news__row { display: grid; grid-template-columns: minmax(0, 862px) 333px; }
/* 各分頁的面板疊在同一格：白卡高度＝文章最多的那個，切換分頁時下面不會跳（同主治項目） */
.ng-home-news__card {
  display: grid; padding: 60px 100px;
  border: 1px solid var(--color-accent); border-radius: 20px; background: var(--color-bg);
}
.ng-home-news__panel { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.ng-home-news__panel[hidden] { display: flex; visibility: hidden; }
.ng-home-news__panel:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 8px; }
.ng-home-news__list { width: 100%; margin: 0 0 69px; padding: 0; list-style: none; }   /* 稿：列表與按鈕間 49＋按鈕外框上內距 20 */
.ng-home-news__link {
  display: grid; grid-template-columns: minmax(0, 1fr) 52px; grid-template-areas: "date ." "title arrow";
  align-items: end; gap: 10px 20px;
  padding-bottom: 20px; border-bottom: 1px solid var(--color-line);
  color: var(--color-text); text-decoration: none;
}
.ng-home-news__item + .ng-home-news__item .ng-home-news__link { padding-top: 10px; }   /* 稿：第 2 則起上 10 */
.ng-home-news__date {
  grid-area: date; color: var(--color-muted);
  font-size: var(--fs-small); line-height: 1.85; letter-spacing: var(--ls-heading);   /* 稿 14、字距 1.4px */
}
.ng-home-news__title {
  grid-area: title;
  font-size: var(--fs-h5); line-height: 1.85; letter-spacing: var(--ls-heading);   /* 稿 18、字距 1.8px */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;   /* 標題太長最多兩行 */
  transition: color .2s ease-out;
}
.ng-home-news__arrow { grid-area: arrow; display: block; width: 52px; height: 20px; color: var(--color-main); transition: transform .2s ease-out; }
.ng-home-news__link:hover .ng-home-news__title { color: var(--color-main); }
.ng-home-news__link:hover .ng-home-news__arrow { transform: translateX(6px); }
.ng-home-news__link:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .ng-home-news__link:hover .ng-home-news__arrow { transform: none; } }
/* 查看更多：尺寸與 hover 走 .ng-btn-primary--lg，只把底色換成主色（稿 4208:6399） */
.ng-home-news__more { margin-top: auto; }
.ng-home-news__more, .ng-treat-list__more { background: var(--color-main); }   /* 診療項目頁「了解更多 →」同一種主色按鈕（2026-11-09） */
.ng-home-news__more:hover, .ng-treat-list__more:hover {
  background: var(--color-brand-main-dark);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--color-main) 35%, transparent);
}

/* 醫師照片：稿上照片框左 −137、上 −48.56、615×922（原圖 683×1024 等比）。
   照片右緣與簽名會超出開版右邊約 80；視窗窄到開版外留白不夠時（約 1360 以下），照片整張往左挪，
   簽名才不會被區塊右緣切掉（--ng-news-m＝開版外的留白；多留 15 給 Windows 捲軸算進 100vw 的誤差）。
   照片不吃滑鼠，透明的上半部壓到分頁列也點得到分頁。 */
.ng-home-news__figure { position: relative; --ng-news-m: max(var(--gutter), (100vw - var(--container)) / 2); }
.ng-home-news__photo {
  position: absolute; top: -48.56px; left: calc(-137px - max(0px, 95px - var(--ng-news-m)));
  width: 615px; pointer-events: none;
}
.ng-home-news__img { display: block; width: 100%; height: auto; }
/* 手寫簽名：稿上 139×70、旋轉 9.26°（外框左上 264,173 相對照片欄）；換成相對照片的百分比。
   沿用醫師簡介的 signature.svg（深色），用 mask 上 --color-bg-alt（稿 #F3F5F7） */
.ng-home-news__sign {
  position: absolute; left: 66%; top: 25.2%; width: 22.64%; aspect-ratio: 139.243 / 70.339;
  background: var(--color-bg-alt);
  -webkit-mask: url("assets/img/signature.svg") center / contain no-repeat;
          mask: url("assets/img/signature.svg") center / contain no-repeat;
  transform: rotate(9.26deg);
}

/* ── 首頁第 9 塊：門診資訊（template-parts/section-schedule.php；全站共用；Figma 4736:3766；2026-11-05）──
   標題 ｜ 80 ｜ 門診表圖片 580 ＋ 間距 40 ＋ 院所卡片 580（直排、間距 20）｜ 80 ｜ 我要掛號 ｜ 80 ｜「沒掛到號」框。
   院所卡片底色依位置固定（使用者指定）；≤1180 圖片與卡片上下排（§5）。 */
.ng-schedule { margin-top: var(--section-gap); }
.ng-schedule__inner { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.ng-schedule__body { display: flex; justify-content: center; align-items: center; gap: 40px; width: 100%; }
.ng-schedule__table { flex: 0 1 580px; min-width: 0; }
.ng-schedule__img { display: block; width: 100%; height: auto; }
.ng-schedule__clinics { flex: 0 1 580px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }   /* 稿 19 */
.ng-schedule__clinic {
  display: flex; flex-direction: column; gap: 10px;
  padding: 30px 40px; border-radius: 10px;
  background: var(--color-main); color: var(--color-bg);
}
.ng-schedule__clinic--2 { background: var(--color-brand-card-base); }   /* 白字對比約 2.4:1，使用者 2026-11-05 裁定照稿，待設計端確認 */
.ng-schedule__clinic--3 { background: var(--color-clinic-3); }
.ng-schedule__clinic--4 { background: var(--color-clinic-4); }
.ng-schedule__clinic--5 { background: var(--color-brand-main-dark); }
.ng-schedule__name {
  margin: 0; color: inherit;
  font-family: var(--font-serif); font-weight: var(--fw-bold);
  font-size: 1.5rem; line-height: 1.5; letter-spacing: var(--ls-heading);   /* 24，字級表例外（同主治項目名稱） */
}
.ng-schedule__rows { margin: 0; display: flex; flex-direction: column; gap: 10px; }
/* 標籤＋內容一行；內容放不下時整段掉到標籤下一行（窄卡片），不在字中間硬擠 */
.ng-schedule__row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.ng-schedule__row dt {
  font-weight: var(--fw-bold); font-size: var(--fs-h5); line-height: 1.85; letter-spacing: var(--ls-heading);   /* 稿 18 Bold */
  white-space: nowrap;
}
.ng-schedule__row dd {
  flex: 1 1 auto; margin: 0;
  font-weight: var(--fw-medium); font-size: var(--fs-p); line-height: 1.85; letter-spacing: var(--ls-heading);   /* 稿 16 Medium（字重例外，同醫師簡介內文） */
}

/* 沒掛到號：標題膠囊壓在框線上（稿：框從膠囊頂下 29 開始，約在膠囊垂直中線），兩者疊在同一格 */
.ng-schedule__help { display: grid; justify-items: center; width: 100%; }
.ng-schedule__help-heading {
  grid-area: 1 / 1; align-self: start; position: relative; z-index: 1;
  margin: 0; padding: 10px 40px;
  border: 1px solid var(--color-accent); border-radius: 100px; background: var(--color-bg);
  color: var(--color-main); text-align: center;
  font-family: var(--font-serif); font-weight: var(--fw-bold);
  font-size: var(--fs-h4); line-height: 1.5; letter-spacing: var(--ls-heading);   /* 稿 20 */
}
.ng-schedule__help-box {
  grid-area: 1 / 1; width: 100%; margin-top: 29px;
  display: flex; flex-direction: column; align-items: center; gap: 30px;
  padding: 60px 20px 30px;
  border: 1px solid var(--color-accent); border-radius: 10px;
  background: color-mix(in srgb, var(--color-brand-decorate) 20%, transparent);   /* 稿 rgba(246,228,239,.2) */
  text-align: center;
}
.ng-schedule__help-item { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ng-schedule__help-title {
  margin: 0; color: var(--color-main);
  font-weight: var(--fw-bold); font-size: var(--fs-h4); line-height: 1.85; letter-spacing: var(--ls-heading);   /* 稿 20 */
}
.ng-schedule__help-title::before, .ng-schedule__help-title::after { content: "▾"; font-size: .6em; vertical-align: middle; }   /* 稿上標題兩側的小三角 */
.ng-schedule__help-title::before { margin-right: .6em; }
.ng-schedule__help-title::after { margin-left: .6em; }
.ng-schedule__help-text {
  margin: 0; color: var(--color-muted);
  font-weight: var(--fw-bold); font-size: var(--fs-h5); line-height: 1.85; letter-spacing: var(--ls-heading);   /* 稿 18 Bold */
}
/* 電話：圖示（稿 34 圓、--color-muted 底）＋號碼 20，接在說明最後一行後面；手機點了直接撥 */
.ng-schedule__tel {
  display: inline-flex; align-items: center; gap: 10px; margin-inline-start: 10px; vertical-align: middle;
  color: var(--color-muted); font-size: var(--fs-h4); text-decoration: none; white-space: nowrap;
  transition: color .2s ease-out;
}
.ng-schedule__tel svg { display: block; width: 34px; height: 34px; flex: none; }
a.ng-schedule__tel:hover { color: var(--color-main); }
.ng-schedule__tel--alone { margin-inline-start: 0; }   /* 只填電話、沒有說明時不要前面那 10（PHP 判斷；不用 :first-child，說明只有一行時沒有 <br>，電話也會是第一個子元素） */
/* 院所卡片的電話：可點撥號，外觀跟其他內容一樣，只多底線提示 */
.ng-schedule__clinic-tel { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ng-schedule__clinic-tel:hover { text-decoration-thickness: 2px; }

/* ── 首頁第 10 塊：聽得懂的神經外科（template-parts/section-home-video.php；Figma 4250:10281；2026-11-05）──
   標題 ｜ 80 ｜ 影片 829（16:9）｜ 5 ｜ 小標題 20 Bold 主色靠左（2026-11-18，原置中）。先顯示封面，點了換 YouTube iframe（assets/js/ng-video.js）。 */
.ng-home-video { margin-top: var(--section-gap); }
.ng-home-video__inner { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.ng-video { display: flex; flex-direction: column; align-items: center; gap: 5px; width: min(829px, 100%); margin: 0; }
/* 2026-11-17 改成最多 3 支並排、一樣大（使用者裁定；稿上只有一支）：開版 1200 平分、間距 20（每支約 387）。
   只填兩支時兩張同尺寸置中；只填一支時維持原本 829 置中。≤759 一欄（§5）。 */
.ng-home-video__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px 20px; width: 100%; }
.ng-home-video__list--multi .ng-video { width: calc((100% - 40px) / 3); }
.ng-home-video__list--multi .ng-video__play { width: 56px; height: 56px; }
.ng-home-video__list--multi .ng-video__play svg { width: 34px; height: 34px; margin-left: 3px; }
.ng-home-video__list--multi .ng-video__caption { font-size: var(--fs-h5); }   /* 撐滿影片寬與不平均拆行已寫在 .ng-video__caption 本身（2026-11-18，一支或多支共用） */
.ng-video__poster, .ng-video__frame { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--color-brand-main-dark); }
.ng-video__frame { height: auto; }   /* 手機走 YouTube IFrame API 時 iframe 會帶 height="390" 屬性，不蓋掉的話 16:9 失效（2026-11-06） */
.ng-video__poster { overflow: hidden; cursor: pointer; }
.ng-video__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease-out; }
/* 播放鈕：稿上沒有，不加訪客不知道能點（見模板檔註解）；主色半透明圓底、白三角，hover 換強調色、封面微放大 */
.ng-video__play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; translate: -50% -50%;
  display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--color-main) 80%, transparent); color: var(--color-bg);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--color-brand-main-dark) 35%, transparent);
  transition: background .2s ease-out, scale .2s ease-out;
}
.ng-video__play svg { width: 44px; height: 44px; margin-left: 4px; }   /* 三角形視覺置中要往右推一點 */
.ng-video__poster:hover .ng-video__play, .ng-video__poster:focus-visible .ng-video__play { background: var(--color-accent); scale: 1.08; }
.ng-video__poster:hover .ng-video__img { transform: scale(1.02); }
.ng-video__poster:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .ng-video__img, .ng-video__play { transition: none; } .ng-video__poster:hover .ng-video__img { transform: none; } }
.ng-video__caption {
  color: var(--color-main); text-align: left;   /* 2026-11-18 使用者要求靠左（原本置中） */
  font-weight: var(--fw-bold); font-size: var(--fs-h4); line-height: 1.85; letter-spacing: var(--ls-heading);   /* 稿 20 Bold */
  align-self: stretch; text-wrap: pretty;   /* 撐滿影片寬，靠左才看得出來（.ng-video 是 align-items:center，不撐的話寬度縮成文字寬，審查 a486052）；pretty：靠左時 balance 會把第一行拆得很短 */
}

/* ── 首頁第 11 塊：他們怎麼說（template-parts/section-home-reviews.php；Figma 4247:10158；2026-11-05）──
   深藍底圖滿版（使用者提供已合成的 reviews-bg.webp）、上下 80；照片輪播用共用 .ng-gallery 的 reviews 版型：
   一次 4 張 270×480（評論截圖本身就是白卡）、間距 38。
   ≤1180 一次 3 張、≤759 一次 1 張（§5）。 */
.ng-home-reviews {
  margin-top: var(--section-gap); padding-block: 80px;
  background: var(--color-main) url("assets/img/reviews-bg.webp") center / cover no-repeat;
  color: var(--color-bg);
}
.ng-gallery--reviews { --per-view: 4; --ng-gallery-gap: 38px; --ng-gallery-ratio: 270 / 480; }
.ng-gallery--reviews .ng-gallery__img { object-position: center; }

/* ── 首頁第 12 塊：一分鐘練功教室（template-parts/section-home-shorts.php；Figma 4276:10889；2026-11-05）──
   白底；照片輪播用 shorts 版型：尺寸同 reviews（一次 4 張 270×480、間距 38），圓角 10，
   圖是外連按鈕（rel nofollow、另開視窗，使用者指定）、中間 50px 強調色播放鈕，下方可有小標題。
   ≤1180 一次 3 張、≤759 一次 1 張 320 寬（同 reviews）。 */
.ng-home-shorts { margin-top: var(--section-gap); color: var(--color-main); }
.ng-gallery--shorts { --per-view: 4; --ng-gallery-gap: 38px; }
/* 有小標題時卡片會變高：比例改掛在連結上，slide 本身不裁 */
.ng-gallery--shorts .ng-gallery__slide, .ng-gallery--training .ng-gallery__slide { aspect-ratio: auto; border-radius: 0; overflow: visible; display: flex; flex-direction: column; gap: 10px; align-self: start; }
.ng-gallery__link { position: relative; display: block; aspect-ratio: 270 / 480; border-radius: 10px; overflow: hidden; }
.ng-gallery__link .ng-gallery__img { object-position: center; transition: transform .3s ease-out; }
.ng-gallery__play {
  position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; translate: -50% -50%;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--color-accent); color: var(--color-bg);
  box-shadow: 0 4px 4px rgb(0 0 0 / .25);   /* 稿：Drop shadow y4 blur4 25% */
  transition: background .2s ease-out, scale .2s ease-out;
}
.ng-gallery__play svg { width: 24px; height: 24px; margin-left: 3px; }
.ng-gallery__link:hover .ng-gallery__play, .ng-gallery__link:focus-visible .ng-gallery__play { background: var(--color-accent-hover); scale: 1.1; }
.ng-gallery__link:hover .ng-gallery__img { transform: scale(1.03); }
.ng-gallery__link:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .ng-gallery__link .ng-gallery__img, .ng-gallery__play { transition: none; } .ng-gallery__link:hover .ng-gallery__img { transform: none; } }
.ng-gallery__caption {
  margin: 0; color: var(--color-main); text-align: center;
  font-weight: var(--fw-bold); font-size: var(--fs-p); line-height: 1.6; letter-spacing: var(--ls-heading);   /* 稿上沒有小標題（使用者 2026-11-05 要求開欄位），比照長影片小標題、縮一級成 16 */
}

/* ── 共用：燈箱（assets/js/ng-lightbox.js；gallery-carousel.php 的 lightbox 參數；Google 評論用；2026-11-06）──
   評論截圖字小，點圖開 <dialog> 看原圖。圖按鈕本身外觀不變（整張卡），hover 只加放大游標。
   燈箱：深色半透明暗底，圖片置中、以視窗為上限等比縮放；右上 ×、左右箭頭（一張時藏）。 */
.ng-gallery__zoom {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: inherit;
}
.ng-gallery__zoom:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
html.ng-lightbox-open { overflow: hidden; }   /* 燈箱開著時頁面不捲動 */
.ng-lightbox {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 56px 16px 24px;
  border: 0; background: transparent; color: var(--color-bg);
  display: none; align-items: center; justify-content: center; gap: 12px;
}
.ng-lightbox[open] { display: flex; }
.ng-lightbox::backdrop { background: color-mix(in srgb, var(--color-brand-main-dark) 88%, transparent); }
.ng-lightbox__img {
  display: block; min-width: 0; width: auto; height: auto;
  max-width: min(100%, 720px); max-height: 100%; object-fit: contain;
  border-radius: var(--radius); background: var(--color-bg);
}
.ng-lightbox__close, .ng-lightbox__arrow {
  display: grid; place-items: center; flex: none; padding: 0; border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--color-bg) 15%, transparent); color: inherit; cursor: pointer;
  transition: background .2s ease-out;
}
.ng-lightbox__close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; }
.ng-lightbox__arrow { width: 44px; height: 44px; }
.ng-lightbox__arrow[hidden] { display: none; }
.ng-lightbox__close svg, .ng-lightbox__arrow svg { width: 24px; height: 24px; }
.ng-lightbox__close:hover, .ng-lightbox__arrow:hover { background: var(--color-accent); }
.ng-lightbox__close:focus-visible, .ng-lightbox__arrow:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
/* 手機：箭頭疊在圖片兩側下緣，圖片吃滿寬度 */
@media (max-width: 759px) {
  .ng-lightbox { padding: 56px 12px 72px; }
  .ng-lightbox__arrow { position: absolute; bottom: 14px; }
  .ng-lightbox__arrow--prev { left: calc(50% - 56px); }
  .ng-lightbox__arrow--next { right: calc(50% - 56px); }
}

/* ── 首頁跑馬燈（template-parts/section-home-marquee.php；Figma 4140:1032；2026-11-17）──
   頁首正下方滿版一條，高 45、--color-brand-decorate 淡粉底；文字 14 Regular 主色，段距 100（稿 104／105 取整）。
   沒有 JS／減少動態效果：一列置中，放不下可左右滑。JS 跑起來（.is-running）：每段絕對定位，由 ng-marquee.js 逐格改 transform。 */
.ng-home-marquee { background: var(--color-brand-decorate); color: var(--color-main); }
.ng-home-marquee__viewport { overflow-x: auto; scrollbar-width: none; }
.ng-home-marquee__viewport::-webkit-scrollbar { display: none; }
.ng-home-marquee__track {
  position: relative; display: flex; align-items: center; justify-content: safe center; column-gap: 100px;
  width: max-content; min-width: 100%; height: 45px; margin: 0; padding: 0 var(--gutter); list-style: none;
  font-size: .875rem; line-height: 1; letter-spacing: var(--ls-body); white-space: nowrap;   /* 14，字級表例外（稿）；字距套全站內文 0.05em（使用者 2026-11-18：原本 0 太擠） */
}
.ng-home-marquee__track.is-running { width: auto; padding: 0; overflow: hidden; }
.ng-home-marquee__track.is-running .ng-home-marquee__item { position: absolute; left: 0; top: 50%; translate: 0 -50%; will-change: transform; }
.ng-home-marquee__item { flex: none; }
.ng-home-marquee__link { color: inherit; text-decoration: none; }
.ng-home-marquee__link:hover { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }
.ng-home-marquee__link:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ── 首頁第 1 塊：主視覺輪播（template-parts/section-home-banner.php；2026-11-05）──
   整張圖（字烤在圖裡），滿版、高度跟著圖的比例走（img width:100%＋height:auto，不設 aspect-ratio）。
   一次一張，JS（assets/js/ng-carousel.js）只改 track 的 transform。≤759 換手機圖（<source>）、箭頭縮成 36，登記在 §5。
   箭頭與圓點設計稿沒畫，用既有 token 組，待設計端對。 */
.ng-home-banner { position: relative; background: var(--color-main); }   /* 圖還沒載到時先有主色底，不閃白 */
.ng-home-banner__viewport { overflow: hidden; }
.ng-home-banner__track {
  display: flex; margin: 0; padding: 0; list-style: none;
  transition: transform .6s ease;
}
.ng-home-banner__slide { flex: 0 0 100%; min-width: 0; }
.ng-home-banner__slide img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) { .ng-home-banner__track { transition: none; } }

.ng-home-banner__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--color-brand-main-dark) 45%, transparent);
  color: var(--color-bg); cursor: pointer;
  transition: background .2s ease-out;
}
.ng-home-banner__arrow svg { width: 22px; height: 22px; }
.ng-home-banner__arrow:hover { background: var(--color-accent); }
.ng-home-banner__arrow--prev { left: var(--gutter); }
.ng-home-banner__arrow--next { right: var(--gutter); }

/* 圓點：按鈕 24×24（觸控範圍），畫出來的點 10px */
.ng-home-banner__dots {
  position: absolute; left: 50%; bottom: var(--space-3); transform: translateX(-50%);
  display: flex; gap: var(--space-1);
}
.ng-home-banner__dot {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer;
}
.ng-home-banner__dot::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: color-mix(in srgb, var(--color-bg) 60%, transparent);
  transition: background .2s ease-out;
}
.ng-home-banner__dot:hover::before { background: var(--color-bg); }
.ng-home-banner__dot[aria-current="true"]::before { background: var(--color-accent); }

.ng-page,
.ng-single {
  /* docs/01「三條切版規範」的預設垂直節奏：--space-24（96px）。
     出廠元件全部照這個值，新區塊才不會跟既有區塊對不齊。 */
  padding-block: var(--space-24);
}
/* ng-page__title / ng-single__title / ng-archive__title / ng-404__title：
   都是 <h1>，刻意不另外訂規則，直接吃 §3 全域 h1 樣式——不是漏掉。 */
.ng-page__body,
.ng-single__body {
  /* 長文可讀性基本設定：line-height 覆蓋沒有專屬行高的子元素（li、blockquote 等）；
     段落間距用相鄰兄弟選擇器統一管，不逐一在個別元素上設，也不用 padding-inline 造留白。 */
  line-height: var(--lh-p);
}
.ng-page__body > * + *,
.ng-single__body > * + * {
  margin-top: var(--space-4);
}
.ng-single__meta {
  /* meta 文字處理：小一級字級＋--color-muted（原本比照起案包的 .site-footer__copy，頁尾 2026-11-05 改版後該 class 已移除） */
  font-size: var(--fs-small);
  color: var(--color-muted);
}

.ng-archive { padding-block: var(--space-24); }
.ng-archive__grid {
  display: grid;
  /* 欄數自己依可用寬度降，不開 media query（硬規則 5） */
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--space-8);
}

.ng-card { border: 1px solid var(--color-line); }
.ng-card__thumb { display: block; }
.ng-card__title {
  font-size: var(--fs-h5);
  padding: var(--space-4) var(--space-4) 0;
}
.ng-card__body {
  padding: var(--space-4);
  color: var(--color-muted);
}

/* 側邊浮動按鈕（float-bar.php；Figma 4533:1039；2026-11-12）：右 10、下 40，Cookie 提示出現時再加上它的高度（--ng-cookie-h，ng-cookie.js 寫）；
   50 圓、強調色底、白色圖示、柔光陰影 0 0 10px（稿：#DB51A7 30%）；間距 15。層級 34：低於 Cookie 提示 35、手機抽屜 40、頁首 60 */
.ng-float { position: fixed; right: 10px; bottom: calc(40px + var(--ng-cookie-h, 0px)); z-index: 34; transition: bottom .2s ease-out; }
.ng-float__list { display: flex; flex-direction: column; gap: 15px; margin: 0; padding: 0; list-style: none; }
.ng-float__btn {
  display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 50%;
  background: var(--color-accent); color: var(--color-bg);
  box-shadow: 0 0 10px rgba(219, 81, 167, .3);   /* 稿上陰影色 #DB51A7，沒有 token */
  transition: background-color .2s ease-out;
}
.ng-float__btn:hover { background: var(--color-accent-hover); }
.ng-float__btn:focus-visible { outline: 3px solid var(--color-main); outline-offset: 2px; }
.ng-float__icon { display: block; width: 50px; height: 50px; }
@media (prefers-reduced-motion: reduce) { .ng-float, .ng-float__btn { transition: none; } }
@media print { .ng-float, .ng-cookie { display: none !important; } }

/* Cookie 使用提示（cookie-notice.php；Figma 4578:5143；2026-11-12）：固定在視窗底、滿版；bg-alt 半透明＋模糊（使用者改，稿上是不透明）、主色 1px 框、沒有圓角（使用者 2026-11-12，稿上 5）；上下內距 20（手機 14）；
   文字照全站內文標準 16／行高 2.0／字距 .05em（手機 14／1.85）深主色，連結 Bold；按鈕 150×50 白底強調色框與字。層級 35：低於手機抽屜 40、頁首 60。顯示由 ng-cookie.js 決定 */
.ng-cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  border: 1px solid var(--color-main);   /* 不要圓角（使用者 2026-11-12） */
  background: var(--color-bg-alt);   /* 不支援半透明＋模糊的瀏覽器：不透明，文字才不會壓在頁面內容上 */
}
/* 半透明（使用者 2026-11-12）：bg-alt 88% 不透明＋背景模糊 6px，底下的內容只剩淡淡的影子，深主色字對比仍遠高於 4.5:1 */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (background: color-mix(in srgb, red 50%, transparent)) {
  .ng-cookie {
    background: color-mix(in srgb, var(--color-bg-alt) 88%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}
.ng-cookie[hidden] { display: none; }
.ng-cookie__inner { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 20px 46px; padding-block: 20px; }   /* 內距 20（使用者 2026-11-12：24 嫌大、16 嫌小，取中間；稿上框高 150） */
.ng-cookie__text { margin: 0; color: var(--color-brand-main-dark); font-size: var(--fs-p); line-height: var(--lh-p); letter-spacing: var(--ls-body); }   /* 全站內文標準 16／2.0／.05em（使用者 2026-11-12；稿 18、行高 27、字距 0） */
.ng-cookie__text a { color: inherit; font-weight: var(--fw-bold); text-decoration: none; }
.ng-cookie__text a:hover { color: var(--color-accent); text-decoration: underline; }
.ng-cookie__btn {
  height: 50px; padding: 0 16px; border: 1px solid var(--color-accent); border-radius: 5px;
  background: var(--color-bg); color: var(--color-accent); font: inherit; font-size: var(--fs-p); letter-spacing: 0; cursor: pointer;
  transition: background-color .2s ease-out, color .2s ease-out;
}
.ng-cookie__btn:hover { background: var(--color-accent); color: var(--color-bg); }
.ng-cookie__btn:focus-visible { outline: 3px solid var(--color-main); outline-offset: 2px; }

/* 404（404.php；Figma 4597:8651；2026-11-11）：頁首下 160 提示三行（24 Bold 內文色、行高 1.85、置中）→ 60 大搜尋框 → 衛教新知、案例故事、掛號相關注意事項（各 --section-gap）→ --section-gap 頁尾 */
.ng-404 { padding-bottom: var(--section-gap); }
.ng-404__inner { display: flex; flex-direction: column; align-items: center; gap: 60px; padding-top: 160px; }
.ng-404__msg { margin: 0; color: var(--color-text); font-weight: var(--fw-bold); font-size: 1.5rem; line-height: 1.85; letter-spacing: var(--ls-body); text-align: center; }   /* 稿 24 Bold，字級表例外 */
.ng-404__msg a { color: var(--color-main); text-decoration: underline; }
.ng-404__msg a:hover { color: var(--color-accent); }
.ng-clinic-faq--narrow .ng-clinic-faq__group { max-width: 994px; }   /* 404 頁的掛號注意事項：寬 994（稿 4604:9028） */

/* 起案包示範的 .ng-cta／.ng-hero／.ng-cards 已移除（2026-11-17，首頁 Hero 與卡片區用不到） */

/* ── 共用：內頁頁面橫幅＋麵包屑（template-parts/page-banner.php；Figma 元件「頁面橫幅」4588:7820；2026-11-06）──
   橫幅滿版 200 高、主色底＋底圖 page-title-bg.webp（2880×400），標題 32 Bold 白字置中、字距 0.1em。
   麵包屑在橫幅下 60，14 Medium 次要文字色、字距 0.05em；下面第一個區塊自己留 100 上距（稿：麵包屑頂 → 內容頂 100）。
   ≤759 橫幅 140、標題 26、麵包屑上距 24（§5）。 */
.ng-page-banner {
  display: grid; place-items: center; min-height: 200px; padding: 24px var(--gutter);
  background: var(--color-main) url("assets/img/page-title-bg.webp") center / cover no-repeat;
  color: var(--color-bg);
}
.ng-page-banner__title {
  margin: 0; text-align: center;
  font-weight: var(--fw-bold); font-size: 2rem; line-height: 1.85; letter-spacing: var(--ls-heading);   /* 稿 32，字級表例外（同首頁數字統計） */
}
.ng-breadcrumb { margin-top: 60px; }
.ng-breadcrumb__list {
  display: flex; flex-wrap: wrap; gap: 0 .4em; margin: 0; padding: 0; list-style: none;
  color: var(--color-muted); font-weight: var(--fw-medium); font-size: var(--fs-small); line-height: 1.5; letter-spacing: var(--ls-body);
}
.ng-breadcrumb__list li + li::before { content: ">"; margin-right: .4em; }   /* 稿：「首頁 > 關於謝炳賢」 */
.ng-breadcrumb__list a { color: inherit; text-decoration: none; }
.ng-breadcrumb__list a:hover { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }

/* ── 關於謝炳賢頁（page-doctor-profile.php；Figma 4588:6662；2026-11-06）──
   區塊間距一律 --section-gap（稿上逐塊量都是 160）。頁面專屬 class 前綴 .ng-about-。 */
.ng-about { padding-bottom: var(--section-gap); }   /* 最後一塊與頁尾之間也 160（稿 5268→5428），加在外框：最後一塊沒資料不輸出時間距照樣在（同首頁做法） */
/* 開頭：醫師的話（section-about-intro.php；4631:9884）：文字欄 ｜ 80 ｜ 照片 305×446；底色上下漸層 白 → 淺灰 → 白 */
.ng-about-intro { margin-top: 79px; background: linear-gradient(var(--color-bg), var(--color-bg-alt) 50%, var(--color-bg)); }   /* 稿：麵包屑頂 332 → 432 是 100，扣掉麵包屑本身 21 */
.ng-about-intro__inner { display: grid; grid-template-columns: minmax(0, 1fr) 305px; gap: 80px; align-items: center; }
.ng-about-intro__text { display: flex; flex-direction: column; align-items: flex-start; }
.ng-about-intro__mark { display: block; width: 80px; height: 80px; }
.ng-about-intro__quote {
  margin: 40px 0 0; color: var(--color-main);
  font-family: var(--font-serif); font-weight: var(--fw-bold); font-size: 2rem; line-height: 1.4; letter-spacing: .2em;   /* 稿 32、字距 6.4px，字級表例外 */
}
.ng-about-intro__body { margin-top: 80px; color: var(--color-text); font-size: var(--fs-p); line-height: 1.85; letter-spacing: var(--ls-heading); }   /* 稿 16 Regular、字距 1.6px、行高 1.85 */
.ng-about-intro__body p { margin: 0; }
.ng-about-intro__body p + p { margin-top: 1.85em; }   /* 稿：段落之間空一行 */
.ng-about-intro__photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 305 / 446; }
.ng-about-intro__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }

/* 持續精進（section-about-training.php；4631:9885）：淺灰底滿版、上 80／下 100；照片輪播 training 版型 */
.ng-about-training { margin-top: var(--section-gap); padding-block: 80px 100px; background: var(--color-bg-alt); color: var(--color-main); }
.ng-gallery--training .ng-gallery__img { height: auto; aspect-ratio: 387 / 273; border-radius: var(--radius); object-position: center; }   /* width:100% 配 aspect-ratio 一定要 height:auto（docs/01） */
.ng-gallery--training .ng-gallery__caption { color: var(--color-text); text-align: left; font-weight: var(--fw-medium); line-height: 1.85; letter-spacing: 0; }   /* 稿 16 Medium 內文色、靠左 */

/* 醫師簡介（section-about-profile.php；4631:9967）：左欄 374 ｜ 103 ｜ 右欄 723；淡色神經線條底圖置中 */
.ng-about-profile { margin-top: var(--section-gap); background: var(--color-bg) url("assets/img/about-profile-bg.webp") center / cover no-repeat; }
.ng-about-profile__inner { display: grid; grid-template-columns: 374px minmax(0, 1fr); gap: 103px; align-items: start; }
.ng-about-profile__side { display: flex; flex-direction: column; gap: 60px; }
.ng-about-profile__photo { aspect-ratio: 371 / 374; border: 1px solid var(--color-bg-alt); border-radius: 10px; overflow: hidden; }
.ng-about-profile__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
/* 一句話：上下各一條「兩端菱形」分隔線（稿 Vector 2：線 1px＋5.8px 菱形，--color-brand-card-base），與文字間距 40 */
.ng-about-profile__motto {
  position: relative; margin: 0; padding-block: 40px; color: var(--color-brand-main-dark);
  font-family: var(--font-serif); font-weight: var(--fw-bold); font-size: var(--fs-h5); line-height: 1.85; letter-spacing: var(--ls-heading);   /* 稿 Noto Serif SemiBold 18；600 沒載入（Google Fonts 只載 700），寫 600 瀏覽器也會用 700，照實寫 */
  background: linear-gradient(var(--color-brand-card-base), var(--color-brand-card-base)) top / calc(100% - 6px) 1px no-repeat,
              linear-gradient(var(--color-brand-card-base), var(--color-brand-card-base)) bottom / calc(100% - 6px) 1px no-repeat;
}
.ng-about-profile__motto::before, .ng-about-profile__motto::after {
  content: ""; position: absolute; inset-inline: -1px; height: 5px;
  background:
    linear-gradient(45deg, transparent 50%, var(--color-brand-card-base) 50%) left / 5px 5px no-repeat,
    linear-gradient(225deg, transparent 50%, var(--color-brand-card-base) 50%) right / 5px 5px no-repeat;
}
.ng-about-profile__motto::before { top: -2px; }
.ng-about-profile__motto::after { bottom: -2px; }
.ng-about-profile__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 30px; }
.ng-about-profile__social { display: flex; gap: 7px; margin: 0; padding: 0; list-style: none; }
.ng-about-profile__social-link { display: block; width: 30px; height: 30px; border-radius: 50%; color: var(--color-main); }
.ng-about-profile__social-link svg { display: block; width: 30px; height: 30px; }
.ng-about-profile__social-bg { fill: currentColor; transition: fill .2s ease-out; }
.ng-about-profile__social-link:hover { color: var(--color-accent); }
.ng-about-profile__social-link:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.ng-about-profile__main { display: flex; flex-direction: column; gap: 20px; color: var(--color-main); }
.ng-about-profile__name {
  display: flex; align-items: center; gap: 17px; margin: 0;
  font-weight: var(--fw-bold); font-size: 2rem; line-height: 1.3; letter-spacing: var(--ls-heading);   /* 稿 32，字級表例外 */
}
.ng-about-profile__name-title { font-size: var(--fs-h5); letter-spacing: 0; }   /* 稿 18 */
/* 稿上職稱、經歷、專長之間各有一條 1px 細線（--color-brand-card-base），寬度撐滿右欄 */
.ng-about-profile__position, .ng-about-profile__group { margin: 0; padding-top: 20px; border-top: 1px solid var(--color-brand-card-base); }
.ng-about-profile__position, .ng-about-profile__heading { font-weight: var(--fw-bold); font-size: var(--fs-h5); line-height: 1.3; }
.ng-about-profile__heading { margin: 0; }
.ng-about-profile__list {
  margin: 20px 0 0; padding-left: 84px;   /* 稿：清單外框內縮 60＋項目縮排 24 */
  color: var(--color-text); font-size: var(--fs-p); line-height: 1.85;
}
.ng-about-profile__list li::marker { color: var(--color-text); }

/* 專業證書（section-about-certificates.php；4635:10362）：照片輪播 certificates 版型，一次 4 張 270×361、間距 40、直角 */
.ng-about-certs { margin-top: var(--section-gap); color: var(--color-main); }
.ng-gallery--certificates { --per-view: 4; --ng-gallery-gap: 40px; --ng-gallery-ratio: 270 / 361; }
.ng-gallery--certificates .ng-gallery__slide { border-radius: 0; }
.ng-gallery--certificates .ng-gallery__img { object-position: center; }

/* ── 共用：文章卡片區（template-parts/section-post-cards.php；Figma 4631:10115／10121；2026-11-06 關於頁起用）──
   標題 ｜ 80 ｜ 3 欄卡片（各 373、間距 40）。卡片：圖 3:2 → 10 → 標題 18 Bold → 摘要 16 Medium 次要色（4 行）→ 日期 14 → 查看更多 14 Bold。
   整張卡可點（標題連結 ::after 撐滿）。≤1180 兩欄、≤759 一欄（§5）。 */
.ng-post-cards { margin-top: var(--section-gap); }
.ng-post-cards__inner { display: flex; flex-direction: column; gap: 80px; }
.ng-post-cards__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin: 0; padding: 0; list-style: none; }
.ng-post-card { position: relative; display: flex; flex-direction: column; gap: 10px; }
.ng-post-card__thumb { aspect-ratio: 373 / 249; overflow: hidden; background: var(--color-bg-alt); }
.ng-post-card__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease-out; }
.ng-post-card__title {   /* 稿 18 Bold、字距 0。固定兩行高、超過兩行省略（使用者 2026-11-10，全站文章卡片；稿上只有一行） */
  margin: 0; font-weight: var(--fw-bold); font-size: var(--fs-h5); line-height: 1.85; letter-spacing: 0;
  min-height: calc(2em * 1.85);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.ng-post-card__link { color: var(--color-text); text-decoration: none; }
.ng-post-card__link::after { content: ""; position: absolute; inset: 0; }   /* 整張卡都可點 */
.ng-post-card__link:focus-visible { outline: none; }
.ng-post-card:has(.ng-post-card__link:focus-visible) { outline: 3px solid var(--color-accent); outline-offset: 4px; }   /* 只給鍵盤 Tab；滑鼠點了、按上一頁回來不出框（使用者 2026-11-11） */
.ng-post-card__excerpt {
  margin: 0; color: var(--color-muted); font-weight: var(--fw-medium); font-size: var(--fs-p); line-height: 1.85;
  min-height: calc(3em * 1.85);   /* 固定三行高、超過三行省略（使用者 2026-11-10，原本最多 4 行）；摘要空白時也佔三行，卡片才對齊 */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.ng-post-card__date, .ng-post-card__more { color: var(--color-muted); font-size: var(--fs-small); line-height: 1.85; letter-spacing: var(--ls-heading); }   /* 稿 14、字距 1.4px */
.ng-post-card__date { font-weight: var(--fw-medium); }
.ng-post-card__more { font-weight: var(--fw-bold); }   /* 不加 transition：hover 時跟標題同時瞬間變色（使用者 2026-11-11） */
.ng-post-card:hover .ng-post-card__img { transform: scale(1.03); }
.ng-post-card:hover .ng-post-card__link, .ng-post-card:hover .ng-post-card__more { color: var(--color-accent); }
@media (prefers-reduced-motion: reduce) { .ng-post-card__img { transition: none; } .ng-post-card:hover .ng-post-card__img { transform: none; } }

/* ── 門診資訊頁（page-business_hour.php；Figma 4636:10536；2026-11-09）──
   區塊間距一律 --section-gap（稿上逐塊量都是 160）。頁面專屬 class 前綴 .ng-clinic-。
   第一塊是共用的門診資訊（.ng-schedule），在這頁改成接麵包屑的 100（同關於頁開頭）。 */
.ng-clinic { padding-bottom: var(--section-gap); }   /* 最後一塊與頁尾之間也 160（稿 8020→8180），同關於頁 */
.ng-clinic > .ng-schedule { margin-top: 79px; }   /* 稿：麵包屑頂 332 → 432 是 100，扣掉麵包屑本身 21 */

/* 診療流程（section-clinic-flow.php；4639:11387）：神經線條底圖、下 80；標題 → 80 → 四步（各 270、間距 40） */
.ng-clinic-flow {
  margin-top: var(--section-gap); padding-bottom: 80px;
  background: var(--color-bg) url("assets/img/about-profile-bg.webp") center / cover no-repeat;   /* 同一張圖，25% 透明度已疊進白底 */
}
.ng-clinic-flow__inner { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.ng-clinic-flow__list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 270px)); justify-content: center;
  gap: 40px; width: 100%; margin: 0; padding: 0; list-style: none;
}
.ng-clinic-flow__item { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.ng-clinic-flow__icon { display: block; width: 150px; height: 150px; }
/* 後台上傳的圖示（2026-11-12）是完整圖（含圓底與外圈），和主題 svg 共用 .ng-clinic-flow__icon；object-fit 防止非正方形的圖被壓扁 */
img.ng-clinic-flow__icon { object-fit: contain; }
.ng-clinic-flow__title {
  margin: 0; color: var(--color-main); text-align: center;
  font-family: var(--font-serif); font-weight: var(--fw-bold);
  font-size: var(--fs-h4); line-height: 1.85; letter-spacing: .1em;   /* 稿 20、字距 2px（同首頁四大特色） */
}

/* 環境與設備（section-clinic-env.php；4636:11237）：標題 → 80 → 3 欄照片 387×273、間距 20（稿 1201 寬，開版 1200 內用 1fr 均分）；照片無圓角（照稿） */
.ng-clinic-env { margin-top: var(--section-gap); }
.ng-clinic-env__inner { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.ng-clinic-env__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
  width: 100%; margin: 0; padding: 0; list-style: none;
}
.ng-clinic-env__zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }   /* 同 .ng-gallery__zoom 的按鈕重設 */
.ng-clinic-env__zoom:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.ng-clinic-env__img {
  display: block; width: 100%; height: auto; aspect-ratio: 387 / 273;   /* width:100% 配 aspect-ratio 一定要 height:auto（docs/01） */
  object-fit: cover; background: var(--color-bg-alt);
}

/* FAQ（section-clinic-faq.php；4636:11111，收合選單 4597:8619）：標題 → 80 → 小標題（24 Bold 主色）→ 80 → 問答框；組與組之間 80 */
.ng-clinic-faq { margin-top: var(--section-gap); }
.ng-clinic-faq__inner { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.ng-clinic-faq__group { display: flex; flex-direction: column; gap: 80px; width: 100%; }
.ng-clinic-faq__group-title {
  margin: 0; color: var(--color-main); text-align: center;
  font-size: 1.5rem; font-weight: var(--fw-bold); line-height: 1;   /* 稿 24 Noto Sans Bold，字級表沒有 24，列在 design-system.md 字級例外 */
}
.ng-clinic-faq__list { border: 1px solid var(--color-brand-card-base); border-radius: var(--radius); overflow: hidden; }
.ng-clinic-faq__item + .ng-clinic-faq__item { border-top: 1px solid var(--color-brand-card-base); }   /* 稿上每列各自一框，相鄰變 2px；改成 1px 分隔線 */
.ng-clinic-faq__q {
  display: flex; gap: 10px; align-items: baseline; min-height: 55px; padding: 15px 22px;
  list-style: none; cursor: pointer; background: var(--color-bg);
  color: var(--color-muted); font-size: var(--fs-h5); font-weight: var(--fw-medium); line-height: 1.4;   /* 稿 18 Medium 次要文字色 */
}
.ng-clinic-faq__q::-webkit-details-marker { display: none; }   /* Safari 舊版的三角形 */
.ng-clinic-faq__q::before { content: "＋"; content: "＋" / ""; flex: none; }   /* 稿：全形加號；第二條「/ ""」讓螢幕閱讀器不念符號（Safari 17.4 起，舊瀏覽器丟掉它、用第一條），展開／收合狀態 <details> 自己會報 */
.ng-clinic-faq__q:hover { color: var(--color-main); }
.ng-clinic-faq__q:focus-visible { outline: 3px solid var(--color-accent); outline-offset: -3px; }
.ng-clinic-faq__item[open] > .ng-clinic-faq__q { background: var(--color-main); color: var(--color-bg); font-weight: var(--fw-bold); }   /* 稿：展開是主色底白字 Bold */
.ng-clinic-faq__item[open] > .ng-clinic-faq__q::before { content: "－"; content: "－" / ""; }
.ng-clinic-faq__answer {
  padding: 10px 20px; border-top: 1px solid var(--color-brand-card-base); background: var(--color-bg-alt);
  color: var(--color-brand-main-dark); font-size: var(--fs-p); line-height: 1.85;   /* 稿 16 Regular、行高 1.85 */
}
.ng-clinic-faq__answer > :first-child { margin-top: 0; }
.ng-clinic-faq__answer > :last-child { margin-bottom: 0; }
.ng-clinic-faq__answer p, .ng-clinic-faq__answer ul, .ng-clinic-faq__answer ol { margin: 0 0 .5em; }
.ng-clinic-faq__answer ul, .ng-clinic-faq__answer ol { padding-left: 1.5em; }
.ng-clinic-faq__answer strong { color: var(--color-main); }

/* ── 診療項目頁（page-treatments.php；Figma 4684:12764；2026-11-09）──
   區塊間距一律 --section-gap（稿上逐塊量都是 160）。頁面專屬 class 前綴 .ng-treat-。 */
.ng-treat { padding-bottom: var(--section-gap); }   /* 最後一塊與頁尾之間也 160，同關於頁 */

/* 開頭（section-treat-intro.php；4687:13112）：灰底帶 542 高、照片 424×620 上下各凸出 39；
   文字欄 656（120 → 776）、間距 120、照片欄 424（896 → 1320）。 */
.ng-treat-intro {
  margin-top: 79px;   /* 稿：麵包屑頂 332 → 432 是 100，扣掉麵包屑本身 21 */
  background: linear-gradient(transparent 39px, var(--color-bg-alt) 39px, var(--color-bg-alt) calc(100% - 39px), transparent calc(100% - 39px));
}
.ng-treat-intro__inner { display: grid; grid-template-columns: minmax(0, 1fr) 424px; column-gap: 120px; align-items: center; }
.ng-treat-intro__text { padding-block: 99px; }   /* 灰底帶內縮 39 ＋ 稿的內距 60 */
.ng-treat-intro__title {
  margin: 0 0 60px;   /* 稿：標題框 pb 20 ＋ 間距 20 ＋ 內文框 pt 20 */
  font-family: var(--font-serif); font-weight: var(--fw-bold); font-size: 2rem; line-height: 1;
  letter-spacing: .2em; color: var(--color-brand-main-dark);   /* 稿 32、字距 6.4px，同首頁醫師簡介標題 */
}
.ng-treat-intro__body p {
  margin: 0; color: var(--color-main); font-weight: var(--fw-medium); font-size: var(--fs-h5); line-height: 1.85;
  letter-spacing: .1em; text-align: justify;   /* 稿 18 Medium、字距 1.8px；寫在 p 上才蓋得過全站 p 的字級 */
}
.ng-treat-intro__body p + p { margin-top: 1.85em; }   /* 稿：段落之間空一行 */
.ng-treat-intro__photo { aspect-ratio: 424 / 620; border-radius: var(--radius); overflow: hidden; }
.ng-treat-intro__img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 主治項目列表（section-treat-list.php；4687:13430）：標題 → 80 → 列表（內距 40／80，內容 1040）；
   每列 插圖 408 ｜ 80 ｜ 文字，上下內距 40、底線 1px；偶數列插圖在右。 */
.ng-treat-list { margin-top: var(--section-gap); }
.ng-treat-list__inner { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.ng-treat-list__list { width: 100%; margin: 0; padding: 40px 80px; list-style: none; }
.ng-treat-list__item {
  display: grid; grid-template-columns: 408px minmax(0, 1fr); column-gap: 80px; align-items: center;
  padding-block: 40px; border-bottom: 1px solid var(--color-brand-card-base);
}
.ng-treat-list__item:last-child { border-bottom: 0; }
.ng-treat-list__item:nth-child(even) { grid-template-columns: minmax(0, 1fr) 408px; }
.ng-treat-list__item:nth-child(even) .ng-treat-list__media { order: 2; }
.ng-treat-list__img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.ng-treat-list__text { display: flex; flex-direction: column; align-items: flex-start; gap: 40px; }
/* 新增的主治項目沒上傳插圖：整列只放文字（2026-11-20）。特異性加高，蓋過下面斷點的奇偶欄設定 */
.ng-treat-list__list > .ng-treat-list__item.ng-treat-list__item--noimg { grid-template-columns: minmax(0, 1fr); }
.ng-treat-list__title {
  margin: 0; font-family: var(--font-serif); font-weight: var(--fw-bold); font-size: 1.5rem; line-height: 1;
  letter-spacing: .1em; color: var(--color-main);   /* 稿 24、字距 2.4px */
}
.ng-treat-list__body { align-self: stretch; }
.ng-treat-list__body p {
  margin: 0; color: var(--color-text); font-weight: var(--fw-medium); font-size: var(--fs-h5); line-height: 1.85;
  letter-spacing: .1em; text-align: justify;   /* 稿 18 Medium、字距 1.8px */
}
.ng-treat-list__body p + p { margin-top: 1em; }

/* ── 療程文章內頁（single-ng_treatment.php；Figma 4695:3444；2026-11-10）──
   麵包屑頂 → H1 頂 92（稿 332 → 424，扣麵包屑 21）；H1 32 Bold 主色、下距 30；
   內文 ｜ 88 ｜ 小百科 400（稿 120～832、920～1320，上緣都在 502）。最後一塊與頁尾 --section-gap。
   ≤1180 單欄、小百科在內文上面（§5）。內文樣式（色條 H2、虛線框、表格…）另外討論，目前只有 .ng-single__body 的基本節奏。 */
.ng-treat-post { padding-bottom: var(--section-gap); }
.ng-treat-post__inner { margin-top: 71px; }
.ng-treat-post__title {
  margin: 0 0 30px; color: var(--color-main);
  font-size: 2rem; line-height: 1.5; letter-spacing: var(--ls-body);   /* 稿 32 Bold、字距 1.6px，字級表例外 */
}
.ng-treat-post__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 88px; align-items: start; }
.ng-treat-post__grid > .ng-treat-card { grid-column: 2; grid-row: 1; }   /* DOM 在前（手機排上面），桌機放右欄 */
.ng-treat-post__main { grid-column: 1; grid-row: 1; min-width: 0; }
.ng-treat-post__grid--solo { grid-template-columns: minmax(0, 1fr); }   /* 沒選對應主治項目：沒有小百科，內文不留右欄 */
/* 摘要警訊框（template-parts/treat-post-summary.php；4695:4548）：淺灰底、圓角 5、內距 32、16 行高 1.85；
   引言／條列／收尾之間 16；條列強調色圓點、開頭語強調色 Bold。下距 40 接內文（稿：框底 722 → 下一塊 762）。
   內距與段距使用者 2026-11-10 指定比照蕙林（.gaia-single__summary：padding --space-8、段落下距 --space-4），稿上是 20／0 */
.ng-treat-summary { margin-bottom: 40px; padding: var(--space-8); border-radius: var(--radius); background: var(--color-bg-alt); color: var(--color-text); }
.ng-treat-summary p, .ng-treat-summary li { margin: 0; font-size: var(--fs-p); line-height: 1.85; letter-spacing: var(--ls-body); }
.ng-treat-summary__list { margin: 0; padding-left: 24px; list-style: disc; }
.ng-treat-summary__list li::marker { color: var(--color-accent); }
.ng-treat-summary__list strong { color: var(--color-accent); font-weight: var(--fw-bold); }
.ng-treat-summary > :is(p, ul) + :is(p, ul) { margin-top: var(--space-4); }   /* 權重要高過上面 p 的 margin: 0、排在 __list 的 margin: 0 後面，才蓋得過 */
.ng-treat-post__note { margin-top: 60px; color: var(--color-muted); }
.ng-treat-post__note p { margin: 0; font-size: var(--fs-small); line-height: 1.85; }
.ng-treat-post__note p + p { margin-top: .5em; }

/* 小百科卡（template-parts/treat-post-card.php；4695:4461）：白底、1px 強調色框、圓角 10、內距 40；圖示 110 */
.ng-treat-card {
  display: flex; flex-direction: column; align-items: center; gap: 40px; padding: 40px;
  border: 1px solid var(--color-accent); border-radius: 10px; background: var(--color-bg);
}
.ng-treat-card__head { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }
.ng-treat-card__icon, .ng-treat-card__icon svg { display: block; width: 110px; height: 110px; }
.ng-treat-card__icon .ng-ic-bg { fill: var(--color-accent); }          /* 同首頁主治項目「選中」的配色 */
.ng-treat-card__icon .ng-ic-ring { stroke: var(--color-brand-decorate); }
.ng-treat-card__name { display: flex; flex-direction: column; margin: 0; text-align: center; color: var(--color-main); line-height: 1.85; letter-spacing: 0; }
.ng-treat-card__title { font-weight: var(--fw-bold); font-size: 1.5rem; }   /* 稿 24 Bold，字級表例外 */
.ng-treat-card__en { font-weight: var(--fw-medium); font-size: var(--fs-p); }
.ng-treat-card__body { width: 100%; }
.ng-treat-card__body p { margin: 0; color: var(--color-text); font-size: var(--fs-p); line-height: 1.85; text-align: justify; }
.ng-treat-card__body p + p { margin-top: 1em; }

/* ── 媒體報導頁（page-blog.php；Figma 4625:9423；2026-11-10）──
   卡片沿用 .ng-post-card（沒有摘要），列距 60、欄距 40；卡片到分頁 80；最後一塊與頁尾 --section-gap。
   ≤1180 兩欄、≤759 一欄沿用 .ng-post-cards__list 的 §5 規則（那兩條的 gap 會蓋過這裡的列距）。 */
.ng-media { padding-bottom: var(--section-gap); }
.ng-media-list { margin-top: 79px; }   /* 麵包屑頂 → 卡片頂 100，扣麵包屑 21（同其他內頁第一塊） */
.ng-media-list__inner { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.ng-media-list__list { width: 100%; row-gap: 60px; }
/* 分頁（4625:9745）：14 主色、目前頁強調色 Bold；上一頁／下一頁帶 chevron。項目留 4×6 內距當點擊範圍 */
.ng-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; color: var(--color-main); font-size: var(--fs-small); line-height: 1; }
.ng-pager .page-numbers { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; color: inherit; text-decoration: none; }
.ng-pager a.page-numbers:hover { color: var(--color-accent); }
.ng-pager .page-numbers.current { color: var(--color-accent); font-weight: var(--fw-bold); }
.ng-pager .page-numbers.dots { padding-inline: 2px; }
.ng-pager__chev { flex: none; }

/* ── 文章列表頁：案例故事、衛教新知（含子分類）、標籤、搜尋結果（Figma 4720:3856／4720:8564／4720:9175／4090:542；2026-11-11）──
   卡片沿用 .ng-post-card（template-parts/post-grid.php）。分頁列沿用 .ng-pager，卡片到分頁 80；最後一塊與頁尾 --section-gap。
   ≤1180 卡片兩欄、≤759 一欄沿用 .ng-post-cards__list 的 §5 規則（那兩條的 gap 會蓋過這裡的欄距、列距）。 */
.ng-list, .ng-search { padding-bottom: var(--section-gap); }
.ng-post-grid { width: 100%; }
.ng-post-grid--wide { gap: 80px 40px; }     /* 單欄頁：卡片 373、欄距 40、列距 80 */
.ng-post-grid--narrow { gap: 40px 20px; }   /* 雙欄頁左欄 895：卡片 285、欄距 20、列距 40 */
.ng-edu__main > .ng-pager, .ng-list-wide > .ng-pager, .ng-search__inner > .ng-pager { margin-top: 80px; }
.ng-edu__empty { margin: 0; color: var(--color-muted); }
.ng-list-wide { margin-top: 79px; }   /* 麵包屑頂 → 卡片頂 100，扣麵包屑 21（同其他內頁第一塊） */

/* 雙欄（edu-layout.php）：左欄 1fr｜側欄 244，欄距 61（稿：左欄 120–1015、側欄 1076–1320） */
.ng-edu { display: grid; grid-template-columns: minmax(0, 1fr) 244px; column-gap: 61px; align-items: start; margin-top: 79px; }
.ng-edu__main { min-width: 0; }
/* 標籤頁：橫幅下 54 是「標籤：XXX」（在麵包屑的位置），標題底 → 內容頂 62 */
.ng-list-heading { margin-top: 54px; margin-bottom: 0; color: var(--color-main); font-size: 1.5rem; line-height: 1.85; letter-spacing: var(--ls-heading); }   /* 稿 24 Bold、字距 2.4px，字級表例外 */
.ng-list-heading + .ng-edu { margin-top: 62px; }

/* 分類分頁（edu-tabs.php；4720:8802）：5 欄、間距 10、高 47.5、圓角 5 */
.ng-edu-tabs { margin-bottom: 20px; }
.ng-edu-tabs__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ng-edu-tabs__tab {
  display: flex; align-items: center; justify-content: center; min-height: 47.5px; height: 100%; padding: 5px 8px;
  border: 1px solid var(--color-muted); border-radius: 5px; background: var(--color-bg);
  color: var(--color-muted); font-size: var(--fs-p); line-height: 1.3; letter-spacing: 0; text-align: center; text-decoration: none;
  transition: color .2s ease-out, border-color .2s ease-out, background-color .2s ease-out;
}
.ng-edu-tabs__tab:hover { border-color: var(--color-accent); color: var(--color-accent); }
.ng-edu-tabs__tab.is-current { border-color: var(--color-accent); background: var(--color-accent); color: var(--color-bg); font-weight: var(--fw-bold); }

/* 側欄（edu-sidebar.php；4720:8828）：區塊間距 40；標題 20 Bold 主色、下 10＋12；項目 16、行高 1.25、字距 1.6px、間距 12 */
.ng-edu-side { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.ng-edu-side__block { padding-left: 4px; }
.ng-edu-side__title { margin: 0 0 22px; color: var(--color-main); font-size: var(--fs-h4); line-height: 30px; letter-spacing: 1px; }
.ng-edu-side__list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ng-edu-side__link { color: var(--color-text); font-size: var(--fs-p); line-height: 1.25; letter-spacing: var(--ls-heading); text-decoration: none; transition: color .2s ease-out; }
.ng-edu-side__link:hover, .ng-edu-side__link.is-current { color: var(--color-accent); }
.ng-edu-side__empty { margin: 0; color: var(--color-muted); font-size: var(--fs-p); line-height: 1.25; }   /* 沒資料時的一句提示（五塊都一定輸出） */
.ng-edu-side__tags { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ng-edu-side__tag {
  display: inline-block; padding: 4px 9px; border: 1px solid var(--color-muted); border-radius: 5px;
  color: var(--color-muted); font-size: var(--fs-small); line-height: 1.25; letter-spacing: var(--ls-heading); text-decoration: none;
  transition: color .2s ease-out, border-color .2s ease-out, background-color .2s ease-out;
}
.ng-edu-side__tag:hover { border-color: var(--color-accent); color: var(--color-accent); }
.ng-edu-side__tag.is-current { border-color: var(--color-brand-card-base); background: var(--color-brand-card-base); color: var(--color-bg); }

/* 搜尋框（search-form.php）：--side 側欄 45 高、框線色框、圖示 16；--big 無結果頁 430×48、主色框、圖示 24。圖示強調色 */
.ng-search-form { display: flex; align-items: center; gap: 10px; border: 1px solid var(--color-line); border-radius: 5px; background: var(--color-bg); }
.ng-search-form:focus-within { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.ng-search-form__input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: 0; background: none; color: var(--color-text); font: inherit; font-size: var(--fs-p); letter-spacing: 0; }
.ng-search-form__input:focus { outline: none; }
.ng-search-form__input::placeholder { color: var(--color-muted); opacity: .45; }   /* 稿 #C4C4C4，沒有這個 token，用次要色淡化 */
.ng-search-form__input::-webkit-search-cancel-button { display: none; }
.ng-search-form__btn { display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: var(--color-accent); cursor: pointer; }
.ng-search-form__btn:hover { color: var(--color-accent-hover); }
.ng-search-form--side { height: 45px; padding: 5px 15px; }
.ng-search-form--side .ng-search-form__btn svg { width: 18px; height: 18px; }
.ng-search-form--big { width: 430px; max-width: 100%; height: 48px; padding: 0 19px 0 16px; border-color: var(--color-main); }
.ng-search-form--big .ng-search-form__btn svg { width: 26px; height: 26px; }

/* 搜尋結果（search.php）：沒有橫幅。有結果：頁首下 80 標題（24 Bold 深主色置中），下 80 卡片；無結果：頁首下 160，標題主色，下 30 說明、下 74 搜尋框（稿 60，但稿上說明框多算一個空行 20）*/
.ng-search__inner { display: flex; flex-direction: column; align-items: center; padding-top: 80px; }
.ng-search__title { margin: 0 0 80px; color: var(--color-brand-main-dark); font-size: 1.5rem; line-height: 1.45; letter-spacing: 0; text-align: center; overflow-wrap: anywhere; }   /* 稿 24 Bold，字級表例外 */
.ng-search--empty .ng-search__inner { padding-top: 160px; }
.ng-search--empty .ng-search__title { margin-bottom: 30px; color: var(--color-main); }
.ng-search__msg { margin: 0 0 74px; color: var(--color-text); font-weight: var(--fw-medium); font-size: var(--fs-p); line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.ng-search__msg a { color: var(--color-accent); text-decoration: underline; }
.ng-search__msg a:hover { color: var(--color-accent-hover); }

/* ── 文章內頁：案例故事（單欄 850 置中；Figma 4720:7037）、衛教新知（雙欄；Figma 4720:9504）（single.php；2026-11-11）──
   沒有橫幅：麵包屑（頁首下 60，.ng-breadcrumb）→ 36 → 版面。內文樣式在 prose.css（.ng-prose）。 */
.ng-post { padding-bottom: var(--section-gap); }
.ng-post__layout { margin-top: 36px; }
.ng-post--case .ng-post__main { max-width: 850px; margin-inline: auto; }
.ng-post--edu .ng-post__layout { display: grid; grid-template-columns: minmax(0, 1fr) 329px; column-gap: 61px; align-items: start; }
.ng-post--edu .ng-post__main { min-width: 0; padding-top: 40px; }   /* 稿：衛教標題比側欄低 40 */
/* 標題資訊（4720:7773）：H1 36 Bold 主色、字距 5%；日期＋分類、by 作者 16 內文色、行高 1.5、字距 .8px；彼此間距 10 */
.ng-post__head { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ng-post__title { margin: 0; color: var(--color-main); font-size: var(--fs-h1); line-height: 1.4; letter-spacing: var(--ls-body); }
.ng-post__meta, .ng-post__author { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 0; color: var(--color-text); font-size: var(--fs-p); line-height: 1.5; letter-spacing: var(--ls-body); }
.ng-post__meta a { color: inherit; text-decoration: none; }
.ng-post__meta a:hover { color: var(--color-accent); }
.ng-share { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.ng-post__head .ng-share { margin-top: 4px; }   /* 視覺間距對齊（使用者 2026-11-18）：文字行高 24、字約 16，上下各留約 4 的空白；圖示是實心圓沒有。gap 10＋4，看起來作者→圖示 ≈ 日期→作者 ≈ 18 */
.ng-share__btn { display: flex; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--color-main); cursor: pointer; transition: color .2s ease-out; }
.ng-share__btn:hover { color: var(--color-accent); }
.ng-share__icon { display: block; width: 30px; height: 30px; }
.ng-share__tip { margin-left: 4px; color: var(--color-accent); font-size: var(--fs-small); }
/* 精選圖 850×567（3:2） */
.ng-post__thumb { margin: 60px 0 0; aspect-ratio: 3 / 2; overflow: hidden; background: var(--color-bg-alt); }
.ng-post__img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 目錄（4720:7724）：框線色 1px、圓角 5、內距 30／50，寬度貼內容；H2 組之間 30、組內 10、H3 縮 20 間距 12；16、字距 .1em；hover 強調色底線 */
.ng-post-toc { display: table; max-width: 100%; margin-top: 60px; padding: 30px 50px; border: 1px solid var(--color-line); border-radius: 5px; }
.ng-post-toc__title { margin: 0 0 20px; color: var(--color-main); font-weight: var(--fw-bold); font-size: var(--fs-h5); line-height: 1.45; letter-spacing: var(--ls-heading); }   /* 小標題「內容目錄」（使用者 2026-11-11；稿上沒有，比照側欄標題用主色 Bold 18） */
.ng-post-toc__list, .ng-post-toc__sub { margin: 0; padding: 0; list-style: none; }
.ng-post-toc__list { display: flex; flex-direction: column; gap: 30px; }
.ng-post-toc__sub { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; padding-left: 20px; }
.ng-post-toc__sub > li { position: relative; padding-left: 16px; }
.ng-post-toc__sub > li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; color: var(--color-text); }   /* 第二層以下不編號、用小圓點（使用者 2026-11-11） */
.ng-post-toc a { color: var(--color-text); font-size: var(--fs-p); line-height: 1.45; letter-spacing: var(--ls-heading); text-decoration: none; }
.ng-post-toc a:hover { color: var(--color-accent); text-decoration: underline; }
.ng-post__body { margin-top: 60px; }
.ng-post__body :is(h2, h3, h4, h5, h6)[id] { scroll-margin-top: 96px; }   /* 目錄跳過來時不要被固定頁首蓋住 */
/* 上一篇／下一篇（4720:7920）：案例內文下 160、衛教 60；跟內文同寬；圓圖 75、圖文間距 40；「上一篇」14 強調色、標題 18 Bold 主色；中間 1×30 分隔線 */
.ng-post-nav { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); align-items: center; gap: 24px; margin-top: 160px; }
.ng-post--edu .ng-post-nav { margin-top: 60px; }
.ng-post-nav__line { width: 1px; height: 30px; background: var(--color-line); }
.ng-post-nav__item { display: flex; align-items: center; gap: 40px; min-width: 0; text-decoration: none; }
.ng-post-nav__item--next { flex-direction: row-reverse; text-align: right; }
.ng-post-nav__thumb { flex: none; width: 75px; height: 75px; overflow: hidden; border-radius: 50%; background: var(--color-bg-alt); }
.ng-post-nav__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ng-post-nav__text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ng-post-nav__label { color: var(--color-accent); font-size: var(--fs-small); letter-spacing: var(--ls-body); }
.ng-post-nav__title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  color: var(--color-main); font-weight: var(--fw-bold); font-size: var(--fs-h5); line-height: 1.85; letter-spacing: 0; transition: color .2s ease-out;
}
.ng-post-nav__item:hover .ng-post-nav__title { color: var(--color-accent); }
/* 你可能也會感興趣（4720:7987）：上一篇／下一篇下 60；標題 14 強調色、下 20；卡片 3 欄間距 20。
   上一篇／下一篇與這區都跟內文同寬（使用者 2026-11-11；稿上衛教內縮 40、案例卡片放到 1200 寬） */
.ng-post-related { margin-top: 60px; }
.ng-post-related__title { margin: 0 0 20px; color: var(--color-accent); font-weight: var(--fw-regular); font-size: var(--fs-small); line-height: 1.25; letter-spacing: var(--ls-body); }
/* 直幅廣告區（衛教側欄最上面，329 寬；edu-sidebar.php ad=true） */
.ng-edu-side__ad a { display: block; }
.ng-edu-side__ad-img { display: block; width: 100%; height: auto; }

/* ══════════════════════════════════════════════════════════
   §5 Media Query 清單（改動前先看這張表）

   | 斷點 | 管什麼 | 性質 |
   |---|---|---|
   | max-width:1180px | 頁首：橫列選單藏起、漢堡出現、抽屜可用 | 元件行為：7 項選單＋放大鏡＋CTA 在 1440 量得 1105px，再窄塞不下 |
   | max-width:480px  | 頁首：Logo 50→35、CTA 16px/10×20 → 14px/8×12 | 元件行為：手機稿 2544:197 的縮小版尺寸，公式管不到字級與內距 |
   | (hover: hover)   | 頁首：子選單只在有滑鼠的裝置靠 :hover 打開 | 不是寬度斷點：看的是輸入裝置，寬度公式無從判斷（寫在 §4 下拉規則旁，不在本節） |
   | max-width:1180px | 頁尾：Logo＋院所疊成左欄、選單右欄，兩欄置中；首頁醫師簡介照片縮成 360、間距 48；首頁照片輪播（醫病合照、感謝小卡）一次 2 張、Google 評論與短影音一次 3 張；首頁四大特色兩欄；首頁數字統計兩欄；首頁主治項目面板移到卡片下方、卡片 3 欄；首頁最新消息白卡縮窄、醫師照片縮成 420 壓在白卡右下；門診資訊圖片與院所卡片上下排；關於頁開頭照片縮成 260、間距 48，醫師簡介左欄 300、間距 48，專業證書一次 3 張；文章卡片區兩欄；門診資訊頁診療流程與環境照片兩欄；診療項目頁開頭照片與療程插圖縮成 300、間距 48；療程文章改單欄、小百科在內文上面；衛教雙欄頁欄距 40、分類分頁 3 欄；衛教文章內頁側欄（329）移到內文下面；文章內頁「你可能也會感興趣」只放 2 篇 | 元件行為：平板稿 2545:142 的排法，Logo 從第一欄搬進院所上方是結構換位，auto-fit 做不到 |
   | max-width:759px  | 頁尾：改單欄置中，順序 Logo → 選單 → 院所；首頁主視覺換手機圖、箭頭縮成 36（換圖寫在 section-home-banner.php 的 <source media>，同一個數字，改要兩處一起改）；首頁醫師簡介改單欄；首頁照片輪播（醫病合照、感謝小卡）一次 1 張、照片撐滿開版、箭頭疊在照片上（Google 評論、短影音卡片收成 320 寬）；區塊標題縮成 22 且可斷行；首頁四大特色一欄；首頁數字統計一欄、數字縮成 36；首頁主治項目卡片 2 欄；首頁最新消息分頁膠囊與白卡縮小、醫師照片移到白卡下方並放大；門診資訊卡片內距與字縮小；首頁長影片小標題與播放鈕縮小；內頁橫幅 140 高、標題 26；關於頁開頭與醫師簡介改單欄、照片在上置中，專業證書一次 1 張（270 寬）；文章卡片區一欄；門診資訊頁開頭接麵包屑 40、各段間距 48、診療流程圖示 110、環境照片間距 12、FAQ 字縮小；診療項目頁開頭照片在上、療程列表單欄插圖在上；療程文章接麵包屑 40、H1 26、小百科縮小；媒體報導接麵包屑 40、卡片到分頁 48；文章列表頁（案例、衛教、標籤、搜尋）接麵包屑 40、卡片到分頁 48、衛教雙欄改一欄側欄在下、分類分頁 2 欄、標籤與搜尋標題縮成 20；文章內頁 H1 26、間距 40、上一篇下一篇上下排；404 頁首下 80、提示 20 不強制換行；Cookie 提示文字 14、按鈕滿寬在文字下；側邊浮動按鈕右 8／下 24、間距 10 | 元件行為：手機稿 4584:5887；平板兩欄（院所約 350＋間距 80＋選單 204）在 760 開版 720 以下塞不下，且順序要換 |

   ⚠️ 版面寬度**不靠斷點**，只靠 §2 的兩條公式。
      這張表只能放「某個元件在窄寬度下換行為」的斷點，
      每加一條都要在這裡登記，並說明為什麼公式取代不了它。
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1180px) {
  .site-nav { display: none; }
  .site-burger { display: flex; }
  /* 平板／手機稿的順序是 CTA → 放大鏡 → 漢堡（桌機是 選單 → 放大鏡 → CTA） */
  .site-search-toggle { order: 1; }
  .site-burger { order: 2; }

  /* 首頁醫師簡介：沒有平板稿，照片縮成 360、間距縮成 48 */
  .ng-home-about__inner { grid-template-columns: 360px minmax(0, 1fr); column-gap: 48px; }
  .ng-home-about__title { font-size: var(--fs-h2); line-height: 1.3; }   /* 28：760 寬時文字欄只剩 312，32 會斷行 */
  .ng-gallery__carousel { --per-view: 2; }
  .ng-gallery__carousel.ng-gallery--reviews, .ng-gallery__carousel.ng-gallery--shorts { --per-view: 3; }   /* 直式卡片窄，平板放 3 張（1024 寬時每張約 270，跟桌機一樣大） */
  .ng-home-why__list { grid-template-columns: repeat(2, minmax(0, 270px)); row-gap: 60px; }
  .ng-home-records__list { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; column-gap: 60px; row-gap: 20px; }
  .ng-home-video__list--multi .ng-video__caption { font-size: var(--fs-p); }   /* 三支並排時每支只剩約 230 寬（768），小標題縮成 16 */
  /* 首頁主治項目：面板移到卡片下方，卡片 3 欄、高 180 */
  .ng-home-treat__body { flex-direction: column; }
  .ng-home-treat__tabs { flex: none; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 180px; }
  /* 首頁最新消息（平板）：照片縮成 420，壓在白卡右下（使用者 2026-11-05 指定，參考胡醫師站）。
     照片從白卡頂下 160 開始、往下超出區塊被切；人像不透明的右緣（照片寬 85.6%）對齊開版右緣，所以照片框右邊凸出 60（在 gutter 內被切掉的只有透明部分）。
     白卡寬＝開版 − 206：人像左緣（照片寬 12.9%）壓進白卡 100。整片照片不吃滑鼠，白卡照樣點得到 */
  .ng-home-news__row { display: block; position: relative; }
  .ng-home-news__card { width: calc(100% - 206px); padding: 60px; }
  .ng-home-news__figure { position: absolute; inset: 0; pointer-events: none; }
  .ng-home-news__photo { top: 160px; left: auto; right: -60px; width: 420px; }
  /* 門診資訊：門診表圖片在上、院所卡片在下，兩者寬上限 580 置中 */
  .ng-schedule__body { flex-direction: column; }
  .ng-schedule__table, .ng-schedule__clinics { flex: none; width: min(580px, 100%); }

  /* 頁尾：平板稿 2545:142 */
  .site-footer__main { padding-block: 60px; }
  .site-footer__inner {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas: "logo nav" "clinics nav";
    justify-content: center; align-items: center;
    gap: 40px 80px;
  }
  .site-footer__logo { grid-area: logo; justify-self: start; }
  .site-footer__clinics { grid-area: clinics; gap: 20px; }
  .site-footer__nav { grid-area: nav; margin-inline-end: 0; }
  .site-footer__clinic .site-footer__clinic-name { font-size: var(--fs-h6); }   /* 稿 16 */
  /* 關於頁（2026-11-06，平板沒有設計稿）：開頭照片縮小、醫師簡介左欄縮窄、證書一次 3 張；文章卡片兩欄 */
  .ng-about-intro__inner { grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; }
  .ng-about-profile__inner { grid-template-columns: 300px minmax(0, 1fr); gap: 48px; }
  .ng-about-profile__list { padding-left: 24px; }
  .ng-gallery__carousel.ng-gallery--certificates { --per-view: 3; --ng-gallery-gap: 24px; }
  .ng-post-cards__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
  .ng-edu { column-gap: 40px; }   /* 雙欄頁：欄距 61 → 40，左欄卡片兩欄 */
  .ng-post--edu .ng-post__layout { grid-template-columns: minmax(0, 1fr); row-gap: 80px; }   /* 衛教文章內頁：側欄 329 擺不下，移到內文下面 */
  .ng-post--edu .ng-post__main { padding-top: 0; }
  .ng-post--edu .ng-edu-side { max-width: 329px; }
  .ng-post-related .ng-post-cards__list > li:nth-child(n+3) { display: none; }   /* 文章內頁「你可能也會感興趣」：平板兩欄只放 2 篇，第 3 篇不單獨一排（使用者 2026-11-11） */
  .ng-edu-tabs__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* 門診資訊頁（2026-11-09，平板沒有設計稿）：診療流程兩欄、環境照片兩欄 */
  .ng-clinic-flow__list { grid-template-columns: repeat(2, minmax(0, 270px)); row-gap: 60px; }
  .ng-clinic-env__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 診療項目頁（2026-11-09，平板沒有設計稿）：開頭照片縮成 300、間距 48；療程列表插圖 300、間距 48、列表左右內距拿掉 */
  .ng-treat-intro__inner { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 48px; }
  .ng-treat-intro__title { font-size: var(--fs-h2); line-height: 1.3; }
  .ng-treat-list__list { padding-inline: 0; }
  .ng-treat-list__item { grid-template-columns: 300px minmax(0, 1fr); column-gap: 48px; }
  .ng-treat-list__item:nth-child(even) { grid-template-columns: minmax(0, 1fr) 300px; }
  /* 療程文章（2026-11-10，平板沒有設計稿）：單欄，小百科在內文上面（DOM 順序）；卡片內容收在 640 內置中 */
  .ng-treat-post__grid { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .ng-treat-post__grid > .ng-treat-card, .ng-treat-post__main { grid-column: 1; grid-row: auto; }
  .ng-treat-card__head, .ng-treat-card__body { max-width: 640px; }
}
@media (max-width: 759px) {
  /* 頁尾：手機稿 4584:5887，單欄置中 */
  .site-footer__main { padding-block: 40px; }
  .site-footer__inner {
    grid-template-columns: auto;
    grid-template-areas: "logo" "nav" "clinics";
    justify-content: stretch; justify-items: center;
    row-gap: 60px;
  }
  .site-footer__logo { justify-self: center; }
  .site-footer__clinics { justify-self: center; max-width: 100%; gap: 40px; }   /* 區塊置中、字靠左；320 時撐滿開版 280 */
  .site-footer__menu { column-gap: 40px; }

  /* 首頁醫師簡介：單欄，照片在上置中；灰底帶從照片頂下 28 開始，一路墊到文字下方 */
  .ng-home-about__inner { grid-template-columns: minmax(0, 1fr); }
  .ng-home-about__photo { justify-self: center; width: min(360px, 100%); }
  .ng-home-about__text { padding-block: 40px 60px; gap: 24px; }
  .ng-home-about__title { font-size: var(--fs-h3); }   /* 22 */
  .ng-home-about__lead p { font-size: var(--fs-h5); letter-spacing: .1em; }   /* 18 */
  .ng-home-about__body p { font-size: var(--fs-p); line-height: 1.6; }

  /* 區塊標題：手機開版 280，標題 28＋兩側圓點放不下 → 22，而且允許斷行（「精準，是為了讓你安心」10 個字）；
     兩側線至少留 20，只剩圓點 */
  .ng-section-title__row { gap: 12px; }
  .ng-section-title__text { flex: 0 1 auto; min-width: 0; font-size: var(--fs-h3); line-height: 1.4; white-space: normal; text-wrap: balance; text-align: center;
    word-break: keep-all; overflow-wrap: anywhere; }   /* 只在標點處斷（「每個數字，／都是一次信任」），真的塞不下才硬斷 */
  .ng-section-title__line { flex-basis: 20px; }
  .ng-section-title__br { display: inline; }   /* section-title.php 的 break_mobile：手機在指定標點後強制換行（使用者 2026-11-06） */
  /* 首頁四大特色：一欄，欄寬上限 340；底圖照寬度縮放、靠上，不用 cover 放大（使用者 2026-11-05 裁定，cover 在 375 寬要放大約 1.4 倍、點變糊） */
  .ng-home-why { background-size: 100% auto; }
  .ng-home-why__inner { gap: 60px; }
  .ng-home-why__list { grid-template-columns: minmax(0, 340px); row-gap: 48px; }
  /* 首頁主治項目：卡片 2 欄、高 150、圖示 72；面板內距縮小 */
  .ng-home-treat__inner { gap: 60px; }
  .ng-home-treat__body { gap: 24px; }
  .ng-home-treat__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 12px; }
  .ng-home-treat__icon { width: 72px; height: 72px; }
  .ng-home-treat__name { font-size: var(--fs-p); line-height: 1.4; }
  .ng-home-treat__text { font-size: var(--fs-p); }   /* 手機 16（18 在 280 寬一行只剩 13 字） */
  .ng-home-treat__panel { padding: 32px 24px; gap: 28px; }
  .ng-home-treat__head { padding-bottom: 28px; gap: 12px; }
  .ng-home-treat__text + .ng-home-treat__text { margin-top: -12px; }
  /* 首頁最新消息：分頁膠囊縮成 14／內距 6×18（自動換行，使用者 2026-11-05 裁定）；白卡內距縮小、標題 16、箭頭縮成 36 */
  .ng-home-news { padding-top: 60px; }
  .ng-home-news__inner { gap: 48px; }
  .ng-home-news__tabs { gap: 8px 10px; }
  .ng-home-news__tab { padding: 6px 18px; font-size: var(--fs-small); }
  .ng-home-news { padding-bottom: 0; }
  /* 手機：照片回到白卡下方、左右滿版，放大到視窗寬 120%、上限 560（人像肩寬約占滿畫面，使用者 2026-11-05 要求放大），
     置中；框只露上面 130vw（上限 610，約照片高的 73%） */
  .ng-home-news__card { width: auto; padding: 32px 24px; }
  .ng-home-news__figure { position: relative; inset: auto; margin-inline: calc(var(--gutter) * -1); height: min(130vw, 610px); overflow: hidden; }
  .ng-home-news__photo { position: relative; top: auto; right: auto; left: 50%; width: min(120vw, 560px); transform: translateX(-50%); }
  .ng-home-news__link { grid-template-columns: minmax(0, 1fr) 36px; column-gap: 12px; }
  .ng-home-news__title { font-size: var(--fs-p); }
  .ng-home-news__arrow { width: 36px; height: 14px; }
  .ng-home-news__list { margin-bottom: 40px; }
  /* 門診資訊：間距與字縮小；框標題膠囊縮成 18、可斷行 */
  .ng-schedule__inner { gap: 60px; }
  .ng-schedule__clinic { padding: 24px 20px; }
  .ng-schedule__name { font-size: var(--fs-h4); }   /* 20 */
  .ng-schedule__row dt { font-size: var(--fs-p); }
  .ng-schedule__help-heading { padding: 8px 20px; font-size: var(--fs-h5); line-height: 1.4; }
  .ng-schedule__help-box { margin-top: 24px; padding: 56px 16px 24px; gap: 24px; }
  .ng-schedule__help-title { font-size: var(--fs-h5); line-height: 1.6; }
  .ng-schedule__help-text { font-size: var(--fs-p); }
  /* 院所名稱、說明標題只在空格／標點處斷（「國立陽明交通大學附設醫院／蘭陽院區」），真的塞不下才硬斷 */
  .ng-schedule__name, .ng-schedule__help-heading, .ng-schedule__help-title, .ng-schedule__help-text { word-break: keep-all; overflow-wrap: anywhere; }
  .ng-schedule__name, .ng-schedule__help-title { text-wrap: balance; }
  .ng-schedule__tel { font-size: var(--fs-h5); }
  /* 首頁長影片：小標題 16、播放鈕縮成 56 */
  .ng-home-video__inner { gap: 48px; }
  .ng-home-video__list--multi .ng-video { width: 100%; }
  .ng-video__caption { font-size: var(--fs-p); }
  .ng-video__play { width: 56px; height: 56px; }
  .ng-video__play svg { width: 34px; height: 34px; margin-left: 3px; }
  /* 首頁數字統計：一欄、數字 36／項目 20，上下內距縮成 80／100 */
  .ng-home-records { padding-block: 80px 100px; }
  .ng-home-records__list { grid-template-columns: auto; margin-top: 48px; row-gap: 8px; }
  .ng-home-records__num { font-size: var(--fs-h1); }   /* 36 */
  .ng-home-records__label { font-size: var(--fs-h4); }   /* 20 */
  /* 照片輪播：一次一張，照片撐滿開版（左右各 gutter 20）；箭頭在下方頁碼兩側（2026-11-17 起，原本疊在照片上） */
  .ng-home-moments { padding-block: 60px; }
  .ng-gallery__carousel { --per-view: 1; margin-top: 48px; }
  .ng-home-letters { padding-block: 60px 80px; }
  .ng-gallery__pager { margin-top: 30px; }   /* 照片 → 頁碼 40（扣回按鈕多出的 10） */
  .ng-gallery__carousel.ng-gallery--reviews, .ng-gallery__carousel.ng-gallery--shorts { --per-view: 1; --ng-gallery-gap: 20px; }
  .ng-gallery--reviews .ng-gallery__viewport, .ng-gallery--shorts .ng-gallery__viewport { justify-self: center; width: min(100%, 320px); }   /* 直式 9:16 撐滿 335 寬會高到 595，收成 320 寬（高 569）*/
  .ng-gallery__note { justify-self: center; text-align: center; margin-top: 24px; }
  .ng-gallery__note + .ng-gallery__pager { margin-top: 14px; }
  .ng-home-reviews { padding-block: 60px; }

  /* 首頁主視覺：箭頭照樣疊在圖兩側（使用者 2026-11-05：手機也要有箭頭），縮成 36、離邊 8，少壓一點圖 */
  .ng-home-banner__arrow { width: 36px; height: 36px; }
  .ng-home-banner__arrow svg { width: 18px; height: 18px; }
  .ng-home-banner__arrow--prev { left: 8px; }
  .ng-home-banner__arrow--next { right: 8px; }
  /* 內頁橫幅（2026-11-06，手機沒有設計稿）：200 → 140、標題 32 → 26；麵包屑上距 60 → 24 */
  .ng-page-banner { min-height: 140px; }
  .ng-page-banner__title { font-size: 1.625rem; }
  .ng-breadcrumb { margin-top: 24px; }
  /* 關於頁（手機沒有設計稿）：開頭單欄、照片在上；醫師簡介單欄；證書一次 1 張 270 寬；文章卡片一欄 */
  .ng-about-intro { margin-top: 40px; }
  .ng-about-intro__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ng-about-intro__photo { order: -1; justify-self: center; width: min(260px, 100%); }
  .ng-about-intro__quote { margin-top: 24px; font-size: var(--fs-h3); line-height: 1.5; letter-spacing: var(--ls-heading); }
  .ng-about-intro__body { margin-top: 40px; }
  .ng-about-training { padding-block: 60px; }
  .ng-about-profile__inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .ng-about-profile__side { gap: 40px; }
  .ng-about-profile__photo { align-self: center; width: min(374px, 100%); }   /* __side 是 flex 欄，置中要用 align-self（審查 0b487f9） */
  .ng-about-profile__name { font-size: var(--fs-h2); }
  .ng-about-profile__list { padding-left: 20px; }
  .ng-gallery__carousel.ng-gallery--certificates { --per-view: 1; --ng-gallery-gap: 20px; }
  .ng-gallery--certificates .ng-gallery__viewport { justify-self: center; width: min(100%, 270px); }
  .ng-post-cards__inner { gap: 48px; }
  .ng-post-cards__list { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  /* 門診資訊頁（2026-11-09，手機沒有設計稿）：開頭接麵包屑縮成 40（同關於頁）；診療流程維持兩欄、圖示縮 110；環境照片兩欄、間距 12；FAQ 字縮小 */
  .ng-clinic > .ng-schedule { margin-top: 40px; }
  .ng-clinic-flow { padding-bottom: 60px; }
  .ng-clinic-flow__inner, .ng-clinic-env__inner, .ng-clinic-faq__inner, .ng-clinic-faq__group { gap: 48px; }
  .ng-clinic-flow__list { gap: 40px 20px; }
  .ng-clinic-flow__item { gap: 12px; }
  .ng-clinic-flow__icon { width: 110px; height: 110px; }
  .ng-clinic-flow__title { font-size: var(--fs-h6); letter-spacing: .05em; }
  .ng-clinic-env__grid { gap: 12px; }
  .ng-clinic-faq__group-title { font-size: var(--fs-h4); line-height: 1.4; }
  .ng-clinic-faq__q { padding: 14px 16px; font-size: var(--fs-p); }
  .ng-clinic-faq__answer { padding: 12px 16px; }
  /* 診療項目頁（2026-11-09，手機沒有設計稿）：開頭接麵包屑 40、照片在上置中、灰底只墊文字（照片壓住灰底上緣 60）；
     療程列表單欄、插圖一律在上（最寬 300）、字縮小 */
  .ng-treat-intro { margin-top: 40px; background: none; }
  .ng-treat-intro__inner { grid-template-columns: minmax(0, 1fr); }
  .ng-treat-intro__photo { position: relative; z-index: 1; order: -1; justify-self: center; width: min(320px, 100%); margin-bottom: -60px; }
  .ng-treat-intro__text { margin-inline: calc(-1 * var(--gutter)); padding: 100px var(--gutter) 40px; background: var(--color-bg-alt); }
  .ng-treat-intro__title { margin-bottom: 24px; font-size: var(--fs-h3); letter-spacing: .1em; line-height: 1.4; }
  .ng-treat-intro__body p { font-size: var(--fs-p); }
  .ng-treat-list__inner { gap: 48px; }
  .ng-treat-list__list { padding-block: 0; }
  .ng-treat-list__item, .ng-treat-list__item:nth-child(even) { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .ng-treat-list__item:nth-child(even) .ng-treat-list__media { order: 0; }
  .ng-treat-list__media { justify-self: center; width: min(300px, 100%); }
  .ng-treat-list__text { gap: 24px; }
  .ng-treat-list__title { font-size: var(--fs-h4); line-height: 1.4; }
  .ng-treat-list__body p { font-size: var(--fs-p); }
  /* 療程文章：接麵包屑 40、H1 縮成 26；小百科內距 30／20、圖示 90 */
  .ng-treat-post__inner { margin-top: 19px; }
  .ng-treat-post__title { margin-bottom: 24px; font-size: 1.625rem; line-height: 1.4; }
  .ng-treat-card { gap: 30px; padding: 30px 20px; }
  .ng-treat-card__icon, .ng-treat-card__icon svg { width: 90px; height: 90px; }
  .ng-treat-card__title { font-size: var(--fs-h4); }
  .ng-treat-summary { padding: 20px; }   /* 摘要警訊框：手機內距 32 → 20，320 寬時文字才不會只剩 216 */
  .ng-media-list { margin-top: 19px; }   /* 媒體報導：接麵包屑 40（同其他內頁手機） */
  .ng-media-list__inner { gap: 48px; }
  /* 文章列表頁：接麵包屑 40、卡片到分頁 48；雙欄改一欄、側欄移到卡片下面；分類分頁兩欄 */
  .ng-list-wide, .ng-edu { margin-top: 19px; }
  /* 文章內頁：H1 26、各段間距 40、目錄內距 20／24、上一篇下一篇上下排、衛教的內縮拿掉 */
  .ng-post__layout { margin-top: 24px; }
  .ng-post-related .ng-post-cards__list > li:nth-child(n+3) { display: block; }   /* 手機一欄，3 篇都放回來 */
  .ng-post__title { font-size: 1.625rem; }
  .ng-post__thumb, .ng-post-toc, .ng-post__body { margin-top: 40px; }
  .ng-post-toc { padding: 20px 24px; }
  .ng-post-nav, .ng-post--edu .ng-post-nav { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 60px; }
  .ng-post-nav__line { width: 100%; height: 1px; }
  .ng-post-nav__item { gap: 20px; }
  .ng-post-nav__thumb { width: 60px; height: 60px; }
  .ng-post-nav__item.is-empty { display: none; }
  .ng-post-nav__item.is-empty + .ng-post-nav__line, .ng-post-nav__line:has(+ .is-empty) { display: none; }
  .ng-edu__main > .ng-pager, .ng-list-wide > .ng-pager, .ng-search__inner > .ng-pager { margin-top: 48px; }
  .ng-edu { grid-template-columns: minmax(0, 1fr); row-gap: 60px; }
  .ng-edu-tabs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ng-list-heading { margin-top: 32px; font-size: var(--fs-h4); }
  .ng-list-heading + .ng-edu { margin-top: 24px; }
  .ng-search__inner { padding-top: 48px; }
  .ng-search__title { margin-bottom: 48px; font-size: var(--fs-h4); }
  .ng-search--empty .ng-search__inner { padding-top: 80px; }
  .ng-float { right: 8px; bottom: calc(24px + var(--ng-cookie-h, 0px)); }   /* 浮動按鈕：手機貼近一點 */
  .ng-float__list { gap: 8px; }
  .ng-float__btn, .ng-float__icon { width: 40px; height: 40px; }   /* 手機縮成 40（使用者 2026-11-17：50 壓到內容太多）；仍大於 WCAG 2.5.8 的 24 */
  .ng-cookie__inner { grid-template-columns: minmax(0, 1fr); padding-block: 14px; gap: 12px; }   /* Cookie 提示：文字 14、按鈕滿寬在下面 */
  .ng-cookie__text { font-size: var(--fs-small); line-height: var(--lh-small); }   /* 手機 14／1.85，字距沿用 .05em */
  .ng-cookie__btn { height: 44px; }
  .ng-404__inner { gap: 40px; padding-top: 80px; }   /* 404：頁首下 80、提示到搜尋框 40、提示 20 且不強制換行 */
  .ng-404__msg { font-size: var(--fs-h4); }
  .ng-404__br { display: none; }
}
@media (max-width: 480px) {
  .site-logo img { height: 35px; }               /* 手機稿 90×35 */
  .site-header__inner { gap: 8px; }              /* 手機稿 10；320 開版 280 塞 Logo 90＋放大鏡 29＋CTA 104＋漢堡後只剩 8 的餘裕 */
  .site-cta { padding: 8px 12px; font-size: var(--fs-small); }
  .site-burger { width: 36px; margin-right: -9px; }   /* 高度仍 44；圖示右緣切齊開版（36−18）/2 */
}
