@layer theme-custom {
/* 2026-07-09 footer 法遵資訊列排版。
   結構改由 msh-legal-v2 patch script 拆成 .msh-legal-row（flex）＋各項 <span>，
   每個 <span> 本身 nowrap 不被切斷、整項為單位換行；長 Email 在手機仍能整串
   放進一行（12px 下約 205px < 手機可用寬）。這裡的 word-break/overflow-wrap
   是保險：CJK 不亂斷、其餘不強制在字中間斷（copyright 那類靠空白換行即可）。 */
footer.msh-footer .msh-footer-legal,
footer.msh-footer .msh-footer-legal p,
footer.msh-footer .msh-footer-legal a {
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

/* 法遵列每一「資訊行」用 flex 置中換行；每個 <span> 是一個不可切斷的完整單位，
   項與項之間用 gap 分隔（取代舊的 ｜），窄螢幕整項掉到下一行、不會字中斷行。 */
footer.msh-footer .msh-footer-legal .msh-legal-row {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: baseline !important;
  column-gap: 14px !important;
  row-gap: 2px !important;
  margin: 0 !important;
}
footer.msh-footer .msh-footer-legal .msh-legal-row > span {
  white-space: nowrap !important;
}

/* 統一編號 61423168 被行動版 Safari 自動辨識成電話號碼 → 變成 tel: 連結＋
   主題金色、可撥號。它不是電話。還原成跟前後文字一致的柔白、去底線、不可點。 */
footer.msh-footer .msh-footer-legal a[href^="tel:"] {
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none !important;
  cursor: text !important;
}

/* Email 與服務條款連結原本吃到主題金黃（品牌不用金黃色），改成與內文一致的柔白。
   服務條款保留底線當可點提示；Email 去底線。 */
footer.msh-footer .msh-footer-legal a {
  color: rgba(255, 255, 255, 0.62) !important;
}
footer.msh-footer .msh-footer-legal a[href^="mailto:"] {
  text-decoration: none !important;
}
footer.msh-footer .msh-footer-legal a[href*="/terms"] {
  text-decoration: underline !important;
}

/* 2026-07-09 footer logo：改用 Glenn 上傳的白色透明 mark（1772x1772，白墨水透明底）。
   這張本身已是白色，直接疊在深藍 footer 就融合，不需要 filter 反白。
   用 content 換掉重建腳本預設抓的橫式 logo；height 設 106px 讓字符視覺大小
   與先前 favicon 版一致（此圖字符佔畫布約 0.77，比 favicon 稍有留白，故略加高）。
   全 CSS、可 rollback。 */
footer.msh-footer .msh-footer-grid img {
  content: url("https://mindstackhouse.com/images/mindstackhouse.com/upload_file/1ffc9e36-157c-4d1f-a1f2-ca601f2c2561.png") !important;
  width: auto !important;
  height: 106px !important;
  filter: none !important;
  -webkit-filter: none !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
}

/* 2026-07-09 聯絡我們頁：內容欄位被覆蓋成 justify-content:flex-start，
   跟外層置中容器不搭，整塊偏左、右邊留大片空白。改回置中對齊。 */
body.b_contact_detail .row.justify-content-md-center {
  justify-content: center !important;
}

/* 2026-07-09 聯絡我們頁：Glenn 要求先移除公司資訊區塊
   （Email/公司名稱/統一編號/Instagram）。用 CSS 隱藏，DOM 仍在、
   隨時可 rollback，比直接改注入腳本安全。 */
body.b_contact_detail .msh-ct-info {
  display: none !important;
}

/* 2026-07-09 聯絡我們頁：CONTACT eyebrow、聯絡我們標題、導言段落全部文字置中。
   外層 row 已置中，但 .page-title（text-align:left）與 .title flex 欄位仍讓
   eyebrow/標題/導言靠左，尤其導言「有合作邀約…」明顯偏左。這裡把整個 intro
   區塊的文字對齊改置中，導言再用 auto margin 讓段落塊本身也置中。 */
body.b_contact_detail .page-title,
body.b_contact_detail .page-title .title,
body.b_contact_detail .page-title .title span,
body.b_contact_detail .msh-ct-lede {
  text-align: center !important;
}
body.b_contact_detail .page-title .title {
  align-items: center !important;
}
body.b_contact_detail .msh-ct-lede {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 2026-07-09 首頁「合作方式」服務卡對齊「關於我們」的互動卡片風格（樣板）。
   卡片改成 About .msh-ab-card 那種：白卡、stone 邊框、柔和 navy 陰影、圓角 12px，
   hover 上浮 2px＋邊框轉 teal＋標題冒 teal 底線；eyebrow 用 SERVICE 01/02（由
   homepage service patch script 注入）；標題與內文改思源宋體，與其他三頁一致。
   互動與 SERVICE 標籤由 tracking code「MSH 首頁合作方式互動卡 (service-v2)」注入。 */
.msh-redesign .msh-service-v2 {
  border: 1px solid var(--ms-stone-200, #dde2e7) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(13, 52, 91, 0.08), 0 1px 2px rgba(13, 52, 91, 0.04) !important;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease !important;
  cursor: pointer;
}
.msh-redesign .msh-service-v2:hover,
.msh-redesign .msh-service-v2:focus-visible {
  border-color: var(--ms-teal-700, #0e5e79) !important;
  box-shadow: 0 12px 28px rgba(13, 52, 91, 0.16), 0 2px 6px rgba(13, 52, 91, 0.08) !important;
  transform: translateY(-2px) !important;
  outline: none;
}
.msh-redesign .msh-service-v2 .msh-service-eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--ms-teal-700, #0e5e79);
  font: 800 11px/1.4 "Noto Sans TC", system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.msh-redesign .msh-service-v2 h3 {
  font-family: "Noto Serif TC", Georgia, serif !important;
  color: var(--ms-navy-950, #061a2e) !important;
  letter-spacing: -.018em !important;
}
.msh-redesign .msh-service-v2:hover h3,
.msh-redesign .msh-service-v2:focus-visible h3 {
  text-decoration: underline !important;
  text-decoration-color: var(--ms-teal-700, #0e5e79) !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 4px !important;
}
.msh-redesign .msh-service-v2 p {
  font-family: "Noto Serif TC", Georgia, serif !important;
  color: var(--ms-stone-600, #5a6573) !important;
}

/* 2026-07-09 首頁「閱讀路徑」卡片：改成真實書籍＋可點擊互動（同 About/合作方式）。
   內容與連結由 tracking code「MSH 首頁閱讀路徑真實書籍 (reading-path-v2)」注入
   （導到 /blog/{slug} 讀書心得頁）；這裡負責 hover 互動＋思源宋體＋序號 teal。 */
.msh-redesign .msh-card-v2 {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease !important;
  cursor: pointer;
}
.msh-redesign .msh-card-v2:hover,
.msh-redesign .msh-card-v2:focus-visible {
  border-color: var(--ms-teal-700, #0e5e79) !important;
  box-shadow: 0 12px 28px rgba(13, 52, 91, 0.16), 0 2px 6px rgba(13, 52, 91, 0.08) !important;
  transform: translateY(-2px) !important;
  outline: none;
}
.msh-redesign .msh-card-v2 .num {
  color: var(--ms-teal-700, #0e5e79) !important;
}
.msh-redesign .msh-card-v2 h3 {
  font-family: "Noto Serif TC", Georgia, serif !important;
  color: var(--ms-navy-950, #061a2e) !important;
}
.msh-redesign .msh-card-v2:hover h3,
.msh-redesign .msh-card-v2:focus-visible h3 {
  text-decoration: underline !important;
  text-decoration-color: var(--ms-teal-700, #0e5e79) !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 4px !important;
}
.msh-redesign .msh-card-v2 p {
  font-family: "Noto Serif TC", Georgia, serif !important;
  color: var(--ms-stone-600, #5a6573) !important;
}
}
