/**
 * 全站內頁 Premium 內容樣式（首頁除外）。
 * 目標：消除「裸文字置中、左右留白醜陋」，提供舒適閱讀容器、premium 字體排版、
 * 圖片/清單/表格/引言美化，以及一致的標題 Hero 帶。
 * 變數沿用 home-premium.css :root（全站載入）。
 */

/* ===== 內頁底色（與首頁同調的奶油漸層） ===== */
body:not(.home).chic-inner {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}
body:not(.home).chic-inner::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 16% 6%, rgba(216,185,170,.18), transparent 26%),
    radial-gradient(circle at 84% 2%, rgba(49,86,78,.08), transparent 26%),
    linear-gradient(180deg, #fffaf4, #f8f0e8 60%, #fffaf4);
}

/* ===================================================================
 * 標題 Hero 帶
 * =================================================================== */
.page-hero {
  position: relative;
  padding: clamp(48px, 7vw, 92px) clamp(20px, 5vw, 72px) clamp(36px, 5vw, 60px);
  background:
    radial-gradient(circle at 80% 20%, rgba(216,185,170,.28), transparent 40%),
    linear-gradient(120deg, var(--warm), var(--paper));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero::after {
  content: "CHICING";
  position: absolute; right: -1vw; bottom: -28px; z-index: 0;
  color: rgba(49,86,78,.05); font-family: var(--display);
  font-size: clamp(72px, 13vw, 200px); font-weight: 700; line-height: .8; white-space: nowrap; pointer-events: none;
}
.page-hero-inner { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; }
.page-crumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.page-crumb a { color: var(--muted); text-decoration: none; transition: color .25s ease; }
.page-crumb a:hover { color: var(--rose); }
.page-crumb span { color: var(--deep); font-weight: 700; }
.page-crumb__sep { color: var(--line); font-style: normal; }
.page-hero-title {
  margin: 0; font-family: var(--serif); color: var(--ink);
  font-size: clamp(30px, 4.4vw, 56px); font-weight: 600; line-height: 1.15; letter-spacing: 0;
}

/* ===================================================================
 * 內容再排版：修正遷移（WPBakery→內容）造成的「全置中裸文字」亂象
 * ——文字段落左對齊、舒適寬度、含圖段落維持置中、圖片收斂。適用 CPT 內容容器與內文。
 * =================================================================== */
body.chic-inner .chicing-treatment__content,
body.chic-inner .chicing-doctor__content,
body.chic-inner .chicing-testimonial__content {
  max-width: 860px; margin-left: auto; margin-right: auto; text-align: left;
  font-size: 16.5px; line-height: 1.9; color: #4a4039;
}
/* 覆寫遷移殘留的 inline text-align:center：純文字段落改左對齊；含 <img> 之段落維持置中 */
body.chic-inner .chicing-treatment__content p:not(:has(img)),
body.chic-inner .chicing-doctor__content p:not(:has(img)),
body.chic-inner .chicing-testimonial__content p:not(:has(img)),
body.chic-inner .entry-content p:not(:has(img)),
body.chic-inner .elementor-widget-text-editor p:not(:has(img)),
body.chic-inner .ch-legacy-content p:not(:has(img)),
body.chic-inner .chicing-treatment__content li,
body.chic-inner .entry-content li { text-align: left !important; }
/* 段落節奏 */
body.chic-inner .chicing-treatment__content p,
body.chic-inner .chicing-doctor__content p,
body.chic-inner .chicing-testimonial__content p { margin: 0 0 1.2em; }
/* 圖片說明（緊接圖片段落後的 1~2 段＝姓名/職稱）維持置中，形成乾淨小卡 */
body.chic-inner .chicing-treatment__content p:has(img) + p,
body.chic-inner .chicing-treatment__content p:has(img) + p + p,
body.chic-inner .chicing-doctor__content p:has(img) + p,
body.chic-inner .chicing-doctor__content p:has(img) + p + p { text-align: center !important; }
/* 內容圖片：置中呈現、圓角、限制過大 */
body.chic-inner .chicing-treatment__content p:has(img) { text-align: center; margin: 1.4em 0; }

/* ===== CPT 內容：章節節奏、強調色、症狀 pill 清單 ===== */
body.chic-inner .chicing-treatment__content h2,
body.chic-inner .chicing-doctor__content h2 {
  margin: 2.6em 0 1em; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px);
  color: var(--deep); text-align: center; line-height: 1.4; position: relative; padding: 0 0 .55em;
}
body.chic-inner .chicing-treatment__content h2::before { content: none; }
body.chic-inner .chicing-treatment__content h2::after,
body.chic-inner .chicing-doctor__content h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 52px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--rose), var(--clay));
}
body.chic-inner .chicing-treatment__content h3,
body.chic-inner .chicing-doctor__content h3 {
  margin: 2.4em 0 .3em; text-align: center; color: var(--rose);
  font-family: var(--display); letter-spacing: .12em; font-size: 14px; font-weight: 900;
}
body.chic-inner .chicing-treatment__content h2:first-child,
body.chic-inner .chicing-treatment__content h3:first-child { margin-top: .4em; }
/* 遷移殘留的內嵌強調色統一為主題色 */
body.chic-inner .chicing-treatment__content [style*="#800000"],
body.chic-inner .chicing-doctor__content [style*="#800000"],
body.chic-inner .chicing-treatment__content [style*="#8b0000"] { color: var(--rose) !important; }
body.chic-inner .chicing-treatment__content [style*="#808080"],
body.chic-inner .chicing-doctor__content [style*="#808080"] { color: var(--muted) !important; }
/* 內文舒適行距/段距 */
body.chic-inner .chicing-treatment__content p,
body.chic-inner .chicing-doctor__content p { line-height: 1.95; margin: 0 0 1.35em; }
/* 症狀 pill 清單（JS 將 " / " 分隔短句包成 .ch-pill-list） */
body.chic-inner .ch-pill-list {
  display: flex; flex-wrap: wrap; gap: 9px 10px; justify-content: center;
  margin: .2em 0 1.8em; padding: 0; list-style: none;
}
body.chic-inner .ch-pill-list li {
  padding: 8px 17px; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; color: var(--deep); box-shadow: 0 4px 14px rgba(32,24,22,.04);
}

