:root {
  /* Sand + chestnut brand palette (from SoHa's in-app ThemeTokens) */
  --bg: #F1EBDF;
  --bg2: #E9DFCE;
  --card: #FFFFFF;
  --card2: #F5EFE3;
  --text-primary: #221A13;
  --text-secondary: #7F7365;
  --text-faint: #A69C8E;
  --accent: #7A4331;
  --accent-deep: #5C3125;
  --pos: #3E7C55;
  --on-accent: #FBF6EC;
  --card-fill: rgba(34, 26, 19, 0.03);
  --card-stroke: rgba(34, 26, 19, 0.09);
  --divider: rgba(34, 26, 19, 0.08);
  --divider-strong: rgba(34, 26, 19, 0.14);
}

* { box-sizing: border-box; }

/* Any element with the `hidden` attribute must actually disappear. Without
   this, a class like .btn that sets its own `display` (inline-flex, flex…)
   overrides the browser's built-in `[hidden]{display:none}` rule — author
   CSS always wins over the user-agent stylesheet, regardless of selector
   order or specificity. That silently broke #load-more-btn: JS correctly
   set .hidden = true when there was no next page, but the button stayed
   visible (and clicking it did nothing, since the code correctly no-ops
   with no more pages) — this rule is the fix, and it's !important so it
   wins over any future class that sets display on a hideable element. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Manrope', 'Noto Sans TC', -apple-system, "PingFang TC", system-ui, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }
b, strong { font-weight: 800; }

/* Narrow container — used ONLY by the legal doc pages / reset-password page */
.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Wide container — used by the marketing homepage (nav + every section) */
.wrap-wide {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}
/* 斷點跟下面「手機漢堡選單」那組 900px 對齊——原本這裡是 720px，
   720~900px 之間（例如 iPad 直向 768px）剛好會卡進一個空窗：.nav-tabs
   已經被隱藏了，但這個 padding 修正還沒生效，導致那個寬度區間看起來
   兩邊完全貼齊螢幕邊緣。統一成 900px 之後這個空窗就不存在了。
   直接下 !important、不分頁面不分區塊全部套用——創作者頁那幾個沒有
   id 的 <section> 之前一直沒吃到留白，與其每次多一個新頁面/新區塊
   就要回來這裡補一次選擇器，不如讓這條規則對「所有」.wrap-wide 都是
   最高優先權，之後不管在哪一頁新增什麼區塊都不會再貼邊。 */
@media (max-width: 900px) {
  .wrap-wide,
  .wrap.doc,
  .doc.wrap {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-stroke);
  border-radius: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-deep); text-decoration: none; }
.btn-ghost { border: 1px solid var(--card-stroke); color: var(--text-primary); background: transparent; }
.btn-ghost:hover { border-color: var(--divider-strong); text-decoration: none; }

.bar { background: var(--pos); border-radius: 4px 4px 0 0; opacity: 0.9; }

@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes drawline { from { stroke-dashoffset: 700; } to { stroke-dashoffset: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal].d1.is-visible { transition-delay: 0.06s; }
[data-reveal].d2.is-visible { transition-delay: 0.14s; }
[data-reveal].d3.is-visible { transition-delay: 0.22s; }
[data-reveal].d4.is-visible { transition-delay: 0.30s; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .draw-line, .rise-bar { animation: none !important; }
}

/* ============== NOTICE BANNER ============== */
.notice-bar {
  position: relative;
  background: var(--accent);
  color: var(--on-accent);
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 44px 10px 16px;
}
.notice-bar a { color: var(--on-accent); text-decoration: underline; }
.notice-bar .notice-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--on-accent);
  opacity: 0.75;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
}
.notice-bar .notice-close:hover { opacity: 1; }
.notice-bar[hidden] { display: none; }

/* ============== NAV ============== */
header.site {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0;
  border-bottom: 1px solid var(--divider);
  background: var(--bg);
}
/* Header spans full width edge-to-edge instead of the capped 1180px column
   the rest of the page uses — logo pinned to the left edge, nav + CTA pinned
   to the right edge, no big empty gutter on wide screens. */
header.site .wrap-wide { max-width: none; padding: 0 clamp(20px, 4vw, 56px); }
header.site .nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
header.site.is-scrolled .nav-row {
  background: transparent;
}
header.site.is-scrolled {
  background: rgba(241, 235, 223, 0.9);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.mark {
  width: 32px; height: 32px; border-radius: 9px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--card-stroke);
}
.mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wordmark { font-weight: 900; font-size: 21px; letter-spacing: -0.02em; }

