:root {
  --bg: #fdfbf8;
  --surface: #ffffff;
  --surface-low: #f8f3ec;
  --text: #3a312a;
  --text-muted: #6f655b;
  --outline: #a39889;
  --line: #ebe2d6;
  --primary: #a0744e;
  --primary-deep: #8a623f;
  --accent: #f0733f;
  --accent-deep: #e26030;
  --badge-bg: #f6ecdf;
  --badge-text: #8a623f;
  --star: #c98a2b;
  --inverse: #4a4038;
  --inverse-text: #f8f3ec;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(42, 34, 27, .05), 0 6px 20px rgba(42, 34, 27, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Plus Jakarta Sans", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.wrap--wide { max-width: 1200px; }
@media (min-width: 1024px) { .wrap { padding: 0 32px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 251, 248, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: #fff;
}
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__text b { font-size: 17px; letter-spacing: -.01em; }
.logo__text i { font-style: normal; color: var(--accent); }
.logo__text small { margin-top: 3px; font-size: 11px; font-weight: 500; letter-spacing: .16em; color: var(--text-muted); }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  position: relative; padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; color: var(--text-muted); transition: color .2s;
}
.main-nav a:hover { color: var(--text); }
.main-nav a[aria-current] { color: var(--primary); }
.main-nav a[aria-current]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 2px; border-radius: 2px; background: var(--primary);
}
.nav-toggle { display: none; padding: 8px; border: 0; background: none; color: var(--text); cursor: pointer; }
@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; padding: 8px 20px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav-open .main-nav { display: flex; }
  .main-nav a[aria-current]::after { display: none; }
}

/* ---------- Hero ---------- */
.hero { background: var(--surface-low); padding: 40px 0; }
@media (min-width: 768px) { .hero { padding-top: 56px; } }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 13px; color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--outline); }
.hero__body { max-width: 736px; }
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--badge-bg); color: var(--badge-text);
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
h1 { margin: 16px 0 0; font-size: clamp(28px, 4.4vw, 40px); line-height: 1.3; letter-spacing: -.01em; }
.lead { margin: 20px 0 0; font-size: 17px; line-height: 1.85; color: var(--text-muted); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 28px; font-size: 13px; color: var(--text-muted); }
.meta__author { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.avatar {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: #fff; font-size: 12px; font-weight: 700;
}
.meta__sep { width: 1px; height: 16px; background: var(--line); }
.meta a { color: var(--primary); font-weight: 600; }
.meta a:hover { text-decoration: underline; text-underline-offset: 4px; }

.cover {
  position: relative; aspect-ratio: 16 / 9; margin-top: -8px;
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
  background: linear-gradient(135deg, #f1e9dd, #e6dbcb);
  display: flex; align-items: center; justify-content: center;
  color: var(--outline); font-size: 14px; letter-spacing: .1em;
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 768px) { .cover { aspect-ratio: 2 / 1; } }

/* ---------- Layout ---------- */
.layout { display: grid; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
.content { min-width: 0; max-width: 640px; }
.toc { display: none; }
@media (min-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 64px; padding-top: 56px; padding-bottom: 56px; }
  .toc { display: block; position: sticky; top: 96px; align-self: start; }
  .toc-mobile { display: none; }
}

.disclosure {
  display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--surface-low); color: var(--outline);
}
.disclosure svg { flex: none; margin-top: 3px; }
.disclosure p { margin: 0; font-size: 13px; line-height: 1.7; }
.disclosure strong { color: var(--text-muted); font-weight: 600; }

.toc p { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--outline); }
.toc ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc ul ul { border: 0; padding-left: 12px; }
.toc a {
  display: block; margin-left: -1px; padding: 6px 14px; border-left: 2px solid transparent;
  font-size: 13px; line-height: 1.5; color: var(--text-muted); transition: color .2s, border-color .2s;
}
.toc a:hover { color: var(--primary); }
.toc a.is-active { color: var(--primary); font-weight: 600; border-color: var(--primary); }

