/* ==========================================================================
   个人待办 · 视觉系统
   风格：柔和森林绿 + 米绿纸感（Claude 的暖调）× 低对比层次与柔和阴影（Notion）
   用途：个人场景，要的是「被照顾、有生气」的感觉，所以——
     ① 底色是极淡的米绿（带一点暖），不用冷蓝灰
     ② 主色是沉稳的森林绿，代表「生长 / 日常」；琥珀只做点缀，不抢主色
     ③ 圆角大、阴影软、描边轻
     ④ 字体统一微软雅黑；数字用等宽数字（tabular-nums）对齐

   对比度（本轮校验过的，均按 WCAG 2.1 普通文本 4.5:1 / 大字与图形 3:1）：
     · 深浅两套都过了 4.5:1。关键调整：
       – 浅色 --text-3  由 #9AA694(2.54) 提到 #6E7A6A(4.51)
       – 浅色 --brand   由 #4F8A64(白字 4.08) 提到 #467A5A(白字 5.01)
       – 深色 --text-3  由 #78857A(4.12) 提到 #8E9C90(5.33)
     · 深色模式主色是「亮绿」(#7CBB92)，白字在上面只有 2.24:1，
       所以绿底上的文字不能写死 #fff，必须走 --on-brand（浅色=白，深色=墨绿）。
       这是本项目最容易埋雷的一处：新增任何绿底元素都要用 --on-brand。
   ========================================================================== */

/* ============ 设计令牌 ============ */
:root {
  /* 表面：米绿纸 → 浅绿白 → 纯白，三级递进 */
  --bg:          #F5F7F1;
  --bg-2:        #EEF3E9;
  --surface:     #FFFFFF;
  --surface-2:   #F5F8F2;
  --surface-3:   #ECF1E8;

  --border:      #E5EBE0;
  --border-2:    #D5DFCF;

  /* 文字：墨绿近黑，不用纯黑 */
  --text:        #2F3A33;
  --text-2:      #5F6B60;   /* 5.59:1 on --surface */
  --text-3:      #64705C;   /* 5.23:1 on surface / 4.88:1 on surface-2（小字也读得清） */

  /* 品牌：森林绿 */
  --brand:       #467A5A;   /* 白字 5.01:1（原 #4F8A64 只有 4.08） */
  --brand-2:     #3A6849;
  --brand-soft:  #E9F2EB;
  --brand-line:  #CFE2D4;
  /* 品牌底上的文字色：深色模式主色变亮，白字会糊，必须跟着反转 */
  --on-brand:    #FFFFFF;

  /* 辅助：浅草绿 / 琥珀（点缀）/ 陶红 */
  --sage:        #6B9A7C;   /* 3.21:1，用于 20px 加粗数字（大字门槛 3:1） */
  --sage-soft:   #EDF5EF;
  --ok:          #5D9A74;
  --ok-soft:     #E9F3EC;
  --warn:        #C08A2E;
  --warn-soft:   #FAF2DE;
  --danger:      #B5513F;   /* 4.98:1（原 #C25B4A 是 4.29，小号红标签不够） */
  --danger-soft: #FBECE9;
  --danger-line: #EBC9C1;   /* 逾期卡片的描边，比 --danger 淡，只做圈定不做强调 */

  --shadow-sm:   0 1px 2px rgba(45, 62, 50, .05);
  --shadow:      0 1px 2px rgba(45, 62, 50, .05), 0 6px 20px -8px rgba(45, 62, 50, .13);
  --shadow-lg:   0 -10px 40px -12px rgba(45, 62, 50, .26);
  --shadow-pop:  0 18px 50px -18px rgba(45, 62, 50, .34);

  --radius:      16px;
  --radius-sm:   12px;
  --radius-lg:   24px;

  --glow: radial-gradient(1100px 520px at 50% -18%, #FCFDFA 0%, rgba(252, 253, 250, 0) 62%);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  /* 正文与标题统一微软雅黑。非 Windows 平台回退到苹方 / 思源黑体，
     字形气质接近，不会掉到衬线族上去。 */
  --font-sans: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB",
               "Noto Sans SC", "Source Han Sans SC", "Helvetica Neue", Helvetica,
               Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg:          #121713;
  --bg-2:        #181F19;
  --surface:     #1C241D;
  --surface-2:   #232C24;
  --surface-3:   #2B362C;

  --border:      #2E3A2F;
  --border-2:    #3C4A3E;

  --text:        #E9EFE8;
  --text-2:      #A9B5A7;
  --text-3:      #8E9C90;   /* 5.33:1（原 #78857A 只有 4.12） */

  --brand:       #7CBB92;
  --brand-2:     #6AA882;
  --brand-soft:  #1F2E24;
  --brand-line:  #33473A;
  /* 亮绿底上必须用深色文字，否则只有 2.24:1 */
  --on-brand:    #12241A;

  --sage:        #93C0A1;
  --sage-soft:   #1E2C23;
  --ok:          #93C0A1;
  --ok-soft:     #1E2C23;
  --warn:        #DDB163;
  --warn-soft:   #382F1C;
  --danger:      #DE8F7C;
  --danger-soft: #3A2620;
  --danger-line: #5A362C;

  --shadow-sm:   0 1px 2px rgba(0, 0, 0, .3);
  --shadow:      0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
  --shadow-lg:   0 -10px 40px -12px rgba(0, 0, 0, .6);
  --shadow-pop:  0 18px 50px -18px rgba(0, 0, 0, .7);

  --glow: radial-gradient(1100px 520px at 50% -18%, #181F19 0%, rgba(24, 31, 25, 0) 62%);
}

/* ============ 基础 ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
html { overflow: hidden; }
body {
  font-family: var(--font-sans);
  background: var(--glow), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  overflow: hidden;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
.hidden { display: none !important; }
button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select {
  font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px; width: 100%; outline: none;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus {
  border-color: var(--brand-line); background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea { resize: vertical; }
input[type="date"], input[type="time"] { min-height: 44px; }
::selection { background: var(--brand-soft); }

/* 数字一律等宽，避免跳动 */
.num, .ov-item b, .stat-tile b, .rank-val, .bar-x { font-variant-numeric: tabular-nums; }

/* ============ 启动屏（骨架屏） ============
   原来的「转圈」只说明「在等」，不说明在等什么；慢网下还留一整屏空白。
   骨架屏先把最终布局的轮廓搭出来，内容到位后再替换 —— 感知等待更短，
   而且不会出现元素「突然跳出来」的位移。 */
.boot-screen {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column;
  background: var(--glow), var(--bg);
  padding: calc(var(--safe-t) + 10px) 0 calc(var(--safe-b) + 18px);
}
.sk-wrap { flex: 1; min-height: 0; overflow: hidden; }
.sk {
  display: block; background: var(--surface-3); border-radius: 10px;
  position: relative; overflow: hidden;
}
.sk::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-100%); animation: skSweep 1.25s ease-in-out infinite;
}
html[data-theme="dark"] .sk::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent);
}
@keyframes skSweep { to { transform: translateX(100%); } }