.nav-right { display: flex; align-items: center; gap: 36px; }
.nav-tabs { display: flex; gap: 6px; font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.nav-tabs a {
  color: var(--text-secondary);
  padding: 7px 13px;
  border-radius: 7px;
  border: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.nav-tabs a:hover { color: var(--text-primary); text-decoration: none; background: var(--card-fill); }
.nav-tabs a.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(122,67,49,0.06);
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle-btn {
  background: var(--card-fill);
  border: 0.5px solid var(--card-stroke);
  color: var(--text-secondary);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 8px;
  padding: 9px 11px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.lang-toggle-btn:hover { color: var(--text-primary); border-color: var(--divider-strong); }

@media (max-width: 900px) {
  .nav-tabs { display: none; }
}
@media (max-width: 560px) {
  .btn-ghost.nav-explore { display: none; }
  .nav-right { gap: 10px; }
}

/* 手機漢堡選單——900px 以下 .nav-tabs 直接被隱藏，原本完全沒有替代方案，
   手機使用者找不到「功能/創作者計劃/社群/服務條款/隱私權政策」這幾個連結，
   只能用網址直接打才進得去。這裡補一個漢堡按鈕 + 下拉選單，用 JS
   （main.js）切換 .is-open 顯示/隱藏，跟原本的 .nav-tabs 共用同一組連結。 */
.nav-menu-btn {
  display: none;
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  background: var(--card-fill); border: 0.5px solid var(--card-stroke);
  align-items: center; justify-content: center; cursor: pointer;
  color: var(--text-primary);
}
.nav-menu-btn svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  .nav-menu-btn { display: flex; }
}
.mobile-nav-panel {
  display: none;
  flex-direction: column;
  padding: 6px clamp(20px, 4vw, 56px) 14px;
  border-top: 1px solid var(--divider);
  background: var(--bg);
}
.mobile-nav-panel.is-open { display: flex; }
.mobile-nav-panel a {
  color: var(--text-secondary); font-size: 14.5px; font-weight: 600;
  padding: 13px 2px; border-bottom: 1px solid var(--divider);
}
.mobile-nav-panel a:last-child { border-bottom: none; }
.mobile-nav-panel a.is-active { color: var(--accent); }
@media (min-width: 901px) {
  .mobile-nav-panel { display: none !important; }
}

/* ============== HERO ============== */
/* 深淺順序改成「先深再淺」——Hero 是第一個區塊，所以套深色，
   跟 sticky 的 header（維持淺色 --bg）之間會有一條可見的分界，
   這是刻意的，讓深色從最上面就開始交替，不是從第二區才開始。 */
.hero { padding: 76px 0 0; background: var(--bg2); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding-bottom: 90px;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.hero .badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; color: var(--accent);
  border: 0.5px solid rgba(122,67,49,0.35);
  background: rgba(122,67,49,0.06);
  border-radius: 4px; padding: 4px 8px; margin-bottom: 22px;
}
.hero .badge .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--pos); animation: pulse-dot 2.4s ease-in-out infinite; }
.hero h1 { font-size: 44px; line-height: 1.15; letter-spacing: -0.02em; }
body[data-lang="zh"] .hero h1 { letter-spacing: 0; line-height: 1.3; }
.hero h1 .hl { color: var(--accent); }
.hero-copy p.lead {
  font-size: 15.5px; line-height: 1.8; color: var(--text-secondary);
  margin-top: 22px; max-width: 460px;
}
.hero-ctas { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

/* Stat row — boxed "stat card" treatment instead of bare stacked numbers */
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 44px; max-width: 420px; }
.stat-box {
  background: var(--card); border: 1px solid var(--card-stroke); border-radius: 12px;
  padding: 14px 16px;
}
.stat-row .stat-num { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-row .stat-label { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.stat-row .stat-sub { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9.5px; color: var(--text-faint); margin-top: 5px; letter-spacing: 0.02em; }

/* Hero right side — "how it works" steps card, replaces fabricated stats */
.steps-card { padding: 26px; }
.steps-card .sc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.steps-card .sc-top .note { font-size: 10.5px; color: var(--text-faint); }
.step-row {
  display: flex; gap: 16px; align-items: flex-start; padding: 16px 10px;
  margin: 0 -10px; border-radius: 12px;
  transition: background 0.4s ease;
}
.step-row + .step-row { border-top: 1px solid var(--divider); margin-top: 0; }
.step-row.is-active { background: var(--card2); }
.step-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px;
  background: var(--card2); border: 1px solid var(--card-stroke);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
  transition: background 0.4s ease, color 0.4s ease, transform 0.4s ease;
}
.step-icon svg { width: 17px; height: 17px; }
.step-row.is-active .step-icon { background: var(--accent); color: var(--on-accent); transform: scale(1.06); }
.step-body { flex: 1; }
.step-body .step-tag { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9.5px; color: var(--text-faint); letter-spacing: 0.06em; }
.step-body h4 { font-size: 14px; font-weight: 700; margin: 3px 0 4px; }
.step-body p { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.4s ease, opacity 0.3s ease; }
.step-row.is-active .step-body p { max-height: 80px; opacity: 1; }
.step-progress { height: 2px; background: var(--divider); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.step-progress span { display: block; height: 100%; background: var(--accent); width: 0%; }
.step-row.is-active .step-progress span { animation: stepfill 3.4s linear forwards; }
@keyframes stepfill { from { width: 0%; } to { width: 100%; } }

/* Session overview card (hero right side) */
.session-card { padding: 24px; position: relative; }
.session-card .sc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sc-top .note { font-size: 10.5px; color: var(--text-faint); }
.sc-figures { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.sc-figures .fig-v { font-size: 24px; font-weight: 600; }
.sc-figures .fig-v.pos { color: var(--pos); }
.sc-figures .fig-l { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.session-card svg { display: block; width: 100%; height: auto; margin-top: 18px; overflow: visible; }
.draw-line { fill: none; stroke: var(--pos); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 700; stroke-dashoffset: 700; }
.draw-line.is-visible { animation: drawline 2.2s 0.2s ease-out forwards; }
.sc-notes { border-top: 1px solid var(--divider); margin-top: 18px; padding-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.sc-notes .row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-secondary); gap: 10px; }

/* ============== FEATURES (bento) ============== */
.section-alt { background: var(--bg2); border-top: 1px solid var(--divider); }
.section-pad { padding: 84px 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap;
}
.section-head h2 { font-size: 30px; margin-top: 14px; max-width: 480px; }
.section-head .support-text {
  font-size: 13.5px; line-height: 1.8; color: var(--text-secondary); max-width: 340px;
}

.bento-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-top: 44px; }
@media (max-width: 900px) { .bento-2 { grid-template-columns: 1fr; } }

.bento-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 18px; }
@media (max-width: 520px) { .bento-3 { grid-template-columns: 1fr; } }

.feat-card { padding: 26px; position: relative; transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease, border-color 0.3s ease; }
.feat-card:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -28px rgba(34,26,19,0.4); border-color: var(--divider-strong); }
.feat-card h3 { margin-top: 10px; }
.feat-card p { font-size: 12.5px; line-height: 1.75; color: var(--text-secondary); margin-top: 10px; }
.feat-card.feat-big { padding: 0; overflow: hidden; }
.feat-big .feat-big-head { padding: 30px 30px 0; }
.feat-big .feat-big-head h3 { font-size: 20px; }
.feat-big .feat-big-head p { max-width: 480px; }
.feat-card.feat-team h3 { max-width: 220px; font-size: 17px; }
.feat-card .b-new {
  position: absolute; top: 22px; right: 22px; background: var(--accent); color: var(--on-accent);
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9.5px; letter-spacing: 0.06em;
  padding: 4px 9px; border-radius: 999px; font-weight: 700;
}

/* 「即將推出」——功能還沒上線但先放進行銷頁的卡片用，跟 .b-new（已上線的
   新功能）視覺上要分得出來，用中性色而不是強調色，避免看起來像在講一個
   使用者現在就下載得到的功能。 */