/* 醫師媒體卡（JS 重排：照片左、姓名/職稱/簡介右） */
body.chic-inner .ch-media-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 1.6em 0; }
body.chic-inner .ch-media-card {
  display: grid; grid-template-columns: 128px 1fr; gap: 18px; align-items: center;
  padding: 18px; background: #fff; border: 1px solid rgba(231,221,210,.7); border-radius: 16px;
  box-shadow: 0 12px 34px rgba(32,24,22,.06); text-align: left;
}
body.chic-inner .ch-media-photo img { width: 128px; height: 150px; object-fit: cover; border-radius: 12px; box-shadow: none; display: block; }
body.chic-inner .ch-media-name { margin: 0 0 6px; font-family: var(--serif); font-size: 19px; color: var(--ink); padding: 0; }
body.chic-inner .ch-media-name::before { content: none; }
body.chic-inner .ch-media-text { margin: 0 0 4px; font-size: 13.5px; line-height: 1.7; color: var(--muted); text-align: left !important; }
@media (max-width: 900px) { body.chic-inner .ch-media-list { grid-template-columns: 1fr; } }
@media (max-width: 480px) { body.chic-inner .ch-media-card { grid-template-columns: 92px 1fr; gap: 14px; } body.chic-inner .ch-media-photo img { width: 92px; height: 112px; } }
body.chic-inner .chicing-treatment__content img,
body.chic-inner .chicing-doctor__content img,
body.chic-inner .chicing-testimonial__content img {
  height: auto; max-width: 100%; border-radius: 14px; box-shadow: 0 12px 34px rgba(32,24,22,.08);
}
/* 內容中的空段落收合，避免大量空白 */
body.chic-inner .chicing-treatment__content p:empty,
body.chic-inner .chicing-doctor__content p:empty,
body.chic-inner .entry-content p:empty,
body.chic-inner .elementor-widget-text-editor p:empty,
body.chic-inner .chicing-treatment__content li:empty,
body.chic-inner .chicing-doctor__content li:empty,
body.chic-inner .entry-content li:empty { display: none; }

/* ===================================================================
 * 內頁內容容器（Elementor 與一般內容皆套用舒適閱讀寬度）
 * =================================================================== */
/* Hello 全寬模板的內容包覆 */
body:not(.home).chic-inner .site-main,
body:not(.home).chic-inner .page-content,
body:not(.home).chic-inner .entry-content {
  max-width: 1080px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 40px);
}

/* Elementor 內頁：限制純文字段落寬度以利閱讀，但保留設計型滿版區塊 */
body:not(.home).chic-inner .elementor > .elementor-section-wrap > .elementor-section.elementor-section-boxed > .elementor-container,
body:not(.home).chic-inner .elementor .elementor-widget-text-editor { max-width: 1080px; }
body:not(.home).chic-inner .elementor .elementor-widget-text-editor { margin-left: auto; margin-right: auto; }

