/* ==========================================================================
   微迹 Weetrack — 页面样式：待办 / 账号 / 登录 / 模块占位
   ========================================================================== */

/* ==========================================================================
   A. 待办与计划
   ========================================================================== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 11px;
}
.mini-stat {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.mini-stat .ic {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex: none;
}
.mini-stat .v {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.mini-stat .l {
  font-size: 11.5px;
  color: var(--text-3);
}

/* 快速添加 */
.quick-add {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.quick-add:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.quick-add input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
}
.quick-add input::placeholder {
  color: var(--text-3);
}
.quick-add .hint {
  font-size: 11px;
  color: var(--text-3);
  flex: none;
}

/* 快速添加里的子任务区
   --------------------------------------------------------------------------
   和上面的输入框连成一体：用同一个圆角外框包住，
   子任务区贴在下面，中间用一条淡分割线。 */
.quick-add-wrap {
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  overflow: hidden;
}
.quick-add-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
/* 外框加在 wrap 上，里面的 .quick-add 就不再自己有边框和圆角了 */
.quick-add-wrap .quick-add {
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.quick-add-wrap .quick-add:focus-within {
  border: none;
  box-shadow: none;
}

.quick-items {
  border-top: 1px dashed var(--line);
  padding: 8px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--surface-2);
}
.quick-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}
.quick-item-no {
  flex: none;
  width: 16px;
  text-align: right;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.quick-item-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-item-del {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: var(--r-xs);
  color: var(--text-3);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-item-del:hover {
  background: var(--red-soft);
  color: var(--red);
}
.quick-item.is-draft {
  margin-top: 2px;
}
.quick-item-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--text);
  padding: 3px 0;
}
.quick-item-input::placeholder {
  color: var(--text-3);
}

/* 列表视图 */
.task-group {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
/* 分组头（今日 / 短期 · 近日 / 中期 …）
   --------------------------------------------------------------------------
   它长得和待办行很像，容易被当成「一行待办」——
   尤其最右边那条进度条，看起来就像多出来的一行。
   这里把它做得明显是**标题**：左侧加一道竖色条、字号略小、
   底色比卡片深一点，和下面的行区分开。 */
.task-group-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-3);
  /* 左侧竖条：一眼看出这是分组的标题，不是待办行 */
  box-shadow: inset 3px 0 0 var(--line-strong);
}
.task-group-head .gt {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
}
.task-group-head .gc {
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
/* 进度条推到最右，但收窄一点、别那么抢眼 */
.task-group-head .bar {
  flex: none;
  width: 90px;
  margin-left: auto;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--dur) var(--ease);
  cursor: pointer;
  position: relative;

  /* 右边的操作区尺寸与间距，集中在这里定义。
     编辑 / 删除 / 完成 三个控件必须**大小相同、间距相同**，
     否则一排看过去就是歪的。 */
  --acts-size: 26px;   /* 三个控件都是 26×26 */
  --acts-icon: 15px;   /* 图标统一 15px */
  --acts-gap: 8px;     /* 每两个之间的间距，处处相等 */
}
.task-row:last-child {
  border-bottom: none;
}

/* 从首页「近日待办」点卡片跳进来时，目标那条要高亮一下，
   让用户一眼看到"就是这一条"，而不是只滚过去不知看哪儿。 */
