/* 有志一同 v3（2026-10-22 三色系）：沿用 PathFinder（appwork-pitch 的 Apple HIG 版）元件。
   三色只平塗不漸層；內文無襯線，品牌與大標題用明體（雙字族）。
   ── 三色分工（改任何元件前先對這三行，不在規則裡的地方不上色）──
   主色 藍紫 --primary ＝ 主要按鈕、選中狀態（分頁、chip、側欄、底部分頁）、焦點框、品牌頭部、「已有回答」的題目。
   輔色 青   --accent  ＝ AI 整理／來源出處／資訊標記（看板標籤、AI 回答左條、來源框）。
   第三 暖黃 --accent2 ＝ 讚、熱門、釘選、名人引述（一日學長姊）、重點提示（提示框、搜尋高亮、toast）、「等人回答」的題目。
   例外：分類格三色輪替的淡彩底只是裝飾、不帶語意；黃底上的字一律用 --accent2-ink（深字），不准用白字。 */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --line: #e5e5ea;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #6e6e73;                 /* 原 #8e8e93 對白底只有 3.3:1，底部分頁 11px 字不夠，改成 ≥4.5:1 */
  --primary: #6c5ce7;
  --primary-ink: #ffffff;
  --primary-text: #5a4bd1;           /* 主色當文字用（淺底上對比夠） */
  --primary-soft: rgba(108, 92, 231, 0.08);
  --primary-line: rgba(108, 92, 231, 0.28);
  --accent: #00d2d3;                 /* 輔色只當色塊與細條，不當小字 */
  --accent-soft: rgba(0, 210, 211, 0.1);
  --accent-text: #00797a;
  --accent2: #ffc145;                /* 暖黃：只當色塊、細條、實底徽章；當小字用 --accent2-text */
  --accent2-soft: rgba(255, 193, 69, 0.18);
  --accent2-text: #8a5a00;           /* 白底 5.93:1、頁底 5.44:1、黃淡底 5.43:1 */
  --accent2-ink: #2b1d00;            /* 暖黃實底上的字 10.14:1 */
  --text-on-tint: #55555a;           /* 淡彩底（頭部、分類格）上的次要字；原 --text-2 在紫 tint 上只有 4.21:1 */
  --danger: #d70015;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
  --gutter: 16px;
  --tabbar-h: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --line: #38383a;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --primary: #a29bfe;
    --primary-ink: #14102e;
    --primary-text: #b8b2ff;
    --primary-soft: rgba(162, 155, 254, 0.14);
    --primary-line: rgba(162, 155, 254, 0.4);
    --accent: #00d2d3;
    --accent-soft: rgba(0, 210, 211, 0.14);
    --accent-text: #7efcfc;
    --accent2: #ffd166;
    --accent2-soft: rgba(255, 209, 102, 0.14);
    --accent2-text: #ffd166;
    --accent2-ink: #2b1d00;
    --text-on-tint: #b8b8bd;
    --danger: #ff6961;
    --shadow: none;
    --tile-mix: 16%;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  overflow-x: hidden;
  overflow-wrap: anywhere;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
img { max-width: 100%; }

/* ---- 報頭 ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(12px);
}
.topbar-in {
  max-width: 1080px; margin: 0 auto; padding: 8px var(--gutter);
  display: flex; align-items: center; gap: 12px; min-height: 52px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.brand-icon { border-radius: 8px; display: block; }
.brand-name { font-family: var(--serif); font-weight: 900; font-size: 20px; letter-spacing: 0.06em; white-space: nowrap; }
.topnav { display: none; gap: 4px; margin-left: 12px; }
.topnav a { text-decoration: none; font-size: 15px; padding: 6px 12px; border-radius: 999px; color: var(--text-2); }
.topnav a[aria-current="page"] { color: var(--primary-text); background: var(--primary-soft); font-weight: 600; }
.account { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; margin-left: auto; }
.account .who { max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 底部分頁（手機） ---- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-decoration: none; color: var(--text-3); font-size: 11px; font-weight: 500;
}
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--primary-text); }

/* ---- 版面 ---- */
.layout { max-width: 1080px; margin: 0 auto; }
.sidebar { display: none; }
.view { padding: 0 var(--gutter) 32px; min-width: 0; }
.view:focus { outline: none; }

