/* Take Me Travel — 旅行雜誌風：白底、大幅封面、襯線大標題、大量留白 */
:root {
  --bg: #ffffff;
  --bg-2: #f4f5f3;
  --bg-3: #eceeeb;
  --ink: #1d1d1f;
  --ink-2: #47474c;
  --muted: #86868b;
  --line: #e7e7e4;
  --official: #3046c5;
  --official-bg: #eef0fb;
  --exp: #1f7a57;
  --exp-bg: #e9f4ee;
  --ai: #8a4fd3;
  --ai-bg: #f3edfb;
  --warn: #c2462b;
  --warn-bg: #fcefea;
  --gold: #c48a12;
  --serif: "Noto Serif TC", "Noto Serif CJK TC", "Songti TC", "PMingLiU", Georgia, serif;
  --sans: "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px -14px rgba(0,0,0,.18);
  --nav-h: 72px;
  --wrap: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121214; --bg-2: #1b1b1e; --bg-3: #242428; --ink: #f2f2f0; --ink-2: #c9c9cc; --muted: #8f8f95; --line: #2c2c31;
    --official: #8fa0ff; --official-bg: #1d2140; --exp: #5cc79a; --exp-bg: #15291f; --ai: #c3a0ff; --ai-bg: #261c38; --warn: #ff8f70; --warn-bg: #351c16;
    --shadow: 0 10px 30px -14px rgba(0,0,0,.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121214; --bg-2: #1b1b1e; --bg-3: #242428; --ink: #f2f2f0; --ink-2: #c9c9cc; --muted: #8f8f95; --line: #2c2c31;
  --official: #8fa0ff; --official-bg: #1d2140; --exp: #5cc79a; --exp-bg: #15291f; --ai: #c3a0ff; --ai-bg: #261c38; --warn: #ff8f70; --warn-bg: #351c16;
  --shadow: 0 10px 30px -14px rgba(0,0,0,.6); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.7;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
a { color: inherit; text-decoration: none; }
p a, .link { color: var(--official); }
p a:hover, .link:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
h1, h2, .serif { font-family: var(--serif); font-weight: 900; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.2; }
h2 { font-size: clamp(22px, 3.4vw, 28px); }
h3 { font-size: 18px; font-weight: 700; }
h4 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .9em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--official); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--ai-bg); }

