/* 四安生活禪 原型
   策展感靠版面、字體、留白與節奏表現。令牌 → 基礎 → 背景流線 → 導覽 → 版面 → 禪卡面板 → 長條圖 → 頁尾 */

:root {
  /* ---- 日間 ---- */
  --bg: #FFFFFF;
  --bg2: #FAF8F5;
  --panel: #F3EEE5;
  --text: #2B2620;
  --muted: #675A47;          /* 小字用，白底約 6.7:1 */
  --accent: #8A7459;         /* 線條、細邊、裝飾 */
  --link: #6B5638;
  --hover: #BA006E;
  --solid: #7A6347;          /* 實心按鈕底（白字 5.67:1） */
  --on-hover: #FFFFFF;       /* hover／active 底 #BA006E 上的字（6.34:1） */
  --on-solid: #FFFFFF;
  --line: #E8E2D9;
  --flow: rgba(138, 116, 89, .05);
  --haze-a: rgba(228, 198, 138, .38);
  --haze-b: rgba(240, 214, 164, .50);
  --dot-size: 11px;
  /* 八色裡的黃、綠：淺底用較深的一階，深底用較亮的一階（業主 2026-11-02） */
  --c-yellow: #FFB71B;
  --c-green: #22AC38;
  color-scheme: light;
  --body-weight: 400;
  --gutter: 16px;
  --maxw: 1200px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --serif: 'Noto Serif TC', 'Songti TC', 'PMingLiU', serif;

  /* ---- 夜間色票（全部在此；以 data-dark="b|c|d|e" 一行切換，預設為現行） ---- */
  --dk-bg: #2B2218;
  --dk-bg2: #382F26;
  --dk-haze-a: rgba(227, 207, 171, .16);
  --dk-haze-b: rgba(205, 140, 60, .20);
}
:root[data-dark="a"], .cmp[data-dark="a"] { --dk-bg: #00303C; --dk-bg2: #003A48; --dk-haze-a: rgba(227, 207, 171, .20); --dk-haze-b: rgba(0, 160, 180, .32); }
:root[data-dark="b"], .cmp[data-dark="b"] { --dk-bg: #0F3B36; --dk-bg2: #1D4742; --dk-haze-a: rgba(227, 207, 171, .18); --dk-haze-b: rgba(30, 150, 120, .28); }
:root[data-dark="c"], .cmp[data-dark="c"] { --dk-bg: #1C3A2E; --dk-bg2: #2A463B; --dk-haze-a: rgba(227, 207, 171, .18); --dk-haze-b: rgba(70, 140, 90, .26); }
:root[data-dark="d"], .cmp[data-dark="d"] { --dk-bg: #2B2218; --dk-bg2: #382F26; --dk-haze-a: rgba(227, 207, 171, .16); --dk-haze-b: rgba(205, 140, 60, .20); }
:root[data-dark="f"], .cmp[data-dark="f"] { --dk-bg: #2B2218; --dk-bg2: #382F26; --dk-haze-a: rgba(227, 207, 171, .16); --dk-haze-b: rgba(0, 160, 180, .22); }
:root[data-dark="e"], .cmp[data-dark="e"] { --dk-bg: #0B3440; --dk-bg2: #1A404B; --dk-haze-a: rgba(227, 190, 120, .24); --dk-haze-b: rgba(227, 207, 171, .16); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--dk-bg); --bg2: var(--dk-bg2); --panel: var(--dk-bg2);
    --text: #F2EDE4; --muted: #CFC6B4; --accent: #E3CFAB; --link: #E3CFAB;
    --hover: #FF9FCF; --solid: #E3CFAB; --on-solid: var(--dk-bg); --on-hover: var(--dk-bg);
    --line: rgba(242, 237, 228, .14); --flow: rgba(227, 207, 171, .07);
    --haze-a: var(--dk-haze-a); --haze-b: var(--dk-haze-b);
    --c-yellow: #FDD000; --c-green: #6CBB5A;
    --body-weight: 500; color-scheme: dark;
  }
}
:root[data-theme="dark"], .cmp {
  --bg: var(--dk-bg); --bg2: var(--dk-bg2); --panel: var(--dk-bg2);
  --text: #F2EDE4; --muted: #CFC6B4; --accent: #E3CFAB; --link: #E3CFAB;
  --hover: #FF9FCF; --solid: #E3CFAB; --on-solid: var(--dk-bg); --on-hover: var(--dk-bg);
  --line: rgba(242, 237, 228, .14); --flow: rgba(227, 207, 171, .07);
  --haze-a: var(--dk-haze-a); --haze-b: var(--dk-haze-b);
  --c-yellow: #FDD000; --c-green: #6CBB5A;
  --body-weight: 500; color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 104px; }
@media (min-width: 1080px) { html { scroll-padding-top: 120px; } }
body {
  margin: 0; color: var(--text);
  font-family: var(--serif); font-size: 17px; line-height: 1.9; font-weight: var(--body-weight);
  overflow-x: clip;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .28em; }
a:active { color: var(--hover); }
@media (hover: hover) { a:hover { color: var(--hover); } }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--bg); padding: 8px 14px; border: 1px solid var(--accent); }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 38em; }

/* ---------- 背景：霧與流線 ---------- */
.haze { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.haze::before, .haze::after { content: ""; position: absolute; border-radius: 50%; will-change: transform; }
.haze::before {
  width: 90vmax; height: 60vmax; left: -20vmax; top: -22vmax;
  background: radial-gradient(closest-side, var(--haze-a), transparent);
  animation: drift 40s ease-in-out infinite alternate;
}
.haze::after {
  width: 80vmax; height: 55vmax; right: -25vmax; top: 10vmax;
  background: radial-gradient(closest-side, var(--haze-b), transparent);
  animation: drift 52s ease-in-out infinite alternate-reverse;
}
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(6vmax, 4vmax, 0); } }

