/* ============================================================
   智能师爷 · 设计系统「东方师爷」
   ------------------------------------------------------------
   意象：宣纸、墨、朱砂印。
   手法：不依赖特定字体也能成立 —— 靠字距、留白、细线、印章
        来立气质；有衬线字体的设备上再叠加一层书卷感。
   ============================================================ */

:root {
  /* 墨 */
  --ink:      #1b1917;
  --ink-2:    #423d37;
  --ink-3:    #6e6659;
  --ink-4:    #9b9384;

  /* 纸 */
  --paper:    #f6f1e7;
  --paper-2:  #fffdf7;
  --paper-3:  #efe8da;

  /* 朱砂 · 赭石 */
  --cinnabar:      #a8382c;
  --cinnabar-deep: #8a2c22;
  --cinnabar-soft: #f6e7e3;
  --ochre:         #977a4e;
  --ochre-soft:    #f2ebdc;

  /* 风险等级 */
  --lv-high:   #a8382c;
  --lv-mid:    #b07a25;
  --lv-low:    #4a7a52;

  --line:      #e2d9c8;
  --line-soft: #ece5d7;

  --r:   12px;
  --r-s: 8px;
  --maxw: 500px;

  --font-serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC",
                "Noto Serif SC", "SimSun", "Times New Roman", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

/* 宣纸纹理：极淡的斜向细纹，肉眼几乎不觉，但去掉就觉得"平" */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(150,130,95,.028) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-45deg, rgba(150,130,95,.022) 0 1px, transparent 1px 5px);
}

#app {
  max-width: var(--maxw); margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column; position: relative; z-index: 1;
}

/* 标题：靠字距立气质，衬线字体是加分项而非前提 */
.serif { font-family: var(--font-serif); }
.tracked { letter-spacing: .22em; }

/* ---------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 231, .94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  display: flex; align-items: center; gap: 10px;
}
.topbar__back {
  background: none; border: 0; color: var(--ink-2); font-size: 21px; line-height: 1;
  padding: 0 8px 0 0; cursor: pointer;
}
.topbar__title { flex: 1; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.topbar__action {
  background: none; border: 0; color: var(--cinnabar); font-size: 13.5px;
  cursor: pointer; padding: 4px 0 4px 8px; font-family: inherit;
}

/* 品牌字：宽字距 + 衬线，配朱砂小印 */
.brand { display: flex; align-items: center; gap: 9px; flex: 1; }
.brand__name {
  font-family: var(--font-serif); font-size: 16.5px; font-weight: 700;
  letter-spacing: .3em; color: var(--ink); text-indent: .3em;
}
.brand__sub {
  font-size: 10.5px; color: var(--ink-4); letter-spacing: .14em;
  border-left: 1px solid var(--line); padding-left: 8px;
}

/* 朱砂印 */
.seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 4px;
  background: var(--cinnabar); color: #fff;
  font-family: var(--font-serif); font-size: 11px; font-weight: 700;
  letter-spacing: 0; line-height: 1; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22);
}
.seal--lg { width: 34px; height: 34px; font-size: 15px; border-radius: 5px; }
.seal--ghost { background: transparent; color: var(--cinnabar);
  box-shadow: inset 0 0 0 1.5px var(--cinnabar); }

/* ---------------------------------------------------------- 布局 */
.page { flex: 1; padding: 16px 16px calc(96px + var(--safe-b)); min-width: 0; }
.page--flush { padding-bottom: calc(16px + var(--safe-b)); }

