:root {
  --custom-bg: #f7f5f2;
  --custom-text: #5f5a51;
  --custom-gold: #91856b;
}
body.customPage {
  margin: 0;
  background: var(--custom-bg);
  color: var(--custom-text);
  font-family: "Noto Serif TC", serif;
}
.customMain {
  padding-top: 88px;
}
.customIntro {
  max-width: 1800px;
  margin: auto;
  padding: 62px 80px 110px;
}
.customBreadcrumbs {
  display: flex;
  gap: 14px;
  padding-bottom: 42px;
  border-bottom: 1px solid #d7d2ca;
  color: #332f2a;
  font-size: 15px;
}
.customBreadcrumbs i {
  font-style: normal;
}
.customBreadcrumbs b {
  font-weight: 500;
}
/* CR-062：頁籤數量改由後台逐筆決定，不再固定 6 欄，改用可換行的 flex 排列 */
.customTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 1320px;
  margin: 90px auto 0;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(87, 75, 60, 0.04);
}
.customTabs button {
  min-width: 0;
  padding: 15px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #91856b;
  font: inherit;
  font-size: 18px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}
.customTabs button:hover,
.customTabs button:focus-visible {
  color: #d27e3f;
}
.customTabs button:focus-visible {
  outline: 2px solid rgba(239, 153, 85, 0.48);
  outline-offset: 2px;
}
.customTabs button.active {
  background: #ef9955;
  color: #fff;
  box-shadow: 0 8px 18px rgba(206, 123, 56, 0.2);
}
.customIntro header {
  padding-top: 75px;
  text-align: center;
}
.customIntro h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.customIntro header p {
  margin: 22px 0 0;
  font-size: 18px;
  color: #a0998e;
  letter-spacing: 0.08em;
}
.moment {
  position: relative;
  height: 390px;
  overflow: visible;
  background: var(--custom-bg);
}
.moment:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 68%;
  background-image: var(--moment-image);
  background-position: center;
  background-size: cover;
  filter: blur(22px);
  opacity: 0.65;
  mask-image: linear-gradient(to right, #000 0%, #000 68%, transparent 100%);
}
.momentInner {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 1520px;
  height: 100%;
  margin: auto;
  padding: 0 85px;
  grid-template-columns: 48% 52%;
  align-items: center;
}
.moment figure {
  position: relative;
  margin: 0;
  width: 520px;
  justify-self: center;
  transform: rotate(-9deg);
  filter: drop-shadow(0 16px 18px rgba(56, 45, 33, 0.24));
}
.moment figure:before {
  content: "";
  position: absolute;
  inset: -8px;
  background: #fff;
  z-index: -1;
}
.moment figure img {
  display: block;
  width: 100%;
  aspect-ratio: 1.48;
  object-fit: cover;
}
.momentCopy {
  display: grid;
  grid-template-columns: 65px 1fr;
  gap: 24px;
  align-items: start;
}
.momentCopy > span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 35px;
  line-height: 1.35;
  text-align: center;
}
.momentCopy h2 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.7;
  color: #2f2c27;
}
.momentCopy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: #403c36;
}
.moment.reverse .momentInner {
  grid-template-columns: 52% 48%;
}
.moment.reverse figure {
  order: 2;
  transform: rotate(8deg);
}
.moment.reverse .momentCopy {
  order: 1;
}
.moment.reverse .momentCopy > span {
  color: #c9bfaf;
}
.moment.reverse:before {
  left: auto;
  right: 0;
  mask-image: linear-gradient(to left, #000 0%, #000 68%, transparent 100%);
}
.customPlans {
  max-width: 1050px;
  margin: 0 auto;
  padding: 105px 25px 100px;
}
/*
 * CR-062：customPlanContent 內文改由後台維護，但業主指示 HTML 內容維持
 * 切版原樣（.planBox／.priceTable 巢狀 div 排版），不因後台編輯器是通用
 * AiEditor 而簡化結構——樣式沿用切版原始的 class 選擇器，只是 scope 從
 * `.customPlans > header` 改為 `.customPlanContent`（因為外層多包了一層
 * 供 data-custom-panel 切換用）。AiEditor 不認得這些自訂 class，後台一經
 * 編輯即可能被壓平，是已知風險，記錄於 docs/DBSchema.md §5.7.11。
 */
.customPlanContent header {
  text-align: center;
}
.customPlanContent header h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.customPlanContent header p {
  margin: 20px 0 50px;
  color: #aaa397;
  font-size: 17px;
}
.customPlanContent .planBox {
  border: 1px solid #cfc9bc;
}
.customPlanContent .planBox h3 {
  margin: 0;
  padding: 8px 18px;
  background: var(--custom-gold);
  color: #fff;
  font-size: 16px;
  font-weight: 400;
}
.customPlanContent .planBox ul {
  margin: 0;
  padding: 20px 28px 20px 44px;
  list-style: "・";
  font-size: 14px;
  line-height: 2.2;
}
.customPlanContent .planNotes {
  font-size: 13px;
  line-height: 1.8;
}
.customPlanContent .priceTable {
  margin-top: 55px;
  border: 1px solid #cfc9bc;
}
.customPlanContent .priceHead,
.customPlanContent .priceRow {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr 1.5fr 1fr;
}
.customPlanContent .priceHead {
  background: var(--custom-gold);
  color: #fff;
}
.customPlanContent .priceHead span,
.customPlanContent .priceRow span {
  padding: 10px 16px;
  border-right: 1px solid #ddd6c8;
}
.customPlanContent .priceHead span:last-child,
.customPlanContent .priceRow span:last-child {
  border-right: 0;
}
.customPlanContent .priceRow {
  border-top: 1px solid #ddd6c8;
  font-size: 13px;
}
.customPlanContent .priceRemark {
  grid-template-columns: 1.05fr 3.7fr;
}
.customPlanContent .priceRemark span:last-child {
  color: #58534b;
}
.lineConsult {
  display: flex;
  width: 240px;
  height: 58px;
  margin: 45px auto 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 3px;
  background: #47c83e;
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.12em;
}
.lineConsult img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
@media (max-width: 900px) {
  html {
    scroll-padding-top: 62px;
  }
  .customMain {
    padding-top: 62px;
  }
  .customIntro {
    padding: 28px 14px 50px;
  }
  .customBreadcrumbs {
    gap: 8px;
    padding-bottom: 20px;
    font-size: 12px;
  }
  .customIntro header {
    padding-top: 40px;
  }
  .customTabs {
    max-width: none;
    margin-top: 34px;
    padding: 6px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    border-radius: 18px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .customTabs::-webkit-scrollbar {
    display: none;
  }
  .customTabs button {
    min-width: 128px;
    padding: 12px 16px;
    flex: 0 0 auto;
    font-size: 15px;
    scroll-snap-align: start;
  }
  .customIntro h1 {
    font-size: 27px;
    line-height: 1.55;
  }
  .customIntro header p {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.7;
  }
  .moment {
    height: auto;
    overflow: hidden;
    padding: 42px 0;
  }
  .moment:before,
  .moment.reverse:before {
    left: 0;
    right: 0;
    width: 100%;
    filter: blur(18px);
    opacity: 0.45;
    mask-image: none;
  }
  .momentInner,
  .moment.reverse .momentInner {
    display: flex;
    height: auto;
    padding: 0 22px;
    flex-direction: column;
  }
  .moment figure,
  .moment.reverse figure {
    order: 1;
    width: 88%;
    margin: 0 auto 40px;
    transform: rotate(-3deg);
  }
  .moment.reverse figure {
    transform: rotate(3deg);
  }
  .momentCopy,
  .moment.reverse .momentCopy {
    order: 2;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
  }
  .momentCopy > span {
    font-size: 25px;
  }
  .momentCopy h2 {
    font-size: 18px;
    line-height: 1.7;
  }
  .momentCopy p {
    font-size: 14px;
    line-height: 1.85;
  }
  .customPlans {
    padding: 60px 14px 65px;
  }
  .customPlanContent header h2 {
    font-size: 26px;
    line-height: 1.5;
  }
  .customPlanContent header p {
    margin: 14px 0 35px;
    font-size: 14px;
  }
  .customPlanContent .planBox ul {
    padding: 16px 18px 16px 30px;
    font-size: 13px;
  }
  .customPlanContent .priceTable {
    overflow-x: auto;
  }
  .customPlanContent .priceHead,
  .customPlanContent .priceRow {
    min-width: 680px;
  }
  .customPlanContent .priceRemark {
    grid-template-columns: 150px 530px;
  }
  .lineConsult {
    width: 100%;
  }
}
