/* ==========================================================================
   微迹 Weetrack — 布局：侧栏 / 顶栏 / 工作区
   ========================================================================== */

.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ==========================================================================
   侧栏
   ========================================================================== */
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--nav-bg);
  background-image: radial-gradient(
      120% 60% at 50% 0%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 70%
    );
  color: var(--nav-text);
  padding: 16px 12px 12px;
  position: relative;
  z-index: 20;
}

/* ---------- 左下角：账号区 + 全局操作菜单 ---------- */
.sidebar-foot {
  flex: none;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--nav-line);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.foot-note {
  font-size: 10px;
  color: var(--nav-muted);
  padding: 2px 8px 0;
  letter-spacing: 0.02em;
  text-align: center;
}

/* 【侧栏底部那个小圆点（临时账号）】
   2026-09-27 的样式体检（npm run audit:styles）查出来的：
   app.js 里给「临时账号 · 闲置 N 天自动注销」那行加了个 `span.fg-dot`，
   但这个类名**在样式表里一个规则都没有** —— 空 span 没有宽高，
   于是那个点从来没出现过（不报错、也不缺内容，纯粹看不见）。
   现在按项目里 `.card-title .dot` 那一套给它 6px 圆点；
   用暖色是因为这行本身是"账号会被清理"的提醒。 */
.fg-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--warn, #ff8e37);
}

/* ---------- 「记个想法」按钮 ----------
   一闪而过的念头要马上记下来，所以常驻在侧栏底部，
   用一圈浅色描边让它比普通菜单项更显眼一点。 */
.capture-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  margin-bottom: 2px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--nav-line);
  background: transparent;
  color: var(--nav-text);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.capture-btn:hover {
  background: var(--nav-hover-bg);
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--nav-text-active);
}
.capture-btn .capture-icon {
  flex: none;
  font-size: 14px;
  line-height: 1;
  width: 18px;
  text-align: center;
}
.capture-btn .capture-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   侧栏「白天 / 夜间」胶囊滑块 —— 用户 2026-10-03 提的
   「日间/夜间模式，添加到主页面的左侧栏下方 头像上方，
     可以快速点击切换，胶囊滑块条的方式？」
   --------------------------------------------------------------------------
   做法：一个圆角容器 + **一个绝对定位的滑块**左右平移。
   注意滑块用的是 `left` 的 transition 而不是给两个按钮各自换底色 ——
   后者是"跳变"，前者才有"滑过去"的连续感。
   ========================================================================== */
.theme-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  padding: 3px;
  border-radius: 999px;                   /* 胶囊 */
  background: var(--nav-hover-bg);
  border: 1px solid var(--nav-line);
  /* 滑块要能滑到边缘，但别溢出去 */
  overflow: hidden;
}
.theme-switch-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  /* 宽度 = (100% - 左右 padding 6px) / 2 */
  width: calc((100% - 6px) / 2);
  left: 3px;
  border-radius: 999px;
  background: var(--nav-active-bg);
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: transform .28s var(--ease), background .28s var(--ease);
  pointer-events: none;
}
/* 夜间时滑块平移到右半边 —— 位移正好是它自己的宽度 */
.theme-switch[data-mode='night'] .theme-switch-thumb {
  transform: translateX(100%);
}
.theme-switch-btn {
  position: relative;                     /* 压在滑块上面 */
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 4px;
  border: 0;
  background: transparent;
  color: var(--nav-muted);
  font-size: 12px;
  cursor: pointer;
  border-radius: 999px;
  transition: color var(--dur) var(--ease);
  white-space: nowrap;
}
.theme-switch-btn:hover { color: var(--nav-text-active); }
.theme-switch-btn.on {
  color: var(--nav-text-active);
  font-weight: 600;
}
.theme-switch-ico { font-size: 13px; line-height: 1; }
/* 侧栏收窄时只留图标（和 .capture-btn 一个策略） */
@media (max-width: 1023px) {
  .theme-switch-txt { display: none; }
  .theme-switch-btn { gap: 0; }
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--r-sm);
  transition: background var(--dur) var(--ease);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.account:hover,