.sk-top { display: flex; align-items: center; gap: 9px; padding: 12px 12px 8px; }
.sk-round { width: 34px; height: 34px; border-radius: 12px; }
.sk-bar { height: 13px; border-radius: 7px; }

.sk-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 14px 10px; }
.sk-tile { height: 62px; border-radius: 14px; }

.sk-chips { display: flex; gap: 7px; padding: 4px 14px 10px; }
.sk-chip { height: 32px; width: 66px; border-radius: 999px; }

.sk-block { height: 46px; margin: 0 14px 10px; border-radius: 14px; }

.sk-list { display: flex; flex-direction: column; gap: 9px; padding: 0 14px; }
.sk-row { height: 76px; border-radius: 18px; }

.boot-text {
  color: var(--text-3); font-size: 13.5px; margin: 0; text-align: center;
  letter-spacing: .02em; padding-top: 4px;
}
@media (prefers-reduced-motion: reduce) { .sk::after { animation: none; } }

/* ============ 登录页 ============ */
.auth-screen {
  height: 100%; overflow-y: auto;
  padding: calc(var(--safe-t) + 56px) 24px calc(var(--safe-b) + 24px);
  max-width: 460px; margin: 0 auto;
  display: flex; flex-direction: column;
}
.auth-head { text-align: center; margin-bottom: 34px; }
.auth-logo {
  width: 76px; height: 76px; border-radius: 28px; margin: 0 auto 18px; color: var(--brand);
  background: linear-gradient(160deg, #E7F1E9, var(--brand-soft));
  border: 1px solid var(--brand-line);
  display: grid; place-items: center;
  box-shadow: 0 10px 30px -12px rgba(70, 122, 90, .5);
}
.auth-head h1 {
  font-family: var(--font-sans); font-size: 27px; margin: 0 0 8px;
  letter-spacing: .06em; font-weight: 600; color: var(--text);
}
.auth-sub { color: var(--text-2); font-size: 14px; margin: 0; letter-spacing: .04em; }

.auth-form {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 20px;
  box-shadow: var(--shadow);
}
.form-hint { color: var(--text-3); font-size: 12.5px; margin: 0; line-height: 1.6; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 12.5px; color: var(--text-2); font-weight: 500; letter-spacing: .03em; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.link-mini { font-size: 12.5px; color: var(--brand); font-weight: 600; padding: 0 2px; }

.btn-primary {
  background: var(--brand); color: var(--on-brand); font-weight: 600; letter-spacing: .03em;
  padding: 13px 18px; border-radius: var(--radius-sm); width: 100%;
  box-shadow: 0 6px 18px -8px rgba(70, 122, 90, .7);
  transition: opacity .18s, transform .12s, background .18s;
}
.btn-primary:active { transform: scale(.985); background: var(--brand-2); }
.btn-primary:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn-sm { width: auto; padding: 8px 16px; font-size: 13.5px; border-radius: 10px; }
.btn-ghost {
  background: var(--surface-2); color: var(--text-2); font-weight: 500;
  padding: 10px 15px; border-radius: 11px; border: 1px solid var(--border);
  transition: background .18s, border-color .18s;
}
.btn-ghost:active { background: var(--surface-3); }
.btn-link { color: var(--brand); font-size: 14px; text-align: center; padding: 6px; font-weight: 500; }
.auth-msg {
  margin: 18px 0 0; text-align: center; font-size: 13.5px;
  color: var(--danger); min-height: 20px;
}
.auth-msg.is-ok { color: var(--sage); }

/* ============ 网站页脚（ICP 备案号） ============
   登录页是 flex 纵向容器，这里用 margin-top:auto 把它压到可视区底部：
   登录内容少时贴着屏幕底边（不用滚动就能看到），内容多时自然跟在表单后面。 */
.auth-foot { margin-top: auto; padding-top: 30px; text-align: center; }
.auth-foot-link {
  display: inline-block; padding: 6px 10px; border-radius: 8px;
  color: var(--text-2); font-size: 13px; letter-spacing: .02em;
  transition: color .18s;
}
.auth-foot-link:active { color: var(--brand); }

/* ============ 主应用骨架（顶栏 + 底栏固定，中区滚动） ============ */
.app {
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh; overflow: hidden;
  max-width: 640px; margin: 0 auto; position: relative;
}
.app-scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.app-scroll::-webkit-scrollbar { display: none; }

/* 顶栏 */
.topbar {
  flex: 0 0 auto; position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-t) + 10px) 12px 8px;
  background: var(--bg);
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--border); opacity: 0; transition: opacity .22s;
}
.app.is-scrolled .topbar { box-shadow: 0 10px 22px -20px rgba(45, 62, 50, .9); }
.app.is-scrolled .topbar::after { opacity: 1; }

