/* 郡品法律事務所 — 概念原型
   一套版面、五組設計參數（data-theme=a..e）。所有視覺差異只透過下方變數與少量主題覆寫。 */

:root, [data-theme="a"] {
  --bg: #fcfaf7; --surface: #ffffff; --band: #f5f5f4;
  --ink: #1c1917; --muted: #78716c; --faint: #a8a29e; --line: #e7e5e4;
  --accent: #b45309; --accent-soft: #fffbeb; --accent-line: #fde68a;
  --btn-bg: #1c1917; --btn-ink: #ffffff;
  --r-card: 24px; --r-btn: 999px; --r-chip: 999px;
  --f-head: "Noto Serif TC", "Songti TC", serif; --f-body: "Noto Sans TC", "PingFang TC", sans-serif;
  --head-w: 700; --head-track: 0; --h1: clamp(30px, 5vw, 46px);
  --shadow: none; --header-bg: rgba(252,250,247,.88);
  --hero-align: center; --photo-filter: none;
}
[data-theme="b"] {
  --bg: #fbf7f4; --surface: #ffffff; --band: #f7eeea;
  --ink: #3b2a2a; --muted: #735c5c; --faint: #9e8587; --line: #eedcd9;
  --accent: #a8606b; --accent-soft: #f3e4e4; --accent-line: #e8c9cc;
  --btn-bg: #b76e79; --btn-ink: #ffffff;
  --r-card: 28px; --r-btn: 999px; --r-chip: 999px;
  --f-head: "Noto Serif TC", serif; --f-body: "Noto Sans TC", sans-serif;
  --head-w: 600; --head-track: .02em; --h1: clamp(30px, 5vw, 46px);
  --shadow: 0 10px 30px -10px rgba(91,58,62,.10), 0 2px 8px -2px rgba(91,58,62,.05);
  --header-bg: rgba(251,247,244,.88);
  --hero-align: center; --photo-filter: none;
}
[data-theme="c"] {
  --bg: #2a1a24; --surface: #3a2532; --band: #22141d;
  --ink: #f5efe6; --muted: #c5b8b3; --faint: #9b8a90; --line: rgba(201,169,110,.28);
  --accent: #c9a96e; --accent-soft: rgba(201,169,110,.10); --accent-line: rgba(201,169,110,.45);
  --btn-bg: #c9a96e; --btn-ink: #2a1a24;
  --r-card: 6px; --r-btn: 4px; --r-chip: 4px;
  --f-head: "Noto Serif TC", serif; --f-body: "Noto Sans TC", sans-serif;
  --head-w: 500; --head-track: .08em; --h1: clamp(28px, 4.6vw, 42px);
  --shadow: 0 8px 32px -6px rgba(10,4,8,.55);
  --header-bg: rgba(42,26,36,.86);
  --hero-align: center; --photo-filter: none;
}
[data-theme="d"] {
  --bg: #f4f1ea; --surface: #fcfbf8; --band: #e9ede5;
  --ink: #263028; --muted: #515e53; --faint: #7a887c; --line: #d6ded2;
  --accent: #5b6f5a; --accent-soft: #eef2eb; --accent-line: #c4d0bf;
  --btn-bg: #6b7f6a; --btn-ink: #f4f1ea;
  --r-card: 18px; --r-btn: 999px; --r-chip: 999px;
  --f-head: "Noto Sans TC", sans-serif; --f-body: "Noto Sans TC", sans-serif;
  --head-w: 500; --head-track: .01em; --h1: clamp(30px, 5vw, 44px);
  --shadow: 0 4px 20px -2px rgba(38,48,40,.06);
  --header-bg: rgba(244,241,234,.88);
  --hero-align: center; --photo-filter: saturate(.9);
}
[data-theme="e"] {
  --bg: #ffffff; --surface: #ffffff; --band: #f4f4f4;
  --ink: #111111; --muted: #5f5f5f; --faint: #8a8a8a; --line: #111111;
  --accent: #c8102e; --accent-soft: #ffffff; --accent-line: #111111;
  --btn-bg: #111111; --btn-ink: #ffffff;
  --r-card: 0; --r-btn: 0; --r-chip: 0;
  --f-head: "Noto Serif TC", serif; --f-body: "Noto Sans TC", sans-serif;
  --head-w: 900; --head-track: -.02em; --h1: clamp(36px, 7vw, 68px);
  --shadow: none; --header-bg: rgba(255,255,255,.95);
  --hero-align: left; --photo-filter: grayscale(1) contrast(1.05);
}