.toc-mobile { margin-top: 24px; border-radius: var(--radius); background: var(--surface-low); }
.toc-mobile summary { padding: 14px 16px; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary span { font-weight: 400; color: var(--outline); }
.toc-mobile ol { margin: 0; padding: 0 16px 16px; list-style: none; }
.toc-mobile a { display: flex; gap: 12px; padding: 8px 0; font-size: 15px; color: var(--text-muted); }
.toc-mobile a span { color: var(--outline); font-variant-numeric: tabular-nums; }

/* ---------- Prose ---------- */
.prose { margin-top: 32px; }
.prose > p, .prose li { font-size: 17px; line-height: 1.85; color: var(--text-muted); }
.prose > p { margin: 20px 0; }
.prose strong { font-weight: 600; color: var(--text); }
.prose > p a, .prose li a {
  color: var(--primary); text-decoration: underline;
  text-decoration-color: rgba(160, 116, 78, .35); text-underline-offset: 4px;
}
.prose > p a:hover, .prose li a:hover { text-decoration-color: var(--primary); }
.prose h2 { margin: 56px 0 16px; font-size: 28px; line-height: 1.4; scroll-margin-top: 96px; }
.prose h2::before {
  content: ""; display: block; width: 36px; height: 3px; margin-bottom: 14px;
  border-radius: 3px; background: var(--primary);
}
.prose h3 { margin: 36px 0 12px; font-size: 21px; line-height: 1.45; scroll-margin-top: 96px; }
.prose > ul, .prose > ol { margin: 20px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.prose > ul li::marker { color: rgba(160, 116, 78, .6); }
.prose > ol li::marker { color: var(--primary); font-weight: 600; }

.price { color: var(--accent); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.price--lg { display: block; font-size: 24px; line-height: 1; }

.btn-buy {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff;
  font-size: 14px; font-weight: 600; box-shadow: 0 1px 2px rgba(42, 34, 27, .12);
  transition: filter .2s, box-shadow .2s;
}
.btn-buy:hover { filter: brightness(1.1); box-shadow: var(--shadow); }
.btn-buy--block { display: flex; margin-top: 28px; padding: 14px 20px; font-size: 15px; text-align: center; }

.pick, .product {
  margin: 32px 0; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.pick__head {
  padding: 12px 20px; background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .04em;
}
.pick__body { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px; }
.pick__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.pick__title p { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.4; }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.checks li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.75; color: var(--text-muted); }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

.product { border-radius: var(--radius); }
.product__tag { padding: 10px 20px; background: var(--surface-low); color: var(--accent-deep); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.product__body { padding: 20px; }
.product__name { margin: 0; font-size: 18px; font-weight: 700; }
.product__desc { margin: 8px 0 0; font-size: 15px; line-height: 1.75; color: var(--text-muted); }
.product__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-top: 16px; }
.stars { display: block; margin-bottom: 6px; color: var(--star); font-size: 15px; letter-spacing: 2px; }
.stars small { color: var(--text-muted); font-size: 13px; letter-spacing: 0; }

.table-scroll { margin: 28px -20px; padding: 0 20px; overflow-x: auto; }
@media (min-width: 640px) { .table-scroll { margin: 28px 0; padding: 0; } }
table {
  width: 100%; min-width: 34rem; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius); border-spacing: 0; overflow: hidden;
}
thead { background: var(--surface-low); }
th { padding: 12px 16px; font-size: 14px; font-weight: 600; white-space: nowrap; }
td { padding: 12px 16px; font-size: 15px; line-height: 1.75; color: var(--text-muted); vertical-align: top; border-top: 1px solid var(--line); }

.faq { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; }
.faq details { border-radius: var(--radius); background: var(--surface-low); }
.faq summary {
  display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px;
  font-weight: 600; line-height: 1.6; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--primary); font-size: 20px; line-height: 1.2; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0; padding: 0 20px 18px; font-size: 15px; line-height: 1.85; color: var(--text-muted); }

/* ---------- Related ---------- */
.related { padding: 56px 0 72px; background: var(--surface-low); }
.related__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.related__head small { font-size: 12px; font-weight: 600; letter-spacing: .16em; color: var(--primary); }
.related__head h2 { margin: 6px 0 0; font-size: 26px; }
.related__head a { font-size: 14px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin: 0; font-size: 18px; line-height: 1.5; }
.card p {
  margin: 0; font-size: 14px; line-height: 1.75; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card small { margin-top: auto; font-size: 12px; color: var(--outline); }
.pager { display: grid; gap: 16px; margin-top: 40px; }
@media (min-width: 768px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 600; line-height: 1.5; }
.pager a:hover { border-color: var(--primary); }
.pager small { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--outline); }
.pager__next { text-align: right; }

/* ---------- Footer ---------- */
.site-footer { background: var(--inverse); color: var(--inverse-text); }
.site-footer__grid { display: grid; gap: 40px; padding-top: 56px; padding-bottom: 56px; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 5fr 4fr 3fr; gap: 32px; } }
.logo--inverse .logo__mark { background: rgba(214, 176, 140, .2); color: #d6b08c; }
.logo--inverse .logo__text small { color: rgba(248, 243, 236, .55); }
.site-footer p { max-width: 24rem; margin: 16px 0 0; font-size: 15px; line-height: 1.75; color: rgba(248, 243, 236, .65); }
.site-footer h2 { margin: 0 0 16px; font-size: 12px; font-weight: 600; letter-spacing: .16em; color: rgba(248, 243, 236, .45); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer .cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.site-footer li a { display: block; padding: 6px 0; font-size: 15px; color: rgba(248, 243, 236, .65); transition: color .2s; }
.site-footer li a:hover { color: var(--inverse-text); }
.site-footer__bottom { padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(248, 243, 236, .12); font-size: 13px; color: rgba(248, 243, 236, .45); }

/* ---------- 待補連結的購買按鈕 ---------- */
.btn-buy.is-pending { opacity: .55; cursor: not-allowed; }
.btn-buy.is-pending::after { content: "（連結待補）"; font-weight: 400; }

/* ---------- 首頁 ---------- */
.home-hero { background: var(--surface-low); padding: 56px 0 64px; }
.home-hero h1 { max-width: 18em; }
.home-hero .lead { max-width: 36em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chips a {
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text-muted);
  transition: color .2s, border-color .2s;
}
.chips a:hover { color: var(--primary); border-color: var(--primary); }
.home-section { padding: 56px 0; }
.home-section .related__head { margin-bottom: 28px; }
.card--soon { opacity: .6; pointer-events: none; }
.about { max-width: 640px; }
.about p { font-size: 16px; line-height: 1.85; color: var(--text-muted); }
.about strong { color: var(--text); font-weight: 600; }

.site-footer .site-footer__disclosure { max-width: 48rem; margin: 0 0 14px; font-size: 13px; line-height: 1.8; color: var(--inverse-text); opacity: .7; }
.site-footer__disclosure strong { font-weight: 600; }

.cover-caption { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 12px; letter-spacing: .04em; line-height: 1.5; }

/* ---------- 重點整理（給搜尋與 AI 摘要用的直接答案） ---------- */
.tldr { margin: 28px 0; padding: 20px 24px; border-left: 3px solid var(--primary); border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface-low); }
.tldr__title { margin: 0 0 10px; font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--primary); }
.tldr ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.tldr li { font-size: 16px; line-height: 1.75; }

/* ---------- 文章卡片（主圖在上、三欄；主圖維持原本 2:1，整張顯示不變形） ---------- */
.card--photo { overflow: hidden; }
.card__img { display: block; align-self: stretch; width: calc(100% + 48px); max-width: none; height: auto; aspect-ratio: 2 / 1; object-fit: cover; margin: -24px -24px 8px; background: var(--surface-low); }
.card--photo h3, .card--photo p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding-top: 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.card__meta span { display: inline-flex; align-items: center; gap: 5px; }