.brand-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 8px; border-radius: 14px; color: var(--text);
  transition: background .18s;
}
.brand-btn:active { background: var(--surface-2); }
.home-ico { width: 19px; height: 19px; color: var(--brand); }
.home-name {
  font-family: var(--font-sans); font-size: 19px; font-weight: 600;
  letter-spacing: .04em; max-width: 168px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brand-btn .chev { color: var(--text-3); width: 15px; height: 15px; }

.topbar-right { display: flex; align-items: center; gap: 1px; }

/* 多选模式：整条顶栏换成选择栏（selection mode 惯例，别让用户猜自己在什么状态） */
.select-bar { background: var(--brand); }
.select-bar .icon-btn { color: var(--on-brand); }
.select-bar .icon-btn:active { background: rgba(255, 255, 255, .22); color: var(--on-brand); }
.sel-count { font-size: 15px; font-weight: 600; color: var(--on-brand); letter-spacing: .02em; }
.sel-all {
  color: var(--on-brand); font-size: 13px; font-weight: 600;
  padding: 7px 13px; border-radius: 10px; background: rgba(255, 255, 255, .2);
  transition: background .16s;
}
.sel-all:active { background: rgba(255, 255, 255, .34); }
.icon-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px; color: var(--text-2);
  transition: background .18s, color .18s;
}
.icon-btn:active { background: var(--surface-2); color: var(--text); }

/* 概览条 */
.overview {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 14px 10px;
}
  .ov-head { display: flex; align-items: baseline; gap: 8px; }
  .ov-head b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
  .ov-head > span { font-size: 12.5px; color: var(--text-3); }
  .ov-headline {
    margin-left: auto; font-style: normal; text-align: right;
    font-size: 12.5px; font-weight: 600; color: var(--brand-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .ov-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ov-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 11px 6px 9px;
  text-align: center; box-shadow: var(--shadow-sm); transition: transform .14s;
}
.ov-item:active { transform: scale(.97); }
.ov-item b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.ov-item span { font-size: 11px; color: var(--text-3); letter-spacing: .02em; }
.ov-item[data-jump="overdue"] b { color: var(--danger); }
.ov-item[data-jump="today"] b { color: var(--warn); }
.ov-item[data-jump="done"] b { color: var(--sage); }

/* 筛选条（吸顶） */
.toolbar-sticky {
  position: sticky; top: 0; z-index: 12;
  background: var(--bg);
}
.toolbar-row { display: flex; align-items: center; gap: 6px; padding: 4px 12px 10px 14px; }
.chips {
  display: flex; gap: 7px; padding: 0; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
/* 抽屉里的筛选条要换行铺满，不横向滚动 */
.chips-wrap { flex: none; flex-wrap: wrap; overflow: visible; gap: 8px; }
.filter-btn {
  position: relative; flex: 0 0 auto; width: 36px; height: 36px; padding: 0;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); display: grid; place-items: center;
  transition: background .18s, border-color .18s, color .18s;
}
.filter-btn.is-on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-2); }
.fbadge {
  position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center;
}
.field-tip { margin: 0; font-size: 12px; color: var(--text-3); line-height: 1.6; }

/* 逾期置顶提示条 */
.overdue-notice {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px; padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft); border: 1px solid var(--danger-line);
  color: var(--danger); font-size: 12.5px; font-weight: 600;
}
.overdue-notice .ico { flex: 0 0 auto; }
.overdue-notice span { flex: 1; min-width: 0; }
.ovn-act {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--danger);
  text-decoration: underline; text-underline-offset: 2px;
}
.task-item.is-overdue { border-color: var(--danger-line); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 15px; border-radius: 999px;
  background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--border); transition: all .18s; white-space: nowrap;
}
.chip.is-on {
  background: var(--brand); color: var(--on-brand); border-color: var(--brand);
  font-weight: 600; box-shadow: 0 4px 14px -6px rgba(70, 122, 90, .8);
}

/* 成员筛选栏 */
/* 成员筛选栏：超出一屏时右边缘渐隐。没有这一层时最后一个头像被硬裁一半，
   会被读成「界面坏了」。渐隐只在「右侧确实还有内容」时出现（JS 打 is-fade-r）。 */
.member-bar {
  display: flex; gap: 8px; padding: 2px 14px 10px; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.member-bar::-webkit-scrollbar { display: none; }
.member-bar.is-fade-r {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent 100%);
}
.member-bar.is-fade-l {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 34px);
          mask-image: linear-gradient(to right, transparent 0, #000 34px);
}
.member-bar.is-fade-l.is-fade-r {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 34px, #000 calc(100% - 34px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 34px, #000 calc(100% - 34px), transparent 100%);
}
/* 筛选条同理 */
.chips.is-fade-r {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
}
.mb-avatar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  padding: 5px 13px 5px 5px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: 13px; color: var(--text-2); transition: all .18s;
}
.mb-avatar .dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; color: #fff; flex: 0 0 auto;
}
.mb-avatar.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--text); font-weight: 600; }