.card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px; margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.card--flat { box-shadow: none; }
.card--ink { background: var(--ink); border-color: var(--ink); color: #f3ece0; }

.sec {
  display: flex; align-items: center; gap: 8px;
  margin: 22px 2px 10px; font-size: 13px; font-weight: 600;
  color: var(--ink-3); letter-spacing: .1em;
}
.sec::before { content: ''; width: 3px; height: 12px; background: var(--cinnabar); border-radius: 1px; }
.sec__hint { font-weight: 400; letter-spacing: 0; color: var(--ink-4); font-size: 12px; margin-left: auto; }

.rule { border: 0; border-top: 1px solid var(--line-soft); margin: 16px 0; }

/* ---------------------------------------------------------- 表单 */
.field { margin-bottom: 14px; }
.field__label {
  font-size: 12.5px; color: var(--ink-3); margin-bottom: 7px;
  letter-spacing: .06em; display: flex; align-items: center; gap: 6px;
}
.field__label .opt { color: var(--ink-4); font-size: 11px; letter-spacing: 0; }

textarea, input[type="text"], input[type="number"], select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 12px 13px; font-size: 15px; font-family: inherit;
  background: var(--paper-2); color: var(--ink); outline: none;
  transition: border-color .16s, box-shadow .16s; line-height: 1.7;
}
textarea:focus, input:focus, select:focus {
  border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(110,102,89,.09);
}
textarea { resize: vertical; min-height: 156px; }
::placeholder { color: var(--ink-4); }

/* 大输入区：像铺开一张纸 */
.paper-input {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 4px; position: relative;
}
.paper-input textarea {
  border: 0; background: transparent; min-height: 176px; padding: 12px;
}
.paper-input textarea:focus { box-shadow: none; }
.paper-input__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 8px; border-top: 1px dashed var(--line);
}

/* ---------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; border: 1px solid var(--ink); border-radius: var(--r-s);
  padding: 13px 18px; font-size: 15px; font-weight: 600; font-family: inherit;
  background: var(--ink); color: #f6f1e7; cursor: pointer;
  letter-spacing: .1em; transition: opacity .15s, transform .06s;
}
.btn:active { transform: scale(.985); opacity: .9; }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn--ghost:active { background: var(--paper-3); }
.btn--cinnabar { background: var(--cinnabar); border-color: var(--cinnabar); }
.btn--sm { padding: 9px 14px; font-size: 13.5px; width: auto; letter-spacing: .05em; }
.btn--block { display: flex; }
.btn-row { display: flex; gap: 9px; }
.btn-row .btn { flex: 1; }

/* ---------------------------------------------------------- 场景 */
.scene-groups { display: flex; flex-direction: column; gap: 12px; }
.scene-group__t {
  font-size: 11.5px; color: var(--ink-4); letter-spacing: .16em; margin-bottom: 7px;
}
.scene-row { display: flex; flex-wrap: wrap; gap: 7px; }
.scene-chip {
  border: 1px solid var(--line); background: var(--paper-2);
  border-radius: 999px; padding: 7px 14px; font-size: 13.5px; cursor: pointer;
  color: var(--ink-2); transition: all .16s; font-family: inherit;
}
.scene-chip--on {
  background: var(--ink); border-color: var(--ink); color: #f6f1e7; font-weight: 600;
}

/* ---------------------------------------------------------- 3 秒看懂区 */
/* 一句话判断 */
.verdict {
  background: var(--ink); color: #f4eee2;
  border-radius: var(--r); padding: 20px 18px; margin-bottom: 12px;
  position: relative; overflow: hidden;
}
.verdict::after {
  content: ''; position: absolute; right: -28px; top: -28px;
  width: 110px; height: 110px; border-radius: 50%;
  border: 1px solid rgba(246,241,231,.14);
}
.verdict__k {
  font-size: 11px; letter-spacing: .3em; color: rgba(244,238,226,.5);
  margin-bottom: 10px; font-family: var(--font-serif);
}
.verdict__t {
  font-family: var(--font-serif); font-size: 19px; line-height: 1.75;
  font-weight: 700; letter-spacing: .02em;
}
.verdict__t em { font-style: normal; color: #e8b98a; }

/* 三个核心事实 */
.facts { display: flex; gap: 8px; margin-bottom: 12px; }
.fact {
  flex: 1; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 12px 11px; min-width: 0;
}
.fact__k { font-size: 11px; color: var(--ink-4); letter-spacing: .12em; margin-bottom: 6px; }
/* 不截断。原先为了「3 秒看懂」加了 3 行 line-clamp，结果把「实质」这种
   本来就该展开说的字段切掉了 —— 用户看到的是半句话，比排版难看严重得多。
   三栏改为顶部对齐，各按内容自然高度，长短不一也不影响阅读。 */
.facts { align-items: flex-start; }
.fact__v { font-size: 13.5px; line-height: 1.6; color: var(--ink); font-weight: 500;
  overflow-wrap: anywhere; }

/* 风险等级 */
.riskbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 12px 14px; margin-bottom: 12px;
}
.riskbar__label { font-size: 12.5px; color: var(--ink-3); letter-spacing: .08em; }
.riskbar__dots { display: flex; gap: 4px; margin-left: auto; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--paper-3);
  border: 1px solid var(--line); }