.task-row.flash-target {
  animation: taskFlash 2.2s var(--ease);
}
@keyframes taskFlash {
  0% { background: var(--brand-soft); }
  15% { background: var(--brand-soft); }
  70% { background: var(--brand-soft); }
  100% { background: transparent; }
}
.task-row:hover {
  background: var(--surface-2);
}
.task-row .chip {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex: none;
  background: var(--surface-3);
}
.task-row .tr-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.task-row .tt {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.task-row .tt .txt {
  /* flex 子项默认 min-width:auto 会拒绝收缩，窄屏下标题会被挤成一两个字 */
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-row .sm {
  font-size: 11.5px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.task-row .sm .sep {
  width: 1px;
  height: 9px;
  background: var(--line-strong);
}
.task-row .right {
  flex: none;
  display: flex;
  align-items: center;
  /* 【三个控件的间距，统一由这里管】
     编辑 / 删除 / 完成 是 .right 的直接子元素（.acts 里只放编辑和删除），
     所以内层 .acts 的 gap 必须和这里一致，否则会出现
     「编辑→删除 2px、删除→完成 10px」这种不等距。
     用同一个变量，改一处两边都跟着变。 */
  gap: var(--acts-gap);
}
.task-row .due {
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.task-row .due.warn { color: #b8453d; font-weight: 600; }
.task-row .due.danger { color: #9c2f28; font-weight: 600; }
.task-row .due.steady { color: var(--text-3); }
/* 操作按钮：始终显示，不再靠 hover
   --------------------------------------------------------------------------
   原来 opacity: 0，鼠标移上去才出现。问题：
     · 触屏设备上根本没有 hover，等于永远点不到
     · 完成勾选框一直是显示的，两者不一致，会让人以为按钮坏了
   现在全部常显，只是用较浅的颜色，避免抢走标题的注意力。

   图标统一：编辑 / 删除 / 完成 / 批量选择现在是同一套线条 SVG，
   尺寸、线宽、圆角全部一致，颜色跟随 currentColor 由这里控制。 */
.task-row .acts {
  display: flex;
  /* 和 .right 用同一个间距值，保证「编辑→删除」和「删除→完成」完全相等 */
  gap: var(--acts-gap);
  opacity: 1;
}
.task-row .acts button {
  /* 和完成按钮同尺寸，三个控件才是一条线上齐的 */
  width: var(--acts-size);
  height: var(--acts-size);
  border-radius: var(--r-xs);
  /* 常显，但不要抢走标题的注意力。
     这里**不能用 --text-3**（rgb(162,156,148)）—— 它压在白卡片上只有 2.72:1，
     细线条图标会糊成一片，看着就像「按钮是灰的、没启用」。
     改用 --text-2，白底上约 5:1，线条清清楚楚，又不至于和标题一样黑。 */
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.task-row .acts button svg {
  width: var(--acts-icon);
  height: var(--acts-icon);
  display: block;
  /* 1.8 的线宽在 15px 下会偏细，稍微加重一点，和勾选框的观感对齐 */
  stroke-width: 2;
}
.task-row .acts button:hover {
  background: var(--surface-3);
  color: var(--text);
}
.task-row .acts button.del:hover {
  background: var(--red-soft);
  color: var(--red);
}
.task-row.done .tt {
  color: var(--text-3);
  text-decoration: line-through;
}
.task-row.done .chip {
  opacity: 0.55;
}
.prog-mini {
  width: 54px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-sunken);
  overflow: hidden;
  flex: none;
}
.prog-mini > i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.35s var(--ease);
}

/* 看板视图 */
.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  align-items: start;
}
.board-col {
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
}
.board-col.drop-over {
  background: var(--brand-soft);
  border-color: var(--brand);
}
.board-col-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 3px 3px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.board-col-head .c {
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.board-card {
  position: relative;
  padding: 10px 11px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.board-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
/* 批量模式下被选中的卡片，和列表视图保持一致的视觉 */
.board-card.picked {
  border-color: var(--brand);
  background: var(--brand-soft);
}
/* 批量模式下卡片左上角的选择框 */
.board-card > .pick {
  position: absolute;
  top: 8px;
  left: 8px;
}
/* 选中的卡片：给标题让出左边距，别被选择框压住 */
.board-card.picked .bt {
  padding-left: 22px;
}
.board-card .bt {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
}
.board-card .bm {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-3);
}
.board-card .bm .due {
  color: #b8453d;
}
/* 完成勾选框推到最右边 */
.board-card .bm .check.on-card {
  margin-left: auto;
  /* 看板卡里的字号更小，勾选框跟着缩一号，比例才协调 */
  width: 19px;
  height: 19px;
  border-radius: 6px;
}
.board-card .bm .check.on-card svg {
  width: 12px;
  height: 12px;
}
.board-card .bm .pick {
  width: 17px;
  height: 17px;
}
.board-card .bm .pick svg {
  width: 11px;
  height: 11px;
}
.board-card.done .bt {
  color: var(--text-3);
  text-decoration: line-through;
}
.board-card.done {
  opacity: 0.75;
}

/* ==========================================================================
   B. 账号管理
   ========================================================================== */
.acct-hero {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.acct-cover {
  height: 92px;
  /* 跟新主色一脉相承：青绿 → 青蓝 → 蓝 */
  background: linear-gradient(120deg, #3d9d84 0%, #2f93b8 45%, #0081ff 100%);
  position: relative;
}
.acct-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 12% 0%, rgba(255, 255, 255, 0.35), transparent 60%);
}
/* 账号页头图：左侧头像 + 中间信息 + 右侧按钮
   —— 信息块必须能收缩/换行，否则会把按钮挤出屏幕 */
.acct-identity {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px 16px;
  padding: 0 22px 18px;
  margin-top: -38px;
  position: relative;
}
.acct-identity .avatar {
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-sm);
}
.acct-idtext {
  flex: 1 1 240px;
  min-width: 0;
  padding-bottom: 2px;
}
.acct-name {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.acct-handle {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-motto {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.acct-actions {
  flex: none;
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
  margin-left: auto;
}

/* 账号页的卡片排布改用隐形网格（board.js），这里只补充网格容器本身的留白 */
.acct-board {
  margin-top: 4px;
}
.acct-board .board-item-inner > .card {
  background: var(--surface);
}

/* 卡片高低不一时的分列（masonry）排布：占位页在用 */
.masonry-grid {
  column-width: 340px;
  column-gap: var(--gap);
}
.masonry-grid > * {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: var(--gap);
  display: block;
}

/* ---------- 分类筛选（多选） ---------- */
.filter-seg {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  background: var(--surface-3);
  border-radius: var(--r-sm);
  flex-wrap: wrap;
}
.filter-seg button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-xs);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  background: transparent;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.filter-seg button:hover {
  color: var(--text-2);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.filter-seg button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}
.filter-seg .tick {
  font-size: 10px;
  color: var(--brand);
  width: 0;
  overflow: hidden;
  transition: width var(--dur) var(--ease);
}
.filter-seg button.active .tick {
  width: 10px;
}

/* ---------- 子待办 ---------- */
.task-block {
  border-bottom: 1px solid var(--line-soft);
}
.task-block:last-child {
  border-bottom: none;
}
.task-block > .task-row {
  border-bottom: none;
}
.task-row .caret {
  flex: none;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-xs);
  color: var(--text-3);
  font-size: 15px;
  line-height: 1;
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.task-row .caret:hover {
  background: var(--surface-3);
  color: var(--text);
}
.task-row .caret.open {
  transform: rotate(90deg);
  color: var(--brand);
}
.task-row .caret-placeholder {
  flex: none;
  width: 18px;
}

.subtasks {
  padding: 2px 16px 12px 58px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: subtask-in 0.18s var(--ease);
}
@keyframes subtask-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.subtask {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--r-xs);
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.subtask:hover {
  background: var(--surface-2);
}
.subtask .txt {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subtask.on .txt {
  color: var(--text-3);
  text-decoration: line-through;
}
.subtask-input {
  cursor: text;
}
.subtask-input input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--text);
  padding: 2px 0;
}
.subtasks-empty {
  font-size: 12px;
  color: var(--text-3);
  padding: 6px 8px;
}
.subtask-add {
  align-self: flex-start;
  font-size: 12px;
  color: var(--text-3);
  padding: 6px 8px;
  border-radius: var(--r-xs);
  transition: all var(--dur) var(--ease);
}
.subtask-add:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

/* ---------- 编辑器里的子任务列表 ----------
   已经写好的行 + 底部一行「虚拟新行」。
   虚拟行点击后变成真的输入框，可以连着往下写。 */
.subtask-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subtask-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.subtask-row .subtask-input {
  flex: 1 1 auto;
  min-width: 0;
}
/* 行号：和输入框垂直居中 */
.subtask-no {
  flex: none;
  width: 18px;
  text-align: right;
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
/* 正在输入的新行：给一点高亮，让人知道「这行还没提交」 */
.subtask-row.is-new .subtask-input {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* 虚拟行的「未激活」状态：一行淡淡的提示，点一下就变输入框 */
.subtask-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--text-3);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}
.subtask-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}
.subtask-ghost .subtask-no {
  color: inherit;
  opacity: 0.7;
}
/* 【提示文字：和 .field-hint 一样的处理】
   2026-09-27 样式体检发现它一直没有规则。图标格 + 文字是 flex 排的，
   文字这里允许收缩并截断（"点击继续添加子任务"这类文案以后变长也不会
   把那一行撑破），和 .tk-title / .vm-name 用的是同一套写法。 */
.subtask-ghost-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 编辑器里的「自动完成」开关行 */
.auto-complete-row {
  gap: 12px;
  padding: 10px 12px;
  margin-top: 4px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.auto-complete-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}

/* ---------- 批量选择 ---------- */
/* 和「完成勾选框」是同一个形状，只是小一号：
   同一套圆角、同一套线条对勾，勾选态同样是实心品牌色。 */
.pick {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  /* 描边和「完成勾选框」一个色，两个方框看起来才是同一套 */
  border: 1.5px solid var(--text-2);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all var(--dur) var(--ease);
}
.pick svg {
  width: 11px;
  height: 11px;
  display: block;
  stroke-width: 2.4;
}
.pick:hover {
  border-color: var(--brand);
}
.pick.on {
  background: var(--brand);
  border-color: var(--brand);
}
.pick-group {
  margin-right: 7px;
}
.task-row.picked {
  background: var(--brand-soft);
}
.task-row.picked:hover {
  background: #f0dcdc;
}

/* 吸底的批量操作条 */
.batch-bar {
  position: sticky;
  bottom: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-top: 4px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 -6px 24px -12px rgba(60, 52, 44, 0.3);
  animation: view-in 0.2s var(--ease);
}
.batch-count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-deep);
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  white-space: nowrap;
}

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.kv:last-child {
  border-bottom: none;
}
.kv .k {
  color: var(--text-2);
  flex: none;
}
.kv .v {
  color: var(--text);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.session-row:last-child {
  border-bottom: none;
}
.session-row .si {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.session-row .nm {
  flex: 1 1 auto;
  min-width: 0;
}
.session-row .nm .d {
  font-size: 11px;
  color: var(--text-3);
}

/* ==========================================================================
   门卡（API Token）— 账号设置里那一块
   --------------------------------------------------------------------------
   用「门卡」这个比方而不是「API Token」，因为用户看到后者会一头雾水。
   界面要让人一眼明白三件事：这是一把钥匙、只显示一次、随时能吊销。
   ========================================================================== */

.tk-intro {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.75;
  margin-bottom: 12px;
}
.tk-intro b { color: var(--text); }

/* 生成表单 */
.tk-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.tk-input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
}
.tk-input:first-of-type { flex: 1 1 200px; min-width: 0; }
.tk-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
select.tk-input { flex: 0 0 auto; cursor: pointer; }

/* ---------- 刚生成出来的那串字符 ---------- */

.tk-new {
  padding: 12px 14px;
  border: 1px solid var(--warn-line, #e8d9a8);
  background: color-mix(in srgb, var(--warn, #ff8e37) 10%, var(--surface));
  border-radius: 12px;
  margin-bottom: 12px;
  display: grid;
  gap: 6px;
}

.tk-new-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
}
.tk-new-head > span { color: var(--warn, #ff8e37); }

.tk-new-desc { font-size: 11.5px; color: var(--text-2); line-height: 1.7; }

.tk-new-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* 那串字符：等宽、可选中、自动换行 */
.tk-code {
  flex: 1 1 240px;
  min-width: 0;
  font-family: var(--font-num);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  word-break: break-all;
  line-height: 1.5;
  /* 默认就选中，方便用户直接 Ctrl+C */
  user-select: all;
}

.tk-new-hint {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-num);
}

/* ---------- 权限说明（折叠） ---------- */

.tk-rules {
  margin-bottom: 10px;
  font-size: 11.5px;
  color: var(--text-3);
}
.tk-rules summary {
  cursor: pointer;
  padding: 4px 0;
  color: var(--text-2);
}
.tk-rules ul {
  margin: 6px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
  line-height: 1.7;
}
.tk-rules b { color: var(--text-2); }

/* ---------- 列表 ---------- */

.tk-count {
  font-size: 11.5px;
  color: var(--text-3);
  margin-bottom: 6px;
}

.tk-empty {
  padding: 18px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.7;
}

.tk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.tk-row:last-child { border-bottom: none; }

/* 【门卡列表 / "刚生成的那串字符"这两个容器】
   2026-09-27 样式体检发现它们一直没有规则。行与行之间靠 .tk-row 自己的
   虚线下边框分隔（不是靠 gap），所以这里只需要把容器声明清楚：
   一列、可以收缩（卡片宽度变了不会溢出）。
   另：没生成新卡时 reveal 是空的 —— 空块不占位，省得在列表上方留一道缝。 */
.tk-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tk-reveal {
  min-width: 0;
}
.tk-reveal:empty { display: none; }

/* 已吊销的整行压暗 —— 一眼看出"这张卡废了" */
.tk-row.revoked { opacity: .5; }

.tk-main { flex: 1 1 auto; min-width: 0; }

.tk-name {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tk-title {
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 权限标签：只读是灰的、可写是醒目的 ——
   让用户一眼看出"这张卡能改数据" */
.tk-scope {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: var(--text-3);
  white-space: nowrap;
}
.tk-scope.write {
  border-color: transparent;
  background: var(--warn-bg, color-mix(in srgb, var(--warn, #ff8e37) 16%, transparent));
  color: var(--warn-on, #8a6a1f);
  font-weight: 500;
}

.tk-badge {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--red-soft);
  color: var(--red);
  white-space: nowrap;
}

.tk-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

.tk-prefix {
  font-family: var(--font-num);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 5px;
}

.tk-never { font-style: italic; opacity: .8; }

.tk-ops { flex: 0 0 auto; }

.tk-op {
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 11.5px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 7px;
  font-family: inherit;
}
.tk-op:hover { background: var(--surface-2); color: var(--text); }
.tk-op.danger:hover { color: var(--red); background: var(--red-soft); }

@media (max-width: 700px) {
  .tk-new-row { flex-direction: column; align-items: stretch; }
  .tk-code { flex: 1 1 auto; }
}

.avatar-editor {
  display: flex;
  align-items: center;
  gap: 18px;
}
.avatar-preview {
  flex: none;
  position: relative;
}
.avatar-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.activity-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-item .ad {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 7px;
  flex: none;
}
.activity-item .ac {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-2);
}
.activity-item .at {
  flex: none;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.danger-zone {
  border-color: #f0d8d5;
  background: #fffbfb;
}
.danger-zone .card-title {
  color: var(--red);
}

/* ==========================================================================
   C. 模块占位页
   ========================================================================== */
.soon-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: 26px 28px;
}
.soon-hero::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-soft), transparent 70%);
}
.soon-hero .ttl {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
}
.soon-hero .dsc {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 8px;
  max-width: 620px;
  line-height: 1.75;
  position: relative;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 11px;
  margin-top: 20px;
  position: relative;
}
.feature-item {
  padding: 13px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.feature-item .fi {
  font-size: 17px;
  margin-bottom: 6px;
}
.feature-item .fn {
  font-size: 13px;
  font-weight: 600;
}
.feature-item .fd {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 3px;
  line-height: 1.6;
}
.roadmap {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 6px;
}
.road-step {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  font-size: 12.5px;
}
.road-step .rs {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  background: var(--surface-3);
  color: var(--text-3);
  margin-top: 1px;
}
.road-step.done .rs {
  background: var(--green-soft);
  color: #4d7455;
}
.road-step.now .rs {
  background: var(--brand);
  color: var(--on-brand);
}
.road-step .rt {
  font-weight: 500;
}
.road-step .rx {
  font-size: 11.5px;
  color: var(--text-3);
}

/* ==========================================================================
   D. 登录页
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--app-bg);
}
.auth-visual {
  position: relative;
  overflow: hidden;
  /* 中性藏青，和 --nav-bg(#1f2937) 是一家人 */
  background: linear-gradient(155deg, #232c3a 0%, #1f2937 55%, #2a3648 100%);
  color: #fff;
  padding: 46px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-visual::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  right: -180px;
  top: -160px;
  background: radial-gradient(circle, rgba(201, 139, 139, 0.34), transparent 68%);
}
.auth-visual::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  left: -140px;
  bottom: -190px;
  background: radial-gradient(circle, rgba(138, 127, 196, 0.3), transparent 68%);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
}
.auth-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(140deg, #48ab93, #0081ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  box-shadow: 0 8px 20px -8px rgba(201, 139, 139, 0.9);
}
.auth-brand .bn {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.auth-brand .bs {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.auth-copy {
  position: relative;
  max-width: 430px;
}
.auth-copy h2 {
  font-size: 29px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: 0.01em;
}
.auth-copy h2 em {
  font-style: normal;
  color: #e0b3b3;
}
.auth-copy p {
  margin-top: 14px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.85;
}
.auth-points {
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: relative;
}
.auth-point {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
}
.auth-point .ap {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex: none;
}
.auth-foot {
  position: relative;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  overflow-y: auto;
}
.auth-card {
  width: min(392px, 100%);
}
.auth-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.auth-tab {
  padding: 0 2px 11px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-3);
  position: relative;
  transition: color var(--dur) var(--ease);
}
.auth-tab.active {
  color: var(--text);
}
.auth-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* 【.auth-hint 去掉了】
   原来是"演示账号 user / user123 + 自动填入"那个小黄条。
   共享账号撤掉之后它就没用了 —— 现在是"点一下开一个自己的临时账号"，
   见下面的 .guest-trial。 */

/* ------------------------------ 访客试用按钮 ------------------------------
 * 这是登录页的主入口，不是次要的补充说明，
 * 所以做得比"提示条"醒目：整块可点、有图标、说清楚它是什么。
 */
.guest-trial {
  margin-bottom: 4px;
}
.guest-trial-btn {
  width: 100%;
  /* 【必须放开 .btn-lg 的固定高度】
     .btn-lg 写的是 `height: 42px`（还有 `padding: 0 20px`）。
     普通按钮只有一行文字，42px 正好；但这个按钮是**两行**：
     标题 +11.5px 的说明，实测内容高 43px，再加上下内边距就超过了 42 ——
     而 `height` 是**固定**的，内容就直接从按钮背景里溢出来，
     看着像"文字跑到框外面了"。

     改成 height:auto + min-height，让它按内容长高。 */
  height: auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-align: left;
  border: 1px solid var(--brand-line, #d8c9b8);
  background: var(--brand-soft);
  border-radius: var(--r-md);
  transition: all var(--dur) var(--ease);
}
/* 【说明那行要允许换行】
   .btn 上有一条 `white-space: nowrap`（base.css），本意是"按钮文字别折行"。
   但这个按钮里塞的是一整句话，nowrap 会把它顶成一行、撑破宽度。
   标题那行保留 nowrap 没关系（它本来就短），说明这行要放开。 */
.gt-text small {
  white-space: normal;
}
.guest-trial-btn:hover:not(:disabled) {
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.guest-trial-btn:disabled {
  opacity: 0.7;
  cursor: default;
}
.gt-ico {
  font-size: 22px;
  line-height: 1;
  flex: none;
}
.gt-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.gt-text b {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}
.gt-text small {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.5;
}

/* 「或者」分隔线 —— 把"随便试试"和"登录/注册"分成两条路 */
.auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 4px;
  color: var(--text-3);
  font-size: 11.5px;
}
.auth-or::before,
.auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-2, #e6e0d8);
}

.avatar-pick-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.avatar-pick {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: var(--surface-3);
  border: 2px solid transparent;
  transition: all var(--dur) var(--ease);
}
.avatar-pick:hover {
  transform: scale(1.08);
}
.avatar-pick.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-visual {
    display: none;
  }
}


/* ==========================================================================
   灵感页（独立大类）
   ========================================================================== */

/* ---------- 快速记录 ---------- */
.idea-compose .card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
}
/* 【这里原来管的是 .idea-compose textarea】
   编辑框换成和日记同一套 contenteditable（.fd-wys）之后，那块框的
   底色 / 描边 / 圆角由 daymark.css 的 .fd-wys 管 —— 也就是说灵感页的
   编辑框和日记页的**长得一模一样**，这正是用户要的"同款"。
   所以这里只补这个页面特有的两处差异，不再复述一遍边框样式。 */
.idea-compose .fd-wys {
  min-height: 58px;
  font-size: 13.5px;
}
/* 【快速记录的工具栏要矮】
   日记页那排工具栏是 `.fd-wys-bar` 给的下边距，卡片里正文只有两行高，
   按日记那个间距工具栏会喧宾夺主。这里收一点，并让按钮自己换行（不加滚动条：
   横向滚动条在这么窄的卡片里几乎点不着）。 */
.idea-compose .fd-wys-bar {
  margin-bottom: 8px;
}
.idea-compose .fd-wys-bar .dt-bar {
  padding: 3px 4px;
  gap: 2px;
}
.idea-compose .fd-wys-bar .dt-btn {
  height: 24px;
  min-width: 26px;
  padding: 0 6px;
  font-size: 12px;
}
/* 描述里写"回车即保存"是错的：富文本里回车是换行 */
.compose-hint {
  font-size: 11.5px;
  color: var(--text-3);
}
.compose-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.compose-label {
  font-size: 11.5px;
  color: var(--text-3);
}
/* 标签那一行（快速记录里）：箭头按钮要能盖在上面，所以是 relative */
.compose-tagline {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 【.quick-colors 那五颗色圆点已经删了】
   它是快速记录卡片里"给这条灵感挑个颜色"的那一排。2026-10-01 per-idea
   颜色撤掉、颜色归到标签上之后，页面上没有任何地方再用它 ——
   标签色块改用通用的 .swatch-grid / .swatch（见 base.css），
   所以这里连规则一起删掉，不留一条没人接的样式。 */

/* ---------- 标签选择器（快速记录和编辑弹窗共用） ---------- */
.tag-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.tag-chip {
  font: inherit;
  font-size: 11.5px;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 999px;
  /* 颜色（文字 + 描边）由行内 style 按标签自己的颜色给，见 views/ideas.js */
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.tag-chip:hover {
  background: var(--surface-3);
}
/* 没选中：淡一点，让"选中了哪几个"一眼能看出来 */
.tag-chip:not(.on) {
  opacity: 0.55;
}
.tag-chip.on {
  background: var(--surface-3);
  font-weight: 600;
}
.tag-new {
  font: inherit;
  font-size: 11.5px;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.tag-new:hover {
  color: var(--text);
  border-color: var(--text-3);
}
.tag-none {
  font-size: 11.5px;
  color: var(--text-3);
}
.tag-adder-input {
  font: inherit;
  font-size: 11.5px;
  height: 24px;
  width: 128px;
  padding: 0 8px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}
/* 【浮层布局只给快速记录用】
   卡片很窄，新建输入框要是占一行，整张卡片会被撑高（而且下面那颗
   「＋ 记下来」会跳一下）。这里让它绝对定位飘在标签行下面 ——
   不占布局、不推动任何东西。编辑弹窗里空间充足，用默认的流式排布。 */
.tag-picker-overlay .tag-adder-input {
  position: absolute;
  left: 34px;
  top: calc(100% + 4px);
  z-index: 5;
  box-shadow: var(--shadow-md);
}

/* ---------- 卡片上的标签小片 ---------- */
.idea-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 8px;
}
.idea-tag {
  font-size: 10.5px;
  line-height: 1;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
  /* 底色用当前文字色兑一点出来（color-mix）—— 这样标签片自己就带一层
     同色的浅底，而且三套主题下都跟着各自的功能色走，不用为每套主题写一遍。
     浏览器太老不认识 color-mix 时，这一行整条失效、只留描边，样子也能看。 */
  background: color-mix(in srgb, currentColor 12%, transparent);
}

/* ---------- 筛选条里的标签筛选 ---------- */
.idea-tagbar {
  flex-wrap: wrap;
  padding-top: 2px;
}
.idea-tag-filter button {
  gap: 5px;
}

/* ---------- 工具栏里的颜色点 ---------- */
.filter-seg .color-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.idea-toolbar {
  flex-wrap: wrap;
}
.idea-search input {
  height: 32px;
  font-size: 12.5px;
}

/* ---------- 卡片墙 ---------- */
.idea-wall {
  columns: 3 260px;
  column-gap: var(--gap);
  margin-top: 2px;
}
.idea-card {
  position: relative;
  display: flex;
  gap: 10px;
  break-inside: avoid;
  margin-bottom: var(--gap);
  padding: 13px 14px 12px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.idea-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.idea-card.pinned {
  background: linear-gradient(180deg, var(--brand-soft), var(--surface) 55%);
}
.idea-card.picked {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft);
}
.idea-stripe {
  width: 3px;
  border-radius: 999px;
  flex: none;
  align-self: stretch;
}
.idea-body {
  min-width: 0;
  flex: 1;
}
.idea-text {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.idea-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-3);
}
/* 【时间那一段不许被挤断】
   2026-09-27 样式体检发现它一直没有规则。它和几个小胶囊（置顶 / 已转待办）
   挤在一行里，flex 默认允许收缩 —— 一收缩 "3 天前" 就会被拆成两行。
   固定住宽度、且不参与拉伸即可。 */
.idea-when {
  flex: none;
  white-space: nowrap;
}
.idea-flag {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-3);
}
.idea-flag.done {
  color: var(--green);
  background: rgba(143, 174, 139, 0.16);
}
.idea-tools {
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0;
  flex: none;
  transition: opacity var(--dur) var(--ease);
}
.idea-card:hover .idea-tools {
  opacity: 1;
}
.idea-tools button {
  width: 24px;
  height: 24px;
  border-radius: var(--r-xs);
  font-size: 12px;
  color: var(--text-3);
  background: transparent;
  transition: all var(--dur) var(--ease);
}
.idea-tools button:hover {
  background: var(--surface-3);
  color: var(--text);
}
.idea-tick {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  flex: none;
}
.idea-tick.on {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

/* ==========================================================================
   灵感 · 统计视图
   --------------------------------------------------------------------------
   三块：热力图（GitHub 那种）/ 时间视图（12 个月柱状）/ 标签视图（横条）。
   热力图的深浅色走 `color-mix(--brand, transparent)` —— 也就是**主题色**，
   所以三套主题（纸感 / 薄荷灰 / 墨夜）各自自动是不同颜色，
   不需要为每套主题再写一遍四档色。
   ========================================================================== */
.idea-stats {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ---------- 概览数字 ---------- */
.idea-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  /* 【卡片内容要自己留左右内边距】
     .card-head 自带 padding，但 .card 里面的正文区没有 —— 
     统计页这四块（概览 / 热力 / 月份 / 标签）都是直接摆在 .card 里的，
     不补这一行就会贴着卡片边。 */
  padding: 0 16px 16px;
}
.idea-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.idea-stat-num {
  font-family: var(--font-num);
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.idea-stat-label {
  font-size: 11.5px;
  color: var(--text-2);
}
.idea-stat-note {
  font-size: 10.5px;
  color: var(--text-3);
}

/* ---------- 热力图 ---------- */
.heat-wrap {
  /* 【为什么宽度要用变量算出来】
     27 列格子 × 12px + 26 个 3px 的缝 ≈ 402px —— 比手机宽度（360px）宽。
     靠 overflow-x 滚的话"横向越界"那条体检会报这个元素越界，
     而且手机上也没人愿意为了看一张热力图去横着拖。
     所以桌面保持 12px，窄屏用媒体查询把格子缩到 12 变 9、缝 3 变 2：
     宽度正好跟着窗口走（见下面 @media 那条），一屏就能看全，
     也不用去替每套主题算别的数。
     万一将来格子数更多，这一层仍然是滚动容器，兜得住。 */
  --heat-cell: 12px;
  --heat-gap: 3px;
  overflow-x: auto;
  padding: 0 16px 4px;
  margin-bottom: 8px;
}
.heat-grid {
  display: flex;
  gap: var(--heat-gap);
  /* 让每一列平分可用宽度，格子随列宽收缩（格子有 flex:none 就不受挤） */
  min-width: min-content;
}
.heat-col {
  display: flex;
  flex-direction: column;
  gap: var(--heat-gap);
}
.heat-month {
  font-size: 10px;
  color: var(--text-3);
  height: 13px;
  white-space: nowrap;
}
.heat-cell {
  width: var(--heat-cell);
  height: var(--heat-cell);
  border-radius: 3px;
  background: var(--surface-3);
  flex: none;
}
/* 0 条：一个浅浅的底（"这天没写"也要看得见，这是这张图要回答的问题） */
.heat-cell.l0 {
  background: color-mix(in srgb, var(--text-3) 14%, transparent);
}
.heat-cell.l1 { background: color-mix(in srgb, var(--brand) 30%, transparent); }
.heat-cell.l2 { background: color-mix(in srgb, var(--brand) 55%, transparent); }
.heat-cell.l3 { background: color-mix(in srgb, var(--brand) 78%, transparent); }
.heat-cell.l4 { background: var(--brand); }
/* 补齐用的格子（不在统计区间内）：什么都不画 */
.heat-cell.blank {
  background: transparent;
}
.heat-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-3);
  padding: 0 16px 14px;
}

/* ---------- 时间视图（月度柱状） ---------- */
.idea-month-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 170px;
  padding: 18px 16px 14px;
}
.idea-month-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
}
.idea-month-count {
  font-family: var(--font-num);
  font-size: 11px;
  color: var(--text-2);
}
.idea-month-bar {
  width: 100%;
  max-width: 38px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 55%, transparent));
  transition: height var(--dur) var(--ease);
}
.idea-month-label {
  font-size: 10.5px;
  color: var(--text-3);
  white-space: nowrap;
}

/* ---------- 标签视图（横条） ---------- */
.idea-tag-stats {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 16px 16px;
}
/* 【为什么每根标签条是一个 <button>】
   点一下 = "切回卡片墙，只看这个标签" —— 看了数字顺手看内容，
   比只能看数字有用。所以它得有按钮的语义（焦点、回车），
   但长得不像按钮（背景透明、没有边框）。 */
.idea-tag-row {
  font: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 4px 6px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.idea-tag-row:hover {
  background: var(--surface-2);
}
.idea-tag-name {
  flex: none;
  width: 78px;
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.idea-tag-track {
  flex: 1;
  height: 14px;
  min-width: 0;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.idea-tag-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.idea-tag-count {
  flex: none;
  width: 34px;
  text-align: right;
  font-family: var(--font-num);
  font-size: 12px;
  color: var(--text-2);
}

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  .idea-wall {
    columns: 1;
  }
  /* 触屏没有 hover，工具栏常驻 */
  .idea-tools {
    opacity: 1;
  }
  /* 12 个月的柱子挤在手机宽度上，月份标签会互相压住 —— 只留奇数月 */
  .idea-month-col:nth-child(even) .idea-month-label {
    visibility: hidden;
  }
  .idea-tag-name {
    width: 60px;
  }
  .tag-picker-overlay .tag-adder-input {
    left: 0;
  }
  /* 热力图：格子从 12px 缩到 8px、缝从 3px 缩到 2px。
     27 列一屏刚好放得下（8×27 + 2×26 = 268px，容器内宽约 288px），
     不用横向拖，也不会把 document 撑宽（窄屏越界那条体检会盯这个）。 */
  .heat-wrap {
    --heat-cell: 8px;
    --heat-gap: 2px;
  }
  .heat-cell {
    border-radius: 2px;
  }
}
@media (min-width: 861px) and (max-width: 1200px) {
  .idea-wall {
    columns: 2 240px;
  }
}


/* ==========================================================================
   AI 提示词弹窗
   ========================================================================== */
.prompt-area {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  padding: 12px 14px;
  font-family: var(--font-mono, ui-monospace, "Cascadia Code", Consolas, monospace);
  font-size: 12px;
  line-height: 1.65;
  color: var(--text);
}
.prompt-area:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
}
.steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.steps .step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 5px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 12px;
  color: var(--text-2);
}
.steps .step::before {
  content: attr(data-n);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.steps .step-arrow {
  color: var(--text-3);
  font-size: 12px;
}


/* ==========================================================================
   账号等级（临时 / 正式）
   --------------------------------------------------------------------------
   阶段 2 加的。之前只有 is_guest 一个布尔，界面上就靠一枚「🔒 访客账号」
   的徽章表达。现在等级是正式的概念（临时 / 正式，以后可能还有 VIP），
   所以单独给一块样式，别再复用"锁"的语义 —— 那个图标容易被理解成
   "这个账号被锁住了"，其实只是有几项操作不让做。
   ========================================================================== */
.badge-guest {
  background: rgba(201, 165, 74, 0.16);
  color: #8a6d1f;
  border: 1px solid rgba(201, 165, 74, 0.3);
}
[data-theme='night'] .badge-guest {
  color: #d8b45c;
}

/* 「转为正式账号」弹窗里的两小块 */
.promote-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.promote-note b {
  color: var(--text-1);
}

/* 出错提示：默认不显示，出错时把 display 打开。
   【为什么不用 .field-error 之类现成的类】
   那些是"字段级"的，样式只够放一行小字。转正这里要说的原因比较长
   （为什么必须换用户名），需要能换行、能占满宽度。 */
.promote-err {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #b4483f;
  background: rgba(196, 90, 80, 0.1);
  border: 1px solid rgba(196, 90, 80, 0.28);
}
[data-theme='night'] .promote-err {
  color: #e79a92;
}

/* 被锁住的按钮：看得出是禁用的，鼠标悬停给原因 */
.btn.is-locked,
.btn.is-locked:hover {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--surface-3);
  color: var(--text-3);
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}
.btn.is-locked .lock-icon {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.8;
}

/* 锁定的输入框 */
.input:disabled,
.input[disabled] {
  background: var(--surface-3);
  color: var(--text-3);
  cursor: not-allowed;
}

/* 访客说明条 */
.guest-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(201, 165, 74, 0.1);
  border: 1px solid rgba(201, 165, 74, 0.22);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
}
.guest-note > span:first-child {
  flex: none;
  font-size: 13px;
}

/* 危险操作卡片被锁时的样子：不再是刺眼的红 */
.danger-zone.is-locked {
  border-color: rgba(201, 165, 74, 0.3);
  background: linear-gradient(180deg, rgba(201, 165, 74, 0.05), transparent 60%);
}
.danger-zone.is-locked .card-title .dot {
  background: #c9a54a;
}


/* 登录设备：折叠多余的会话 */
.session-more-btn {
  width: 100%;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-3);
}
.session-more[hidden] { display: none; }