.feat-card .b-soon {
  position: absolute; top: 22px; right: 22px; background: var(--card-stroke); color: var(--text-secondary);
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9.5px; letter-spacing: 0.06em;
  padding: 4px 9px; border-radius: 999px; font-weight: 700;
}

.b-mock { margin: 22px 30px 30px; border-radius: 14px; border: 1px solid var(--card-stroke); overflow: hidden; background: var(--card2); }
.b-mock .chrome { display: flex; align-items: center; gap: 6px; padding: 11px 15px; border-bottom: 1px solid var(--card-stroke); }
.b-mock .chrome span { width: 7px; height: 7px; border-radius: 50%; background: var(--divider-strong); }
.b-mock .chrome .url { margin-left: 8px; font-size: 10px; color: var(--text-faint); }
.b-mock .stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 20px 22px 0; }
@media (max-width: 480px) { .b-mock .stats-row { grid-template-columns: repeat(2, 1fr); } }
.b-mock .stat .v { font-size: 17px; font-weight: 600; }
.b-mock .stat .v.pos { color: var(--pos); }
.b-mock .stat .k { font-size: 10px; color: var(--text-faint); margin-top: 3px; }
.b-mock .chart-wrap { padding: 14px 22px 22px; }
.b-mock .chart-wrap svg { display: block; width: 100%; height: auto; }

/* Team settlement mock UI — a browser-chrome mockup like the analytics card
   above, but showing the invite/roster/split screen instead of numbers.
   Deliberately a different treatment than the hero's steps-card. */
.team-mock { padding: 0; overflow: hidden; }
.team-mock .chrome { display: flex; align-items: center; gap: 6px; padding: 13px 18px; border-bottom: 1px solid var(--card-stroke); }
.team-mock .chrome span { width: 7px; height: 7px; border-radius: 50%; background: var(--divider-strong); }
.team-mock .chrome .url { margin-left: 8px; font-size: 10px; color: var(--text-faint); }
.team-mock-invite {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px dashed var(--divider);
}
.team-mock-invite .invite-code {
  font-size: 13px; font-weight: 700; color: var(--accent);
  background: rgba(122,67,49,0.08); padding: 5px 10px; border-radius: 6px;
}
.team-mock-members { padding: 6px 20px; }
.tm-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--divider); }
.tm-row:last-child { border-bottom: none; }
.tm-avatar { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; }
.tm-name { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-shrink: 0; width: 108px; }
.tm-role { font-size: 9px; font-weight: 500; color: var(--text-faint); border: 1px solid var(--card-stroke); border-radius: 4px; padding: 1px 5px; }
.tm-share { flex: 1; height: 6px; border-radius: 999px; background: var(--divider); overflow: hidden; }
.tm-share span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.tm-pct { font-size: 11.5px; color: var(--text-secondary); width: 34px; text-align: right; flex-shrink: 0; }
.team-mock-footer { padding: 14px 20px 18px; display: flex; gap: 8px; flex-wrap: wrap; }

.mini-bars-wrap { margin-top: 18px; }
.mini-bars { display: flex; align-items: flex-end; gap: 10px; height: 44px; }
.mini-bars .bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; height: 100%; justify-content: flex-end; }
.mini-bars .bar { width: 100%; max-width: 20px; transform: scaleY(0); transform-origin: bottom; transition: transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.mini-bars.is-visible .bar { transform: scaleY(1); }
.mini-bars .bar-col:nth-child(1) .bar { transition-delay: 0s; }
.mini-bars .bar-col:nth-child(2) .bar { transition-delay: .08s; }
.mini-bars .bar-col:nth-child(3) .bar { transition-delay: .16s; }
.mini-bars .bar-col:nth-child(4) .bar { transition-delay: .24s; }
.mini-bars .bar-col:nth-child(5) .bar { transition-delay: .32s; }
.mini-bars .bar-label { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9.5px; color: var(--text-faint); }
.mini-bars-note { font-size: 10.5px; color: var(--text-faint); margin-top: 10px; }

.settle-list { margin-top: 18px; border-top: 1px solid var(--divider); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.settle-list .s-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.settle-list .s-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); flex-shrink: 0; }
.settle-list .s-name { flex: 1; color: var(--text-secondary); }
.settle-list .s-pct { color: var(--text-faint); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; }
.settle-list .s-amt { color: var(--pos); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; font-weight: 700; width: 84px; text-align: right; }

.mini-feed { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 12px; background: var(--card2); border-radius: 10px; }
.mini-feed .av { width: 22px; height: 22px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--card-stroke); flex-shrink: 0; }
.mini-feed .txt { font-size: 11px; color: var(--text-secondary); }
.mini-feed .amt { color: var(--pos); font-weight: 700; }

.mini-pills { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.mini-pills .pill { font-size: 11px; background: var(--card2); border: 0.5px solid var(--card-stroke); padding: 6px 10px; border-radius: 8px; color: var(--text-secondary); }

.foot-note { font-size: 10.5px; color: var(--text-faint); margin-top: 20px; }

/* ============== SOCIAL / TEAM ============== */
.section-cta { font-size: 13px; font-weight: 700; color: var(--accent); border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; white-space: nowrap; }
.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; align-items: stretch; }
@media (max-width: 760px) { .social-grid { grid-template-columns: 1fr 1fr; } }
/* 手機版：不要疊成一直欄（那樣要一直往下滑才看得到第二三張卡片），改成
   橫向滑動、一次看一張、可以左滑看到後面的卡片——比較像社群 App 常見的
   卡片瀏覽手感。scroll-snap-align 讓每次滑動自然停在下一張卡片的起點，
   不會卡在卡片中間。margin 用負值讓卡片可以貼齊螢幕邊緣滑出去，
   padding 再把文字/卡片本身的起始位置拉回跟其他區塊對齊。 */
@media (max-width: 640px) {
  .social-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 20px 6px;
    scrollbar-width: none;
  }
  .social-grid::-webkit-scrollbar { display: none; }
  .social-grid > a {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
}
/* 首頁社群預覽的 3 張卡片高度常常不一樣（純文字貼文 vs 有附盈虧卡的貼文），
   看起來會很不整齊。這裡讓每張卡片撐滿格子的高度、內部改直向 flex，
   engage（愛心/留言數）那排用 margin-top:auto 頂到卡片最下面對齊，
   卡片本身的文字內容維持從上面開始排列，視覺上三張卡片就會一樣高、
   底部對齊。只 scope 在 .social-grid 裡，不影響 /community 動態牆本身。 */