.dot--on-high { background: var(--lv-high); border-color: var(--lv-high); }
.dot--on-mid  { background: var(--lv-mid);  border-color: var(--lv-mid); }
.dot--on-low  { background: var(--lv-low);  border-color: var(--lv-low); }
.riskbar__text { font-size: 13px; font-weight: 600; }
.riskbar__text--high { color: var(--lv-high); }
.riskbar__text--mid  { color: var(--lv-mid); }
.riskbar__text--low  { color: var(--lv-low); }

/* 三档话术：主视觉，直接可复制 */
.plays { display: flex; flex-direction: column; gap: 10px; }
.play {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.play--pick { border-color: var(--cinnabar); box-shadow: 0 0 0 3px var(--cinnabar-soft); }
.play__h {
  display: flex; align-items: center; gap: 9px; padding: 13px 15px 11px;
  border-bottom: 1px dashed var(--line-soft);
}
.play__name { font-weight: 700; font-size: 15px; color: var(--ink);
  font-family: var(--font-serif); letter-spacing: .04em; }
.play__prob {
  margin-left: auto; font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--ochre-soft); color: var(--ochre); font-weight: 600; white-space: nowrap;
}
.play__pick-tag {
  font-size: 10.5px; padding: 2px 7px; border-radius: 3px;
  background: var(--cinnabar); color: #fff; letter-spacing: .08em;
}
.play__why { padding: 10px 15px 0; font-size: 13px; color: var(--ink-3); line-height: 1.65; }
.play__quote {
  margin: 10px 15px 0; padding: 13px 14px;
  background: var(--paper); border-left: 3px solid var(--cinnabar);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  font-size: 15px; line-height: 1.85; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
  font-family: var(--font-serif);
}
.play__foot {
  display: flex; gap: 8px; padding: 11px 15px 14px; align-items: center;
}
.play__pros { font-size: 12px; color: var(--ink-4); flex: 1; line-height: 1.6; }

/* ---------------------------------------------------------- 折叠 */
.fold {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r); margin-bottom: 10px; overflow: hidden;
}
.fold__h {
  padding: 14px 16px; display: flex; align-items: center; gap: 9px;
  cursor: pointer; user-select: none; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
}
.fold__n {
  margin-left: auto; font-size: 11.5px; color: var(--ink-4); font-weight: 400;
}
.fold__arrow { color: var(--ink-4); font-size: 11px; transition: transform .2s; }
.fold--open .fold__arrow { transform: rotate(90deg); }
.fold__body { padding: 0 16px 16px; display: none; }
.fold--open .fold__body { display: block; }

/* ---------------------------------------------------------- 键值行 */
.kv { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.kv:last-child { border-bottom: 0; padding-bottom: 0; }
.kv__k { flex: 0 0 74px; color: var(--ink-4); font-size: 12.5px; padding-top: 2px; letter-spacing: .04em; }
.kv__v { flex: 1; font-size: 14.5px; line-height: 1.7; min-width: 0; }
.kv__v ul { margin: 0; padding-left: 17px; }
.kv__v li { margin: 4px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--ochre-soft); color: var(--ochre);
  border-radius: 4px; padding: 3px 9px; font-size: 12.5px;
}
.chip--risk { background: var(--cinnabar-soft); color: var(--cinnabar-deep); }