.flow { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--flow); }
.flow path { fill: none; stroke: currentColor; stroke-width: .8; vector-effect: non-scaling-stroke; }
.flow { -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.flow g { animation: flow-drift 52s ease-in-out infinite alternate; }
@keyframes flow-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-70px, 36px, 0); } }

/* 圖表壓在底紋上方：加淡淡的半透明底 */
.chart-wrap { background: color-mix(in srgb, var(--bg) 20%, transparent); border-radius: 16px; padding: 12px; margin-inline: -12px; }

.curve { display: block; width: 100%; height: 28px; color: var(--accent); overflow: visible; }
.curve path { fill: none; stroke: currentColor; stroke-width: .9; opacity: .42; vector-effect: non-scaling-stroke; }
.curve path + path { opacity: .24; }
.curve path + path + path { opacity: .12; }
.nav-wave { display: block; width: 100%; height: 22px; color: var(--accent); pointer-events: none; }
.nav-wave path { fill: none; stroke: currentColor; stroke-width: .8; opacity: .22; vector-effect: non-scaling-stroke; }
.nav-wave path + path { opacity: .12; }
.f-wave .hair { fill: none; stroke: var(--accent); stroke-width: .8; opacity: .3; vector-effect: non-scaling-stroke; }

/* ---------- 淡入 ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 導覽（無外框、無膠囊底） ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background-color .5s var(--ease); }
.site-header.is-scrolled { background: linear-gradient(to bottom, var(--bg2) 0, var(--bg2) 78%, transparent 100%); }
body.menu-open .site-header { background: var(--bg); }
.bar { display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 8px 0 var(--gutter); }
.logo { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; text-decoration: none; }
.logo img { display: block; height: 34px; width: auto; }
.logo .night { display: none; }
:root[data-theme="dark"] .logo .day, .cmp .logo .day { display: none; }
:root[data-theme="dark"] .logo .night, .cmp .logo .night { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo .day { display: none; }
  :root:not([data-theme="light"]) .logo .night { display: block; }
}
.tools { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  background: none; border: 0; border-radius: 50%; cursor: pointer; color: var(--text); text-decoration: none;
}
@media (hover: hover) { .icon-btn:hover { color: var(--hover); } }
.icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg .fill { fill: currentColor; stroke: none; }
.tools .only-desk { display: none; }

/* 按鈕：實心輔色，其餘用純文字連結 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 24px;
  border: 0; border-radius: 999px; background: var(--solid); color: var(--on-solid);
  text-decoration: none; font-size: 1rem; letter-spacing: .08em; cursor: pointer; line-height: 1.2;
  transition: background-color .3s;
}
.btn:active { background: var(--hover); color: var(--on-hover); }
@media (hover: hover) { .btn:hover { background: var(--hover); color: var(--on-hover); } }
.btn--sm { padding: 0 18px; font-size: .9375rem; }
.lnk { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--link); font-size: .96875rem; letter-spacing: .06em; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--panel); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--text); font-weight: 600; }
@media (hover: hover) { .avatar:hover { color: var(--hover); } }
.login { display: none; }

.nav-d { display: none; }

.search-panel { background: var(--panel); padding: 12px var(--gutter); }
.search-panel form { max-width: var(--maxw); margin: 0 auto; display: flex; gap: 0 8px; align-items: center; flex-wrap: wrap; }
.search-panel input { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 14px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--accent); border-radius: 999px; }
.search-panel .msg { flex-basis: 100%; font-size: .875rem; color: var(--muted); }
.search-panel .msg:not(:empty) { margin-top: 6px; }

/* 手機全螢幕選單 */
#mobile-menu { position: fixed; inset: 64px 0 0 0; background: var(--bg); overflow-y: auto; padding: 8px var(--gutter) 48px; z-index: 49; }
#mobile-menu[hidden] { display: none; }
.m-item > a, .m-item > button {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px;
  padding: 0; background: none; border: 0; text-align: left;
  color: var(--text); text-decoration: none; font-size: 1.25rem; cursor: pointer;
}
@media (hover: hover) { .m-item > a:hover, .m-item > button:hover { color: var(--hover); } }
.m-sub { padding: 0 0 12px 16px; }
.m-sub a { display: flex; align-items: center; min-height: 48px; color: var(--link); }
.m-foot { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 28px; }
.chev::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .3s; margin-left: 8px; display: inline-block; }
[aria-expanded="true"] > .chev::after, [aria-expanded="true"].chev::after { transform: rotate(-135deg) translate(-2px, 0); }
body.menu-open { overflow: hidden; }