.social-grid > a { height: 100%; }
.social-grid .post-card { display: flex; flex-direction: column; width: 100%; height: 100%; box-sizing: border-box; }
.social-grid .post-card .p-engage { margin-top: auto; padding-top: 12px; }
.post-card {
  padding: 20px; display: block; color: var(--text-primary);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -28px rgba(34,26,19,0.4); border-color: var(--divider-strong); text-decoration: none; }
.post-card .p-top { display: flex; align-items: center; gap: 10px; }
.post-card .av,
.post-card .av-fallback {
  width: 32px; height: 32px; border-radius: 50%; background: var(--card2); border: 1px solid var(--card-stroke);
  flex-shrink: 0; object-fit: cover; display: block;
}
.post-card .av-fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--accent); background: rgba(122,67,49,0.1);
}
.post-card .p-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.post-card .p-meta { font-size: 10.5px; color: var(--text-faint); }
.post-card .p-body { font-size: 13px; line-height: 1.7; color: var(--text-secondary); margin-top: 12px; }
.post-card .p-amt { font-size: 14px; font-weight: 700; color: var(--pos); margin-top: 10px; }
.post-card .p-engage { display: flex; gap: 16px; margin-top: 12px; font-size: 11.5px; color: var(--text-faint); }
/* Post photo — fixed size so the feed doesn't jump around, click to zoom */
.post-card .p-img {
  display: block; width: auto; height: auto;
  max-width: 100%; max-height: 420px; object-fit: contain;
  border-radius: 10px; margin-top: 12px; cursor: zoom-in;
}
/* Session P&L card embedded in a post — matches the app's "attach a
   session" share card (DesignSpec.md §12 PnLShareCard): big profit/loss
   number, color-coded win/lose, hourly rate on the right. */
.post-session-card {
  margin-top: 12px; padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(122,67,49,0.08), rgba(122,67,49,0.02));
  border: 1px solid var(--card-stroke);
}
.post-session-card .psc-cap { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.post-session-card .psc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; }
.post-session-card .psc-amt { font-size: 22px; font-weight: 700; }
.post-session-card .psc-cur { font-size: 11px; font-weight: 600; color: var(--text-faint); margin-left: 3px; }
.post-session-card .psc-hr { font-size: 12.5px; font-weight: 700; flex-shrink: 0; }
.post-session-card .pos { color: var(--pos); }
.post-session-card .neg { color: #B23B3B; }
.post-card .p-role-badge {
  font-size: 9px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px;
}
.p-engage .ico-count { display: inline-flex; align-items: center; gap: 5px; }
.p-engage svg { width: 14px; height: 14px; }

/* Reusable inline-icon sizing */
.icon { width: 16px; height: 16px; display: inline-block; vertical-align: middle; flex-shrink: 0; }

.team-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr; gap: 32px; } }
.team-copy h2 { font-size: 28px; margin-top: 14px; }
.team-copy p { font-size: 14.5px; line-height: 1.85; color: var(--text-secondary); margin-top: 16px; max-width: 420px; }
/* Heading above the team-flow diagram — stacked (eyebrow, h2, one lede
   paragraph), NOT the left/right split .section-head uses for Features.
   That split only reads right when something fills the right column; here
   the flow diagram below is full-width and centered, so a lone paragraph
   floating on the right of the heading looked orphaned. */
.team-section-head { max-width: 640px; }
.team-section-head h2 { font-size: 30px; margin-top: 14px; }
.team-section-head p { font-size: 14.5px; line-height: 1.85; color: var(--text-secondary); margin-top: 14px; }

/* "How team settlement works" — a large horizontal icon-flow diagram
   (node → arrow → node → arrow → node) spanning the section, not a
   numbered list and not a second "steps card" echoing the hero. Each node
   and arrow stages in on its own delay once the row scrolls into view
   (.is-visible added by the shared [data-reveal] IntersectionObserver in
   main.js — see the CSS rule for [data-reveal] near the top of this file). */