/* 反馈横幅：离线 / 网关拦截 / 需要一次决策的通知，统一从这里出 */
.fb-banner {
  flex: 0 0 auto; display: flex; align-items: center; gap: 9px;
  padding: calc(var(--safe-t) + 9px) 13px 9px;
  font-size: 12.5px; line-height: 1.5;
  background: var(--warn-soft); color: var(--warn);
  border-bottom: 1px solid var(--border);
  animation: fadeIn .2s ease;
}
.app.has-banner .topbar { padding-top: 8px; }
.fb-banner .fbb-text { flex: 1; min-width: 0; }
.fb-banner.tone-error { background: var(--danger-soft); color: var(--danger); }
.fb-banner.tone-info  { background: var(--brand-soft); color: var(--brand-2); }
.fb-banner.tone-ok    { background: var(--ok-soft);    color: var(--ok); }
.fbb-act {
  flex: 0 0 auto; font-size: 12px; font-weight: 600; padding: 4px 11px;
  border-radius: 999px; background: var(--surface); color: inherit;
  border: 1px solid currentColor;
}
.fbb-x { flex: 0 0 auto; color: inherit; opacity: .7; padding: 2px; }
.fbb-x .ico { width: 15px; height: 15px; }

/* 搜索 */
.search-wrap {
  position: relative; display: flex; align-items: center;
  margin: 0 14px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.search-ico { position: absolute; left: 13px; color: var(--text-3); pointer-events: none; }
.search-wrap input {
  border: none; background: transparent; padding-left: 37px; border-radius: 14px;
  box-shadow: none;
}
.search-wrap input:focus { background: transparent; box-shadow: none; }
.search-clear {
  position: absolute; right: 9px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-3); font-size: 12px;
  display: grid; place-items: center;
}

/* 批量操作条 */
.batch-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 14px 10px; padding: 10px 14px; border-radius: 14px;
  background: var(--brand); color: var(--on-brand);
  box-shadow: 0 8px 22px -12px rgba(70, 122, 90, .9);
}
.batch-count { font-size: 13.5px; font-weight: 600; }
.batch-actions { display: flex; gap: 4px; }
.batch-btn {
  color: var(--on-brand); font-size: 13px; padding: 6px 11px;
  border-radius: 9px; background: rgba(255, 255, 255, .18); font-weight: 500;
}
.batch-btn:active { background: rgba(255, 255, 255, .32); }

/* 列表 */
.list-wrap { padding: 0 14px 20px; }
.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }

.task-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-sm);
  position: relative; transition: transform .16s, opacity .2s, box-shadow .18s;
}
.task-item:active { box-shadow: var(--shadow); }
.task-item.p-high { box-shadow: inset 3px 0 0 var(--danger), var(--shadow-sm); }
.task-item.p-low { box-shadow: inset 3px 0 0 var(--border-2), var(--shadow-sm); }
.task-item.is-done { opacity: .52; }
.task-item.is-dragging { opacity: .4; transform: scale(.98); }
.task-item.is-over { box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.task-item.is-selected { border-color: var(--brand); background: var(--brand-soft); }

.tk-check {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--border-2); margin-top: 1px;
  display: grid; place-items: center; transition: all .18s;
}
.tk-check:active { transform: scale(.9); }
.tk-check.on { background: var(--sage); border-color: var(--sage); }
.tk-check.on::after {
  content: ''; width: 6px; height: 11px; border: 2px solid var(--on-brand);
  border-top: 0; border-left: 0; transform: rotate(42deg) translate(-1px, -1px);
}
.tk-check.partial { background: var(--brand); border-color: var(--brand); }
.tk-check.partial::after { content: ''; width: 9px; height: 2px; background: var(--on-brand); border-radius: 1px; }

.tk-body { flex: 1; min-width: 0; }
.tk-title { font-size: 15px; font-weight: 500; word-break: break-word; letter-spacing: .01em; }
.task-item.is-done .tk-title { text-decoration: line-through; color: var(--text-3); }
.tk-note { font-size: 12.5px; color: var(--text-3); margin-top: 4px; word-break: break-word; }

.tk-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; align-items: center; }
.tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--border);
}
.tag.due-over { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-weight: 600; }
.tag.due-today { background: var(--warn-soft); color: var(--warn); border-color: transparent; font-weight: 600; }
.tag.pri-high { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.tag.sub-prog { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

.tk-assignee {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; color: #fff; font-weight: 600;
}
.tk-assignee.none {
  background: var(--surface-2); color: var(--text-3); font-size: 13px;
  border: 1px dashed var(--border-2);
}

.tk-actions { display: flex; flex-direction: column; gap: 2px; }
.tk-more {
  width: 28px; height: 28px; border-radius: 9px; color: var(--text-3);
  display: grid; place-items: center; font-size: 15px;
}
.tk-more:active { background: var(--surface-2); }

.subtask-preview { margin-top: 9px; display: flex; flex-direction: column; gap: 5px; }
.st-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.st-row .st-box {
  width: 15px; height: 15px; border-radius: 5px; border: 1.5px solid var(--border-2);
  display: grid; place-items: center; flex: 0 0 auto;
}
.st-row .st-box.on { background: var(--sage); border-color: var(--sage); color: var(--on-brand); font-size: 10px; }
.st-row.on span { text-decoration: line-through; color: var(--text-3); }

/* 空态 */
.empty { text-align: center; padding: 52px 20px; }
.empty-ico {
  width: 56px; height: 56px; margin: 0 auto 15px; color: var(--text-3); opacity: .72;
}
.empty-ico svg { width: 100%; height: 100%; display: block; stroke-width: 1.35; }
.empty-title { font-family: var(--font-sans); font-size: 17px; font-weight: 600; margin: 0 0 7px; letter-spacing: .04em; }
.empty-sub { font-size: 13px; color: var(--text-3); margin: 0; line-height: 1.7; }
.empty-cta { margin-top: 18px; }

/* 输入区（固定底部） */
.composer {
  flex: 0 0 auto; position: relative; z-index: 18;
  padding: 9px 14px calc(var(--safe-b) + 10px);
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.composer-row { display: flex; align-items: center; gap: 8px; }
.composer-input {
  flex: 1; border-radius: 999px; padding: 12px 18px;
  background: var(--surface-2); border-color: transparent;
}
.composer-input:focus { background: var(--surface); border-color: var(--brand-line); }
.composer-btn {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-2);
  background: var(--surface-2); transition: all .18s;
}
.composer-btn:active { transform: scale(.93); }
.composer-btn .ico { width: 22px; height: 22px; }
.composer-mic {
  background: var(--brand); color: var(--on-brand);
  box-shadow: 0 6px 18px -8px rgba(70, 122, 90, .9);
}
.composer-mic.rec { background: var(--danger); animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 91, 74, .5); }
  50% { box-shadow: 0 0 0 12px rgba(194, 91, 74, 0); }
}
.composer-send {
  border-radius: 999px; background: var(--brand); color: var(--on-brand);
  padding: 11px 19px; font-weight: 600; font-size: 14px;
}