* { 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(--f-body); font-size: 16px; line-height: 1.75;
  transition: background .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- 風格切換列 ---------- */
.themebar {
  position: sticky; top: 0; z-index: 90;
  background: #18181b; color: #fafafa; font-size: 13px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 40px;
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.themebar::-webkit-scrollbar { display: none; }
.themebar .tb-label { opacity: .7; flex: none; }
.themebar button {
  flex: none; border: 1px solid #3f3f46; background: transparent; color: #e4e4e7;
  border-radius: 999px; padding: 3px 12px; cursor: pointer; line-height: 1.6;
}
.themebar button .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(255,255,255,.3); }
.themebar button[aria-pressed="true"] { background: #fafafa; color: #18181b; border-color: #fafafa; }
.themebar .tb-note { margin-left: auto; opacity: .55; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 40px; z-index: 80;
  background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .in { max-width: 1120px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-ink);
  display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; font-size: 17px;
}
[data-theme="c"] .brand .mark { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
[data-theme="e"] .brand .mark { border-radius: 0; }
.brand .name { font-family: var(--f-head); font-weight: 700; font-size: 17px; letter-spacing: var(--head-track); line-height: 1.1; }
.brand .sub { display: block; font-family: var(--f-body); font-weight: 400; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); padding: 18px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--accent); }
.h-right { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 15px; }
.h-right a.txt { text-decoration: none; color: var(--muted); }
.h-right a.txt:hover { color: var(--ink); }
.menu-btn { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.mobile-nav { display: none; }

@media (max-width: 900px) {
  .nav, .h-right .txt { display: none; }
  .menu-btn { display: block; }
  .h-right { gap: 10px; }
  .h-right .btn { padding: 8px 14px; font-size: 14px; }
  .mobile-nav.open {
    display: block; border-top: 1px solid var(--line); background: var(--bg); padding: 8px 20px 16px;
  }
  .mobile-nav a { display: block; padding: 12px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
}

/* ---------- 共用元件 ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section.band { background: var(--band); }
.center { text-align: center; }

.eyebrow {
  display: block; color: var(--accent); font-size: 12px; font-weight: 700;
  letter-spacing: .32em; margin-bottom: 10px;
}
.h1, .h2, .h3 { font-family: var(--f-head); font-weight: var(--head-w); letter-spacing: var(--head-track); margin: 0; line-height: 1.3; }
.h1 { font-size: var(--h1); }
.h2 { font-size: clamp(24px, 3.6vw, 32px); margin-bottom: 12px; }
.h3 { font-size: 19px; margin-bottom: 6px; }
.lead { color: var(--muted); font-size: 17px; margin: 14px auto 0; max-width: 560px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; color: var(--faint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--btn-bg); color: var(--btn-ink); border: 1px solid var(--btn-bg);
  border-radius: var(--r-btn); padding: 12px 24px; font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer; transition: transform .15s, opacity .15s, background .2s;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
[data-theme="e"] .btn:hover { background: var(--accent); border-color: var(--accent); opacity: 1; }
.btn.lg { padding: 15px 34px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.outline { background: transparent; color: var(--ink); border-color: var(--line); }
[data-theme="c"] .btn.outline { border-color: var(--accent-line); }
.link { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.link:hover { opacity: .8; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 28px; box-shadow: var(--shadow);
}
.chip {
  display: inline-block; background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  border-radius: var(--r-chip); padding: 6px 14px; font-size: 13px; cursor: pointer; text-decoration: none;
  transition: border-color .2s, background .2s;
}
.chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: var(--r-chip); padding: 1px 9px; vertical-align: 2px;
}
.draft { font-size: 11px; color: var(--faint); border: 1px dashed var(--faint); border-radius: 4px; padding: 0 6px; margin-left: 6px; vertical-align: 2px; }

/* 主題裝飾 */
[data-theme="e"] .eyebrow { color: var(--ink); letter-spacing: .14em; font-size: 13px; }
[data-theme="e"] .eyebrow::before { content: attr(data-n) " — "; color: var(--accent); font-family: var(--f-head); }
[data-theme="e"] .section { border-top: 1px solid var(--line); }
[data-theme="e"] .card { border-width: 1px; }
[data-theme="b"] .eyebrow::before, [data-theme="d"] .eyebrow::before {
  content: ""; display: block; width: 34px; height: 18px; margin: 0 auto 8px;
  background: currentColor; opacity: .8;
  -webkit-mask: var(--sprig) center/contain no-repeat; mask: var(--sprig) center/contain no-repeat;
}
:root { --sprig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 36' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 30C20 26 40 18 64 6'/%3E%3Cpath d='M22 24c-2-6 1-12 7-14-1 7-3 11-7 14z'/%3E%3Cpath d='M36 17c0-6 4-10 10-11-2 6-5 9-10 11z'/%3E%3Cpath d='M30 22c6-3 12-2 15 3-6 2-11 1-15-3z'/%3E%3C/svg%3E"); }
[data-theme="c"] .eyebrow { letter-spacing: .4em; }
[data-theme="c"] .h2::after { content: ""; display: block; width: 40px; height: 1px; background: var(--accent); margin: 16px auto 0; }
[data-theme="c"] .left .h2::after, [data-theme="e"] .h2::after { margin-left: 0; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; text-align: var(--hero-align); }
.hero .h1 { margin-top: 6px; }
.hero .lead { margin-left: auto; margin-right: auto; }
[data-theme="e"] .hero .lead, [data-theme="e"] .hero .proof { margin-left: 0; justify-content: flex-start; }
[data-theme="e"] .hero { padding-top: 48px; }
[data-theme="e"] .hero .h1 { line-height: 1.12; }

.ask {
  margin: 34px auto 0; max-width: 680px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px 18px 14px; box-shadow: var(--shadow);
}
[data-theme="a"] .ask { box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 20px 40px -24px rgba(28,25,23,.18); }
[data-theme="e"] .ask { border-width: 2px; margin-left: 0; }
.ask .who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.ask .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 14px; border: 1px solid var(--accent-line); }
.ask form { display: flex; gap: 10px; align-items: flex-end; }
.ask textarea {
  flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 17px; line-height: 1.6; min-height: 56px; padding: 4px 2px;
}
.ask textarea::placeholder { color: var(--faint); }
.ask .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
[data-theme="e"] .ask .chips { border-top-color: #ddd; }
.proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 16px; font-size: 13px; color: var(--faint); }
.proof span::before { content: "✓ "; color: var(--accent); }

/* ---------- 步驟 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.step .n { font-family: var(--f-head); font-size: 28px; color: var(--accent); line-height: 1; margin-bottom: 10px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

/* ---------- 人生地圖 ---------- */
.map { position: relative; margin-top: 28px; text-align: left; }
.map .row { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding-bottom: 14px; }
.map .row::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 1px; background: var(--line); }
.map .row:last-child::before { display: none; }
.map .num {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; font-size: 13px; color: var(--muted); font-weight: 700; z-index: 1;
}
[data-theme="e"] .map .num { border-radius: 0; border-color: var(--ink); color: var(--ink); font-family: var(--f-head); }
.map .box { border: 1px solid var(--line); background: var(--surface); border-radius: calc(var(--r-card) * .7); padding: 12px 18px; text-decoration: none; display: block; transition: border-color .2s; }
.map a.box:hover { border-color: var(--accent); }
.map .box b { font-size: 16px; }
.map .box .d { display: block; font-size: 14px; color: var(--muted); }
.map .row.hot .num { background: var(--accent); color: var(--btn-ink); border-color: var(--accent); }
[data-theme="a"] .map .row.hot .num, [data-theme="c"] .map .row.hot .num { color: #fff; }
[data-theme="c"] .map .row.hot .num { color: #2a1a24; }
.map .row.hot .box { background: var(--accent-soft); border-color: var(--accent-line); }

/* 地圖詳頁 */
.stage { padding: 26px 0; border-top: 1px solid var(--line); }
.stage:first-of-type { border-top: 0; }
.stage .qs { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.stage .help { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* ---------- 方案 ---------- */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; text-align: left; }
.plan { display: flex; flex-direction: column; }
.plan .kind { font-size: 12px; color: var(--faint); letter-spacing: .1em; }
.plan .price { font-family: var(--f-head); font-size: 30px; font-weight: 700; margin: 10px 0 2px; letter-spacing: 0; }
.plan .price small { font-family: var(--f-body); font-size: 13px; font-weight: 400; color: var(--muted); }
.plan ul { padding: 0; margin: 14px 0 20px; list-style: none; font-size: 14px; color: var(--muted); flex: 1; }
.plan li { padding-left: 20px; position: relative; margin-bottom: 6px; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.plan.featured { border: 2px solid var(--ink); position: relative; }
[data-theme="b"] .plan.featured, [data-theme="d"] .plan.featured { border-color: var(--btn-bg); }
[data-theme="c"] .plan.featured { border-color: var(--accent); background: #432b3a; }
.plan .ribbon {
  position: absolute; top: -12px; right: 20px; background: var(--btn-bg); color: var(--btn-ink);
  font-size: 12px; font-weight: 700; padding: 2px 12px; border-radius: var(--r-chip);
}
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }

/* ---------- 律師 ---------- */
.lawyer { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; text-align: left; }
.lawyer .photo { border-radius: var(--r-card); overflow: hidden; background: var(--band); }
.lawyer .photo img { width: 100%; height: 380px; object-fit: cover; object-position: 40% 15%; filter: var(--photo-filter); }
[data-theme="c"] .lawyer .photo { background: none; border-radius: 0; }
[data-theme="c"] .lawyer .photo img { height: auto; object-fit: contain; }
[data-theme="d"] .lawyer .photo { border-radius: 160px 160px 18px 18px; }
[data-theme="b"] .lawyer .photo { border-radius: 999px 999px 28px 28px; }
blockquote.q {
  margin: 18px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent);
  font-family: var(--f-head); font-size: 20px; line-height: 1.6;
}
.creds { margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.creds li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
@media (max-width: 760px) {
  .lawyer { grid-template-columns: 1fr; gap: 24px; }
  .lawyer .photo img { height: 340px; }
}

/* 全寬律師照（E、D 首頁用） */
.wide-photo { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; filter: var(--photo-filter); border-radius: var(--r-card); }

/* ---------- 見證 ---------- */
.quotes { display: grid; gap: 14px; margin-top: 28px; text-align: left; }
.quote p { margin: 0 0 10px; font-size: 15px; }
.quote .by { font-size: 13px; color: var(--faint); }

/* ---------- 文章 ---------- */
.posts { margin-top: 24px; text-align: left; border-top: 1px solid var(--line); }
.post { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.post .cat { font-size: 12px; color: var(--accent); font-weight: 700; }
.post .t { font-weight: 600; }
.post:hover .t { color: var(--accent); }
@media (max-width: 560px) { .post { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- 見面禮 / CTA ---------- */
.gift { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; text-align: left; }
.gift .book {
  width: 110px; height: 150px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; box-shadow: 0 12px 24px -12px rgba(0,0,0,.35); padding: 14px 10px; text-align: center;
  font-family: var(--f-head); font-size: 13px; line-height: 1.5; display: grid; place-items: center;
}
.gift .book .ac { color: var(--accent); font-size: 10px; letter-spacing: .2em; display: block; margin-bottom: 6px; }
@media (max-width: 560px) { .gift { grid-template-columns: 1fr; } .gift .book { margin: 0 auto; } }

/* ---------- FAQ ---------- */
details.faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 20px; line-height: 1; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- 比較表 ---------- */
.table-wrap { overflow-x: auto; margin-top: 24px; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
table.cmp th, table.cmp td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
table.cmp th { font-weight: 700; color: var(--muted); font-size: 13px; }
table.cmp td:first-child { font-weight: 600; }
table.cmp .yes { color: var(--accent); font-weight: 700; }

/* ---------- 價值堆疊 ---------- */
.stack { margin-top: 20px; text-align: left; }
.stack .it { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.stack .it span:last-child { color: var(--accent); font-weight: 700; white-space: nowrap; }
.stack .sum { padding-top: 14px; font-weight: 700; text-align: center; }

/* ---------- 文書範例 ---------- */
.letter {
  background: #fffefb; color: #2a2a2a; border: 1px solid #e5dccb; border-radius: 4px;
  padding: 28px 30px; font-family: "Noto Serif TC", serif; font-size: 15px; line-height: 2;
  box-shadow: 0 14px 30px -18px rgba(0,0,0,.4); position: relative; text-align: left;
}
.letter h4 { text-align: center; margin: 0 0 12px; letter-spacing: .3em; }
.letter .fill { background: #fff2b3; padding: 0 3px; }
.letter .stamp {
  display: table; margin: 14px 0 0 auto; border: 2px solid #c8102e; color: #c8102e; font-size: 12px;
  padding: 4px 8px; transform: rotate(-8deg); font-family: var(--f-body); line-height: 1.4; text-align: center;
}
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.flow .card { padding: 18px; }
.flow .n { font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: .12em; }
@media (max-width: 760px) { .flow { grid-template-columns: 1fr 1fr; } }
.doclist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.doclist .card { padding: 18px 20px; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
@media (max-width: 560px) { .doclist { grid-template-columns: 1fr; } }

/* ---------- 對話頁 ---------- */
.chat-page { max-width: 760px; margin: 0 auto; padding: 0 16px; min-height: calc(100vh - 101px); display: flex; flex-direction: column; }
.chat-top { padding: 18px 0 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.chat-top .t { font-family: var(--f-head); font-weight: var(--head-w); font-size: 19px; }
.quota { font-size: 13px; color: var(--muted); }
.quota b { color: var(--accent); }
.safety { margin: 12px 0 0; font-size: 13px; color: var(--muted); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: calc(var(--r-card) * .5); padding: 10px 14px; }
.msgs { flex: 1; padding: 18px 0 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 86%; padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.75; white-space: pre-wrap; }
.msg.ai { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; align-self: flex-start; }
.msg.me { background: var(--btn-bg); color: var(--btn-ink); border-top-right-radius: 4px; align-self: flex-end; }
[data-theme="e"] .msg { border-radius: 0; }
[data-theme="c"] .msg { border-radius: 6px; }
.msg .src { display: block; margin-top: 8px; font-size: 12px; color: var(--faint); white-space: normal; }
.msg.typing { color: var(--faint); }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); margin-right: 4px; animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.replies { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-end; justify-content: flex-end; max-width: 92%; }
.summary { align-self: stretch; }
.summary h4 { font-family: var(--f-head); margin: 0 0 10px; font-size: 18px; }
.summary dl { margin: 0; display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; }
.recs { display: grid; gap: 10px; margin-top: 14px; }
.rec { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 16px 18px; }
.rec .why { font-size: 13px; color: var(--muted); }
.rec.best { border: 2px solid var(--accent); }
.composer { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 16px; border-top: 1px solid var(--line); }
.composer form { display: flex; gap: 10px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 8px 8px 8px 16px; }
.composer textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font: inherit; font-size: 16px; min-height: 26px; max-height: 120px; padding: 6px 0; }
.composer .tiny { margin-top: 8px; text-align: center; }

/* ---------- 頁尾 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 90px; font-size: 14px; color: var(--muted); margin-top: 40px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h5 { margin: 0 0 10px; color: var(--ink); font-size: 14px; }
.site-footer a { text-decoration: none; display: block; padding: 2px 0; }
.site-footer a:hover { color: var(--ink); }
.site-footer .legal { margin-top: 28px; font-size: 12px; color: var(--faint); line-height: 1.7; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* 快速離開 */
.quick-exit {
  position: fixed; right: 16px; bottom: 16px; z-index: 95;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px -10px rgba(0,0,0,.35);
}
.quick-exit:hover { border-color: var(--accent); }
[data-theme="e"] .quick-exit { border-radius: 0; border-color: #111; }

/* 見面禮彈窗 */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(20,14,12,.55); display: none; place-items: center; padding: 20px; }
.modal.open { display: grid; }
.modal .card { max-width: 440px; width: 100%; text-align: center; position: relative; padding: 32px 28px; }
.modal .x { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); }

.photo .alt-c { display: none; }
[data-theme="c"] .photo .alt-c { display: block; }
[data-theme="c"] .photo .def { display: none; }
.stage .eyebrow::before { margin-left: 0 !important; }
.left { text-align: left; }
.h-right .btn { white-space: nowrap; }
@media (max-width: 560px) {
  .themebar { gap: 4px; padding: 0 6px; justify-content: space-between; }
  .themebar .tb-label, .themebar .tb-note { display: none; }
  .themebar button { padding: 2px 6px; font-size: 11.5px; letter-spacing: -.02em; }
  .themebar button .sw { display: none; }
  .site-header .in { padding: 0 14px; gap: 10px; }
  .brand .sub { display: none; }
  .brand .name { font-size: 16px; }
  .ask form { flex-direction: column; align-items: stretch; }
  .ask .btn { width: 100%; }
}
.left .eyebrow::before { margin-left: 0 !important; }
.br-m { display: none; }
@media (max-width: 560px) { .br-m { display: inline; } .section { padding: 52px 0; } .card { padding: 22px; } }
.page-head { padding: 56px 0 8px; text-align: center; }
.note-box { font-size: 13px; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; margin-top: 18px; }