.team-flow {
  margin-top: 56px;
  display: flex; align-items: flex-start; gap: 10px;
}
.team-flow-node {
  flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0;
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.team-flow.is-visible .team-flow-node { opacity: 1; transform: translateY(0); }
.team-flow-node:nth-of-type(1) { transition-delay: 0.05s; }
.team-flow-node:nth-of-type(3) { transition-delay: 0.30s; }
.team-flow-node:nth-of-type(5) { transition-delay: 0.55s; }
.team-flow-icon {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.team-flow.is-visible .team-flow-node:nth-of-type(1) .team-flow-icon { transition-delay: 0.15s; }
.team-flow.is-visible .team-flow-node:nth-of-type(3) .team-flow-icon { transition-delay: 0.40s; }
.team-flow.is-visible .team-flow-node:nth-of-type(5) .team-flow-icon { transition-delay: 0.65s; }
.team-flow-node:hover .team-flow-icon { transform: scale(1.08); background: var(--accent); color: var(--on-accent); }
.team-flow-icon svg { width: 32px; height: 32px; }
.team-flow-title { font-size: 16px; font-weight: 800; color: var(--text-primary); margin-top: 18px; }
.team-flow-desc { font-size: 13px; line-height: 1.65; color: var(--text-secondary); margin-top: 6px; max-width: 220px; }
.team-flow-arrow {
  flex: 0 0 auto; color: var(--divider-strong); margin-top: 38px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.4);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.team-flow.is-visible .team-flow-arrow { opacity: 1; transform: scale(1); }
.team-flow.is-visible .team-flow-arrow:nth-of-type(2) { transition-delay: 0.30s; }
.team-flow.is-visible .team-flow-arrow:nth-of-type(4) { transition-delay: 0.55s; }
.team-flow-arrow svg { width: 26px; height: 26px; }
@media (prefers-reduced-motion: reduce) {
  .team-flow-node, .team-flow-arrow { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 760px) {
  .team-flow-icon { width: 60px; height: 60px; }
  .team-flow-icon svg { width: 26px; height: 26px; }
  .team-flow-title { font-size: 14px; }
  .team-flow-desc { font-size: 12px; max-width: 160px; }
}
@media (max-width: 640px) {
  .team-flow { flex-direction: column; align-items: stretch; gap: 22px; margin-top: 40px; }
  .team-flow-node { flex-direction: row; text-align: left; gap: 16px; align-items: center; }
  .team-flow-text { flex: 1; min-width: 0; }
  .team-flow-title { margin-top: 0; }
  .team-flow-desc { margin-top: 3px; max-width: none; }
  .team-flow-arrow { transform: rotate(90deg); margin: 0 0 0 29px; }
  .team-flow.is-visible .team-flow-arrow { transform: rotate(90deg) scale(1); }
}
/* ============== PAIN POINT (click-to-flip cards) ============== */
/* 深淺交錯順序改成「先深再淺」：Hero 深 → 這區淺 → 功能深 → 社群淺 →
   戰隊深 → footer 淺。這一區排在淺色的位置，所以維持用 --bg（淺），
   深色的部分改成套用在 Hero／功能／戰隊上（見下面 .hero、#features、
   #teams、footer.site 的規則）。 */
.pain-section { background: var(--bg); }
/* .section-head 原本的規則是給左右分欄版面用的（h2 有 max-width 但沒有
   置中），這個區塊改成單欄置中版面，h2/p 本身的「框」也要跟著置中，
   不然只有文字在框內置中、框沒有置中，中文因為沒有空白字元換行位置
   剛好還能矇混過去，英文換兩行長度不一樣，框歪掉的問題就整個現形。 */
.pain-section .section-head h2 { margin-left: auto; margin-right: auto; }

.pain-hint {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 32px 0 0; font-size: 12px; color: var(--text-faint);
  font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.02em;
}
.pain-hint svg { width: 13px; height: 13px; }

/* 卡片本身要有 3D 翻面效果，父層要給 perspective，卡片內層
   （.flip-card-inner）才會有立體翻轉的感覺，不是單純平面切換內容。 */
.pain-flip-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 18px; perspective: 1400px;
}
@media (max-width: 900px) { .pain-flip-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .pain-flip-grid { grid-template-columns: 1fr; } }

.flip-card {
  all: unset; /* 這是 <button>，重置瀏覽器預設按鈕樣式，交給下面的規則重新畫 */
  display: block; cursor: pointer; height: 190px;
}
.flip-card-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.flip-card.is-flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 16px; border: 1.5px solid var(--card-stroke);
  padding: 24px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px;
  font-size: 17px; font-weight: 700; line-height: 1.4; text-align: left;
}
.flip-front {
  background: var(--card); color: var(--text-primary);
}
.flip-back {
  background: linear-gradient(180deg, rgba(122,67,49,0.1), rgba(122,67,49,0) 60%), var(--card);
  border: 2px solid var(--accent);
  color: var(--accent-deep);
  font-weight: 800;
  transform: rotateY(180deg);
}
.flip-card:hover .flip-face,
.flip-card:focus-visible .flip-face { border-color: var(--divider-strong); }
.flip-card:hover .flip-back { border-color: var(--accent); }
.flip-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 16px; }
.flip-card:not(.is-flipped) .flip-card-inner:hover { transform: rotateY(-6deg); }

.pain-ico {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}
.pain-x { background: rgba(178,59,59,0.1); color: #B23B3B; }
.pain-check { background: rgba(62,124,85,0.12); color: var(--pos); }

.flip-icon {
  position: absolute; bottom: 14px; right: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--card-fill); border: 0.5px solid var(--card-stroke);
  display: flex; align-items: center; justify-content: center; color: var(--text-faint);
  animation: pain-flip-hint 2.6s ease-in-out infinite;
}
.flip-icon svg { width: 12px; height: 12px; }
@keyframes pain-flip-hint {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(150deg); }
}

/* 進場動畫——四張卡片飄進畫面時，依序接力淡入放大，而不是一次全部
   蹦出來；卡片本身在滑進來之前先做一次很輕微的「晃一下」提示使用者
   這是可以點的（is-visible 之後只播一次，不會一直晃、看起來不會煩）。 */
.pain-flip-grid .flip-card { opacity: 0; transform: translateY(14px) scale(0.97); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16,1,0.3,1); }
.pain-flip-grid.is-visible .flip-card { opacity: 1; transform: translateY(0) scale(1); }
.pain-flip-grid .flip-card:nth-child(1) { transition-delay: 0.05s; }
.pain-flip-grid .flip-card:nth-child(2) { transition-delay: 0.15s; }
.pain-flip-grid .flip-card:nth-child(3) { transition-delay: 0.25s; }
.pain-flip-grid .flip-card:nth-child(4) { transition-delay: 0.35s; }
.pain-flip-grid.is-visible .flip-card:not(.is-flipped) .flip-card-inner { animation: pain-card-nudge 0.7s ease 1s 1; }
@keyframes pain-card-nudge {
  0%, 100% { transform: rotateY(0deg); }
  30% { transform: rotateY(-10deg); }
  60% { transform: rotateY(4deg); }
}
/* 使用者系統設定「減少動態效果」的話，翻卡效果整個關掉，改成兩面
   直接上下堆疊顯示（不再用 3D 翻轉、也不再需要點擊才看得到內容），
   維持功能可用、只是拿掉會讓人不舒服的動畫。 */
@media (prefers-reduced-motion: reduce) {
  .flip-card { height: auto; }
  .pain-flip-grid .flip-card { opacity: 1; transform: none; transition: none; }
  .flip-card-inner, .flip-icon { animation: none !important; transition: none; }
  .flip-card-inner { position: static; transform: none !important; height: auto; }
  .flip-face { position: static; transform: none !important; backface-visibility: visible; }
  .flip-back { border-top: none; margin-top: -1px; border-radius: 0 0 16px 16px; }
  .flip-front { border-radius: 16px 16px 0 0; }
}

.pain-cta { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 44px; flex-wrap: wrap; }

/* Perforation divider */
.perforation { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 40px 0; opacity: 0.5; }
.perforation span { width: 4px; height: 4px; border-radius: 50%; background: var(--divider-strong); }

/* ============== FOOTER ============== */
/* position:relative + z-index:1 是保險——避免上面任何區塊（modal、lightbox
   等）萬一沒有正確收起來，疊在最下面的 footer 上面把它整個蓋住。 */
