/* 官網專用樣式。共用元件在 glass.css；顏色一律來自 themes.css 的 token。
   玻璃卡上的文字一律用 --ink（疊到 3D 色塊最差仍 ≥ 5.39:1）；
   --soft 只用在實色面板（手機、後台示範）內，--accent 在玻璃上只用於大字與裝飾。 */

:root {
  --display: "Noto Serif TC", "Songti TC", "Source Han Serif TC", "PMingLiU", serif;
  --gap: 16px;
}

html { scroll-padding-top: 84px; }
a { text-underline-offset: 3px; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

html:not(.js) .js-only { display: none !important; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 40;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 12px;
  background: var(--surface-solid); color: var(--ink);
}
.skip:focus { top: 8px; }

/* 導覽列 */
.site-head { position: sticky; top: 8px; z-index: 20; padding-top: 8px; margin-top: 0; }
.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 14px; border-radius: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-family: var(--display); font-weight: 900; font-size: 1.2rem; letter-spacing: .01em;
  color: var(--ink); text-decoration: none;
}
.brand img { display: block; border-radius: 7px; }

.menu { display: none; }
html:not(.js) .menu { display: block; width: 100%; order: 9; }
html:not(.js) .topbar { flex-wrap: wrap; }
.menu.is-open {
  display: block; position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: 18px;
  padding: 8px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .45);
  max-height: calc(100dvh - 96px); overflow-y: auto;
}
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.menu a {
  display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.menu a:hover { background: var(--line); }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 12px;
  background: none; color: var(--ink); font: inherit; font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.top-btn:hover, .top-btn[aria-expanded="true"] { background: var(--line); }
.top-cta { min-height: 44px; padding: 0 16px; }
.only-wide { display: none; }

/* 換色 */
.theme-panel {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .45);
}
.theme-panel.is-open { display: block; }
.theme-now { margin: 0 0 10px; font-size: .95rem; }
.swatches { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.swatch {
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink);
  font: inherit; font-size: .88rem; font-weight: 600; line-height: 1.2; text-align: left; cursor: pointer;
  min-width: 0;
}
.swatch-dot {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--bg2) 0 50%, var(--accent) 50% 100%);
  box-shadow: 0 0 0 1px var(--line);
}
.swatch[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 1px; }

/* 版面 */
.sec { padding-top: clamp(28px, 6vw, 64px); }
.sec-grid { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
.card p:last-child { margin-bottom: 0; }
.card h2 a, .card p a { color: inherit; }
.sec-lede { font-size: 1.05rem; max-width: 44em; }

h1, h2, .view-title, .case-name, .price strong { font-family: var(--display); }
h2 { font-weight: 900; font-size: clamp(1.6rem, 6.4vw, 2.5rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem; margin: 0 0 .5em; }

.eyebrow {
  margin: 0 0 8px; font-size: .9rem; font-weight: 700; letter-spacing: .14em; color: var(--ink);
}

/* 章節：大寫數字 */
.chap, .booking-lead { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(14px, 3vw, 32px); align-items: start; }
.chap-n {
  font-family: var(--display); font-weight: 900; line-height: 1; color: var(--accent);
  font-size: clamp(3.4rem, 15vw, 7.5rem);
}

/* Hero */
.hero-sec { padding-top: 16px; }
.hero { display: grid; gap: 24px; padding: clamp(22px, 5vw, 56px); }
.hero h1 {
  font-size: clamp(2.05rem, 9.2vw, 4.9rem); font-weight: 900; line-height: 1.16;
  letter-spacing: 0; margin-bottom: .45em;
}
.hero h1 span { display: block; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lede { font-size: clamp(1.02rem, 2.6vw, 1.18rem); max-width: 34em; }
.hero-cta { margin-top: 20px; gap: 12px; }
.text-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--ink); font-size: .95rem;
}
.toc { display: none; }
.toc-title { font-family: var(--display); font-weight: 900; font-size: 1.3rem; margin: 0 0 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a {
  display: flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 9px 0;
  color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--line);
}
.toc a span { flex: 1; }
.toc a:hover span { text-decoration: underline; }
.toc i { font-style: normal; font-family: var(--display); font-weight: 600; }

/* 公司介紹 */
.creed dl { margin: 0; }
.creed dl > div { padding: 12px 0; border-top: 1px solid var(--line); }
.creed dt { font-family: var(--display); font-weight: 900; font-size: 1.05rem; }
.creed dd { margin: 2px 0 0; }

/* 勾勾清單 */
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 5px 0 5px 22px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .95em; width: 10px; height: 5px;
  border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg);
}

