/* 醫美版樣式（DESIGN.md v2 同業慣例版）。品牌色由資料檔 brand 帶入：--primary --ink --bg --soft */
:root {
  --surface: #FFFFFF; --deep: #3B332D; --body: #5E544C; --muted: #6E6158; --line: #DCD2C6;
  --care: #7A6A5B; --warn: #7A3B22; --warn-bg: #F4E9E1; --on-primary: #FFFFFF;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.85; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
/* Picture 不建立額外版面盒，既有圖片裁切與 grid 排版保持不變。 */
picture.asset-picture { display: contents; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-heading, var(--font-body)); font-weight: 600; line-height: 1.35; margin: 0; letter-spacing: .04em; }
p { margin: 0 0 1em; }
[id] { scroll-margin-top: 88px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 880px; margin-left: auto; margin-right: auto; }
.en { font-family: var(--font-accent, var(--font-body)); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-size: .8rem; }
.demo-banner { background: #FFF4D6; color: #4A3A0B; font-size: .85rem; text-align: center; padding: 8px 16px; }
.demo-banner a { color: #4A3A0B; font-weight: 600; margin-left: 6px; }

/* 區塊與區塊標題：中文大標＋英文小字＋短線，置中是類別慣例 */
.sec { padding: 96px 0; }
.sec.tint { background: var(--soft); }
.sec.card { background: var(--surface); }
.sec-head { text-align: center; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.sec-head .en { display: block; margin-top: 8px; }
.sec-head::after { content: ""; display: block; width: 36px; height: 1px; background: var(--primary); margin: 18px auto 0; }
.center { text-align: center; margin-top: 44px; }

/* 按鈕：膠囊形，文字寫出點了會發生什麼 */
.btn { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; padding: 10px 22px; border-radius: 99px; font-size: .92rem; text-decoration: none; border: 1px solid var(--primary); color: var(--primary); background: transparent; transition: background .2s ease-out, color .2s ease-out; letter-spacing: .06em; }
.btn::after { content: "→"; }
.btn:hover { background: var(--primary); color: var(--on-primary); }
.btn.solid { background: var(--primary); color: var(--on-primary); }
.btn.solid:hover { filter: brightness(.88); }
.btn:focus-visible, a:focus-visible, summary:focus-visible, label:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* 頁首；手機用原生 <details> 當選單，不需要 JavaScript */
.hd { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hd .wrap { display: flex; align-items: center; height: 72px; gap: 32px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo img { width: 36px; height: 36px; }
.logo span { display: flex; flex-direction: column; line-height: 1.25; }
.logo b { font-family: var(--font-heading, var(--font-body)); font-size: 1.2rem; font-weight: 600; letter-spacing: .1em; }
.logo small { font-family: var(--font-accent, var(--font-body)); font-size: .8rem; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.nav { display: flex; gap: 28px; font-size: .92rem; }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--primary); }
.mnav { display: none; position: relative; }
.mnav summary { list-style: none; cursor: pointer; display: grid; place-items: center; min-height: 44px; white-space: nowrap; flex-shrink: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav nav { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); min-width: 180px; padding: 8px 0; }
.mnav nav a { display: block; padding: 10px 18px; text-decoration: none; }

/* 首頁首屏：大圖（右下大圓角）＋直排品牌標語；H1 另外放 */
.hero { position: relative; padding-bottom: 36px; }
.hero-grid { display: grid; grid-template-columns: 1fr 360px; grid-template-rows: minmax(0, 1fr); height: min(640px, calc(100vh - 110px)); }
.hero-img { position: relative; border-bottom-right-radius: 160px; overflow: hidden; min-height: 0; }
.hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px; padding: 40px 24px; }
.vt { writing-mode: vertical-rl; font-family: var(--font-heading, var(--font-body)); font-size: 2.5rem; font-weight: 500; letter-spacing: .3em; line-height: 1.8; max-height: 380px; margin: 0; }
.vt small { display: block; font-size: .95rem; letter-spacing: .3em; color: var(--muted); margin-right: 18px; }
.hero h1 { text-align: center; font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin-top: 30px; letter-spacing: .12em; padding: 0 16px; }
.hero-action { text-align: center; margin-top: 24px; }
.hero .en-line { display: block; text-align: center; letter-spacing: .6em; margin-top: 10px; }

/* 醫師：拱形大照片 */
.doc-grid { display: grid; grid-template-columns: 440px 1fr; gap: 72px; align-items: center; }
.doc-grid + .doc-grid { margin-top: 72px; }
.arch { position: relative; isolation: isolate; }
.arch-frame { aspect-ratio: 4/5; border-radius: 220px 220px 0 0; overflow: hidden; background: var(--soft); }
.arch-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.arch::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--primary); border-radius: 220px 220px 0 0; z-index: -1; }
.doc-name { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.doc-name h3, .doc-name h1 { font-size: 2.2rem; }
.doc-name span { font-family: var(--font-heading, var(--font-body)); font-size: 1.1rem; color: var(--muted); }
.doc-title { color: var(--primary); font-size: .98rem; margin-bottom: 22px; }
.cred { list-style: none; padding: 0; margin: 0 0 26px; border-top: 1px solid var(--line); }
.cred li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; display: flex; gap: 14px; }
.cred li::before { content: "—"; color: var(--primary); }
.quote { font-family: var(--font-heading, var(--font-body)); font-size: 1.05rem; line-height: 2; padding-left: 22px; border-left: 1px solid var(--line); margin: 0 0 28px; }

/* 理念：圖文左右 */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.about-img { border-radius: 0 120px 0 0; overflow: hidden; aspect-ratio: 5/4; }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about h2 { font-size: 1.7rem; margin: 10px 0 20px; }
.about p { color: var(--body); }

/* 療程分類：CSS radio 切換，內容都在 HTML 裡 */
.tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 36px; flex-wrap: wrap; }
.tabs label { cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; padding: 7px 20px; border-radius: 99px; border: 1px solid var(--primary); color: var(--primary); font-size: .92rem; transition: background .2s ease-out; }
.tx-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.panel { display: none; background: var(--surface); padding: 44px; grid-template-columns: 380px 1fr; gap: 52px; align-items: center; }
.panel img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.panel h3 { font-size: 1.7rem; }
.panel .en { display: block; margin: 4px 0 22px; }
.tx-list { list-style: none; margin: 0 0 28px; padding: 0; }
.tx-list a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 12px 2px; border-bottom: 1px solid var(--line); text-decoration: none; }
.tx-list a:hover { color: var(--primary); }
.tx-list small { color: var(--muted); font-size: .82rem; text-align: right; }

