/* =====================================================================
   台灣中風復友創生協會 — 前台樣式
   手機優先；顏色、字體、間距集中在 :root，換設定就能換外觀。
   主要讀者是中風復友與家屬：字大、按鈕大、對比高、動畫少。
   ===================================================================== */

:root {
  /* 品牌色：醫院診所的清新綠、藍，搭配溫暖的橘 */
  --brand: #0f766e;          /* 綠（白字對比 5.5） */
  --brand-strong: #0b5c56;
  --brand-soft: #e3f3f0;
  --accent: #1d5fa8;         /* 藍（白字對比 6.4） */
  --accent-soft: #e6eff9;
  --warm: #b8460b;           /* 橘（白字對比 5.3） */
  --warm-strong: #963808;
  --warm-soft: #fdf0e6;
  --danger: #b91c1c;

  --text: #1c2b2a;           /* 白底對比 14 */
  --text-2: #43514f;         /* 白底對比 8.3 */
  --bg: #f4f9f8;
  --surface: #ffffff;
  --line: #d3e2df;
  --focus: #b8460b;
  --link: #0b5c56;
  --on-brand: #ffffff;       /* 品牌色、橘色、紅色底上的文字 */

  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(15, 60, 55, .08);
  --gap: 1rem;
  --wrap: 1200px;
  --tap: 48px;
}

/* 深色模式：prefs.js 依使用者選擇或系統設定，在 <html> 加上 data-theme */
:root[data-theme="dark"] {
  --brand: #4fd1c0; --brand-strong: #7fe3d6; --brand-soft: #143532;
  --accent: #8cbcf2; --accent-soft: #172a40;
  --warm: #ffb27a; --warm-strong: #ffc89f; --warm-soft: #3a2415;
  --danger: #ff8a8a;
  --text: #e8f1ef; --text-2: #b4c6c3; --bg: #0e1918; --surface: #152423; --line: #2b403d;
  --focus: #ffb27a; --link: #7fe3d6; --on-brand: #10201e;
  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* 字級：標準 18px、大 20px、特大 22.4px */
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html[data-fs="2"] { font-size: 125%; }
html[data-fs="3"] { font-size: 140%; }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 1rem; line-height: 1.8; letter-spacing: .02em;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { color: var(--warm); }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; letter-spacing: .03em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: 12px; transform: translateY(-300%); z-index: 100; background: var(--warm); color: var(--on-brand); padding: .6em 1em; border-radius: var(--radius-sm); font-weight: 700; }
.skip:focus { transform: none; color: var(--on-brand); }

.ico { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

/* ---------------------------------------------------------------- 按鈕 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: var(--tap); padding: .45em 1.15em; border-radius: 999px;
  border: 2px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer;
  line-height: 1.3; text-align: center; background: var(--surface); color: var(--text);
}
.btn-lg { min-height: 56px; padding: .55em 1.4em; font-size: 1.06rem; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-warm { background: var(--warm); color: var(--on-brand); }
.btn-warm:hover { background: var(--warm-strong); color: var(--on-brand); }
.btn-ghost { background: var(--surface); color: var(--brand-strong); border-color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-strong); }
.btn-line { background: #06813d; color: #fff; }        /* 白字對比 5.0 */
.btn-line:hover { background: #046b32; color: #fff; }
.btn-fb { background: #1758c9; color: #fff; }
.btn-fb:hover { background: #10469f; color: #fff; }
.btn-emergency { background: var(--danger); color: var(--on-brand); }
.btn-emergency:hover { background: var(--danger); color: var(--on-brand); filter: brightness(.88); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }

/* ---------------------------------------------------------------- 頁首 */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); min-width: 0; }
.brand img { width: 48px; height: 48px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 800; font-size: 1.05rem; line-height: 1.3; color: var(--brand-strong); }
.brand-sub { font-size: .78rem; color: var(--text-2); line-height: 1.4; display: none; }
.head-tools { display: flex; gap: .4rem; flex: none; }
.tool {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: var(--tap); min-height: var(--tap); padding: .3em .55em; border: 2px solid var(--line);
  background: var(--surface); border-radius: var(--radius-sm); cursor: pointer; font-size: .78rem; font-weight: 700; color: var(--brand-strong);
}
.tool[aria-expanded="true"] { background: var(--brand-soft); border-color: var(--brand); }

.search-bar { display: none; gap: .5rem; padding-block: .75rem; }
.search-bar.is-open { display: flex; }
.search-bar input, .search-row input {
  flex: 1; min-width: 0; min-height: var(--tap); padding: .4em .8em; border: 2px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface);
}
.search-bar input:focus, .search-row input:focus { border-color: var(--brand); }

.site-nav { display: none; border-top: 1px solid var(--line); }
.site-nav.is-open { display: block; }
.nav-row { padding-block: .5rem 1rem; }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.nav-list a {
  display: flex; align-items: center; min-height: var(--tap); padding: .4em .9em; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); text-decoration: none; font-weight: 700;
}
.nav-list a:hover { background: var(--brand-soft); color: var(--brand-strong); }
.nav-list a[aria-current="page"] { background: var(--brand); color: var(--on-brand); }
.prefs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .75rem; }
.prefs-label { font-weight: 700; color: var(--text-2); margin-right: .2rem; }
.pref {
  min-width: var(--tap); min-height: var(--tap); padding: 0 .7em; border-radius: var(--radius-sm);
  border: 2px solid var(--line); background: var(--surface); font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .3em;
}
.pref[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }
.pref sup { font-size: .7em; }
.pref-theme .ico-sun { display: none; }
.pref-theme[aria-pressed="true"] .ico-moon { display: none; }
.pref-theme[aria-pressed="true"] .ico-sun { display: inline; }