/* 換色帶 */
.color-head { margin-bottom: 14px; }
.color-head h3 { font-family: var(--display); font-weight: 900; font-size: clamp(1.15rem, 3.6vw, 1.5rem); margin-bottom: .3em; }

/* 預約系統 */
.big-title { font-size: clamp(1.85rem, 8.6vw, 4rem); }
.booking-lead .threes { grid-column: 1 / -1; }
.threes { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.threes li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.threes li:last-child { border-bottom: 0; padding-bottom: 0; }
.threes strong { display: block; font-family: var(--display); font-weight: 900; font-size: 1.28rem; margin-bottom: 4px; }
.threes span { display: block; }
.threes .honest strong::before { content: "誠實說"; display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-family: inherit; font-size: .8rem; font-weight: 700; vertical-align: .2em; }

.view-head { margin-bottom: 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: baseline; }
.view-no { font-size: .9rem; font-weight: 700; letter-spacing: .1em; grid-column: 1 / -1; }
.view-title { font-size: clamp(2.4rem, 11vw, 4.4rem); font-weight: 900; line-height: 1.1; margin: 0; grid-column: 1 / -1; }
.view-head p { grid-column: 1 / -1; margin: 6px 0 0; max-width: 40em; }

.flow { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }

.flow-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0 auto 12px; max-width: 320px; }
.flow-tabs button {
  min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-solid);
  color: var(--ink); font: inherit; font-family: var(--display); font-weight: 900; cursor: pointer; padding: 0;
}
.flow-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* CSS 手機 */
.phone {
  width: min(100%, 300px); margin: 0 auto; padding: 9px; border-radius: 38px;
  background: var(--ink); box-shadow: 0 28px 60px -24px rgba(0, 0, 0, .55);
}
.phone-screen {
  position: relative; height: 520px; border-radius: 30px; overflow: hidden;
  background: var(--surface-solid); color: var(--ink);
  font-size: .9rem; line-height: 1.5;
}
.phone-notch {
  position: absolute; left: 50%; top: 8px; width: 74px; height: 18px; margin-left: -37px; z-index: 2;
  border-radius: 10px; background: var(--ink);
}
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; animation: scr-in .24s ease-out; }
.screen[hidden] { display: none; }
@keyframes scr-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }

.scr-bar {
  flex: none; padding: 34px 14px 10px; font-weight: 700; text-align: center;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.scr-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px; min-height: 0; }
.scr-center { justify-content: center; }
.scr-note { margin: 0; font-size: .8rem; color: var(--soft); }
.scr-sub { margin: 6px 0 0; font-weight: 700; }
.scr-btn {
  display: flex; align-items: center; justify-content: center; min-height: 42px; margin-top: 6px;
  border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 700;
}
.scr-btn.ghost { background: none; color: var(--ink); border: 1px solid var(--line); margin-top: 0; }
.scr-body .scr-btn:first-of-type { margin-top: auto; }

.chat { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.bubble {
  margin: 0; align-self: flex-start; max-width: 86%; padding: 9px 12px; border-radius: 4px 14px 14px 14px;
  background: var(--surface-solid); border: 1px solid var(--line);
}
.richmenu { flex: none; padding: 10px; background: var(--surface-solid); border-top: 1px solid var(--line); }
.rm-on {
  display: flex; align-items: center; justify-content: center; min-height: 84px; border-radius: 12px;
  background: var(--accent); color: var(--on-accent); font-family: var(--display); font-weight: 900; font-size: 1.25rem;
}
.field { padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; }
.field small { display: block; color: var(--soft); font-size: .75rem; }
.chips { display: flex; gap: 6px; }
.mini { flex: 1; text-align: center; padding: 6px 0; border-radius: 999px; border: 1px solid var(--line); }
.mini.on, .dates .on, .slots .on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.check { position: relative; padding: 7px 10px 7px 34px; border: 1px solid var(--line); border-radius: 10px; }
.check::before { content: ""; position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 1px solid var(--soft); border-radius: 4px; }
.check.on { border-color: var(--accent); font-weight: 700; }
.check.on::before { background: var(--accent); border-color: var(--accent); }
.check.on::after { content: ""; position: absolute; left: 14px; top: 50%; width: 9px; height: 4px; margin-top: -4px; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: rotate(-45deg); }
.dates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.dates span, .slots span { text-align: center; padding: 8px 0; border: 1px solid var(--line); border-radius: 9px; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 6px; }
.slots .full { background: var(--line); color: var(--soft); text-decoration: line-through; }
.scr-thanks { margin: 0 0 8px; font-family: var(--display); font-weight: 900; font-size: 1.25rem; line-height: 1.4; text-align: center; }
.my-book, .confirm-card { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); }
.my-book small { color: var(--soft); }
.state {
  align-self: flex-start; margin-top: 6px; padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  border: 1px solid var(--soft); color: var(--ink);
}
.state.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.confirm-card strong { font-family: var(--display); font-weight: 900; font-size: 1.15rem; margin-bottom: 4px; }

