/* ==========================================================================
   appspdoit — 共用樣式表（monochrome design system）
   對應 Figma：#Desktop · Home / #Desktop · IRA
   純 CSS，支援亮/暗色主題、響應式
   ========================================================================== */

:root {
  /* 顏色 tokens（取自 Figma 🎨 Design System） */
  --bg-page:      #f7f7f7;
  --bg-card:      #ffffff;
  --bg-subtle:    #ededea;
  --border:       #e4e4e0;
  --border-strong:#848484;

  --ink:          #0f0f0f;  /* 內文主色 */
  --ink-second:   #3c3c3c;  /* 字標 / 標題 / 深色元件 */
  --ink-muted:    #6f6f6b;
  --ink-faint:    #9a9a95;
  --ink-inverse:  #ffffff;
  --ink-inverse2: #f5f5f5;

  --surface-dark: #3c3c3c;  /* 頁尾 / 導覽膠囊 底色 */

  /* 主要按鈕（亮色：深底白字） */
  --btn-bg: var(--surface-dark);
  --btn-fg: var(--ink-inverse);

  /* 導覽膠囊 */
  --nav-bg:        var(--surface-dark);
  --nav-item:      var(--ink-inverse);
  --nav-active-bg: var(--bg-card);
  --nav-active-fg: var(--ink-second);

  /* 各 app 主題重點色（功能編號 / 小重點） */
  --accent: var(--ink-second);
  /* 法律頁內文重點色（統一深藍黑，與 IRA 相同） */
  --hl: #01011f;

  /* 相容舊法律頁樣式所需變數 */
  --bg: var(--bg-page);
  --bg-alt: var(--bg-subtle);
  --surface: var(--bg-card);
  --text: var(--ink);
  --text-muted: var(--ink-muted);
  --text-faint: var(--ink-faint);

  --radius: 16px;
  --maxw: 1280px;
  --pad: 48px;

  --shadow:    0 1px 3px rgba(16, 24, 40, .05), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 20px 54px rgba(13, 13, 13, .12);

  --font-latin: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-cjk: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font: var(--font-latin), var(--font-cjk);

  /* 品牌強調色（版本更新標籤 / 方案表 Pro 欄）——各 app 主題覆寫；
     -soft / -tint 以 color-mix 對 --bg-card 推導，亮暗自動適配 */
  --brand:      #16a34a;                                          /* IRA 綠（預設） */
  --brand-ink:  #0f7a37;                                          /* soft 底上的文字 / 強調 */
  --brand-fg:   #ffffff;                                          /* brand 底上的文字 */
  --brand-soft: color-mix(in srgb, var(--brand) 16%, var(--bg-card));
  --brand-tint: color-mix(in srgb, var(--brand) 7%, var(--bg-card));
}

