/* =====================================================================
   台德生醫 TD Biomedical — Split Frame
   固定影像畫框（左）＋ 卡片軌道（右）
   色彩只從影像進入；介面維持紙張般的灰階。
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;            /* 頁面底色；所有凹角都以它填滿 */
  --surface: #f3f3f0;       /* 卡片 */
  --surface-hover: #eaeae6;
  --surface-sunk: #e4e4de;
  --fg: #161615;
  --fg-2: #3b3b38;
  --muted: #64635e;
  --line: rgba(22, 22, 21, 0.09);
  --line-strong: rgba(22, 22, 21, 0.2);
  --ink: #161615;
  --on-ink: #fafaf8;
  --on-ink-muted: rgba(250, 250, 248, 0.64);
  --accent: #07aeaf;
  --accent-deep: #067f80;
  --ok: #2d6a48;
  --err: #a2342a;
  --scrim: rgba(12, 12, 11, 0.92);
  --foot-bg: #161615;
  --foot-fg: #fafaf8;
  --foot-muted: rgba(250, 250, 248, 0.64);

  --f-sans: "Noto Sans TC", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft JhengHei", Roboto, sans-serif;
  --f-mono: "Roboto Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --t-xs: 0.78125rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.0625rem;
  --t-lg: 1.1875rem;
  --t-xl: clamp(1.3rem, 1.05rem + 0.55vw, 1.65rem);
  --t-2xl: clamp(1.35rem, 1rem + 0.7vw, 1.7rem);
  --t-3xl: clamp(1.75rem, 1.2rem + 1vw, 2.25rem);

  --pad: 12px;
  --hdr-h: 46px;
  --card-p: clamp(22px, 1rem + 1.6vw, 48px);
  --radius: 14px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --notch: 18px;
  --pill: 999px;

  --shadow-1: 0 1px 2px rgba(22, 22, 21, 0.05), 0 10px 30px -14px rgba(22, 22, 21, 0.18);
  --shadow-2: 0 2px 6px rgba(22, 22, 21, 0.08), 0 30px 60px -24px rgba(22, 22, 21, 0.35);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-press: 140ms;
  --dur-hover: 220ms;
  --dur-ui: 280ms;
  --dur-reveal: 640ms;
  --dur-image: 700ms;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e0e0d;
  --surface: #191918;
  --surface-hover: #21211f;
  --surface-sunk: #232321;
  --fg: #f1f1ed;
  --fg-2: #d6d6d0;
  --muted: #a3a29c;
  --line: rgba(241, 241, 237, 0.09);
  --line-strong: rgba(241, 241, 237, 0.2);
  --ink: #f1f1ed;
  --on-ink: #0e0e0d;
  --on-ink-muted: rgba(14, 14, 13, 0.66);
  --accent: #35cacc;
  --accent-deep: #7fe0e1;
  --foot-bg: #1e1e1c;
  --foot-fg: #f1f1ed;
  --foot-muted: rgba(241, 241, 237, 0.62);
  --ok: #7cc19a;
  --err: #f0897b;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.4), 0 30px 60px -24px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--t-base)/1.7 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur-ui) ease, color var(--dur-ui) ease;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; letter-spacing: -0.02em; }
p { text-wrap: pretty; }
::selection { background: var(--fg); color: var(--bg); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }

.mono {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon.sm { width: 15px; height: 15px; }
.icon.xs { width: 13px; height: 13px; }

.skip-link {
  position: fixed; left: 50%; top: 10px; z-index: 100;
  transform: translate(-50%, -160%);
  background: var(--ink); color: var(--on-ink);
  padding: 10px 16px; border-radius: var(--pill); font-size: var(--t-sm);
  transition: transform var(--dur-ui) var(--ease-out);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ---------- 凹角原件 ----------
   以頁面底色填滿的四分之一圓，讓標籤像是從影像上「刻」出來。 */
.notch {
  position: absolute; width: var(--notch); height: var(--notch);
  display: block; pointer-events: none; overflow: visible;
}
.notch path { fill: var(--bg); transition: fill var(--dur-ui) ease; }

/* ---------- 分割畫框 ---------- */
.pane {
  position: fixed; top: 0; left: 0; bottom: 0; width: 50%;
  height: 100vh; height: 100dvh;
  padding: var(--pad); z-index: 1;
}
.pane-inner {
  position: relative; width: 100%; height: 100%;
  overflow: hidden; border-radius: var(--radius);
  background: var(--surface-sunk); isolation: isolate;
}
.pane .layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transform: scale(1.04);
  transition: opacity var(--dur-image) var(--ease-out), transform 1800ms var(--ease-out);
}
.pane .layer.on { opacity: 1; transform: scale(1); z-index: 1; }
.pane .layer.img { z-index: 2; }

/* 多張主視覺輪播：同一畫框內交叉淡入，各張緩慢推近 */
.pane-slides { position: absolute; inset: 0; z-index: 2; }
.pane-slides .layer { transition: opacity 1400ms var(--ease-out), transform 8600ms var(--ease-out); }
.pane-slides .layer.on { z-index: 3; }
@media (prefers-reduced-motion: reduce) {
  .pane-slides .layer { transition: opacity 600ms linear; }
}

/* 完整不裁切：模糊底圖填滿，主圖置中 */
.pane-bg {
  position: absolute; inset: -8%; z-index: 0;
  background-position: center; background-size: cover;
  filter: blur(34px) saturate(1.2) brightness(.86);
  transform: scale(1.06); pointer-events: none;
  animation: paneDrift 28s ease-in-out infinite alternate;
  will-change: transform;
}
/* 模糊底圖緩慢放大漂移（Ken Burns） */
@keyframes paneDrift {
  from { transform: scale(1.06) translate3d(-1.4%, -1.1%, 0); }
  to   { transform: scale(1.18) translate3d(1.6%, 1.3%, 0); }
}
.pane-photo {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  padding: clamp(12px, 6%, 56px);
  pointer-events: none;
}
.pane-photo img {
  display: block; width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  border-radius: 14px;
  box-shadow: 0 22px 52px rgba(8, 8, 7, .46), 0 2px 10px rgba(8, 8, 7, .28);
}

.pane-art {
  position: absolute; inset: 0; z-index: 1;
  animation: paneIn 1400ms var(--ease-out) both;
}
@keyframes paneIn { from { transform: scale(1.05); } to { transform: scale(1); } }

/* 列表 hover：以文章主圖暫代分類主視覺 */
.pane-hover {
  position: absolute; inset: 0; z-index: 2;
  opacity: 0; pointer-events: none;
  transition: opacity 420ms var(--ease-out);
}
.pane-hover-bg {
  position: absolute; inset: -8%;
  background-position: center; background-size: cover;
  filter: blur(34px) saturate(1.15) brightness(.82);
  transform: scale(1.08);
  animation: paneDriftAlt 24s ease-in-out infinite alternate;
  animation-delay: -7s;
  will-change: transform;
}
/* hover 層反向漂移，換圖時不會與底層同步 */
@keyframes paneDriftAlt {
  from { transform: scale(1.08) translate3d(1.5%, 1.2%, 0); }
  to   { transform: scale(1.2) translate3d(-1.6%, -1.4%, 0); }
}
.pane-hover-photo {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: clamp(12px, 6%, 56px);
}
.pane-hover-photo img {
  display: block; width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  border-radius: 14px;
  box-shadow: 0 22px 52px rgba(8, 8, 7, .46), 0 2px 10px rgba(8, 8, 7, .28);
  opacity: 0; transform: scale(.982);
  transition: opacity 420ms var(--ease-out), transform 900ms var(--ease-out);
}
.pane-inner.is-hovering .pane-hover { opacity: 1; }
.pane-inner.is-hovering .pane-hover-photo img { opacity: 1; transform: scale(1); }

/* 柔光與景深：讓漸層讀起來像微距攝影，而不是色塊 */
.pane-art::before,
.pane-art::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.pane-art::before {
  left: -14%; top: 4%; width: 88%; aspect-ratio: 1;
  background: radial-gradient(circle at 38% 36%, var(--art-a, rgba(255,255,255,.8)), transparent 64%);
  filter: blur(22px);
}
.pane-art::after {
  right: -20%; bottom: -12%; width: 96%; aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%, var(--art-b, rgba(7,175,175,.5)), transparent 66%);
  filter: blur(34px);
}