/* ---- 共用：卡片、按鈕、chip ---- */
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: var(--radius-sm); padding: 10px 18px; cursor: pointer; text-decoration: none;
  font-size: 15px; font-weight: 600; line-height: 1.3; background: var(--surface-2); color: var(--text);
}
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.outline { background: transparent; color: var(--primary-text); box-shadow: inset 0 0 0 1.5px var(--primary); }
.btn.small { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; color: var(--text-2); font-size: 13px; text-decoration: underline; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; text-decoration: none; background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; border: 0;
}
.chip .n { font-size: 12px; color: var(--text-2); }
.chip[aria-current="true"], .chip[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--primary); background: var(--primary-soft); color: var(--primary-text); }

/* ---- 頁首區 ---- */
.page-head { padding: 20px 0 8px; }
.page-head h1 { font-family: var(--serif); font-size: 26px; line-height: 1.3; margin: 0 0 4px; font-weight: 900; }
.page-head p { margin: 0; color: var(--text-2); font-size: 14px; }
.crumb { font-size: 13px; color: var(--text-2); margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumb a { text-decoration: none; color: var(--primary-text); }
.crumb .sep { color: var(--text-3); }
.section-title {
  font-size: 17px; font-weight: 700; margin: 24px 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.section-title small { font-size: 12px; color: var(--text-2); font-weight: 400; }
.section-title a { font-size: 13px; font-weight: 600; color: var(--primary-text); text-decoration: none; white-space: nowrap; }

/* ---- 搜尋列（PathFinder search-input-wrap） ---- */
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 12px; padding: 4px 4px 4px 14px; box-shadow: inset 0 0 0 1.5px var(--line); }
.searchbar:focus-within { box-shadow: inset 0 0 0 1.5px var(--primary); }
.searchbar svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; }
.searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; font-size: 16px; outline: none; }
.searchbar .btn { padding: 8px 14px; }

/* 首頁頭部：主色淡彩平塗底（品牌），右上一顆暖黃圓點＋青色小點當記號，不用漸層 */
.hero {
  position: relative; overflow: hidden; margin-top: 14px; padding: 20px 16px 16px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
/* 色點只佔頭部右上角、底緣在說明文字之上（10-22 驗收：120px 圓壓到說明文字） */
.hero::before { width: 96px; height: 96px; right: -30px; top: -42px; background: var(--accent2); }
.hero::after { width: 20px; height: 20px; right: 74px; top: 14px; background: var(--accent); }
.hero h1 { position: relative; font-family: var(--serif); font-size: 26px; line-height: 1.3; margin: 0 0 6px; font-weight: 900; padding-right: 72px; }
.hero p { position: relative; margin: 0 0 14px; color: var(--text-on-tint); font-size: 14px; }
.hero .searchbar { position: relative; }

/* ---- 分類格（首頁、探索） ---- */
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cattile {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); text-decoration: none; min-width: 0;
}
.cattile .name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.cattile .sub { font-size: 12px; color: var(--text-on-tint); }
.cattile.empty { opacity: 0.6; }
/* 分類格三色輪替淡彩底（裝飾、不帶語意）；淺色 14%、深色 16%，次要字改 --text-on-tint 才夠 4.5:1 */
.cattile { --tile: var(--primary); background: color-mix(in srgb, var(--tile) var(--tile-mix, 14%), var(--surface)); box-shadow: none; }
.catgrid .cattile:nth-child(3n+2) { --tile: var(--accent); }
.catgrid .cattile:nth-child(3n) { --tile: var(--accent2); }
.caticon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-text); font-weight: 800; font-size: 18px;
}
.caticon.lg { width: 64px; height: 64px; border-radius: 16px; font-size: 26px; }
.catcard { padding: 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 10px; }
.catcard-head { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.catcard-head .name { font-weight: 700; font-size: 16px; }
.catcard-head .desc { font-size: 13px; color: var(--text-2); }
.catcard .none { font-size: 13px; color: var(--text-3); }
/* 沒看板的分類卡也帶 .empty（給樣式淡化用），不能吃到通用 .empty 的 padding:18px 0（10-22 驗收：圖示貼左邊） */
.catcard.empty { padding: 14px; color: inherit; font-size: inherit; }
/* 探索頁分類卡：同一套三色輪替，頭部一條 4px 色條＋很淡的底，看板 chip 維持白底 */
.explore-list .catcard { --tile: var(--primary); background: color-mix(in srgb, var(--tile) 7%, var(--surface)); border-top: 4px solid var(--tile); padding-top: 14px; }
.explore-list .catcard:nth-child(3n+2) { --tile: var(--accent); }
.explore-list .catcard:nth-child(3n) { --tile: var(--accent2); }
.explore-list .catcard.empty { padding-top: 14px; }
.catcard-head .desc, .catcard .none { color: var(--text-on-tint); }
.explore-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.cat-head { display: flex; gap: 14px; align-items: center; padding: 18px 0 6px; }
.cat-head h1 { font-family: var(--serif); font-size: 26px; margin: 0; line-height: 1.25; font-weight: 900; }
.cat-head p { margin: 2px 0 0; font-size: 14px; color: var(--text-2); }

/* ---- 看板橫幅 ---- */
.banner { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; border-radius: var(--radius); margin-top: 14px; background: var(--surface-2); }

/* ---- 熱門／最新分頁（PathFinder qa-tabs） ---- */
.qa-tabs { display: flex; gap: 22px; border-bottom: 2px solid var(--line); margin: 14px 0 12px; }
.qa-tabs a { padding: 8px 0; margin-bottom: -2px; text-decoration: none; font-size: 15px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; }
.qa-tabs a[aria-current="true"] { color: var(--primary-text); border-bottom-color: var(--primary); }
/* 分頁選中仍是主色（選中狀態）；「熱門」本身帶一顆暖黃點（熱門＝第三色） */
.qa-tabs a[href*="sort=hot"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent2); margin-right: 6px; flex-shrink: 0; }
.toolrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolrow .qa-tabs { margin-bottom: 0; flex: 1; }