/* 各 app 主題色（重點色 + 品牌強調色） */
.theme-ira    { --accent: #01011f; --brand: #749E44; --brand-ink: #749E44; }
.theme-planto { --accent: #123020; --brand: #3f7a34; --brand-ink: #2f6a26; }
.theme-treway { --accent: #2c1c06; --brand: #7a5a3c; --brand-ink: #5f4326; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page:      #111110;
    --bg-card:      #1b1b19;
    --bg-subtle:    #262623;
    --border:       #2f2f2b;
    --border-strong:#4d4d48;

    --ink:          #f3f3ef;
    --ink-second:   #ececE7;
    --ink-muted:    #adada6;
    --ink-faint:    #7c7c76;
    --ink-inverse:  #ffffff;
    --ink-inverse2: #f5f5f5;

    --surface-dark: #232320;

    --btn-bg: #f1f1ec;
    --btn-fg: #131311;

    --nav-bg:        #000000;
    --nav-item:      #e9e9e4;
    --nav-active-bg: #f1f1ec;
    --nav-active-fg: #131311;

    --accent: #e9e9e4;
    --hl: #cfe0ff;

    /* 暗色：品牌色提亮以維持對比，brand 底上改用深字 */
    --brand:     #34d17f;
    --brand-ink: #8fe9b3;
    --brand-fg:  #0c1a11;

    --shadow:    0 1px 3px rgba(0, 0, 0, .5);
    --shadow-lg: 0 20px 54px rgba(0, 0, 0, .55);
  }
  .theme-ira    { --accent: #cfe0ff; --brand: #9dc46e; --brand-ink: #b7d98f; }
  .theme-planto { --accent: #bfe7cd; --brand: #7fc96a; --brand-ink: #bfe7cd; }
  .theme-treway { --accent: #e8d3b3; --brand: #c9a878; --brand-ink: #e8d3b3; }
}

/* ---------- 基礎 ---------- */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* sticky header 高度（72px）+ 20px 呼吸空間，避免錨點跳轉時標題被 header 蓋住 */
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  font-family: var(--font-cjk), var(--font-latin);
  color: var(--ink);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* 拉丁字（品牌、按鈕、標籤）用 Inter */
.wordmark, .btn, .eyebrow, .section-label, .platform, .footer-wordmark,
.footer-col h4, .footer-bottom, .feature-num { font-family: var(--font-latin); }

/* ---------- 導覽列 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg-page) 90%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
}
.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.wordmark {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -.5px;
  color: var(--ink-second);
}
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: var(--nav-bg);
}
.nav-pill a {
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-cjk);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .4px;
  color: var(--nav-item);
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background .15s, color .15s;
}
.nav-pill a:hover { color: var(--nav-active-fg); background: color-mix(in srgb, var(--nav-active-bg) 25%, transparent); }
.nav-pill a.active { background: var(--nav-active-bg); color: var(--nav-active-fg); }
.nav-pill a.active:hover { background: var(--nav-active-bg); }

/* ---------- 手機版漢堡選單（右側抽屜，對應 Figma：Mobile · IRA · 選單開啟） ---------- */
.nav-toggle { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.burger {
  display: none;               /* 桌機隱藏；行動版由 .has-menu 顯示 */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-second);
}
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, .42);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  height: 100%;
  width: min(80vw, 320px);
  flex-direction: column;
  padding: 14px 10px 24px;
  background: var(--surface-dark);
  box-shadow: -10px 0 40px rgba(0, 0, 0, .3);
  transform: translateX(100%);
  transition: transform .28s ease;
}
.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 10px;
}
.mobile-menu-head .section-label { margin: 0; color: var(--ink-faint); }
.menu-close {
  cursor: pointer;
  color: var(--ink-inverse);
  font-size: 20px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 8px;
}
.menu-close:hover { background: rgba(255, 255, 255, .1); }
.mobile-menu a {
  padding: 16px 14px;
  font-family: var(--font-cjk);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink-inverse);
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.mobile-menu a.active { font-weight: 700; }
.mobile-menu a:hover { background: rgba(255, 255, 255, .06); }
.nav-toggle:checked ~ .nav-overlay { opacity: 1; visibility: visible; }
.nav-toggle:checked ~ .mobile-menu { transform: translateX(0); }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .6px;
  border: 1px solid transparent;
  background: var(--bg-card);
  color: var(--ink-second);
  cursor: pointer;
  transition: transform .15s ease, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-outline { background: var(--bg-card); color: var(--ink-second); border-color: var(--border); }
.btn-outline:hover { border-color: var(--border-strong); }

/* ---------- Hero（首頁） ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
  padding: 64px 0 56px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .6px;
  color: var(--ink-muted);
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3fae6a;
  box-shadow: 0 0 0 3px color-mix(in srgb, #3fae6a 22%, transparent);
}
.hero h1 {
  margin: 0;
  font-family: var(--font-cjk);
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 66px);
  line-height: 1.04;
  letter-spacing: -2px;
  color: var(--ink-second);
}
.hero .lede {
  margin: 0;
  max-width: 640px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ---------- 區塊標題（eyebrow label） ---------- */
.section-label {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--ink-faint);
  margin: 0 0 20px;
}

/* ---------- 產品卡（首頁） ---------- */
.apps-section { padding: 8px 0 64px; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.app-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: inherit;
}
.app-card .preview {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.app-card .preview img { width: 100%; height: auto; display: block; }
.app-card:hover .preview {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.preview--empty {
  display: grid;
  place-items: center;
  font-size: 76px;
  background:
    radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--accent) 8%, var(--bg-card)), var(--bg-card));
}
.app-card .meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tag {
  font-family: var(--font-cjk);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--ink-second);
  white-space: nowrap;
}
.app-card h3 {
  margin: 0;
  font-family: var(--font-cjk);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink-second);
}
.app-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.58;
  color: var(--ink-muted);
}
.platform {
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .6px;
  color: var(--ink-faint);
}

/* ---------- 麵包屑 ---------- */
.crumb {
  padding-top: 22px;
  font-family: var(--font-cjk);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .8px;
  color: var(--ink-faint);
}
.crumb a { color: var(--ink-faint); }
.crumb a:hover { color: var(--ink-muted); }