/* ===== 排版：標題 ===== */
body:not(.home).chic-inner .entry-content h1,
body:not(.home).chic-inner .entry-content h2,
body:not(.home).chic-inner .entry-content h3,
body:not(.home).chic-inner .elementor-widget-heading .elementor-heading-title {
  font-family: var(--serif); color: var(--ink); line-height: 1.3; letter-spacing: 0;
}
body:not(.home).chic-inner .entry-content h2,
body:not(.home).chic-inner .elementor-widget-heading h2.elementor-heading-title {
  font-size: clamp(24px, 3vw, 34px); margin: 1.6em 0 .6em; position: relative; padding-left: 16px;
}
body:not(.home).chic-inner .entry-content h2::before,
body:not(.home).chic-inner .elementor-widget-heading h2.elementor-heading-title::before {
  content: ""; position: absolute; left: 0; top: .12em; bottom: .12em; width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, var(--rose), var(--clay));
}
body:not(.home).chic-inner .entry-content h3,
body:not(.home).chic-inner .elementor-widget-heading h3.elementor-heading-title {
  font-size: clamp(20px, 2.4vw, 26px); margin: 1.4em 0 .5em;
}

/* ===== 排版：內文 ===== */
body:not(.home).chic-inner .entry-content,
body:not(.home).chic-inner .elementor-widget-text-editor {
  font-size: 16.5px; line-height: 1.9; color: #4a4039;
}
body:not(.home).chic-inner .entry-content p,
body:not(.home).chic-inner .elementor-widget-text-editor p { margin: 0 0 1.2em; }
body:not(.home).chic-inner .entry-content a,
body:not(.home).chic-inner .elementor-widget-text-editor a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
body:not(.home).chic-inner .entry-content a:hover,
body:not(.home).chic-inner .elementor-widget-text-editor a:hover { color: var(--rose); }

/* ===== 圖片 ===== */
body:not(.home).chic-inner .entry-content img,
body:not(.home).chic-inner .elementor-widget-image img {
  border-radius: 14px; box-shadow: 0 14px 40px rgba(32,24,22,.08);
}
body:not(.home).chic-inner .entry-content img { height: auto; max-width: 100%; }

/* ===== 清單 ===== */
body:not(.home).chic-inner .entry-content ul,
body:not(.home).chic-inner .elementor-widget-text-editor ul { list-style: none; padding-left: 0; margin: 0 0 1.4em; }
body:not(.home).chic-inner .entry-content ul > li,
body:not(.home).chic-inner .elementor-widget-text-editor ul > li {
  position: relative; padding-left: 26px; margin-bottom: .6em;
}
body:not(.home).chic-inner .entry-content ul > li::before,
body:not(.home).chic-inner .elementor-widget-text-editor ul > li::before {
  content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px;
  border-radius: 50%; background: var(--rose);
}
body:not(.home).chic-inner .entry-content ol,
body:not(.home).chic-inner .elementor-widget-text-editor ol { padding-left: 1.3em; margin: 0 0 1.4em; }
body:not(.home).chic-inner .entry-content li,
body:not(.home).chic-inner .elementor-widget-text-editor li { line-height: 1.85; }

/* ===== 引言 ===== */
body:not(.home).chic-inner .entry-content blockquote,
body:not(.home).chic-inner .elementor-widget-text-editor blockquote {
  margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--rose);
  background: rgba(255,255,255,.6); border-radius: 0 14px 14px 0; color: var(--muted); font-style: italic;
}