/* 初診流程 */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); list-style: none; margin: 0; padding: 0; }
.flow li { padding: 28px 24px 8px; border-right: 1px solid var(--line); }
.flow li:last-child { border-right: 0; }
.flow .en { color: var(--primary); }
.flow h3 { font-size: 1.2rem; margin: 6px 0 10px; }
.flow p { font-size: .92rem; color: var(--body); margin: 0; }

/* 文章卡 */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post { text-decoration: none; display: block; }
.post .ph { aspect-ratio: 4/3; overflow: hidden; border-radius: 0 60px 0 0; margin-bottom: 16px; background: var(--soft); }
.post img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease-out; }
.post:hover img { transform: scale(1.04); }
.post h3 { font-size: 1.1rem; margin-bottom: 8px; }
.post p { font-size: .9rem; color: var(--muted); margin: 0 0 10px; }
.meta { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }

/* 常見問題 */
.qa { max-width: 860px; margin: 0 auto; }
.qa details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.qa summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--primary); transition: transform .2s ease-out; }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details p { margin: 12px 0 0; color: var(--body); font-size: .94rem; }

/* 診所環境：一大兩小 */
.env { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 380px; gap: 14px; }
.env img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }

/* 門診時間 */
.hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
table.ht { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ht th, .ht td { border-bottom: 1px solid var(--line); padding: 10px 6px; text-align: center; font-weight: 400; }
.ht th:first-child, .ht td:first-child { text-align: left; color: var(--muted); }
.ht .on { color: var(--primary); }
.addr { margin-top: 22px; }
.map-link { display: grid; place-items: center; min-height: 280px; background: var(--soft); text-decoration: none; color: var(--primary); }

/* 療程頁 */
.t-hero { position: relative; height: 380px; overflow: hidden; }
.t-hero img { width: 100%; height: 100%; object-fit: cover; }
.t-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(246 242 236 / .95) 0%, rgb(246 242 236 / .8) 42%, rgb(246 242 236 / 0) 72%); }
.t-hero .wrap { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; }
.crumb { font-size: .82rem; color: var(--muted); margin-bottom: 16px; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--primary); }
.t-hero h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); }
.t-hero .en { margin-top: 6px; }
.review { font-size: .86rem; color: var(--body); margin-top: 18px; max-width: 560px; line-height: 1.7; }
.review a { color: var(--primary); }
.lead { font-size: 1.08rem; color: var(--ink); background: var(--surface); padding: 26px 30px; margin: 0 0 32px; line-height: 1.95; }
.toc { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; margin-bottom: 8px; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; color: var(--primary); text-decoration: none; }
.t-sec { padding: 56px 0 0; }
.t-sec > h2 { font-size: 1.5rem; margin-bottom: 20px; display: flex; align-items: baseline; gap: 14px; }
.t-sec > h2 .en { font-size: .72rem; }
.fit { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.fit li { text-align: center; }
.fit b { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; background: var(--soft); font-family: var(--font-heading, var(--font-body)); font-size: 1.1rem; font-weight: 600; color: var(--primary); margin-bottom: 12px; }
.fit span { font-size: .88rem; color: var(--muted); }
.warn { background: var(--warn-bg); color: var(--warn); padding: 26px 30px; }
.warn h2 { font-size: 1.25rem; margin-bottom: 12px; }
.warn ul { margin: 0 0 12px; padding-left: 1.2em; }
.warn p { margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border: 1px solid var(--line); padding: 26px 24px; }
.steps .en { color: var(--primary); }
.steps h3 { font-size: 1.15rem; margin: 6px 0 10px; }
.steps p { font-size: .92rem; color: var(--body); margin: 0; }
.prose { color: var(--body); margin-top: 20px; }
.recov { width: 100%; border-collapse: collapse; }
.recov th, .recov td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .95rem; }
.recov th { width: 130px; font-family: var(--font-heading, var(--font-body)); color: var(--primary); font-weight: 600; }
.contact-if { margin-top: 16px; font-size: .95rem; background: var(--surface); padding: 16px 20px; border: 1px solid var(--line); }
.care { background: var(--care); padding: 36px; }
.care > h2 { color: #fff; font-size: 1.5rem; margin-bottom: 20px; }
.care-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.care-card { background: var(--surface); padding: 28px 30px; }
.care-card h3 { color: var(--primary); font-size: 1.1rem; margin-bottom: 12px; }
.care-card ul { margin: 0; padding-left: 1.2em; font-size: .93rem; color: var(--body); }
.refs { font-size: .88rem; color: var(--body); padding-left: 1.2em; }
.signer { display: grid; grid-template-columns: 88px 1fr auto; gap: 22px; align-items: center; background: var(--surface); padding: 22px 26px; margin-top: 48px; }
.signer img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.signer b { font-family: var(--font-heading, var(--font-body)); font-size: 1.15rem; }
.signer p { margin: 2px 0 0; font-size: .88rem; color: var(--muted); }
.clinic-box { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 24px; font-size: .92rem; color: var(--body); }
.cta { background: var(--deep); color: #fff; text-align: center; padding: 80px 0; margin-top: 80px; }
.cta h2 { font-size: 1.8rem; margin-bottom: 10px; }
.cta p { color: #CFC4B7; }
.cta .btn { border-color: #fff; color: #fff; }
.cta .btn:hover { background: #fff; color: var(--deep); }
.cta a:focus-visible, .ft a:focus-visible { outline-color: #fff; }

/* 療程總覽：桌機作品牆，手機全寬療程列 */
.filter { display: flex; justify-content: center; gap: 22px; margin-bottom: 36px; flex-wrap: wrap; font-size: .95rem; }
.filter a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); padding: 8px 4px; }
.filter a:hover { color: var(--primary); border-bottom: 1px solid var(--primary); }
.wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; align-items: start; }
.wall a { text-decoration: none; display: block; }
.wall a:nth-child(3n + 2) { margin-top: 56px; } /* 交錯：中間那欄往下錯開 */
.wall .ph { overflow: hidden; background: var(--soft); aspect-ratio: 4/5; }
.wall img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease-out; }
.wall a:hover img { transform: scale(1.04); }
.wall .cap { margin-top: 10px; font-size: .8rem; color: var(--muted); }
.wall .cap b { display: block; font-family: var(--font-heading, var(--font-body)); font-size: 1.15rem; color: var(--ink); font-weight: 600; margin: 2px 0; }
.wall-recovery::before { content: '｜'; }

/* 浮動預約章（桌機）；手機改底部列 */
.badge { position: fixed; right: 28px; bottom: 28px; z-index: 40; width: 112px; height: 112px; border-radius: 50%; background: var(--surface); box-shadow: 0 10px 24px -14px rgb(59 51 45 / .5); display: grid; place-items: center; text-decoration: none; }
.badge svg { position: absolute; inset: 0; animation: spin 18s linear infinite; }
.badge b { font-family: var(--font-heading, var(--font-body)); font-size: .86rem; color: var(--primary); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }
.mbar { display: none; }

/* 頁尾（含醫療機構網際網路資訊管理辦法第 4 條的禁止轉錄聲明） */
.ft { background: var(--deep); color: #E9E1D6; padding: 64px 0 28px; margin-top: 0; }
.ft-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.ft h2 { font-size: 1rem; margin-bottom: 14px; color: #fff; }
.ft p, .ft li { font-size: .9rem; color: #CFC4B7; }
.ft ul { list-style: none; margin: 0; padding: 0; }
.ft a { text-decoration: none; }
.ft a:hover { color: #fff; }
.ft .logo b { color: #fff; }
.ft .logo small { color: #CFC4B7; }
.notice { border-top: 1px solid rgb(255 255 255 / .14); margin-top: 36px; padding-top: 18px; font-size: .8rem; color: #CFC4B7; }

@media (max-width: 860px) {
  .nav { display: none; }
  .mnav { display: block; }
  .hd .wrap .btn { display: none; }
  .hd .wrap { gap: 12px; padding-inline: 16px; }
  .logo, .logo span { min-width: 0; }
  .logo small { overflow-wrap: anywhere; }
  .sec { padding: 64px 0; }
  .hero-grid { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .hero-img { aspect-ratio: 4/3; border-bottom-right-radius: 90px; }
  .hero-copy { position: absolute; right: 14px; top: 24px; padding: 18px 12px; background: rgb(246 242 236 / .9); }
  .vt { font-size: 1.5rem; max-height: 260px; }
  .vt small { display: none; }
  .hero .en-line { letter-spacing: .4em; }
  .doc-grid, .about-grid, .hours-grid { grid-template-columns: 1fr; gap: 40px; }
  .arch { margin: 0 24px; }
  .panel { grid-template-columns: 1fr; padding: 22px; gap: 22px; }
  .flow { grid-template-columns: 1fr; }
  .flow li { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 4px; }
  .cols, .steps, .care-grid { grid-template-columns: 1fr; }
  .env { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .env img:first-child { grid-column: 1 / -1; aspect-ratio: 16/10; }
  .env img { aspect-ratio: 1; }
  .t-hero { min-height: 240px; height: auto; }
  .t-hero img { position: absolute; inset: 0; }
  .t-hero::after { background: linear-gradient(0deg, rgb(246 242 236 / .97) 25%, rgb(246 242 236 / .35) 100%); }
  .t-hero .wrap { position: relative; min-height: 240px; justify-content: flex-end; padding-top: 24px; padding-bottom: 20px; }
  .hours-grid > div { min-width: 0; }
  .ht-scroll { position: relative; max-width: 100%; overflow-x: auto; } /* relative：讓表格內絕對定位的報讀文字被捲動框裁切，不撐寬整頁 */
  table.ht { min-width: 420px; }
  .fit { grid-template-columns: repeat(2, 1fr); }
  .care { padding: 24px 18px; }
  .signer { grid-template-columns: 64px 1fr; }
  .signer img { width: 64px; height: 64px; }
  .signer .btn { grid-column: 1 / -1; justify-content: center; }
  .wall { grid-template-columns: 1fr; gap: 0; }
  .wall a { min-width: 0; border-top: 1px solid var(--line); padding: 16px 0; }
  .wall a:last-child { border-bottom: 1px solid var(--line); }
  .wall a:nth-child(3n + 2), .wall a:nth-child(even) { margin-top: 0; }
  .wall .ph, .wall-category { display: none; }
  .wall .cap { margin: 0; font-size: .9rem; line-height: 1.7; }
  .wall .cap b { font-size: 1.15rem; margin: 0 0 4px; }
  .wall-indication, .wall-recovery { display: block; overflow-wrap: anywhere; }
  .wall-indication::before { content: '適應症：'; }
  .wall-recovery::before { content: none; }
  .ft-grid { grid-template-columns: 1fr; gap: 28px; }
  .badge { display: none; }
  .mbar { display: grid; grid-template-columns: 1fr 1fr 1.3fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .mbar a { text-align: center; padding: 13px 0; font-size: .9rem; text-decoration: none; }
  .mbar a.line { background: #06C755; color: #03210F; font-weight: 600; }
  body { padding-bottom: calc(50px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge svg { animation: none; }
  *, *::before, *::after { transition: none !important; }
}

/* 專欄文章內文 */
.article-body { color: var(--ink); font-size: 1.02rem; line-height: 1.95; }
.article-body h2 { font-size: 1.35rem; margin: 40px 0 12px; }
.article-body h3 { font-size: 1.12rem; margin: 28px 0 10px; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1em; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--primary); font-weight: 600; }

/* 窄手機：英文標語字距縮小，避免左右被切掉 */
@media (max-width: 480px) {
  .hero .en-line { letter-spacing: .2em; padding: 0 16px; }
}