/* 语音浮层 */
.voice-overlay {
  position: absolute; left: 10px; right: 10px; bottom: calc(var(--safe-b) + 8px);
  background: var(--surface); border-radius: 22px; padding: 20px 18px 18px;
  box-shadow: var(--shadow-pop); z-index: 30; text-align: center;
  border: 1px solid var(--border);
}
.voice-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 34px; margin-bottom: 12px; }
.voice-wave i { width: 4px; border-radius: 2px; background: var(--brand); animation: wave .9s ease-in-out infinite; }
.voice-wave i:nth-child(1) { height: 12px; animation-delay: 0s; }
.voice-wave i:nth-child(2) { height: 24px; animation-delay: .12s; }
.voice-wave i:nth-child(3) { height: 34px; animation-delay: .24s; }
.voice-wave i:nth-child(4) { height: 24px; animation-delay: .36s; }
.voice-wave i:nth-child(5) { height: 12px; animation-delay: .48s; }
@keyframes wave { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.voice-text { font-size: 16px; font-weight: 500; min-height: 26px; line-height: 1.45; margin-bottom: 6px; word-break: break-word; }
.voice-text .interim { color: var(--text-3); }
.voice-hint { font-size: 12.5px; color: var(--text-3); margin-bottom: 15px; }
.voice-actions { display: flex; gap: 12px; justify-content: center; }
.vbtn { width: 52px; height: 52px; border-radius: 50%; font-size: 21px; display: grid; place-items: center; transition: transform .14s; }
.vbtn:active { transform: scale(.92); }
.vbtn .ico { width: 22px; height: 22px; }
.vbtn-cancel { background: var(--surface-2); color: var(--text-2); }
.vbtn-ok { background: var(--sage); color: var(--on-brand); box-shadow: 0 6px 18px -8px rgba(122, 169, 139, .9); }

/* ============ 抽屉 ============ */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(30, 42, 33, .42); z-index: 40;
  backdrop-filter: blur(2px); animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 88vh; display: flex; flex-direction: column;
  animation: slideUp .28s cubic-bezier(.22, .9, .3, 1);
  max-width: 640px; margin: 0 auto;
  box-shadow: var(--shadow-pop);
}
.sheet-tall { max-height: 92vh; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border-2); margin: 10px auto 4px; flex: 0 0 auto; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px 13px; border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.sheet-head h3 { font-family: var(--font-sans); font-size: 17px; margin: 0; font-weight: 600; letter-spacing: .06em; }
.sheet-body {
  padding: 18px 16px calc(var(--safe-b) + 24px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
}

/* 分段控件 */
.seg { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 13px; flex-wrap: wrap; }
.seg button {
  flex: 1; min-width: 62px; padding: 9px 6px; border-radius: 10px;
  font-size: 13px; color: var(--text-2); transition: all .16s;
}
.seg button.is-on {
  background: var(--surface); color: var(--brand); font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* 指派选择 */
.assignee-picker { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.assignee-picker::-webkit-scrollbar { display: none; }
.ap-item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ap-av {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-size: 20px; color: #fff; border: 2.5px solid transparent; transition: all .18s;
}
.ap-item span { font-size: 11.5px; color: var(--text-2); max-width: 54px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-item.is-on .ap-av { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ap-item.is-on span { color: var(--brand); font-weight: 600; }
.ap-item.none .ap-av { background: var(--surface-2); color: var(--text-3); border: 2.5px dashed var(--border-2); }

/* 分类 */
.cat-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  padding: 7px 14px; border-radius: 999px; font-size: 13px;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
  transition: all .16s;
}
.cat-chip.is-on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); font-weight: 600; }
.cat-chip.add { border-style: dashed; color: var(--brand); border-color: var(--brand-line); background: transparent; }
.cat-manage { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-manage-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 9px 7px 14px; border-radius: 999px; font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.cat-manage-chip .cdel { color: var(--text-3); font-size: 13px; line-height: 1; padding: 2px 3px; border-radius: 50%; }
.cat-manage-chip .cdel:active { background: var(--danger-soft); color: var(--danger); }
.cat-manage-chip.locked { opacity: .8; padding-right: 14px; }

/* 子任务编辑 */
.subtask-list { display: flex; flex-direction: column; gap: 8px; }
/* ---------- 编辑面板：更多设置折叠 ---------- */
.edit-more-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 11px 13px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: 13.5px; font-weight: 600;
  text-align: left; transition: background .16s, border-color .16s;
}
.edit-more-toggle:hover { border-color: var(--border-2); }
.edit-more-toggle .ico { width: 16px; height: 16px; color: var(--text-3); flex: 0 0 auto; }
.edit-more-toggle .emt-hint {
  flex: 1; min-width: 0; font-size: 12px; font-weight: 500; color: var(--brand-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.edit-more-toggle .emt-chev { transition: transform .2s ease; }
.edit-more-toggle.is-open { background: var(--brand-soft); border-color: var(--brand-line); }
.edit-more-toggle.is-open .ico { color: var(--brand-2); }
.edit-more-toggle.is-open .emt-chev { transform: rotate(180deg); }
.edit-more { display: flex; flex-direction: column; gap: 18px; }
.edit-more.hidden { display: none; }

/* ---------- 子任务（编辑面板） ---------- */
.subtask-edit { display: flex; align-items: center; gap: 8px; }
.subtask-edit input { flex: 1; padding: 9px 12px; font-size: 14px; }
.subtask-edit .sdel { color: var(--text-3); font-size: 15px; padding: 5px 7px; }
.subtask-edit .sck {
  flex: 0 0 auto; width: 22px; height: 22px; padding: 0;
  border-radius: 7px; border: 1.5px solid var(--border-2);
  background: var(--surface); color: transparent;
  display: grid; place-items: center; transition: background .16s, border-color .16s, color .16s;
}
.subtask-edit .sck svg {
  width: 14px; height: 14px; display: block;
  fill: none; stroke: currentColor; stroke-width: 2.3;
  stroke-linecap: round; stroke-linejoin: round;
}
.subtask-edit .sck.is-on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.subtask-edit.is-done input { text-decoration: line-through; color: var(--text-3); }

/* 个人抽屉 */
.inline-edit { display: flex; gap: 8px; align-items: center; }
.inline-edit input { flex: 1; }
.invite-box { display: flex; align-items: center; gap: 8px; }
.invite-box code {
  flex: 1; font-size: 19px; font-weight: 700; letter-spacing: .22em; text-indent: .22em;
  background: var(--brand-soft); color: var(--brand-2);
  padding: 12px 14px; border-radius: 13px; text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  border: 1px solid var(--brand-line);
}
.member-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 9px; }
.member-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; background: var(--surface-2); border-radius: 14px;
  border: 1px solid var(--border);
}
.member-row .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; color: #fff; flex: 0 0 auto; }
.member-row .mname { flex: 1; font-size: 14.5px; font-weight: 500; min-width: 0; }
.member-row .mrole {
  font-size: 11.5px; color: var(--brand-2); background: var(--brand-soft);
  padding: 3px 9px; border-radius: 999px; font-weight: 600;
}
.member-row .mdel { color: var(--text-3); font-size: 15px; padding: 5px 8px; }
.member-row .macct { font-size: 11.5px; color: var(--text-3); }
.member-row .macct.on { color: var(--sage); font-weight: 600; }
.member-row .mkey {
  font-size: 12px; color: var(--brand-2); background: var(--brand-soft);
  padding: 5px 10px; border-radius: 9px; font-weight: 600; flex: 0 0 auto;
}
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-email { font-size: 13.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-btns { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* 提醒卡 */
.remind-card, .cal-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px;
}
.remind-card > span:first-child, .cal-card > span:first-child { font-weight: 600; font-size: 14px; color: var(--text); }
.remind-windows { display: flex; flex-direction: column; gap: 9px; margin: 12px 0 8px; }
.remind-windows .chk {
  display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text);
  cursor: pointer;
}
.remind-windows .chk b { color: var(--brand-2); font-weight: 600; }
.remind-windows .chk input { width: 18px; height: 18px; accent-color: var(--brand); flex: 0 0 auto; }
.remind-actions, .cal-actions { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.remind-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--border-2);
}
.remind-toggle-row .rtext { font-size: 13.5px; color: var(--text); line-height: 1.45; }
.remind-toggle-row .rsub { color: var(--text-3); font-size: 11.5px; }

.cal-card .cal-box {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px dashed var(--border-2);
  border-radius: 13px; padding: 12px; margin-top: 10px;
}
.cal-card .cal-line { display: flex; align-items: center; gap: 9px; }
.cal-card .cal-line > span { color: var(--text-3); font-size: 12.5px; flex: 0 0 auto; }
.cal-card .cal-line code {
  flex: 1; min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; color: var(--brand-2); background: var(--surface-2);
  padding: 6px 9px; border-radius: 9px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-card .form-hint b { color: var(--text-2); }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 27px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: var(--border-2); transition: .2s; border-radius: 27px; }
.switch .slider::before {
  content: ''; position: absolute; height: 21px; width: 21px; left: 3px; top: 3px;
  background: #fff; transition: .2s; border-radius: 50%; box-shadow: var(--shadow-sm);
}
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(19px); background: var(--on-brand); }
.switch input:disabled + .slider { opacity: .45; }