/* ---------------------------------------------------------- Markdown */
.md { font-size: 14.5px; color: var(--ink-2); }
.md-h {
  font-family: var(--font-serif); font-size: 15.5px; color: var(--ink);
  margin: 20px 0 9px; font-weight: 700; letter-spacing: .06em;
  padding-bottom: 7px; border-bottom: 1px solid var(--line-soft);
}
.md-h:first-child { margin-top: 0; }
.md-p { margin: 9px 0; line-height: 1.8; }
.md-list { margin: 9px 0; padding-left: 19px; }
.md-list li { margin: 6px 0; line-height: 1.75; }
.md-list--todo { list-style: none; padding-left: 2px; }
.md-list--todo li { position: relative; padding-left: 22px; }
.md-list--todo li::before {
  content: ''; position: absolute; left: 0; top: .48em;
  width: 12px; height: 12px; border: 1.5px solid var(--ochre); border-radius: 3px;
}
.md-hr { border: 0; border-top: 1px solid var(--line-soft); margin: 18px 0; }
.md code { background: var(--paper-3); padding: 1px 5px; border-radius: 3px; font-size: 13px; }

/* ---------------------------------------------------------- 对话（追问） */
.chat { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 12px; }
.msg { display: flex; gap: 9px; max-width: 100%; }
.msg--me { flex-direction: row-reverse; }
.msg__av {
  width: 30px; height: 30px; border-radius: 5px; flex: 0 0 30px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 12px; font-weight: 700;
}
.msg__av--shiye { background: var(--cinnabar); color: #fff; }
.msg__av--me { background: var(--paper-3); color: var(--ink-3); }
.msg__b {
  max-width: 82%; padding: 11px 14px; border-radius: var(--r);
  font-size: 14.5px; line-height: 1.78; overflow-wrap: anywhere;
}
.msg--shiye .msg__b {
  background: var(--paper-2); border: 1px solid var(--line);
  border-top-left-radius: 3px; font-family: var(--font-serif); color: var(--ink);
}
.msg--me .msg__b {
  background: var(--ink); color: #f4eee2; border-top-right-radius: 3px;
}
.msg__b p { margin: 0 0 8px; }
.msg__b p:last-child { margin-bottom: 0; }
.msg__b strong { color: var(--cinnabar-deep); }
.msg--me .msg__b strong { color: #e8b98a; }
.msg__b ul { margin: 6px 0; padding-left: 18px; }

/* 追问输入条 */
.composer {
  position: fixed; bottom: 0; left: 0; right: 0; margin: 0 auto;
  max-width: var(--maxw); z-index: 70;
  background: rgba(246,241,231,.97); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 10px 12px calc(10px + var(--safe-b));
  display: flex; gap: 8px; align-items: flex-end;
}
.composer__in {
  flex: 1; border: 1px solid var(--line); border-radius: 19px;
  padding: 9px 15px; font-size: 15px; font-family: inherit; background: var(--paper-2);
  color: var(--ink); outline: none; resize: none; min-height: 40px; max-height: 120px;
  line-height: 1.5;
}
.composer__in:focus { border-color: var(--ink-3); }
.composer__btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; flex: 0 0 40px;
  background: var(--ink); color: #f6f1e7; font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.composer__btn:disabled { opacity: .35; }
.composer__btn--mic { background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); }
.composer__btn--rec { background: var(--cinnabar); border-color: var(--cinnabar); color: #fff;
  animation: rec-pulse 1.2s infinite; }
@keyframes rec-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* 追问建议 */
.asks { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.ask {
  border: 1px solid var(--line); background: var(--paper-2); border-radius: 999px;
  padding: 7px 13px; font-size: 13px; color: var(--ink-2); cursor: pointer;
  font-family: inherit;
}
.ask:active { background: var(--paper-3); }

/* 打字中的三个点 */
.typing { display: inline-flex; gap: 4px; padding: 3px 0; }
.typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4);
  animation: tp 1.3s infinite;
}
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes tp { 0%,60%,100% { opacity: .28; transform: translateY(0); }
                30% { opacity: 1; transform: translateY(-3px); } }