.im--home { --art-a: rgba(255,255,255,.92); --art-b: rgba(7,174,175,.55); }
.im--about { --art-a: rgba(255,252,244,.95); --art-b: rgba(120,120,110,.45); }
.im--team { --art-a: rgba(250,252,250,.92); --art-b: rgba(7,174,175,.5); }
.im--services { --art-a: rgba(214,249,248,.75); --art-b: rgba(6,127,128,.68); }
.im--news { --art-a: rgba(255,255,255,.9); --art-b: rgba(140,126,104,.5); }
.im--gallery { --art-a: rgba(230,232,228,.65); --art-b: rgba(7,174,175,.45); }
.im--contact { --art-a: rgba(255,255,250,.95); --art-b: rgba(150,158,146,.45); }
.im--article { --art-a: rgba(255,255,255,.9); --art-b: rgba(7,174,175,.45); }

/* 疊在影像上的細緻網點與暗角 */
.pane-inner::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(12, 12, 11, 0.12), transparent 26%, transparent 68%, rgba(12, 12, 11, 0.24)),
    radial-gradient(120% 100% at 50% 40%, transparent 55%, rgba(12, 12, 11, 0.1));
  mix-blend-mode: multiply;
}

.rail {
  position: relative; z-index: 2; margin-left: 50%;
  min-height: 100vh; min-height: 100dvh;
  padding: var(--pad) var(--pad) var(--pad) 0;
  container: rail / inline-size;
}
.view { display: flex; flex-direction: column; gap: var(--pad); }

/* ---------- 凹角標籤（畫框右下） ---------- */
.pane-label {
  position: absolute; right: 0; bottom: 0; z-index: 4;
  max-width: calc(100% - 40px);
}
.pane-label .lbl {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: calc(60px + var(--pad));
  padding: 12px calc(6px + var(--pad)) calc(4px + var(--pad)) 20px;
  background: var(--bg); border-top-left-radius: var(--notch);
  transition: background-color var(--dur-ui) ease;
}
.pane-label .notch.t { right: var(--pad); bottom: 100%; transform: rotate(180deg); }
.pane-label .notch.l { right: 100%; bottom: var(--pad); transform: rotate(180deg); }
.pl-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pl-title {
  font-size: var(--t-sm); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: inline-flex; align-items: center; gap: 8px;
}
.pl-title .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none;
}
.pl-sub {
  color: var(--muted); font-size: 0.8125rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px;
}
.pl-ctrl { display: flex; gap: 6px; }

/* ---------- 頁首：凹角藥丸 ---------- */
.site-header { position: fixed; top: var(--pad); left: var(--pad); z-index: 50; }
.hdr {
  position: relative; display: flex; align-items: center; gap: 24px;
  min-height: var(--hdr-h);
  padding: 0 18px 12px 16px;
  background: var(--bg); border-bottom-right-radius: var(--notch);
  transition: background-color var(--dur-ui) ease, box-shadow var(--dur-ui) ease, border-radius var(--dur-ui) ease;
}
.site-header .notch.bl { left: 0; top: 100%; }
.site-header .notch.tr { left: 100%; top: 0; }
.site-header .notch { transition: opacity var(--dur-ui) ease; }

.brand { display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; border-radius: 6px; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-mark .leaf { fill: var(--accent); transition: transform 700ms var(--ease-out); transform-origin: 50% 50%; }
.brand:hover .brand-mark .leaf { transform: rotate(-12deg) scale(1.06); }
.brand-name {
  font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand-tag {
  font-family: var(--f-mono); font-size: 0.625rem; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase; white-space: nowrap;
  padding-left: 2px;
}

.nav { display: flex; align-items: center; gap: 20px; }
.nav-link {
  position: relative; font-size: var(--t-sm); color: var(--muted);
  padding: 3px 0; transition: color var(--dur-hover) ease;
}
.nav-link[aria-current="page"] { color: var(--fg); }
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
}
@media (hover: hover) { .nav-link:hover { color: var(--fg); } }

/* ---------- 頁首：階層選單 ---------- */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > .nav-link { display: inline-flex; align-items: center; gap: 5px; }
.nav-item.is-trail > .nav-link { color: var(--fg); }

.hdr-actions { display: flex; align-items: center; gap: 8px; margin-left: 2px; }
.theme-btn {
  position: relative; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--on-ink);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) ease;
}
.theme-btn:active { transform: scale(0.94); }
.theme-btn .icon { width: 13px; height: 13px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
.menu-btn {
  display: none; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border-radius: var(--pill); background: var(--surface); font-size: var(--t-sm);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-hover) ease;
}
.menu-btn:active { transform: scale(0.97); }
@media (hover: hover) { .menu-btn:hover { background: var(--surface-hover); } }

/* ---------- 卡片 ---------- */
.card {
  position: relative; background: var(--surface);
  border-radius: var(--radius); padding: var(--card-p);
  transition: background-color var(--dur-ui) ease;
}
:where(a.card) { display: block; }
@media (hover: hover) { a.card:hover, .card.is-link:hover { background: var(--surface-hover); } }
.card.tight { padding: 18px 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card.plain { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-title { font-size: var(--t-xl); letter-spacing: -0.02em; line-height: 1.25; font-weight: 450; }
.corner-arrow {
  position: absolute; top: 18px; right: 18px; color: var(--muted);
  transition: transform var(--dur-hover) var(--ease-out), color var(--dur-hover) ease;
}
@media (hover: hover) { a.card:hover .corner-arrow { transform: translate(3px, -3px); color: var(--fg); } }

.kicker {
  font-family: var(--f-mono);
  font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: 8px;
}
.kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* 頁面標題卡 */
.page-head { display: flex; flex-direction: column; gap: 18px; }
.page-head .ph-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-title { font-size: var(--t-3xl); line-height: 1.2; letter-spacing: -0.025em; font-weight: 400; }
.page-lead { font-size: var(--t-lg); line-height: 1.6; color: var(--muted); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--muted); flex-wrap: wrap; }
.crumbs a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 0;
  border-radius: 6px; transition: color var(--dur-hover) ease;
}
.crumbs [aria-current="page"] { color: var(--fg-2); }
.crumbs-sep { color: var(--line-strong); }
@media (hover: hover) { .crumbs a:hover { color: var(--fg); } }

/* ---------- 按鈕／晶片 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 20px; border-radius: var(--pill);
  white-space: nowrap; overflow: hidden;
  background: var(--ink); color: var(--on-ink);
  font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.01em;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-hover) ease, opacity var(--dur-hover) ease;
}
.btn .icon { width: 16px; height: 16px; transition: transform var(--dur-hover) var(--ease-out); }
@media (hover: hover) { .btn:hover .icon.go { transform: translateX(3px); } }
.btn:active { transform: scale(0.97); }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-strong); }
@media (hover: hover) { .btn.ghost:hover { background: var(--surface-hover); } }
.btn.sm { height: 38px; padding: 0 15px; font-size: var(--t-sm); }
.btn.block { width: 100%; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-hover) ease;
}
.icon-btn:active { transform: scale(0.94); }
@media (hover: hover) { .icon-btn:hover { background: var(--surface-hover); } }
.icon-btn.sm { width: 34px; height: 34px; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm);
  position: relative; padding: 4px 0; border-radius: 4px;
}
.text-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1px;
  background: currentColor; transform-origin: right;
  transition: transform 320ms var(--ease-out);
}
@media (hover: hover) { .text-link:hover::after { transform: scaleX(0.34); } }
.text-link .icon { transition: transform var(--dur-hover) var(--ease-out); }
@media (hover: hover) { .text-link:hover .icon { transform: translateX(3px); } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--pill); font-size: var(--t-sm);
  background: var(--bg); color: var(--fg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease,
              box-shadow var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}
.chip .n { color: var(--muted); font-family: var(--f-mono); font-size: 0.6875rem; }
@media (hover: hover) { .chip:hover { box-shadow: inset 0 0 0 1px var(--line-strong); } }
.chip:active { transform: scale(0.97); }
.chip[aria-current="page"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.chip[aria-current="page"] .n { color: var(--on-ink-muted); }

/* 頁首卡片內的區塊子選單 */
.page-head .section-nav { margin-top: 4px; }
.section-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.section-nav .chip { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.section-nav .chip[aria-current="page"] {
  background: var(--ink); color: var(--on-ink); box-shadow: none;
}
.section-nav .chip[aria-current="page"] .n { color: var(--on-ink-muted); }

/* ---------- 區塊指示條 ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 54px; padding: 0 20px; border-radius: var(--radius);
  background: var(--surface); font-size: var(--t-sm);
}
.bar .left { display: inline-flex; align-items: center; gap: 10px; }
.bar .left .icon { color: var(--muted); }
.bar .right { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }

/* ---------- 首頁：自我介紹 + 頻道 ---------- */
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--pad); }
@container rail (min-width: 620px) {
  .intro-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}