/* 凭证盒 */
.cred-box {
  background: var(--brand-soft); border: 1px dashed var(--brand-line);
  border-radius: 14px; padding: 12px 13px;
  display: flex; flex-direction: column; gap: 8px;
}
.cred-line { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.cred-line > span { color: var(--text-3); flex: 0 0 42px; }
.cred-line code {
  flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px; font-weight: 600; color: var(--brand-2);
  background: var(--surface); padding: 5px 10px; border-radius: 9px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ============ 统计 ============ */
.period-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 0 2px;
}
.period-nav {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 18px; line-height: 1;
  display: grid; place-items: center; transition: background .16s;
}
.period-nav:active { background: var(--surface-3); }
.period-label {
  font-family: var(--font-sans); font-size: 18px; font-weight: 600;
  letter-spacing: .06em; color: var(--text);
}

.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-tile {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 6px; text-align: center;
}
.stat-tile b { display: block; font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.stat-tile span { font-size: 11px; color: var(--text-3); letter-spacing: .02em; }
.stat-tile.t-done b { color: var(--sage); }
.stat-tile.t-new b { color: var(--brand); }
.stat-tile.t-rate b { color: var(--text); }
.stat-tile.t-over b { color: var(--danger); }

.stat-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.stat-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.stat-card-head h4 {
  font-family: var(--font-sans); font-size: 14.5px; margin: 0;
  font-weight: 600; letter-spacing: .06em; color: var(--text);
}
.stat-card-head span { font-size: 11.5px; color: var(--text-3); }

/* 柱状趋势图 */
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 146px; padding-top: 18px; }
.bar-col {
  flex: 1 1 0; min-width: 5px; height: 100%; position: relative;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 5px;
}
.bar-track {
  flex: 1 1 auto; display: flex; align-items: flex-end;
  background: var(--surface-3); border-radius: 5px; overflow: hidden;
}
/* 峰值柱要放数值气泡，所以这一根不能裁切 */
.bar-col.is-peak .bar-track { overflow: visible; }
.bar-peak {
  position: absolute; left: 50%; top: -17px; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; line-height: 1;
  color: var(--brand-2); background: var(--surface);
  border: 1px solid var(--brand-line); border-radius: 7px;
  padding: 3px 5px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bar-peak::after {
  content: ''; position: absolute; left: 50%; bottom: -4px; margin-left: -3px;
  border: 3px solid transparent; border-top-color: var(--brand-line);
}
/* 本期一条都没完成：一片空柱子信息量为零，直接换成说明 + 引导 */
.trend-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; min-height: 118px; padding: 8px 10px; text-align: center;
}
.trend-empty .te-ico { width: 34px; height: 34px; color: var(--text-3); opacity: .75; }
.trend-empty .te-ico svg { width: 100%; height: 100%; display: block; stroke-width: 1.4; }
.trend-empty .te-title { font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.trend-empty .te-sub { font-size: 12px; color: var(--text-3); line-height: 1.6; max-width: 250px; }
.bar-fill {
  display: block; width: 100%; min-height: 3px; border-radius: 5px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  transition: height .35s cubic-bezier(.22, .9, .3, 1);
}
.bar-col.is-empty .bar-fill { background: var(--border-2); }
.bar-col.is-peak .bar-fill { background: linear-gradient(180deg, #8FC3A1, var(--brand-2)); }
.bar-col.is-today .bar-track { background: var(--brand-soft); }
.bar-x { font-size: 9.5px; color: var(--text-3); text-align: center; height: 12px; line-height: 12px; }

/* 排行 */
.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank-row { display: flex; align-items: center; gap: 10px; }
.rank-dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; color: #fff; flex: 0 0 auto; font-weight: 600;
}
.rank-name {
  flex: 0 0 auto; max-width: 30%; font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .35s; }
.rank-val { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--text-2); min-width: 26px; text-align: right; }

/* 亮点 */
.hilite-list { display: flex; flex-direction: column; gap: 10px; }
.hilite-item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text); }
.hilite-item .hico {
  width: 30px; height: 30px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 15px;
  background: var(--surface); border: 1px solid var(--border);
}
.hilite-item .hmain { flex: 1; min-width: 0; }
.hilite-item .hsub { display: block; font-size: 11.5px; color: var(--text-3); }
.hilite-item .hval { font-weight: 700; color: var(--brand-2); font-size: 14px; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 60; background: rgba(30, 42, 33, .45);
  display: grid; place-items: center; padding: 22px; animation: fadeIn .18s ease;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface); border-radius: 22px; padding: 22px;
  width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px;
  animation: popIn .22s cubic-bezier(.22, .9, .3, 1); max-height: 86vh; overflow-y: auto;
  box-shadow: var(--shadow-pop);
}
@keyframes popIn { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-sm { max-width: 320px; }
.modal h3 { font-family: var(--font-sans); font-size: 18px; margin: 0; font-weight: 600; letter-spacing: .06em; }
.modal-hint { font-size: 12.5px; color: var(--text-2); margin: -9px 0 0; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions button { flex: 1; }
.menu-item {
  display: flex; align-items: center; gap: 11px;
  text-align: left; padding: 13px 15px; border-radius: 13px;
  background: var(--surface-2); font-size: 14.5px; border: 1px solid var(--border);
  transition: background .16s; color: var(--text);
}
.menu-item .ico { color: var(--text-2); }
.menu-item:active { background: var(--surface-3); }

/* emoji / color 选择 */
.emoji-picker, .color-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-picker button {
  width: 42px; height: 42px; border-radius: 13px; font-size: 20px;
  background: var(--surface-2); border: 2px solid transparent; transition: all .16s;
}
.emoji-picker button.is-on { border-color: var(--brand); background: var(--brand-soft); }
.color-picker button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; transition: all .16s; }
.color-picker button.is-on { border-color: var(--text); transform: scale(1.12); }

/* 自绘确认弹窗（替代系统 confirm） */
.modal-confirm { text-align: center; align-items: center; gap: 12px; }
.confirm-ico {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 24px;
  background: var(--warn-soft); color: var(--warn);
}
.confirm-ico.is-danger { background: var(--danger-soft); color: var(--danger); }
.confirm-desc { font-size: 13.5px; color: var(--text-2); margin: 0; line-height: 1.65; }
.confirm-ico svg { width: 26px; height: 26px; display: block; }
.modal-confirm .modal-actions { width: 100%; margin-top: 4px; }
.btn-danger {
  background: var(--danger); color: var(--on-brand); font-weight: 600; letter-spacing: .03em;
  padding: 13px 18px; border-radius: var(--radius-sm);
  box-shadow: 0 6px 18px -8px rgba(194, 91, 74, .7);
  transition: opacity .18s, transform .12s, filter .18s;
}
.btn-danger:active { transform: scale(.985); filter: brightness(.94); }
.btn-danger:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }

/* Toast —— 反馈系统里最轻的一档。tone-* 让「成功 / 警告 / 失败」一眼可辨，
   而不是三条一模一样的黑条子。 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 96px);
  transform: translateX(-50%); z-index: 90;
  display: none; align-items: center; gap: 9px;
  background: rgba(32, 44, 34, .95); color: #F5FAF4;
  padding: 11px 18px; border-radius: 14px; font-size: 14px;
  max-width: 84vw;
  animation: toastIn .26s cubic-bezier(.22, .9, .3, 1);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-pop);
}
.toast.is-on { display: flex; }
.toast .ico { width: 17px; height: 17px; flex: 0 0 auto; }
.toast.tone-ok    { background: rgba(53, 92, 68, .96); }
.toast.tone-warn  { background: rgba(112, 82, 26, .96); }
.toast.tone-error { background: rgba(126, 55, 44, .96); }
html[data-theme="dark"] .toast { background: rgba(233, 239, 232, .95); color: #1C241D; }
html[data-theme="dark"] .toast.tone-ok    { background: rgba(147, 192, 161, .96); color: #12241A; }
html[data-theme="dark"] .toast.tone-warn  { background: rgba(221, 177, 99, .96); color: #2A1F08; }
html[data-theme="dark"] .toast.tone-error { background: rgba(222, 143, 124, .96); color: #33150E; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 列表提示条 */
.list-hint { margin: 0 0 9px; padding: 0 3px; font-size: 12.5px; color: var(--text-3); }