/* ===== 表格（TablePress 等） ===== */
body:not(.home).chic-inner .entry-content table,
body:not(.home).chic-inner .elementor-widget-text-editor table,
body:not(.home).chic-inner table.tablepress {
  width: 100%; border-collapse: collapse; margin: 1.4em 0; background: #fff;
  border-radius: 14px; overflow: hidden; box-shadow: 0 14px 40px rgba(32,24,22,.06);
}
body:not(.home).chic-inner table th { background: var(--deep); color: #fff; font-weight: 700; padding: 14px 16px; text-align: left; }
body:not(.home).chic-inner table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
body:not(.home).chic-inner table tr:nth-child(even) td { background: rgba(242,232,223,.4); }

/* TablePress 門診時刻表：醫師連結/font 標籤改 premium 樣式 */
body:not(.home).chic-inner .tablepress th { text-align: center; white-space: nowrap; }
body:not(.home).chic-inner .tablepress td { line-height: 1.7; }
body:not(.home).chic-inner .tablepress td a { color: var(--green); text-decoration: none; font-weight: 600; }
body:not(.home).chic-inner .tablepress td a:hover { color: var(--rose); text-decoration: underline; }
body:not(.home).chic-inner .tablepress td font { font-size: 13px !important; color: var(--muted) !important; }
body:not(.home).chic-inner .tablepress .column-1 { font-weight: 700; color: var(--deep); background: rgba(242,232,223,.5); white-space: nowrap; }

/* ===== 表單（CF7）——premium 卡片 ===== */
body:not(.home).chic-inner .wpcf7 {
  max-width: 680px; margin: 1.4em auto; padding: clamp(24px, 4vw, 40px);
  background: #fff; border: 1px solid rgba(231,221,210,.8); border-radius: 20px;
  box-shadow: 0 20px 54px rgba(32,24,22,.08);
}
body:not(.home).chic-inner .wpcf7 form > p { margin: 0 0 16px; color: var(--deep); font-size: 14.5px; font-weight: 700; line-height: 1.5; }
body:not(.home).chic-inner .wpcf7 form > p:last-of-type { margin-bottom: 0; }
body:not(.home).chic-inner .wpcf7 .wpcf7-not-valid-tip { font-size: 12.5px; color: var(--rose); font-weight: 400; margin-top: 4px; }
/* 只套用於文字類欄位：勾選框/單選/檔案若被 width:100%+padding+margin-top 打到，
   會撐成整塊並把自己的標籤擠到下一行（＝表單元件偏移）。 */
body:not(.home).chic-inner .wpcf7 input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=file]),
body:not(.home).chic-inner .wpcf7 textarea,
body:not(.home).chic-inner .wpcf7 select {
  width: 100%; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); font-size: 15px; margin-top: 8px; font-weight: 400; color: var(--ink);
  transition: border-color .25s ease, box-shadow .25s ease; box-sizing: border-box;
}
body:not(.home).chic-inner .wpcf7 textarea { min-height: 130px; resize: vertical; }
body:not(.home).chic-inner .wpcf7 input:focus,
body:not(.home).chic-inner .wpcf7 textarea:focus,
body:not(.home).chic-inner .wpcf7 select:focus {
  border-color: var(--rose); outline: none; box-shadow: 0 0 0 3px rgba(168,108,101,.12); background: #fff;
}
body:not(.home).chic-inner .wpcf7 input[type=submit] {
  display: block; width: fit-content; min-width: 200px; margin: 8px auto 0;
  background: var(--deep); color: #fff; border: 0; border-radius: 999px; padding: 15px 40px;
  font-weight: 800; font-size: 16px; cursor: pointer; transition: var(--ease); min-height: 52px;
  box-shadow: 0 10px 26px rgba(23,53,47,.18);
}
body:not(.home).chic-inner .wpcf7 input[type=submit]:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(23,53,47,.28); }
body:not(.home).chic-inner .wpcf7-spinner { margin: 12px auto 0; display: block; }
/* CF7 回應訊息 */
body:not(.home).chic-inner .wpcf7 .wpcf7-response-output {
  margin: 16px 0 0; padding: 12px 18px; border-radius: 12px; font-size: 14px; border-width: 1px;
}

/* ===================================================================
 * 文章封存／搜尋：premium 卡片網格（案例分析/最新消息/分類/搜尋共用）
 * =================================================================== */
body.chic-inner.archive .site-main,
body.chic-inner.search .site-main,
body.chic-inner.blog .site-main {
  max-width: 1240px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 40px);
}
/* 隱藏 Hello 預設封存標題（已由 page-hero 呈現） */
body.chic-inner.archive .page-header,
body.chic-inner.search .page-header,
body.chic-inner.blog .page-header { display: none; }

