/* 待办 · 专注 —— 电脑端（Vue 3 版）
   动画原则：位移不超过 12px、缓动用 cubic-bezier(.22,1,.36,1)，
   所有过渡都能被 prefers-reduced-motion 关掉。
*/

:root {
  --bg: #f7f7f4;
  --card: #ffffff;
  --line: #ececea;
  --ink: #111111;
  --sub: #6b6b6b;
  --muted: #9a9a9a;
  --faint: #c8c8c4;
  --green: #07C160;
  --green-soft: #eafaf1;
  --red: #e54d42;
  --red-soft: #fdeceb;
  --blue: #3b7cff;
  --blue-soft: #eaf0ff;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
b { font-weight: 700; }

#app { display: flex; min-height: 100vh; }

/* ---------------- 侧栏 ---------------- */
.side {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 190px;
  height: 100vh;
  padding: 34px 18px 22px;
  display: flex;
  flex-direction: column;
  background: transparent;
  border-right: 1px solid var(--line);
  animation: slideRight .5s var(--ease) both;
}

/* 品牌区三元素比例：图标 38 / 名称 18 / 标语 10.5 ≈ 4 : 2 : 1
   图标是视觉锚点，名称靠字重立住，标语最轻、只做注脚 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 6px 30px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--ink);
  text-decoration: none;
}
.brand-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}
.brand-name { letter-spacing: 2px; line-height: 1.15; }
.brand-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand-slogan {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: .4px;
  white-space: nowrap;
  line-height: 1;
}
.brand:hover .brand-name { color: var(--green); }

.side-site {
  margin: 10px 6px 0;
  font-size: 11px;
  color: var(--faint);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}
.side-site:hover { color: var(--green); }

/* 我的 · 页脚品牌 */
.me-foot {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.me-logo {
  width: 26px; height: 26px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.me-foot-t { font-size: 13px; font-weight: 700; }
.me-foot-l {
  margin-left: auto;
  font-size: 12px;
  color: var(--faint);
  text-decoration: none;
  transition: color .2s ease;
}
.me-foot-l:hover { color: var(--green); }

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-i {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  color: var(--sub);
  transition: background .2s var(--ease), color .2s var(--ease), transform .12s var(--ease);
  animation: riseIn .45s var(--ease) both;
}
.nav-i:nth-child(1) { animation-delay: .05s; }
.nav-i:nth-child(2) { animation-delay: .1s; }
.nav-i:nth-child(3) { animation-delay: .15s; }
.nav-i:nth-child(4) { animation-delay: .2s; }

.nav-i:hover { background: #f0f0ec; color: var(--ink); }
.nav-i:active { transform: scale(.98); }
.nav-i.active { background: #fff; color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); }

/* 四个主功能图标：与小程序同款，选中绿色 / 未选中灰色（src 由 Vue 切换） */
.nav-ic {
  width: 21px; height: 21px;
  flex-shrink: 0;
  object-fit: contain;
  transition: transform .25s var(--ease-spring);
}
.nav-i.active .nav-ic { transform: scale(1.08); }

/* 菜单圆点：仅「小号人 / 退出登录 / 登录 / 注册」等次级行使用 */
.nav-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 2px solid #c2cfc5;
  background: transparent;
  flex-shrink: 0;
  transition: border-color .2s ease, background .2s ease, transform .25s var(--ease-spring);
}
.nav-i:hover .nav-dot { border-color: #a9bcb0; }
.nav-i.active .nav-dot {
  background: var(--green);
  border-color: var(--green);
  transform: scale(1.05);
}

.nav-sep { height: 1px; margin: 12px 10px 10px; background: var(--line); }
.nav-i.sub { font-size: 13.5px; color: var(--muted); }
.nav-i.sub:hover { color: var(--ink); }
.nav-i.nav-me { font-weight: 700; color: var(--ink); cursor: default; }
/* 用户名行图标与小程序"小号人"一致：普通灰绿圆环（不再用绿点高亮） */

.side-foot {
  margin-top: auto;
  padding: 0 6px;
  font-size: 11px;
  line-height: 2;
  color: var(--faint);
  white-space: nowrap;
}
.kbd {
  display: inline-block;
  padding: 0 5px;
  border-radius: 4px;
  background: #efefec;
  font-size: 10.5px;
  color: var(--muted);
}

/* ---------------- 主区域 ---------------- */
.main { flex: 1; min-width: 0; padding: 28px 40px 130px; }
.view { max-width: 680px; margin: 0 auto; }

.head { display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 20px; }
.day-label { font-size: 30px; font-weight: 700; letter-spacing: -.6px; }
.day-date { margin-top: 6px; font-size: 12.5px; color: var(--muted); letter-spacing: .4px; }
.head-acts { display: flex; align-items: center; gap: 8px; }

/* 待办页标题区的日期块：整块可点，点开/收起日历。
   负 margin 抵消 padding，视觉位置和原来完全一致，不会把 header 撑高。 */
.head-toggle {
  cursor: pointer;
  user-select: none;
  margin: -6px -10px;
  padding: 6px 10px;
  border-radius: 12px;
  transition: background .18s ease;
}
.head-toggle:hover { background: #ececea; }
.head-toggle.open { background: #f2f4f1; }
/* 配色跟小程序日程页一致：平时黑字，点开日历（.open）后整块转主色绿。
   小字也用 --ink，不再走灰色，两端观感统一。
   顺序是「日期在上、今天在下」，所以原来的 margin-top 要换个位置：
   小字贴顶，间距落到下面的大标题上。 */
.head-toggle .day-label { color: var(--ink); margin-top: 0; transition: color .2s ease; }
.head-toggle .day-date { color: var(--ink); margin-top: 6px; transition: color .2s ease; }
/* 标题旁的小绿日历：寓意「这里能点出日历」，整块本来就是可点的，它只做视觉提示 */
.cal-hint {
  width: 14px;
  height: 14px;
  margin-left: 9px;
  vertical-align: 2px;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.9;
  stroke-linecap: round;
  opacity: .9;
  transition: opacity .2s ease;
}
.head-toggle:hover .cal-hint { opacity: 1; }
.head-toggle.open .day-date,
.head-toggle.open .day-label { color: var(--green); }
.date-caret {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  vertical-align: 1px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  transition: transform .26s var(--ease);
  opacity: .7;
}
.head-toggle.open .date-caret { transform: rotate(-135deg); }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  font-size: 21px;
  color: var(--sub);
  line-height: 1;
  transition: background .18s ease, color .18s ease, transform .1s ease;
}
.icon-btn:hover { background: #ececea; color: var(--ink); }
.icon-btn:active { transform: scale(.92); }

.ghost-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--sub);
  transition: background .18s ease, color .18s ease, opacity .18s ease;
}
.ghost-btn:hover:not(:disabled) { background: #ececea; color: var(--ink); }
.ghost-btn:disabled { opacity: .35; cursor: default; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12px;
  color: var(--sub);
  transition: color .2s ease, box-shadow .2s ease;
}
.pill.live { color: var(--green); box-shadow: inset 0 0 0 1px #c9efdb; }

.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--faint);
}
.pill.live .live-dot { background: var(--green); animation: pulse 1.6s ease-in-out infinite; }

/* ---------------- 任务 ---------------- */
.list { display: flex; flex-direction: column; position: relative; }

.task {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 6px 15px 4px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  transition: background .18s ease, box-shadow .18s ease;
  cursor: pointer;
}
.task:hover { background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .04); }
.task:active { background: #fafaf8; }
.task:active .ck { transform: scale(.9); }
.task:not(.is-done):hover .t-txt { color: #000; }

.ck {
  position: relative;
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform .15s var(--ease-spring);
}
.ck:hover { transform: scale(1.12); }
.ck:active { transform: scale(.9); }

.ck svg { width: 24px; height: 24px; overflow: visible; }
.ck rect {
  fill: transparent;
  /* 未勾选：灰描边（原来绿色，和小程序日程页对齐）；勾选后对勾仍走绿色 */
  stroke: #c6c6c1;
  stroke-width: 1.7;
  transition: stroke .25s ease, fill .25s ease;
}
.ck path {
  fill: none;
  stroke: transparent;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 18;
  stroke-dashoffset: 18;
  transition: stroke .2s ease, stroke-dashoffset .32s var(--ease) .05s;
}
.task:not(.is-done):hover .ck rect { fill: #f1f1ee; }
/* 已完成的任务只留一个绿勾，外框（含 hover 底色）一起去掉，让清单更安静 */
.task.is-done:hover .ck rect { fill: transparent; }

.task.is-done .ck rect { stroke: transparent; }
.task.is-done .ck path { stroke: var(--green); stroke-dashoffset: 0; }

.ck-burst {
  position: absolute;
  inset: -3px;
  border-radius: 7px;
  border: 2px solid var(--green);
  opacity: 0;
  pointer-events: none;
}
.ck.burst .ck-burst { animation: burst .55s var(--ease) forwards; }

.t-txt { flex: 1; min-width: 0; font-size: 16.5px; line-height: 1.45; word-break: break-word; transition: color .3s ease; }
.task.is-done .t-txt { color: var(--faint); text-decoration: line-through; text-decoration-color: #d9d9d4; }

.t-time {
  flex-shrink: 0;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.t-del {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--faint);
  opacity: 0;
  transform: translateX(4px);
  transition: opacity .18s ease, transform .18s var(--ease), color .18s ease, background .18s ease;
}
.t-del svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.task:hover .t-del { opacity: 1; transform: translateX(0); }
.t-del:hover { color: var(--red); background: #fdecec; }

/* 空状态 */
.empty { padding: 62px 0 24px; text-align: center; }
.empty-ring {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border: 2px dashed #e4e4e0;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.empty-ring span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #e4e4e0;
  animation: breathe 2.6s ease-in-out infinite;
}
.empty-t { font-size: 16px; font-weight: 700; color: #c0c0bc; }
.empty-d { margin-top: 8px; font-size: 12.5px; color: var(--faint); }

/* 空态标题行：文字 + 右侧绿描边胶囊「预设」，对齐小程序 todo 页空态 */
.empty-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.empty-preset {
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green);
  background: none;
  border: 1px solid var(--green);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.empty-preset:hover { background: var(--green-soft); }
.empty-preset:active { transform: scale(.97); }

/* 预设入口 */
.preset-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin: 18px 0 2px;
  padding: 8px 0;
  border-radius: 999px;
  font-size: 12px;
  color: var(--faint);
  transition: color .2s ease, background .2s ease;
}
.preset-link .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  transition: transform .25s var(--ease-spring);
}
.preset-link:hover { color: var(--green); background: #f2faf6; }
.preset-link:hover .dot { transform: scale(1.8); }

/* 输入条 */
.composer {
  position: sticky;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 10px 10px 10px 18px;
  background: var(--card);
  border-radius: 999px;
  box-shadow: 0 1px 0 var(--line) inset, 0 8px 24px rgba(0, 0, 0, .05);
  transition: box-shadow .25s ease, transform .25s var(--ease);
  z-index: 5;
}
.composer.focus {
  box-shadow: 0 1px 0 var(--line) inset, 0 10px 32px rgba(7, 193, 96, .14), 0 0 0 3px rgba(7, 193, 96, .1);
  transform: translateY(-2px);
}

.c-input { flex: 1; min-width: 0; height: 34px; border: 0; outline: none; background: none; }
.c-input::placeholder { color: var(--faint); }

.c-time {
  position: relative;
  flex-shrink: 0;
  min-width: 30px; height: 30px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  color: var(--faint);
  cursor: pointer;
  user-select: none;
  transition: color .2s ease, background .2s ease;
}
.c-time svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; flex-shrink: 0; }
.c-time:hover { background: #f4f4f1; color: var(--sub); }
.c-time.on { color: var(--green); background: var(--green-soft); }
.c-time-v { font-size: 12.5px; font-weight: 600; letter-spacing: .4px; }

/* ---------------- 自定义时间选择器 ---------------- */
.tp {
  position: absolute;
  right: 10px;
  bottom: calc(100% + 12px);
  width: 208px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--line) inset, 0 12px 36px rgba(0, 0, 0, .13);
  overflow: hidden;
  z-index: 30;
}
.tp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 7px;
  border-bottom: 1px solid var(--line);
}
.tp-title { flex: 1; font-size: 12px; color: var(--muted); }
.tp-clear {
  border: 0; background: none; padding: 0;
  font-size: 12px; color: var(--red);
  cursor: pointer;
}
.tp-clear:hover { text-decoration: underline; }
.tp-done {
  border: 0; background: none; padding: 0;
  font-size: 12.5px; font-weight: 600; color: var(--green);
  cursor: pointer;
}
.tp-done:hover { text-decoration: underline; }

.tp-cols { display: flex; }
.tp-col {
  flex: 1;
  height: 160px;               /* 5 行 × 32px */
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;       /* Firefox 隐藏滚动条 */
  overscroll-behavior: contain;
}
.tp-col::-webkit-scrollbar { display: none; }
.tp-col + .tp-col { border-left: 1px solid var(--line); }
.tp-pad { height: 64px; flex-shrink: 0; }   /* 上下各留 2 行空位，让首尾也能滚到中间 */
.tp-row {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--sub);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  scroll-snap-align: center;
  transition: background .12s ease, color .12s ease;
}
.tp-row:hover { background: #f7f7f4; color: var(--ink); }
.tp-row.sel {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

.tp-enter-active, .tp-leave-active { transition: opacity .18s ease, transform .18s var(--ease); }
.tp-enter-from, .tp-leave-to { opacity: 0; transform: translateY(6px) scale(.97); }

/* 时间弹层里的「加闹钟」开关 */
.tp-alarm {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
  transition: opacity .2s ease;
}
.tp-alarm.dis { opacity: .5; }
.tp-alarm-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tp-alarm-t { font-size: 13px; color: var(--ink); }
.tp-alarm-d { font-size: 11px; color: var(--muted); }
.tp-alarm .sw {
  position: relative;
  flex-shrink: 0;
  width: 38px; height: 22px;
  border-radius: 999px;
  background: #e2e2df;
  transition: background .25s var(--ease);
}
.tp-alarm .sw i {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .28s var(--ease-spring);
}
.tp-alarm .sw.on { background: var(--green); }
.tp-alarm .sw.on i { transform: translateX(16px); }

/* 待办上的小铃铛：未开是灰色描边，开了是绿色实心感 */
.t-bell {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  color: var(--faint);
  cursor: pointer;
  opacity: .9;
  transition: color .18s ease, background .18s ease, opacity .18s ease;
}
.t-bell svg {
  width: 14px; height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.t-bell:hover { background: #f4f4f1; color: var(--sub); opacity: 1; }
.t-bell.on { color: var(--green); opacity: 1; }
.t-bell.on svg { fill: var(--green-soft); }

/* 待办上的重复开关：没设过是灰描边，设了变绿（与重复页同一套规则） */
.t-rep {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  color: var(--faint);
  cursor: pointer;
  opacity: .55;
  transition: color .18s ease, background .18s ease, opacity .18s ease;
}
.t-rep svg {
  width: 14px; height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.task:hover .t-rep { opacity: 1; }
.t-rep:hover { background: #f4f4f1; color: var(--sub); }
.t-rep.on { color: var(--green); opacity: 1; }
@media (hover: none) { .t-rep { opacity: .8; } }

/* 就地改内容：双击任务文字后出现，宽度贴住原来那行，不跳版 */
.t-edit {
  flex: 1;
  min-width: 0;
  padding: 3px 9px;
  border: 1px solid var(--green);
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(7, 193, 96, .12);
}
.t-time-btn { cursor: pointer; }
.t-time-btn:hover { background: #d6f4e4; }

/* 右键 / 长按菜单 */
.ctx-mask { position: fixed; inset: 0; z-index: 70; }
.ctx {
  position: fixed;
  z-index: 71;
  width: 190px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--line), 0 18px 44px rgba(0, 0, 0, .16);
  animation: ctxIn .14s ease;
}
@keyframes ctxIn {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: none; }
}
.ctx-i {
  padding: 9px 10px;
  text-align: left;
  border-radius: 9px;
  background: none;
  font-size: 13px;
  color: var(--ink);
  transition: background .15s ease, color .15s ease;
}
.ctx-i:hover { background: #f4f4f1; }
.ctx-i.danger { color: var(--red); }
.ctx-i.danger:hover { background: var(--red-soft); }

/* 设置提醒 / 改期 小卡（复用重复弹层的 rm-* 内件） */
.rp-card {
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 18px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(0, 0, 0, .2);
  animation: authIn .2s ease;
}
.rp-when { display: flex; gap: 8px; }
.rp-when .rm-time { flex: 1; margin-top: 0; }
.rp-when .tm-box { flex: 1; }

/* 弹层内嵌的时间选择：点值框原地展开同一套滚轮，不用浏览器原生的 time 下拉 */
.tm-box { position: relative; }
.tm-val {
  width: 130px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.tm-val:hover { border-color: #cfd8cf; }
.rp-when .tm-val { width: 100%; }
.tp-flat {
  position: static;
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  box-shadow: none;
}
.rp-rep {
  width: 100%;
  margin-top: 14px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fafaf7;
  border-radius: 11px;
  transition: background .16s ease;
}
.rp-rep:hover { background: #f2f2ee; }
.rp-rep-l { font-size: 13px; font-weight: 600; color: var(--ink); }
.rp-rep-r { font-size: 12px; color: var(--sub); }

/* 搜索弹层 */
.srch {
  width: min(560px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 96px));
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(0, 0, 0, .2);
  animation: authIn .2s ease;
  overflow: hidden;
}
.srch-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
}
.srch-in {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafaf7;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .16s ease, background .16s ease;
}
.srch-in:focus { border-color: var(--green); background: #fff; }
.srch-x {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
}
.srch-x:hover { background: #f4f4f1; color: var(--ink); }
.srch-body { padding: 6px; overflow-y: auto; }
.srch-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  text-align: left;
  transition: background .15s ease;
}
.srch-row:hover { background: #f7f7f4; }
.srch-t { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srch-t.done { color: var(--faint); text-decoration: line-through; }
.srch-d { flex-shrink: 0; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.srch-go { flex-shrink: 0; color: var(--faint); font-size: 16px; }
.srch-empty, .srch-tip {
  padding: 26px 14px 30px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------------- 到点提醒卡 ---------------- */
.remind-card {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 60;
  width: min(440px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px 13px 16px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line), 0 18px 44px rgba(0, 0, 0, .16);
}
.rc-ic {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  animation: rcRing 1.4s var(--ease) 2;
}
.rc-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@keyframes rcRing {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-13deg); }
  40% { transform: rotate(11deg); }
  60% { transform: rotate(-7deg); }
  80% { transform: rotate(4deg); }
}
.rc-body { flex: 1; min-width: 0; }
.rc-t {
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rc-d { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.rc-acts { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.rc-btn {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f1;
  color: var(--sub);
  font-size: 12.5px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .15s var(--ease-spring);
}
.rc-btn:hover { background: #ececea; color: var(--ink); }
.rc-btn:active { transform: scale(.94); }
.rc-btn.main { background: var(--green); color: #fff; }
.rc-btn.main:hover { background: #06ad56; color: #fff; }
.rc-x {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border: 0; background: none; padding: 0;
  color: var(--faint);
  cursor: pointer;
}
.rc-x:hover { color: var(--sub); }
.rc-x svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.rc-enter-active, .rc-leave-active { transition: opacity .22s ease, transform .24s var(--ease); }
.rc-enter-from, .rc-leave-to { opacity: 0; transform: translate(-50%, 14px); }

@media (max-width: 560px) {
  .remind-card { bottom: 14px; gap: 9px; padding: 12px; border-radius: 16px; }
  .rc-acts { flex-direction: column; gap: 6px; }
  .rc-btn { height: 27px; padding: 0 10px; font-size: 12px; }
}

.c-add {
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.6px solid var(--ink);
  transition: background .2s ease, transform .15s var(--ease-spring), border-color .2s ease, opacity .2s ease;
}
.c-add svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.c-add:hover:not(:disabled) { background: var(--ink); color: #fff; transform: rotate(90deg); }
.c-add:active:not(:disabled) { transform: rotate(90deg) scale(.92); }
.c-add:disabled { opacity: .32; cursor: default; }

/* 已完成分组 */
.done-wrap { margin-top: 20px; overflow: hidden; }
.done-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 4px;
  font-size: 12px;
  color: var(--muted);
  transition: color .2s ease;
}
.done-head:hover { color: var(--ink); }
.caret { transition: transform .25s var(--ease); }
.caret.open { transform: rotate(180deg); }

/* ---------------- 日历 ---------------- */
/* 计划页和其它三个视图同宽，统一走 .view 的 680px。
   原来这里单独写了 max-width: 860px，日历和下方安排比待办/专注/我的宽一圈，
   四个页面切换时内容左边界来回跳，视觉上不齐。 */

.cal-card {
  background: var(--card);
  border-radius: 18px;
  padding: 14px 16px 12px;
  box-shadow: 0 12px 34px rgba(30, 30, 26, .07), 0 1px 2px rgba(30, 30, 26, .04);
  animation: riseIn .45s var(--ease) both;
}

/* 待办页：折叠滑出的日历容器
   overflow:hidden 是折叠动画的前提；高度由 JS 实测后写成 inline style，
   这里不写 max-height，免得行数或字号一变就被截断。 */
.cal-pop { overflow: hidden; }
/* 日历和上方标题、下方列表都收紧：三个间隙上下紧凑（用户要求） */
.cal-pop-in { padding-bottom: 6px; }
/* 待办页标题区和内容的间距单独收紧，其它三页维持原来的 20px */
.view-todo .head { padding-bottom: 10px; }
/* 容器本身负责进出场，卡片就别再叠一层 riseIn，否则两段动画打架看着发飘。
   投影也去掉：待办页这里是折叠展开的第二个卡片，浮起感会和下面的列表打架，
   改成一条细边线界定边界，更贴整页的极简调性。 */
.cal-pop .cal-card {
  animation: none;
  box-shadow: none;
  border: 1px solid var(--line);
}

.cal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
}
.cal-nav { display: flex; align-items: center; gap: 2px; }
.cal-bar-r { display: flex; justify-content: flex-end; }

/* 自定义下拉（v-select）：替代原生 select，展开面板为白色圆角 + 绿色选中项 */
.vsel { position: relative; }
.vsel-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 26px 0 12px;
  border: 0;
  border-radius: 9px;
  background: #f2f4f1;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background .18s ease;
  white-space: nowrap;
}
.vsel-btn:hover:not(:disabled) { background: #e7ebe6; }
.vsel-btn:disabled { color: var(--faint); cursor: default; }
.vsel.open .vsel-btn { background: #e7ebe6; }
.vsel-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 7px; height: 7px;
  margin-top: -5px;
  border-right: 1.6px solid #6b6b6b;
  border-bottom: 1.6px solid #6b6b6b;
  transform: rotate(45deg);
  transition: transform .2s var(--ease);
  pointer-events: none;
}
.vsel.open .vsel-arrow { transform: rotate(225deg); margin-top: -2px; }
.vsel-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-height: 268px;
  overflow-y: auto;
  margin: 0;
  padding: 5px;
  list-style: none;
  background: var(--card);
  border-radius: 11px;
  box-shadow: 0 10px 30px rgba(30, 30, 26, .14), 0 0 0 1px var(--line);
  animation: riseIn .18s var(--ease) both;
}
.vsel-menu li {
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--sub);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.vsel-menu li:hover { background: #f2f4f1; color: var(--ink); }
.vsel-menu li.on { background: var(--green-soft); color: var(--green); font-weight: 600; }
.vsel-y .vsel-menu { min-width: 96px; }

/* 「回到今天」：与左侧年/月下拉同款灰底样式 */
.today-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 9px;
  background: #f2f4f1;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}
.ghost-btn.today-btn:hover:not(:disabled) { background: #e7ebe6; color: var(--ink); }
/* 已经停在今天：文字变「今天」，颜色淡一档，不再有 hover 反馈 */
.ghost-btn.today-btn.on,
.ghost-btn.today-btn.on:hover:not(:disabled) { color: var(--muted); background: #f2f4f1; cursor: default; }
.ghost-btn.today-btn:active { transform: scale(.96); }

.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-week span { padding: 10px 0 12px; text-align: center; font-size: 12px; color: #1a1a1a; font-weight: 600; }
.cal-week span.hol { color: var(--red); }

.cal-cell {
  position: relative;
  height: 78px;
  padding: 4px 0 10px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: background .2s var(--ease), box-shadow .2s ease, transform .15s var(--ease);
  animation: cellIn .38s var(--ease) both;
}
.cal-cell:hover { background: #f2f4f1; }
.cal-cell:active { transform: scale(.96); }

.cal-d { font-size: 21px; font-weight: 700; letter-spacing: -.4px; line-height: 1.05; }
.cal-sub {
  font-size: 11.5px;
  line-height: 1.2;
  color: var(--muted);
  max-width: 100%;
  padding: 0 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cal-sub.fest { color: var(--red); }

.cal-cell.weekend .cal-d { color: var(--red); }
.cal-cell.out .cal-d { color: var(--faint); font-weight: 600; }
.cal-cell.out .cal-sub { color: #d4d4d0; }
.cal-cell.out:hover { background: #f6f6f3; }

/* 今天：绿底白字（实心，不经用户选择就是默认高亮，和小程序一致） */
.cal-cell.today { background: var(--green); }
.cal-cell.today:hover { background: #06a854; }
.cal-cell.today .cal-d { color: #fff; }
.cal-cell.today .cal-sub { color: #fff; opacity: .85; }
.cal-cell.today .cal-badge { background: rgba(255, 255, 255, .22); color: #fff; }

/* 选中的那天：黑底白字（写在 .today 之后，选中今天时盖成黑色） */
.cal-cell.sel { background: #111111; box-shadow: none; }
.cal-cell.sel:hover { background: #262626; }
.cal-cell.sel .cal-d, .cal-cell.sel .cal-sub { color: #fff; }
.cal-cell.sel .cal-sub { opacity: .85; }

.cal-badge {
  position: absolute;
  top: 5px;
  right: 6px;
  min-width: 17px;
  height: 17px;
  padding: 0 3px;
  border-radius: 5px;
  font-size: 10.5px;
  line-height: 17px;
  text-align: center;
  pointer-events: none;
}
.cal-badge.rest { background: var(--red-soft); color: var(--red); }
.cal-badge.work { background: var(--green-soft); color: var(--green); }
.cal-badge.now { background: var(--green); color: #fff; }
.cal-cell.sel .cal-badge { background: rgba(255, 255, 255, .22); color: #fff; }
.cal-cell.out .cal-badge { opacity: 0; }

.cal-dot {
  position: absolute;
  bottom: 7px;
  left: 50%;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--green);
  pointer-events: none;
}
.cal-cell.sel .cal-dot { background: #fff; }

/* 有事项的格子用一圈灰色细边线（和小程序 .cal-day.ring 的 #cccccc 同一套逻辑，
   原来这里是绿色，已按小程序改成灰），底部小圆点不再显示。
   目前只有日程页的折叠日历（.cal-pop）用到。
   顺序有讲究：today 已经是绿底白字，不要再描边；sel（已选中，黑底）同样不要框。 */
.cal-pop .cal-dot { display: none; }
.cal-pop .cal-cell.has { box-shadow: inset 0 0 0 1.5px #cccccc; }
.cal-pop .cal-cell.today,
.cal-pop .cal-cell.sel { box-shadow: none; }

/* ---------------- 待办页：汇总清单 ---------------- */
/* 待办页标题区到清单不用隔太远 */
.view-plan .head { padding-bottom: 12px; }

/* 分组清单 */
.plan-list { display: flex; flex-direction: column; gap: 2px; }

.pg { border-radius: 14px; transition: background .35s ease; }

.pg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 10px 9px;
  border-radius: 12px;
  text-align: left;
  transition: background .16s ease;
}
.pg-head:hover { background: #f4f4f1; }
.pg-head.static, .pg-head.static:hover { background: transparent; cursor: default; }

/* 分组标题：小程序同款灰色小字，今天用主题绿 */
.pg-t { font-size: 12.5px; font-weight: 700; letter-spacing: .3px; color: #b0b0b0; }
.pg-t.today { color: var(--green); }
.pg-w { font-size: 11.5px; color: var(--faint); }
.pg-n {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.pg-body { padding-left: 14px; }
.pg-body .task { padding: 11px 6px 11px 0; }
.pg-body .task:last-child { border-bottom: 0; }

/* 逾期那一组：红色标记，一眼能认出来 */
.pg-tag {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 6px;
  background: #fdecec;
  color: var(--red);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
}
.pg-over .pg-t, .pg-over .pg-n { color: var(--red); }
.task.is-over .t-txt { color: #8c5555; }
.task.is-over:hover .t-txt { color: #7a4444; }

.pg-more {
  width: 100%;
  padding: 9px 0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
  transition: background .16s ease, color .16s ease;
}
.pg-more:hover { background: #f4f4f1; color: var(--sub); }

.pg-note { padding: 6px 0 8px; font-size: 11.5px; color: var(--faint); }

/* 行尾的日期/时间小字，和「今天」快捷按钮 */
.t-meta {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.t-move {
  flex-shrink: 0;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .18s ease, background .18s ease;
}
.task:hover .t-move { opacity: 1; }
.t-move:hover { background: #d6f4e4; }
/* 触摸设备没有 hover，按钮得常显 */
@media (hover: none) { .t-move { opacity: 1; } }

/* 空态 */
.plan-empty { padding: 44px 0 8px; text-align: center; }
.pe-ring {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 2px dashed #dcdcd6;
}
.pe-t { font-size: 14.5px; font-weight: 700; color: var(--sub); }
.pe-d { margin-top: 6px; font-size: 12.5px; color: var(--faint); }
.plan-empty .pd-add { max-width: 300px; margin: 18px auto 0; }

.pd-add {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  margin-top: 8px;
  padding: 0 16px;
  border-radius: 12px;
  background: #f2f4f1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sub);
  transition: background .2s ease, color .2s ease, transform .15s var(--ease);
}
.pd-add:hover { background: #e7ebe6; color: var(--ink); }
.pd-add:active { transform: scale(.99); }
.pd-add-a { font-size: 16px; line-height: 1; color: var(--faint); transition: transform .2s var(--ease); }
.pd-add:hover .pd-add-a { transform: translateX(2px); color: var(--sub); }

/* ---------------- 重复（对齐小程序 pages/repeat） ---------------- */
/* 标题行右侧的「＋ 新建」：绿底白字，和小程序同款 */
.rep-add { background: var(--green); border-color: var(--green); color: #fff; }
.rep-add:hover { background: #06ad56; border-color: #06ad56; color: #fff; }

/* 规则清单：一行一条，底线分隔，和小程序 .row 一致 */
.rep-list { display: flex; flex-direction: column; }
.rep-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 6px;
  border-bottom: 1px solid #f5f5f2;
  cursor: pointer;
  border-radius: 10px;
  transition: background .2s ease;
}
.rep-row:hover { background: #fafaf8; }
.rep-body { flex: 1; min-width: 0; }
.rep-txt { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-meta { margin-top: 4px; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.rep-desc { font-size: 12.5px; font-weight: 600; color: var(--green); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-remain { flex-shrink: 0; font-size: 12px; color: var(--faint); }
.rep-next { margin-left: auto; flex-shrink: 0; font-size: 12px; color: var(--faint); }
.rep-del {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  color: var(--faint);
  background: transparent;
  opacity: 0;
  transition: opacity .15s ease, background .2s ease, color .2s ease;
}
.rep-row:hover .rep-del { opacity: 1; }
.rep-del:hover { background: #fdeeea; color: #d4553f; }
.rep-arrow {
  flex-shrink: 0;
  width: 7px; height: 7px;
  border-right: 1.5px solid #d0d0d0;
  border-bottom: 1.5px solid #d0d0d0;
  transform: rotate(-45deg);
}

/* 空态：空心圆环 + 一句引导 */
.rep-empty { padding-top: 96px; display: flex; flex-direction: column; align-items: center; }
.re-ring { width: 56px; height: 56px; border: 5px solid #ececec; border-radius: 50%; }
.re-t { margin-top: 14px; font-size: 13.5px; color: var(--sub); }
.rep-empty .pd-add { margin-top: 18px; }

/* 新建 / 编辑弹层 */
.rep-mask {
  position: fixed; inset: 0;
  background: rgba(30, 30, 26, .34);
  display: flex; align-items: center; justify-content: center;
  z-index: 90;
  animation: fadeIn .18s ease both;
}
.rep-modal {
  width: 420px; max-width: calc(100vw - 48px);
  max-height: calc(100vh - 96px);
  overflow: auto;
  background: var(--card);
  border-radius: 18px;
  padding: 20px 22px 18px;
  box-shadow: 0 24px 64px rgba(30, 30, 26, .18);
  animation: riseIn .28s var(--ease) both;
}
.rm-head { display: flex; align-items: center; justify-content: space-between; }
.rm-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.rm-close {
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 12px;
  color: var(--faint);
  transition: background .2s ease, color .2s ease;
}
.rm-close:hover { background: #f0f0ec; color: var(--ink); }
.rm-input {
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink);
  background: #fbfbf9;
  outline: none;
  transition: border-color .2s ease;
}
.rm-input:focus { border-color: var(--green); background: #fff; }
.rm-txt {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f6f6f3;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.rm-sec { margin-top: 16px; }
.rm-sec-t { font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--sub); margin-bottom: 8px; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-chip {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--sub);
  background: #fff;
  transition: all .18s ease;
}
.rm-chip:hover { border-color: #cfd8cf; }
.rm-chip.on { background: var(--green-soft); border-color: var(--green); color: var(--green); font-weight: 700; }
.rm-week { display: flex; gap: 8px; }
.rm-wd {
  flex: 1;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  color: var(--sub);
  background: #fff;
  transition: all .18s ease;
}
.rm-wd.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.rm-days { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-dd {
  width: 34px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--sub);
  background: #fff;
  transition: all .15s ease;
}
.rm-dd.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.rm-hint { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--faint); }
.rm-ypick { display: flex; gap: 10px; }
.rm-sel {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
.rm-time {
  width: 130px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
.rm-time:focus { border-color: var(--green); }
.rm-sum {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  text-align: center;
}
.rm-save {
  width: 100%;
  margin-top: 12px;
  height: 40px;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s ease, transform .15s var(--ease), opacity .2s ease;
}
.rm-save:hover { background: #06ad56; }
.rm-save:active { transform: scale(.99); }
.rm-save:disabled { opacity: .55; cursor: default; }

/* 删除此重复：浅红底的次级按钮，只在编辑已有重复时出现 */
.rm-drop {
  width: 100%;
  margin-top: 10px;
  height: 40px;
  border-radius: 11px;
  background: #fdf1ef;
  color: #d4553f;
  font-size: 13.5px;
  font-weight: 600;
  transition: background .2s ease, transform .15s var(--ease), opacity .2s ease;
}
.rm-drop:hover { background: #fbe4e0; }
.rm-drop:active { transform: scale(.99); }
.rm-drop:disabled { opacity: .55; cursor: default; }

/* ---------------- 专注 ---------------- */
.focus-wrap { display: flex; flex-direction: column; align-items: center; padding-top: 26px; }

.dial { position: relative; width: 220px; height: 220px; }
.dial-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-bg { fill: none; stroke: #ececea; stroke-width: 6; }
.dial-fg {
  fill: none;
  stroke: var(--green);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 628.3;
  stroke-dashoffset: 628.3;
  transition: stroke-dashoffset .35s linear, filter .4s ease;
}
.dial.running .dial-fg { filter: drop-shadow(0 0 6px rgba(7, 193, 96, .45)); }
.dial.running { animation: breathe 3.4s ease-in-out infinite; }

.dial-txt {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.chips { display: flex; gap: 8px; margin-top: 34px; }
.chip {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--sub);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: all .2s var(--ease);
}
.chip:hover { color: var(--ink); transform: translateY(-1px); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }

.focus-btns { display: flex; gap: 10px; margin-top: 26px; }

.primary {
  padding: 11px 36px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(7, 193, 96, .22);
  transition: transform .15s var(--ease-spring), box-shadow .25s ease, opacity .2s ease;
}
.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(7, 193, 96, .28); }
.primary:active { transform: scale(.97); }

.plain {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--sub);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: all .2s var(--ease);
}
.plain:hover { color: var(--ink); background: #fff; transform: translateY(-1px); }
.plain:active { transform: scale(.97); }
.plain.danger { color: var(--red); box-shadow: inset 0 0 0 1px #f6d7d5; }
.plain.danger:hover { background: #fdecec; }

.focus-stat { margin-top: 26px; font-size: 12.5px; color: var(--muted); }
.focus-stat b { color: var(--ink); }

/* ---------------- 我的 ---------------- */
.rows { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  cursor: text;
}
.row:last-child { border-bottom: 0; }
.r-l { flex: 1; }
.r-u { font-size: 12px; color: var(--muted); }
.r-in {
  width: 190px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: #f7f7f4;
  outline: none;
  text-align: right;
  transition: box-shadow .2s ease, background .2s ease;
}
.r-in:focus { box-shadow: inset 0 0 0 1px var(--green); background: #fff; }
.r-num { width: 76px; }

.block { margin-top: 18px; padding: 20px; background: var(--card); border-radius: var(--radius); }
.block-t { font-size: 14px; font-weight: 700; }
.block-d { margin-top: 6px; font-size: 12px; color: var(--muted); }

.preset-rows { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.p-row { display: flex; align-items: center; gap: 12px; }
.p-idx { width: 14px; font-size: 12px; color: var(--muted); }
.p-in {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: #f7f7f4;
  outline: none;
  transition: box-shadow .2s ease, background .2s ease;
}
.p-in:focus { box-shadow: inset 0 0 0 1px var(--green); background: #fff; }

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 15px 4px 4px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
}
.switch-row input { display: none; }
.switch-row .sw {
  position: relative;
  margin-left: auto;
  width: 42px; height: 24px;
  border-radius: 999px;
  background: #e2e2df;
  transition: background .25s var(--ease);
}
.switch-row .sw::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .28s var(--ease-spring);
}
.switch-row input:checked + .sw { background: var(--green); }
.switch-row input:checked + .sw::after { transform: translateX(18px); }

.block-acts { display: flex; align-items: center; gap: 12px; margin-top: 18px; }

.link {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s ease;
}
.link:hover { color: var(--green); }

.clear-box {
  margin-top: 16px;
  padding: 14px 16px 12px;
  border-radius: 12px;
  background: #fbf7f6;
  box-shadow: inset 0 0 0 1px #f6e3e1;
}
.clear-box label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13.5px;
  cursor: pointer;
}
.clear-box input[type="checkbox"] { accent-color: var(--green); width: 15px; height: 15px; }
.clear-acts { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }

/* ---------------- 提示 ---------------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
}
.toast {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(17, 17, 17, .92);
  color: #fff;
  font-size: 13px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .16);
}

#fx { position: fixed; inset: 0; pointer-events: none; z-index: 70; }

/* ---------------- 登录 / 注册弹窗 ---------------- */
.mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  /* 纯色不透明背景：登录 / 注册时完全盖住背后的页面 */
  background: var(--bg);
}
.auth {
  width: 340px;
  max-width: 100%;
  padding: 22px 24px 20px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
  animation: authIn .34s var(--ease) both;
}

/* 登录卡片 + 小程序码并排（宽屏）：同宽、同高（跟随登录/注册卡片高度） */
.auth-wrap {
  display: flex;
  align-items: stretch;
  gap: 18px;
}
.qr-side {
  width: 340px;
  padding: 24px 16px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* 卡片变高时，码和文案垂直居中 */
  animation: authIn .34s var(--ease) .06s both;
}
.qr-img {
  width: 170px;
  height: 170px;
  display: block;
  margin: 0 auto 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.qr-t { font-size: 13px; font-weight: 700; color: var(--ink); }
.qr-d { margin-top: 5px; font-size: 11px; line-height: 1.7; color: var(--faint); }
/* ---------------- 我的 · 统计卡 / 目标 ---------------- */
.me-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--card);
  border-radius: var(--radius);
}
.avatar {
  flex: none;
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 22px;
  font-weight: 700;
}
.me-who { flex: 1; min-width: 0; }
.me-name {
  width: 100%;
  padding: 2px 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 17px;
  font-weight: 700;
  border-radius: 4px;
}
.me-name:focus { box-shadow: inset 0 -1px 0 var(--green); }
.me-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12px;
  color: var(--muted);
}
.me-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }

.fc-card {
  margin-top: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius);
}
.fc-t { font-size: 12px; color: var(--muted); }
.fc-v { margin-top: 6px; font-size: 16px; font-weight: 700; }
.fc-r { text-align: right; }
.fc-n { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fc-l2 { margin-top: 2px; font-size: 11.5px; color: var(--muted); }

.view-me .rows { margin-top: 12px; }
.view-me .block { margin-top: 12px; }

/* 可点击的设置行（清除已完成 / 隐私条款 / 功能说明 / 清空） */
.row-btn {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: none;
  transition: background .18s ease;
}
.row-btn:hover { background: #fbfbf9; }
.r-v { font-size: 12.5px; color: var(--muted); }
.r-a { font-size: 15px; color: var(--faint); }
.r-danger { color: var(--red); }
.r-in.r-set { font-weight: 600; }

.dur-chips { display: flex; gap: 6px; }
.chip.mini { padding: 5px 11px; font-size: 12px; }

/* ---------------- 专注 · 目标 / 今日点阵 ---------------- */
.goal-bar {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .2s var(--ease), transform .15s var(--ease-spring);
}
.goal-bar:hover { box-shadow: inset 0 0 0 1px #dcdcd8; transform: translateY(-1px); }
.goal-bar.lock { cursor: default; opacity: .75; }
.goal-bar.lock:hover { transform: none; box-shadow: inset 0 0 0 1px var(--line); }
.goal-l { flex: none; font-size: 12px; color: var(--muted); }
.goal-v {
  flex: 1; min-width: 0;
  text-align: left;
  font-size: 13.5px;
  color: var(--sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.goal-bar.set .goal-v { color: var(--ink); font-weight: 600; }
.goal-a { flex: none; font-size: 12px; color: var(--faint); }

.today-dots {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.tdot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: dotIn .32s var(--ease-spring) both;
}
.tdot-n { margin-left: 2px; font-size: 11.5px; color: var(--muted); }
@keyframes dotIn {
  from { transform: scale(.2); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------------- 弹层：目标选择 / 确认 / 文档 ---------------- */
.veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 17, 17, .28);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.pop {
  width: 380px;
  max-width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
  animation: popIn .26s var(--ease-spring) both;
}
.pop-t { font-size: 15px; font-weight: 700; }
.pop-sub { margin-top: 5px; font-size: 12px; color: var(--muted); }
.pop-list { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.pop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 10px;
  text-align: left;
  font-size: 13.5px;
  transition: background .18s ease;
}
.pop-item:hover { background: #f5f5f2; }
.pop-item.none { color: var(--muted); }
.pop-item-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-ck { flex: none; color: var(--green); font-weight: 700; }
.pop-empty { padding: 12px 13px; font-size: 12.5px; color: var(--faint); }
.pop-close {
  margin-top: 16px;
  padding: 11px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--sub);
  background: #f4f4f1;
  transition: color .18s ease, background .18s ease;
}
.pop-close:hover { color: var(--ink); background: #eeeeea; }

.ask {
  width: 360px;
  max-width: 100%;
  padding: 22px 22px 18px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
  animation: popIn .26s var(--ease-spring) both;
}
.ask-t { font-size: 15.5px; font-weight: 700; }
.ask-s { margin-top: 8px; font-size: 13px; line-height: 1.75; color: var(--sub); }
.ask-btns { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }
.primary.danger { background: var(--red); box-shadow: 0 8px 20px rgba(229, 77, 66, .2); }
.primary.danger:hover { box-shadow: 0 12px 26px rgba(229, 77, 66, .26); }

.doc {
  width: 640px;
  max-width: 100%;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
  animation: popIn .26s var(--ease-spring) both;
}
.doc-head { display: flex; align-items: center; padding: 20px 24px 0; }
.doc-t { font-size: 17px; font-weight: 700; }
.doc-x {
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 12px;
  color: var(--muted);
  transition: background .18s ease, color .18s ease;
}
.doc-x:hover { background: #f3f3f0; color: var(--ink); }
.doc-meta { padding: 6px 24px 0; font-size: 11.5px; color: var(--faint); }
.doc-body { padding: 14px 24px 26px; overflow: auto; }
.doc-intro { font-size: 13px; line-height: 1.9; color: var(--sub); }
.doc-block { margin-top: 24px; }
.doc-h { font-size: 13.5px; font-weight: 700; }
.doc-p { margin-top: 7px; font-size: 13px; line-height: 1.9; color: var(--sub); }

@media (max-width: 760px) {
  .qr-side { display: none; }
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: #f2f2ee;
}
.auth-tabs button {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--muted);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.auth-tabs button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .07); }

.auth-head { text-align: center; margin-bottom: 16px; }
.auth-logo { width: 48px; height: 48px; display: block; margin: 0 auto 10px; }
.auth-brand { font-size: 16px; font-weight: 700; letter-spacing: .4px; color: var(--ink); }
.auth-d { margin-top: 5px; font-size: 11.5px; color: var(--faint); }

.a-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.a-l { width: 56px; flex: none; font-size: 13px; color: var(--sub); }
.a-in {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
}
.a-in::placeholder { color: var(--faint); }
.a-row:focus-within { border-bottom-color: var(--green); }

.auth-err { margin-top: 12px; font-size: 12.5px; color: var(--red); }
/* 进行中的提示（正在登录… / 正在注册…）用绿色 */
.auth-err.ok { color: var(--green); }

.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--sub);
  cursor: pointer;
  user-select: none;
}
.auth-agree input {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  accent-color: var(--green);
  cursor: pointer;
}
.auth-agree a { color: var(--blue); text-decoration: none; }
.auth-agree a:hover { text-decoration: underline; }

.auth-acts { display: flex; gap: 10px; margin-top: 20px; }
.auth-acts .primary, .auth-acts .plain {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 0;
  font-size: 14px;
}

.auth-sw { margin-top: 14px; text-align: center; font-size: 12px; color: var(--muted); }
.auth-sw a { color: var(--green); text-decoration: none; }
.auth-sw a:hover { text-decoration: underline; }

/* ---------------- 过渡 ---------------- */
.view-enter-active { transition: opacity .32s var(--ease), transform .38s var(--ease); }
.view-leave-active { transition: opacity .16s ease, transform .16s ease; }
.view-enter-from { opacity: 0; transform: translateY(10px) scale(.995); }
.view-leave-to { opacity: 0; transform: translateY(-6px); }

.list-enter-active { transition: opacity .3s var(--ease), transform .35s var(--ease); }
.list-leave-active {
  transition: opacity .18s ease, transform .22s ease;
  position: absolute;
  left: 0; right: 0;
}
.list-enter-from { opacity: 0; transform: translateY(-8px); }
.list-leave-to { opacity: 0; transform: translateX(18px); }
.list-move { transition: transform .38s var(--ease); }

.cal-enter-active, .cal-leave-active { transition: opacity .2s ease; }
.cal-enter-from, .cal-leave-to { opacity: 0; }

.toast-enter-active { transition: opacity .25s var(--ease), transform .3s var(--ease-spring); }
.toast-leave-active { transition: opacity .2s ease, transform .2s ease; }
.toast-enter-from { opacity: 0; transform: translateY(12px) scale(.96); }
.toast-leave-to { opacity: 0; transform: translateY(-6px); }
.toast-move { transition: transform .3s var(--ease); }

.fade-enter-active, .fade-leave-active { transition: opacity .3s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

.fold-enter-active, .fold-leave-active {
  transition: opacity .25s var(--ease), max-height .35s var(--ease);
  overflow: hidden;
  max-height: 640px;
}
.fold-enter-from, .fold-leave-to { opacity: 0; max-height: 0; }

/* ---------------- 关键帧 ---------------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes cellIn {
  from { opacity: 0; transform: translateY(6px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes burst {
  0% { opacity: .9; transform: scale(.6); }
  70% { opacity: .25; }
  100% { opacity: 0; transform: scale(1.9); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.012); }
}

@media (max-width: 860px) {
  .side { width: 68px; padding: 26px 10px; }
  .brand { justify-content: center; padding: 0 0 22px; }
  .brand-txt { display: none; }
  .nav-i { justify-content: center; padding: 10px 4px; }
  .nav-ic { width: 24px; height: 24px; }
  .nav-t { display: none; }
  .nav-dot { display: none; }
  .side-foot { display: none; }
  .side-site { display: none; }
  .main { padding: 30px 20px 110px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
/* ---------------- 手机（≤760px）：侧栏改成底部 tab 条 ----------------
   原来窄屏只是把侧栏压成 68px，主区仍固定 680px，手机上必然横向溢出。
   这里把导航整体挪到屏幕底部，主区满宽，登录/搜索收进「我的」页。 */
@media (max-width: 760px) {
  #app { display: block; }

  .side {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    align-self: auto;
    z-index: 50;
    width: 100%;
    height: auto;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    flex-direction: row;
    align-items: center;
    background: rgba(247, 247, 244, .96);
    backdrop-filter: saturate(180%) blur(14px);
    border-right: 0;
    border-top: 1px solid var(--line);
    animation: none;
  }

  .brand,
  .side-foot,
  .side-site,
  .nav-sep,
  .nav-i.nav-me,
  .nav-i.sub { display: none; }

  .nav { flex-direction: row; width: 100%; gap: 0; }
  .nav-i {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 7px 2px;
    animation: none;
  }
  .nav-i.active { background: none; box-shadow: none; }
  .nav-ic { width: 22px; height: 22px; }
  .nav-t { display: block; font-size: 10px; letter-spacing: 0; }

  .main { padding: 22px 16px 84px; }
  .view { max-width: 100%; }
  .day-label { font-size: 26px; }

  /* 触屏没有 hover：行内操作常显，不然根本点不到 */
  .t-del,
  .t-move { opacity: 1; transform: none; }
  .t-rep { opacity: .8; }

  /* 弹层在小屏上贴底，别顶到屏幕外 */
  .rep-mask, .veil { align-items: flex-end; }
  .rep-modal, .rp-card { width: 100%; max-height: 88vh; border-radius: 18px 18px 0 0; }
  .srch { width: 100%; max-height: 80vh; border-radius: 18px 18px 0 0; }
}

/* ============ 完成卡片工坊（网页版，对齐小程序 card-sheet） ============ */
.cs-wrap {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cs-wrap.on { display: flex; }

.cs-mask {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, .45);
  animation: csFade .2s var(--ease);
}

.cs-sheet {
  position: relative;
  width: 400px;
  max-width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 16px 16px 14px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
  animation: csIn .26s var(--ease);
  -webkit-overflow-scrolling: touch;
}

@keyframes csFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes csIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.cs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cs-title { font-size: 15px; font-weight: 700; letter-spacing: .2px; }

.cs-x {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}
.cs-x:hover { background: var(--bg); color: var(--ink); }

/* 预览：等比缩放 1080×1350 的画布 */
.cs-prev {
  height: 34vh;
  min-height: 200px;
  max-height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 14px;
  padding: 10px;
}

.cs-canvas {
  height: 100%;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .1);
}

.cs-opts { display: flex; gap: 8px; margin-top: 14px; }

.cs-tab {
  flex: 1;
  padding: 8px 0;
  font-size: 13px;
  color: var(--sub);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: color .16s, border-color .16s, background .16s;
}
.cs-tab.on {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-soft);
  font-weight: 600;
}

.cs-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  max-height: 118px;
  overflow-y: auto;
}

/* display:flex 会盖掉 [hidden]，这里显式补上 */
.cs-picks[hidden] { display: none; }

.cs-pick {
  max-width: 100%;
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--sub);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-pick.on {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-soft);
}
.cs-pick.on::before { content: "✓ "; font-weight: 700; }

.cs-field { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.cs-lab { flex: 0 0 auto; font-size: 12.5px; color: var(--muted); }

.cs-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  background: #fbfbf9;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
.cs-input:focus { border-color: var(--green); background: var(--card); }

.cs-bgbtns { display: flex; gap: 8px; }

.cs-mini {
  padding: 7px 12px;
  font-size: 13px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.cs-mini:hover { border-color: var(--faint); }
.cs-mini.ghost { color: var(--muted); }

.cs-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}

.cs-save {
  width: 100%;
  height: 44px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--green);
  border-radius: 12px;
  transition: transform .12s var(--ease), filter .16s;
}
.cs-save:hover { filter: brightness(1.04); }
.cs-save:active { transform: scale(.99); }

.cs-hint { font-size: 11.5px; color: var(--faint); }

.cs-toast {
  position: fixed;
  left: 50%;
  bottom: 12vh;
  z-index: 400;
  padding: 9px 16px;
  font-size: 13px;
  color: #fff;
  background: rgba(17, 17, 17, .86);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.cs-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .cs-wrap { align-items: flex-end; padding: 0; }
  .cs-sheet {
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .cs-prev { height: 30vh; min-height: 170px; }
}

/* 全天完成：logo 徽章 + 分享完成图按钮（和小程序 todo 页一致） */
.card-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0 8px;
  animation: riseIn .4s var(--ease) both;
}
.card-hero-logo {
  width: 62px;
  height: 62px;
  margin-bottom: 14px;
  display: block;
}
.card-hero-btn {
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 999px;
  transition: background .16s ease, transform .12s var(--ease);
}
.card-hero-btn:hover { background: var(--green-soft); }
.card-hero-btn:active { transform: scale(.97); }

/* 已完成分组头右侧：存张图 + 展开箭头 */
.done-r {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.done-card {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
  transition: opacity .16s ease;
}
.done-card:hover { opacity: .65; }

/* ============ 回顾（原专注页位置） ============ */
.rec-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rec-card {
  padding: 14px 16px 13px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .045);
}

.rc-l { font-size: 12px; color: var(--muted); letter-spacing: .2px; }

.rc-v {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.rc-u { margin-left: 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }

.rec-heat {
  margin-top: 16px;
  padding: 16px 16px 12px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .045);
}

.rh-t { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }

.rh-grid { display: flex; gap: 6px; }

.rh-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

.rh-cell {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background: #f1efe8;
}

/* 三档绿统一锚在微信绿 #07C160 上 */
.rh-cell.l0 { background: #f1efe8; }
.rh-cell.l1 { background: #b9e8cb; }
.rh-cell.l2 { background: #52c986; }
.rh-cell.l3 { background: #07C160; }
.rh-cell.l-1 { background: transparent; }

.rh-legend { display: flex; align-items: center; gap: 5px; margin-top: 12px; }
.rl-t { font-size: 11.5px; color: var(--faint); }
.rl { width: 11px; height: 11px; border-radius: 3px; background: #f1efe8; }
.rl.l0 { background: #f1efe8; }
.rl.l1 { background: #b9e8cb; }
.rl.l2 { background: #52c986; }
.rl.l3 { background: #07C160; }
.rh-legend .rl-t:last-child { margin-left: 1px; }

.rec-today {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .045);
}
.rt-l { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.rt-v { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.rec-hint { margin-top: 12px; text-align: center; font-size: 12px; color: var(--faint); }

/* ============ 专注 · 内置弹层（从待办行右键/长按进入） ============ */
.fs-card {
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
  animation: csIn .26s var(--ease);
}

.fs-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.fs-goal { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fs-lab { font-size: 11.5px; color: var(--faint); letter-spacing: .4px; }
.fs-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-x {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}
.fs-x:hover { background: var(--bg); color: var(--ink); }

.fs-card .dial { width: 184px; height: 184px; margin: 8px 0 2px; }
.fs-card .dial-txt { font-size: 36px; }
.fs-card .chips { margin-top: 20px; }
.fs-card .focus-btns { margin-top: 18px; }

.fs-hint { margin-top: 14px; font-size: 11.5px; color: var(--faint); text-align: center; }

@media (max-width: 640px) {
  .fs-card {
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    align-self: flex-end;
  }
}

/* ============ 监督搭子 ============ */
.bd-sec { margin-top: 22px; }

.bd-sec-t {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.bd-pending {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .045);
}

.bd-p-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.bd-code {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.bd-p-tip { font-size: 12px; color: var(--muted); }

.bd-card {
  padding: 14px 16px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .045);
}
.bd-card + .bd-card { margin-top: 10px; }
.bd-pending + .bd-card { margin-top: 10px; }

.bd-head { display: flex; align-items: center; gap: 10px; }

.bd-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bd-prog { flex: none; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.bd-del { flex: none; font-size: 11.5px; color: var(--faint); }
.bd-del:hover { color: var(--danger, #d85a30); }

.bd-bar {
  height: 6px;
  margin-top: 10px;
  border-radius: 999px;
  background: #f1efe8;
  overflow: hidden;
}
.bd-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
  transition: width .4s var(--ease);
}

.bd-ent { margin-top: 12px; }
.bd-ent-t { font-size: 11.5px; color: var(--faint); margin-bottom: 6px; }
.bd-ent-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  font-size: 13px;
  color: var(--sub);
}
.bd-ent-row .strike { text-decoration: line-through; color: var(--faint); }

.bd-ck {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #f1efe8;
  position: relative;
}
.bd-ck.on { background: var(--green); }
.bd-ck.on::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.bd-mini {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 8px;
}
.bd-mini:hover { filter: brightness(.98); }

.bd-empty {
  padding: 20px 16px;
  text-align: center;
  background: var(--card);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .045);
}

.bd-e-t { font-size: 14px; font-weight: 600; color: var(--ink); }
.bd-e-p { margin-top: 5px; font-size: 12.5px; color: var(--muted); }

.bd-invite {
  margin-top: 14px;
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
}
.bd-invite:hover { filter: brightness(1.05); }

.bd-join {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.bd-join input {
  width: 90px;
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink);
  background: #fbfbf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
.bd-join input:focus { border-color: var(--green); }

.bd-e-hint { margin-top: 10px; font-size: 11.5px; color: var(--faint); }


/* 派任务表单 */
.bd-form {
  padding: 16px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .045);
}

.bd-f-t { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }

.bd-f-in {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  background: #fbfbf9;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
.bd-f-in:focus { border-color: var(--green); background: #fff; }

.bd-f-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.bd-f-lab { flex: none; font-size: 12px; color: var(--muted); }

.bd-friend {
  padding: 5px 13px;
  font-size: 12.5px;
  color: var(--sub);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .16s var(--ease);
}
.bd-friend.on {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-soft);
  font-weight: 600;
}

.bd-chip {
  padding: 5px 13px;
  font-size: 12.5px;
  color: var(--sub);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .16s var(--ease);
}
.bd-chip.on {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-soft);
  font-weight: 600;
}

.bd-f-time {
  width: 150px;
  height: 30px;
  padding: 0 10px;
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ink);
  background: #fbfbf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
.bd-f-time:focus { border-color: var(--green); }

.bd-send-lg {
  margin-top: 12px;
  width: 100%;
  height: 40px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--green);
  border-radius: 10px;
  transition: transform .12s var(--ease), filter .16s;
}
.bd-send-lg:hover { filter: brightness(1.04); }
.bd-send-lg:active { transform: scale(.99); }

.bd-ent-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bd-ent-meta {
  flex: none;
  font-size: 11.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* 任务行：搭子派来的徽标 */
.t-from {
  flex: none;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
}
