/* ===========================================================================
   NPC RENT — 設計基礎
   淺色紙感底、深靛藍主色、全圓角。任何方塊都不得出現直角。
   =========================================================================== */

:root {
  /* 色票 */
  --paper: #fafaf7;
  --paper-2: #f3f3ed;
  --surface: #ffffff;
  --ink: #17203a;
  --ink-2: #39415c;
  --muted: #6a7086;
  --faint: #9aa0b0;
  --line: #e7e6df;
  --line-2: #d9d8cf;
  --sage: #6e8b74;
  --sage-soft: #e4ede6;
  --clay: #c08b5c;
  --clay-soft: #f5e9dc;
  --alert: #b4524a;
  --alert-soft: #f8e6e4;

  /* 圓角 —— 全站唯一來源 */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 36px;
  --r-pill: 999px;

  /* 陰影：極淡，不搶戲 */
  --sh-1: 0 1px 2px rgba(23, 32, 58, .04), 0 4px 16px rgba(23, 32, 58, .04);
  --sh-2: 0 2px 6px rgba(23, 32, 58, .06), 0 12px 32px rgba(23, 32, 58, .07);
  --sh-3: 0 8px 24px rgba(23, 32, 58, .10), 0 32px 64px rgba(23, 32, 58, .10);

  --nav-h: 68px;
  --wrap: 1160px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans TC', 'Inter', -apple-system, BlinkMacSystemFont,
               'Segoe UI', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

body.lang-en { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* 紙感細紋 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image: radial-gradient(rgba(23, 32, 58, .028) 1px, transparent 1px);
  background-size: 22px 22px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; position: relative; z-index: 1; }

/* ─── 導覽列 ─────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(250, 250, 247, .82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav__inner { display: flex; align-items: center; gap: 20px; width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.02em; font-size: 18px; white-space: nowrap; flex: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand__sub { font-size: 11px; font-weight: 600; color: var(--sage); letter-spacing: .14em; text-transform: uppercase; padding: 3px 9px; background: var(--sage-soft); border-radius: var(--r-pill); }

.nav__links { display: flex; gap: 2px; margin-left: auto; align-items: center; min-width: 0; }
.nav__link {
  padding: 9px 13px;
  white-space: nowrap;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav__link:hover { background: var(--paper-2); color: var(--ink); }
.nav__link.is-active { background: var(--ink); color: #fff; }

.nav__tools { display: flex; align-items: center; gap: 8px; flex: none; margin-left: 8px; }

.nav .nav-toggle { display: none; }

/* 語言切換 */
.langswitch {
  display: inline-flex;
  padding: 3px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.langswitch button {
  border: 0;
  background: transparent;
  padding: 5px 13px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.langswitch button.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

/* ─── 按鈕 ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .18s var(--ease),
              background .18s var(--ease), border-color .18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn--primary { background: var(--ink); color: #fff; box-shadow: var(--sh-1); }
.btn--primary:hover:not(:disabled) { box-shadow: var(--sh-2); background: #1f2a4a; }

.btn--sage { background: var(--sage); color: #fff; }
.btn--sage:hover:not(:disabled) { background: #5f7b65; }

.btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover:not(:disabled) { border-color: var(--ink); background: var(--paper-2); }

.btn--quiet { background: transparent; color: var(--muted); padding-inline: 14px; }
.btn--quiet:hover:not(:disabled) { background: var(--paper-2); color: var(--ink); }

.btn--danger { background: var(--alert-soft); color: var(--alert); border-color: #eccfcc; }
.btn--danger:hover:not(:disabled) { background: #f2d9d6; }

.btn--sm { padding: 7px 15px; font-size: 13.5px; }
.btn--lg { padding: 14px 30px; font-size: 16px; }
.btn--block { width: 100%; }
.btn svg { width: 17px; height: 17px; flex: none; }

/* ─── 表面 ───────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--sh-1);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--sh-1);
}

.soft {
  background: var(--paper-2);
  border-radius: var(--r-md);
  padding: 18px 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--paper-2);
  color: var(--muted);
  border: 1px solid var(--line);
}
.tag--sage { background: var(--sage-soft); color: #4d6b54; border-color: #cfe0d3; }
.tag--clay { background: var(--clay-soft); color: #96653a; border-color: #ecd9c4; }
.tag--ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag--alert { background: var(--alert-soft); color: var(--alert); border-color: #eccfcc; }

/* ─── 首頁英雄區 ─────────────────────────────────────────────────────── */

.hero { padding: 64px 0 52px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 40px; align-items: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 16px 6px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  box-shadow: var(--sh-1);
  margin-bottom: 24px;
}
.eyebrow b { background: var(--ink); color: #fff; padding: 3px 11px; border-radius: var(--r-pill); font-size: 11.5px; letter-spacing: .08em; }

.hero h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1.12; letter-spacing: -.035em; }
.hero h1 .accent { color: var(--sage); }
.hero__lead { margin-top: 22px; font-size: 17.5px; color: var(--ink-2); max-width: 30em; line-height: 1.75; }
.hero__cta { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero__art { border-radius: var(--r-xl); overflow: hidden; }
.hero__art img { width: 100%; height: auto; }

.hero__stats { display: flex; gap: 34px; margin-top: 42px; flex-wrap: wrap; }
.stat__n { font-size: 27px; font-weight: 700; letter-spacing: -.02em; }
.stat__l { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ─── 區塊標題 ───────────────────────────────────────────────────────── */

.section { padding: 60px 0; }
.section__head { max-width: 40em; margin-bottom: 38px; }
.section__kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sage); margin-bottom: 12px; }
.section__head h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.025em; }
.section__head p { margin-top: 14px; color: var(--ink-2); font-size: 16.5px; }

/* ─── 運作流程 ───────────────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.step:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.step img { width: 86px; height: 86px; border-radius: var(--r-md); margin-bottom: 14px; }
.step__n { position: absolute; top: 20px; right: 22px; font-size: 13px; font-weight: 700; color: var(--faint); letter-spacing: .1em; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--muted); line-height: 1.65; }

/* 雙欄說明（派任務 / 接任務） */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.duo__col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px; }
.duo__col--alt { background: linear-gradient(170deg, var(--sage-soft), var(--paper-2)); border-color: #d6e3d9; }
.duo__col h3 { font-size: 20px; margin-bottom: 8px; }
.duo__col > p { color: var(--ink-2); font-size: 15px; }
.checklist { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 11px; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.checklist svg { width: 19px; height: 19px; flex: none; margin-top: 3px; color: var(--sage); }

/* ─── 任務卡片 ───────────────────────────────────────────────────────── */

.taskgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }

.taskcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.taskcard:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.taskcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.taskcard__code { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--faint); font-variant-numeric: tabular-nums; }
.taskcard h3 { font-size: 17.5px; line-height: 1.4; }
.taskcard__sum { font-size: 14.5px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.taskcard__meta { display: flex; flex-wrap: wrap; gap: 7px; }
.taskcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 15px; border-top: 1px dashed var(--line); }
.reward { font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.reward span { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-left: 4px; }

.metaline { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); }
.metaline svg { width: 16px; height: 16px; flex: none; color: var(--faint); }

/* ─── 篩選列 ─────────────────────────────────────────────────────────── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 14px 18px;
  box-shadow: var(--sh-1);
}
.chiprow { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 7px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ─── 表單 ───────────────────────────────────────────────────────────── */

/* **`[hidden]` 必須贏過所有作者樣式。** `.field` 是 `display:grid`、`.note` 是
   `display:flex`，兩者的優先序都高於瀏覽器內建的 `[hidden] { display: none }`，
   於是 `el.hidden = true` 完全沒有效果——元素照樣顯示。
   這個專案踩過兩次（`.chat__file` 把隱藏的檔案輸入框露出來、
   發案表單的付款說明欄藏不掉），所以在這裡一次擋掉。 */
[hidden] { display: none !important; }

.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field > label { font-size: 14px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.field .req { color: var(--clay); font-size: 12px; }
.field .hint { font-size: 12.8px; color: var(--faint); line-height: 1.55; }

.input, .select, textarea.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  font-size: 15px;
  transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
  outline: none;
}
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(23, 32, 58, .07);
}
textarea.input { resize: vertical; min-height: 120px; line-height: 1.7; border-radius: var(--r-md); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a7086' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9.5l6 5.5 6-5.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; background-size: 17px; padding-right: 42px; }

.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }

.radioset { display: flex; gap: 10px; flex-wrap: wrap; }
.radiopill { position: relative; }
.radiopill input { position: absolute; opacity: 0; pointer-events: none; }
.radiopill span {
  display: block;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--paper);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .16s var(--ease);
}
.radiopill input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ─── 提示訊息 ───────────────────────────────────────────────────────── */

.note {
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.65;
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.note svg { width: 19px; height: 19px; flex: none; margin-top: 2px; }
.note--info { background: var(--paper-2); color: var(--ink-2); }
.note--sage { background: var(--sage-soft); color: #43614a; }
.note--clay { background: var(--clay-soft); color: #8a5c31; }
.note--alert { background: var(--alert-soft); color: var(--alert); }

/* ─── 彈窗 ───────────────────────────────────────────────────────────── */

.modal-veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(23, 32, 58, .38);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
  overflow-y: auto;
}
.modal-veil.is-open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  width: min(520px, 100%);
  padding: 34px;
  box-shadow: var(--sh-3);
  transform: translateY(14px) scale(.985);
  transition: transform .24s var(--ease);
  margin: auto;
}
.modal-veil.is-open .modal { transform: none; }
.modal--wide { width: min(820px, 100%); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.modal__head h3 { font-size: 22px; letter-spacing: -.02em; }
.modal__head p { font-size: 14px; color: var(--muted); margin-top: 6px; }
.iconbtn {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--paper);
  display: grid; place-items: center;
  cursor: pointer; flex: none;
  transition: all .16s var(--ease);
}
.iconbtn:hover { background: var(--paper-2); border-color: var(--line-2); }
.iconbtn svg { width: 17px; height: 17px; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: var(--r-pill); margin-bottom: 24px; }
.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.tabs button.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

/* ─── 吐司 ───────────────────────────────────────────────────────────── */

.toaster { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; }
.toast {
  background: var(--ink);
  color: #fff;
  padding: 13px 20px;
  border-radius: var(--r-md);
  font-size: 14.5px;
  box-shadow: var(--sh-3);
  max-width: 380px;
  animation: toast-in .26s var(--ease);
}
.toast--bad { background: var(--alert); }
.toast--good { background: var(--sage); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ─── 表格 ───────────────────────────────────────────────────────────── */

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  padding: 13px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
  background: var(--paper-2);
  white-space: nowrap;
}
th:first-child { border-top-left-radius: var(--r-lg); }
th:last-child { border-top-right-radius: var(--r-lg); }
td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: var(--paper); }

/* ─── 文件頁 ─────────────────────────────────────────────────────────── */