.intro {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 30px; min-height: 100%; padding: clamp(30px, 1rem + 2.2vw, 52px);
}
.intro .corner-arrow {
  top: 32px; right: 32px; opacity: 0;
  transition: opacity var(--dur-ui) ease, top var(--dur-ui) var(--ease-out),
              right var(--dur-ui) var(--ease-out), color var(--dur-hover) ease;
}
@media (hover: hover) { a.intro:hover .corner-arrow { top: 24px; right: 24px; opacity: 1; transform: none; } }
.who { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none;
  display: grid; place-items: center;
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
}
.avatar .brand-mark { width: 24px; height: 24px; }
.who-name { font-size: var(--t-lg); line-height: 1.25; letter-spacing: -0.01em; font-weight: 500; }
.who-role { font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }
.statement {
  font-size: clamp(1.5rem, 1rem + 1.4vw, 2rem);
  line-height: 1.4; letter-spacing: -0.02em; font-weight: 400;
}
.statement .soft { color: var(--muted); }
.bio { font-size: 0.9375rem; line-height: 1.8; color: var(--muted); }
.intro-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pad); }
@container rail (min-width: 620px) {
  .channels { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; }
}
.channel {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 54px; padding: 0 20px; border-radius: var(--radius);
  background: var(--surface); font-size: var(--t-sm);
  transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}
.channel:active { transform: scale(0.98); }
@media (hover: hover) { .channel:hover { background: var(--surface-hover); } }
.channel.primary { background: var(--ink); color: var(--on-ink); }
@media (hover: hover) { .channel.primary:hover { background: var(--ink); opacity: 0.92; } }
.channel .lbl { display: inline-flex; align-items: center; gap: 10px; }
.channel .mono { opacity: 0.6; font-size: 0.625rem; }
.flipicon { position: relative; width: 18px; height: 18px; overflow: hidden; flex: none; }
.flipicon > span {
  position: absolute; inset: 0; display: grid; place-items: center;
  transition: transform 380ms var(--ease-out);
}
.flipicon > span.b { transform: translateY(110%); }
@media (hover: hover) {
  .channel:hover .flipicon > span.a, a.card:hover .flipicon > span.a { transform: translateY(-110%); }
  .channel:hover .flipicon > span.b, a.card:hover .flipicon > span.b { transform: translateY(0); }
}

/* ---------- 影像（以漸層構成的抽象攝影） ---------- */
.media {
  position: relative; display: block; overflow: hidden;
  background: var(--surface-sunk); isolation: isolate;
}
.media::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  opacity: 0.55; mix-blend-mode: soft-light;
}
.im {
  position: absolute; inset: 0;
  transition: transform 1200ms var(--ease-out), filter 500ms ease;
}