/* 底部选择器 */
.picker-sheet { padding-bottom: calc(var(--safe-b) + 10px); }
.picker-head { padding: 8px 18px 12px; border-bottom: 1px solid var(--border); }
.picker-head h3 { font-size: 16px; margin: 0; font-weight: 600; letter-spacing: .02em; }
.picker-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--text-3); }
.picker-list { padding: 13px 16px 2px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.picker-item {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 13px 14px; border-radius: 14px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border);
  transition: background .16s, transform .12s;
}
.picker-item:active { background: var(--surface-3); transform: scale(.99); }
.picker-item.is-on { background: var(--brand-soft); border-color: var(--brand-line); }
.picker-item.tone-danger { color: var(--danger); }
.picker-item.tone-danger .pi-ico { background: var(--danger-soft); border-color: transparent; }
.picker-item:disabled { opacity: .45; }
.pi-ico {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; font-size: 16px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
}
.pi-ico svg { width: 18px; height: 18px; }
.pi-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pi-txt b { font-size: 14.5px; font-weight: 600; }
.pi-txt i { font-style: normal; font-size: 12px; color: var(--text-3); }
.pi-check { color: var(--brand); font-weight: 700; }
.picker-cancel { margin: 10px 16px 0; }

/* ============ 桌面端 ============ */
@media (min-width: 641px) {
  .app { box-shadow: 0 0 0 1px var(--border); background: var(--bg); }
  .sheet { border-radius: var(--radius-lg); bottom: 16px; }
  .toast { bottom: 108px; }
}

/* ---------- 微信内置浏览器提示条（fixed：不参与布局，避免把页面撑出滚动） ---------- */
.wx-hint {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-t) + 8px) 12px 8px;
  background: #FCF5E4; color: #7C5A15;
  font-size: 12px; line-height: 1.45;
  border-bottom: 1px solid #EFE2C1;
  max-width: 640px; margin: 0 auto;
}
.wx-hint-txt { flex: 1; }
.wx-hint-btn {
  flex: none; padding: 4px 11px;
  border: 1px solid var(--brand); border-radius: 999px;
  background: #FFFFFF; color: var(--brand);
  font-size: 12px; line-height: 1.4; cursor: pointer;
}


/* ==========================================================================
   附：本轮新增的通用件
   ========================================================================== */

/* 手绘图标基类：<i class="ico">…svg…</i>
   尺寸由包装元素决定，颜色一律 currentColor，深浅色模式无需另配。 */
.ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex: 0 0 auto; vertical-align: -.15em;
}
.ico svg { width: 100%; height: 100%; display: block; }
.ico-sm { width: 16px; height: 16px; }
.ico-btn { width: 22px; height: 22px; }
.icon-btn .ico { width: 20px; height: 20px; }
.search-ico.ico { position: absolute; left: 13px; color: var(--text-3); pointer-events: none; }
.search-clear .ico { width: 13px; height: 13px; }

/* 字段标题 + 图标 */
.field-ico { display: inline-flex; align-items: center; gap: 7px; }
.field-ico .ico { color: var(--text-3); }

/* 反馈记录（更多 → 反馈记录） */
.fb-log {
  display: flex; flex-direction: column; gap: 7px;
  max-height: 46vh; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px;
}
.fb-log:empty::after {
  content: '还没有任何反馈记录'; display: block; text-align: center;
  font-size: 12.5px; color: var(--text-3); padding: 18px 0;
}
.fb-row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; line-height: 1.5; color: var(--text-2);
  padding: 7px 9px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--border);
}
.fb-row .ico { width: 15px; height: 15px; margin-top: 1px; color: var(--text-3); }
.fb-row.tone-ok .ico { color: var(--ok); }
.fb-row.tone-warn .ico { color: var(--warn); }
.fb-row.tone-error .ico { color: var(--danger); }
.fb-row .fb-txt { flex: 1; min-width: 0; word-break: break-word; }
.fb-row .fb-time { flex: 0 0 auto; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* —— 手绘图标在各处的落位尺寸（图标本体是 24 视口，靠容器定实际大小） —— */
.tag .ico { width: 13px; height: 13px; }
.hilite-item .hico svg { width: 16px; height: 16px; }
.rank-dot svg { width: 15px; height: 15px; }
.tk-assignee.none .ico { width: 15px; height: 15px; }
.api .pi-ico .ico, .pi-ico .ico { width: 18px; height: 18px; }