/* ---- 問題卡（PathFinder qa-card） ---- */
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qcard { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); min-width: 0; }
.qcard-top { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.board-chip { font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); padding: 1px 8px; border-radius: 6px; text-decoration: none; }
.qcard h2 { font-size: 16px; line-height: 1.45; margin: 0 0 8px; font-weight: 700; }
.qcard h2 a { text-decoration: none; }
.qcard h2 a:hover { color: var(--primary-text); }
.answer-preview {
  margin: 0 0 8px; padding: 8px 12px; font-size: 13px; line-height: 1.55; color: var(--text-2);
  background: var(--surface-2); border-radius: 8px; border-left: 3px solid var(--line);
}
/* 題目卡左側狀態細條：已有回答＝主色，等人回答＝暖黃（重點提示）。用 ::before，不走 box-shadow（hover 會蓋掉） */
.qcard::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--primary); }
.qcard.is-open::before { background: var(--accent2); }
/* 截行放在內層：外層有上下 padding，截在外層會露出第 4 行的上半截 */
.answer-preview span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.snippet { margin: 0 0 8px; font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
mark { background: var(--accent2-soft); color: var(--text); /* 高亮在摘要灰底上時 text-2 只剩約 4:1，改深一階 */ padding: 0 1px; border-radius: 3px; box-shadow: inset 0 -2px 0 var(--accent2); }

.qa-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--text-2); }
.qa-actions .meta-item { padding: 4px 4px; }
.qa-action-btn, .likebtn {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; border: 0;
  background: none; color: var(--text-2); font-size: 13px; cursor: pointer; font-weight: 500;
}
/* 讚、釘選＝暖黃（第三色分工） */
.qa-action-btn:hover, .likebtn:hover { background: var(--accent2-soft); color: var(--accent2-text); }
.qa-action-btn[aria-pressed="true"], .likebtn[aria-pressed="true"] { background: var(--accent2-soft); color: var(--accent2-text); font-weight: 700; box-shadow: inset 0 0 0 1px var(--accent2); }
.likebtn b { font-weight: 700; }
.likebtn::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  box-shadow: inset 0 0 0 1.5px var(--accent2-text);
}
.likebtn[aria-pressed="true"]::before { background: var(--accent2); box-shadow: none; }
.likebtn.self { cursor: default; opacity: 0.6; }
.likebtn.self:hover { background: none; color: var(--text-2); }