/* 首頁：玻璃艙型 — 柔光、氣泡、乳白 */
.im--home {
  background:
    radial-gradient(circle at 74% 24%, rgba(255, 255, 255, 0.95) 0 7%, rgba(255, 255, 255, 0) 7.6%),
    radial-gradient(circle at 62% 42%, rgba(255, 255, 255, 0.8) 0 4.5%, transparent 5%),
    radial-gradient(circle at 83% 55%, rgba(255, 255, 255, 0.7) 0 8%, transparent 8.6%),
    radial-gradient(70% 55% at 26% 72%, rgba(7, 174, 175, 0.5), transparent 68%),
    radial-gradient(85% 65% at 78% 16%, rgba(214, 244, 242, 0.95), transparent 64%),
    radial-gradient(120% 90% at 50% 108%, rgba(6, 127, 128, 0.55), transparent 62%),
    linear-gradient(158deg, #f7f8f5 0%, #e4efec 46%, #a9cfcb 100%);
}
/* 關於：建築光影 — 暖灰、斜光 */
.im--about {
  background:
    linear-gradient(104deg, transparent 40%, rgba(255, 255, 255, 0.85) 41% 52%, transparent 53%),
    radial-gradient(80% 60% at 20% 20%, rgba(249, 245, 238, 0.98), transparent 62%),
    radial-gradient(70% 60% at 88% 82%, rgba(196, 204, 199, 0.9), transparent 66%),
    linear-gradient(170deg, #f2efe9 0%, #ddd8ce 52%, #b3aea2 100%);
}
/* 專業陣容：窗邊人影 — 柔白、淺青 */
.im--team {
  background:
    linear-gradient(100deg, transparent 34%, rgba(255, 255, 255, 0.75) 35% 46%, transparent 47%),
    radial-gradient(48% 40% at 68% 34%, rgba(255, 255, 255, 0.9), transparent 68%),
    radial-gradient(70% 56% at 18% 86%, rgba(7, 174, 175, 0.5), transparent 66%),
    linear-gradient(168deg, #f8fbfa 0%, #dbeae7 50%, #9dc0bb 100%);
}
/* 服務：液面 — 深青、波紋 */
.im--services {
  background:
    repeating-radial-gradient(circle at 50% 108%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 46px),
    radial-gradient(90% 60% at 50% 0%, rgba(214, 249, 248, 0.55), transparent 60%),
    radial-gradient(70% 50% at 22% 88%, rgba(7, 174, 175, 0.85), transparent 66%),
    linear-gradient(175deg, #d9f0ef 0%, #79c3c3 34%, #136d70 74%, #083f42 100%);
}
/* 消息：紙張與桌面 */
.im--news {
  background:
    linear-gradient(96deg, rgba(255, 255, 255, 0.9) 0 2%, transparent 2% 96%, rgba(22, 22, 21, 0.08) 96%),
    radial-gradient(70% 50% at 78% 18%, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(60% 50% at 18% 92%, rgba(170, 160, 142, 0.7), transparent 65%),
    linear-gradient(165deg, #f6f3ec 0%, #e6e0d3 55%, #c2b9a7 100%);
}
/* 相簿：底片 */
.im--gallery {
  background:
    linear-gradient(90deg, rgba(22, 22, 21, 0.9) 0 3%, transparent 3% 97%, rgba(22, 22, 21, 0.9) 97%),
    radial-gradient(50% 34% at 32% 30%, rgba(35, 40, 38, 0.9), transparent 70%),
    radial-gradient(60% 44% at 72% 68%, rgba(7, 174, 175, 0.5), transparent 70%),
    linear-gradient(160deg, #dcd9d0 0%, #a7b3ad 55%, #58665f 100%);
}
/* 聯絡：窗光 */
.im--contact {
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 255, 255, 0.7) 18% 42%, transparent 42%),
    linear-gradient(90deg, transparent 0 62%, rgba(255, 255, 255, 0.42) 62% 78%, transparent 78%),
    radial-gradient(80% 60% at 82% 88%, rgba(190, 205, 194, 0.9), transparent 68%),
    linear-gradient(170deg, #fbfaf6 0%, #eceadf 50%, #cccabb 100%);
}
/* 文章：霧色 */
.im--article {
  background:
    radial-gradient(60% 40% at 66% 26%, rgba(255, 255, 255, 0.92), transparent 60%),
    radial-gradient(70% 50% at 18% 84%, rgba(7, 174, 175, 0.45), transparent 66%),
    linear-gradient(162deg, #f0f4f1 0%, #d4e2dd 52%, #93b0aa 100%);
}
/* 劑型影像 */
.im--liquid {
  background:
    radial-gradient(circle at 68% 70%, rgba(255, 255, 255, 0.55) 0 12%, transparent 12.5%),
    radial-gradient(70% 60% at 30% 20%, rgba(216, 246, 245, 0.95), transparent 62%),
    linear-gradient(160deg, #e8f6f4 0%, #8ecfcd 48%, #0f7c7e 100%);
}
.im--capsule {
  background:
    linear-gradient(35deg, transparent 46%, rgba(255, 255, 255, 0.75) 46% 54%, transparent 54%),
    radial-gradient(70% 60% at 76% 24%, rgba(255, 255, 255, 0.85), transparent 60%),
    linear-gradient(150deg, #f4f1e9 0%, #ddd2bb 50%, #b09f7f 100%);
}
.im--tablet {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0 2px, transparent 2px 34px),
    radial-gradient(60% 50% at 28% 28%, rgba(255, 255, 255, 0.9), transparent 62%),
    linear-gradient(165deg, #f7f6f1 0%, #e2dfd4 52%, #c3bfae 100%);
}
.im--powder {
  background:
    radial-gradient(circle at 32% 74%, rgba(255, 255, 255, 0.7) 0 9%, transparent 9.6%),
    radial-gradient(70% 60% at 78% 22%, rgba(245, 233, 207, 0.96), transparent 64%),
    linear-gradient(158deg, #fbf7ec 0%, #e6d8b8 52%, #c2ab7d 100%);
}
.im--drink {
  background:
    radial-gradient(60% 46% at 70% 74%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(80% 60% at 24% 18%, rgba(198, 240, 238, 0.92), transparent 62%),
    linear-gradient(168deg, #dff3f1 0%, #63b9b8 46%, #0b5f61 100%);
}
.im--odm {
  background:
    linear-gradient(120deg, transparent 44%, rgba(255, 255, 255, 0.55) 45% 55%, transparent 56%),
    radial-gradient(70% 60% at 20% 24%, rgba(240, 240, 234, 0.95), transparent 62%),
    linear-gradient(160deg, #e9e9e3 0%, #c9c9c0 48%, #7d7d75 100%);
}
/* 加值劑型（無照片時的漸層備援） */
.im--dual {
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.9) 0 10%, transparent 10.6%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.55) 0 34%, transparent 34%),
    radial-gradient(75% 60% at 26% 16%, rgba(220, 246, 245, 0.95), transparent 62%),
    linear-gradient(165deg, #eaf7f5 0%, #8fd0ce 46%, #0d6f71 100%);
}
.im--softgel {
  background:
    radial-gradient(60% 42% at 62% 34%, rgba(255, 255, 255, 0.82), transparent 62%),
    radial-gradient(52% 38% at 34% 70%, rgba(255, 236, 190, 0.8), transparent 64%),
    linear-gradient(160deg, #fdf6e6 0%, #e2cf9f 48%, #9c8248 100%);
}

/* ---------- 圖磚（左上刻字） ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px var(--pad); }
.tile { position: relative; display: block; border-radius: var(--radius-sm); }
.tile-media {
  position: relative; display: block; aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-sunk);
}
.tile-media.land { aspect-ratio: 3 / 2; }
.tile-media.square { aspect-ratio: 1 / 1; }
.tile-media img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1200ms var(--ease-out), filter 500ms ease;
}
@media (hover: hover) {
  .tile:hover .tile-media .im { transform: scale(1.045); }
  .tile:hover .tile-media img { transform: scale(1.045); }
}
.tag { position: absolute; top: 0; left: 0; z-index: 3; }
.tag .lbl {
  position: relative; display: flex; align-items: center; gap: 4px;
  height: 40px; padding: 0 14px 0 2px;
  background: var(--bg); border-bottom-right-radius: var(--notch);
  font-size: var(--t-sm); white-space: nowrap;
  transition: background-color var(--dur-ui) ease;
}
.tag .notch.a { left: 0; top: 100%; }
.tag .notch.b { left: 100%; top: 0; }
.tag .arr { display: inline-grid; width: 0; overflow: hidden; opacity: 0; transition: width 320ms var(--ease-out), opacity 220ms ease; }
.tag .arr .icon { width: 14px; height: 14px; }
@media (hover: hover) { .tile:hover .tag .arr, .tile:focus-visible .tag .arr { width: 18px; opacity: 1; } }
.tile-cap {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 10px;
  font-size: var(--t-sm); color: var(--muted);
}
.tile-cap span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-cap .no { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.08em; flex: none; }
@container rail (max-width: 540px) { .tile-cap span:last-child { display: none; } }
.tile.is-wide { grid-column: 1 / -1; }
.tile-title { font-size: var(--t-lg); letter-spacing: -0.015em; line-height: 1.3; margin-top: 12px; }
.tile-desc { font-size: 0.9375rem; color: var(--muted); line-height: 1.7; margin-top: 6px; }
@container rail (max-width: 559px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 劑型細節 ---------- */
.dosage-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding-bottom: 18px; margin-bottom: 24px; border-bottom: 1px solid var(--line);
}
.dosage-en {
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-deep);
}
.dosage-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dosage-prose > p:first-of-type { font-size: var(--t-lg); line-height: 1.75; color: var(--fg); }
.dosage-prose > h2:first-of-type { margin-top: 1.7em; }

.specs { display: grid; }
.spec { padding: 16px 0; border-top: 1px solid var(--line); }
.spec:first-child { border-top: 0; padding-top: 0; }
.spec dt {
  font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.spec dd { font-size: var(--t-base); line-height: 1.75; color: var(--fg-2); margin-top: 4px; }
@container rail (min-width: 560px) {
  .spec {
    display: grid; grid-template-columns: 148px minmax(0, 1fr);
    gap: 20px; align-items: baseline; padding: 18px 0;
  }
  .spec dd { margin-top: 0; }
}

/* ---------- 列表列 ---------- */
.rows { display: flex; flex-direction: column; gap: var(--pad); }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px;
  min-height: 66px; padding: 14px 20px; border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}
.row:active { transform: scale(0.99); }
.row-title { font-size: var(--t-lg); letter-spacing: -0.015em; line-height: 1.3; min-width: 0; }
.row-title small { display: block; font-size: var(--t-sm); color: var(--muted); letter-spacing: 0; margin-top: 3px; }
.row-meta {
  position: relative; display: flex; align-items: center; gap: 16px;
  color: var(--muted); font-size: var(--t-sm);
  transition: transform 420ms var(--ease-out);
}
.row-arrow {
  position: absolute; right: -28px; top: 50%; translate: 0 -50%;
  opacity: 0; color: var(--fg);
  transition: opacity 260ms ease, transform 420ms var(--ease-out);
  transform: translateX(10px);
}
@media (hover: hover) {
  .row:hover { background: var(--surface-hover); }
  .row:hover .row-meta { transform: translateX(-28px); }
  .row:hover .row-arrow { opacity: 1; transform: none; }
}
.row:focus-visible .row-meta { transform: translateX(-28px); }
.row:focus-visible .row-arrow { opacity: 1; transform: none; }
.row .type { display: none; }
@container rail (min-width: 560px) { .row .type { display: inline; } }

/* 卡片內的緊湊列表 */
.jlist { display: grid; }
.jlist li + li { border-top: 1px solid var(--line); }
.jrow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline;
  gap: 4px 18px; padding: 18px 0; border-radius: 6px;
}
.jlist li:first-child .jrow { padding-top: 4px; }
.jlist li:last-child .jrow { padding-bottom: 0; }
.jrow .jd { grid-column: 1 / -1; color: var(--muted); font-size: var(--t-sm); }
.jrow .jt { font-size: var(--t-lg); line-height: 1.4; letter-spacing: -0.015em; transition: color var(--dur-hover) ease; }
.jrow .jr { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--muted); white-space: nowrap; }
.jrow .jr .icon { transition: transform var(--dur-hover) var(--ease-out); }
@container rail (min-width: 560px) {
  .jrow { grid-template-columns: 96px minmax(0, 1fr) auto; }
  .jrow .jd { grid-column: auto; }
}
@media (hover: hover) {
  .jlist:hover .jrow .jt { color: var(--muted); }
  .jlist .jrow:hover .jt { color: var(--fg); }
  .jrow:hover .jr .icon { transform: translateX(3px); }
}

/* ---------- 數字 ---------- */
.stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@container rail (min-width: 520px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
.stat { display: grid; gap: 6px; align-content: start; padding-top: 16px; border-top: 1px solid var(--line-strong); }
.stat-n {
  font-size: clamp(1.5rem, 1.2rem + 0.6vw, 1.9rem); line-height: 1.05;
  letter-spacing: -0.03em; font-weight: 350; font-variant-numeric: tabular-nums;
}
.stat-l { font-size: var(--t-sm); color: var(--muted); line-height: 1.5; }

/* ---------- 博士領軍 ---------- */
.doc {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.doc-body { display: grid; align-content: center; justify-items: start; gap: 14px; min-width: 0; padding: var(--card-p); }
.doc-title { font-size: clamp(1.35rem, 1.05rem + 1vw, 1.95rem); line-height: 1.38; letter-spacing: -0.015em; }
.doc-title .soft { color: var(--muted); }
.doc-lead { font-size: var(--t-sm); line-height: 1.85; color: var(--muted); max-width: 46ch; }
.doc-person {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  width: 100%; margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line-strong);
}
.doc-name { font-size: 1.25rem; font-weight: 600; letter-spacing: 0.02em; }
.doc-role { font-size: var(--t-sm); color: var(--muted); }
.doc-en { margin-left: auto; font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.doc-quote {
  margin: 0; padding-left: 16px; border-left: 2px solid var(--line-strong);
  font-size: var(--t-sm); line-height: 1.9; color: var(--fg-2);
}
.doc-meta { display: grid; gap: 6px; width: 100%; }
.doc-meta > div { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
.doc-meta dt { font-size: 0.75rem; line-height: 1.8; color: var(--muted); }
.doc-meta dd { font-size: 0.8125rem; line-height: 1.75; color: var(--fg-2); }
.doc-media {
  position: relative; margin: 0; min-height: 100%;
}
/* 去背人像：柔和漸層當棚拍底，人像貼齊下緣 */
.doc-media::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 8%, var(--surface-hover));
}
.doc-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 12%;
  filter: drop-shadow(0 10px 20px rgba(8, 8, 7, .14));
  transition: transform 1200ms var(--ease-out);
}
@media (hover: hover) { .doc:hover .doc-media img { transform: translateY(-4px) scale(1.01); } }
@container rail (max-width: 700px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc-body { order: 1; }
  .doc-media { order: -1; min-height: 0; aspect-ratio: 4 / 3; max-height: 300px; }
  .doc-media img {
    -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 74%, transparent 100%);
  }
  .doc-en { margin-left: 0; }
  .doc-person { gap: 2px 8px; }
}

/* ---------- 跑馬燈 ---------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 52s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  padding: 0 26px; font-size: 1.25rem; letter-spacing: -0.02em;
  white-space: nowrap; color: var(--fg-2);
  display: inline-flex; align-items: center; gap: 26px;
}
.marquee-track span::after { content: "·"; color: var(--accent); font-size: 1.6rem; }
.marquee-track span:nth-child(3n+2) { font-weight: 300; color: var(--muted); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 流程 ---------- */
.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px 28px; }
@container rail (min-width: 520px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.step { padding-top: 14px; border-top: 1px solid var(--line); }
.step .no { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.12em; color: var(--accent-deep); }
.step h3 { font-size: var(--t-base); font-weight: 550; margin: 6px 0; letter-spacing: -0.005em; }
.step p { font-size: 0.9375rem; color: var(--muted); line-height: 1.7; }
/* 流程步驟的細節列 */
.step .d {
  display: block; margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 0.875rem; line-height: 1.75; color: var(--muted);
}
@container rail (min-width: 520px) {
  .steps.flow { gap: 30px 34px; }
  .steps.flow .step { min-height: 100%; }
}

/* ---------- 折疊 ---------- */
.acc { display: grid; }
.acc-item { border-top: 1px solid var(--line); }
.acc-item:first-child { border-top: 0; }
.acc-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; text-align: left; font-size: var(--t-base); border-radius: 6px;
}
.acc-btn .pm { position: relative; width: 14px; height: 14px; flex: none; color: var(--muted); }
.acc-btn .pm::before, .acc-btn .pm::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 1.5px;
  margin-top: -0.75px; background: currentColor;
  transition: transform var(--dur-ui) var(--ease-out);
}
.acc-btn .pm::after { transform: rotate(90deg); }
.acc-btn[aria-expanded="true"] .pm::after { transform: rotate(0deg); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-ui) var(--ease-out); }
.acc-panel > div { overflow: hidden; }
.acc-panel p, .acc-panel ul { padding: 0 32px 20px 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.75; }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }

/* ---------- 表單 ---------- */
.form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@container rail (min-width: 560px) { .form-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: grid; gap: 8px; }
.field > span, .field .label {
  font-size: var(--t-sm); font-weight: 500; color: var(--fg);
  display: flex; justify-content: space-between; gap: 12px;
}
.field .req { color: var(--accent-deep); }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px;
  border-radius: var(--radius-xs); border: 0; background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: var(--t-base);
  transition: box-shadow var(--dur-hover) ease;
}
.textarea { height: auto; min-height: 148px; padding: 13px 14px; resize: vertical; line-height: 1.7; }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 0.8; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--fg), 0 0 0 4px color-mix(in srgb, var(--fg) 10%, transparent);
}
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.hint { font-size: 0.8125rem; color: var(--muted); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px; border-radius: var(--radius-xs);
  font-size: var(--t-sm); line-height: 1.6;
  background: color-mix(in srgb, var(--err) 10%, transparent);
  color: var(--err);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--err) 28%, transparent);
}