/* 沒有 JavaScript 時選單直接展開 */
.no-js .site-nav, .no-js .search-bar { display: block; }
.no-js .search-bar { display: flex; }
.no-js .head-tools, .no-js .prefs { display: none; }

/* ---------------------------------------------------------------- 共用區塊 */
.sec { margin-block: 2.5rem; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; border-bottom: 3px solid var(--brand-soft); padding-bottom: .4rem; }
.sec-head h2 { margin: 0; position: relative; padding-left: .8rem; }
.sec-head h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 6px; border-radius: 3px; background: var(--warm); }
.more { display: inline-flex; align-items: center; gap: .3em; min-height: var(--tap); font-weight: 700; text-decoration: none; }
.more:hover { text-decoration: underline; }
.empty { color: var(--text-2); padding: 1rem 0; }
.h-plain { font-size: 1.2rem; }
.tag-auto { display: inline-block; padding: 0 .5em; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-size: .8rem; font-weight: 700; line-height: 1.8; }
.post-disclaimer { margin: 1.25rem 0; padding: .9rem 1rem; border-left: 4px solid var(--warm-strong); background: var(--warm-soft); color: var(--text); border-radius: 0 var(--radius) var(--radius) 0; }
.post-excerpt-more { font-weight: 700; }
.tag-soft { display: inline-block; margin-left: .5em; padding: 0 .6em; border-radius: 999px; background: var(--warm-soft); color: var(--warm-strong); font-size: .8rem; font-weight: 700; line-height: 1.8; }

/* ---------------------------------------------------------------- 首頁：主視覺 */
.hero { background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); padding-block: 1.5rem 2rem; }
.hero-grid { display: grid; gap: 1.25rem; }
.hero-img { margin: 0; order: -1; }
.hero-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-kicker { color: var(--brand-strong); font-weight: 800; margin: 0 0 .3rem; }
.hero h2 { font-size: 1.75rem; color: var(--text); }
.hero-lead { font-size: 1.1rem; color: var(--text-2); }