/* ---------------------------------------------------------- 列表 */
.list { background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; }
.item {
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.item:last-child { border-bottom: 0; }
.item:active { background: var(--paper); }
.item__main { flex: 1; min-width: 0; }
.item__t { font-size: 14.5px; font-weight: 500; margin-bottom: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__s { font-size: 12px; color: var(--ink-4);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__arrow { color: var(--ink-4); font-size: 15px; }

.avatar {
  width: 38px; height: 38px; border-radius: var(--r-s); flex: 0 0 38px;
  background: var(--ink); color: #f6f1e7; display: flex; align-items: center;
  justify-content: center; font-family: var(--font-serif); font-size: 16px; font-weight: 700;
}

/* ---------------------------------------------------------- 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; margin: 0 auto;
  width: 100%; max-width: var(--maxw); z-index: 60;
  background: rgba(246,241,231,.96); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex; padding-bottom: var(--safe-b);
}
.tabbar__i {
  flex: 1; text-align: center; padding: 13px 0 14px; cursor: pointer;
  font-family: var(--font-serif);
  font-size: 14px; color: var(--ink-4); letter-spacing: .28em; text-indent: .28em;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  transition: color .16s;
}
.tabbar__i--on { color: var(--ink); font-weight: 700; }
.tabbar__dot {
  width: 5px; height: 5px; border-radius: 50%; background: transparent;
  transition: background .16s;
}
.tabbar__i--on .tabbar__dot { background: var(--cinnabar); }

/* ---------------------------------------------------------- 空态 */
.empty { text-align: center; padding: 56px 26px; color: var(--ink-4); }
.empty__seal { margin: 0 auto 18px; }
.empty__t { font-family: var(--font-serif); font-size: 15px; line-height: 1.9; color: var(--ink-3); }

.hint { font-size: 12px; color: var(--ink-4); line-height: 1.7; margin-top: 9px; }
.hint--c { text-align: center; }

/* ---------------------------------------------------------- 提示层 */
.sy-toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: rgba(27,25,23,.93); color: #f6f1e7; padding: 13px 20px;
  border-radius: var(--r-s); font-size: 14px; z-index: 9000; max-width: 78vw;
  text-align: center; animation: fade .18s;
}
.sy-toast--out { opacity: 0; transition: opacity .2s; }
@keyframes fade { from { opacity: 0; transform: translate(-50%,-46%); } }

.sy-loading { position: fixed; inset: 0; background: rgba(246,241,231,.7); z-index: 8000;
  display: flex; align-items: center; justify-content: center; }
.sy-loading__box {
  background: var(--ink); color: #f6f1e7; border-radius: var(--r);
  padding: 24px 26px; text-align: center; min-width: 158px;
}
.sy-loading__t { font-size: 13.5px; margin-top: 13px; letter-spacing: .05em; }
.sy-loading__s { font-size: 11.5px; color: rgba(246,241,231,.5); margin-top: 5px; }
.sy-spinner { width: 26px; height: 26px; margin: 0 auto; border-radius: 50%;
  border: 2px solid rgba(246,241,231,.22); border-top-color: #e8b98a;
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sy-mask { position: fixed; inset: 0; background: rgba(27,25,23,.42); z-index: 8500;
  display: flex; align-items: center; justify-content: center; padding: 28px; }
.sy-dialog { background: var(--paper-2); border-radius: var(--r); width: 100%;
  max-width: 320px; overflow: hidden; animation: pop .16s; }
@keyframes pop { from { opacity: 0; transform: scale(.95); } }
.sy-dialog__t { padding: 20px 20px 6px; font-size: 15.5px; font-weight: 700;
  text-align: center; font-family: var(--font-serif); letter-spacing: .06em; }
.sy-dialog__b { padding: 4px 20px 18px; font-size: 13.5px; color: var(--ink-3);
  text-align: center; line-height: 1.75; }
.sy-dialog__a { display: flex; border-top: 1px solid var(--line); }
.sy-dialog__btn { flex: 1; border: 0; background: transparent; padding: 14px;
  font-size: 15px; font-family: inherit; cursor: pointer; color: var(--ink-3); }
.sy-dialog__btn:first-child { border-right: 1px solid var(--line); }
.sy-dialog__btn--p { color: var(--cinnabar); font-weight: 600; }

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

/* ---------------------------------------------------------- 归属条 */
/* 归集是自动的，就必须让用户看得见、改得动 —— 否则归错了会一直错下去 */
.belong {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--ochre-soft); border: 1px solid #e5d9bf;
  border-radius: var(--r-s); padding: 9px 12px; margin-bottom: 10px;
}
.belong__k {
  font-size: 10.5px; letter-spacing: .1em; color: #8a6a2f;
  background: #fff; border-radius: 3px; padding: 2px 6px; flex: 0 0 auto;
}
.belong__t { font-family: var(--font-serif); font-size: 13.5px; font-weight: 600;
  color: #6d5420; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.belong__n { font-size: 11.5px; color: #8a6a2f; flex: 0 0 auto; }
.belong__x { margin-left: auto; font-size: 11.5px; color: var(--cinnabar);
  border: 1px solid var(--cinnabar); border-radius: 3px; padding: 1px 7px; flex: 0 0 auto; }

/* ---------------------------------------------------------- 办事列表 */
.threads { display: flex; flex-direction: column; gap: 10px; }
.th {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 15px; cursor: pointer;
}
.th:active { background: var(--paper); }
.th__head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.th__title { font-family: var(--font-serif); font-size: 15.5px; font-weight: 700;
  color: var(--ink); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th__status { font-size: 11px; padding: 2px 8px; border-radius: 999px; flex: 0 0 auto; }
.th__status--open { background: #e8f2ea; color: #2f7a4c; }
.th__status--waiting { background: var(--ochre-soft); color: var(--ochre); }
.th__status--closed { background: #eee; color: var(--ink-4); }
.th__last { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.th__foot { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--ink-4); }
.th__warn { margin-left: auto; color: var(--cinnabar-deep); background: var(--cinnabar-soft);
  padding: 2px 8px; border-radius: 3px; font-size: 11px; }
.th__meta { font-size: 12px; color: rgba(244,238,226,.6); margin-top: 10px; }

/* ---------------------------------------------------------- 事项时间线 */
.tl { display: flex; gap: 12px; padding-bottom: 4px; }
.tl__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cinnabar);
  flex: 0 0 9px; margin-top: 6px; position: relative; }
.tl__dot::after { content: ''; position: absolute; left: 50%; top: 13px;
  width: 1px; height: calc(100% + 40px); background: var(--line); transform: translateX(-50%); }
.tl:last-child .tl__dot::after { display: none; }
.tl__body { flex: 1; padding-bottom: 20px; min-width: 0; }
.tl__head { font-size: 11.5px; color: var(--ink-4); letter-spacing: .08em; margin-bottom: 7px; }
.tl__quote { font-size: 13.5px; color: var(--ink-2); line-height: 1.7;
  background: var(--paper); border-left: 3px solid var(--line);
  padding: 9px 11px; border-radius: 0 var(--r-s) var(--r-s) 0;
  white-space: pre-wrap; word-break: break-word; margin-bottom: 8px; }
.tl__sum { font-size: 13.5px; color: var(--ink); line-height: 1.7; margin-bottom: 9px;
  font-family: var(--font-serif); }

/* ---------------------------------------------------------- 事项选择器 */
.pick { max-height: 46vh; overflow-y: auto; padding: 4px 12px 10px; }
.pick__i { padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-s);
  margin-bottom: 7px; cursor: pointer; }
.pick__i:active { background: var(--paper); }
.pick__t { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.pick__s { font-size: 11.5px; color: var(--ink-4); }
.pick__empty { text-align: center; color: var(--ink-4); font-size: 13px; padding: 18px 0; }

/* ---------------------------------------------------------- 分享卡画布 */
#shareCanvas { position: fixed; left: -9999px; top: 0; }

/* ---------------------------------------------------------- 桌面 */
@media (min-width: 501px) {
  body { background: #e8e2d5; }
  #app { box-shadow: 0 0 46px rgba(27,25,23,.1); background: var(--paper); }
}