/* 聯絡資訊列 */
.contact-lines { display: grid; }
.cl {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline;
  gap: 12px; padding: 16px 0; border-top: 1px solid var(--line);
}
.cl:first-child { border-top: 0; padding-top: 0; }
.cl:last-child { padding-bottom: 0; }
.cl .k { font-size: var(--t-sm); color: var(--muted); }
.cl .v { font-size: var(--t-base); overflow-wrap: anywhere; text-align: right; }
.cl .v a { border-bottom: 1px solid transparent; transition: border-color var(--dur-hover) ease; }
@media (hover: hover) { .cl .v a:hover { border-color: currentColor; } }

/* ---------- 頁尾（軌道末端的反白卡） ---------- */
.footer {
  margin-top: var(--pad);
  background: var(--foot-bg); color: var(--foot-fg);
  border-radius: var(--radius); padding: var(--card-p);
  display: grid; gap: 40px;
  transition: background-color var(--dur-ui) ease, color var(--dur-ui) ease;
}
.footer .who-name { font-size: 1.5rem; font-weight: 400; letter-spacing: -0.02em; }
.footer .who-role { color: var(--foot-muted); }
.footer .avatar { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--foot-fg) 18%, transparent); }
.f-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 24px; }
@container rail (min-width: 560px) { .f-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.f-col h2 { font-size: 0.9375rem; font-weight: 500; margin-bottom: 14px; }
.f-col ul { display: grid; gap: 10px; }
.f-col a, .f-col p { color: var(--foot-muted); font-size: var(--t-sm); overflow-wrap: anywhere; transition: color var(--dur-hover) ease; }
@media (hover: hover) { .f-col a:hover { color: var(--foot-fg); } }
.f-base {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px 20px; padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--foot-fg) 14%, transparent);
  font-size: 0.78rem; color: var(--foot-muted);
}
.f-base .links { display: flex; gap: 18px; }
@media (hover: hover) { .f-base a:hover { color: var(--foot-fg); } }
.footer :focus-visible { outline-color: var(--foot-fg); }

/* ---------- 選單抽屜 ---------- */
.sheet { position: fixed; inset: 0; z-index: 80; visibility: hidden; }
.sheet.is-open { visibility: visible; }
.sheet-scrim {
  position: absolute; inset: 0; background: rgba(12, 12, 11, 0.4);
  opacity: 0; transition: opacity var(--dur-ui) ease;
}
.sheet.is-open .sheet-scrim { opacity: 1; }
.sheet-panel {
  position: absolute; top: var(--pad); left: var(--pad); right: var(--pad);
  max-width: 440px; padding: 14px 14px 22px;
  border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(-10px) scale(0.98); transform-origin: top left;
  transition: opacity var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out);
}
.sheet.is-open .sheet-panel { opacity: 1; transform: none; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 10px 6px; }
.sheet-nav { display: grid; padding: 8px 6px; }
.sheet-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; font-size: 1.625rem; letter-spacing: -0.03em;
  border-top: 1px solid var(--line); border-radius: 0;
}
.sheet-nav a:first-child { border-top: 0; }
.sheet-nav a[aria-current="page"]::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* 手機選單：階層群組 */
.sheet-foot {
  display: grid; gap: 4px; padding: 14px 6px 0;
  border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--muted);
}