.account.open {
  background: var(--nav-hover-bg);
}
.account .avatar {
  flex: none;
}
.account-caret {
  flex: none;
  margin-left: auto;
  font-size: 11px;
  color: var(--nav-muted);
  opacity: 0;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.account:hover .account-caret,
.account.open .account-caret {
  opacity: 1;
}
.account.open .account-caret {
  transform: rotate(180deg);
}

/* 菜单向上展开，贴着侧栏左下角 */
.acct-menu {
  order: -1;
  margin-bottom: 6px;
  background: var(--nav-bg-2);
  border: 1px solid var(--nav-line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: acct-menu-in 0.16s var(--ease);
}
@keyframes acct-menu-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.acct-menu-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 6px 9px;
  border-bottom: 1px solid var(--nav-line);
  margin-bottom: 4px;
  min-width: 0;
}
.acct-menu-id {
  min-width: 0;
  line-height: 1.35;
}
.acct-menu-id .nm {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   身份小标（临时访客 / 普通 / VIP）
   --------------------------------------------------------------------------
   用户的要求：「左下角头像显示账号身份，临时访客、普通、VIP，
   VIP 做得华丽一点」。
   挂在名字旁边 —— 头像本身可能是首字母、表情或用户传的图，
   往上叠东西会把它弄脏。三种身份各一套样式，见 app.js 的 tierBadge()。
   ========================================================================== */
.tier-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 5px;
  /* 【2026-10-06 缩小了，用户说"偏大……显得有点浮夸"】
     实测（改之前）：名字「颍川」文字宽 27px、高 17px；
     徽章宽 35px、高 20px —— 一个标注比它标注的对象**还大 1.27 倍**，
     而且高 3px。再加上金色渐变 + 外发光 + 文字阴影，
     视觉上它成了这一行的主角，名字反倒像附注。

     改法：字号 10.5 → 9.5、内边距 1px 7px → 1px 5px、
     去掉文字阴影和那圈外发光（只留一层很淡的边）。
     现在它明显比名字小，是"跟在名字后面的小标"该有的分量。 */
  padding: 0 5px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: .2px;
  white-space: nowrap;
  /* 侧栏是深色底，默认用半透明白打底 + 亮字
     （不用 --nav-text：那个值是给"次要说明文字"的，偏灰，
      小标那么小再用灰字就看不清了） */
  background: rgba(255, 255, 255, .14);
  color: #f0ebe2;
  border: 1px solid rgba(255, 255, 255, .18);
}
/* 临时访客：虚线边 —— 一眼看出"这是临时开的" */
.tier-badge.tier-temporary {
  background: transparent;
  border-style: dashed;
  border-color: rgba(255, 255, 255, .34);
  color: rgba(255, 255, 255, .8);
}
.tier-badge.tier-normal {
  background: rgba(255, 255, 255, .16);
}
/* VIP：金底 + 金边
   【为什么不留那圈外发光和扫光】
     它们是"华丽"，但在这个位置**华丽错了** ——
     这里只需要说明"这个账号是会员"，不需要抢注意力。
     金底本身已经足够认出来，再加发光就成了整块侧栏最亮的东西。
     （扫光那道亮保留代码但关掉了，见下面 ::after 的说明。） */
.tier-badge.tier-vip {
  position: relative;
  overflow: hidden;
  /* 【金色压深了一档（2026-10-06）】
     缩小到 9.5px 之后量了对比度：最亮的那个渐变端点只有 **3.24:1**，
     够不着 WCAG AA 的 4.5 —— 而 9.5px 属于"正常字号"，
     就该按 4.5 要求。原来字号大（10.5px）时这个问题不显眼，
     缩小之后笔画细了，同一组颜色就压不住了。
     把中间那档从 #a8862f（对比度 3.24）压到 #96762a，
     现在三个端点分别是 5.68 / 4.02 / 4.76 —— 最差 4.02，
     比之前好了，也仍然是"金色"而不是土黄。
     （再压深一点能到 4.5，但那就不太像金子了。
       这是个取舍：小标上的三个字母，4.02 已经看得清。） */
  background: linear-gradient(135deg, #7a5f26 0%, #96762a 50%, #8a6a24 100%);
  border-color: #c9a94e;
  color: #fff8e8;
  /* 【文字阴影去掉了】
     9.5px 的小字 + 深金底上再压一层阴影，笔画会糊成一团。
     原来的字号大还能撑住，缩小之后就必须去掉。 */
  box-shadow: none;
}
/* 【扫光那道亮：去掉了（2026-10-06）】
   原来这里有一道斜着的白光每隔 2.8 秒扫过徽章，
   连 ::after 的规则和 tier-vip-shine 这组关键帧一起删了。

   它确实好看，但在这个位置**好看错了**：
   侧栏左下角是"我是谁"的地方，用户一天要看好几十次，
   一个一直在动的东西会一直把视线拽过去 —— 用户的原话是"显得有点浮夸"。

   【为什么不把关键帧留着备用】
     留一段没有任何引用的动画，下次有人改样式时会以为它在起作用
     （"这道光怎么没出来？"），白花时间。
     真想要回来，从 git 历史里翻这一段就行。 */
/* 【动效要能被关掉】
   现在 VIP 已经不动了，但这条留着 ——
   它是给"以后又加了动效"兜底的，删掉的话下次加动画容易忘。 */
@media (prefers-reduced-motion: reduce) {
  .tier-badge.tier-vip { animation: none; }
}
/* 账号菜单头里那个：底色是浅色的，VIP 用浅金底 + 深字 */
.acct-menu-id .tier-badge.tier-vip {
  /* 【方向差点搞反了，记一下（2026-10-06）】
     这里的**文字是深色**（#6b5210），所以要提高对比度应该把底色**调亮**，
     而不是调暗。我第一次把末尾那档从 #dcb84f 压深到 #d0ab42，
     结果对比度反而从 3.88 掉到 3.38 —— 越改越糟。
     现在把整条渐变往亮里提一档（末尾 #f0d78a），
     对比度回到 4.6 以上，而且仍然是金色。

     【和侧栏那个的区别】
     侧栏是深底 + 亮字 → 要压深底色；
     这里是浅底 + 深字 → 要提亮底色。
     同样是"金色徽章"，方向正好相反，改的时候别看错。 */
  background: linear-gradient(135deg, #fbeec4 0%, #f5dfa0 55%, #f0d78a 100%);
  border-color: #d9b95c;
  color: #6b5210;
}
.acct-menu-id .hd {
  font-size: 10.5px;
  color: var(--nav-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.acct-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--nav-text);
  text-align: left;
  width: 100%;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.acct-menu-item .ic {
  width: 16px;
  flex: none;
  text-align: center;
  font-size: 13px;
  opacity: 0.85;
}
.acct-menu-item .lb {
  flex: 1 1 auto;
  min-width: 0;
}
.acct-menu-item .hint {
  flex: none;
  font-size: 10px;
  color: var(--nav-muted);
}
.acct-menu-item:hover {
  background: var(--nav-hover-bg);
  color: #fff;
}
.acct-menu-item.active {
  background: var(--nav-active-bg);
  color: #fff;
}
.acct-menu-item.danger {
  color: #d98b84;
}
.acct-menu-item.danger:hover {
  background: rgba(187, 74, 65, 0.18);
  color: #f0a9a2;
}

.account-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}
.account-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}
.account-sub {
  font-size: 10.5px;
  color: var(--nav-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   左下角那一行会员信息（用户 2026-10-03 要求）
   「左侧栏底部 头像信息如果是VIP 应也有会员之类的信息，
     比如 会员次数 剩余月天数？」
   --------------------------------------------------------------------------
   侧栏底色是深色（--nav-bg），所以这里的颜色**不能**用 --text-* 那套
   （那是给浅色卡片的）。用 --nav-muted 和金色，深浅主题下都在深底上。
   ========================================================================== */
.account-sub.is-member {
  display: flex;
  align-items: center;
  gap: 4px;
}
.account-sub .sub-vip {
  flex: none;
  padding: 1px 5px;
  border-radius: var(--r-pill);
  /* 【金色】会员的通用语言。用 --amber 是为了跟全站一套，
     不另外写死一个"VIP 金"——否则换主题时这里会漏掉。 */
  background: var(--amber);
  color: var(--on-accent);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.5;
}
.account-sub .sub-sep { flex: none; opacity: .45; }
.account-sub .sub-left,
.account-sub .sub-days { flex: none; color: var(--nav-text); }
/* 窄侧栏时把"还剩 N 次"截断，但别把"会员"那个标挤没 */
.account-sub .sub-left { overflow: hidden; text-overflow: ellipsis; }

.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
  overflow: hidden;
  user-select: none;
  flex: none;
  background: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-28 { width: 28px; height: 28px; font-size: 12px; }
.avatar-32 { width: 32px; height: 32px; font-size: 13px; }
.avatar-38 { width: 38px; height: 38px; font-size: 15px; }
.avatar-56 { width: 56px; height: 56px; font-size: 22px; }
.avatar-88 { width: 88px; height: 88px; font-size: 34px; }
.avatar .emoji {
  font-size: 1.05em;
  line-height: 1;
}
.avatar-ring {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

/* ---------- 导航 ---------- */
.nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
  margin-right: -4px;
  padding-right: 4px;
}
.nav::-webkit-scrollbar {
  width: 4px;
}
.nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--nav-text);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  cursor: pointer;
  width: 100%;
  text-align: left;
  position: relative;
  /* 【长按拖动时不要选中文字、也不要弹出系统菜单】
     手机上按住不动原本会选中菜单文字、iOS 还会弹出"拷贝/查询"气泡 ——
     而这里长按的语义是"拿起来准备拖动"。所以关掉选中。
     注意**不要**在这里写 touch-action: none —— 那会让整个菜单没法滚动
     （见 nav-order.js 里那段说明：什么时候拦滚动是运行时决定的）。 */
  user-select: none;
  -webkit-user-select: none;
  /* 长按不要触发 iOS 的"点击预览"和系统的链接菜单 */
  -webkit-touch-callout: none;
}
.nav-item .ico {
  width: 16px;
  flex: none;
  text-align: center;
  font-size: 14px;
  opacity: 0.85;
  line-height: 1;
}
.nav-item .label {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-item .tail {
  font-size: 10px;
  color: var(--nav-muted);
  font-family: var(--font-num);
}
.nav-item:hover {
  background: var(--nav-hover-bg);
  color: #d8d3cd;
}
.nav-item.active {
  background: var(--nav-active-bg);
  color: var(--nav-text-active);
  font-weight: 500;
}
.nav-item.active .ico {
  opacity: 1;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5px;
  height: 15px;
  border-radius: 0 3px 3px 0;
  background: #fff;
  opacity: 0.75;
}

.nav-section {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--nav-muted);
  padding: 14px 10px 6px;
  text-transform: uppercase;
}
.nav-divider {
  height: 1px;
  background: var(--nav-line);
  margin: 10px 10px;
}

.sidebar-foot {
  flex: none;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--nav-line);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ==========================================================================
   主区域
   ========================================================================== */
.main {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--app-bg);
  padding: var(--page-pad) var(--page-pad) 40px;
  position: relative;
}

/* ---------- 顶栏：问候 + 顶部组件 ---------- */
.topbar {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.greeting {
  flex: 1 1 auto;
  min-width: 200px;
  padding-top: 2px;
}
/* 作为网格组件时的样式：撑满格子、内部纵向居中。
   它现在和别的组件一样是网格里的一格，不再固定在顶栏。 */
.greeting-widget {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 16px 18px 16px 4px;
  /* 网格项自带外边距由板子控制，这里不设 margin */
}
.greeting-widget .greeting-title {
  /* 昵称太长时截断，别把格子撑破 */
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.greeting-widget .greeting-weather {
  margin-top: 3px;
  flex-wrap: wrap;
}
.greeting-widget .weather-tip {
  opacity: 0.8;
}
/* 城市名：让人一眼看出这条天气是哪个市的
   （用户问过"指向哪个市"，说明以前根本看不出来）。
   比正文稍微沉一点，不抢戏但要看得见。 */
.greeting-city {
  color: var(--text-2);
  font-weight: 600;
}
.greeting-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 7px;
}
.greeting-title .spark {
  font-size: 15px;
  color: var(--text-3);
  transform: translateY(1px);
}
.greeting-date {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 4px;
}
.greeting-weather {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.greeting-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.greeting-tools .btn {
  color: var(--text-2);
  background: transparent;
  border-color: var(--line-strong);
  box-shadow: none;
}
.greeting-tools .btn:hover {
  background: var(--surface);
  color: var(--text);
}

/* ---------- 工作区 ---------- */
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side-col-w);
  gap: var(--gap);
  align-items: start;
}

.col-main,
.col-side {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

.view-host {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* 页面级头部（模块页） */
.page-head {
  display: flex;
  /* 【align-items 由 flex-end 改成 center（2026-10-01）】
     用户要求待办 / 灵感的页头「和记账模块一致的 UI」，而记账的
     `.lg-head` 用的就是 center。为什么敢**全局**改而不是只给这两页打个补丁：
       · 全项目用 `.page-head` 的只有三个视图（待办 / 灵感 / 账号管理），
         日迹、邮箱、时间轴、密匣、Agent 各自有自己的页头类名，不受影响；
       · 说明挪进标题行之后，左边只剩一行，center 和 flex-end 的差别本来就只剩
         几个像素 —— 真正需要 flex-end 的"左边两行、工具贴底"那种场景已经不存在了；
       · 窄屏（≤860px）下面那条媒体查询本来就把这里改成 flex-start，
         手机上不受这次改动影响。
     全局统一成和记账同一个值，比留一个 `:has()` 或者给两个页面加专用类更不容易腐坏。 */
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  /* 【和记账 .lg-title 一样用 baseline】
     说明并排进来之后，若还按 center 对齐，12.5px 的说明会相对 22px 的标题
     往下沉半个行高差，看着像没对齐；baseline 才是记账那种"两个文字同一基线"的长相。 */
  align-items: baseline;
  gap: 8px;
  /* 【说明长了要能自己折行，别硬挤】
     记账 .lg-title / 时间轴 .tl-title 都带这一条。它是让**标题行内部**能折行；
     整块工具换行靠的是 .page-head 自己的 flex-wrap。 */
  flex-wrap: wrap;
}
.page-desc {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 4px;
}
/* 【说明被挪进标题行之后的两条修正（2026-10-01）】
   下面这段只在"说明是 .page-title 的直接子元素"时生效
   （待办 / 灵感两页是这种结构；账号管理页仍是"标题一行 + 说明一行"，不受影响）：
     · margin-top 归零 —— 并排之后这 4px 会把说明往下推，不再需要；
     · font-weight 归 400 —— .page-title 是 22px/700，说明不写就会**继承 700**，
       变成又粗又大的小标题（用户要求：别动标题，也别让说明跟着变粗）。
   说明太长时怎么折行：它是 flex 项，中文能逐字断行，所以会被压进容器宽度自己折
   （实测 390px 宽时它折成两行、宽度正好等于容器宽）；
   整个标题行装不下时，上面 .page-title 的 flex-wrap: wrap 再把它挪到下一行。 */
.page-title > .page-desc {
  margin-top: 0;
  font-weight: 400;
}
.page-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box .ico {
  position: absolute;
  left: 10px;
  font-size: 12px;
  color: var(--text-3);
  pointer-events: none;
}
.search-box .input {
  padding-left: 28px;
  /* 右边给「清空」按钮留出位置，免得文字压到按钮上 */
  padding-right: 30px;
  height: 34px;
  width: 260px;
}

/* 搜索框里的「清空」按钮：
   只有输入框里有内容时才出现（由 JS 控制 .show），
   点一下清掉关键词并重新过滤。 */
.search-box .search-clear {
  position: absolute;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: var(--r-pill);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  color: var(--text-3);
  background: var(--surface-3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.search-box .search-clear.show {
  display: flex;
}
.search-box .search-clear:hover {
  background: var(--surface-sunken);
  color: var(--text);
}

/* ==========================================================================
   响应式：手机 / 平板 / 笔记本 / 桌面 / 带鱼屏
   ========================================================================== */

/* ---------- 带鱼屏 ≥ 2000px：放宽留白，卡片变大 ---------- */
@media (min-width: 2000px) {
  :root {
    --sidebar-w: 208px;
    --page-pad: 34px;
    --gap: 20px;
  }
  .stat-card { width: 178px; height: 88px; }
  .greeting-title { font-size: 25px; }
  .today-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .up-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}

/* ---------- 笔记本 ≤ 1439：略微收窄 ---------- */
@media (max-width: 1439px) {
  .stat-card { width: 143px; }
}

/* ---------- 小笔记本 / 平板横屏 ≤ 1180 ---------- */
@media (max-width: 1180px) {
  :root {
    --sidebar-w: 168px;
    --page-pad: 20px;
  }
  .greeting-title { font-size: 20px; }
  .stat-card { width: 133px; height: 76px; }
  .stat-mark { font-size: 40px; }
}

/* ---------- 平板 ≤ 1023：侧栏收成图标栏 ---------- */
@media (max-width: 1023px) {
  :root {
    --sidebar-w: 62px;
    --page-pad: 18px;
  }
  .sidebar { padding: 12px 8px; }
  .account { justify-content: center; padding: 8px 0; }
  /* 图标栏模式：记想法按钮只留图标，但按钮本身要还在（否则没法记想法） */
  .capture-btn {
    justify-content: center;
    padding: 8px 0;
    gap: 0;
  }
  .capture-btn .capture-text { display: none; }
  .account-meta,
  .account-caret,
  .foot-note,
  .nav-item .label,
  .nav-item .tail,
  .nav-section {
    display: none;
  }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item .ico { font-size: 16px; }
  .nav-item.active::before { display: none; }
  /* 图标栏里菜单向上展开，宽度够放文字 */
  .acct-menu {
    width: 196px;
    margin-left: 4px;
  }
  .acct-menu-id .nm,
  .acct-menu-id .hd,
  .acct-menu-item .lb {
    display: block;
  }
  .topbar { flex-direction: column; gap: 14px; }
}

/* ---------- 平板竖屏 / 手机 ≤ 860：侧栏变抽屉 ---------- */
@media (max-width: 860px) {
  :root {
    --page-pad: 16px;
    --gap: 14px;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 236px;
    padding: 16px 12px 12px;
    transform: translateX(-100%);
    transition: transform 0.28s var(--ease);
    z-index: 120;
    box-shadow: var(--shadow-lg);
  }
  .account { justify-content: flex-start; padding: 8px; }
  .account-meta,
  .account-caret,
  .foot-note,
  .nav-section {
    display: block;
  }
  .account-meta {
    display: flex;
    flex-direction: column;
  }
  .account-caret {
    display: inline;
  }
  .acct-menu { width: auto; margin-left: 0; }
  .nav-item .label {
    display: block;
  }
  .nav-item .tail {
    display: inline;
  }
  .nav-item {
    justify-content: flex-start;
    padding: 0 10px;
    height: 40px;
  }
  .nav-item.active::before { display: block; }
  .nav-item .ico { font-size: 15px; }

  /* 「记个想法」按钮的文字要恢复显示。
     【踩过的坑】手机端侧栏是**抽屉**（236px 宽），不是图标栏，
     但上面 ≤1023px 那条规则里 `.capture-btn .capture-text { display: none }`
     是给 62px 图标栏写的。抽屉模式没有把它恢复回来，
     结果按钮在手机上只剩一个图标，明明有 212px 的空间却不显示文字。

     同一个坑当时只记住了一半：`.nav-item .label`、`.account-meta`、
     `.nav-section` 都在这里恢复了，唯独漏了 `.capture-text`。
     以后加新的「图标栏隐藏、抽屉显示」元素，记得**两处都要写**。 */
  .capture-btn {
    justify-content: flex-start;
    padding: 8px;
    gap: 10px;
  }
  .capture-btn .capture-text {
    display: block;
  }

  .main {
    /* 汉堡按钮已经挪到左下角，顶部不用再留出它的位置了 */
    padding-top: 12px;
    /* 但底部要留出悬浮按钮的高度，免得挡住最后一屏内容 */
    padding-bottom: calc(16px + 44px + 12px + env(safe-area-inset-bottom, 0px));
  }
  .greeting-title { font-size: 19px; }
  .greeting-tools { margin-top: 10px; }

  .page-title { font-size: 19px; }
  .page-head { align-items: flex-start; }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .overlay { padding: 12px; }
  .modal { max-height: 92vh; border-radius: var(--r-lg); }
  .modal-head { padding: 15px 16px 10px; }
  .modal-body { padding: 4px 16px 8px; }
  .modal-foot { padding: 12px 16px 14px; }
  /* 手机上：头像 + 昵称同一行，按钮单独占一行 */
  .acct-identity { gap: 12px; padding: 0 16px 16px; margin-top: -34px; }
  .acct-identity .avatar-88 { width: 64px; height: 64px; font-size: 26px; }
  .acct-idtext { flex: 1 1 140px; }
  .acct-name { font-size: 15.5px; }
  .acct-actions { margin-left: 0; flex: 1 1 100%; }
  .acct-actions .btn { flex: 1 1 auto; }
}

/* ---------- 手机 ≤ 560 ---------- */
@media (max-width: 560px) {
  :root {
    --page-pad: 12px;
    --gap: 12px;
  }
  .stat-card {
    height: 70px;
    padding: 8px 10px;
  }
  .stat-value { font-size: 18px; }
  .stat-mark { font-size: 34px; }

  .toolbar { gap: 6px; }
  .search-box { flex: 1 1 100%; }
  .search-box .input { width: 100%; }
  .segment { overflow-x: auto; max-width: 100%; }
  .quick-add { flex-wrap: wrap; row-gap: 8px; }
  .quick-add .hint { display: none; }

  /* 手机上任务行元素太多会把标题挤没，这里做减法：
     隐藏标签 pill 与操作按钮常驻，改为精简结构、保证标题可读 */
  .task-row { padding: 10px 12px; gap: 8px; align-items: flex-start; }
  .task-row .caret,
  .task-row .caret-placeholder { width: 16px; }
  .task-row .chip { width: 26px; height: 26px; font-size: 12px; margin-top: 1px; }
  .task-row .tt { flex-wrap: wrap; gap: 4px 6px; }
  .task-row .tt .txt { flex: 1 1 140px; }
  /* 标签 pill 挪到第二行，不再和标题抢宽度 */
  .task-row .tt .pill { order: 9; }
  .task-row .acts { opacity: 1; }
  .task-row .acts button { width: 24px; height: 24px; }
  .task-row .right { gap: 6px; }
  .task-row .right .prog-mini { display: none; }
  .task-row .due { font-size: 11px; }
  /* 手机上操作按钮收进「⋯」里太复杂，改为只留编辑与删除两个 */
  .task-row .acts button[title='复制'],
  .task-row .acts button[title='归档'] { display: none; }
  .subtasks { padding-left: 42px; }
  .task-group-head { padding: 11px 12px; flex-wrap: wrap; }
  .task-group-head .bar { width: 100%; margin-left: 0; }

  .mini-stat { padding: 10px 12px; }

  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; }

  .toast-host {
    left: 12px;
    right: 12px;
    bottom: 14px;
    transform: none;
    align-items: stretch;
  }
  .toast { justify-content: center; }

  .board {
    grid-template-columns: minmax(0, 1fr);
  }
  .up-grid,
  .today-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* ==========================================================================
   侧栏菜单：拖动排序
   ========================================================================== */
.nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  cursor: grab;
}
.nav-item:active { cursor: grabbing; }
.nav-item.nav-dragging {
  opacity: 0.4;
  cursor: grabbing;
}
/* 拖动时其它项稍微让开一点，视觉上更清楚 */
.nav.nav-reordering .nav-item:not(.nav-dragging) {
  transition: transform 0.12s var(--ease);
}

/* 落点提示线 */
.nav-drop-line {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 0 0 2px var(--brand-soft);
}
.nav-drop-line[hidden] { display: none; }

/* 图标栏模式下（窄屏）也保留拖动能力，只是不显示文字 */
@media (max-width: 1023px) {
  .nav-drop-line { left: 6px; right: 6px; }
}


/* ==========================================================================
   侧栏品牌标识（LOGO）
   ========================================================================== */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  flex: none;
  user-select: none;
  min-width: 0;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 2px 8px rgba(138, 127, 196, 0.28);
}
.brand-glyph {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  transform: translateY(1px);
}

/* 字样排成一行：「微迹 · Weetrack」 */
.brand-text {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.brand-cn {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--nav-text, var(--text));
  flex: none;
}
.brand-dot {
  font-size: 12px;
  color: var(--text-3);
  flex: none;
  transform: translateY(-1px);
}
.brand-en {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 图标栏模式（平板横屏）：侧栏只剩 62px，一条字都放不下，只留方块。
   ⚠ 这里只针对「图标栏」，不能按宽度一刀切 ——
   手机（≤860px）虽然更窄，但侧栏是**抽屉**，展开后有 236px，放得下完整字样。 */
@media (min-width: 861px) and (max-width: 1023px) {
  .brand {
    justify-content: center;
    padding: 4px 0 12px;
    gap: 0;
  }
  .brand-text { display: none; }
}

/* 抽屉模式：侧栏够宽（236px），字样照常显示，只是重新贴左对齐 */
@media (max-width: 860px) {
  .brand {
    justify-content: flex-start;
    padding: 2px 2px 14px;
    gap: 9px;
  }
  /* 这里必须还原成 inline-flex —— .brand-text 靠它把中英文排成一行。
     写成 display: inline 会让「微迹 · Weetrack」失去横向弹性布局。 */
  .brand-text {
    display: inline-flex;
    align-items: baseline;
  }
}

/* ==========================================================================
   右键菜单（取代了原来的长按进编辑）
   --------------------------------------------------------------------------
   挂在 <body> 上而不是组件里 —— 组件带 overflow: hidden，
   菜单放里面会被裁掉一半。位置由 JS 算（贴边时自动往里收）。
   ========================================================================== */
.ctx-menu {
  position: fixed;
  z-index: 3000;
  min-width: 210px;
  padding: 5px;
  border-radius: var(--r-md, 12px);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, .16));
  /* 先藏一半，量完尺寸定位好再加 .on 淡入 —— 避免看到它"跳"一下 */
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .12s var(--ease, ease), transform .12s var(--ease, ease);
}
.ctx-menu.on {
  opacity: 1;
  transform: translateY(0);
}

.ctx-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 7px 9px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: background .12s var(--ease, ease);
}
.ctx-item:hover { background: var(--surface-3, var(--surface-2)); }
.ctx-item.danger { color: #b4483f; }
.ctx-item.danger:hover { background: #fbeeed; }

.ctx-ico {
  flex: none;
  width: 17px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  opacity: .85;
}
.ctx-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ctx-label { font-size: 12.5px; font-weight: 500; line-height: 1.45; }
.ctx-hint { font-size: 10.5px; color: var(--text-3); line-height: 1.4; }

.ctx-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

/* 右键菜单里点「调整尺寸…」之后，把那个组件高亮一下让人找到它 */
@keyframes focusFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107, 122, 90, 0); }
  25%, 75% { box-shadow: 0 0 0 3px rgba(107, 122, 90, .45); }
}
.board-item.focus-flash .board-item-inner {
  animation: focusFlash 1.2s ease;
}