.doclayout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 42px; align-items: start; }
.docnav { position: sticky; top: calc(var(--nav-h) + 22px); display: grid; gap: 3px; }
.docnav a {
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--muted);
  transition: all .16s var(--ease);
}
.docnav a:hover { background: var(--paper-2); color: var(--ink); }
.docnav a.is-on { background: var(--ink); color: #fff; }
.docnav .docnav__group { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 16px 14px 6px; }

.prose h2 { font-size: 28px; margin: 48px 0 14px; letter-spacing: -.02em; scroll-margin-top: calc(var(--nav-h) + 20px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18.5px; margin: 30px 0 10px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.prose p { margin: 12px 0; color: var(--ink-2); }
.prose ul, .prose ol { margin: 12px 0; padding-left: 22px; color: var(--ink-2); }
.prose li { margin: 6px 0; }
.prose code {
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: var(--r-xs);
  font-size: 13.5px;
  font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  color: #8a5c31;
}
.prose table { margin: 16px 0; display: block; overflow-x: auto; white-space: nowrap; }
.prose table th, .prose table td { white-space: normal; }
.prose > * { min-width: 0; }

.codeblock { position: relative; margin: 18px 0; }
.codeblock pre {
  margin: 0;
  background: #161d33;
  color: #e6e8f0;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  overflow-x: auto;
  font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  font-size: 13.2px;
  line-height: 1.75;
}
.codeblock pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.codeblock__bar {
  display: flex; align-items: center; justify-content: space-between;
  background: #10162a; color: #8f97b2;
  padding: 9px 18px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
}
.codeblock__bar + pre { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.copybtn {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: #cfd5e6;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 600;
  cursor: pointer;
  transition: background .16s var(--ease);
}
.copybtn:hover { background: rgba(255,255,255,.14); }

/* 未解鎖遮罩 */
.locked { position: relative; }
.locked__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(250,250,247,.55) 0%, var(--paper) 55%);
  backdrop-filter: blur(3px);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
}

/* ─── 頁尾 ───────────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 46px 0 40px; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 36px; }
.foot h4 { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.foot a { display: block; font-size: 14.5px; color: var(--ink-2); padding: 4px 0; }
.foot a:hover { color: var(--sage); }
.foot__note { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

/* ─── 雜項 ───────────────────────────────────────────────────────────── */

.empty { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty h3 { font-size: 18px; margin-bottom: 8px; color: var(--ink); }

.skeleton { background: linear-gradient(90deg, var(--paper-2) 25%, #eceae2 50%, var(--paper-2) 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: var(--r-lg); height: 216px; }
@keyframes sk { to { background-position: -200% 0; } }

.spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); display: inline-block; }
.dot--clay { background: var(--clay); }
.dot--alert { background: var(--alert); }
.dot--faint { background: var(--faint); }

.badge {
  min-width: 19px; height: 19px; padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--alert); color: #fff;
  font-size: 11px; font-weight: 700;
  display: inline-grid; place-items: center;
}

.hr { height: 1px; background: var(--line); border: 0; margin: 26px 0; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.row--between { justify-content: space-between; }
.mut { color: var(--muted); }
.sm { font-size: 13.5px; }
.xs { font-size: 12.5px; }
.b { font-weight: 600; }
.center { text-align: center; }
.hide { display: none !important; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-variant-numeric: tabular-nums; }

.keyreveal {
  background: #161d33; color: #d7dcec;
  padding: 15px 18px; border-radius: var(--r-md);
  font-family: ui-monospace, Menlo, monospace; font-size: 13px;
  word-break: break-all; line-height: 1.6;
}

/* ─── 響應式 ─────────────────────────────────────────────────────────── */

@media (max-width: 1040px) {
  .taskpage { grid-template-columns: minmax(0, 1fr) !important; }
  .taskpage aside { position: static !important; }
}

@media (max-width: 1080px) {
  .nav__links {
    position: fixed;
    /* 同樣不能用 --nav-h 常數：裝成 PWA 後 body 多了 safe-area 的 padding，
       而 fixed 是相對視窗的，選單會疊到導覽列上。 */
    inset: var(--nav-bottom, var(--nav-h)) 0 auto;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 var(--r-xl) var(--r-xl);
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 2px;
    box-shadow: var(--sh-2);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__tools { margin-left: 0; margin-top: 10px; flex-wrap: wrap; }
  .nav .nav-toggle { display: grid; margin-left: auto; }
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .hero__art { order: -1; max-width: 460px; }
  .steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .doclayout { grid-template-columns: minmax(0, 1fr); }
  .docnav { position: static; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
  .docnav a { white-space: nowrap; }
  .docnav .docnav__group { display: none; }
  .foot__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .wrap, .nav__inner { width: calc(100% - 32px); }
  .hero { padding: 48px 0 36px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 24px; border-radius: var(--r-lg); }
  .modal { padding: 26px; border-radius: var(--r-lg); }
  .foot__grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .hero__stats { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ===========================================================================
   對話視窗
   =========================================================================== */

.chat {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-1);
  min-height: 0;
}

.chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.chat__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sage);
  padding: 4px 11px;
  background: var(--sage-soft);
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.chat__live .dot { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.chat__log {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  max-height: 460px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.chat--compact .chat__log { max-height: 320px; min-height: 180px; }

.chat__empty { margin: auto; color: var(--faint); font-size: 14px; text-align: center; }

.chat__row { display: flex; }
.chat__row.is-mine { justify-content: flex-end; }

.chat__bubble {
  max-width: min(78%, 460px);
  background: var(--paper-2);
  border-radius: var(--r-lg);
  border-bottom-left-radius: var(--r-xs);
  padding: 11px 15px;
}
.chat__row.is-mine .chat__bubble {
  background: var(--ink);
  color: #fff;
  border-bottom-left-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-xs);
}
.chat__bubble p { font-size: 14.8px; line-height: 1.65; word-break: break-word; }
.chat__bubble time { display: block; margin-top: 5px; font-size: 11.5px; opacity: .6; }
.chat__who {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat__who .tag { padding: 1px 8px; font-size: 10.5px; }
/* 訊息裡的附件連結。注意別讓這個選擇器同時套到輸入框上——
   合成器的 <input type="file"> 現在叫 .chat__pick，
   以前兩者同名時，這裡的 display 會蓋掉 hidden，原生的「選擇檔案」就露出來。 */
.chat__file {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sage);
  text-decoration: underline;
}
.chat__row.is-mine .chat__file { color: #b8d0be; }

.chat__sys {
  align-self: center;
  max-width: 88%;
  text-align: center;
  background: var(--sage-soft);
  color: #43614a;
  border-radius: var(--r-md);
  padding: 9px 15px;
  font-size: 13px;
  line-height: 1.6;
}
.chat__sys time { display: block; margin-top: 3px; font-size: 11px; opacity: .65; }

.chat__form {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.chat__input {
  flex: 1;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 11px 15px;
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  max-height: 140px;
  outline: none;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.chat__input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(23, 32, 58, .07); }
.chat__send {
  width: 44px; height: 44px;
  padding: 0;
  border-radius: var(--r-pill);
  flex: none;
}
.chat__locked {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--muted);
  font-size: 13.5px;
}

/* 訊息列表（messages.html） */
.threadlist { display: grid; gap: 10px; }
.thread {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 15px 18px;
  transition: border-color .16s var(--ease), transform .16s var(--ease);
}
.thread:hover { border-color: var(--line-2); transform: translateX(2px); }
.thread.is-on { border-color: var(--ink); background: var(--paper); }
.thread__body { flex: 1; min-width: 0; }
.thread__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread__last {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread__side { text-align: right; flex: none; display: grid; gap: 6px; justify-items: end; }

/* ===========================================================================
   流程階段指示
   =========================================================================== */

.stageline {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.stageline__dot {
  width: 100%;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--line);
  transition: background .2s var(--ease);
}
.stageline__dot.is-done { background: var(--sage); }
.stageline__dot.is-now { background: var(--ink); }
.stageline__dot.is-bad { background: var(--alert); }

.stagetag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 9px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--muted);
  white-space: nowrap;
}
.stagetag b { font-size: 11px; opacity: .65; font-variant-numeric: tabular-nums; }
.stagetag--now { background: var(--ink); border-color: var(--ink); color: #fff; }
.stagetag--done { background: var(--sage-soft); border-color: #cfe0d3; color: #4d6b54; }
.stagetag--wait { background: var(--clay-soft); border-color: #ecd9c4; color: #96653a; }
.stagetag--bad { background: var(--alert-soft); border-color: #eccfcc; color: var(--alert); }

/* 首頁完整流程圖 */
.flowmap { display: grid; gap: 14px; }
.flowstep {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  position: relative;
}
.flowstep__n {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--paper-2);
  color: var(--ink);
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.flowstep--poster .flowstep__n { background: var(--ink); color: #fff; border-color: var(--ink); }
.flowstep--worker .flowstep__n { background: var(--sage-soft); color: #43614a; border-color: #cfe0d3; }
.flowstep--both .flowstep__n { background: var(--clay-soft); color: #8a5c31; border-color: #ecd9c4; }
.flowstep h4 { font-size: 16.5px; margin-bottom: 5px; }
.flowstep p { font-size: 14.5px; color: var(--muted); line-height: 1.7; }
.flowstep__who {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ===========================================================================
   PWA 安裝橫幅
   =========================================================================== */

.installbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 130%);
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(520px, calc(100% - 32px));
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 13px 15px;
  box-shadow: var(--sh-3);
  transition: transform .3s var(--ease);
}
.installbar.is-in { transform: translate(-50%, 0); }
.installbar__mark {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  background: var(--sage-soft);
  color: var(--sage);
  display: grid; place-items: center;
  flex: none;
}
.installbar__text { flex: 1; min-width: 0; line-height: 1.45; }
.installbar__text b { display: block; font-size: 14.5px; }
.installbar__text span { font-size: 12.5px; color: var(--muted); }

.pushrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  flex-wrap: wrap;
}

/* 未讀小紅點 */
.dotbadge {
  position: relative;
}
.dotbadge::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--alert);
  border: 2px solid var(--paper);
}

.taskcard__next {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.55;
  color: var(--muted);
}
.taskcard__next svg { flex: none; margin-top: 3px; color: var(--faint); }

/* ─── 訊息頁 ─────────────────────────────────────────────────────────── */

.msglayout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.msglist { min-width: 0; overflow: hidden; }
.msgpane {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.msgpane__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.msgpane__back { display: none; transform: rotate(180deg); }
.msgpane .chat { border: 0; border-radius: 0; box-shadow: none; flex: 1; }
.msgpane .chat__head { display: none; }
.msgpane .chat__log { max-height: none; min-height: 340px; }

@media (max-width: 860px) {
  .msglayout { grid-template-columns: minmax(0, 1fr); }
  .msglayout .msgpane { display: none; }
  .msglayout.is-open .msglist { display: none; }
  .msgpane__back { display: grid; }

  /* 開啟某一則對話時做成滿版的訊息畫面：從導覽列下緣填到視窗底部，
     訊息區自己捲動，輸入列永遠留在畫面上。
     先前用 `min-height: calc(100dvh - 300px)` 去猜高度，加上頁首與外距之後
     總高超過視窗，輸入列就被推到摺線以下看不到了——高度不能用猜的。 */
  .msglayout.is-open .msgpane {
    display: flex;
    position: fixed;
    /* 頂端用量出來的導覽列底緣，不要用 --nav-h 常數推算：
       裝成 PWA 後 body 會多一層 safe-area 的 padding，而 fixed 不理會那層 padding。

       高度用 visualViewport 的實際可視高度，不要用 100dvh：
       iOS 在鍵盤彈出時不會縮小版面視窗，用 dvh 的話輸入列會被鍵盤壓在底下。
       --vv-height 拿不到時退回 100dvh（桌機與不支援的瀏覽器）。 */
    top: var(--nav-bottom, var(--nav-h));
    left: 0;
    right: 0;
    bottom: auto;
    height: calc(var(--vv-height, 100dvh) - var(--nav-bottom, var(--nav-h)));
    z-index: 40;
    border: 0;
    border-radius: 0;
    min-height: 0;
  }
  /* 對話盒外面還有一層 #chatHost。這一層沒被撐開的話，
     裡面 .chat 的 flex:1 就沒有作用對象，輸入列會停在內容高度而不是貼底。 */
  .msglayout.is-open .msgpane__body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .msglayout.is-open .msgpane .chat { flex: 1; min-height: 0; }
  .msglayout.is-open .msgpane .chat__log {
    flex: 1;
    min-height: 0;
    max-height: none;
  }
  .msglayout.is-open .msgpane .chat__form {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  /* 底下的頁面不要跟著捲，否則會出現兩層捲動 */
  body.msg-open { overflow: hidden; }
  /* 頁尾與安裝橫幅在這個畫面上只會擋住輸入列（安裝橫幅的 z-index 比誰都高），
     讀訊息時先收起來。關掉對話就會回來。 */
  body.msg-open .foot,
  body.msg-open .installbar,
  body.msg-open .topstrips { display: none; }
}

/* ===========================================================================
   手機優化：這個平台的使用者多半在路上用手機操作
   =========================================================================== */

/* 分頁列在窄螢幕改為橫向捲動，不再撐爆版面 */
.tabs {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }

/* 篩選 chip 列同理 */
.chiprow {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.chiprow::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; white-space: nowrap; }

/* 關閉中的彈窗要完全退出版面，否則在窄螢幕會撐出橫向捲動 */
.modal-veil { visibility: hidden; }
.modal-veil.is-open { visibility: visible; }

@media (max-width: 720px) {
  /* 觸控目標至少 40px 高 */
  .btn { min-height: 44px; padding-block: 12px; }
  .btn--sm { min-height: 38px; padding: 9px 16px; font-size: 14px; }
  .btn--lg { min-height: 50px; }
  .iconbtn { width: 40px; height: 40px; }
  .chip { min-height: 38px; padding: 9px 16px; }
  .tabs button { min-height: 40px; }
  .langswitch button { min-height: 34px; padding: 7px 14px; }
  .nav__link { min-height: 44px; display: flex; align-items: center; }
  .brand { min-height: 44px; }
  .copybtn { min-height: 38px; padding: 9px 15px; }

  /* 表單元素放大，避免 iOS 聚焦時自動縮放（字級需 ≥16px） */
  .input, .select, textarea.input, .chat__input { font-size: 16px; padding: 13px 16px; }
  .select { background-position: right 14px center; }

  /* 彈窗貼齊底部，像原生的 sheet */
  .modal-veil { padding: 0; align-items: flex-end; }
  .modal {
    width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  }
  .modal--wide { width: 100%; }

  /* 對話：輸入列貼底，訊息區吃滿可用高度 */
  .chat__log { max-height: none; min-height: 46dvh; padding: 14px; }
  .chat__bubble { max-width: 86%; }
  .chat__form { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .chat__send { width: 46px; height: 46px; }

  /* 吐司避開底部安全區與安裝橫幅 */
  .toaster { left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }

  .installbar {
    width: calc(100% - 24px);
    bottom: calc(14px + env(safe-area-inset-bottom));
    padding: 12px;
    gap: 11px;
  }
  .installbar__mark { width: 38px; height: 38px; }

  /* 任務詳情的側欄改為貼在內容之後，不再 sticky */
  .taskpage aside { position: static !important; }

  /* 流程圖在手機上編號與內容改為上下排列 */
  .flowstep { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px; }

  /* 表格橫向捲動 */
  .tablewrap { -webkit-overflow-scrolling: touch; }

  /* 頁尾與區塊間距收斂 */
  .section { padding: 42px 0; }
  .foot { margin-top: 48px; padding: 34px 0 30px; }
}

/* 安全區：安裝成 PWA 後的瀏海與底部手勢區 */
@supports (padding: env(safe-area-inset-left)) {
  .wrap, .nav__inner {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* 已安裝為獨立視窗時，導覽列不再需要 sticky 的半透明效果 */
@media (display-mode: standalone) {
  .nav { background: var(--paper); }
  body { padding-top: env(safe-area-inset-top); }
}


/* panel 內的子元素不得撐破容器（程式碼、長網址、表格） */
.panel > *, .card > *, .duo__col > *, .flowstep > * { min-width: 0; }
.codeblock { max-width: 100%; overflow: hidden; border-radius: var(--r-lg); }
.codeblock pre { max-width: 100%; }

/* 篩選列的分隔線 */
.filtersep {
  width: 1px;
  align-self: stretch;
  min-height: 24px;
  background: var(--line);
  flex: none;
}
@media (max-width: 720px) { .filtersep { display: none; } }

/* ===========================================================================
   信譽與評價
   =========================================================================== */

/* 星等：底層灰、上層以寬度裁切成實際分數 */
.stars { position: relative; display: inline-block; line-height: 0; white-space: nowrap; }
.stars__bg, .stars__fg { display: block; }
.stars__bg svg { fill: var(--line-2); }
.stars__fg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: var(--fill, 0%);
}
.stars__fg svg { fill: var(--clay); }
.stars svg { display: inline-block; }

.repbadge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}
.repbadge b { font-variant-numeric: tabular-nums; }
.repbadge__n { color: var(--faint); font-weight: 500; }
.repbadge--new {
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 500;
  font-size: 11.5px;
}
.repbadge--new svg { color: var(--sage); }

.reppanel { margin-top: 12px; }
.reppanel__top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.reppanel__top b { font-size: 19px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* 評分輸入 */
.starpick { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.starpick__b {
  border: 0;
  background: none;
  padding: 3px;
  cursor: pointer;
  line-height: 0;
  border-radius: var(--r-sm);
  transition: transform .12s var(--ease);
}
.starpick__b svg { fill: var(--line-2); transition: fill .12s var(--ease); }
.starpick__b.is-on svg { fill: var(--clay); }
.starpick__b:hover { transform: scale(1.12); }
.starpick__label {
  margin-left: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

/* 收到的評價列表 */
.ratelist { display: grid; gap: 10px; }
.rateitem {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.rateitem__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rateitem p { font-size: 14px; color: var(--ink-2); margin-top: 7px; line-height: 1.6; }

/* 待評價提示 */
.ratecta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--clay-soft);
  border: 1px solid #ecd9c4;
  border-radius: var(--r-md);
  flex-wrap: wrap;
}
.ratecta__body { flex: 1; min-width: 180px; }

.taskcard__poster {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}

/* 需要立即處理的面板 */
.panel--alert {
  border-color: #eccfcc;
  box-shadow: 0 0 0 1px #eccfcc, var(--sh-1);
}
.panel--alert::before {
  content: '';
  display: block;
  height: 3px;
  border-radius: var(--r-pill);
  background: var(--alert);
  margin: -8px 0 16px;
  width: 44px;
}

/* 進階篩選列 */
.advfilter {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: var(--sh-1);
}
.advfilter__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.advfilter__row label { flex: none; }
@media (max-width: 720px) {
  .advfilter__row .input { flex: 1; min-width: 0; width: auto !important; }
}

/* ===========================================================================
   趨勢小多重圖
   格線與軸線刻意做得很淡，資料才是主角。
   =========================================================================== */

.sparkgrid {
  display: grid;
  /* 五個指標要能在寬螢幕排成一列，4+1 換行看起來像漏掉一張 */
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 14px;
}

.spark {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
}
/* 繪圖區靠卡片底部對齊，卡片高度不一時基線仍成一直線 */
.spark__plot { margin-top: auto; }

.spark__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  /* 固定高度：有說明文字的卡片不會把繪圖區往下推，同一列的基線才對得齊 */
  min-height: 46px;
}
.spark__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.35;
}
.spark__note {
  font-size: 11.5px;
  color: var(--faint);
  margin-top: 3px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.spark__total {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  flex: none;
}

.spark__plot {
  position: relative;
  height: 68px;
  display: block;
}

/* 基線：最淡的一條，不用虛線（虛線只是雜訊） */
.spark__base {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
}

/* 長條：貼齊基線、頂端 4px 圓角，細而不厚重 */
.spark__bar {
  position: absolute;
  bottom: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 4px 4px 0 0;
  cursor: default;
  transition: opacity .12s var(--ease);
}
.spark__bar:hover, .spark__bar:focus-visible { opacity: .72; outline: none; }
.spark__bar:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

.spark__tip {
  position: absolute;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

.spark__axis {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 11px;
  color: var(--faint);
}

.chartbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ===========================================================================
   照片上傳
   =========================================================================== */

.picker__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.picker__btn { cursor: pointer; }
.picker__hint { flex: 1; min-width: 140px; line-height: 1.4; }

.picker__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.picker__grid:empty { margin-top: 0; }

.picker__item {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  flex: none;
}
.picker__item img { width: 100%; height: 100%; object-fit: cover; }
.picker__item.is-busy { display: grid; place-items: center; }
.picker__item.is-busy .spin { border-color: var(--line-2); border-top-color: var(--ink); }

.picker__x {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 32, 58, .78);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.picker__x:hover { background: var(--ink); }

/* 已提交的證明縮圖 */
.thumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.thumbs__i {
  width: 68px; height: 68px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  flex: none;
  transition: transform .14s var(--ease);
}
.thumbs__i:hover { transform: scale(1.04); }
.thumbs__i img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 720px) {
  .picker__item { width: 68px; height: 68px; }
  .thumbs__i { width: 60px; height: 60px; }
}

/* 對話輸入列的加照片按鈕 */
.chat__clip {
  width: 40px; height: 40px;
  flex: none;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  transition: all .16s var(--ease);
}
.chat__clip:hover { border-color: var(--ink); color: var(--ink); }
.chat__clip.is-busy { opacity: .5; pointer-events: none; }
.chat__bubble .thumbs { margin-top: 8px; }
.chat__bubble .thumbs__i { width: 116px; height: 88px; border-color: rgba(255,255,255,.2); }
@media (max-width: 720px) { .chat__clip { width: 44px; height: 44px; } }

/* ===========================================================================
   待辦時間線
   =========================================================================== */

.todogroup { margin-bottom: 22px; }
.todogroup:last-child { margin-bottom: 0; }

.todogroup__h {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}
.todogroup__h span {
  font-size: 11px;
  letter-spacing: 0;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  color: var(--muted);
}
.todogroup__h.is-late { color: var(--alert); }
.todogroup__h.is-late span { background: var(--alert-soft); color: var(--alert); }

.todolist { display: grid; gap: 10px; }

.todo {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease),
              border-color .16s var(--ease);
}
.todo:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.todo--urgent { border-left: 3px solid var(--clay); }

.todo__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.todo__action { font-size: 13px; font-weight: 700; color: var(--ink); }
.todo--urgent .todo__action { color: #8a5c31; }

.todo__title { font-size: 15.5px; font-weight: 600; line-height: 1.45; }
.todo__why { font-size: 13.5px; color: var(--muted); margin-top: 5px; line-height: 1.6; }

.todo__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}
.todo__meta .metaline { font-size: 12.8px; }
.todo__who { display: flex; align-items: center; gap: 5px; margin-top: 8px; }
.todo__who svg { color: var(--faint); }

@media (max-width: 720px) {
  .todo { padding: 15px 16px; }
  .todo__meta { gap: 7px 13px; }
}

/* 個人頁 */
.profile__mark {
  width: 58px; height: 58px;
  border-radius: var(--r-lg);
  background: var(--sage-soft);
  color: var(--sage);
  display: grid;
  place-items: center;
  flex: none;
}
@media (max-width: 720px) { .profile__mark { width: 48px; height: 48px; } }

/* ── 任務範本挑選 ─────────────────────────────────────────── */
.tplpick { margin-bottom: 24px; }
.tplpick__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.tplpick__b {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.tplpick__b:hover { border-color: var(--sage); background: var(--paper-2); }
.tplpick__b.is-on { border-color: var(--sage); box-shadow: inset 0 0 0 1px var(--sage); }
.tplpick__b > span:last-child { min-width: 0; }
.tplpick__i { flex: none; margin-top: 1px; color: var(--sage); }
.tplpick__n { display: block; font-weight: 600; font-size: 14px; }
.tplpick__h { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/* 未填完的佔位符：送出前先在表單上指出來，不要等伺服器退件 */
.input.is-warn { border-color: var(--clay); background: var(--clay-soft); }

@media (max-width: 720px) {
  .tplpick__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

/* ── 首頁介紹影片 ──────────────────────────────────────────── */
.filmbox { position: relative; border-radius: var(--r-xl); overflow: hidden;
  background: var(--ink); box-shadow: var(--sh-2); }
.filmbox__v { display: block; width: 100%; height: auto; }

/* 蓋在影片上的播放鈕。播放後整塊隱藏，讓原生控制項接手。 */
.filmbox__play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 0; font: inherit; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, rgba(23,32,58,.12), rgba(23,32,58,.52));
  border: 0; transition: background .2s var(--ease);
}
.filmbox__play:hover { background: linear-gradient(180deg, rgba(23,32,58,.2), rgba(23,32,58,.6)); }
.filmbox__play:focus-visible { outline: 3px solid var(--sage); outline-offset: -3px; }
.filmbox__disc {
  display: grid; place-items: center; width: 62px; height: 62px;
  border-radius: var(--r-pill); background: rgba(255,255,255,.94); color: var(--ink);
  box-shadow: 0 6px 22px rgba(23,32,58,.32);
  transition: transform .2s var(--ease);
}
.filmbox__play:hover .filmbox__disc { transform: scale(1.06); }
.filmbox__cap { text-align: center; text-shadow: 0 1px 10px rgba(23,32,58,.5); }
.filmbox__t { display: block; font-size: 15px; font-weight: 600; }
.filmbox.is-playing .filmbox__play { display: none; }

@media (max-width: 720px) {
  .filmbox__disc { width: 54px; height: 54px; }
  .filmbox__t { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .filmbox__disc, .filmbox__play { transition: none; }
}

/* ── 接案等級 ─────────────────────────────────────────────── */
.lvnum { font-size: 52px; font-weight: 700; line-height: 1; color: var(--ink); }
.lvperks { display: flex; gap: 26px; text-align: right; }
.lvperks div { display: flex; flex-direction: column; gap: 2px; }
.lvperks b { font-size: 22px; font-weight: 700; }
.lvperks span { font-size: 12px; color: var(--muted); }
.lvbar {
  height: 7px; margin-top: 8px; border-radius: var(--r-pill);
  background: var(--line-2); overflow: hidden;
}
.lvbar span {
  display: block; height: 100%; border-radius: var(--r-pill);
  background: var(--sage); transition: width .4s var(--ease);
}
tr.is-here { background: var(--sage-soft); }
tr.is-here td { font-weight: 600; }

/* 等級徽章：出現在應徵名單與個人頁，挑人時和星等一起看 */
.lvbadge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--paper-2); border: 1px solid var(--line);
  font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.lvbadge--top { background: var(--sage-soft); border-color: #cfe0d4; color: #43614a; }

@media (max-width: 720px) {
  .lvnum { font-size: 42px; }
  .lvperks { gap: 18px; }
  .lvperks b { font-size: 19px; }
}

/* ── 未讀訊息提示 ─────────────────────────────────────────── */
/* 接案者站在現場等回覆，錯過訊息任務就卡住。所以提示要一眼看到，
   不是躲在導覽列裡的一個小紅點。 */
.unreadbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  background: var(--clay-soft);
  border-bottom: 1px solid #e8d3bd;
  color: #8a5c31;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .16s var(--ease);
}
.unreadbar:hover { background: #f6e5d4; }
.unreadbar__n {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--alert);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}
.unreadbar__t { flex: 1; min-width: 0; }
.unreadbar__go {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  white-space: nowrap;
}

/* 導覽列連結上的數字 */
.navcount {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  margin-left: 7px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--alert);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  vertical-align: middle;
}
/* 連結已經標了數字，就不需要再點一個紅點 */
.nav__link.dotbadge::after { display: none; }

@media (max-width: 720px) {
  .unreadbar { padding: 10px 16px; font-size: 13.5px; gap: 10px; }
  .unreadbar__go span { display: none; }
}

/* ── 畫面頂端的提示列 ─────────────────────────────────────── */
/* 進度在上、未讀在下，兩條都貼在導覽列底下。
   位置用量出來的 --nav-bottom，不要用 --nav-h 常數
   （裝成 PWA 後 body 多了 safe-area 的 padding，sticky 的參考點會不一樣）。 */
.topstrips {
  position: sticky;
  top: var(--nav-bottom, var(--nav-h));
  z-index: 50;
}
.topstrips:empty { display: none; }

/* 進行中的任務：這件走到哪、下一步輪到誰。
   多筆時輪播，一次只顯示一筆——五筆並排太擠，而且每一筆都不完整。 */
.workbar { position: relative; }
.workbar__stage { display: block; }
.workbar__slide {
  display: flex;
  align-items: center;
  overflow: hidden;
  gap: 13px;
  padding: 9px 20px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  transition: background .16s var(--ease);
}
.workbar__slide:hover { background: #f1f1ec; }
.workbar--wait { background: var(--sage-soft); border-bottom-color: #d6e3d9; color: #43614a; }
.workbar--wait:hover { background: #dcebe0; }
.workbar--bad { background: var(--alert-soft); border-bottom-color: #f0d4d0; color: var(--alert); }

.workbar__step {
  flex: none;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  opacity: .72;
}
.workbar__step b { font-size: 15px; font-weight: 700; opacity: 1; }
/* .stageline__dot 是 width:100% 的 flex item，靠父層給寬度 */
.workbar__dots { flex: none; width: 84px; margin-top: 0; }
.workbar__body { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1; }

/* 標題放不下時跑馬燈。放得下就靜止——會動的東西反而難讀。 */
.workbar__t {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.workbar__t > span { display: inline-block; will-change: transform; }
.workbar__t.is-marquee > span {
  animation: workmarquee var(--marquee-time, 8s) ease-in-out infinite alternate;
}
@keyframes workmarquee {
  from { transform: translateX(0); }
  to { transform: translateX(var(--marquee-shift, 0)); }
}

.workbar__next { flex: none; font-size: 13px; opacity: .8; }
.workbar__go { flex: none; display: grid; place-items: center; opacity: .6; }

/* 輪播位置指示 */
.workbar__pips {
  position: absolute;
  right: 16px; bottom: 6px;
  display: flex;
  gap: 5px;
}
.workbar__pip {
  width: 15px; height: 4px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(23, 32, 58, .18);
  cursor: pointer;
  transition: background .2s var(--ease);
}
.workbar__pip:hover { background: rgba(23, 32, 58, .38); }
.workbar__pip.is-on { background: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .workbar__t.is-marquee > span { animation: none; }
  /* 不跑馬燈時就要看得出被截斷 */
  .workbar__t { text-overflow: ellipsis; }
}

/* 導覽列上永遠看得到的訊息圖示 */
/* 桌機的導覽列本來就有「訊息」文字連結（含數字），這顆圖示只在選單收起時才需要；
   兩個同時出現只是重複。1080px 正是 .nav__links 收進漢堡選單的斷點。 */
.navbell { display: none; position: relative; text-decoration: none; color: var(--ink-2); }
@media (max-width: 1080px) { .navbell { display: grid; margin-left: auto; } }
@media (max-width: 1080px) { .nav .nav-toggle { margin-left: 8px; } }
.navbell--on { border-color: var(--alert); color: var(--ink); }
.navbell__n {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: var(--alert);
  border: 2px solid var(--paper);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}

@media (max-width: 720px) {
  .workbar__slide { padding: 8px 14px 12px; gap: 10px; font-size: 13.5px; }
  /* 手機上一行放不下，標題與下一步改成兩行 */
  .workbar__body { flex-direction: column; align-items: flex-start; gap: 1px; }
  /* column 版面的 align-items: flex-start 會讓子元素寬度跟著內容長，
     標題框就撐到比螢幕還寬——量不出溢出（scrollWidth == clientWidth），
     跑馬燈永遠不會觸發，文字直接漫出畫面。stretch 讓它回到容器寬度。 */
  .workbar__t { align-self: stretch; width: 100%; }
  .workbar__next { font-size: 12px; }
  .workbar__step { display: none; }
  .workbar__dots { width: 52px; }
  .workbar__pips { right: 12px; bottom: 4px; }
  .workbar__pip { width: 12px; }
}

/* ── 一次性串接資訊的預覽 ─────────────────────────────────── */
/* 複製出去之前，有幾行只有本人能決定。那幾行要一眼看得出來，
   而且要能當場改——先複製再叫人去改，剪貼簿裡會是未修改的版本。 */
.promptwrap {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
/* 串接提示：左欄是貼給 agent 的內容，右欄是只給本人看的說明。
   兩欄共用一個 grid，同一列天生等高——用兩個各自捲動的區塊永遠對不齊。 */
.bundle {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  background: #161d33;
  font-size: 13px;
  line-height: 1.85;
}
.bundle__cap {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.bundle__cap--l { background: #1e2740; color: #96a0c0; }
.bundle__cap--r { background: var(--paper-2); color: var(--ink-2); border-left: 1px solid var(--line); }
.bundle .pl {
  padding: 1px 20px;
  min-height: 1.85em;
  color: #cfd4e4;
  font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
}
.bundle .pl--head { color: #7d87a8; }
.bundle .pl--key { color: #9fd8ac; font-weight: 700; }
.bundle .pl--link { color: #8fc0f0; font-weight: 600; }
/* 要自己改的那幾行：整列反白，不只是變色 */
.bundle .pl--edit {
  background: rgba(221, 107, 90, .22);
  box-shadow: inset 3px 0 0 var(--alert);
  color: #ffd9d1;
  font-weight: 700;
}
.bundle .pl--edit:focus { background: rgba(221, 107, 90, .34); }
.bundle .nt {
  padding: 2px 16px;
  background: var(--paper-2);
  border-left: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.6;
}
.bundle .nt--edit { background: #fbeae6; color: var(--ink); font-weight: 600; }
@media (max-width: 720px) {
  /* 窄螢幕退回單欄：grid 的順序本來就是「一行提示、它的說明」，
     所以說明自然落在它那一行的正下方，不必另外搬 DOM。 */
  .bundle { grid-template-columns: 1fr; font-size: 12px; }
  .bundle__cap--r, .bundle .nt { border-left: 0; }
  .bundle__cap { position: static; }
  .bundle .nt--empty { display: none; }
  .bundle .nt {
    margin: 2px 0 6px;
    padding: 7px 14px 7px 12px;
    border-left: 3px solid var(--sage);
  }
  .bundle .nt--edit { border-left-color: var(--alert); }
  .bundle .pl { padding: 1px 14px; }
}
.promptwrap__foot {
  padding: 10px 16px;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) {
  .promptbox { font-size: 12px; padding: 14px 16px; }
  .promptbox .pl--edit { margin-left: -16px; padding-left: 13px; padding-right: 16px; }
}

/* 發佈規範裡最重要的那一條。代為提款是車手案的入口，
   和其他禁止項目並排成一行小字的話，正好是沒有人會停下來讀的那一行。 */
.rule-hot {
  margin-top: 28px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--alert);
  color: #fff;
}
.rule-hot + p, .rule-hot + p + ul, .rule-hot ~ p:nth-of-type(2) {
  border-left: 3px solid var(--alert);
  padding-left: 14px;
}

/* 付款渠道的兩選一。用 radio 而不是下拉：兩個選項的差別是「接案者信不信你」，
   那種取捨要讓人同時看到兩邊的說明，藏在下拉裡等於沒說。 */
.picks { display: grid; gap: 10px; }
.pick { display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--paper); transition: border-color .15s, background .15s; }
.pick:hover { border-color: var(--ink-3); }
.pick input { margin-top: 3px; flex: none; accent-color: var(--ink); }
.pick__b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pick__b .xs { flex-basis: 100%; line-height: 1.5; }
.pick:has(input:checked) { border-color: var(--ink); background: var(--paper-2); }
.formsec { font-size: 16px; margin: 4px 0 10px; }

/* 任務頁的付款渠道標示。放在報酬正下方——**那正是接案者的目光停留的地方**，
   「拿多少」跟「怎麼拿到」本來就該一起看。 */
.paych { display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md); margin-bottom: 16px; }
.paych b { margin-right: 6px; }
.paych p { line-height: 1.55; }
.paych--ok { background: #eef5ef; color: var(--ink); }
.paych--ok > span:first-child { color: var(--sage); }
.paych--other { background: #fdf0e9; color: var(--ink); }
.paych--other > span:first-child { color: var(--clay); }
.tag--ink { background: var(--ink); color: #fff; }

/* 使用者協議。**同意鈕在捲到底之前是關著的**——這份東西裡最該被看到的幾句
   （代為提款一律是詐騙、平台不做金流擔保）在中後段，
   一個隨手就能點的「我同意」等於那幾段不存在。 */
.modal--tall { display: flex; flex-direction: column; max-height: min(86vh, 760px); }
.agreedoc {
  flex: 1;
  overflow: auto;
  margin: 16px 0 0;
  padding: 2px 18px 2px 2px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  line-height: 1.75;
  scrollbar-gutter: stable;
}
.agreedoc h4 { font-size: 15px; margin: 20px 0 8px; color: var(--ink); }
.agreedoc h4:first-child { margin-top: 14px; }
/* 條文自己帶「一、」「（一）」的編號，再加一個項目符號會變成兩套號碼。
   改成懸掛縮排：編號頂齊，折行的部分往內縮，整份讀起來才像條文。 */
.agreedoc ul { display: grid; gap: 9px; padding-left: 0; list-style: none; }
.agreedoc li { font-size: 14px; color: var(--ink-2);
  padding-left: 2.1em; text-indent: -2.1em; }
.agreedoc li b { color: var(--alert); font-weight: 700; }
.agreedoc__end { margin: 22px 0 10px; font-size: 13px; color: var(--faint); }
.agreefoot { padding-top: 14px; }
.agreefoot__bar { height: 3px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.agreefoot__bar span { display: block; height: 100%; width: 0; background: var(--sage); transition: width .12s linear; }
.agreefoot p { margin: 8px 0 12px; }
.agreebox {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--alert);
  border-radius: var(--r-lg);
  background: #fdf1ef;
}
.agreebox__row { display: flex; gap: 10px; align-items: flex-start; text-align: left; }
.agreebox__row > span:first-child { color: var(--alert); flex: none; }
.agreebox__state.is-ok { color: var(--sage); font-weight: 600; }
.agreebox__state.is-ok > span:first-child { color: var(--sage); }
.agreebox__state.is-todo { color: var(--alert); font-weight: 600; }
.agreebox__state.is-todo > span:first-child { color: var(--alert); }

/* 彈窗開著時收起安裝橫幅。它的 z-index 是 150（比彈窗還高），
   不收的話會蓋住彈窗底部的按鈕——使用者協議的「我同意」正好在那個位置。 */
body.modal-open .installbar { display: none; }

/* 手冊裡的轉向提示。輪詢那一節第一句就要把人推去看回呼，
   不然他會照著讀下去、照著實作，然後一天燒掉 1440 次呼叫。 */
.doc-note {
  padding: 12px 16px;
  margin: 14px 0 18px;
  border-left: 3px solid var(--sage);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--paper-2);
  font-size: 14px;
  line-height: 1.6;
}

/* 簡訊驗證的狀態提示。綠色與紅色要分得出來——使用者在等的就是這一行。 */
.hint.is-good { color: var(--sage); font-weight: 600; }
.hint.is-bad { color: var(--alert); font-weight: 600; }

/* 鏈上付款的狀態。放在報酬下方的渠道區塊裡——
   接案者要看到的是「平台查到了什麼」，以及一個他自己也能點進去查的連結。 */
.paych--chain { background: #eef2fb; }
.paych--chain > span:first-child { color: #2a78d6; }
.chainbox {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .7);
}
.chainbox.is-good { box-shadow: inset 2px 0 0 var(--sage); }
.chainbox.is-bad { box-shadow: inset 2px 0 0 var(--alert); }

/* 「去收信」那一步。使用者最容易卡在這裡——信進了垃圾桶、延遲、或信箱打錯，
   所以三個步驟要用編號列清楚，而不是一段擠在一起的文字。 */
.mailsteps { display: grid; gap: 10px; padding-left: 22px; margin: 18px 0; }
.mailsteps li { font-size: 14px; color: var(--ink-2); line-height: 1.65; }

/* 多選用的 chips。**不要用下拉**：這兩題要多選，而且使用者需要一眼看完
   所有選項才知道自己要勾哪些——藏在下拉裡等於沒問。 */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--paper);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.chip:hover { border-color: var(--ink-3); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

/* 後台的「官方工作人員」勾選。放在 Role 那一欄旁邊——
   它改變的正是這個帳號在平台上的身分。 */
.staffbox { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px;
  font-size: 12px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.staffbox input { accent-color: var(--ink); }

/* 面板的兩層分頁。第一層回答「我現在要做哪件事」，第二層才是細項——
   十四個平鋪的分頁沒有人掃得完，而且看不出哪些是一組的。 */
.tabs--group { margin-bottom: 8px; }
.tabs--group button {
  font-size: 15px;
  font-weight: 600;
  padding: 9px 18px;
}
.tabs--group button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs--sub { margin-bottom: 22px; }
.tabs--sub button { font-size: 13.5px; padding: 6px 14px; }

/* 未同意新版條款時的提示條。排在 topstrips 最前面——
   其他提示條都還可以等，這一條的意思是「現在什麼都做不了」。 */
.agreebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  background: var(--alert-soft);
  border-bottom: 1px solid #eccfcc;
  color: var(--alert);
  font-size: 14.5px;
  font-weight: 500;
}
.agreebar__t { flex: 1; min-width: 0; }
.agreebar__go {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
@media (max-width: 620px) {
  .agreebar { padding: 10px 16px; font-size: 13px; gap: 10px; }
}

/* 執行衍伸費用。**「已含」與「另計」要一眼分得出來**——
   報酬一樣是 300 元，但車資自付是完全不同的一件事。 */
.expbadge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  vertical-align: middle;
}
.expbadge.is-inc { background: var(--sage-soft); color: #3f6b4a; }
.expbadge.is-exc { background: var(--clay-soft); color: #8a5c31; }
.expbox {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.expbox.is-inc { background: var(--sage-soft); border-color: #cfe0d3; color: #3f6b4a; }
.expbox.is-exc { background: var(--clay-soft); border-color: #e8d3bd; color: #8a5c31; }
.expbox p { color: inherit; }

/* 兩個並排的選項（例如費用已含／另計）。一欄一個會讓人以為還有第三種。 */
@media (min-width: 620px) {
  .picks--row { grid-template-columns: 1fr 1fr; }
}
