/* 中華民國兒童生長協會 — 新版靜態網站共用樣式
   亮色、活潑：翠綠主色 + 天空藍 + 陽光黃點綴。純 CSS，無框架。 */

:root {
  --green: #4a8a3f;
  --green-dark: #37682e;
  --green-btn: #44823a;
  --green-soft: #eef6e6;
  --green-pale: #f5faf0;
  --sky: #4a6fd0;
  --sky-soft: #e9eefb;
  --sun: #f2c14e;
  --sun-soft: #fdf3d7;
  --rose: #c983c0;
  --rose-soft: #fbeef7;
  --ink: #22312b;
  --muted: #5b6b63;
  --line: #e3ecdd;
  --bg: #f3f8ec;
  --card: #ffffff;
  --shadow: 0 2px 12px rgba(74, 138, 63, 0.10);
  --radius: 14px;
  --max: 1060px;
  --font: "Microsoft JhengHei", "微軟正黑體", "PingFang TC", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
}

img { max-width: 100%; height: auto; }

a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--green); }

h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--green-dark); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

/* ---------- 頁首 ---------- */
.site-header { background: #fff; border-bottom: 3px solid var(--green); }
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-logo {
  width: 56px; height: 56px; flex: none;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.brand-logo img { width: 48px; height: 48px; display: block; }
.brand-name { font-size: 21px; font-weight: 700; line-height: 1.3; }
.brand-sub { font-size: 13px; color: var(--muted); line-height: 1.4; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: 10px 13px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px;
}
.site-nav a:hover { background: var(--green-soft); color: var(--green-dark); }
.site-nav a[aria-current="page"] { background: var(--green); color: #fff; }

.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px;
  background: var(--green-btn); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 16px; border: none; cursor: pointer;
  min-height: 44px; line-height: 1.4;
}
.btn:hover { background: var(--green-dark); color: #fff; }
.btn-sky { background: var(--sky); }
.btn-sky:hover { background: #1e8fc2; }
.btn-outline {
  background: #fff; color: var(--green-dark);
  border: 2px solid var(--green);
}
.btn-outline:hover { background: var(--green-soft); color: var(--green-dark); }

.menu-btn { display: none; }

/* ---------- 主視覺 ---------- */
.hero {
  background: linear-gradient(120deg, #dceccf 0%, #dde6fa 55%, #fbeec8 100%);
  padding: 56px 0 60px;
}
/* 首頁主視覺：橫向長條插圖做背景，左側淡色較濃讓文字清楚 */
.hero-home {
  background-image: linear-gradient(100deg, rgba(243, 248, 236, 0.85) 0%, rgba(243, 248, 236, 0.70) 45%, rgba(243, 248, 236, 0.35) 100%), url("../../images/ai/home-hero-strip-r2.webp");
  background-size: cover;
  background-position: center;
}
.hero h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 0.4em; }
.hl {
  background: linear-gradient(transparent 62%, var(--sun) 62%, var(--sun) 92%, transparent 92%);
  padding: 0 2px;
}
.top-note { margin-top: 20px; }
.hero p.lead { font-size: 19px; color: #33503f; max-width: 60ch; }
.hero-page h1 { font-size: clamp(26px, 4vw, 34px); }
.hero-page p.lead { font-size: 17px; color: var(--muted); }
section.hero.hero-page { padding: 34px 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- 區塊 ---------- */
section.block { padding: 44px 0 8px; }
.section-title {
  font-size: 24px; padding-left: 14px; margin-bottom: 0.4em;
  border-left: 8px solid transparent;
  border-image: linear-gradient(var(--green), var(--sky)) 1;
}
.section-sub { color: var(--muted); margin-bottom: 20px; }

/* ---------- 最新消息 ---------- */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-list li { border-bottom: 1px solid var(--line); }
.news-list a {
  display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap;
  padding: 14px 6px; text-decoration: none; color: var(--ink);
}
.news-list a:hover { background: var(--green-pale); }
.news-date { color: var(--muted); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.news-tag {
  flex: none; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
}
.news-tag.blue { background: var(--sky-soft); color: #17759f; }
.news-tag.yellow { background: var(--sun-soft); color: #8a6400; }
.news-title { font-weight: 600; }
.news-list a:hover .news-title { color: var(--green-dark); text-decoration: underline; }
.more-link { display: inline-block; margin-top: 16px; font-weight: 700; }

/* ---------- 最新消息便利貼 ---------- */
.news-list.notes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px;
  border-top: none; padding: 6px 2px;
}
.news-list.notes li {
  background: var(--green-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 18px 18px 16px; box-shadow: 0 4px 12px rgba(6, 122, 77, 0.10);
  display: flex; flex-direction: column; gap: 8px;
}
.news-list.notes li:nth-child(3n+2) { background: var(--sky-soft); border-color: #bfe0ef; box-shadow: 0 4px 12px rgba(2, 94, 138, 0.10); }
.news-list.notes li:nth-child(3n) { background: var(--sun-soft); border-color: #ffe08a; box-shadow: 0 4px 12px rgba(107, 78, 0, 0.12); }
.news-list.notes .news-tag { order: -2; align-self: flex-start; }
.news-list.notes .news-title { order: -1; font-size: 17px; }
.news-list.notes .news-date { font-size: 14px; }
.news-list.notes .note-meta { font-size: 14px; color: var(--muted); }
.news-list.notes .note-cta { font-weight: 700; margin-top: 2px; }
.news-list.notes li > a { display: inline; padding: 0; }
.news-list.notes li > a:hover { background: transparent; }
.news-list.notes .note-meta a { display: inline; white-space: nowrap; }
.news-list.notes .note-meta a:hover { background: transparent; }
.note-dl { white-space: nowrap; }
.news-list.notes .note-dl a { display: inline; padding: 0; }
.news-list.notes .note-dl a:hover { background: transparent; }

/* ---------- 衛教卡片 ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px;
  list-style: none; margin: 0; padding: 0;
}

/* 認識透納氏症文章一覽：5 張卡片，第一行 3 張、第二行 2 張補滿整行；各行等高 */
/* 文章一覽 3+2 補滿：只在桌面寬度以上生效，手機一律單欄（不靠 max-width 覆寫） */
@media (min-width: 821px) {
  .card-grid.fill-last { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 1fr; }
  .card-grid.fill-last > * { grid-column: span 2; }
  .card-grid.fill-last > :nth-child(4),
  .card-grid.fill-last > :nth-child(5) { grid-column: span 3; }
}

/* 頁面插圖：AI 生成橫幅 */
/* 表格：手機上可在框內左右滑動，不把整頁撐寬 */
.data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.page-illustration { margin: 0 0 24px; }
.page-illustration img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero .page-illustration { margin: 28px 0 8px; }
.edu-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
}
.edu-card h3 { font-size: 20px; margin: 0; }
.edu-card p { color: var(--muted); margin: 0; flex: 1; }
.edu-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: #fff;
}
.edu-icon.green { background: var(--green); }
.edu-icon.blue { background: var(--sky); }
.edu-icon.yellow { background: var(--sun); color: #6b4e00; }
.edu-card .card-link { font-weight: 700; margin-top: 6px; }

/* ---------- 加入我們卡片（橫向長方形，圖示與標題同一行） ---------- */
.join-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.join-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.join-head { display: flex; align-items: center; gap: 12px; }
.join-head h3 { font-size: 20px; margin: 0; }
.join-icon {
  flex: none; width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.join-icon.green { background: var(--green-soft); }
.join-icon.yellow { background: var(--sun-soft); }
.join-icon.blue { background: var(--sky-soft); }

/* ---------- Sub-nav (about pages) ---------- */
.sub-nav { margin: 20px 0 6px; }
.sub-nav p { margin: 0; }
.sub-nav a { font-weight: 700; }
.sub-nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.join-card p { color: var(--muted); margin: 0; flex: 1; }
.join-card .card-link { font-weight: 700; margin-top: 6px; }

/* ---------- FAQ / details ---------- */
details.faq {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 12px; background: var(--green-pale);
}
details.faq summary {
  cursor: pointer; font-weight: 700; font-size: 17px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 44px; color: var(--green-dark);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "＋"; flex: none; color: var(--green-dark); font-size: 22px; line-height: 1;
}
details.faq[open ] summary::after { content: "－"; }
details.faq .faq-body { color: var(--ink); padding-top: 8px; }

/* ---------- 重要聲明（沿用舊站紅色公告樣式） ---------- */
#announcement-banner {
  background: #c0392b; color: #fff; text-align: center;
  padding: 10px 50px 10px 10px; font-size: 16px; line-height: 1.7; position: relative;
}
#banner-close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; font-weight: bold;
  min-width: 44px; min-height: 44px;
}
#announcement-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); z-index: 999; align-items: center; justify-content: center; padding: 16px;
}
#announcement-overlay.show { display: flex; }
#announcement-modal {
  background: #fff; border-top: 6px solid #c0392b;
  max-width: 500px; width: 92%; padding: 26px 28px; border-radius: 4px;
  position: relative; font-size: 15px; line-height: 1.9; color: #222;
}
#announcement-modal h3 { margin: 0 0 14px; color: #c0392b; font-size: 18px; }
#modal-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; font-size: 20px; cursor: pointer; color: #888;
  min-width: 44px; min-height: 44px;
}
#announcement-modal .modal-btn {
  display: block; margin: 18px auto 0; padding: 8px 30px;
  background: #c0392b; color: #fff; border: none; border-radius: 3px;
  cursor: pointer; font-size: 16px; font-weight: 700; min-height: 44px;
}

/* ---------- 贊助資源 ---------- */
.sponsor-box {
  border: 2px dashed var(--green); border-radius: var(--radius);
  background: var(--green-pale); padding: 22px; margin: 24px 0;
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
}
.sponsor-box .sponsor-text { flex: 1; min-width: 240px; }
.sponsor-box h3 { font-size: 19px; margin: 0 0 6px; }
.sponsor-box p { margin: 0 0 10px; color: var(--muted); }
.sponsor-qr { text-align: center; flex: none; }
.sponsor-qr img { width: 140px; height: 140px; display: block; background: #fff; padding: 6px; border-radius: 10px; border: 1px solid var(--line); }
.sponsor-qr figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; max-width: 160px; }
.sponsor-note { font-size: 14px; color: var(--muted); }

/* ---------- 內文頁 ---------- */
.page-head { background: linear-gradient(120deg, #dceccf 0%, #dde6fa 55%, #fbeec8 100%); padding: 34px max(20px, calc((100vw - var(--max)) / 2 + 20px)) 28px; border-bottom: 1px solid var(--line); margin-left: calc((100% - 100vw) / 2); margin-right: calc((100% - 100vw) / 2); }
.page-head h1 { font-size: clamp(26px, 4vw, 34px); margin: 0; }
.page-head p { color: var(--muted); margin: 8px 0 0; max-width: 70ch; }

/* 分頁標題橫幅：各頁自己的長條圖（與首頁主視覺同款 4:1）做標題區背景 */
.page-head.head-banner {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-size: cover;
  background-position: center;
}
.page-head.head-about { background-image: linear-gradient(100deg, rgba(243, 248, 236, 0.85) 0%, rgba(243, 248, 236, 0.70) 45%, rgba(243, 248, 236, 0.35) 100%), url("../../images/ai/about-strip.webp"); }
.page-head.head-news { background-image: linear-gradient(100deg, rgba(243, 248, 236, 0.85) 0%, rgba(243, 248, 236, 0.70) 45%, rgba(243, 248, 236, 0.35) 100%), url("../../images/ai/news-strip.webp"); }
.page-head.head-join { background-image: linear-gradient(100deg, rgba(243, 248, 236, 0.85) 0%, rgba(243, 248, 236, 0.70) 45%, rgba(243, 248, 236, 0.35) 100%), url("../../images/ai/join-strip.webp"); }
section.hero.hero-page.hero-health {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-image: linear-gradient(100deg, rgba(243, 248, 236, 0.85) 0%, rgba(243, 248, 236, 0.70) 45%, rgba(243, 248, 236, 0.35) 100%), url("../../images/ai/health-strip.webp");
  background-size: cover;
  background-position: center;
}
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--muted); }
.article { max-width: 76ch; }
.article h2 {
  font-size: 22px; margin-top: 1.6em;
  padding-left: 12px; border-left: 8px solid transparent;
  border-image: linear-gradient(var(--green), var(--sky)) 1;
}
.article h3 { font-size: 19px; margin-top: 1.4em; color: var(--green-dark); }
.article ul, .article ol { padding-left: 1.4em; }
.article li { margin-bottom: 0.4em; }
.article figure { margin: 18px 0; text-align: center; }
.article figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.article img.content-img { border: 1px solid var(--line); border-radius: 10px; }
/* 手冊內容：跳出 76ch 窄欄，寬度與頁面內容同寬（電腦版放大顯示） */
.handbook-pages { width: min(calc(var(--max) - 40px), calc(100vw - 40px)); }
.handbook-pages img { display: block; margin: 0 auto; }
.notice-bar {
  background: var(--sun-soft); border: 1px solid #ffe08a; border-radius: 10px;
  padding: 12px 16px; font-size: 15px; margin: 18px 0;
}

/* 會刊 / 回顧 */
.retrospect {
  border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px;
  font-size: 15px; color: var(--muted);
}
.retrospect h2 { font-size: 18px; color: var(--ink); border: none; padding: 0; margin: 0 0 8px; }
.retrospect details { margin-top: 8px; }
.retrospect summary { cursor: pointer; font-weight: 700; color: var(--green-dark); min-height: 44px; display: inline-flex; align-items: center; }
.issue-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.issue-list li { font-size: 15px; }

.issue-btn {
  font: inherit; background: none; border: none; padding: 0;
  color: var(--green-dark); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}
.issue-btn:hover { color: var(--green); }
.issue-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.issue-btn.is-open {
  font-weight: 700; text-decoration: none;
  background: var(--green-soft); border-radius: 999px; padding: 2px 10px;
}

/* ---------- 會刊閱讀器 ---------- */
.issue-reader {
  margin-top: 18px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 22px 18px;
}
.issue-reader-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.issue-reader-head h2 { margin: 0; font-size: 22px; color: var(--green-dark); }
.issue-close {
  flex: none; border: 1px solid var(--line); background: var(--green-pale);
  border-radius: 999px; padding: 6px 14px; min-height: 36px;
  font-size: 15px; color: var(--ink); cursor: pointer;
}
.issue-close:hover { border-color: var(--green); }
.issue-toc { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.issue-toc h3 { font-size: 17px; margin-bottom: 6px; color: var(--ink); }
.issue-toc ol { margin: 0; padding-left: 22px; }
.issue-toc-link {
  background: none; border: none; padding: 2px 0; font: inherit;
  color: var(--green-dark); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; text-align: left;
  line-height: 1.8;
}
.issue-toc-link:hover { color: var(--green); }
.issue-toc-title { font-weight: 700; color: var(--ink); }
.issue-toc-author { color: var(--muted); font-size: 14px; }
.issue-pages { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.issue-pages button {
  border: 1px solid var(--green); background: var(--card); color: var(--green-dark);
  border-radius: 999px; padding: 6px 14px; min-height: 36px;
  font-size: 15px; cursor: pointer;
}
.issue-pages button[aria-current="page"] {
  background: var(--green-btn); border-color: var(--green-btn); color: #fff;
}
.issue-article { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.issue-article:first-child { margin-top: 12px; }
.issue-article h3 { font-size: 20px; color: var(--green-dark); text-align: center; }
.issue-author { text-align: right; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.issue-img { text-align: center; margin: 12px 0; }
.issue-img::after { content: ""; display: table; clear: both; }
.issue-nav {
  margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px;
  display: flex; justify-content: space-between; gap: 10px;
}
.issue-nav button {
  border: 1px solid var(--green); background: var(--card); color: var(--green-dark);
  border-radius: 999px; padding: 6px 14px; min-height: 36px;
  font-size: 15px; cursor: pointer;
}
.issue-nav button:hover:not(:disabled) { background: var(--green-soft); }
.issue-nav button:disabled { opacity: 0.45; cursor: default; }

/* 下載清單 */
.dl-group { margin-bottom: 24px; }
.dl-group h3 { font-size: 18px; color: var(--green-dark); margin-bottom: 8px; }
.dl-list { list-style: none; margin: 0; padding: 0; }
.dl-list li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.dl-list .fmt { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--sky-soft); color: #17759f; text-decoration: none; }
.dl-list a.fmt:hover { background: #d3e2f7; color: #17759f; }

/* 聯絡資訊 */
.contact-card {
  background: var(--green-pale); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin: 20px 0;
}
.contact-card address { font-style: normal; line-height: 2; }
.contact-card a { font-weight: 600; }

/* ---------- 頁尾 ---------- */
.site-footer { background: #173229; color: #cfe8da; margin-top: 56px; padding: 36px 0 28px; }
.site-footer a { color: #b5e3c0; }
.site-footer h2 { color: #fff; font-size: 18px; }
.footer-inner { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-inner > div { flex: 1; min-width: 240px; }
.footer-inner address { font-style: normal; line-height: 2; }
.sponsor-line { font-size: 14px; color: #9fc7b1; border-top: 1px solid rgba(255,255,255,0.16); margin-top: 24px; padding-top: 16px; }
.footer-note { font-size: 13px; color: #8fb59f; margin-top: 10px; }

/* ---------- 響應式 ---------- */
@media (max-width: 1024px) {
  .site-nav a { padding: 10px 9px; font-size: 15px; }
  .brand-name { font-size: 19px; }
}
@media (max-width: 820px) {
  .handbook-pages { display: none; }
  body { font-size: 17px; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 6px;
    margin-left: auto; padding: 10px 12px; min-height: 44px;
    background: var(--green); color: #fff; border: none; border-radius: 10px;
    font-size: 16px; font-weight: 700; cursor: pointer;
  }
  .site-nav { display: none; width: 100%; order: 3; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 12px 10px; }
  .header-join { display: none; }
  .header-inner { gap: 10px; }
  .brand-sub, .brand br { display: none; }
  .brand-name { font-size: 17px; }
  .brand-logo { width: 48px; height: 48px; }
  .brand-logo img { width: 40px; height: 40px; }
  .card-grid.fill-last { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .card-grid.fill-last > * { grid-column: auto; }
  .hero { padding: 40px 0 44px; }
  .hero-home { background-size: cover; background-position: right center; }
  .page-head.head-banner, section.hero.hero-page.hero-health { min-height: 200px; }
  .sponsor-box { flex-direction: column; align-items: flex-start; }
  .issue-reader { padding: 16px; }
  .issue-reader-head h2 { font-size: 20px; }
}

/* ---------- 深色模式 ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #122019; --card: #1a2b23; --ink: #e8f2ec; --muted: #a9bdb2;
    --line: #2c4237; --green-soft: #223a22; --green-pale: #182818;
    --sky-soft: #1c2f55; --sun-soft: #3a2f10; --rose-soft: #33202e;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  }
  a { color: #93d3a4; }
  .site-header { background: #16281f; }
  .brand { color: var(--ink); }
  .site-nav a { color: var(--ink); }
  .site-nav a:hover { background: var(--green-soft); color: #b5e3c0; }
  .hero { background: linear-gradient(120deg, #24492a 0%, #1e3258 55%, #54471a 100%); }
  .hero-home { background-image: linear-gradient(100deg, rgba(18, 32, 25, 0.88) 0%, rgba(18, 32, 25, 0.78) 45%, rgba(18, 32, 25, 0.50) 100%), url("../../images/ai/home-hero-strip-r2.webp"); }
  .hero p.lead { color: #cfe8da; }
  .page-head { background: linear-gradient(120deg, #24492a 0%, #1e3258 55%, #54471a 100%); }
  .page-head.head-about { background-image: linear-gradient(100deg, rgba(18, 32, 25, 0.88) 0%, rgba(18, 32, 25, 0.78) 45%, rgba(18, 32, 25, 0.50) 100%), url("../../images/ai/about-strip.webp"); }
  .page-head.head-news { background-image: linear-gradient(100deg, rgba(18, 32, 25, 0.88) 0%, rgba(18, 32, 25, 0.78) 45%, rgba(18, 32, 25, 0.50) 100%), url("../../images/ai/news-strip.webp"); }
  .page-head.head-join { background-image: linear-gradient(100deg, rgba(18, 32, 25, 0.88) 0%, rgba(18, 32, 25, 0.78) 45%, rgba(18, 32, 25, 0.50) 100%), url("../../images/ai/join-strip.webp"); }
  section.hero.hero-page.hero-health { background-image: linear-gradient(100deg, rgba(18, 32, 25, 0.88) 0%, rgba(18, 32, 25, 0.78) 45%, rgba(18, 32, 25, 0.50) 100%), url("../../images/ai/health-strip.webp"); }
  .news-list a:hover { background: #1a2b23; }
  .btn-outline { background: transparent; }
  .site-footer { background: #0d1a14; }
}

/* ---------- 減少動效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* 會刊閱讀器：深色模式 */
@media (prefers-color-scheme: dark) {
  .issue-btn, .issue-toc-link { color: #93d3a4; }
  .issue-btn:hover, .issue-toc-link:hover { color: #b5e3c0; }
  .issue-reader-head h2, .issue-article h3 { color: #93d3a4; }
  .issue-pages button, .issue-nav button, .issue-close {
    background: var(--card); color: var(--ink); border-color: var(--line);
  }
  .issue-pages button[aria-current="page"] {
    background: var(--green-btn); border-color: var(--green-btn); color: #fff;
  }
}

/* 帳戶頁籤（加入我們：元大銀行／郵政劃撥） */
.account-tabs .tab-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab-btn { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--green-dark); font-weight: 700; font-size: 15px; padding: 9px 18px; border-radius: 999px; cursor: pointer; min-height: 44px; }
.tab-btn[aria-selected="true"] { background: var(--green-btn); border-color: var(--green-btn); color: #fff; }
.tab-badge { font-size: 12px; background: var(--sun); color: #4a3600; border-radius: 999px; padding: 1px 8px; margin-left: 4px; font-weight: 700; }
.tab-btn[aria-selected="true"] .tab-badge { background: #fff; color: var(--green-dark); }
.tab-panel[hidden] { display: none; }
.tab-panel h3 { margin-top: 0; }
.acct-num { font-weight: 700; letter-spacing: 0.5px; }
.copy-btn { appearance: none; border: 1px solid var(--sky); background: var(--sky-soft); color: #17759f; font-weight: 700; font-size: 14px; padding: 5px 12px; border-radius: 999px; cursor: pointer; margin-left: 8px; min-height: 36px; }
.copy-btn:hover { background: #d3e2f7; }