body.chic-inner.archive .page-content,
body.chic-inner.search .page-content,
body.chic-inner.blog .page-content {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; max-width: none;
}
body.chic-inner .page-content > article.post {
  display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 14px 40px rgba(32,24,22,.07); border: 1px solid rgba(231,221,210,.7);
  transition: var(--ease);
}
body.chic-inner .page-content > article.post:hover {
  transform: translateY(-6px); box-shadow: 0 24px 54px rgba(32,24,22,.13); border-color: var(--clay);
}
/* 縮圖（article 內第二個連結為圖片連結）置頂 */
body.chic-inner .page-content > article.post > a:has(img) {
  order: -1; display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--warm);
}
body.chic-inner .page-content > article.post > a img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; transition: transform .8s cubic-bezier(.16,1,.3,1);
}
body.chic-inner .page-content > article.post:hover > a img { transform: scale(1.05); }
body.chic-inner .page-content > article.post .entry-title {
  font-family: var(--serif); font-size: 19px; line-height: 1.5; margin: 18px 20px 0; padding: 0;
}
body.chic-inner .page-content > article.post .entry-title::before { content: none; }
body.chic-inner .page-content > article.post .entry-title a { color: var(--ink); text-decoration: none; transition: color .25s ease; }
body.chic-inner .page-content > article.post .entry-title a:hover { color: var(--rose); }
body.chic-inner .page-content > article.post .entry-summary,
body.chic-inner .page-content > article.post > p {
  margin: 12px 20px 22px; color: var(--muted); font-size: 14px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* 分頁 */
body.chic-inner .pagination {
  display: flex; justify-content: center; gap: 14px; margin: 48px auto 0; max-width: 1240px;
}
body.chic-inner .pagination a, body.chic-inner .pagination .nav-previous a, body.chic-inner .pagination .nav-next a {
  display: inline-flex; align-items: center; padding: 11px 22px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--deep); text-decoration: none; font-weight: 700; transition: var(--ease);
}
body.chic-inner .pagination a:hover { background: var(--deep); color: #fff; }

@media (max-width: 1024px) {
  body.chic-inner.archive .page-content,
  body.chic-inner.search .page-content,
  body.chic-inner.blog .page-content { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== 重建內容（ch-legacy-content）：影片響應式 + 容器 ===== */
body:not(.home).chic-inner .ch-legacy-content { max-width: 1080px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 40px); }
body:not(.home).chic-inner .ch-video {
  position: relative; width: 100%; aspect-ratio: 16/9; margin: 0 auto 1.4em;
  border-radius: 16px; overflow: hidden; box-shadow: 0 16px 44px rgba(32,24,22,.12); background: #000; max-width: 900px;
}
body:not(.home).chic-inner .ch-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
body:not(.home).chic-inner .ch-list { list-style: none; padding-left: 0; }
body:not(.home).chic-inner .ch-list > li { position: relative; padding-left: 26px; margin-bottom: .6em; line-height: 1.85; }
body:not(.home).chic-inner .ch-list > li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }

/* ===== 寬表格橫向捲動容器（避免整頁被撐寬） ===== */
body.chic-inner .ch-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.4em 0; }
body.chic-inner .ch-table-scroll > table { margin: 0; min-width: 560px; }

/* ===== RWD 通用防溢出（媒體/長字/遷移 Elementor 頁的幽靈橫向捲動） ===== */
/* 媒體不撐破容器 */
body.chic-inner .entry-content img, body.chic-inner .ch-legacy-content img,
body.chic-inner .chicing-treatment__content img, body.chic-inner .chicing-doctor__content img,
body.chic-inner .elementor img, body.chic-inner iframe, body.chic-inner video, body.chic-inner embed {
  max-width: 100%; height: auto;
}
/* 長網址/長字換行 */
body.chic-inner .entry-content, body.chic-inner .ch-legacy-content,
body.chic-inner .chicing-treatment__content, body.chic-inner .chicing-doctor__content,
body.chic-inner .chicing-testimonial__content, body.chic-inner .elementor-widget-text-editor {
  overflow-wrap: break-word; word-break: break-word;
}
/* 手機安全網：夾除內頁主區的幽靈橫向溢出（sticky header 位於 .site-main 之外，不受影響；
   寬表格於 .ch-table-scroll 內獨立捲動，不受影響） */
@media (max-width: 900px) {
  body.chic-inner .site-main { overflow-x: clip; }
}

/* ===================================================================
 * 門診資訊｜各地區診所頁（台北 5987 / 永和 24395 / 台中 6014 / 高雄 6031）
 *
 * 這四頁的 Elementor 內容原本被遷移壓成單一 text-editor blob，已由
 * sql/002-clinic-pages-rebuild.sql 重建為語意結構，以下為對應樣式。
 * 結構：.ch-clinic > .ch-clinic-sec（每個區塊）> .ch-clinic-h（區塊標題）
 * =================================================================== */
body:not(.home).chic-inner .ch-clinic { display: flex; flex-direction: column; gap: clamp(40px, 5vw, 68px); }

/* 區塊標題：與 page-hero 的襯線調性一致，左側細線標記 */
body:not(.home).chic-inner .ch-clinic-h {
  position: relative; margin: 0 0 22px; padding-left: 16px;
  font-family: var(--serif); font-size: clamp(21px, 2.4vw, 28px); font-weight: 600;
  color: var(--deep); line-height: 1.3;
}
body:not(.home).chic-inner .ch-clinic-h::before {
  content: ""; position: absolute; left: 0; top: .18em; bottom: .18em;
  width: 3px; border-radius: 2px; background: var(--rose);
}
body:not(.home).chic-inner .ch-clinic-lead {
  margin: 0 0 22px; color: var(--muted); font-size: 15.5px; line-height: 1.9; max-width: 760px;
}
body:not(.home).chic-inner .ch-clinic-services { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 2; }
body:not(.home).chic-inner .ch-clinic-note { margin: 14px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.8; }