/* ---------- 燈箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--scrim); color: #f4f4f0;
  visibility: hidden; opacity: 0;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}
.lightbox.is-open { visibility: visible; opacity: 1; transition: opacity 220ms ease, visibility 0s; }
.lb-top { display: flex; justify-content: flex-end; padding: 14px; }
.lb-stage { position: relative; display: grid; place-items: center; padding: 0 64px; min-height: 0; }
.lb-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px;
  transform: scale(0.985); opacity: 0;
  transition: transform 320ms var(--ease-out), opacity 220ms ease;
}
.lightbox.is-open .lb-stage img.ready { transform: none; opacity: 1; }
.lb-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.1); color: #f4f4f0;
  transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}
.lb-btn:active { transform: scale(0.94); }
@media (hover: hover) { .lb-btn:hover { background: rgba(255, 255, 255, 0.18); } }
.lb-prev, .lb-next { position: absolute; top: 50%; translate: 0 -50%; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-cap {
  display: flex; justify-content: center; gap: 14px; padding: 16px 20px 22px;
  font-size: var(--t-sm); color: rgba(244, 244, 240, 0.72); text-align: center;
}
.lb-cap b { color: #f4f4f0; font-weight: 500; }
.lightbox :focus-visible { outline-color: #f4f4f0; }

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: 95; right: 24px; bottom: 24px; display: grid; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: var(--pill);
  background: var(--ink); color: var(--on-ink);
  font-size: var(--t-sm); box-shadow: var(--shadow-2);
}

/* ---------- 進場動畫 ---------- */
.js .rv { opacity: 0; transform: translateY(18px); }
.js .rv.in {
  opacity: 1; transform: none;
  transition: opacity var(--dur-reveal) var(--ease-out), transform 760ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js .rv.in { will-change: auto; }

/* =====================================================================
   各頁
   ===================================================================== */

/* 首頁服務圖磚 */
.svc-tile .tile-media { aspect-ratio: 3 / 2; }

/* 文章 */
.article-head { display: grid; gap: 20px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--muted); font-size: var(--t-sm); }
.article-meta .pill {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: var(--pill); background: var(--bg); color: var(--fg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.article-title { font-size: var(--t-3xl); line-height: 1.3; letter-spacing: -0.025em; }
.dek { font-size: var(--t-lg); line-height: 1.7; color: var(--muted); }

.prose { font-size: var(--t-md); line-height: 1.9; color: var(--fg-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-size: 1.35rem; line-height: 1.4; letter-spacing: -0.02em; color: var(--fg);
  font-weight: 500; margin-top: 2em;
}
.prose h3 { font-size: 1.1rem; font-weight: 500; margin-top: 1.6em; color: var(--fg); }
.prose ul { display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 20px; }
.prose ul li::before {
  content: ""; position: absolute; left: 2px; top: 0.95em;
  width: 8px; height: 1.5px; background: var(--muted);
}
.prose ol { display: grid; gap: 10px; padding-left: 1.4em; list-style: decimal; }
.prose a { border-bottom: 1px solid var(--line-strong); }
.prose blockquote {
  margin: 1.8em 0; padding-left: 20px; border-left: 1.5px solid var(--accent);
  font-size: 1.3rem; line-height: 1.6; letter-spacing: -0.02em; color: var(--fg);
}
.prose blockquote cite {
  display: block; margin-top: 12px;
  font-size: var(--t-sm); font-style: normal; letter-spacing: 0; color: var(--muted);
}
.prose img { width: 100%; border-radius: var(--radius-sm); }
.prose figure { max-width: none; }
.prose figcaption { margin-top: 10px; font-size: var(--t-sm); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; padding: 12px 14px; vertical-align: top; }
.prose th { font-weight: 500; color: var(--muted); font-size: var(--t-sm); border-bottom: 1px solid var(--line-strong); }
.prose tbody tr + tr td { border-top: 1px solid var(--line); }

.article-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px; padding-top: 22px; border-top: 1px solid var(--line-strong);
}

/* 圖庫格 */
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pad); }
@container rail (min-width: 680px) { .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery-grid .tile-media { aspect-ratio: 1 / 1; }
.photo {
  display: block; position: relative; border-radius: var(--radius-sm);
  overflow: hidden; cursor: zoom-in; background: var(--surface-sunk);
}
.photo img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 900ms var(--ease-out); }
@media (hover: hover) { .photo:hover img { transform: scale(1.04); } }

/* 分頁 */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; }
.pager a, .pager span {
  min-width: 38px; height: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--pill); font-size: var(--t-sm);
  transition: background-color var(--dur-hover) ease;
}
.pager a { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
@media (hover: hover) { .pager a:hover { background: var(--surface-hover); color: var(--fg); } }
.pager span.is-current { background: var(--ink); color: var(--on-ink); }
.pager__gap { color: var(--muted); min-width: auto !important; }

/* 空狀態 */
.empty {
  display: grid; justify-items: start; gap: 14px;
  padding: 40px var(--card-p); border-radius: var(--radius); background: var(--surface);
}
.empty .icon { width: 22px; height: 22px; color: var(--muted); }
.empty h2 { font-size: var(--t-lg); letter-spacing: -0.01em; }
.empty p { color: var(--muted); }

/* 空分類：情境圖 + 說明 */
.empty-cat.has-art {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 2.6vw, 40px);
  padding: 16px;
  overflow: hidden;
}
.empty-art {
  margin: 0; width: 100%; aspect-ratio: 16 / 10;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden; background: var(--surface-hover);
}
.empty-art img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.015); transition: transform 900ms var(--ease-out);
}
@media (hover: hover) { .empty-cat.has-art:hover .empty-art img { transform: scale(1.055); } }
.empty-body { display: grid; justify-items: start; gap: 12px; padding: clamp(8px, 1vw, 20px); }
.empty-k { color: var(--muted); font-size: var(--t-xs); letter-spacing: 0.16em; text-transform: uppercase; }
.empty-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
@media (max-width: 780px) {
  .empty-cat.has-art { grid-template-columns: 1fr; padding: 12px; }
  .empty-art { aspect-ratio: 16 / 9; }
  .empty-body { padding: 8px 6px 12px; }
}
@media (prefers-reduced-motion: reduce) { .empty-art img { transition: none; } }

/* 頁尾 CTA 卡 */
.cta { display: grid; gap: 26px; }
.cta h2 { font-size: var(--t-2xl); line-height: 1.45; letter-spacing: -0.02em; }
.cta p { color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cta-tel {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--t-sm); color: var(--muted);
  padding: 10px 4px;
}
@media (hover: hover) { .cta-tel:hover { color: var(--fg); } }

/* 關於頁 */
.split-card { display: grid; gap: 24px; }
@container rail (min-width: 640px) { .split-card { grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr); gap: 32px; } }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pad); }
@container rail (min-width: 640px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); display: grid; gap: 4px; align-content: start; }
.fact dt { font-size: var(--t-sm); color: var(--muted); }
.fact dd { font-size: var(--t-lg); letter-spacing: -0.015em; line-height: 1.35; }
.timeline { display: grid; }
.tl-item {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 24px;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.tl-item:first-child { border-top: 0; padding-top: 0; }
@container rail (min-width: 560px) { .tl-item { grid-template-columns: 74px minmax(0, 1fr); } }
.tl-item .no { color: var(--accent-deep); font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.1em; padding-top: 4px; }
.tl-item h3 { font-size: var(--t-base); font-weight: 550; }
.tl-item p { color: var(--muted); font-size: 0.9375rem; margin-top: 6px; line-height: 1.75; }
.kit-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 18px 20px; border-radius: var(--radius); background: var(--surface);
}
.kit-row h3 { font-size: var(--t-base); font-weight: 500; flex: none; }
.kit-row p { color: var(--muted); font-size: 0.9375rem; text-align: right; }

/* 關於頁：理念宣言 */
.about-lead { display: grid; gap: 16px; align-content: start; }
.about-lead .ph-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.about-statement {
  font-size: clamp(1.0625rem, 0.95rem + 0.55vw, 1.5rem);
  line-height: 1.75; letter-spacing: -0.015em; color: var(--fg);
  text-wrap: pretty;
}
.about-statement strong { font-weight: 600; color: var(--accent-deep); }
.about-note { font-size: 0.9375rem; color: var(--muted); line-height: 1.8; }

/* 關於頁：三大核心 */
.pillars { display: grid; gap: var(--pad); }
.pillar {
  display: grid; gap: 8px 36px; align-content: start;
  padding: 28px 26px; border-radius: var(--radius); background: var(--surface);
}
@container rail (min-width: 600px) {
  .pillar { grid-template-columns: minmax(0, 172px) minmax(0, 1fr); align-items: start; }
  .pillar p { padding-top: 2px; }
}
.pillar-k {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.pillar-k .no { color: var(--accent-deep); }
.pillar-h { display: grid; gap: 6px; align-content: start; }
.pillar h2 { font-size: var(--t-xl); font-weight: 450; letter-spacing: -0.02em; line-height: 1.3; }
.pillar p { font-size: 0.9375rem; line-height: 1.95; color: var(--muted); }

/* 關於頁：服務市場 */
.about-split { display: grid; gap: 26px; }
@container rail (min-width: 680px) {
  .about-split { grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); gap: 40px; align-items: start; }
}
.about-split-note { font-size: 0.9375rem; line-height: 1.85; color: var(--muted); margin-top: 14px; }
.markets { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.market {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--pill); background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: var(--t-sm); line-height: 1.2;
}
.market .dotmark { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }

/* 關於頁：企業使命 */
.mission { display: grid; gap: 14px; }
.mission-line {
  font-size: clamp(1.3rem, 1.05rem + 0.9vw, 2rem);
  line-height: 1.4; letter-spacing: -0.02em; color: var(--fg);
}
.mission-note { font-size: 0.9375rem; line-height: 1.85; color: var(--muted); }

/* 關於頁：公司簡介 */
.about-seo h2 { margin-top: 0; }
.about-seo strong { font-weight: 600; color: var(--fg); }