footer.site { border-top: 1px solid var(--divider); background: var(--bg); position: relative; z-index: 1; }
footer.site .footer-pad { padding: 64px 0 34px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand-blurb { font-size: 12.5px; line-height: 1.8; color: var(--text-secondary); margin-top: 14px; max-width: 230px; }
.footer-col h4 { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; color: var(--text-faint); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 14px; font-weight: 600; }
.footer-col a, .footer-col span.static { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.footer-col a:hover { color: var(--text-primary); text-decoration: none; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--divider);
  font-size: 11.5px; color: var(--text-faint);
}
.footer-bottom .legal-links { display: flex; gap: 18px; }
.footer-bottom .legal-links a { color: var(--text-faint); }
.footer-bottom .legal-links a:hover { color: var(--text-secondary); }

/* ============== MODAL (email capture / app interstitial) ============== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(34,26,19,0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: var(--card); border-radius: 18px; border: 1px solid var(--card-stroke);
  padding: 30px; max-width: 380px; width: 100%; position: relative;
  box-shadow: 0 30px 60px -20px rgba(34,26,19,0.5);
}
.modal-box .modal-close {
  position: absolute; top: 14px; right: 14px; background: var(--card2); border: 1px solid var(--card-stroke);
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.modal-box .modal-close:hover { color: var(--text-primary); }
.modal-box h3 { font-size: 19px; margin-bottom: 8px; }
.modal-box p { font-size: 13px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 18px; }
.modal-box form { display: flex; flex-direction: column; gap: 10px; }
.modal-box input[type="email"], .modal-box input[type="text"], .modal-box textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--card-stroke);
  background: var(--card2); font-size: 13.5px; font-family: inherit; color: var(--text-primary);
}
.modal-box textarea { resize: vertical; min-height: 70px; }
.modal-box .btn { width: 100%; justify-content: center; }
.modal-box .modal-status { font-size: 12px; margin-top: 4px; min-height: 16px; }
.modal-box .modal-status.ok { color: var(--pos); }
.modal-box .modal-status.err { color: #B23B3B; }

/* Post image lightbox — click a post photo to see it full-size */
.lightbox-overlay .lightbox-box { background: transparent; box-shadow: none; width: auto; max-width: 90vw; padding: 0; }
.lightbox-overlay .lightbox-box img { max-width: 90vw; max-height: 85vh; border-radius: 12px; display: block; }
.lightbox-overlay .modal-close { top: -34px; right: 0; color: #fff; font-size: 26px; }
.lightbox-overlay .modal-close:hover { color: #fff; opacity: 0.75; }

/* App-download interstitial shown once, blocking further feed loading until closed */
.app-interstitial .modal-box { text-align: center; max-width: 340px; }
.app-interstitial .app-icon-lg { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 16px; overflow: hidden; border: 1px solid var(--card-stroke); }
.app-interstitial .app-icon-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============== COMMUNITY PAGE ============== */
.community-hero { padding: 56px 0 8px; }
.community-hero .eyebrow { margin-bottom: 14px; }
.community-hero h1 { font-size: 34px; }
.community-hero p { font-size: 14.5px; color: var(--text-secondary); line-height: 1.75; margin-top: 14px; max-width: 460px; }
.login-cta-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--card-stroke); border-radius: 14px;
  padding: 16px 20px; margin: 28px 0 40px;
}
.login-cta-bar p { font-size: 13px; color: var(--text-secondary); }
.feed-note { font-size: 11.5px; color: var(--text-faint); margin: 22px 0 30px; }
.community-feed { display: flex; flex-direction: column; gap: 14px; }
.community-feed .post-card { padding: 22px; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 32px; }

/* ============== POST DETAIL PAGE ============== */
.post-detail-wrap { max-width: 700px; }
.post-detail-card { cursor: default; }
.post-detail-card:hover { transform: none; box-shadow: none; border-color: var(--card-stroke); }
.comment-section { margin-top: 32px; }
.comment-heading { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.comment-heading #comment-count, .comment-heading #comment-count-en { color: var(--text-faint); font-weight: 500; }
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-row { display: flex; gap: 10px; align-items: flex-start; }
.comment-row .av, .comment-row .av-fallback {
  width: 30px; height: 30px; border-radius: 50%; background: var(--card2); border: 1px solid var(--card-stroke);
  flex-shrink: 0; object-fit: cover; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--accent);
}
.comment-body { flex: 1; background: var(--card); border: 1px solid var(--card-stroke); border-radius: 12px; padding: 10px 13px; }
.comment-top { display: flex; align-items: baseline; gap: 8px; }
.comment-name { font-size: 12.5px; font-weight: 700; }
.comment-time { font-size: 10px; color: var(--text-faint); }
.comment-text { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); margin-top: 3px; }