/* ---------------------------------------------------------------- 首頁：FAST */
.fast { background: var(--surface); border-block: 1px solid var(--line); padding-block: 2rem; }
.fast h2 { color: var(--danger); }
.fast-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }
.fast-list li { display: flex; gap: .9rem; align-items: flex-start; background: var(--bg); border-radius: var(--radius); padding: .9rem 1rem; }
.fast-key { flex: none; width: 3rem; height: 3rem; border-radius: 50%; background: var(--danger); color: var(--on-brand); font-weight: 900; font-size: 1.5rem; display: grid; place-items: center; }
.fast-label { font-weight: 800; margin: 0; }
.fast-list p:last-child { margin: 0; }
.fast-foot { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.fast-foot p { margin: 0; color: var(--text-2); flex: 1 1 18rem; }

/* ---------------------------------------------------------------- 首頁：服務 */
.svc-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.svc {
  display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; align-items: start; height: 100%;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem;
  text-decoration: none; color: var(--text); box-shadow: var(--shadow);
}
.svc:hover { border-color: var(--brand); color: var(--text); }
.svc-ico { grid-row: span 2; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; }
.svc-ico .ico { width: 1.7rem; height: 1.7rem; }
.svc-title { font-weight: 800; font-size: 1.1rem; color: var(--brand-strong); }
.svc-text { color: var(--text-2); font-size: .95rem; }

/* ---------------------------------------------------------------- 文章卡 */
.grid { display: grid; gap: 1rem; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; border: 1px solid var(--line); }
.card-img { position: relative; background: var(--brand-soft); }
.card-img img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
.card-body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.08rem; margin: 0 0 .4rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; } /* 整張卡都可以點 */
.card:hover .card-title a { color: var(--brand-strong); text-decoration: underline; }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.card-title a:focus-visible { outline: none; }
.sum { color: var(--text-2); font-size: .94rem; margin: 0 0 .5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { color: var(--text-2); font-size: .88rem; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.kicker { color: var(--warm-strong); font-weight: 800; font-size: .92rem; margin: 0 0 .3rem; }
.kicker a { color: inherit; text-decoration: none; }
.badge-video { position: absolute; left: .6rem; bottom: .6rem; display: inline-flex; align-items: center; gap: .25em; background: rgba(0, 0, 0, .72); color: #fff; font-size: .8rem; font-weight: 700; padding: .1em .6em; border-radius: 999px; }

.card-lead .card-title { font-size: 1.3rem; -webkit-line-clamp: 3; }
.card-lead .sum { -webkit-line-clamp: 3; }

.card-row { flex-direction: row; align-items: stretch; }
.card-row .card-img { flex: 0 0 38%; max-width: 220px; }
.card-row .card-img img { height: 100%; min-height: 100%; }
.card-row .card-body { padding: .7rem .9rem; }
.card-row .card-title { font-size: 1.02rem; }
.card-row .sum { display: none; }
.row-list { display: grid; gap: .9rem; }

.lead-grid { display: grid; gap: 1rem; }
.lead-side { display: grid; gap: .9rem; align-content: start; }
.list-lead { margin-bottom: 1rem; }

/* 純標題列表 */
.t-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.t-item + .t-item { border-top: 1px solid var(--line); }
.t-item a { display: flex; flex-direction: column; gap: .1rem; padding: .8rem 1rem; text-decoration: none; color: var(--text); min-height: var(--tap); }
.t-item a:hover .t-title { color: var(--brand-strong); text-decoration: underline; }
.t-title { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-item time { color: var(--text-2); font-size: .86rem; }

/* ---------------------------------------------------------------- 首頁：發起人、加入 */
.founder { background: var(--warm-soft); padding-block: 2.5rem; }
.founder-grid { display: grid; gap: 1.5rem; align-items: center; }
.founder-img { margin: 0; }
.founder-img img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.founder blockquote { margin: 0 0 1rem; padding: .2rem 0 .2rem 1rem; border-left: 5px solid var(--warm); font-size: 1.15rem; font-weight: 700; color: var(--warm-strong); }
.founder blockquote p { margin: 0; }
.founder-name { font-weight: 700; color: var(--text-2); }
.join { padding-block: 2rem; }
.join-box { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1rem; }
.join-box h2 { color: #fff; }
.join-box p { margin: 0; }
.join-box .btn-warm { background: #fff; color: var(--warm-strong); }
.join-box .btn-warm:hover { background: var(--warm-soft); }
:root[data-theme="dark"] .join-box { background: var(--brand-soft); color: var(--text); }
:root[data-theme="dark"] .join-box h2 { color: var(--text); }

/* ---------------------------------------------------------------- 聯絡 */
.contact-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: flex-start; }
.contact-ico { width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: .4rem; }
.contact-ico .ico { width: 1.5rem; height: 1.5rem; }
.contact-label { font-weight: 800; margin: 0; }
.contact-value { font-size: 1.1rem; margin: 0 0 .7rem; word-break: break-all; }
.contact-card .btn { margin-top: auto; }
.contact-note { margin-top: 1rem; color: var(--text-2); }
.contact-join { margin-top: 1.5rem; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.link-list a { display: inline-flex; align-items: center; gap: .5em; min-height: var(--tap); font-weight: 700; }

/* ---------------------------------------------------------------- 內頁 */
.page { padding-block: 1rem 3rem; }
.crumbs ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; font-size: .9rem; color: var(--text-2); }
.crumbs li + li::before { content: "›"; margin: 0 .5em; }
.crumbs a { display: inline-block; padding-block: .3em; }
.crumbs li:last-child { flex: 1 1 8em; min-width: 0; display: flex; align-items: baseline; }
.crumbs [aria-current] { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-block: .3em; }
.page-head { margin-bottom: 1.5rem; }
.page-head h1 { color: var(--brand-strong); }
.page-desc { font-size: 1.08rem; color: var(--text-2); }
.page-count { color: var(--text-2); font-size: .92rem; }
.nf h1 { color: var(--text); }

/* 介紹頁目錄 */
.dir-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.dir {
  display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: center;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem;
  text-decoration: none; color: var(--text);
}
.dir:hover { border-color: var(--brand); color: var(--text); }
.dir .ico { grid-row: 1 / span 2; grid-column: 2; color: var(--brand); }
.dir-title { font-weight: 800; font-size: 1.1rem; color: var(--brand-strong); }
.dir-sum { color: var(--text-2); font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.planned { margin-top: 2rem; background: var(--warm-soft); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.planned h2 { font-size: 1.15rem; }
.planned ul { margin: 0; padding-left: 1.2em; }
.planned li { margin-bottom: .3rem; }

/* 分頁 */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin-top: 2rem; }
.pager ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: var(--tap); min-height: var(--tap); padding: 0 .8em; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 700; }
.pager a:hover { border-color: var(--brand); }
.pager [aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pager .is-off { opacity: .45; }
.pager .gap { display: grid; place-items: center; min-width: 1.5rem; }

/* ---------------------------------------------------------------- 文章 */
.post { max-width: 40em; margin-inline: auto; }
.post-head h1 { font-size: 1.6rem; color: var(--text); }
.post-head .meta { margin-bottom: 1.2rem; font-size: .92rem; gap: .2rem 1.2rem; }
.post-cover { margin: 0 0 1.5rem; }
.post-cover img { border-radius: var(--radius); width: 100%; max-height: 70vh; object-fit: contain; background: var(--brand-soft); }
.post-lead { font-size: 1.12rem; font-weight: 700; color: var(--text-2); border-left: 5px solid var(--brand); padding-left: 1rem; }
.post-body { font-size: 1.05rem; line-height: 1.95; }
.post-body h2 { font-size: 1.3rem; margin-top: 2rem; color: var(--brand-strong); }
.post-body h3 { font-size: 1.15rem; margin-top: 1.5rem; }
.post-body blockquote { margin: 1.2rem 0; padding: .6rem 1rem; background: var(--brand-soft); border-left: 5px solid var(--brand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body img { border-radius: var(--radius-sm); margin: 1rem auto; }
.post-body .pic { display: block; margin: 1.2rem 0; }
.post-body .pic img { margin: 0 auto; }
.post-body table { display: block; overflow-x: auto; border-collapse: collapse; max-width: 100%; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: .4em .7em; }
.post-body a { font-weight: 600; }
.post-videos { display: grid; gap: 1rem; margin: 1.5rem 0; }
.video { margin: 0; }
.video-btn { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-btn img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .85; }
.video-play { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); color: #fff; font-weight: 700; }
.video-play .ico { width: 2.6rem; height: 2.6rem; background: var(--danger); border-radius: 50%; padding: .5rem; color: var(--on-brand); }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); display: block; }
.gallery { margin: 2rem 0; }
.gallery h2 { font-size: 1.2rem; }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.gallery-grid img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: var(--radius-sm); }
.post-place { display: flex; gap: .4rem; align-items: center; }
.post-source { margin: 2rem 0 1rem; padding: 1rem 1.1rem; background: var(--accent-soft); border-radius: var(--radius); font-size: .95rem; color: var(--text); }
.post-source p { margin: 0 0 .4rem; }
.post-source p:last-child { margin: 0; }
.post-source a { display: inline-flex; align-items: center; gap: .4em; min-height: 40px; }
.tags { list-style: none; margin: 1rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags a, .chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .9em; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); text-decoration: none; font-weight: 700; }
.chips { list-style: none; margin: 1rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 2rem 0 1rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.share-label { font-weight: 800; }
.prev-next { max-width: 40em; margin: 1.5rem auto 0; display: grid; gap: .75rem; }
.pn { display: flex; flex-direction: column; padding: .9rem 1.1rem; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); }
.pn:hover { border-color: var(--brand); color: var(--text); }
.pn-label { font-size: .86rem; font-weight: 800; color: var(--warm-strong); }
.pn-title { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn-next { text-align: right; }
.related { margin-top: 3rem; }

/* 搜尋 */
.search-big { margin-bottom: 1.5rem; }
.search-big label { display: block; font-weight: 700; margin-bottom: .4rem; }
.search-row { display: flex; gap: .5rem; }

/* 放大照片 */
.zoom { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .9); display: grid; place-items: center; padding: 1rem; border: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; }
.zoom::backdrop { background: rgba(0, 0, 0, .9); }
.zoom img { max-height: 85vh; width: auto; margin: auto; border-radius: var(--radius-sm); }
.zoom-close { position: absolute; top: 1rem; right: 1rem; }

/* ---------------------------------------------------------------- 頁尾 */
.site-foot { background: #123a37; color: #e9f5f3; margin-top: 2rem; padding-top: 2rem; }
.site-foot a { color: #fff; }
.site-foot a:hover { color: #ffd2ad; }
.foot-grid { display: grid; gap: 1.5rem; }
.foot-name { font-size: 1.2rem; font-weight: 800; margin: 0 0 .3rem; }
.foot-title { font-weight: 800; margin: 0 0 .4rem; color: #bfe7e1; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.foot-contact li { display: flex; gap: .5rem; align-items: center; min-height: 44px; }
.foot-nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-copy { border-top: 1px solid rgba(255, 255, 255, .2); margin-top: 1.5rem; padding-block: 1rem 1.5rem; font-size: .9rem; color: #c9e3df; }
.foot-copy p { margin: 0; }

.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 52px; height: 52px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); display: grid; place-items: center; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.to-top.is-on { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--brand-strong); color: var(--on-brand); }

/* ---------------------------------------------------------------- 平板以上 */
@media (min-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .svc-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .fast-list { grid-template-columns: repeat(2, 1fr); }
  .nav-list { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .prev-next { grid-template-columns: 1fr 1fr; }
  .pn-next { grid-column: 2; }
  .brand-sub { display: block; }
}

@media (min-width: 768px) {
  h1, .post-head h1 { font-size: 1.85rem; }
  .hero { padding-block: 2.5rem 3rem; }
  .hero-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 2rem; }
  .hero-img { order: 0; }
  .hero h2 { font-size: 2.1rem; }
  .founder-grid { grid-template-columns: 5fr 7fr; gap: 2.5rem; }
  .join-box { grid-template-columns: 1fr auto; align-items: center; padding: 2rem; }
  .lead-grid { grid-template-columns: 3fr 2fr; }
  .card-lead .card-title { font-size: 1.45rem; }
  .list-lead .card-lead { flex-direction: row; }
  .list-lead .card-lead .card-img { flex: 0 0 58%; }
  .list-lead .card-lead .card-img img { height: 100%; }
  .list-lead .card-lead .card-body { padding: 1.4rem; justify-content: center; }
  .foot-grid { grid-template-columns: 2fr 1.3fr 1.3fr; }
}

/* 電腦：選單橫排 */
@media (min-width: 1024px) {
  .head-row { min-height: 84px; }
  .brand img { width: 56px; height: 56px; }
  .brand-name { font-size: 1.2rem; }
  .js-menu-toggle { display: none; }
  .site-nav { display: block; }
  .nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .3rem; }
  .nav-list { display: flex; flex-wrap: wrap; gap: .2rem; }
  .nav-list a { background: none; padding: .3em .75em; }
  .prefs { margin: 0; flex: none; }
  .prefs-label { font-size: .9rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .svc-grid, .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .fast-list { grid-template-columns: repeat(4, 1fr); }
  .fast-list li { flex-direction: column; }
  .row-list { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
/* 字級放大時，電腦版選單太擠就維持收合 */
@media (min-width: 1024px) and (max-width: 1279px) {
  html[data-fs="3"] .js-menu-toggle { display: inline-flex; }
  html[data-fs="3"] .site-nav { display: none; }
  html[data-fs="3"] .site-nav.is-open { display: block; }
  html[data-fs="3"] .nav-row { display: block; }
  html[data-fs="3"] .nav-list { display: grid; grid-template-columns: repeat(4, 1fr); }
  html[data-fs="3"] .prefs { margin-top: .75rem; }
}

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

/* 列印 */
@media print {
  .site-head, .site-foot, .share, .prev-next, .related, .to-top, .crumbs { display: none !important; }
  body { background: #fff; color: #000; }
  .post { max-width: none; }
}