/* 關於頁：專業陣容入口 */
.team-cta { display: grid; gap: 20px; align-content: start; justify-items: start; }

/* 專業陣容頁 */
.team-leads { display: grid; gap: var(--pad); align-items: start; }
@container rail (min-width: 700px) { .team-leads { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tlead {
  display: grid; align-content: start;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
}
.tlead-media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: var(--surface-sunk); }
.tlead-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 22%;
  transition: transform var(--dur-image) var(--ease-out);
}
@media (hover: hover) { .tlead:hover .tlead-media img { transform: scale(1.035); } }
.tlead-body { display: grid; gap: 8px; align-content: start; padding: 22px var(--card-p) 26px; }
.tlead-k {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--muted);
}
.tlead-k .no { color: var(--accent-deep); }
.tlead h2 { font-size: var(--t-xl); font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; }
.tlead-role { font-size: var(--t-sm); color: var(--muted); margin-top: -4px; }
.tlead-quote {
  font-size: 1.0625rem; line-height: 1.85; color: var(--fg-2);
  border-left: 2px solid var(--accent); padding: 2px 0 2px 14px; margin-top: 8px;
  text-wrap: pretty;
}

.team-grid { display: grid; gap: var(--pad); grid-template-columns: minmax(0, 1fr); }
@container rail (min-width: 520px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container rail (min-width: 880px) { .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tm {
  display: grid; align-content: start;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
}
.tm-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-sunk); }
.tm-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 16%;
  transition: transform var(--dur-image) var(--ease-out);
}
@media (hover: hover) { .tm:hover .tm-media img { transform: scale(1.045); } }
.tm-body { display: grid; gap: 4px; align-content: start; padding: 18px 20px 22px; }
.tm-no { font-size: 0.625rem; letter-spacing: 0.16em; color: var(--accent-deep); }
.tm-name { font-size: var(--t-lg); font-weight: 500; letter-spacing: -0.01em; line-height: 1.35; margin-top: 2px; }
.tm-role { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: var(--t-sm); color: var(--muted); }
.tm-role .mono { font-size: 0.625rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); opacity: 0.8; }

.tm-meta { display: grid; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tm-meta > div { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
.tm-meta dt { font-size: 0.75rem; line-height: 1.75; color: var(--muted); }
.tm-meta dd { font-size: 0.8125rem; line-height: 1.7; color: var(--fg-2); }

.domains { display: grid; }
.domain {
  display: grid; gap: 4px 24px; padding: 16px 0; border-top: 1px solid var(--line);
}
.domain:first-child { border-top: 0; padding-top: 0; }
.domain:last-child { padding-bottom: 0; }
@container rail (min-width: 560px) { .domain { grid-template-columns: 160px minmax(0, 1fr); align-items: baseline; } }
.domain h3 { display: flex; align-items: baseline; gap: 10px; font-size: var(--t-base); font-weight: 500; }
.domain h3 .no { font-size: 0.625rem; letter-spacing: 0.12em; color: var(--accent-deep); }
.domain p { font-size: 0.9375rem; line-height: 1.75; color: var(--muted); }

/* 服務頁 */
.svc-list { display: grid; gap: var(--pad); }
.svc {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start;
}
@container rail (min-width: 620px) { .svc { grid-template-columns: 150px minmax(0, 1fr); gap: 28px; } }
.svc-media { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; }
.svc-body { display: grid; gap: 8px; align-content: start; }
.svc-k { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.svc-k .mono { color: var(--accent-deep); }
.svc-title { font-size: var(--t-xl); letter-spacing: -0.02em; line-height: 1.3; }
.svc-title a { transition: color var(--dur-hover) ease; }
@media (hover: hover) { .svc:hover .svc-title a { color: var(--accent-deep); } }
.svc-en { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.svc-lead { font-size: 0.9375rem; color: var(--fg-2); font-weight: 500; }
.svc-desc { font-size: 0.9375rem; color: var(--muted); line-height: 1.8; }

/* 健康脈動：專欄列表 */
.hcat-list { display: grid; gap: 32px; }
.hcat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }
@container rail (min-width: 620px) { .hcat { grid-template-columns: 210px minmax(0, 1fr); gap: 28px; } }
.hcat-media { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16 / 11; background: var(--surface-2); }
.hcat-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 700ms var(--ease-out);
}
.hcat-media .im { position: absolute; inset: 0; }
@media (hover: hover) { .hcat:hover .hcat-media img { transform: scale(1.035); } }
.hcat-body { display: grid; gap: 8px; align-content: start; }
.hcat-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line);
}
.hcat-foot .mono { color: var(--accent-deep); font-size: 0.6875rem; letter-spacing: 0.1em; }
.hcat + .hcat { padding-top: 32px; border-top: 1px solid var(--line); }

/* 健康脈動：文章卡 */
.hgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px var(--pad); }
@container rail (min-width: 560px) { .hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hcard { display: grid; gap: 14px; align-content: start; min-width: 0; }
.hcard-media {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius-sm); background: var(--surface-2); aspect-ratio: 16 / 10;
}
.hcard-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 700ms var(--ease-out);
}
.hcard-media .im { position: absolute; inset: 0; }
@media (hover: hover) { .hcard:hover .hcard-media img { transform: scale(1.035); } }
.hcard-no {
  position: absolute; top: 10px; right: 12px;
  font-size: 0.625rem; letter-spacing: 0.1em; color: #fafaf8;
  mix-blend-mode: difference;
}
.hcard-body { display: grid; gap: 8px; min-width: 0; }
.hcard-k { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.hcard-k .pill { font-size: 0.6875rem; }
.hcard-k .mono { font-size: 0.6875rem; letter-spacing: 0.08em; }
.hcard-title {
  font-size: var(--t-lg); line-height: 1.45; letter-spacing: -0.015em; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--dur-hover) ease;
}
@media (hover: hover) { .hcard:hover .hcard-title { color: var(--accent-deep); } }
.hcard-dek {
  font-size: 0.9375rem; line-height: 1.75; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* 文章頁 */

.study {
  display: grid; gap: 10px; padding-left: 20px;
  border-left: 2px solid var(--accent);
}
.study-k { font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-deep); }
.study-title { font-size: var(--t-lg); line-height: 1.55; letter-spacing: -0.01em; font-weight: 500; }
.study-type { font-size: var(--t-sm); color: var(--fg-2); }
.study-authors { font-size: var(--t-sm); line-height: 1.8; color: var(--muted); }

.health-prose .note {
  margin: 1.4em 0; padding: 18px 22px;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-wash, rgba(0, 0, 0, 0.03));
  font-size: 0.9375rem; line-height: 1.85;
}
.health-prose .note > * + * { margin-top: 0.7em; }
.health-prose .note p { color: var(--fg-2); }
.health-prose .note h2, .health-prose .note h3 { margin-top: 0; color: var(--fg); }
.health-prose .note + .note { margin-top: 0.8em; }
.health-prose .tbl {
  margin: 1.6em 0; overflow-x: auto; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.health-prose .tbl table { font-size: 0.9375rem; min-width: 480px; }
.health-prose .tbl th { background: var(--surface-2); white-space: nowrap; }
.health-prose .tbl td { line-height: 1.7; }
.health-prose .prose-figure { margin: 1.8em 0; }
.health-prose .prose-figure img { border-radius: var(--radius-sm); }
.health-prose ul li strong, .health-prose ol li strong { color: var(--fg); }
.health-prose > p:first-of-type { font-size: 1.0625rem; color: var(--fg); }

/* 成功頁 */
.success-card { display: grid; gap: 18px; justify-items: start; }
.success-card .tick {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--on-ink);
}
.success-card h1 { font-size: var(--t-2xl); letter-spacing: -0.02em; }
.success-card p { color: var(--muted); }

/* 錯誤頁 */
.error-code {
  font-family: var(--f-mono); font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 1; letter-spacing: -0.04em; color: var(--line-strong);
}

/* =====================================================================
   響應式
   ===================================================================== */