@media (min-width: 1080px) {
  .bar { max-width: var(--maxw); margin: 0 auto; height: 76px; padding: 0 var(--gutter); gap: 14px; }
  .logo img { height: 38px; }
  .burger, #mobile-menu, .tools .only-mob { display: none !important; }
  .tools .only-desk { display: inline-flex; }
  .login { display: inline-flex; }
  .nav-d { display: block; margin: 0 auto; }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .nav-list > li { position: relative; }
  .nav-list a, .dd-btn {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: none; border: 0;
    color: var(--text); text-decoration: none; font-size: .96875rem; letter-spacing: .06em; cursor: pointer; white-space: nowrap;
  }
  .dd-btn[aria-expanded="true"] { color: var(--hover); }
  @media (hover: hover) { .nav-list a:hover, .dd-btn:hover, .dd-btn[aria-expanded="true"] { color: var(--hover); text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 1px; } }
  .dd-menu { position: absolute; left: 0; top: calc(100% + 10px); min-width: 188px; padding: 8px; background: var(--panel); border-radius: 12px; }
  .dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
  .dd-menu a { display: flex; width: 100%; border-radius: 6px; }
  @media (hover: hover) { .dd-menu a:hover { background: var(--bg2); } }
  .search-panel { max-width: var(--maxw); margin: 0 auto; border-radius: 16px; }
}

/* ---------- 版面 ---------- */
main { display: block; padding-top: 88px; }
main:focus { outline: none; }
@media (min-width: 1080px) { main { padding-top: 132px; } }

.kicker { font-size: .875rem; letter-spacing: .28em; color: var(--muted); }
h1 { font-size: clamp(2.5rem, 8.5vw, 5.5rem); line-height: 1.18; font-weight: 600; letter-spacing: .04em; }
h2 { font-size: clamp(1.75rem, 4.4vw, 2.75rem); line-height: 1.35; font-weight: 600; letter-spacing: .03em; }
h3 { font-size: 1.375rem; line-height: 1.5; font-weight: 600; letter-spacing: .02em; }
.lede { margin-top: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; margin-top: 36px; }
.actions a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }

.hero { position: relative; padding-bottom: 48px; }
.hero-grid { position: relative; display: grid; gap: 48px; }
.hero .kicker { margin-bottom: 20px; }
.hero-card { justify-self: center; }
.hero-img { display: block; width: min(62%, 260px); height: auto; aspect-ratio: 473 / 768; border-radius: 10px; }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.25rem); line-height: 1.3; letter-spacing: .05em; text-wrap: balance; }
.hero h1 span, .closing-line span { display: inline-block; }
.closing { padding: 96px 0 0; }
.closing .curve { margin-bottom: 28px; }
.closing-line { font-size: clamp(1.5rem, 4.4vw, 2.5rem); line-height: 1.5; font-weight: 600; letter-spacing: .06em; text-wrap: balance; max-width: 22em; }
.hero-card figcaption { margin-top: 14px; font-size: .8125rem; color: var(--muted); letter-spacing: .08em; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: 72px; }
  .hero { padding-top: 24px; }
  .hero-card { justify-self: center; }
}

/* 區塊 */
.sec { padding: 72px 0 0; }
.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.sec-grid > * { min-width: 0; }
.sec-head h2 { font-size: clamp(1.75rem, 3vw, 2.125rem); }
.sec-head .kicker { display: block; margin-bottom: 4px; }
.sec .curve { margin-bottom: 24px; }
@media (min-width: 900px) {
  .sec { padding-top: 104px; }
  .sec-grid { grid-template-columns: 280px minmax(0, 1fr); gap: 56px; }
  .sec-head { position: sticky; top: 112px; align-self: start; }
}

.progress { height: 2px; background: var(--line); margin-top: 28px; max-width: 38em; }
.progress i { display: block; height: 100%; width: var(--p); background: var(--accent); }
.progress-note { font-size: .875rem; color: var(--muted); margin-top: 8px; letter-spacing: .08em; }
.big-q { font-size: clamp(1.75rem, 4.6vw, 2.75rem); line-height: 1.45; font-weight: 600; letter-spacing: .03em; max-width: 20em; }

.steps { counter-reset: s; margin-top: 40px; max-width: 38em; }
.steps li { display: grid; grid-template-columns: 3.25rem 1fr; padding: 10px 0; align-items: baseline; }
.steps li::before { counter-increment: s; content: "0" counter(s); font-size: 1.125rem; letter-spacing: .1em; color: var(--muted); }

/* 清單 */
.entries { max-width: 46em; }
.entry { padding: 14px 0 18px; }
.entry + .entry { margin-top: 6px; }
.entry h3, .entry h4 { font-size: 1.3125rem; font-weight: 600; line-height: 1.6; }
.entry h3 a { display: inline-flex; align-items: center; min-height: 44px; }
.kind { display: inline-block; padding: 0 10px; margin-bottom: 2px; border-radius: 999px; background: var(--panel); color: var(--muted); font-size: .8125rem; letter-spacing: .12em; line-height: 1.8; }
.meta { margin-top: 2px; font-size: .8125rem; letter-spacing: .1em; color: var(--muted); line-height: 1.8; }
.entry--q .q { font-size: 1.375rem; line-height: 1.65; letter-spacing: .03em; margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 7px; font-size: .8125rem; color: var(--muted); letter-spacing: .06em; }
.dot { display: inline-block; width: var(--dot-size); height: var(--dot-size); border-radius: 50%; background: var(--c, var(--accent)); border: 1px solid var(--muted); flex: none; }
.more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; }

.doors { max-width: 46em; }
.door { padding: 14px 0 22px; }
.door h3 { font-size: 1.75rem; }
.door h3 a { display: inline-flex; align-items: center; min-height: 44px; }
.door p { color: var(--muted); font-size: 1rem; }
@media (min-width: 700px) { .doors { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; max-width: none; } }