/* ==========================================================================
   I. 表格视图（待办 / 灵感共用）
   --------------------------------------------------------------------------
   设计原则：**看起来就像这些模块本来就有的东西**。
   所以：
     · 圆角、描边、底色、字体全部沿用同一套 token，不引入新颜色
     · 表头用 --surface-2 的浅色，和卡片头一致
     · 隔行斑马纹用非常轻的一层，别喧宾夺主
     · 就地编辑直接复用输入框的观感，不另造一套控件
   ========================================================================== */

/* 表格下方的工具条：条数 + 提示 + 导出 */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px 11px;
  flex-wrap: wrap;
}
.table-count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-deep);
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  white-space: nowrap;
}
.table-hint {
  font-size: 11.5px;
  color: var(--text-3);
}

/* 外框：和 .card 一致的圆角 + 描边；横向能滚，纵向设了 maxHeight 才滚 */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: auto;
  /* 表格内部滚动时不带动整页 */
  overscroll-behavior: contain;
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  color: var(--text);
}

/* ---------- 表头 ---------- */
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
  color: var(--text-2);
  font-weight: 600;
  font-size: 11.5px;
  text-align: left;
  padding: 0;
  /* 用 inset 阴影当分隔线：sticky 表头的边框在滚动时会一起滚走，阴影不会 */
  box-shadow: inset 0 -1px 0 var(--line-strong);
  white-space: nowrap;
}
.data-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}
.data-table thead th.sortable:hover {
  background: var(--surface-3);
  color: var(--text);
}
.data-table thead th.sorted {
  color: var(--brand-deep);
}
.th-inner {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 11px;
}
/* 【列名长了自己截断，别把排序箭头挤出去】
   2026-09-27 样式体检发现它一直没有规则：.th-inner 是 flex，
   文字不加约束的话，长的列名会把右边的排序标记（.sort-mark）挤没。
   和 .tk-title 一样：可以收缩 + 省略号，表头那一行就永远是齐的。 */
