/* ============================================================
   延寿指南 · 检索与对照执行
   浅色、低饱和、纸感；无外部字体与依赖
   ============================================================ */

:root {
  --bg: #F6F5F1;
  --bg-deep: #EFEDE6;
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --ink: #1F2328;
  --ink-2: #545C66;
  --ink-3: #868E99;
  --line: #E3E0D8;
  --line-2: #EEEBE4;

  --accent: #2E6B5E;
  --accent-deep: #235448;
  --accent-soft: #E7F0EC;
  --accent-line: #C9DCD4;

  --amber: #9A6F33;
  --amber-soft: #F6EFE2;
  --brick: #A2543F;
  --brick-soft: #F7EAE5;
  --slate: #4F5A6B;
  --slate-soft: #EBEEF2;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(31, 35, 40, .04), 0 6px 20px -12px rgba(31, 35, 40, .18);
  --shadow-lift: 0 2px 4px rgba(31, 35, 40, .05), 0 14px 32px -18px rgba(31, 35, 40, .28);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --serif: "Songti SC", "SimSun", "Source Han Serif SC", "Noto Serif CJK SC", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-line); }
a:hover { border-bottom-color: var(--accent); }
ul { margin: 0; padding-left: 1.15em; }
li { margin: .28em 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-deep); padding: .12em .38em; border-radius: 4px; }
kbd {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 5px; background: var(--surface);
}
button { font: inherit; color: inherit; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 245, 241, .88);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 10px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 27px; height: 27px; border-radius: 7.5px; flex: none;
  display: block; overflow: hidden;
  box-shadow: 0 1px 2px rgba(31, 35, 40, .16);
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--serif); font-size: 17px; letter-spacing: .02em; }
.brand-text em { font-style: normal; font-size: 10.5px; color: var(--ink-3); letter-spacing: .14em; }