/* ============== INLINE FORM CARD (creator application etc.) ============== */
.form-card { padding: 30px; max-width: 440px; }
.form-card h3 { font-size: 18px; margin-bottom: 6px; }
.form-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 18px; }
.form-card form { display: flex; flex-direction: column; gap: 12px; }
.form-card label { font-size: 12px; color: var(--text-secondary); margin-bottom: -6px; }
.form-card input[type="email"], .form-card input[type="text"], .form-card textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--card-stroke);
  background: var(--card2); font-size: 13.5px; font-family: inherit; color: var(--text-primary);
}
.form-card textarea { resize: vertical; min-height: 80px; }
.form-card .modal-status { font-size: 12px; min-height: 16px; }
.form-card .modal-status.ok { color: var(--pos); }
.form-card .modal-status.err { color: #B23B3B; }

/* Legal document pages — wider than the base .wrap (640px) so paragraphs
   of legal text don't feel cramped; .wrap.doc (two classes) outranks the
   plain .wrap rule regardless of source order. */
.wrap.doc { max-width: 760px; }
.doc { padding: 40px 0 80px; }
.doc .back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); margin-bottom: 28px; }
.doc h1 { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.doc .updated { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: var(--text-secondary); margin-bottom: 32px; }
.doc section { margin-bottom: 26px; }
.doc h2 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.doc p { font-size: 13.5px; line-height: 1.8; color: rgba(34,26,19,0.78); margin: 0; }

/* Simple header used by legal / reset pages (narrow .wrap, no nav-row markup) */
header.site .wrap { display: flex; align-items: center; gap: 10px; padding-top: 20px; }
header.site .wrap .lang-toggle-btn { margin-left: auto; }
header.site .wrap .mark { width: 34px; height: 34px; border-radius: 9px; }
header.site .wrap .mark img { width: 30px; height: 30px; }

/* Reset password fallback page */
.center-state { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.center-state .icon { width: 60px; height: 60px; border-radius: 16px; border: 1.5px solid var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.center-state h1 { font-size: 20px; margin: 0 0 10px; }
.center-state p { color: var(--text-secondary); font-size: 13.5px; line-height: 1.7; max-width: 320px; margin: 0; }

/* ==============================================================
   雙語切換——搭配 i18n.js。body[data-lang] 由 JS 在頁面載入時設定，
   這裡只負責依那個值決定顯示中文區塊還是英文區塊。
   ============================================================== */
body[data-lang="zh"] .lang-en { display: none; }
body[data-lang="en"] .lang-zh { display: none; }
body:not([data-lang]) .lang-zh,
body:not([data-lang]) .lang-en { display: none; }

@media (max-width: 900px) {
  .hero h1 { font-size: 34px; }
}

/* 小螢幕卡片 padding 縮小——26px/24px/22px 的內距在 1180px 寬的桌機卡片上
   比例剛好，套到 390px 左右的手機卡片上，扣掉左右 padding 之後留給文字的
   寬度太窄，看起來卡片「留白過多、內容被擠成一小條」。這裡只調整卡片
   本身的內距，不動 .wrap-wide 版面外層的留白。 */
@media (max-width: 480px) {
  .feat-card { padding: 18px; }
  .feat-big .feat-big-head { padding: 20px 18px 0; }
  .b-mock { margin: 18px 18px 18px; }
  .steps-card { padding: 18px; }
  .session-card { padding: 18px; }
  .post-card { padding: 16px; }
  .community-feed .post-card { padding: 18px; }
  .form-card { padding: 22px; }
}

/* ==============================================================
   Cookie 同意橫幅 + AdSense——由 /consent.js 動態插入（每頁 <head> 載入）。
   2026/09/30 重做：舊版（.cookie-banner）手機上變成直向堆疊、icon 佔一整排、
   內距 18/20px，看起來又高又空。新版手機是貼底的精簡卡片：一段文字 + 一排
   三顆按鈕；桌機是左下角浮動小卡。按「設定」才展開個人化廣告開關。
   ============================================================== */
.soha-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90; /* 低於 .modal-overlay(100)，下載提醒跳出來時會蓋在上面 */
  padding: 0 8px calc(8px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}
.soha-consent.is-open { opacity: 1; transform: none; }
.soha-consent .sc-card {
  pointer-events: auto;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px;
  background: var(--card);
  color: var(--text-primary);
  border: 1px solid var(--card-stroke);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(34, 26, 19, 0.16);
}
.soha-consent .sc-text { margin: 0 0 10px; font-size: 13px; line-height: 1.5; }
.soha-consent .sc-text a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.soha-consent .sc-actions { display: flex; gap: 6px; }
.soha-consent .sc-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.soha-consent .sc-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--card-stroke); }
.soha-consent .sc-ghost:hover { border-color: var(--divider-strong); }
.soha-consent .sc-primary { flex-grow: 1.4; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.soha-consent .sc-primary:hover { background: var(--accent-deep); }
.soha-consent .sc-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.soha-consent .sc-prefs { margin: 0 0 10px; border-top: 1px solid var(--divider); }
.soha-consent .sc-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
}
.soha-consent .sc-row-locked { cursor: default; opacity: .65; }
.soha-consent .sc-row-text { flex: 1; min-width: 0; }
.soha-consent .sc-row-text strong { display: block; font-size: 13px; }
.soha-consent .sc-row-text small { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.soha-consent .sc-row input { position: absolute; opacity: 0; pointer-events: none; }
.soha-consent .sc-switch {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--divider-strong);
  transition: background .15s ease;
}
.soha-consent .sc-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .15s ease;
}
.soha-consent input:checked + .sc-switch { background: var(--accent); }
.soha-consent input:checked + .sc-switch::after { transform: translateX(16px); }
.soha-consent input:focus-visible + .sc-switch { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 超窄螢幕（≤360px，例如 iPhone SE 一代）：主按鈕獨立一排 */
@media (max-width: 360px) {
  .soha-consent .sc-actions { flex-wrap: wrap; }
  .soha-consent .sc-primary { flex-basis: 100%; order: -1; }
}
/* 桌機：左下角浮動小卡，不擋內容 */
@media (min-width: 720px) {
  .soha-consent { left: 20px; right: auto; bottom: 20px; width: 400px; padding: 0; }
  .soha-consent .sc-card { padding: 16px; }
  .soha-consent .sc-text { font-size: 13.5px; margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .soha-consent { transition: none; }
}

/* Cookie 政策頁的項目卡片 + 「Cookie 設定」按鈕 */
.ck-list { display: grid; gap: 10px; margin: 12px 0 14px; }
.ck-item { background: var(--card); border: 1px solid var(--card-stroke); border-radius: 12px; padding: 12px 14px; }
.ck-item h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.doc .ck-item p { font-size: 13px; line-height: 1.7; }
.ck-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  vertical-align: 2px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--card-fill);
  color: var(--text-secondary);
}
.ck-tag.opt { background: rgba(122, 67, 49, 0.1); color: var(--accent); }
.cookies-doc p + p { margin-top: 10px; }

/* =====================================================================
   指南文章 / 工具 / 關於頁（2026/10/11 新增）
   這些頁面由 build.py 用 content/_layout.html + content/ 底下的內容片段
   產生。法律頁用的 .doc 字級是 13.5px，拿來讀長文章太小，所以另外開一組
   .article 樣式，不動原本的 .doc。
   ===================================================================== */