/* ---------- 產品頁 Hero ---------- */
.app-hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 32px 0 40px;
}
.app-hero-copy {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.chip {
  font-family: var(--font-cjk);
  font-weight: 500;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--ink-muted);
}
.app-hero h1 {
  margin: 0;
  font-family: var(--font-cjk);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: var(--ink-second);
}
.app-hero .lede {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-muted);
}
.store-buttons { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 4px; }

/* App 標題（icon + 名稱） */
.app-title { display: flex; align-items: center; gap: 12px; }
.app-title .app-icon {
  width: 60px; height: 60px; flex-shrink: 0;
  border-radius: 13px;
  box-shadow: var(--shadow);
}
.app-hero-note { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-faint); }

/* 商店下載徽章 */
.store-badges { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.store-badges a { display: block; transition: transform .15s ease, opacity .15s; }
.store-badges a:hover { transform: translateY(-1px); opacity: .88; }
.store-badges img { height: 56px; width: auto; display: block; }

.app-hero-media {
  flex-shrink: 0;
  width: 400px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
}
.app-hero-media img { width: 100%; height: auto; display: block; }
.app-hero-media.preview--empty { aspect-ratio: 4 / 3; }

/* ---------- 功能卡（產品頁） ---------- */
.features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 12px 0 8px;
}
.feature-card {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 34px 36px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.feature-card:nth-child(even) { flex-direction: row-reverse; }
.feature-body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-num {
  font-weight: 900;
  font-size: 34px;
  letter-spacing: -1px;
  color: var(--ink-second);
  line-height: 1;
}
.feature-body h3 {
  margin: 0;
  font-family: var(--font-cjk);
  font-weight: 900;
  font-size: clamp(1.9rem, 4.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: var(--ink-second);
}
.feature-body > p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-sm {
  font-family: var(--font-cjk);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .2px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--ink-muted);
}
.feature-media {
  flex-shrink: 0;
  width: 210px;
  height: 420px;
  border-radius: 30px;
  padding: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
/* 真實 App 截圖（含裝置外框，去除底框樣式） */
.feature-media--shot {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-media--shot img { width: 100%; height: 100%; object-fit: contain; }
.media-screen {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: linear-gradient(180deg, #cdeeea 0%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #4a4a45;
}
.media-emoji { font-size: 46px; line-height: 1; }
.media-label { font-size: 12px; color: #7d8a86; }
.media-screen img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; }

/* ---------- 規格 ---------- */
.spec { padding: 32px 0 8px; }
.spec-list { display: flex; flex-direction: column; }
.spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.spec-row .k {
  font-family: var(--font-cjk);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .3px;
  color: var(--ink-muted);
}
.spec-row .v {
  font-family: var(--font-cjk);
  font-size: 15px;
  color: var(--ink);
  text-align: right;
}

/* ---------- 為什麼有此 App ---------- */
.why {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 34px 36px 8px;
}
.why-mark {
  font-family: var(--font-latin);
  font-weight: 900;
  font-size: 34px;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--ink-second);
}
.why h3 {
  margin: 0;
  font-family: var(--font-cjk);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -.3px;
  color: var(--ink-second);
}
.why p { margin: 0; max-width: 700px; align-self: center; font-size: 15px; line-height: 1.6; text-align: left; color: var(--ink-second); }

/* ---------- FAQ ---------- */
.faq { padding: 36px 0 0; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 20px;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-family: var(--font-cjk);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink-second);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-latin);
  font-size: 22px;
  color: var(--accent);
  transition: transform .2s;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  margin: 0;
  padding: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
}
.faq-item p a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- CTA ---------- */
.cta {
  margin: 40px 0;
  padding: 56px 24px;
  border-radius: 24px;
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.cta h2 {
  margin: 0;
  font-family: var(--font-cjk);
  font-weight: 900;
  font-size: clamp(1.9rem, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: var(--ink-second);
}
.cta p { margin: 0; font-size: 15px; color: var(--ink-faint); }
.cta .store-buttons { justify-content: center; padding-top: 8px; }
.cta .store-badges { justify-content: center; padding-top: 8px; }

/* ---------- 版本更新 slider（WHAT'S NEW） ---------- */
/* ---------- 跑馬燈（TreWay 樹資料更新公告） ---------- */
.tw-marquee-sec { padding: 24px 0 0; }
.tw-marquee {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 15%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  overflow: hidden;
}
.tw-marquee-tag {
  flex: none;
  font-family: var(--font-cjk);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .3px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-fg);
}
.tw-marquee-vp {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.tw-marquee.is-scrolling .tw-marquee-vp {
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  mask: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
.tw-marquee-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
}
.tw-marquee.is-scrolling .tw-marquee-track { animation: tw-marquee-scroll 32s linear infinite; }
.tw-marquee.is-scrolling:hover .tw-marquee-track { animation-play-state: paused; }
.tw-marquee-item {
  font-family: var(--font-cjk);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-second);
  padding-right: 56px;
}
/* 內容不溢出（桌機）時：只顯示一份、去掉尾端留白，不捲動 */
.tw-marquee:not(.is-scrolling) .tw-marquee-item { padding-right: 0; }
.tw-marquee:not(.is-scrolling) .tw-marquee-item + .tw-marquee-item { display: none; }
.tw-marquee-item b { font-weight: 700; color: var(--brand-ink); }
@keyframes tw-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  /* 不自動捲動：改為靜態換行顯示完整訊息 */
  .tw-marquee.is-scrolling .tw-marquee-track { animation: none; white-space: normal; }
  .tw-marquee.is-scrolling .tw-marquee-vp { -webkit-mask: none; mask: none; }
  .tw-marquee-item { padding-right: 0; }
  .tw-marquee-item + .tw-marquee-item { display: none; }
}

/* ---------- 樹木統計（TreWay 各縣市收錄，含 count-up） ---------- */
.treecount { padding: 40px 0 8px; }
.treecount .section-label { margin: 0 0 8px; }
.tc-grid { display: flex; gap: 16px; flex-wrap: wrap; align-items: stretch; }
.tc-tile {
  flex: 1 1 175px;
  min-width: 158px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tc-total {
  flex: 1 1 250px;
  min-width: 230px;
  /* 直接對主題 --brand 做 color-mix；不用 --brand-soft（它在 :root 已被綠色定死） */
  background: color-mix(in srgb, var(--brand) 15%, var(--bg-card));
}
.tc-tile-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tc-tile-head svg { flex: none; }
.tc-total .tc-tile-head { color: var(--brand-ink); font-weight: 700; }
.tc-city { color: var(--ink-muted); font-weight: 500; }
.tc-num-row { display: flex; align-items: baseline; gap: 5px; }
.tc-num {
  font-family: var(--font-latin);
  font-weight: 900;
  line-height: 1;
  font-size: 44px;
  font-variant-numeric: tabular-nums;
  color: var(--brand-ink);
}
.tc-total .tc-num { color: var(--ink); font-size: 54px; }
.tc-unit { font-size: 15px; color: var(--ink-muted); }
.tc-total .tc-unit { font-size: 17px; }
/* 標題列內的「60 樹種」小數字（同樣有 count-up） */
.tc-total .tc-tile-head .tc-head-num { font-size: 13px; line-height: 1; color: inherit; }
.tc-cap { margin: 0; font-size: 12px; color: var(--ink-muted); }
.tc-bar { height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 16%, var(--bg-card)); overflow: hidden; }
.tc-bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 999px; }