/* ---------- 禪卡面板：左圖右文 ---------- */
.zsplit { display: grid; grid-template-columns: max(108px, min(38%, 240px)) minmax(0, 1fr); gap: 20px 24px; align-items: center; max-width: 46em; }
.zimg { display: block; width: 100%; height: auto; aspect-ratio: 473 / 768; border-radius: 10px; }
.zcolor { display: flex; align-items: center; gap: 10px; font-size: .9375rem; letter-spacing: .2em; color: var(--muted); }
.zphrase { text-wrap: balance; font-size: clamp(1.75rem, 5vw, 2.5rem); line-height: 1.3; margin: 4px 0 14px; font-weight: 600; letter-spacing: .06em; }
.zsplit--empty .zphrase { font-size: clamp(1.5rem, 4.4vw, 2.25rem); }
@media (max-width: 639px) { .zsplit--empty { grid-template-columns: minmax(0, 1fr); justify-items: start; } .zsplit--empty .zimg { width: min(56%, 200px); } }
.zimg-fail { min-width: 160px; aspect-ratio: 473 / 768; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--panel); text-align: center; padding: 12px; }
.zimg-fail .dot { --dot-size: 14px; }
.zf-name { font-size: clamp(2rem, 9vw, 3rem); line-height: 1.1; font-weight: 600; }
.zf-phrase { font-size: .9375rem; letter-spacing: .12em; color: var(--muted); }
.zmean { font-size: 1rem; line-height: 1.9; max-width: 28em; }
.zact { margin-top: 20px; }
.notice { display: flex; gap: 12px; align-items: baseline; margin-top: 40px; padding: 12px 16px; max-width: 540px; border-radius: 8px; background: var(--panel); font-size: 1rem; line-height: 1.7; }
.notice .pill { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; letter-spacing: .1em; color: var(--muted); }
.notice .pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #BA006E; }

.greet { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; padding-top: 8px; }
.greet .date { font-size: .9375rem; letter-spacing: .14em; color: var(--muted); }
.greet h1 { font-size: clamp(2.25rem, 6.5vw, 4rem); }
.txt-btn { min-height: 44px; padding: 0 2px; background: none; border: 0; cursor: pointer; font: inherit; font-size: .9375rem; color: var(--link); text-decoration: underline; text-underline-offset: .28em; text-decoration-thickness: 1px; }
@media (hover: hover) { .txt-btn:hover { color: var(--hover); } }

/* ---------- 直式長條圖 ---------- */
.chart-sum { max-width: 38em; }
.chart-sum strong { font-weight: 600; }
.chart-wrap { max-width: 46em; margin: 28px 0 36px; }
@media (max-width: 899px) { .chart-wrap { margin-inline: calc(-1 * var(--gutter)); } }
@media (max-width: 359px) { .chart-wrap { overflow-x: auto; } .chart { min-width: 360px; } }
.chart { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); padding: 24px 4px 8px; }
.col { display: flex; flex-direction: column; align-items: stretch; padding: 0; background: none; border: 0; cursor: pointer; color: var(--text); text-align: center; min-width: 0; }
.col:disabled { cursor: default; }
.track { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 196px; border-bottom: 1px solid var(--muted); }
.n { font-size: 1.0625rem; line-height: 1.6; margin-bottom: 6px; font-weight: 600; letter-spacing: .02em; }
.stick { width: 18px; height: 0; background: var(--c); border: 0; border-radius: 3px 3px 0 0; box-sizing: border-box; transition: height .9s var(--ease); min-height: 2px; }
.grown .stick { height: var(--h); }
@media (hover: hover) { .col:hover .n { color: var(--hover); } }
.lab { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0 10px; font-size: 1rem; line-height: 1.4; }
.col .dot { --dot-size: 14px; }
.lab::after { content: ""; display: block; width: 22px; height: 0; border-top: 3px solid var(--text); margin-top: 2px; opacity: 0; }
.col[aria-pressed="true"] .lab { font-weight: 600; }
.col[aria-pressed="true"] .lab::after { opacity: 1; }
.col:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; z-index: 1; }
.is-empty .stick { background: var(--line); border: 0; opacity: 1; }
.is-empty .n { color: var(--muted); font-weight: 400; }

/* ---------- 陪伴區 ---------- */
.mix-title { margin-bottom: 20px; }
#mix:focus, #mix-title:focus { outline: none; }