.wrap.article { max-width: 760px; padding-top: 36px; padding-bottom: 72px; }
@media (max-width: 900px) {
  .wrap.article { padding-left: 20px !important; padding-right: 20px !important; }
}
.crumbs { font-size: 12.5px; color: var(--text-faint); margin-bottom: 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--text-secondary); }
.crumbs .sep { color: var(--text-faint); }
.article h1 { font-size: 34px; line-height: 1.25; margin: 12px 0 12px; letter-spacing: -0.015em; }
body[data-lang="zh"] .article h1 { letter-spacing: 0; line-height: 1.4; }
.article .meta { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; color: var(--text-secondary); margin-bottom: 22px; }
.article .article-lead { font-size: 18px; line-height: 1.75; color: var(--text-secondary); margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--divider); }
.article-body h2 { font-size: 23px; line-height: 1.4; margin: 40px 0 14px; }
.article-body h3 { font-size: 17.5px; line-height: 1.5; margin: 28px 0 10px; font-weight: 700; }
.article-body p { font-size: 16.5px; line-height: 1.9; color: rgba(34, 26, 19, 0.86); margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 24px; }
.article-body li { font-size: 16.5px; line-height: 1.85; color: rgba(34, 26, 19, 0.86); margin-bottom: 8px; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }
.article-body .formula {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14.5px; line-height: 1.7;
  background: var(--card); border: 1px solid var(--card-stroke); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 14px 18px; margin: 0 0 20px; overflow-x: auto; color: var(--text-primary);
}
.article-body .note {
  background: var(--card2); border: 1px solid var(--card-stroke); border-radius: 12px;
  padding: 16px 18px; margin: 0 0 22px; font-size: 15px; line-height: 1.8; color: var(--text-secondary);
}
.article-body .note strong { color: var(--text-primary); }
.table-scroll { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--card-stroke); border-radius: 12px; background: var(--card); }
.article-body table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.article-body th, .article-body td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--divider); line-height: 1.6; vertical-align: top; }
.article-body th { font-size: 12px; font-weight: 700; color: var(--text-secondary); background: var(--card2); white-space: nowrap; }
.article-body tr:last-child td { border-bottom: none; }
.article-body td.num, .article-body th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.article-body dl { margin: 0 0 22px; }
.article-body dt { font-size: 16.5px; font-weight: 800; margin-top: 18px; }
.article-body dd { margin: 4px 0 0; font-size: 16px; line-height: 1.85; color: rgba(34, 26, 19, 0.82); }

.article-cta {
  margin: 44px 0 0; padding: 24px; border-radius: 16px; background: var(--card);
  border: 1px solid var(--card-stroke); display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.article-cta h3 { font-size: 18px; margin-bottom: 6px; }
.article-cta p { font-size: 14.5px; line-height: 1.7; color: var(--text-secondary); max-width: 440px; }
.related { margin-top: 44px; }
.related h2 { font-size: 13px; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
.article-disclaimer { margin-top: 36px; font-size: 12.5px; line-height: 1.8; color: var(--text-faint); }

/* 指南 / 工具的卡片列表——索引頁跟首頁共用 */
.hub-hero { padding: 52px 0 8px; }
.hub-hero h1 { font-size: 38px; line-height: 1.25; margin: 14px 0 14px; max-width: 720px; }
body[data-lang="zh"] .hub-hero h1 { line-height: 1.4; letter-spacing: 0; }
.hub-hero p { font-size: 17px; line-height: 1.8; color: var(--text-secondary); max-width: 660px; }
.hub-section { padding: 36px 0 20px; }
.hub-section:last-of-type { padding-bottom: 84px; }
.hub-section > h2 { font-size: 22px; margin-bottom: 18px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 980px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .guide-grid { grid-template-columns: 1fr; } }
.guide-card {
  display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--card-stroke); color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.guide-card:hover { text-decoration: none; border-color: var(--divider-strong); transform: translateY(-2px); }
.guide-card .tag { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.guide-card h3 { font-size: 17.5px; line-height: 1.45; font-weight: 800; }
.guide-card p { font-size: 14px; line-height: 1.75; color: var(--text-secondary); }
.guide-card .more { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 700; color: var(--accent); }
.related .guide-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .related .guide-grid { grid-template-columns: 1fr; } }
.related .guide-card { padding: 18px; }
.related .guide-card h3 { font-size: 15.5px; }

/* 計算工具 */
.calc { background: var(--card); border: 1px solid var(--card-stroke); border-radius: 16px; padding: 24px; margin: 0 0 30px; }
.calc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 620px) { .calc-grid { grid-template-columns: 1fr; } }
.calc label { display: block; font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.calc .hint { display: block; font-size: 12px; font-weight: 500; color: var(--text-faint); margin-top: 5px; line-height: 1.5; }
.calc input, .calc select {
  width: 100%; padding: 12px 14px; font-size: 16px; font-family: inherit; font-weight: 600; color: var(--text-primary);
  background: var(--bg); border: 1px solid var(--card-stroke); border-radius: 10px; -webkit-appearance: none; appearance: none;
}
.calc input:focus, .calc select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--divider); }
@media (max-width: 620px) { .calc-results { grid-template-columns: repeat(2, 1fr); } }
.calc-stat { background: var(--card2); border-radius: 12px; padding: 14px; }
.calc-stat .k { font-size: 11.5px; color: var(--text-secondary); font-weight: 600; margin-bottom: 6px; }
.calc-stat .v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; word-break: break-word; }
.calc-stat .v.pos { color: var(--pos); }
.calc-stat .v.neg { color: #A8452F; }
.calc-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.calc-row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 10px; align-items: center; }
.calc-row button, .calc-add {
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 10px;
  border: 1px solid var(--card-stroke); background: transparent; color: var(--text-secondary); padding: 11px 14px;
}
.calc-add { margin-top: 12px; color: var(--accent); }
.calc-row button:hover, .calc-add:hover { border-color: var(--divider-strong); }
.calc-msg { margin-top: 14px; font-size: 13.5px; color: #A8452F; font-weight: 600; }
.calc .table-scroll { margin: 20px 0 0; background: var(--bg); }
.calc table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.calc th, .calc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--divider); }
.calc th { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.calc tr:last-child td { border-bottom: none; }
.calc td.num, .calc th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc tr.is-mark td { background: rgba(122, 67, 49, 0.08); font-weight: 700; }

/* 首頁的指南區塊 */
.home-guides-links { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.home-guides-links a {
  font-size: 13px; font-weight: 700; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--card-stroke); color: var(--text-primary); background: var(--card);
}
.home-guides-links a:hover { text-decoration: none; border-color: var(--divider-strong); }
.article-body code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; background: var(--card2); border: 1px solid var(--card-stroke); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.article-body td code { white-space: normal; word-break: break-all; }
.calc > label { margin-bottom: 8px; }
.community-intro { font-size: 15.5px; line-height: 1.8; color: var(--text-secondary); max-width: 640px; margin-top: 14px; }
.community-intro a { text-decoration: underline; text-underline-offset: 3px; }
#guides .guide-grid { margin-top: 36px; }
#guides .section-head .support-text { max-width: 460px; margin-top: 12px; }