.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: none; cursor: pointer; white-space: nowrap;
  padding: 7px 12px; border-radius: 999px;
  color: var(--ink-2); font-size: 14px;
  transition: background .16s, color .16s;
}
.tab:hover { background: var(--bg-deep); color: var(--ink); }
.tab.is-active { background: var(--accent); color: #fff; }
.topbar-meta { flex: none; }
.mini-progress {
  font-size: 12px; color: var(--ink-2);
  display: inline-block; padding: 3px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-variant-numeric: tabular-nums;
}

/* ---------------- 布局 ---------------- */
main { min-height: 70vh; }
.view { display: none; animation: fade .22s ease both; }
.view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.wrap { max-width: 1080px; margin: 0 auto; padding: 36px 24px 72px; }
.wrap-wide { max-width: 1240px; padding-top: 24px; }

.grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-top: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 18px; }
.stack .panel + .panel { margin-top: 0; }
.panel.subtle { background: var(--surface-2); box-shadow: none; }
.panel-head { margin-bottom: 14px; }
.panel-head h2 { font-size: 15.5px; }
.panel-head p { color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.panel h2 { font-size: 15.5px; margin-bottom: 8px; }

/* ---------------- Hero ---------------- */
.hero { padding: 10px 0 26px; border-bottom: 1px solid var(--line); }
.eyebrow {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(26px, 3.2vw, 36px); line-height: 1.32;
  max-width: 26em; letter-spacing: 0; text-wrap: balance;
}
.lede {
  margin-top: 12px; max-width: 44em; color: var(--ink-2); font-size: 14.5px;
}
.lede strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13.5px; color: var(--ink); border-bottom-width: 1px;
  transition: background .15s, border-color .15s, transform .1s, color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: #D6D2C8; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-deep); border-color: transparent; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-danger { color: var(--brick); border-color: #E7CFC7; background: var(--brick-soft); }
.btn-danger:hover { background: #F2DDD6; border-color: #DCBDB2; }
.btn-col { display: flex; flex-direction: column; gap: 8px; align-items: stretch; margin: 12px 0; }
.btn-col .btn { justify-content: flex-start; }

/* ---------------- 统计 ---------------- */
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px;
}
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.stat-k { font-size: 11.5px; color: var(--ink-3); letter-spacing: .06em; }
.stat-v {
  font-family: var(--serif); font-size: 25px; line-height: 1.25; margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat-v small { font-family: var(--sans); font-size: 12px; color: var(--ink-3); margin-left: 4px; }

/* ---------------- 效应条 ---------------- */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 64px; align-items: center; gap: 10px; cursor: pointer; }
.bar-row:hover .bar-label { color: var(--accent); }
.bar-label {
  font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .15s;
}
.bar-track { height: 9px; background: var(--bg-deep); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); opacity: .82; }
.bar-row[data-v="avoid"] .bar-fill { background: var(--brick); }
.bar-val { font-size: 12px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- KR / 限制 ---------------- */
.kr-list { display: flex; flex-direction: column; gap: 8px; }
.kr-item { display: flex; gap: 9px; font-size: 13.5px; color: var(--ink-2); }
.kr-item i {
  flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  margin-top: .62em;
}
.kr-item.is-strike { text-decoration: line-through; color: var(--ink-3); }
.tight { font-size: 13.5px; color: var(--ink-2); padding-left: 1.1em; }
.tight li::marker { color: var(--ink-3); }
.warn-panel { border-left: 3px solid var(--amber); }
.warn-panel h2 { color: var(--amber); }

/* ---------------- 浏览：侧栏 ---------------- */
.browse-layout { display: grid; grid-template-columns: 262px 1fr; gap: 26px; align-items: start; }
.sidebar {
  position: sticky; top: 70px;
  max-height: calc(100vh - 92px); overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #DCD8CF; border-radius: 3px; }

.search-box {
  position: relative; display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 12px; height: 40px;
  transition: border-color .15s, box-shadow .15s;
}
.search-box:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box svg { width: 15px; height: 15px; stroke: var(--ink-3); fill: none; stroke-width: 1.7; flex: none; }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  padding: 0 8px; font-size: 13.5px; color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box kbd { flex: none; }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }

.filter-note {
  font-size: 12px; color: var(--ink-3); margin-top: 8px; padding-left: 12px;
}

.side-block { margin-top: 20px; }
.side-block h3 {
  font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-bottom: 9px;
}
.side-block h3 .hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
.side-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.cat-tree { display: flex; flex-direction: column; gap: 2px; }
.cat-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  padding: 6px 10px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.cat-item:hover { background: var(--bg-deep); color: var(--ink); }
.cat-item.is-on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.cat-item .n { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cat-item.is-on .n { color: var(--accent); }
.cat-item.cat-all { font-weight: 600; }
.sub-list { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 0 8px 12px; }
.sub-item {
  border: 1px solid transparent; background: var(--bg-deep); cursor: pointer;
  font-size: 12px; color: var(--ink-2); padding: 2px 8px; border-radius: 999px;
}
.sub-item:hover { background: #E7E4DB; color: var(--ink); }
.sub-item.is-on { background: var(--accent); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: #D3CEC3; color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tag-cloud .chip { font-weight: 400; }
.tag-cloud .chip .c { opacity: .5; margin-left: 4px; font-size: 10.5px; }
.chip-more { border-style: dashed; color: var(--ink-3); background: transparent; }

/* ---------------- 浏览：内容区 ---------------- */
.content { min-width: 0; }
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.result-count { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.result-count b { color: var(--ink); font-weight: 600; }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.sort-label { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.sort-label select {
  font: inherit; font-size: 12.5px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px;
  background: var(--surface); cursor: pointer;
}
.btn-filter-toggle { display: none; }

.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.afilter {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--accent-deep); background: var(--accent-soft);
  border-radius: 999px; padding: 2px 4px 2px 10px;
}
.afilter button {
  border: 0; background: none; cursor: pointer; color: var(--accent);
  width: 16px; height: 16px; border-radius: 50%; line-height: 1; font-size: 13px;
}
.afilter button:hover { background: #D6E6E0; }

.card-list { display: flex; flex-direction: column; gap: 12px; }

/* ---------------- 条目卡片 ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 14px; box-shadow: var(--shadow);
  transition: box-shadow .18s, border-color .18s;
  scroll-margin-top: 80px;
}
.card:hover { box-shadow: var(--shadow-lift); }
.card.is-done { border-left: 3px solid var(--accent); }
.card.is-doing { border-left: 3px solid #C9A45C; }
.card.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: #FBF6E9; } 100% { background: var(--surface); } }

.card-top { display: flex; align-items: flex-start; gap: 12px; }
.card-title-wrap { flex: 1; min-width: 0; }
.card-crumb {
  font-size: 11px; color: var(--ink-3); letter-spacing: .04em; margin-bottom: 3px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.card-crumb .sep { color: #CFCBC2; }
.card h3 { font-size: 16px; letter-spacing: 0; }
.card h3 mark, .card p mark, .card li mark, .ev-body mark {
  background: #FBEFC9; color: inherit; padding: 0 1px; border-radius: 2px;
}
.effect-badge {
  flex: none; text-align: right; padding-top: 2px;
}
.effect-badge b {
  display: block; font-family: var(--serif); font-size: 17px; line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.effect-badge span { font-size: 10.5px; color: var(--ink-3); display: block; line-height: 1.4; }
.effect-badge.is-good b { color: var(--accent); }
.effect-badge.is-risk b { color: var(--brick); }
.effect-badge.is-warn b { color: var(--amber); }
.effect-badge.is-none b { color: var(--ink-3); font-size: 13px; }

.card-summary { margin-top: 8px; color: var(--ink-2); font-size: 13.8px; }
.card-action {
  margin-top: 9px; padding: 8px 11px; background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: 13.2px; color: var(--ink); display: flex; gap: 8px;
}
.card-action .lbl { flex: none; color: var(--ink-3); font-size: 12px; padding-top: 1px; }

.card-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; font-size: 12px; color: var(--ink-3);
}
.mtag {
  font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: var(--bg-deep); color: var(--ink-2); cursor: pointer;
  border: 1px solid transparent;
}
.mtag:hover { border-color: var(--line); color: var(--ink); }
.vtag { font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 500; }
.v-do { background: var(--accent-soft); color: var(--accent-deep); }
.v-avoid { background: var(--brick-soft); color: var(--brick); }
.v-caution { background: var(--amber-soft); color: var(--amber); }
.v-debate { background: #F0E9F2; color: #6C4A78; }
.v-info { background: var(--slate-soft); color: var(--slate); }
.phase-tag { font-size: 11px; color: var(--ink-3); }

.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line);
}
.status-group { display: flex; gap: 2px; background: var(--bg-deep); padding: 2px; border-radius: 999px; }
.status-btn {
  border: 0; background: none; cursor: pointer;
  font-size: 11.5px; color: var(--ink-2); padding: 3px 10px; border-radius: 999px;
  transition: background .14s, color .14s;
}
.status-btn:hover { color: var(--ink); }
.status-btn.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.07); font-weight: 600; }
.status-btn[data-s="done"].is-on { color: var(--accent-deep); }
.status-btn[data-s="doing"].is-on { color: var(--amber); }

.expand-btn {
  border: 0; background: none; cursor: pointer; font-size: 12.5px;
  color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 4px; border-radius: 5px;
}
.expand-btn:hover { color: var(--accent); background: var(--accent-soft); }
.expand-btn .caret { transition: transform .2s; display: inline-block; font-size: 9px; }
.expand-btn.is-open .caret { transform: rotate(90deg); }

.card-detail { display: none; margin-top: 14px; padding-top: 4px; }
.card-detail.is-open { display: block; animation: fade .18s ease both; }
.detail-sec { margin-bottom: 14px; }
.detail-sec h4 {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 6px;
}
.detail-sec ul { font-size: 13px; color: var(--ink-2); }
.detail-sec li::marker { color: #C6C2B8; }

.ev {
  border: 1px solid var(--line-2); border-left: 2px solid var(--accent-line);
  border-radius: var(--radius-sm); padding: 10px 13px; margin-bottom: 9px;
  background: var(--surface-2);
}
.ev-head { font-size: 13.2px; font-weight: 600; color: var(--ink); }
.ev-cite { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.55; }
.ev-cite i { font-style: italic; }
.ev-body { font-size: 12.8px; color: var(--ink-2); margin-top: 6px; }
.ev-body ul { padding-left: 1.1em; }
.ev-caveat {
  font-size: 12px; color: var(--amber); background: var(--amber-soft);
  border-radius: 5px; padding: 4px 8px; margin-top: 7px;
}
.ev-links { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; }
.ev-links a { border-bottom-color: transparent; }
.ev-links a:hover { border-bottom-color: var(--accent); }
.no-ev {
  font-size: 12.5px; color: var(--ink-3); font-style: italic;
  padding: 8px 10px; border: 1px dashed var(--line); border-radius: var(--radius-sm);
}
.card-caveat {
  font-size: 12.2px; color: var(--amber); background: var(--amber-soft);
  border-radius: 6px; padding: 6px 10px; margin-top: 10px;
}

.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty-title { font-family: var(--serif); font-size: 18px; color: var(--ink-2); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }

/* ---------------- 周打卡 ---------------- */
.week-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.week-head h2 { font-family: var(--serif); font-size: 24px; }
.week-range { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.week-nav { display: flex; gap: 6px; }

.week-summary { display: flex; align-items: center; gap: 28px; }
.ring-wrap { position: relative; width: 108px; height: 108px; flex: none; }
.ring { width: 108px; height: 108px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: var(--bg-deep); }
.ring-fg {
  stroke: var(--accent); stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .5s cubic-bezier(.3,.7,.3,1);
}
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-label strong { font-family: var(--serif); font-size: 22px; font-variant-numeric: tabular-nums; }
.ring-label span { font-size: 10.5px; color: var(--ink-3); }
.week-summary-text h3 { font-size: 15px; margin-bottom: 4px; }
.week-summary-text p { font-size: 13px; color: var(--ink-2); max-width: 34em; }
.legend { display: flex; gap: 14px; margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-todo { background: #D8D4CA; }
.dot-doing { background: #C9A45C; }
.dot-done { background: var(--accent); }

.week-legend-row { margin: 14px 0 10px; }
.hint { font-size: 12px; color: var(--ink-3); }

.wk-group { margin-bottom: 22px; }
.wk-group-head {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 7px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.wk-group-head b { font-size: 12px; letter-spacing: .1em; color: var(--ink-2); }

.wk-row {
  display: grid; grid-template-columns: 1fr auto; gap: 14px;
  align-items: center; padding: 9px 4px;
  border-bottom: 1px solid var(--line-2);
}
.wk-row:last-child { border-bottom: 0; }
.wk-main { min-width: 0; }
.wk-title { font-size: 13.8px; font-weight: 500; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.wk-title .wk-dose { font-size: 11px; color: var(--ink-3); font-weight: 400; }
.wk-title .wk-dose::before { content: '·'; margin-right: 5px; color: #C6C2B8; }
.wk-sub {
  font-size: 11.8px; color: var(--ink-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46em;
}
.wk-row.is-full .wk-title { color: var(--accent-deep); }

.pips { display: flex; gap: 5px; }
.pip {
  position: relative;
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 9.5px; color: var(--ink-3); line-height: 1.05;
  transition: background .14s, border-color .14s, color .14s, transform .1s;
  padding: 0;
}
.pip:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.pip .d { font-size: 9.5px; }
.pip .n { font-size: 11px; font-variant-numeric: tabular-nums; }
.pip.is-today { border-color: var(--accent-line); background: #F4F8F6; }
.pip.is-today::after {
  content: ''; position: absolute; left: 50%; bottom: 3px; margin-left: -1.5px;
  width: 3px; height: 3px; border-radius: 50%; background: var(--accent);
}
.pip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pip.is-on .d, .pip.is-on .n { color: #fff; }
.pip.is-on.is-today::after { background: #fff; }
.pips.is-weekly .pip { border-radius: 999px; width: 26px; height: 26px; }
.pips.is-weekly .pip .n { font-size: 11px; }

.wk-row.stage-row { opacity: .8; }
.wk-row.stage-row .pips { font-size: 11.5px; color: var(--ink-3); }

.stage-only-list { display: flex; flex-wrap: wrap; gap: 8px; }
.stage-only-list a {
  font-size: 12.5px; color: var(--ink-2); background: var(--bg-deep);
  border: 1px solid transparent; border-radius: 999px; padding: 3px 11px;
  border-bottom: 1px solid transparent;
}
.stage-only-list a:hover { background: var(--accent-soft); color: var(--accent-deep); }

/* ---------------- 阶段 ---------------- */
.phase-intro { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.phase-intro h2 { font-family: var(--serif); font-size: clamp(21px, 2.6vw, 27px); max-width: 22em; }
.phase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.phase-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.phase-card.is-current { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.phase-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.phase-no {
  font-family: var(--serif); font-size: 13px; color: var(--accent);
  letter-spacing: .1em; text-transform: uppercase;
}
.phase-weeks { font-size: 11.5px; color: var(--ink-3); }
.phase-card h3 { font-size: 18px; margin-top: 4px; font-family: var(--serif); }
.phase-goal { font-size: 13px; color: var(--ink-2); margin-top: 7px; }
.phase-focus { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.phase-bar-wrap { margin: 13px 0 4px; }
.phase-bar { height: 6px; background: var(--bg-deep); border-radius: 999px; overflow: hidden; }
.phase-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.phase-bar-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 5px; font-variant-numeric: tabular-nums; }
.phase-items { list-style: none; padding: 0; margin: 10px 0 0; border-top: 1px dashed var(--line); }
.phase-items li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 12.8px;
}
.phase-items li:last-child { border-bottom: 0; }
.phase-items .pi-title { color: var(--ink-2); cursor: pointer; }
.phase-items .pi-title:hover { color: var(--accent); }
.phase-items .pi-status { font-size: 10.5px; color: var(--ink-3); flex: none; }
.phase-items .pi-status.s-done { color: var(--accent); }
.phase-items .pi-status.s-doing { color: var(--amber); }

/* ---------------- 说明页 ---------------- */
.about-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; align-items: start; }
.prose h2, .prose h3 { margin-top: 0; }
.prose h3 { font-size: 14px; margin-top: 22px; margin-bottom: 6px; }
.prose p { font-size: 13.6px; color: var(--ink-2); margin: 8px 0; }
.prose ul { font-size: 13.4px; color: var(--ink-2); margin: 8px 0; }
.prose li::marker { color: #C6C2B8; }
.small { font-size: 12.8px; color: var(--ink-2); line-height: 1.7; }

/* 云同步 */
.sync-join { display: flex; gap: 8px; margin-top: 4px; }
.sync-join input {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--mono); font-size: 12.8px; letter-spacing: .08em;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink);
}
.sync-join input::placeholder { letter-spacing: 0; color: #B6B2A8; }
.sync-join input:focus { outline: none; border-color: #C9C4B8; background: #fff; }
.sync-join .btn { flex: 0 0 auto; }

.sync-code-row {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 6px; padding: 11px 13px;
  background: var(--bg-deep); border-radius: 10px;
}
.sync-code-row code {
  font-family: var(--mono); font-size: 15px; letter-spacing: .12em;
  background: none; padding: 0; color: var(--ink); flex: 1 1 auto;
  user-select: all;
}
.sync-state { font-size: 12px; color: var(--ink-3); margin: 4px 0 0; line-height: 1.6; }
.sync-state.s-ok { color: var(--accent); }
.sync-state.s-syncing, .sync-state.s-pending { color: #9A8B54; }
.sync-state.s-error { color: var(--brick); }
.hint-err { color: var(--brick); margin-top: 8px; }

/* ---------------- 页脚 ---------------- */
.foot {
  border-top: 1px solid var(--line); margin-top: 20px;
  padding: 18px 24px 26px; max-width: 1240px; margin-inline: auto;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--ink-3);
}
.foot-right { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.foot-author strong { color: var(--ink-2); font-weight: 600; letter-spacing: .04em; }
.foot-right .foot-mp { color: var(--ink-3); }
.foot-right a { color: var(--ink-2); }

/* ---------------- 安装引导 / 分享 ---------------- */
.guide {
  margin-top: 12px; padding: 12px 13px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-size: 12.6px; color: var(--ink-2); line-height: 1.75;
}
.guide h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--ink); font-weight: 600; }
.guide ol { margin: 0; padding-left: 17px; }
.guide li { margin: 3px 0; }
.guide kbd {
  display: inline-block; padding: 1px 5px; margin: 0 1px; border-radius: 4px;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line);
  font: inherit; font-size: 11.5px; color: var(--ink);
}
.guide .guide-note { margin-top: 9px; color: var(--ink-3); font-size: 11.8px; }

/* ---------------- 作者 / 社媒 ---------------- */
.social { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 10px; }
.social-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 13px; color: var(--ink); text-decoration: none;
  transition: border-color .15s, background .15s;
}
a.social-item:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.social-item.is-static { background: transparent; border-style: dashed; }
.social-k {
  flex: none; min-width: 40px; font-size: 10.5px; letter-spacing: .06em;
  color: var(--ink-3); text-transform: uppercase;
}
.social-v { flex: 1; font-weight: 500; }
.social-arrow { color: var(--ink-3); font-size: 12px; }

/* ---------------- 轻提示 ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  background: #2C4640; color: #F3F6F4;
  padding: 10px 18px; border-radius: 999px; font-size: 13px; line-height: 1.45;
  box-shadow: 0 8px 26px rgba(31, 35, 40, .24);
  opacity: 0; pointer-events: none; transition: opacity .22s ease, transform .22s ease;
  z-index: 200; max-width: min(88vw, 420px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1000px) {
  .grid-2 { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .phase-grid { grid-template-columns: 1fr; }
  .browse-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static; max-height: none; overflow: visible;
    display: none; padding: 14px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px;
  }
  .sidebar.is-open { display: block; }
  .btn-filter-toggle { display: inline-flex; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .topbar-inner { flex-wrap: wrap; gap: 8px 14px; }
  .brand { order: 1; }
  .topbar-meta { order: 2; margin-left: auto; }
  .tabs { order: 3; flex-basis: 100%; }
  .sidebar .cat-tree { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .cat-item { width: auto; }
  .sub-list { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .wrap { padding: 22px 15px 56px; }
  .topbar-inner { padding: 9px 15px; }
  .brand-text em { display: none; }
  .tab { padding: 6px 11px; font-size: 13.5px; }
  .stat-row { gap: 8px; }
  .stat { padding: 11px 13px; }
  .stat-v { font-size: 21px; }
  .panel { padding: 16px 15px; }
  .card { padding: 14px 14px 12px; }
  .card-top { flex-direction: column; gap: 6px; }
  .effect-badge { text-align: left; display: flex; align-items: baseline; gap: 8px; padding-top: 0; }
  .effect-badge b { font-size: 15px; }
  .card-foot { flex-wrap: wrap; gap: 8px; }
  .status-group { order: 2; }
  .expand-btn { order: 1; margin-left: auto; }
  .week-summary { flex-direction: column; align-items: flex-start; gap: 14px; }
  .wk-row { grid-template-columns: 1fr; gap: 8px; }
  .pips { justify-content: space-between; }
  .pip { flex: 1; max-width: 44px; height: 34px; }
  .pips.is-weekly .pip { max-width: 38px; }
  .week-head { align-items: flex-start; }
  .bar-row { grid-template-columns: 96px 1fr 54px; }
  .foot { flex-direction: column; gap: 6px; padding: 16px 15px 24px; }
  .hero h1 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* 打印：把卡片展开成清单 */
@media print {
  .topbar, .sidebar, .toolbar, .foot, .hero-actions, .btn, .status-group, .expand-btn { display: none !important; }
  .view { display: block !important; }
  .card { break-inside: avoid; box-shadow: none; }
  .card-detail { display: block !important; }
}