.whatsnew { padding: 40px 0 8px; }
.whatsnew .section-label { margin: 0 0 8px; }
.wn-head {
  margin: 0 0 16px;
  font-family: var(--font-cjk);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.4vw, 28px);
  line-height: 1.12;
  letter-spacing: -.6px;
  color: var(--ink-second);
}
.wn-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.wn-slider::-webkit-scrollbar { display: none; }
.wn-card {
  scroll-snap-align: start;
  flex: 0 0 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px 24px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.wn-card-top { display: flex; align-items: center; gap: 8px; }
.wn-ver { font-family: var(--font-latin); font-weight: 700; font-size: 22px; letter-spacing: -.5px; color: var(--ink); }
.wn-latest {
  font-family: var(--font-cjk); font-weight: 700; font-size: 11px;
  padding: 3px 10px; border-radius: 999px;
  /* 直接對主題 --brand 做 color-mix（--brand-soft 在 :root 被綠色定死） */
  background: color-mix(in srgb, var(--brand) 16%, var(--bg-card));
  color: var(--brand-ink);
}
.wn-date { margin-left: auto; font-family: var(--font-latin); font-weight: 500; font-size: 13px; color: var(--ink-faint); }
.wn-divider { height: 1px; background: var(--border); }
.wn-notes { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wn-notes li { position: relative; padding-left: 15px; font-size: 13px; line-height: 1.55; color: var(--ink-muted); }
.wn-notes li::before { content: "·"; position: absolute; left: 3px; top: -.05em; font-weight: 700; color: var(--ink-faint); }
.wn-tag { margin-right: 5px; font-family: var(--font-cjk); font-weight: 500; color: var(--ink-muted); }
.wn-card.more {
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-subtle);
  border-color: transparent;
  text-align: center;
  color: inherit;
}
.wn-card.more:hover { background: var(--border); }
.wn-more-arrow { font-family: var(--font-latin); font-weight: 700; font-size: 28px; color: var(--ink-muted); }
.wn-more-text { font-family: var(--font-cjk); font-weight: 700; font-size: 15px; color: var(--ink-second); }
.wn-foot { display: flex; align-items: center; gap: 8px; padding-top: 8px; }
.wn-dots { display: flex; gap: 6px; }
.wn-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--border); }
.wn-dots i.active { width: 18px; background: var(--ink); }
.wn-hint { margin-left: auto; font-family: var(--font-cjk); font-weight: 500; font-size: 12px; color: var(--ink-faint); }