/* 說明/公告清單 */
body:not(.home).chic-inner .ch-clinic-notes {
  list-style: none; margin: 0 0 26px; padding: 22px 24px;
  background: #fff; border: 1px solid rgba(231, 221, 210, .8); border-radius: 16px;
}
body:not(.home).chic-inner .ch-clinic-notes > li {
  position: relative; padding-left: 20px; margin-bottom: .7em; line-height: 1.85; font-size: 14.5px;
}
body:not(.home).chic-inner .ch-clinic-notes > li:last-child { margin-bottom: 0; }
body:not(.home).chic-inner .ch-clinic-notes > li::before {
  content: ""; position: absolute; left: 2px; top: .68em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--clay);
}
/* 休診公告條目多（永和近 20 條），分欄避免拉成一長串 */
body:not(.home).chic-inner .ch-clinic-notice { columns: 2; column-gap: 32px; }
body:not(.home).chic-inner .ch-clinic-notice > li { break-inside: avoid; }
body:not(.home).chic-inner .ch-alert { color: var(--rose); font-weight: 700; }

/* 診所環境相簿：原輪播於遷移時遺失，改以格線呈現（免 JS） */
body:not(.home).chic-inner .ch-clinic-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
}
body:not(.home).chic-inner .ch-clinic-shot { margin: 0; border-radius: 14px; overflow: hidden; background: var(--warm); }
body:not(.home).chic-inner .ch-clinic-shot img {
  display: block; width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 0; box-shadow: none; transition: transform .8s cubic-bezier(.16, 1, .3, 1);
}
body:not(.home).chic-inner .ch-clinic-shot:hover img { transform: scale(1.05); }

/* 診所資訊卡片格線：取代原本一長串 h4+p 的裸文字流 */
body:not(.home).chic-inner .ch-clinic-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px;
}
body:not(.home).chic-inner .ch-info-card {
  padding: 24px 26px; background: #fff; border: 1px solid rgba(231, 221, 210, .8);
  border-radius: 16px; box-shadow: 0 10px 30px rgba(32, 24, 22, .05);
}
body:not(.home).chic-inner .ch-info-title {
  margin: 0 0 12px; padding: 0; font-family: var(--sans); font-size: 14px; font-weight: 800;
  letter-spacing: .04em; color: var(--green); line-height: 1.5;
}
body:not(.home).chic-inner .ch-info-title::before { content: none; }
body:not(.home).chic-inner .ch-info-body { color: var(--ink); font-size: 14.5px; line-height: 1.8; }
body:not(.home).chic-inner .ch-info-body p { margin: 0 0 8px; }
body:not(.home).chic-inner .ch-info-body p:last-child { margin-bottom: 0; }
body:not(.home).chic-inner .ch-info-body a { color: var(--rose); font-weight: 600; }
body:not(.home).chic-inner .ch-info-tel a {
  font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--deep); text-decoration: none;
}
body:not(.home).chic-inner .ch-info-tel a:hover { color: var(--rose); }
body:not(.home).chic-inner .ch-info-en { color: var(--muted); font-size: 12.5px; line-height: 1.65; }
body:not(.home).chic-inner .ch-info-list { list-style: none; margin: 0; padding: 0; }
body:not(.home).chic-inner .ch-info-list > li {
  position: relative; padding-left: 16px; margin-bottom: .55em; font-size: 13.5px; line-height: 1.75;
}
body:not(.home).chic-inner .ch-info-list > li::before {
  content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px;
  border-radius: 50%; background: var(--clay);
}
body:not(.home).chic-inner .ch-info-tags { color: var(--muted); font-size: 13px; }

/* 社群按鈕列（.chic-inline-btn 樣式來自 chicing-core 外掛，此處只排版） */
body:not(.home).chic-inner .ch-clinic-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* 地圖：原 [google_maps] 外掛已不移植，改用免金鑰的 Google 嵌入 */
body:not(.home).chic-inner .ch-clinic-map {
  position: relative; aspect-ratio: 16/7; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(231, 221, 210, .8); box-shadow: 0 14px 40px rgba(32, 24, 22, .07);
}
body:not(.home).chic-inner .ch-clinic-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 案例影音（台中）：沿用既有 .ch-video 響應式框 */
body:not(.home).chic-inner .ch-clinic-videos {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px;
}
body:not(.home).chic-inner .ch-clinic-video { margin: 0; }
body:not(.home).chic-inner .ch-clinic-video .ch-video { margin: 0 0 10px; max-width: none; }
body:not(.home).chic-inner .ch-clinic-video figcaption {
  color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.6;
}