.mock-note { margin: 10px 0 0; font-size: .82rem; text-align: center; }

/* 步驟文字 */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.steps li {
  position: relative; counter-increment: st; padding: 12px 8px 12px 44px;
  border-top: 1px solid var(--line); border-radius: 0;
}
.steps li:first-child { border-top: 0; }
.steps li::before {
  content: counter(st); position: absolute; left: 6px; top: 8px;
  font-family: var(--display); font-weight: 900; font-size: 1.7rem; line-height: 1.3; color: var(--ink);
}
.steps strong { display: block; font-size: 1.05rem; }
.steps li[aria-current="step"] { background: var(--surface-solid); border-radius: 12px; border-top-color: transparent; box-shadow: 0 0 0 1px var(--accent); }
.steps li[aria-current="step"] + li { border-top-color: transparent; }
.after { margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--ink); }
.after h4 { font-family: var(--display); font-weight: 900; font-size: 1.15rem; }

/* 後台示範面板 */
.panel-mock {
  align-self: start; padding: 14px; border-radius: 16px; background: var(--surface-solid); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 20px 44px -26px rgba(0, 0, 0, .5); font-size: .92rem; line-height: 1.5;
}
.pm-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 1.05rem; padding-bottom: 8px; }
.pm-head .state { margin: 0; }
.pm-head.sub { margin-top: 14px; }
.pm-row { padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; }
.pm-row p { margin: 2px 0 0; color: var(--soft); }
.pm-top { display: flex; justify-content: space-between; gap: 8px; }
.pm-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.pick { text-align: center; padding: 6px 2px; border: 1px solid var(--line); border-radius: 9px; font-size: .85rem; }
.pick.go { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.pick.off { color: var(--soft); }
.pm-bound { margin: 0 0 10px; padding: 7px 10px; border-radius: 10px; background: var(--bg); font-weight: 600; font-size: .86rem; }
.wk { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 8px; padding: 7px 2px; border-top: 1px solid var(--line); }
.wk small { display: block; color: var(--soft); font-size: .8rem; }
.wk.off span:last-child { color: var(--soft); }

/* 三方接力 */
.relay-title { font-family: var(--display); font-weight: 900; font-size: clamp(1.4rem, 5vw, 2.1rem); margin-bottom: 14px; }
.relay-head { display: none !important; }
.relay-row { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.relay-row strong { font-family: var(--display); font-weight: 900; font-size: 1.15rem; }
.relay-row p { margin: 0; display: grid; grid-template-columns: 3.6em minmax(0, 1fr); gap: 8px; }
.relay-row p::before { content: attr(data-who); font-weight: 700; }

/* 優點 */
.lead-point h3, .point h3, .fit h3, .not-fit h3 { font-family: var(--display); font-weight: 900; line-height: 1.35; }
.lead-point h3, .point h3 { font-size: clamp(1.25rem, 4.6vw, 1.7rem); }
.fit h3 { font-size: 1.35rem; }
.not-fit { border-style: dashed; border-width: 2px; }

/* 案例 */
.case-tag { display: inline-block; margin: 0 0 8px; padding: 2px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .85rem; font-weight: 700; }
.case-name { font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 900; line-height: 1.15; margin-bottom: .1em; overflow-wrap: anywhere; }
.case-sub { font-weight: 700; }
.case .btn { margin-top: 6px; }

/* 方案 */
.plan { display: flex; flex-direction: column; }
.plan-for { margin: 0; font-size: .92rem; font-weight: 700; }
.plan h3 { font-family: var(--display); font-weight: 900; font-size: 1.5rem; margin: 2px 0 12px; }
.plan-main { border: 2px solid var(--accent); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; margin: 0; }
.price s { flex-basis: 100%; font-size: .95rem; }
.price strong { font-size: clamp(2.3rem, 10vw, 2.9rem); font-weight: 900; line-height: 1.15; }
.plan-year { margin: 2px 0 14px; font-size: .92rem; }
.plan .ticks { margin-bottom: 20px; }
.plan .btn { margin-top: auto; }

/* FAQ */
.faq { padding-top: 10px; padding-bottom: 10px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary {
  position: relative; display: flex; align-items: center; min-height: 52px; padding: 10px 34px 10px 0;
  font-weight: 700; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-weight: 900; font-size: 1.5rem; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; }

/* CTA 與頁尾 */
.cta { padding: clamp(26px, 6vw, 64px); text-align: center; }
.cta h2 { font-size: clamp(2rem, 9vw, 4rem); }
.cta-row { justify-content: center; margin-top: 16px; }
.site-foot { padding-top: clamp(28px, 6vw, 64px); padding-bottom: 24px; }
.foot { display: grid; gap: 14px; }
.foot p { margin: 0; }
.foot-brand a:not(.brand) { display: inline-flex; align-items: center; min-height: 44px; }
.foot-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.foot-links a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

/* 內文裡的連結也要好點 */
.sec-lede a, .faq-head p a { display: inline-flex; align-items: center; min-height: 44px; }

/* 手機：章節字浮在左上，內文可以回到整欄寬 */
@media (max-width: 639px) {
  .chap, .booking-lead { display: block; }
  .chap::after { content: ""; display: block; clear: both; }
  .chap-n { float: left; margin: 2px 12px 2px 0; }
  .threes { clear: both; }
}

/* 極窄手機 */
@media (max-width: 359px) {
  .topbar .brand span { display: none; }
  .topbar .brand { min-width: 44px; }
  .flow-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 平板以上 */
@media (min-width: 640px) {
  .swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .threes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .threes li { padding: 16px 0 0; border-bottom: 0; }
  .foot-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .relay-head { display: grid !important; font-weight: 700; border-top: 0; padding-top: 0; }
  .relay-row { grid-template-columns: 7em repeat(3, minmax(0, 1fr)); gap: 12px; }
  .relay-row p { display: block; }
  .relay-row p::before { content: none; }
  .relay-row .none { opacity: .85; }
}

@media (min-width: 880px) {
  .sec-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .sec-grid > * { grid-column: span 12; }
  .sec-grid > .span-4 { grid-column: span 4; }
  .sec-grid > .span-5 { grid-column: span 5; }
  .sec-grid > .span-6 { grid-column: span 6; }
  .sec-grid > .span-7 { grid-column: span 7; }
  .sec-grid > .span-8 { grid-column: span 8; }
  .hero { grid-template-columns: minmax(0, 1fr) 210px; gap: 40px; align-items: stretch; }
  .toc { display: block; border-left: 1px solid var(--line); padding-left: 24px; }
  .flow { grid-template-columns: 320px minmax(0, 1fr); gap: 40px; align-items: start; }
  .flow-rev { grid-template-columns: minmax(0, 1fr) 360px; }
  .flow > .panel-mock:first-child { max-width: 360px; }
  .flow:not(.flow-rev):has(> .panel-mock) { grid-template-columns: 360px minmax(0, 1fr); }
  .phone-col { position: sticky; top: 92px; }
  .view-head { grid-template-columns: auto minmax(0, 1fr); column-gap: 24px; align-items: end; }
  .view-no { grid-column: 1 / -1; }
  .view-title { grid-column: 1; }
  .view-head p { grid-column: 2; margin: 0 0 .5em; }
  .faq-head { display: block; align-self: start; position: sticky; top: 92px; }
  .faq-head .chap-n { float: left; margin: 2px 14px 2px 0; font-size: 5rem; }
  .faq-head::after { content: ""; display: block; clear: both; }
  .swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .theme-panel { left: auto; width: 460px; }
  .theme-panel .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot { grid-template-columns: 1fr auto; align-items: start; }
  .foot-copy { grid-column: 1 / -1; }
}

/* 寬版導覽 */
@media (min-width: 1040px) {
  .menu, .menu.is-open {
    display: block; position: static; background: none; border: 0; padding: 0; box-shadow: none;
    margin-left: 10px; max-height: none; overflow: visible;
  }
  .menu ul { display: flex; gap: 0; }
  .menu a { padding: 0 9px; font-size: .95rem; white-space: nowrap; }
  .menu-btn, .only-narrow { display: none !important; }
  .only-wide { display: inline-flex; }
  .top-cta { padding: 0 20px; }
}