/* ---------- 方案比較表（PLANS） ---------- */
.plans { padding: 32px 0 8px; }
.plans .section-label { margin: 0 0 8px; }
.plans-head {
  margin: 0 0 12px;
  font-family: var(--font-cjk);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.4vw, 28px);
  line-height: 1.12;
  letter-spacing: -.6px;
  color: var(--ink-second);
}
.plans-sub { margin: 0 0 16px; max-width: 760px; font-size: 15px; line-height: 1.6; color: var(--ink-muted); }
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; border: 1px solid var(--border); }
.compare {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: var(--bg-card);
  font-family: var(--font-cjk);
}
.compare th, .compare td {
  padding: 15px 20px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: none; }
.compare thead th { font-weight: 700; color: var(--ink); }
.compare .c-feat { text-align: left; width: auto; color: var(--ink-muted); font-weight: 700; }
.compare .c-free { width: 200px; font-size: 16px; }
.compare .c-pro  { width: 220px; }
.compare tbody th[scope="row"] {
  text-align: left; font-weight: 500; font-size: 14px; color: var(--ink);
}
.compare thead .c-pro { color: var(--brand-ink); font-size: 16px; }
.compare .pro { background: color-mix(in srgb, var(--brand) 8%, var(--bg-card)); }
.c-badge {
  display: inline-block; margin-left: 6px; vertical-align: middle;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--brand); color: var(--brand-fg);
}
.compare .chk { color: var(--brand); font-weight: 700; }
.compare .chk-free { color: var(--ink-faint); font-weight: 700; }
.compare .diff-free { color: var(--ink-muted); }
.compare .diff-pro { color: var(--brand-ink); font-weight: 700; }
.compare .row-price th,
.compare .row-price td { font-weight: 700; }
.compare .row-price .diff-free,
.compare .row-price td:not(.pro) { color: var(--ink); }
.plans-note { margin: 18px 0 0; text-align: center; font-size: 14px; line-height: 1.6; color: var(--ink-muted); }
.compare .row-price .price-alt { display: block; margin-top: 3px; font-weight: 500; font-size: 12px; color: var(--ink-muted); }

/* 版本更新 / 方案表 —— 手機版 */
@media (max-width: 680px) {
  .whatsnew { padding: 28px 0 8px; }
  .wn-card { flex-basis: 284px; padding: 18px 20px 20px; }
  .wn-hint { display: none; }
  .compare { min-width: 0; }
  .compare th, .compare td { padding: 13px 10px; font-size: 13px; }
  .compare th:first-child, .compare td:first-child { padding-left: 14px; }
  .compare .c-free, .compare .c-pro { width: 78px; }
  .compare .c-free { font-size: 14px; }
  .compare thead .c-pro { font-size: 14px; }
  .compare tbody th[scope="row"] { font-size: 13px; }
  .c-badge { display: block; margin: 4px auto 0; width: max-content; }
}

/* ---------- 頁尾 ---------- */
.site-footer {
  background: var(--surface-dark);
  padding: 48px 0 40px;
  margin-top: 8px;
}
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-wordmark {
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -.8px;
  color: var(--ink-inverse);
}
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
  margin: 0;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--ink-faint);
}
.footer-col a {
  font-family: var(--font-cjk);
  font-size: 14px;
  color: var(--ink-inverse);
}
.footer-col a:hover { color: var(--ink-inverse2); text-decoration: underline; }
.footer-bottom {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-strong);
  font-weight: 500;
  font-size: 12px;
  text-align: center;
}
.footer-bottom .copy { color: var(--ink-inverse2); letter-spacing: .3px; }