/* 門診表：TablePress 樣式見上方 .tablepress 區塊，此處僅收束外距 */
body:not(.home).chic-inner .ch-clinic-sec .tablepress { margin: 0; }

@media (max-width: 720px) {
  body:not(.home).chic-inner .ch-clinic-notice { columns: 1; }
  body:not(.home).chic-inner .ch-clinic-map { aspect-ratio: 4/3; }
  body:not(.home).chic-inner .ch-info-card { padding: 20px; }
  body:not(.home).chic-inner .ch-clinic-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ===================================================================
 * 預約諮詢頁（QR 區 + 表單區）
 * =================================================================== */
body:not(.home).chic-inner .booking-title {
  font-family: var(--serif); font-size: clamp(26px, 3.2vw, 40px); font-weight: 600;
  color: var(--deep); text-align: center; margin: 0 0 10px; line-height: 1.25;
}
body:not(.home).chic-inner .booking-lead {
  text-align: center; color: var(--muted); font-size: 15px; margin: 0 auto 32px; max-width: 560px;
}
body:not(.home).chic-inner .booking-lead p { margin: 0; }
body:not(.home).chic-inner .booking-qr,
body:not(.home).chic-inner .booking-form { padding: clamp(40px, 5vw, 64px) clamp(20px, 4vw, 40px); }
body:not(.home).chic-inner .booking-qr { background: var(--warm); }

/* QR 卡：每張 QR 與院所名綁在同一張卡，避免各自對齊造成視覺錯位 */
body:not(.home).chic-inner .qr-grid > .elementor-container {
  /* 160px 在實際容器寬（~820px）下只排得下 4 欄，第 5 間院所會落單；140px 讓 5 間同列。 */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px; max-width: 1100px; margin: 0 auto;
}
body:not(.home).chic-inner .qr-card {
  /* Elementor 的 .elementor-col-20 會把欄寬鎖成 20%，在 grid 軌道內只剩 ~38px（卡片被壓成細條）。
     欄寬交給 grid 軌道決定，故覆寫為 100%。 */
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 14px; background: #fff; border: 1px solid rgba(231, 221, 210, .9);
  border-radius: 16px; box-shadow: 0 10px 30px rgba(32, 24, 22, .06);
  transition: transform .28s ease, box-shadow .28s ease;
}
body:not(.home).chic-inner .qr-card:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(32, 24, 22, .12); }
body:not(.home).chic-inner .qr-card > .elementor-widget-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
/* 用結構選擇器而非 widget class：Elementor widget 的自訂 class 存於 _css_classes（底線前綴），
   與 section/column 的 css_classes 不同，靠結構定位較不易受版本差異影響。 */
body:not(.home).chic-inner .qr-card .elementor-widget-image { width: 100%; }
body:not(.home).chic-inner .qr-card .elementor-widget-image img {
  display: block; width: 100%; max-width: 148px; height: auto; margin: 0 auto; border-radius: 8px;
}
body:not(.home).chic-inner .qr-card .elementor-widget-heading .elementor-heading-title {
  margin: 0; font-family: var(--sans); font-size: 14px; font-weight: 700;
  color: var(--deep); text-align: center; line-height: 1.4;
}

/* ===== CF7 舊版 Bootstrap 欄位類別（col-md-*）補救 =====
 * 表單內容仍是舊 rt20 主題留下的 .col-md-* 標記，但 Bootstrap 已不再載入，
 * 於是全部塌成整寬堆疊。這裡直接照 Bootstrap 的 12 欄語意還原：欄數＝span 數。
 * 用 12 欄而非 2 欄，是因為表單同時存在 col-md-6（兩欄）與 col-md-4（三個上傳欄）；
 * 2 欄格線放不下 col-md-4，三個上傳會裂成 2+1。12 欄一次涵蓋所有變體，免逐個 class 補。
 * row-gap 必須為 0：表單內混有多個零高度的 grid item（hidden-fields-container、
 * akismet-fields-container、response-output、<style>），有 row-gap 會替它們各留一道空隙。
 * 列距因此改由 .input-block 的 margin-bottom 負責。 */