.feed-foot { padding: 18px 0 8px; text-align: center; font-size: 13px; color: var(--text-3); min-height: 48px; }
.spinner { display: inline-block; width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* ---- 題目內頁 ---- */
.qhead { margin-top: 10px; }
.qhead h1 { font-family: var(--serif); font-size: 24px; line-height: 1.4; margin: 6px 0 10px; font-weight: 900; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12px; color: var(--text-2); }
.tag { background: var(--surface-2); padding: 1px 8px; border-radius: 6px; }
.prose { font-size: 16px; }
.prose p { margin: 0 0 0.8em; }
.prose ul { margin: 0 0 0.8em; padding-left: 1.2em; }
.prose li { margin: 0.2em 0; }
.source {
  border-radius: var(--radius-sm); background: var(--accent-soft); border-left: 3px solid var(--accent);
  padding: 10px 12px; font-size: 13px; margin: 10px 0 14px; color: var(--text); line-height: 1.7;
}
.source a { color: var(--accent-text); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 4px; }
.answer { padding: 14px 0 8px; border-bottom: 1px solid var(--line); }
.answer:last-of-type { border-bottom: 0; }
.answer.ai { padding-left: 12px; border-left: 3px solid var(--accent); }
.answer .byline { font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-bottom: 6px; }
.answer .byline strong { color: var(--text); }
.answers { padding: 4px 16px; }

/* 名人怎麼說（PathFinder 一日學長姊：與一般回答並列、永久留存） */
.celeb { margin: 10px 0; padding: 14px 16px 10px; background: color-mix(in srgb, var(--accent2) 6%, var(--surface)); border-radius: var(--radius); box-shadow: var(--shadow); border-left: 4px solid var(--accent2); }
.celeb blockquote { margin: 6px 0 8px; font-family: var(--serif); font-size: 18px; line-height: 1.6; }
.celeb blockquote::before { content: "「"; }
.celeb blockquote::after { content: "」"; }
.celeb .who { font-weight: 700; color: var(--text); }

.badge-ai, .badge-celeb, .badge-dev {
  display: inline-flex; align-items: center; font-size: 12px; line-height: 1.6; padding: 0 8px; border-radius: 6px; font-weight: 700; white-space: nowrap;
}
.badge-ai { color: var(--accent-text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent); }
.badge-celeb { color: var(--accent2-ink); background: var(--accent2); }
/* 開發／已隱藏：改中性灰，讓暖黃只有一個意思（原 --warn-bg 是淡黃，會被讀成讚／名人同一家） */
.badge-dev { color: var(--text-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }

.empty { color: var(--text-2); padding: 18px 0; font-size: 14px; }
.empty::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent2); margin-right: 8px; vertical-align: 0.1em; }
.catcard.empty::before { content: none; }
.catcard.empty a { color: inherit; } /* 沒看板的分類卡不吃 .empty a 的主色連結（10-22 驗收：分類名變紫、和有看板的不一致） */
/* 提示框＝重點提示：暖黃淡底＋暖黃左條，連結維持主色 */
.notice { background: var(--accent2-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin: 14px 0; border-left: 4px solid var(--accent2); }
.notice a { color: var(--primary-text); }

/* ---- 表單 ---- */
.form { display: grid; gap: 12px; margin: 14px 0; }
.form label { font-size: 13px; color: var(--text-2); display: grid; gap: 4px; }
.form input, .form textarea, .form select {
  width: 100%; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 16px;
}
.form input:focus, .form textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--primary); }
.form textarea { min-height: 120px; resize: vertical; }
.form .hint { font-size: 12px; color: var(--text-2); }
.devlogin { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
/* 手機報頭太窄：開發用假登入只放在「我的」頁 */
@media (max-width: 639px) { .account .devlogin { display: none; } }
.devlogin input { width: 6.5em; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); padding: 4px 8px; font-size: 13px; border-radius: 8px; }

/* ---- 釘選（PathFinder pin-item） ---- */
.pinlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pin-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }
.pin-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent2); flex-shrink: 0; }
.pin-text { flex: 1; min-width: 0; font-size: 15px; line-height: 1.45; text-decoration: none; }
.pin-time { font-size: 11px; color: var(--text-3); flex-shrink: 0; }