/* ---------- 法律頁（沿用舊結構，套新色票） ---------- */
.legal { max-width: calc(800px + 2 * var(--pad)); margin: 0 auto; padding-top: 40px; padding-bottom: 60px; }
.legal-app { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 14px; }
.legal-app-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; box-shadow: var(--shadow); display: block; }
.legal-app-name { font-family: var(--font-cjk); font-weight: 900; font-size: 1.35rem; letter-spacing: -.2px; color: var(--ink-second); }
.legal h1 { font-size: 1.8rem; margin: 0 0 6px; text-align: center; color: var(--ink-second); }
.legal .meta { color: var(--ink-faint); font-size: .9rem; margin-bottom: 30px; text-align: center; }
.legal h2 { font-size: 1.2rem; margin: 34px 0 10px; color: var(--ink-second); }
.legal h3 { font-size: 1.02rem; margin: 22px 0 8px; color: var(--ink-second); }
.legal p, .legal li { color: var(--ink-muted); }
.legal .hl { color: var(--hl); }
.legal .callout p { margin: 0; color: var(--hl); }
.legal .callout p + p { margin-top: 10px; }
.legal .path {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 10px;
  font-size: .9em;
  color: var(--ink-second);
  white-space: nowrap;
}
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal .callout {
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 14px 18px; margin: 20px 0; font-size: .92rem;
}
.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
  padding: 40px;
  margin-top: 8px;
}
.legal-card > :first-child { margin-top: 0; }
.legal-card > h2:first-child { margin-top: 0; }

/* ---------- 響應式 ---------- */
@media (max-width: 1024px) {
  :root { --pad: 32px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .app-hero { flex-direction: column; align-items: stretch; }
  .app-hero-media { width: 100%; }
  .app-hero-media img { max-width: 480px; margin: 0 auto; }
  .feature-card,
  .feature-card:nth-child(even) { flex-direction: column; align-items: flex-start; gap: 24px; }
  .feature-media { width: 100%; height: 300px; }
  .feature-media--shot { height: 340px; }
  .media-screen { flex-direction: row; }
}

@media (max-width: 680px) {
  :root { --pad: 20px; }
  .cards { grid-template-columns: 1fr; gap: 50px; }
  #about p:not(.section-label) { text-align: left; }
  .hero { padding: 44px 0 40px; }
  .footer-top { flex-direction: column; gap: 28px; }
  .footer-cols { gap: 32px; }
  .feature-card { padding: 26px 22px; }
  /* 手機版首圖滿版：抵銷容器左右內距，去除圓角與外框 */
  .app-hero-media {
    width: auto;
    margin-left: calc(-1 * var(--pad));
    margin-right: calc(-1 * var(--pad));
    border: none;
    border-radius: 0;
  }
  .app-hero-media img { max-width: none; margin: 0; }
  .legal-card { padding: 24px 20px; }
  /* 跑馬燈：手機版縮小字級與內距，比照 Figma Mobile · TreWay */
  .tw-marquee-sec { padding: 20px 0 0; }
  .tw-marquee { gap: 10px; padding: 9px 12px; border-radius: 12px; }
  .tw-marquee-tag { font-size: 11px; padding: 4px 9px; }
  .tw-marquee-item { font-size: 13px; padding-right: 44px; }
  .tw-marquee.is-scrolling .tw-marquee-vp {
    -webkit-mask: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    mask: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  }
  /* 樹木統計：手機版總數滿寬、兩縣市各半 */
  .tc-tile { flex-basis: calc(50% - 8px); min-width: 0; padding: 18px 18px; }
  .tc-total { flex-basis: 100%; }
  .tc-num { font-size: 38px; }
  .tc-total .tc-num { font-size: 46px; }
  .tc-total .tc-tile-head .tc-head-num { font-size: 13px; }
}

/* 手機版頁首：字標與導覽分行，導覽膠囊可橫向捲動不溢出 */
@media (max-width: 620px) {
  .site-header .nav {
    height: auto;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .nav-pill {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .nav-pill::-webkit-scrollbar { display: none; }
  .nav-pill a { padding: 8px 14px; }

  /* 有漢堡選單的頁面（如 IRA）：改用右上漢堡鈕，隱藏膠囊導覽 */
  .has-menu .nav-pill { display: none; }
  .has-menu .burger { display: inline-flex; }
  .nav-overlay { display: block; }
  .mobile-menu { display: flex; }
}