.th-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sort-mark {
  font-size: 9px;
  color: var(--text-3);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.data-table thead th.sortable:hover .sort-mark {
  opacity: 0.55;
}
.sort-mark.on {
  opacity: 1;
  color: var(--brand);
}

/* ---------- 表体 ---------- */
.data-table tbody td {
  padding: 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  /* 单元格内容交给内部 .cell 排版，这里只负责对齐 */
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
/* 斑马纹：非常轻的一层，只是帮眼睛横向对齐，不该被注意到 */
.data-table tbody tr.odd td {
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}
.data-table tbody tr:hover td {
  background: var(--surface-3);
}
.data-table tbody tr.is-done .cell-text {
  color: var(--text-3);
  text-decoration: line-through;
}

/* 单元格里的文字：长了就省略号，鼠标悬停看全文（表格不能被撑破） */
.cell-text {
  display: block;
  padding: 8px 11px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-text.is-empty {
  color: var(--text-3);
}
.cell-text.long {
  /* 备注这类长文本给两行，再多就省略 */
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.45;
}
.cell-text.is-saving {
  color: var(--text-3);
}
.cell-text.is-saved {
  color: var(--ok);
  font-weight: 600;
}
.cell-text.is-error {
  color: var(--danger);
  font-weight: 600;
}

/* 可编辑单元格：悬停给一点暗示，让人知道这里能点 */
.data-table td.editable .cell {
  cursor: text;
  border-radius: var(--r-xs);
  transition: box-shadow var(--dur) var(--ease);
}
.data-table tbody tr:hover td.editable .cell:hover {
  box-shadow: inset 0 0 0 1.5px var(--brand);
}

/* 就地编辑的输入框 / 下拉：撑满单元格，看起来就是「格子变成了输入框」 */
.cell-input {
  width: 100%;
  padding: 7px 10px;
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--brand);
  border-radius: var(--r-xs);
  outline: none;
}
select.cell-input {
  cursor: pointer;
  padding-right: 6px;
}

/* 进度列：一根小横条 + 百分比 */
.cell-progress {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
}
.cell-progress-bar {
  flex: 1 1 auto;
  height: 5px;
  min-width: 26px;
  border-radius: 999px;
  background: var(--surface-sunken);
  overflow: hidden;
}
.cell-progress-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
  transition: width 0.3s var(--ease);
}
.cell-progress-num {
  flex: none;
  font-size: 11.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* 空表提示 */
.empty-cell {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
}

/* 窄屏：表格允许横向滚动，不强行压扁列宽 */
@media (max-width: 900px) {
  .table-hint { display: none; }
  .data-table { font-size: 12px; }
}