/* ---- 我的 ---- */
.me-card { display: grid; gap: 12px; }
.me-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.navlist { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.navlist a { display: flex; justify-content: space-between; padding: 14px 16px; text-decoration: none; border-bottom: 1px solid var(--line); }
.navlist li:last-child a { border-bottom: 0; }
.navlist a::after { content: "›"; color: var(--text-3); }

/* ---- 管理員 ---- */
.report { border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 14px; display: grid; gap: 4px; }
.report.done { opacity: 0.6; }

/* ---- 側欄（桌機分類導覽） ---- */
.sidenav { position: sticky; top: 72px; padding: 20px 0; display: grid; gap: 2px; }
.sidenav .label { font-size: 12px; color: var(--text-3); font-weight: 600; padding: 0 10px 6px; letter-spacing: 0.08em; }
.sidenav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; text-decoration: none; font-size: 15px; }
.sidenav a:hover { background: var(--surface); }
.sidenav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-text); font-weight: 700; }
.sidenav a.board { padding-left: 52px; font-size: 14px; color: var(--text-2); }
.sidenav a.board[aria-current="page"] { color: var(--primary-text); }
.sidenav .caticon { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
.sidenav .n { margin-left: auto; font-size: 12px; color: var(--text-3); }
.sidenav .more { color: var(--primary-text); font-size: 14px; font-weight: 600; margin-top: 6px; }

.colophon { max-width: 1080px; margin: 0 auto; padding: 14px var(--gutter) 24px; font-size: 12px; color: var(--text-2); }
.colophon a { color: var(--text-2); }

.toast {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom));
  max-width: 420px; margin: 0 auto; background: var(--accent2); color: var(--accent2-ink); font-weight: 600; padding: 10px 14px; font-size: 14px; border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  transform: translateY(20px); opacity: 0; visibility: hidden; transition: transform 0.2s ease, opacity 0.2s ease, visibility 0s linear 0.2s; z-index: 30;
}
.toast.show { transform: none; opacity: 1; visibility: visible; transition: transform 0.2s ease, opacity 0.2s ease; }

@media (min-width: 640px) {
  .hero h1, .page-head h1, .cat-head h1 { font-size: 30px; }
  .qhead h1 { font-size: 28px; }
  .qcard { padding: 16px 18px; }
  .qcard h2 { font-size: 17px; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .toast { bottom: 18px; }
}
@media (min-width: 1100px) {
  .layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 0 var(--gutter); }
  .sidebar { display: block; }
  .view { padding: 0 0 40px; max-width: 760px; }
}

/* ---- 觸控目標 ≥ 44px（UI/UX 自檢）：視覺維持小巧的元件，用負邊距把點擊區撐大、不推高版面 ---- */
.btn, .btn.small, .chip, .likebtn, .qa-action-btn, .linkish, .topnav a, .qa-tabs a, .sidenav a,
.brand, .account .who, .colophon a, .crumb a { min-height: 44px; display: inline-flex; align-items: center; }
.btn.small { padding-top: 0; padding-bottom: 0; }
.qa-action-btn, .likebtn, .linkish { min-width: 44px; justify-content: center; }
.searchbar input { min-height: 44px; }
.searchbar .btn { min-height: 44px; }
.qa-tabs a { padding: 0; }
.crumb a { margin: -12px 0; }
.colophon a { margin: -12px 0; }
.sidenav a { padding-top: 0; padding-bottom: 0; }
/* 卡片上的看板標籤：底色在內層 span，外層連結撐到 44px 高 */
.board-chip { background: none; padding: 0; min-height: 44px; margin: -12px 0; display: inline-flex; align-items: center; }
.board-chip span { color: var(--accent-text); background: var(--accent-soft); padding: 1px 8px; border-radius: 6px; }
/* 整張卡片可點（標題連結撐滿卡片），讚／釘選／看板標籤浮在上面各自可點 */
.qcard, .pin-item { position: relative; }
.qcard h2 a::after, .pin-text::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.qcard .qa-actions, .qcard .board-chip, .pin-item .qa-action-btn { position: relative; z-index: 1; }
.qcard:has(h2 a:hover) { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--primary-line); }

/* 載入中／錯誤畫面 */
.state { padding: 40px 0; text-align: center; color: var(--text-2); font-size: 14px; display: grid; gap: 12px; justify-items: center; }
.state.error { color: var(--text); }
.state .spinner { width: 28px; height: 28px; }
.feed-foot .spinner { vertical-align: middle; margin-right: 6px; }

/* 手機：看板頁的「我想問問題」放在拇指搆得到的底部 */
.fab { display: none; }
@media (max-width: 899px) {
  .fab {
    display: inline-flex; position: fixed; right: var(--gutter); z-index: 15;
    bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom));
    min-height: 48px; padding: 0 20px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  }
  .toolrow .ask-top { display: none; }
  .view:has(.fab) { padding-bottom: 88px; } /* 捲到底時最後一張卡的讚／釘選不被浮動鈕蓋住 */
}
.empty a { color: var(--primary-text); }
/* UI/UX 自檢第二輪：寬度也要到 44px */
.qa-tabs a, .board-chip, .crumb a, .section-title a { min-width: 44px; justify-content: center; }
.section-title a { min-height: 44px; display: inline-flex; align-items: center; margin: -12px 0; }
.devlogin input { min-height: 44px; }