/* ---------- 頁尾 ---------- */
.site-footer { margin-top: 120px; position: relative; }
.f-wave { display: block; width: 100%; height: 56px; color: var(--bg2); }
.f-wave path { fill: currentColor; }
.f-body { background: var(--bg2); padding: 24px 0 32px; }
.f-grid { display: grid; gap: 0; }
.f-brand p { max-width: 24em; margin-top: 10px; color: var(--muted); font-size: 1rem; line-height: 1.8; text-wrap: balance; }
.f-brand .logo { margin: 0; }
.f-social { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin-top: 8px; margin-left: -10px; }
.f-social .f-site { margin-left: 8px; }
.f-site { display: inline-flex; align-items: center; min-height: 44px; }
.f-col a { display: inline-flex; align-items: center; min-height: 44px; }
.f-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: .1em; line-height: 1.5; }
.f-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 56px; padding: 0; background: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; letter-spacing: .1em; text-align: left; }
.f-pm::after { content: "+"; font-weight: 400; font-size: 1.5rem; color: var(--muted); }
[aria-expanded="true"] > .f-pm::after { content: "−"; }
.f-col ul { padding-bottom: 12px; }
.f-brand { padding-bottom: 20px; }
.f-base { margin-top: 20px; font-size: .875rem; color: var(--muted); }
.f-base .curve { margin-bottom: 16px; }
.f-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.f-links a { display: inline-flex; align-items: center; min-height: 44px; }
.f-disc { margin-top: 8px; line-height: 1.8; max-width: 44em; }
.f-copy { margin-top: 16px; letter-spacing: .04em; line-height: 1.8; }
@media (min-width: 900px) {
  .f-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
  .f-title { padding-bottom: 8px; }
  .f-brand { padding-bottom: 0; }
}
@media (min-width: 900px) { .mix-cols { max-width: 46em; } }

/* ---------- 色票比較頁 ---------- */
.cmp { position: relative; isolation: isolate; overflow: hidden; background: var(--bg); color: var(--text); padding: 20px var(--gutter) 40px; margin-bottom: 40px; }
.cmp::before { content: ""; position: absolute; z-index: -1; inset: -10% -10% 30% -10%; background:
  radial-gradient(ellipse 45% 40% at 22% 14%, var(--haze-a), transparent 70%),
  radial-gradient(ellipse 40% 35% at 80% 55%, var(--haze-b), transparent 70%); }
.cmp .logo { margin-right: 0; }
.cmp-nav { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding-bottom: 20px; }
.cmp-nav ul { display: flex; gap: 4px 12px; flex-wrap: wrap; margin-right: auto; }
.cmp-nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; text-decoration: none; color: var(--text); }
.cmp .chart-wrap { margin-inline: 0; overflow-x: auto; }
.cmp .chart { min-width: 360px; }
.cmp h2.cmp-name { font-size: 1.125rem; letter-spacing: .1em; font-weight: 600; margin: 0; }
.ctab-wrap:focus-visible { outline: 2px solid #F2EDE4; }
.cmp-meta { font-size: .875rem; color: var(--muted); letter-spacing: .06em; line-height: 1.8; margin-bottom: 16px; }
.cmp-meta strong { color: var(--text); font-size: 1.125rem; letter-spacing: .1em; }
.cmp .dot { --dot-size: 13px; }
.cmp-surface { background: var(--bg2); border-radius: 12px; padding: 20px; }
.cmp[data-dark="f"] .cmp-surface { background: #00303C; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #CFC6B4; margin-right: 8px; vertical-align: -2px; }
.cmp-foot { margin-top: 28px; font-size: .875rem; color: var(--muted); line-height: 1.8; }
.cmp-grid { display: grid; gap: 0 24px; }
@media (min-width: 1100px) { .cmp-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1700px) { .cmp-grid { grid-template-columns: 1fr 1fr 1fr; } }
.ctab { width: 100%; border-collapse: collapse; font-size: .9375rem; margin: 8px 0 40px; }
.ctab th, .ctab td { text-align: left; padding: 8px 10px; }
.ctab th { color: #CFC6B4; font-weight: 400; letter-spacing: .08em; font-size: .875rem; }
.ctab-wrap { overflow-x: auto; }

/* ---------- 強制色彩 ---------- */
@media (forced-colors: active) {
  .nav-wave, .f-wave .hair { display: none; }
  .stick, .dot { forced-color-adjust: none; border: 1px solid CanvasText; }
  .col[aria-pressed="true"] .lab::after { border-top-color: Highlight; }
  .dd-menu, .search-panel, .notice, .btn, .avatar, .kind { border: 1px solid CanvasText; }
  .flow, .curve { display: none; }
}

/* ---------- 視窗很矮（含 400% 縮放）：縮小頁首並同步 scroll-padding ---------- */
@media (max-height: 480px) { html { scroll-padding-top: 64px; } .bar { height: 56px !important; } .nav-wave { display: none !important; } #mobile-menu { inset-block-start: 56px; } }

/* ---------- 使用者暫停背景動態 ---------- */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; }

/* ---------- 減少動態 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .stick { height: var(--h); }
}