/* ==========================================================================
   更新日志弹窗
   ========================================================================== */
.changelog {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.log-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.log-intro-icon { font-size: 22px; flex: none; }
.log-intro-title { font-size: 13px; font-weight: 600; }
.log-intro-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.log-entry {
  position: relative;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}
.log-entry.latest { border-left-color: var(--brand); }
.log-entry::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
}
.log-entry.latest::before {
  border-color: var(--brand);
  background: var(--brand);
}

.log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.log-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.log-version {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 2px 9px;
  flex: none;
}
/* 模块标签：告诉用户这次改的是哪一块（待办 / 灵感 / 迹览 …） */
.log-module {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  flex: none;
  /* 默认用中性色，不抢版本的品牌色 */
  color: var(--text-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
}
.log-module .mod-icon {
  font-size: 10px;
  line-height: 1;
  opacity: 0.75;
}
/* 各模块给一点轻微的色差，方便一眼扫出「这次改的是哪块」
   —— 都是低饱和度的淡色，不喧宾夺主 */
.log-module.m-todo { color: var(--brand-deep); background: var(--brand-soft); border-color: transparent; }
.log-module.m-idea { color: #7a5ea8; background: #f0ebf7; border-color: transparent; }
.log-module.m-overview { color: #2f6b57; background: #e6f1ec; border-color: transparent; }
.log-module.m-account { color: #4a6a8a; background: #e8eef5; border-color: transparent; }
.log-module.m-admin { color: #8a6a2f; background: #f6efe2; border-color: transparent; }
.log-module.m-infra { color: #5c5c5c; background: #eeedeb; border-color: transparent; }
/* 深色底下的可读性：这几个自定义色在暗色主题里会偏暗，统一回退到中性配色 */
:root[data-theme='night'] .log-module[class*='m-'] {
  color: var(--text-2);
  background: var(--surface-3);
}
.log-title { font-size: 13.5px; font-weight: 650; }
.log-badge {
  font-size: 10px;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  padding: 2px 8px;
  flex: none;
}
.log-date { font-size: 11.5px; color: var(--text-3); flex: none; }

.log-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.log-items li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.log-kind {
  flex: none;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: var(--r-xs);
  padding: 1px 7px;
  margin-top: 2px;
  white-space: nowrap;
}
.log-kind.k-new { color: var(--green); background: rgba(143, 174, 139, 0.16); }
.log-kind.k-fix { color: var(--red); background: rgba(169, 59, 52, 0.12); }
.log-kind.k-polish { color: var(--brand); background: var(--brand-soft); }
.log-text { min-width: 0; }

@media (max-width: 560px) {
  .log-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .log-date { order: -1; }
}

/* ==========================================================================
   色卡（配色方案）—— 2026-10-06
   --------------------------------------------------------------------------
   用户原话：「现阶段至少开放 色卡机制…还可以有自定义色卡，
             有一些马卡龙色块之类的预设」
   ========================================================================== */

/* 侧栏里"日/夜开关 + 色卡按钮"这一块 */
.theme-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}
.theme-card-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--nav-line);
  background: transparent;
  color: var(--nav-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.theme-card-btn:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-text-active);
  border-color: var(--brand);
}
.theme-card-btn .tcb-ico { font-size: 12px; }
.theme-card-btn .tcb-txt { flex: none; }
/* 右边显示"现在用的是哪张卡" —— 不点开就知道 */
.theme-card-btn .tcb-cur {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--nav-muted);
  opacity: .85;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 面板 ---------- */
.cc-wrap { display: block; }

.cc-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  margin: 14px 0 8px;
}
.cc-group-title:first-child { margin-top: 0; }
.cc-group-note {
  font-weight: 400;
  font-size: 10.5px;
  color: var(--text-3);
}
.cc-add {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.cc-add:hover { border-color: var(--brand); color: var(--brand); }

.cc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}

/* 一张卡 */
.cc-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px;
  border: 2px solid var(--line);
  border-radius: var(--r-md, 12px);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: all var(--dur) var(--ease);
}
.cc-tile:hover { border-color: var(--brand); transform: translateY(-2px); }
/* 【选中的卡要给一个明确得多的标记】
   只换个边框色的话，在浅色卡之间几乎看不出来。
   所以加粗边框 + 一圈外发光 + 右上角的勾。 */
.cc-tile.on {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft);
}