@media (max-width: 1459px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .hdr { gap: 18px; }
}
@media (max-width: 1023px) {
  .pane {
    position: relative; width: auto; height: 72vh; height: 72svh;
    min-height: 400px; max-height: 820px;
  }
  /* 完整主圖模式：畫框高度隨螢幕比例收斂，避免大片空白 */
  .pane--photo {
    width: auto; height: 48svh;
    min-height: 280px; max-height: 460px;
  }
  html { scroll-padding-top: 84px; }
  .rail { margin-left: 0; padding: 0 var(--pad) var(--pad); min-height: 0; }
  .site-header.is-condensed .hdr {
    border-radius: var(--pill); box-shadow: var(--shadow-1);
    padding-top: 6px; padding-bottom: 6px;
  }
  .site-header.is-condensed .notch { opacity: 0; }
  .footer { margin-top: 0; }
  .toasts { left: 16px; right: 16px; bottom: 16px; justify-items: center; }
  .toast { max-width: none; }
}
@media (max-width: 560px) {
  :root { --pad: 10px; }
  .hdr { padding: 0 10px 12px 14px; gap: 12px; }
  .brand-tag { display: none; }
  .pane { height: 68svh; min-height: 360px; }
  .pane--photo { height: 42svh; min-height: 240px; max-height: 360px; }
  .pane-label .lbl { padding-left: 16px; min-height: 56px; gap: 10px; }
  .tiles { gap: 30px var(--pad); }
  .tag .lbl { height: 36px; font-size: 0.8125rem; padding-right: 12px; }
  .lb-stage { padding: 0 8px; }
  .lb-prev, .lb-next { top: auto; bottom: -58px; translate: none; }
  .lb-prev { left: 16px; }
  .lb-next { right: 16px; }
  .lb-cap { padding: 18px 72px 26px; }
  .kit-row { flex-direction: column; gap: 4px; }
  .kit-row p { text-align: left; }
  .row { padding: 14px 16px; }
  .row-meta .yr { display: none; }
}
@media (min-width: 1680px) {
  :root { --t-base: 1.0625rem; }
}

/* 觸控：44px 目標 */
@media (pointer: coarse) {
  .chip { height: 44px; }
  .icon-btn.sm { width: 44px; height: 44px; }
  .acc-btn { min-height: 52px; }
  .f-col a, .f-base a { display: inline-block; padding: 6px 0; }
  .f-col ul { gap: 2px; }
  .text-link { padding: 10px 0; }
  .text-link::after { bottom: 7px; }
  .crumbs a { padding: 10px 0; }
}

/* 減少動態 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  .js .rv { opacity: 1; transform: none; }
  .pane .layer { transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee-track span[aria-hidden="true"] { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* ---------- 補充原件 ---------- */
.pl-kicker {
  padding-right: 14px; border-right: 1px solid var(--line);
  color: var(--muted); white-space: nowrap;
}

.who-name, .who-role { display: block; }

.ph-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.count {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border-radius: var(--pill); background: rgba(255, 255, 255, 0.86);
  color: #161615; font-size: 0.625rem; letter-spacing: 0.1em;
}

.contact-grid { display: grid; gap: var(--pad); align-items: start; }
@container rail (min-width: 720px) {
  .contact-grid { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr); }
}

.svc + .svc { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }

[id] { scroll-margin-top: 96px; }

@media (hover: hover) {
  .card:hover .corner-arrow { transform: translate(3px, -3px); }
}


/* ---------- 生產試算 /calc ---------- */
.calc { display: grid; gap: var(--pad); }

.calc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 6px;
}
.calc-title { font-size: var(--t-xl); letter-spacing: -0.02em; font-weight: 450; }
.calc-desc { margin-top: 8px; font-size: 0.9375rem; line-height: 1.75; color: var(--muted); }

.calc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.calc-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px; border-radius: var(--pill);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: var(--t-sm); white-space: nowrap;
  transition: background-color var(--dur-hover) ease, box-shadow var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}
.calc-chip .n { font-family: var(--f-mono); font-size: 0.625rem; letter-spacing: 0.08em; color: var(--muted); }
.calc-chip:active { transform: scale(0.97); }
.calc-chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.calc-chip[aria-pressed="true"] .n { color: var(--on-ink-muted); }
@media (hover: hover) { .calc-chip:hover { box-shadow: inset 0 0 0 1px var(--fg); } }

.calc-tbl-wrap { overflow-x: auto; margin-top: 18px; }
.calc-tbl { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.calc-tbl th {
  padding: 0 10px 10px; text-align: left; white-space: nowrap;
  font-family: var(--f-mono); font-size: 0.625rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
}
.calc-tbl td { padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.calc-tbl tbody tr:last-child td { border-bottom: 0; }
.calc-tbl .num { text-align: right; }
.calc-tbl .u { letter-spacing: 0; text-transform: none; opacity: 0.78; }
.calc-tbl .input {
  height: 40px; padding: 0 10px; font-size: 0.875rem;
  box-shadow: inset 0 0 0 1px var(--line); background: var(--bg);
  font-variant-numeric: tabular-nums;
}
.calc-tbl .input[type="number"] { text-align: right; }
.calc-tbl .input::-webkit-outer-spin-button,
.calc-tbl .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-tbl .input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.calc-mat td:first-child { min-width: 150px; }
.calc-sub { font-family: var(--f-mono); font-size: 0.8125rem; color: var(--fg-2); }

.calc-x {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted);
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease;
}
.calc-x .icon { width: 14px; height: 14px; }
@media (hover: hover) { .calc-x:hover { background: var(--surface-hover); color: var(--fg); } }

.calc-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 18px;
}
.calc-foot .hint b { color: var(--fg); font-weight: 500; }

.calc-pack { display: grid; gap: 16px; margin-top: 20px; }
@container rail (min-width: 560px) {
  .calc-pack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.calc-pack-row { display: grid; gap: 8px; }
.calc-pack-k { font-size: var(--t-sm); font-weight: 500; color: var(--fg); }
.calc-pack .select { height: 46px; }

.calc-foot .hint { margin: 0; }
/* ---------- 流行健康食品推薦 ---------- */
.trends { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--pad); }
@container rail (min-width: 620px) {
  .trends { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.trend {
  display: grid; align-content: start; gap: 10px; min-width: 0;
  padding: clamp(20px, 1rem + 1.4vw, 34px);
  border-radius: var(--radius); background: var(--surface);
  transition: background-color var(--dur-hover) ease;
}
@media (hover: hover) { .trend:hover { background: var(--surface-hover); } }

.trend-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.trend-no { color: var(--muted); font-size: 0.6875rem; letter-spacing: 0.14em; }
.trend-topic {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: var(--pill); background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 0.75rem; color: var(--fg-2); white-space: nowrap;
}

.trend-title { font-size: var(--t-lg); line-height: 1.35; letter-spacing: -0.015em; }
.trend-en {
  color: var(--muted); font-size: 0.6875rem; letter-spacing: 0.08em;
  margin-top: -6px;
}
.trend-desc { font-size: 0.9375rem; line-height: 1.8; color: var(--muted); }

.trend-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.trend-tags li {
  padding: 3px 9px; border-radius: var(--radius-xs);
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.75rem; color: var(--fg-2);
}

.trend-link { margin-top: 4px; font-size: var(--t-sm); }

/* ---------- 流行素材（科技新營養） ---------- */
.igrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px var(--pad); }
@container rail (min-width: 560px) {
  .igrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.icard { display: grid; gap: 12px; align-content: start; min-width: 0; }
.icard-media {
  position: relative; display: block; aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2); isolation: isolate;
}
.icard-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 900ms var(--ease-out);
}
.icard-media .im { position: absolute; inset: 0; }
.icard-media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 10, 9, .18), transparent 34%, transparent 62%, rgba(10, 10, 9, .38));
}
.icard-no {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  font-size: 0.6875rem; letter-spacing: 0.14em; color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .55);
}
.icard-cat {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: var(--pill); background: rgba(18, 18, 16, .52);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  font-size: 0.6875rem; letter-spacing: 0.04em; color: #fff;
}

.icard-body { display: grid; gap: 7px; min-width: 0; }
.icard-title { font-size: var(--t-lg); line-height: 1.4; letter-spacing: -0.015em; font-weight: 500; }
.icard-en { font-size: 0.6875rem; letter-spacing: 0.08em; color: var(--muted); margin-top: -4px; }
.icard-desc {
  font-size: 0.9375rem; line-height: 1.75; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.icard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.icard-tags li {
  padding: 3px 9px; border-radius: var(--radius-xs);
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.75rem; color: var(--fg-2);
}
.icard-meta { font-size: 0.75rem; line-height: 1.75; color: var(--muted); }
.icard-meta span {
  display: inline-block; min-width: 58px; margin-right: 6px;
  color: var(--fg-2); font-weight: 500;
}

/* 圖片授權 */
.icredits {
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); font-size: 0.75rem; color: var(--muted);
}
.icredits summary { cursor: pointer; font-size: 0.8125rem; color: var(--fg-2); }
.icredits ul { display: grid; gap: 6px; margin: 14px 0 10px; padding: 0; list-style: none; }
.icredits li { line-height: 1.6; }
.icredits a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 2px; }
.icredits p { line-height: 1.7; }