/* ---------- 導覽 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-inner { max-width: var(--wrap); margin: 0 auto; height: 60px; padding: 0 20px; display: flex; align-items: center; gap: 28px; }
.brand { font-family: var(--serif); font-weight: 900; font-size: 24px; letter-spacing: .02em; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.brand small { font-family: var(--sans); font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.topnav { display: none; gap: 4px; flex: 1; }
.topnav a { padding: 6px 12px; border-radius: 99px; color: var(--ink-2); font-size: 15px; font-weight: 500; }
.topnav a:hover { background: var(--bg-2); }
.topnav a[aria-current="page"] { color: var(--ink); background: var(--bg-2); font-weight: 700; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
@media (min-width: 900px) { .topnav { display: flex; } }

.tabbar {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
  height: var(--nav-h); border-radius: 24px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
  box-shadow: 0 8px 30px -8px rgba(0,0,0,.22), inset 0 0 0 1px var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 11.5px; font-weight: 500; padding: 6px 0; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tabbar a[aria-current="page"] svg { stroke-width: 2.3; }
@media (min-width: 900px) { .tabbar { display: none; } }

main#view { max-width: var(--wrap); margin: 0 auto; padding: 8px 20px 64px; min-height: 60vh; }
@media (max-width: 640px) { main#view { padding: 4px 16px 40px; } }

/* ---------- 基本元件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 20px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--bg-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-2); }
.btn-signal { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-signal:hover { background: var(--ink-2); }
.btn-ai { background: var(--ai); border-color: var(--ai); color: #fff; }
.btn-ai:hover { background: color-mix(in srgb, var(--ai) 85%, #000); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--warn); }
.btn-sm { min-height: 34px; padding: 5px 13px; font-size: 13.5px; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > span { font-weight: 600; font-size: 14px; }
.field small { color: var(--muted); font-size: 13px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); font-size: 16px;
  transition: border-color .15s, background .15s;
}
textarea.input { min-height: 150px; resize: vertical; line-height: 1.7; }
.input:focus { outline: none; background: var(--bg); border-color: var(--ink); }
.field-error { color: var(--warn); font-size: 14px; min-height: 1em; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip { position: relative; display: inline-block; }
.check-chip input { position: absolute; opacity: 0; inset: 0; }
.check-chip span { display: inline-block; padding: 8px 15px; border-radius: 99px; background: var(--bg-2); font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid transparent; }
.check-chip input:checked + span { background: var(--ink); color: var(--bg); }
.check-chip input:focus-visible + span { outline: 2.5px solid var(--official); outline-offset: 2px; }

.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-m); padding: 22px; }
.panel h3 { margin-bottom: 12px; }
.panel + .panel { margin-top: 16px; }
.cmp-exp > .panel + .panel, .split > .panel + .panel { margin-top: 0; }
.soft { background: var(--bg-2); border-radius: var(--r-m); padding: 22px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.stack > * + * { margin-top: 14px; }
.grid-2 { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .grid-2 { grid-template-columns: minmax(0, 1fr) 320px; } }
.split { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); background: var(--bg-2); border-radius: var(--r-m); }
.empty strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 20px; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 28px 0 26px; }
.page-head p { color: var(--muted); margin: 10px 0 0; max-width: 56ch; font-size: 16.5px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 48px 0 18px; }
.section-head h2 { font-size: clamp(22px, 3vw, 26px); }
.section-head a { font-size: 14px; color: var(--muted); font-weight: 500; }
.section-head a:hover { color: var(--ink); }
.kicker { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.kicker b { color: var(--ink); font-weight: 700; }

/* 標籤：只在需要區分資料性質時使用 */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; line-height: 1.7; }
.tag svg { width: 13px; height: 13px; }
.tag-official { background: var(--official-bg); color: var(--official); }
.tag-exp { background: var(--exp-bg); color: var(--exp); }
.tag-ai { background: var(--ai-bg); color: var(--ai); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-signal { background: var(--ink); color: var(--bg); }
.tag-demo { background: transparent; border: 1px dashed var(--muted); color: var(--muted); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; flex: none; }

/* ---------- 封面 ---------- */
.cover { position: relative; overflow: hidden; border-radius: var(--r-m); background: var(--bg-2); aspect-ratio: 16 / 10; }
.cover img, .cover svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-wide { aspect-ratio: 21 / 9; border-radius: var(--r-l); }
.cover-sq { aspect-ratio: 1; border-radius: 14px; }
.cover-tall { aspect-ratio: 4 / 5; }

/* ---------- 首頁 ---------- */
.hero { display: grid; gap: 28px; align-items: center; margin: 12px 0 8px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 1fr; gap: 56px; margin: 36px 0 12px; } }
.hero .cover { aspect-ratio: 4 / 3; border-radius: var(--r-l); }
@media (max-width: 899px) { .hero .cover { order: -1; aspect-ratio: 16 / 11; margin: 0 -16px; border-radius: 0 0 var(--r-l) var(--r-l); } }
.hero h1 { font-size: clamp(34px, 6.2vw, 58px); line-height: 1.16; }
.hero .lede { font-size: 17px; color: var(--ink-2); margin: 16px 0 26px; max-width: 30em; }
.ask-form { display: flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 99px; padding: 6px 6px 6px 20px; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); max-width: 620px; }
.ask-form svg.lead { width: 20px; height: 20px; color: var(--muted); flex: none; }
.ask-form input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 17px; padding: 10px 4px; outline: none; }
.ask-form input::placeholder { color: var(--muted); }
.ask-form button { border: 0; border-radius: 99px; background: var(--ink); color: var(--bg); font-weight: 700; padding: 0 22px; height: 46px; cursor: pointer; font-size: 15px; }
.ask-form:focus-within { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--ink); }
.prompts { display: flex; gap: 8px; margin-top: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.prompts::-webkit-scrollbar { display: none; }
.prompts button { flex: none; border: 0; background: var(--bg-2); border-radius: 99px; padding: 8px 15px; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.prompts button:hover { background: var(--bg-3); color: var(--ink); }

/* 雜誌文章卡 */
.stories { display: grid; gap: 36px 28px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .stories { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .stories { grid-template-columns: repeat(3, 1fr); } .stories .story-lead { grid-column: span 2; grid-row: span 2; } }
.story { display: grid; gap: 12px; align-content: start; }
.story .cover { transition: transform .35s ease; }
.story:hover .cover { transform: scale(.985); }
.story h3 { font-family: var(--serif); font-weight: 900; font-size: 21px; line-height: 1.38; }
.story-lead h3 { font-size: clamp(24px, 3vw, 32px); }
.story p { color: var(--ink-2); margin: 0; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-lead p { -webkit-line-clamp: 3; font-size: 16px; }
.story .byline { font-size: 13px; color: var(--muted); }
.story .reason { margin-bottom: -4px; }

/* 橫向捲動 */
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 6px; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }
@media (max-width: 640px) { .scroller { margin: 0 -16px; padding: 0 16px 6px; grid-auto-columns: 72%; } }
.tile { display: grid; gap: 10px; }
.tile strong { font-family: var(--serif); font-size: 18px; font-weight: 900; line-height: 1.35; }
.tile span { font-size: 13px; color: var(--muted); }

/* 社論引言（矛盾提醒） */
.pull { border-top: 2px solid var(--ink); padding-top: 18px; }
.pull blockquote { margin: 0; font-family: var(--serif); font-size: clamp(20px, 2.6vw, 25px); font-weight: 700; line-height: 1.5; }
.pull .vs { margin-top: 16px; }

/* 首頁工具列 */
.tools { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .tools { grid-template-columns: repeat(3, 1fr); } }
.tool { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; }
.tool .cover { aspect-ratio: 1; border-radius: 14px; }
.tool strong { font-family: var(--serif); font-size: 18px; font-weight: 900; display: block; }
.tool span { font-size: 14px; color: var(--muted); }

/* ---------- 知識卡（文章形式） ---------- */
.answer { max-width: 760px; }
.answer-head { margin: 8px 0 26px; }
.answer-head h1 { font-size: clamp(28px, 4.6vw, 42px); margin: 10px 0 14px; }
.answer-head .verdict { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 6px 14px 6px 12px; border-radius: 99px; background: var(--bg-2); }
.answer-head .verdict .dot { color: var(--gold); }
.answer-head .verdict.insufficient .dot { color: var(--muted); }
.answer-head .verdict.conflicting .dot { color: var(--warn); }
.answer-head .verdict.confirmed .dot { color: var(--exp); }
.answer-head .detected { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.lane { padding: 22px 0; border-top: 1px solid var(--line); }
.lane-title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14px; color: var(--lane-color); margin-bottom: 8px; }
.lane-title .dot { color: var(--lane-color); }
.lane-text { white-space: pre-line; font-size: 17px; line-height: 1.8; }
.lane-official { --lane-color: var(--official); }
.lane-exp { --lane-color: var(--exp); }
.lane-ai { --lane-color: var(--ai); }
.lane-warn { --lane-color: var(--warn); }
.lane-ai .lane-text { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.75; }
.lane .refs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ref { font-size: 13px; border: 0; border-radius: 8px; padding: 4px 10px; background: var(--bg-2); color: var(--ink-2); cursor: pointer; text-align: left; max-width: 100%; }
.ref b { color: var(--lane-color); margin-right: 5px; }
.ref:hover { background: var(--bg-3); }
.checklist { margin: 12px 0 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding-left: 26px; margin: 6px 0; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 13px; height: 13px; border: 1.8px solid var(--lane-color); border-radius: 4px; }
.answer-foot { border-top: 1px solid var(--line); padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.answer-foot .note { font-size: 13px; color: var(--muted); max-width: 44ch; }
.conf { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.conf-bar { width: 64px; height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.conf-bar i { display: block; height: 100%; background: var(--ai); }
.thinking { padding: 32px 0; display: flex; gap: 12px; align-items: center; color: var(--muted); }
.thinking .dots { display: inline-flex; gap: 5px; }
.thinking .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: blink 1.2s infinite ease-in-out; }
.thinking .dots i:nth-child(2) { animation-delay: .2s; } .thinking .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

/* 規則與經驗 */
.rule { padding: 20px 0; border-top: 1px solid var(--line); }
.rule-list > .rule:first-child { border-top: 0; padding-top: 4px; }
.rule .kicker { margin-bottom: 6px; }
.rule h4 { font-family: var(--serif); font-size: 19px; font-weight: 900; margin-bottom: 6px; line-height: 1.45; }
.rule .body { color: var(--ink-2); }
.rule .cond { font-size: 14px; color: var(--ink-2); background: var(--bg-2); border-radius: 10px; padding: 8px 12px; margin: 12px 0 0; }
.rule .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 12px; align-items: center; }
.rule .meta a { color: var(--official); }
.rule-list { display: grid; }
.exp-item { padding: 12px 0 12px 18px; position: relative; }
.exp-item::before { content: ""; position: absolute; left: 0; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: var(--exp); }
.exp-item.outdated::before { background: var(--muted); }
.exp-item.outdated p { color: var(--muted); }
.exp-item.disputed::before { background: var(--warn); }
.exp-item p { margin: 0 0 4px; }
.exp-item .meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.exp-item .meta a { color: var(--exp); }
.exp-item + .exp-item { border-top: 1px solid var(--line); }

.conflict { background: var(--warn-bg); border-radius: var(--r-m); padding: 20px; }
.conflict-head { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--warn); margin-bottom: 10px; font-size: 14.5px; }
.conflict-head svg { width: 17px; height: 17px; }
.vs { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 10px 0; }
@media (min-width: 640px) { .vs { grid-template-columns: 1fr 1fr; } }
aside .vs { grid-template-columns: 1fr; }
.vs > div { background: var(--bg); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.vs .who { font-size: 12.5px; font-weight: 700; margin-bottom: 4px; display: block; }
.vs .who.o { color: var(--official); } .vs .who.e { color: var(--exp); }

/* ---------- 項目頁 ---------- */
.entity-hero { position: relative; margin: 8px 0 28px; }
.entity-hero .cover { aspect-ratio: 21 / 7; border-radius: var(--r-l); }
@media (max-width: 640px) { .entity-hero .cover { aspect-ratio: 16 / 10; margin: 0 -16px; border-radius: 0 0 var(--r-l) var(--r-l); } }
.entity-hero .title { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.entity-hero h1 { font-size: clamp(32px, 5.6vw, 52px); }
.entity-hero .sub { color: var(--muted); font-size: 15px; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.entity-hero .desc { font-size: 17px; color: var(--ink-2); margin: 14px 0 0; max-width: 46em; }
.entity-hero .code { position: absolute; left: 20px; top: 18px; background: var(--bg); color: var(--ink); font-weight: 800; font-size: 14px; padding: 4px 12px; border-radius: 99px; letter-spacing: .04em; box-shadow: var(--shadow); }
@media (max-width: 640px) { .entity-hero .code { left: 4px; } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs { display: flex; gap: 6px; margin: 4px 0 24px; overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 5; background: var(--bg); padding: 10px 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: var(--bg-2); padding: 8px 16px; border-radius: 99px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tabs .count { font-size: 12px; opacity: .65; margin-left: 5px; font-weight: 500; }
.spec { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.spec th, .spec td { text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--muted); font-weight: 500; width: 34%; font-size: 14.5px; }
.spec td .small, .spec td .tiny { display: block; }
.summary-box { background: var(--exp-bg); border-radius: var(--r-m); padding: 24px; }
.summary-box h3 { color: var(--exp); font-size: 14px; display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.summary-box .lead { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.75; margin: 0; }
.pc { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 18px; }
@media (min-width: 640px) { .pc { grid-template-columns: 1fr 1fr; } }
.pc ul { margin: 6px 0 0; padding-left: 18px; }
.pc h4 { font-size: 14px; }
.entity-list { display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.entity-item { display: grid; gap: 10px; }
.entity-item strong { font-family: var(--serif); font-size: 18px; font-weight: 900; line-height: 1.35; display: block; }
.entity-item span.sub { font-size: 13px; color: var(--muted); }
.entity-row { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 8px 0; }
.entity-row .cover { aspect-ratio: 1; border-radius: 12px; }
.entity-row strong { display: block; font-weight: 700; line-height: 1.35; color: var(--ink); }
.entity-row span { font-size: 13px; color: var(--muted); }

/* ---------- 比較 ---------- */
.cmp-picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cmp-slot { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: var(--bg); border-radius: 99px; padding: 6px 6px 6px 16px; font-weight: 600; font-size: 14.5px; }
.cmp-slot button { border: 0; background: rgba(255,255,255,.18); color: inherit; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.layer { margin-top: 44px; }
.layer-head { margin-bottom: 16px; }
.layer-head .kicker { margin-bottom: 4px; }
.layer-head .kicker .dot { color: var(--lc); }
.table-wrap { overflow-x: auto; border-radius: var(--r-m); background: var(--bg); border: 1px solid var(--line); }
.cmp { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
.cmp th, .cmp td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { font-family: var(--serif); font-size: 18px; font-weight: 900; background: var(--bg-2); }
.cmp tbody th { color: var(--muted); font-weight: 500; width: 170px; font-size: 14px; }
.cmp tr:last-child td, .cmp tr:last-child th { border-bottom: 0; }
.cmp .cond { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.cmp-exp { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .cmp-exp { grid-template-columns: repeat(var(--n, 2), 1fr); } }
.cmp-exp .panel { background: var(--bg-2); border: 0; }
.cmp-exp .panel h3 { font-family: var(--serif); font-weight: 900; font-size: 20px; }
.analysis { background: var(--ai-bg); border: 0; }
.prio-row { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--ai) 18%, transparent); }
@media (min-width: 640px) { .prio-row { grid-template-columns: 150px 150px 1fr; gap: 14px; } }
.prio-row:last-child { border-bottom: 0; }
.prio-row .leader { font-weight: 700; color: var(--ai); }

/* 鐵路對照 */
.topic-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 26px; scrollbar-width: none; }
.topic-bar::-webkit-scrollbar { display: none; }
.topic-bar button { flex: none; border: 0; background: var(--bg-2); border-radius: 99px; padding: 8px 16px; font-weight: 600; font-size: 14.5px; cursor: pointer; color: var(--ink-2); }
.topic-bar button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.matrix { display: grid; }
.mrow { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 26px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .mrow { grid-template-columns: 220px 1fr 1fr; gap: 32px; } }
.mrow .op { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; align-self: start; }
@media (min-width: 900px) { .mrow .op { grid-template-columns: 1fr; } }
.mrow .op .cover { aspect-ratio: 16 / 10; border-radius: 12px; }
@media (max-width: 899px) { .mrow .op .cover { aspect-ratio: 1; } }
.mrow .op strong { font-family: var(--serif); font-size: 20px; font-weight: 900; display: block; }
.mrow .op span { color: var(--muted); font-size: 13px; }
.mrow .col-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 7px; }
.mrow .col-title.o { color: var(--official); } .mrow .col-title.e { color: var(--exp); }
.mrow .none { color: var(--muted); font-size: 14px; }

/* ---------- 社群 ---------- */
.filters { display: flex; gap: 8px; margin-bottom: 30px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.filters::-webkit-scrollbar { display: none; }
.filters select.input { width: auto; min-height: 40px; padding: 6px 34px 6px 14px; border-radius: 99px; font-size: 14.5px; flex: none; }
.feed { display: grid; gap: 34px 28px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .feed.grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .feed.grid { grid-template-columns: repeat(3, 1fr); } }
.post-hero .cover { aspect-ratio: 21 / 9; border-radius: var(--r-l); margin-bottom: 26px; }
@media (max-width: 640px) { .post-hero .cover { aspect-ratio: 4 / 3; margin: 0 -16px 22px; border-radius: 0 0 var(--r-l) var(--r-l); } }
.post-hero h1 { font-size: clamp(30px, 5vw, 46px); margin: 10px 0 14px; }
.post-body { white-space: pre-line; font-size: 18px; line-height: 1.9; max-width: 36em; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); align-items: center; }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 14px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin: 26px 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.comment { padding: 16px 0; border-top: 1px solid var(--line); }
.comment .who { font-weight: 700; font-size: 14.5px; }
.comment p { margin: 4px 0 0; white-space: pre-line; }
.entity-picker { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); max-height: 280px; overflow: auto; padding: 6px; }
.suggest button { display: flex; width: 100%; text-align: left; gap: 8px; padding: 10px 12px; border: 0; background: none; cursor: pointer; font-size: 15px; border-radius: 10px; }
.suggest button:hover { background: var(--bg-2); }
.suggest button span { color: var(--muted); font-size: 13px; margin-left: auto; }
.chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chosen .tag button { border: 0; background: none; cursor: pointer; padding: 0 0 0 4px; color: inherit; font-weight: 700; }
.star-input { display: flex; gap: 2px; align-items: center; }
.star-input button { border: 0; background: none; font-size: 30px; color: var(--bg-3); cursor: pointer; padding: 0 2px; line-height: 1; }
.star-input button.on { color: var(--gold); }
.photo-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-previews img { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; }
.reason { font-size: 13px; color: var(--ai); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.reason svg { width: 14px; height: 14px; }

/* ---------- 行程 ---------- */
.trip-list { display: grid; gap: 30px 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.trip-card { display: grid; gap: 12px; }
.trip-card strong { font-family: var(--serif); font-size: 22px; font-weight: 900; }
.trip-card .body { font-size: 14px; color: var(--muted); display: flex; gap: 4px 12px; flex-wrap: wrap; }
.trip-hero .cover { aspect-ratio: 21 / 7; border-radius: var(--r-l); }
@media (max-width: 640px) { .trip-hero .cover { aspect-ratio: 16 / 9; margin: 0 -16px; border-radius: 0 0 var(--r-l) var(--r-l); } }
.days { display: grid; gap: 30px; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.day-head h3 { font-family: var(--serif); font-size: 22px; font-weight: 900; display: flex; align-items: baseline; gap: 12px; }
.day-head h3 span { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--muted); }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 54px 34px 1fr auto; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.item .time { font-weight: 700; font-size: 14.5px; padding-top: 5px; font-variant-numeric: tabular-nums; }
.item .kind { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--ink-2); }
.item .kind svg { width: 17px; height: 17px; }
.item.done .title { text-decoration: line-through; color: var(--muted); }
.item .title { font-weight: 600; font-size: 16px; }
.item .notes { font-size: 14px; color: var(--ink-2); white-space: pre-line; margin-top: 2px; }
.item .by { font-size: 12px; color: var(--muted); }
.item-actions { display: flex; gap: 0; }
.item-actions .btn { min-height: 34px; width: 34px; padding: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); font-weight: 700; font-size: 14px; color: var(--ink-2); flex: none; }
.share-code { font-weight: 800; font-size: 20px; letter-spacing: .1em; background: var(--bg-2); padding: 6px 14px; border-radius: 10px; display: inline-block; font-variant-numeric: tabular-nums; }
.chat { max-height: 380px; overflow-y: auto; display: grid; gap: 10px; }
.chat .msg { background: var(--bg-2); border-radius: 14px; padding: 10px 14px; font-size: 14.5px; white-space: pre-line; }
.soft .chat .msg { background: var(--bg); }
.soft h3 { margin-bottom: 12px; }
.chat .msg b { font-size: 12.5px; display: block; color: var(--muted); font-weight: 600; }

/* ---------- 我的與後台 ---------- */
.profile-head { display: flex; align-items: center; gap: 18px; margin: 28px 0 24px; flex-wrap: wrap; }
.profile-head .avatar { width: 72px; height: 72px; font-size: 28px; font-family: var(--serif); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat { background: var(--bg-2); border-radius: var(--r-m); padding: 16px 18px; display: block; }
.stat b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.alert b { color: var(--warn); }
.queue-item { border-radius: var(--r-m); padding: 18px 20px; background: var(--bg-2); }
.queue-item + .queue-item { margin-top: 12px; }
.queue-item .actions { margin-top: 12px; }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain th, table.plain td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.auth-wrap { max-width: 420px; margin: 40px auto; }
.auth-wrap h1 { font-size: 36px; margin-bottom: 8px; }

/* ---------- 對話框、提示 ---------- */
dialog.modal { border: 0; border-radius: var(--r-l); padding: 0; width: min(560px, calc(100vw - 24px)); background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.4); }
dialog.modal::backdrop { background: rgba(20, 20, 24, .45); backdrop-filter: blur(4px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 6px; }
.modal-head h3 { font-family: var(--serif); font-weight: 900; font-size: 22px; }
.modal-body { padding: 14px 22px; max-height: 70vh; overflow-y: auto; }
.modal-foot { padding: 12px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 640px) {
  dialog.modal { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--r-l) var(--r-l) 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); z-index: 100; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
@media (min-width: 900px) { .toast-wrap { bottom: 28px; } }
.toast { background: var(--ink); color: var(--bg); padding: 13px 18px; border-radius: 14px; font-size: 15px; box-shadow: var(--shadow); animation: up .22s ease-out; }
.toast.error { background: var(--warn); color: #fff; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.lightbox img { max-height: 80vh; margin: 0 auto; border-radius: 12px; }
.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; height: 18px; margin: 14px 0; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.offline-bar { background: var(--warn); color: #fff; text-align: center; font-size: 14px; padding: 4px; }
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 36px; align-items: center; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }

/* 首屏載入動畫：只在首頁封面出現一次 */
.hero .cover { animation: settle .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes settle { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* 手機：文章卡改成縮圖列表，減少捲動、更像 App */
@media (max-width: 699px) {
  .stories, .feed { gap: 22px; }
  .story:not(.story-lead) { grid-template-columns: 104px 1fr; column-gap: 14px; row-gap: 4px; align-items: start; }
  .story:not(.story-lead) > .cover { grid-row: 1 / span 4; aspect-ratio: 1; border-radius: 12px; }
  .story:not(.story-lead) > *:not(.cover) { grid-column: 2; }
  .story:not(.story-lead) h3 { font-size: 17px; line-height: 1.4; }
  .story:not(.story-lead) p { display: none; }
  .story-lead .cover { margin: 0 -16px; border-radius: 0; aspect-ratio: 4 / 3; }
  .section-head { margin: 36px 0 16px; }
  .entity-list { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
  .entity-item strong { font-size: 16px; }
  .answer-head h1 { font-size: 28px; }
  .lane-text { font-size: 16.5px; }
  .lane-ai .lane-text { font-size: 18px; }
}