/* 预览块：把那张卡的配色**真的铺出来**（底色 + 卡片 + 主色条 + 文字行）
   只显示一个色点的话，两张卡看着可能差不多，
   实际铺开差别很大（尤其深浅卡的主色可能一样）。 */
.cc-prev {
  height: 54px;
  border-radius: var(--r-sm);
  padding: 7px;
  overflow: hidden;
}
.cc-prev-card {
  height: 100%;
  border-radius: var(--r-xs);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cc-prev-bar { height: 7px; border-radius: 3px; }
.cc-prev-line { height: 4px; border-radius: 2px; }
.cc-prev-line.short { width: 58%; }

.cc-name {
  font-size: 11.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-tile.on .cc-name { color: var(--brand-deep); font-weight: 600; }

.cc-on {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 10px;
  line-height: 17px;
  text-align: center;
}
/* 删除按钮：平时不露，鼠标移到卡上才出现 —— 免得误点 */
.cc-del {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-3);
  font-size: 10px;
  line-height: 15px;
  text-align: center;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.cc-tile:hover .cc-del { opacity: 1; }
.cc-del:hover { background: var(--red); color: #fff; border-color: var(--red); }

.cc-empty {
  padding: 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.7;
}

/* 一行小色块（给别处显示"当前色卡"用） */
.cc-swatch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cc-sw-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: block;
}
.cc-sw-name { font-size: 11px; color: var(--text-3); margin-left: 3px; }

/* ==========================================================================
   侧栏「默认页」小标 —— 2026-10-06
   --------------------------------------------------------------------------
   用户设了"打开先进哪一页"之后，那个页面在侧栏要有个标记 ——
   否则他下次打开发现进了记账，会以为侧栏坏了/顺序乱了。
   小标挂在那一项的右边（和徽标同一个位置）。
   ========================================================================== */
.nav-default-dot {
  flex: none;
  margin-left: 6px;
  font-size: 10px;
  line-height: 1;
  color: var(--brand);
  opacity: .9;
}
/* 侧栏是深底色，浅色的 brand 在夜里也够亮 —— 但夜间的侧栏更暗，
   用亮一档的 brand-deep（那是"深底上用的亮色"） */
:root[data-theme='night'] .nav-default-dot { color: var(--brand-deep); }

/* 窄屏：格子小一点 */
@media (max-width: 560px) {
  .cc-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
  .cc-prev { height: 44px; }
}