body:not(.home).chic-inner .wpcf7 form {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 20px;
  /* stretch（預設值）讓同列的欄位等高，下面才有「列底」可對齊；不可用 align-items:start。 */
  align-items: stretch;
}
body:not(.home).chic-inner .wpcf7 .col-md-3 { grid-column: span 3; }
body:not(.home).chic-inner .wpcf7 .col-md-4 { grid-column: span 4; }
body:not(.home).chic-inner .wpcf7 .col-md-6 { grid-column: span 6; }
body:not(.home).chic-inner .wpcf7 .col-md-12,
body:not(.home).chic-inner .wpcf7 form > p,
body:not(.home).chic-inner .wpcf7 .wpcf7-response-output { grid-column: 1 / -1; }
/* 同列兩欄的標籤長度不一（LINE/WeChat 說明會折成兩行），
   以 flex + margin-top:auto 讓輸入框對齊列底，避免高低參差。
   margin 必須寫滿四邊：表單內容自帶 <style>.input-block{margin:20px 0px}，
   只設 margin-bottom 會讓那 20px 的 top 漏網，每列因此多撐 20px。 */
body:not(.home).chic-inner .wpcf7 .input-block {
  margin: 0 0 18px; min-width: 0; display: flex; flex-direction: column;
}
/* 每個 .input-block 內層還包一層 <p>，會吃到主題的段落邊距(≈20px)與行高(≈31px)：
   標籤列被撐高、列與列之間再多一段空白。歸零後間距只由上面的 margin-bottom 決定。
   這層 <p> 也是「對齊列底」真正要作用的對象：欄位其實包在它裡面，
   而非 .input-block 的直接子層，故由它 flex:1 撐滿列高，再把控制項推到底。 */
body:not(.home).chic-inner .wpcf7 .input-block > p {
  margin: 0; line-height: 1.5; display: flex; flex-direction: column; flex: 1;
}
body:not(.home).chic-inner .wpcf7 .input-block > p > .wpcf7-form-control-wrap { margin-top: auto; }
/* 表單內容留有一個完全沒有欄位的空 .input-block（只含空白字元，故 :empty 打不到），
   它本身高度 0 卻仍吃掉一整段 margin。 */
body:not(.home).chic-inner .wpcf7 .input-block:not(:has(*)) { display: none; }
body:not(.home).chic-inner .wpcf7 .headline {
  display: block; color: var(--deep); font-size: 14.5px; font-weight: 700; line-height: 1.5;
}
body:not(.home).chic-inner .wpcf7 .ft-red { color: var(--rose); margin-right: 2px; }

/* 勾選/單選：橫向排列，點文字也能選（CF7 的 label 已包住 input） */
body:not(.home).chic-inner .wpcf7 .wpcf7-checkbox,
body:not(.home).chic-inner .wpcf7 .wpcf7-radio {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px;
}
body:not(.home).chic-inner .wpcf7 .wpcf7-list-item { margin: 0; }
body:not(.home).chic-inner .wpcf7 .wpcf7-list-item label {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 14.5px; color: var(--ink); font-weight: 400;
}
body:not(.home).chic-inner .wpcf7 .wpcf7-list-item input[type=checkbox],
body:not(.home).chic-inner .wpcf7 .wpcf7-list-item input[type=radio] {
  width: 17px; height: 17px; margin: 0; accent-color: var(--deep); flex: none;
}
/* 檔案上傳：與文字欄位同高的虛線框 */
body:not(.home).chic-inner .wpcf7 input[type=file] {
  width: 100%; margin-top: 8px; padding: 11px 14px; font-size: 14px;
  border: 1px dashed var(--line); border-radius: 12px; background: var(--paper); box-sizing: border-box;
}
body:not(.home).chic-inner .wpcf7 input[type=submit] { grid-column: 1 / -1; margin-top: 16px; }
body:not(.home).chic-inner .wpcf7-spinner { grid-column: 1 / -1; }

/* ===== RWD ===== */
@media (max-width: 720px) {
  /* 表單單欄化：多欄在窄螢幕會把 placeholder 擠到不可讀。
     格線維持 12 欄、改讓每個 col-md-* 佔滿：若把 grid-template-columns 改成單欄，
     span 3/4/6 會向外長出隱式欄位而破版。 */
  body:not(.home).chic-inner .wpcf7 .col-md-3,
  body:not(.home).chic-inner .wpcf7 .col-md-4,
  body:not(.home).chic-inner .wpcf7 .col-md-6 { grid-column: 1 / -1; }
  body:not(.home).chic-inner .qr-grid > .elementor-container { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body:not(.home).chic-inner .site-main,
  body:not(.home).chic-inner .entry-content { padding: 32px 20px; }
  body.chic-inner.archive .page-content,
  body.chic-inner.search .page-content,
  body.chic-inner.blog .page-content { grid-template-columns: 1fr; }
  body:not(.home).chic-inner .ch-legacy-content { padding: 32px 18px; }
  body:not(.home).chic-inner table th { padding: 11px 12px; }
  body:not(.home).chic-inner table td { padding: 10px 12px; }
}
