/* ===== 个人工作台 V2 · 浅蓝主题 + 壁纸 + 侧边栏布局 ===== */

:root {
  --accent: #7c6fe0;
  --accent-2: #5ea2e8;
  --accent-rgb: 124, 111, 224;
  --accent-soft: rgba(124, 111, 224, 0.13);
  --text-1: #2a2f42;
  --text-2: #3a4056;
  --text-3: #555b72;
  --danger: #d95f4a;
  --glass-bg: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.28);
  --shadow: 0 10px 36px rgba(58, 48, 110, 0.16), 0 2px 8px rgba(58, 48, 110, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  --radius: 22px;
  --radius-sm: 13px;
  --sidebar-w: 232px;
  --wallpaper: url("../assets/wallpaper.jpg");
}

/* ===== 强调色主题（V2.7 统一饱和度/明度曲线） ===== */
body[data-theme="pink"]  { --accent: #e07ba8; --accent-2: #eda3c4; --accent-rgb: 224, 123, 168; --accent-soft: rgba(224, 123, 168, 0.13); }
body[data-theme="mint"]  { --accent: #48a88a; --accent-2: #6fc6a8; --accent-rgb: 72, 168, 138; --accent-soft: rgba(72, 168, 138, 0.13); }
body[data-theme="peach"] { --accent: #e08b52; --accent-2: #eeae7d; --accent-rgb: 224, 139, 82; --accent-soft: rgba(224, 139, 82, 0.13); }

/* ===== 深色模式（V2.9） ===== */
body[data-mode="dark"] {
  --text-1: #e9eaf3;
  --text-2: #c4c7d9;
  --text-3: #9397ae;
  --glass-bg: rgba(24, 26, 40, 0.46);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow: 0 10px 36px rgba(0, 0, 0, 0.46), 0 2px 8px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --accent-soft: rgba(var(--accent-rgb), 0.20);
  background-color: #14121f;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.06) 45%, rgba(0, 0, 0, 0.42) 100%),
    var(--wallpaper);
  color: var(--text-1);
  text-shadow: none;
}
body[data-mode="dark"] .dial-bg { stroke: rgba(255, 255, 255, 0.13); }
body[data-mode="dark"] .input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text-1);
}
body[data-mode="dark"] .input::placeholder { color: var(--text-3); }
body[data-mode="dark"] .pomo-custom input { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); }
body[data-mode="dark"] .btn-ghost { background: rgba(255, 255, 255, 0.09); color: var(--text-1); }
body[data-mode="dark"] .btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }
body[data-mode="dark"] .hm-cell { background: rgba(255, 255, 255, 0.08); }
body[data-mode="dark"] .hm-cell.lv1 { background: #2e2b4e; }
body[data-mode="dark"] .hm-cell.lv2 { background: #453f7d; }
body[data-mode="dark"] .hm-cell.lv3 { background: #6f5fd6; }
body[data-mode="dark"] .hm-cell.lv4 { background: #9d92f2; }
body[data-mode="dark"] .modal-mask { background: rgba(0, 0, 0, 0.58); }
body[data-mode="dark"] .snap-item { background: rgba(255, 255, 255, 0.07); }
body[data-mode="dark"] .usage-track { background: rgba(255, 255, 255, 0.12); }
body[data-mode="dark"] .item-del { color: var(--text-3); }
body[data-mode="dark"] ::selection { background: rgba(var(--accent-rgb), 0.4); }
.wthumb-custom {
  border: 1.5px dashed rgba(255, 255, 255, 0.55); color: var(--text-2);
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
}
.wthumb-custom.has-img { border-style: solid; }

/* ===== 本周回顾卡（V2.9） ===== */
.report-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.rep-tile {
  text-align: center; padding: 14px 6px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.14);
}
.rep-tile b { display: block; font-size: 24px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
body[data-mode="dark"] .rep-tile b { color: var(--accent-2); }
.rep-tile span { display: block; font-size: 11px; color: var(--text-3); margin: 2px 0 6px; }
.rep-tile em { font-style: normal; font-size: 12px; color: var(--text-2); }
.plan-mind-link { cursor: pointer; border-bottom: 1px dashed var(--accent); }
.plan-mind-link:hover { color: var(--accent); }

/* ===== 待办四象限（V2.9） ===== */
.quad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quad-cell {
  border-radius: var(--radius-sm); padding: 12px 12px 8px;
  background: rgba(255, 255, 255, 0.13); min-height: 96px;
}
body[data-mode="dark"] .quad-cell { background: rgba(255, 255, 255, 0.06); }
.quad-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.quad-head h4 { font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.quad-head h4::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--accent)); }
.quad-cell.q1 .quad-head h4::before { --dot: #d95f4a; }
.quad-cell.q2 .quad-head h4::before { --dot: #7c6fe0; }
.quad-cell.q3 .quad-head h4::before { --dot: #e0a052; }
.quad-cell.q4 .quad-head h4::before { --dot: #8b93a8; }
.quad-hint { font-size: 11.5px; color: var(--text-3); }
.quad-list { list-style: none; }
.quad-list .todo-item { margin-bottom: 6px; }
.quad-list .empty-hint { padding: 8px 0; text-align: center; font-size: 12px; }
@media (max-width: 640px) {
  .report-grid { grid-template-columns: repeat(3, 1fr); }
  .quad-grid { grid-template-columns: 1fr; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "MiSans", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
  color: var(--text-1);
  min-height: 100vh;
  /* 壁纸原色呈现 + 极轻中性柔光（保文字对比；JS 会内联覆盖 background-image） */
  background-color: #e6e3f5;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.03) 45%, rgba(38, 34, 64, 0.12) 100%), var(--wallpaper);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed;
  overflow-x: hidden;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.85), 0 0 22px rgba(255, 255, 255, 0.45);
}

/* ===== 独立窗口模式（PWA 安装后 / 华为平板）=====
   目标：抹掉"网页感"，让内容不被圆角、挖孔、状态栏、手势条遮挡 */
html.is-app body {
  /* 用安全区变量统一内缩，四种设备形态（直屏/圆角/挖孔/手势条）都安全 */
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
  overscroll-behavior: none;          /* 禁止下拉刷新，避免误触整页跳动 */
}
html.is-app {
  overscroll-behavior: none;
  -webkit-touch-callout: none;        /* 长按不弹"保存图片/复制链接" */
}
/* 独立窗口下收紧布局内边距（屏幕已内缩，避免双重留白） */
html.is-app .layout { padding-top: 12px; }
html.is-app .mobile-head { padding-top: max(10px, env(safe-area-inset-top)); }
/* 侧边抽屉：左右安全区（横屏刘海在侧边时） */
html.is-app .sidebar { padding-left: env(safe-area-inset-left); }
/* 底部手势条：给可能贴底的元素留位 */
html.is-app .zen-inner { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
html.is-app .modal { margin-bottom: env(safe-area-inset-bottom); }

/* ===== 双栏布局 ===== */
.layout {
  display: flex;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 24px 40px;
  gap: 24px;
}

/* 玻璃基类 */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(44px) saturate(1.3);
  backdrop-filter: blur(44px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 回退：不支持毛玻璃模糊的浏览器（部分安卓浏览器/WebView）。
   模糊失效时 18% 白面板会与壁纸融为一体、文字不可读，
   此时把面板提到近实色，保证界面完整可用。 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass-bg: rgba(255, 255, 255, 0.88); --glass-border: rgba(255, 255, 255, 0.65); }
  .input { background: rgba(255, 255, 255, 0.82); border-color: rgba(120, 116, 160, 0.35); }
  .pomo-custom input { background: rgba(255, 255, 255, 0.82); border-color: rgba(120, 116, 160, 0.35); }
  .btn-ghost { background: rgba(255, 255, 255, 0.78); color: var(--text-1); }
  .btn-ghost:hover { background: rgba(255, 255, 255, 0.92); }
  .dial-bg { stroke: rgba(120, 116, 160, 0.35); }
  body { text-shadow: none; }
  /* 暗色环境：近实色深面板 */
  body[data-mode="dark"] { --glass-bg: rgba(26, 28, 44, 0.94); --glass-border: rgba(255, 255, 255, 0.10); }
  body[data-mode="dark"] .input { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.16); }
  body[data-mode="dark"] .pomo-custom input { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.16); }
  body[data-mode="dark"] .btn-ghost { background: rgba(255, 255, 255, 0.12); }
  body[data-mode="dark"] .btn-ghost:hover { background: rgba(255, 255, 255, 0.22); }
}

/* ===== 侧边栏 ===== */
.sidebar {
  position: sticky;
  top: 24px;
  align-self: flex-start;
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  min-height: calc(100vh - 64px);
  max-height: calc(100vh - 64px);
}

.side-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}
.logo-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.55);
}
.logo-text { font-size: 17px; font-weight: 700; letter-spacing: 1px; }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
  flex: 1;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  font-family: inherit;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.26); color: var(--text-1); }
.nav-item.active {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.35);
}
.nav-ico { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-ico svg { width: 22px; height: 22px; display: block; }
.nav-item.active .nav-ico svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15)); }

/* 卡通图标通用 */
.h-ico { display: inline-flex; margin-right: 8px; vertical-align: -3px; }
.h-ico svg { width: 19px; height: 19px; display: block; }
.ov-ico svg { width: 27px; height: 27px; display: block; }
.habit-streak svg { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; margin-right: 2px; }

.side-foot { padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.24); display: flex; flex-direction: column; gap: 8px; }
.btn-block { width: 100%; }
.side-tip { font-size: 11px; color: var(--text-3); text-align: center; line-height: 1.6; margin-top: 6px; }

.side-row-label { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.theme-dots { display: flex; gap: 10px; margin: 4px 0 6px; }
.tdot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--c);
  border: 2px solid rgba(255, 255, 255, 0.50);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tdot:hover { transform: scale(1.15); }
.tdot.active { box-shadow: 0 0 0 2.5px var(--c), 0 0 10px rgba(0,0,0,0.15); transform: scale(1.08); }

.wall-row { display: flex; gap: 8px; margin: 4px 0 8px; flex-wrap: wrap; }
.wthumb {
  width: 38px; height: 28px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.50);
  background-size: cover; background-position: center;
  cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--text-2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wthumb:hover { transform: scale(1.08); }
.wthumb.active { box-shadow: 0 0 0 2.5px var(--accent); }
.wthumb-random { background: rgba(255, 255, 255, 0.24); }

/* 视图内卡片错开入场（V2.7 升级曲线与层数） */
.view.active > .card, .view.active > .hero { animation: view-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
.view.active > *:nth-child(2) { animation-delay: 0.06s; }
.view.active > *:nth-child(3) { animation-delay: 0.12s; }
.view.active > *:nth-child(4) { animation-delay: 0.18s; }

/* ===== 移动端顶栏（桌面隐藏） ===== */
.mobile-head {
  display: none;
  position: sticky;
  top: 12px;
  z-index: 40;
  margin-bottom: 14px;
  padding: 10px 16px;
  align-items: center;
  gap: 12px;
}
.mobile-title { font-weight: 700; font-size: 16px; letter-spacing: 1px; }
.burger { font-size: 18px; }
.drawer-mask {
  display: none;
  position: fixed; inset: 0;
  background: rgba(36, 51, 66, 0.35);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* ===== 主内容区 ===== */
.main { flex: 1; min-width: 0; }

.view { display: none; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== 概览 ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.hero h1 { font-size: 27px; font-weight: 700; letter-spacing: -0.3px; }
.hero-date { color: var(--text-2); margin-top: 6px; font-size: 14px; }
.hero-clock {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, #5a4fc0, #3f7bc4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ov-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 22px;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
.ov-card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(40, 76, 110, 0.18); }
.ov-ico { font-size: 22px; }
.ov-num { font-size: 28px; font-weight: 700; color: #5a4fc0; font-variant-numeric: tabular-nums; text-shadow: none; }
.ov-label { font-size: 13px; color: var(--text-3); }

/* ===== 按钮 / 输入 ===== */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.24);
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(40, 76, 110, 0.16); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.4); }

.btn-ghost { background: rgba(255, 255, 255, 0.20); color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.42); }

.btn-icon {
  width: 32px; height: 32px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.24);
}

.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 9px; }

.input {
  border: 1px solid rgba(255, 255, 255, 0.50);
  background: rgba(255, 255, 255, 0.26);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-1);
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35), 0 0 0 4px rgba(var(--accent-rgb), 0.13);
}
.input::placeholder { color: var(--text-3); }

.input-tag { width: 96px; }
.input-date { width: 138px; color: var(--text-2); font-size: 13px; }
.input-num { width: 84px; }
.select-sm { width: 72px; padding: 10px 8px; }

.badge {
  font-size: 12px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ===== 卡片 ===== */
.card { padding: 22px 24px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.card-head h2 { font-size: 17px; font-weight: 700; letter-spacing: 0.2px; }
.card-head h3 { font-size: 15px; font-weight: 700; }

.sub-block { margin-top: 22px; }
.sub-block:first-of-type { margin-top: 0; }
.sub-block h3 { margin-bottom: 12px; }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sub-head h3 { margin-bottom: 0; }

/* ===== 待办 ===== */
.todo-form { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.todo-form .input[type="text"] { flex: 1; min-width: 150px; }
.todo-form .input-date { width: 145px; }
.todo-form select.select-sm { width: auto; min-width: 74px; }

.filter-row { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.chip {
  border: none;
  background: rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.chip:hover { background: rgba(255, 255, 255, 0.50); }
.chip.active { background: var(--accent); color: #fff; }

.todo-list { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow-y: auto; }
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.20);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  animation: fade-in 0.25s ease;
}
.todo-item.done .todo-text { text-decoration: line-through; color: var(--text-3); }
.todo-check {
  width: 21px; height: 21px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  font-size: 13px;
  transition: all 0.15s ease;
}
.todo-item.done .todo-check { background: var(--accent); color: #fff; }
.todo-text { flex: 1; font-size: 14px; word-break: break-all; }
.prio { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; flex-shrink: 0; }
.prio.high { background: rgba(217, 95, 74, 0.15); color: var(--danger); }
.prio.mid { background: rgba(var(--accent-rgb), 0.14); color: var(--accent); }
.prio.low { background: rgba(133, 150, 168, 0.16); color: var(--text-2); }

/* 截止/重复徽章 */
.due-badge, .repeat-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  font-weight: 600; flex-shrink: 0; white-space: nowrap;
}
.due-badge { background: rgba(133, 150, 168, 0.14); color: var(--text-2); }
.due-badge.soon { background: rgba(230, 168, 60, 0.18); color: #b57a17; }
.due-badge.overdue { background: rgba(217, 95, 74, 0.16); color: var(--danger); }
.repeat-badge { background: var(--accent-soft); color: var(--accent); }
.todo-item.overdue { border-left: 3px solid var(--danger); }
.todo-item.overdue .todo-text { color: var(--danger); }

/* ===== 全局搜索 ===== */
.global-search { position: relative; margin-bottom: 16px; }
.global-search .input { width: 100%; padding-left: 38px; }
.search-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.search-panel {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  max-height: 320px; overflow-y: auto; z-index: 60;
  padding: 8px; border-radius: var(--radius-sm);
}
.search-group {
  font-size: 11px; color: var(--text-3); font-weight: 600;
  padding: 8px 10px 4px; letter-spacing: 1px;
}
.search-hit {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; border: none; background: transparent;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  font-size: 13.5px; color: var(--text-1); font-family: inherit;
}
.search-hit:hover { background: var(--accent-soft); }
.search-hit .hit-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hit mark { background: transparent; color: var(--accent); font-weight: 700; }
.search-hit .hit-sub {
  font-size: 11px; color: var(--text-3); flex-shrink: 0;
  max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item-del {
  border: none; background: transparent; cursor: pointer;
  color: var(--text-3); font-size: 16px; line-height: 1;
  padding: 2px 6px; border-radius: 6px; flex-shrink: 0;
  transition: all 0.15s ease;
}
.item-del:hover { color: var(--danger); background: rgba(217, 95, 74, 0.1); }

/* ===== 日历 ===== */
.cal-nav { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
  color: var(--text-1);
}
.cal-day:hover { background: rgba(255, 255, 255, 0.28); }
.cal-day.dim { color: var(--text-3); opacity: 0.45; }
.cal-day.today { background: var(--accent); color: #fff; font-weight: 700; }
.cal-day.selected { box-shadow: inset 0 0 0 2px var(--accent-2); font-weight: 700; }
.cal-day .evt-dot {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2);
}
.cal-day.today .evt-dot { background: #fff; }

.cal-events { margin-top: 14px; max-height: 220px; overflow-y: auto; }
.evt-item {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.20);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 6px;
  animation: fade-in 0.25s ease;
}
.evt-item .evt-text { flex: 1; word-break: break-all; }
.empty-hint { font-size: 13px; color: var(--text-3); text-align: center; padding: 14px 0; }

.evt-add { display: flex; gap: 6px; margin-top: 10px; }
.evt-add .input { flex: 1; padding: 8px 12px; font-size: 13px; }

/* ===== 便签 ===== */
.note-form { display: flex; gap: 8px; margin-bottom: 14px; }
.note-form .input { flex: 1; }
.notes-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
}
.note {
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
  position: relative;
  min-height: 84px;
  box-shadow: 0 4px 12px rgba(40, 76, 110, 0.1);
  animation: pop-in 0.25s ease;
  transform: rotate(-0.6deg);
}
.note:nth-child(even) { transform: rotate(0.8deg); }
.note .note-time { display: block; font-size: 11px; opacity: 0.55; margin-top: 8px; }
.note .item-del { position: absolute; top: 6px; right: 6px; }
.note.c1 { background: #fff3c4; } .note.c2 { background: #d4f0dc; }
.note.c3 { background: #dcebfb; } .note.c4 { background: #fde2dd; }
.note.c5 { background: #ede4f7; }

/* ===== 快捷链接 ===== */
.link-form { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.link-form .input { flex: 1; min-width: 100px; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.link-card {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-1);
  text-decoration: none;
  transition: all 0.15s ease;
  overflow: hidden;
}
.link-card:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(40, 76, 110, 0.12); }
.link-card .link-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-card .link-fav { width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0; }

/* ===== 番茄钟 ===== */
.focus-wrap { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.pomo-box {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  flex: 0 0 auto; padding: 26px 0 8px;
}
/* 表盘背后的柔光，营造"主舞台"感 */
.pomo-box::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 460px; height: 460px; transform: translate(-50%, -54%);
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.17) 0%, rgba(var(--accent-rgb), 0.05) 45%, transparent 68%);
  pointer-events: none;
}
.pomo-dial { position: relative; width: 268px; height: 268px; }
.pomo-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-bg { fill: none; stroke: rgba(255, 255, 255, 0.24); stroke-width: 5; }
.dial-fg {
  fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 339.3; stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.5s linear, stroke 0.3s ease;
}
.pomo-dial.resting .dial-fg { stroke: var(--accent-2); }
.pomo-time {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;  /* 显式偏移，兼容不支持 inset 简写的老内核 */
  display: flex; align-items: center; justify-content: center;
  font-size: 58px; font-weight: 200; letter-spacing: 3px; font-variant-numeric: tabular-nums;
  max-width: 100%;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  padding-bottom: 40px;
}
.pomo-mode {
  position: absolute; left: 0; right: 0; bottom: 66px; text-align: center;
  font-size: 13px; letter-spacing: 8px; text-indent: 8px; color: var(--text-3);
}
.pomo-controls { display: flex; gap: 12px; }
.pomo-controls .btn { padding: 12px 40px; font-size: 15px; border-radius: 999px; letter-spacing: 2px; }
.pomo-controls .btn#pomo-zen { padding: 12px 22px; letter-spacing: 1px; }
.pomo-task-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.pomo-task-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.pomo-task-label .select-sm { max-width: 168px; }
.pomo-custom { display: flex; justify-content: center; gap: 18px; font-size: 13px; color: var(--text-2); }

/* ===== 禅模式（V2.9） ===== */
body.zen-open { overflow: hidden; }
.zen {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 95;
  display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center; background-attachment: fixed;
  animation: zen-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.zen[hidden] { display: none; }
.zen::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 45%, rgba(10, 8, 22, 0.42) 0%, rgba(8, 6, 18, 0.82) 70%);
  backdrop-filter: blur(18px) saturate(1.1); -webkit-backdrop-filter: blur(18px) saturate(1.1);
}
.zen-inner { position: relative; z-index: 1; text-align: center; color: #f2f0ff; padding: 24px; width: min(880px, 92vw); }
.zen-phase { font-size: 14px; letter-spacing: 10px; text-indent: 10px; color: rgba(242, 240, 255, 0.66); margin-bottom: 18px; }
.zen-time {
  font-size: clamp(84px, 17vw, 176px); font-weight: 200; letter-spacing: 6px;
  font-variant-numeric: tabular-nums; line-height: 1; margin-bottom: 30px;
  text-shadow: 0 6px 60px rgba(var(--accent-rgb), 0.5);
}
.zen-bar { height: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.16); overflow: hidden; margin: 0 auto 26px; max-width: 560px; }
.zen-bar-fill { height: 100%; width: 0%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.9s linear; }
.zen-task { font-size: 17px; color: rgba(242, 240, 255, 0.86); margin-bottom: 34px; letter-spacing: 1px; }
.zen-controls { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.zen-controls .btn {
  background: rgba(255, 255, 255, 0.11); color: #f2f0ff; border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 11px 24px; border-radius: 999px; backdrop-filter: blur(10px);
}
.zen-controls .btn:hover { background: rgba(255, 255, 255, 0.2); }
.zen-hint { margin-top: 22px; font-size: 12px; color: rgba(242, 240, 255, 0.42); letter-spacing: 0.5px; }
@keyframes zen-in { from { opacity: 0; } to { opacity: 1; } }
.pomo-custom input {
  width: 52px; border: 1px solid rgba(255,255,255,0.50); border-radius: 8px;
  padding: 4px 6px; text-align: center; font-size: 13px;
  background: rgba(255,255,255,0.26); color: var(--text-1); outline: none;
}

.habits-box { flex: 1; width: 100%; max-width: 760px; }
.habits-box h3 { margin-bottom: 12px; }
.habit-form { display: flex; gap: 8px; margin-bottom: 12px; }
.habit-form .input { flex: 1; }

/* ===== 数据与安全面板 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20, 18, 34, 0.42);
  z-index: 90; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; z-index: 91; top: 50%; left: 50%;
  transform: translate(-50%, -46%) scale(0.97); opacity: 0; pointer-events: none;
  width: min(520px, calc(100vw - 32px)); max-height: 82vh; overflow-y: auto;
  padding: 22px 22px 18px; transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.modal-head h3 { font-size: 17px; }
.modal-sub { font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; }
.usage-wrap { margin-bottom: 16px; }
.usage-text { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.usage-track { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.35); overflow: hidden; }
.usage-bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.4s ease; }
.usage-bar.warn { background: linear-gradient(90deg, #e0a052, #d95f4a); }
.snap-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.snap-list { list-style: none; }
.snap-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.16); font-size: 13px;
}
.snap-item b { font-weight: 600; }
.snap-meta { color: var(--text-3); font-size: 12px; margin-left: 6px; }
.snap-ops { display: flex; align-items: center; gap: 8px; }
.snap-empty { padding: 14px 4px; color: var(--text-3); font-size: 13px; text-align: center; }
body[data-mode="dark"] .snap-item { background: rgba(255, 255, 255, 0.07); }
body[data-mode="dark"] .usage-track { background: rgba(255, 255, 255, 0.12); }
.habit-list { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.habit-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.20);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  animation: fade-in 0.25s ease;
}
.habit-name { flex: 1; font-size: 14px; }
.habit-streak {
  font-size: 11px; color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 3px 10px; font-weight: 600; flex-shrink: 0;
}
.habit-item.done-today .habit-check { background: var(--accent); color: #fff; }
.habit-check {
  width: 23px; height: 23px; border: 2px solid var(--accent); border-radius: 50%;
  background: transparent; cursor: pointer; color: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0; transition: all 0.15s ease;
}

/* ===== 学习中心 ===== */
.goal-form, .res-form, .checkin-form { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.goal-form .input[type="text"]:first-child { flex: 1; min-width: 160px; }
.res-form .input[type="text"]:first-child { flex: 1; min-width: 160px; }

.goal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.goal-item {
  background: rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  animation: fade-in 0.25s ease;
}
.goal-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.goal-name { flex: 1; font-weight: 600; font-size: 14px; }
.goal-tag {
  font-size: 11px; background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 2px 10px; font-weight: 600;
}
.goal-dates { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.progress-bar { height: 8px; background: rgba(255, 255, 255, 0.28); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s ease;
}
.goal-bottom { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.goal-pct { font-size: 13px; font-weight: 700; color: var(--accent); min-width: 40px; }
.goal-bottom input[type="range"] { flex: 1; accent-color: var(--accent); }

.res-list { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.res-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.20);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  animation: fade-in 0.25s ease;
}
.res-title { flex: 1; word-break: break-all; }
.res-item.done .res-title { text-decoration: line-through; color: var(--text-3); }
.res-status {
  border: none; border-radius: 999px; padding: 4px 12px;
  font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0;
  transition: all 0.15s ease;
  font-family: inherit;
}
.res-status.wish { background: rgba(133, 150, 168, 0.18); color: var(--text-2); }
.res-status.doing { background: rgba(var(--accent-rgb), 0.16); color: var(--accent); }
.res-status.done { background: rgba(56, 189, 248, 0.18); color: #0284c7; }
.res-tag { font-size: 11px; color: var(--text-3); flex-shrink: 0; }

/* 热力图（雾紫蓝档位） */
.heatmap {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 14px);
  gap: 3px;
  overflow-x: auto;
  padding: 4px 0;
}
.hm-cell { width: 14px; height: 14px; border-radius: 4px; background: rgba(255, 255, 255, 0.26); flex-shrink: 0; }
.hm-cell.lv1 { background: #e6e2fa; }
.hm-cell.lv2 { background: #c5bdf5; }
.hm-cell.lv3 { background: #9d92ec; }
.hm-cell.lv4 { background: #6f5fd6; }
.hm-cell.future { visibility: hidden; }

.heat-legend { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); margin-top: 8px; }
.heat-legend .hm-cell { width: 12px; height: 12px; }
.heat-legend em { font-style: normal; font-weight: 600; color: var(--accent); }

/* 图表 */
.charts-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; }
.chart-box {
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 14px;
  height: 220px;
  position: relative;
}
.chart-box canvas { max-height: 100%; }
.chart-fallback { font-size: 13px; color: var(--text-3); padding: 10px 0; }

/* 每日一句 */
.quote-card {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}
.quote-ico { flex-shrink: 0; }
.quote-ico svg { width: 30px; height: 30px; display: block; }
.quote-body { flex: 1; min-width: 0; }
.quote-text { font-size: 15px; font-weight: 600; line-height: 1.5; word-break: break-all; }
.quote-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.quote-edit {
  font-size: 18px;
  color: var(--text-3);
  padding: 6px 8px;
  flex-shrink: 0;
}

/* 提醒提示条 */
.remind-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-2);
}
.remind-bar[hidden] { display: none; }
.remind-bar span { flex: 1; }
.remind-bar .item-del { font-size: 14px; }

/* ===== 目标计划树（里程碑） ===== */
.step-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; flex-shrink: 0;
}
.goal-auto-hint { font-size: 11px; color: var(--text-3); }
.goal-next {
  font-size: 12.5px; color: var(--text-2); margin-top: 8px;
  padding: 7px 12px; border-radius: 10px;
  background: var(--accent-soft);
}
.goal-next b { color: var(--accent); }
.goal-need {
  font-size: 12px; color: var(--text-2); margin-top: 6px;
  padding: 6px 12px; border-radius: 10px;
  background: rgba(230, 168, 60, 0.12); color: #8a6a2a;
}
.goal-need.overdue { background: rgba(217, 95, 74, 0.12); color: var(--danger); }
.goal-need b { font-weight: 700; }
.ms-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ms-item {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.18); border-radius: 10px;
  padding: 7px 10px; font-size: 13px;
}
.ms-check {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 1.8px solid var(--accent); background: transparent;
  color: #fff; font-size: 12px; line-height: 1; cursor: pointer; font-family: inherit;
}
.ms-item.done .ms-check { background: var(--accent); border-color: var(--accent); }
.ms-item.done .ms-title { text-decoration: line-through; color: var(--text-3); }
.ms-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-hours { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.ms-del {
  border: none; background: transparent; cursor: pointer;
  color: var(--text-3); font-size: 13px; padding: 2px 4px; border-radius: 6px;
}
.ms-del:hover { color: var(--danger); }
.ms-add { display: flex; gap: 6px; }
.ms-add .input { padding: 7px 10px; font-size: 12.5px; }
.ms-add input[type="text"] { flex: 1; }

/* ===== 今日学习计划卡 ===== */
.plan-card { margin-bottom: 20px; }
.plan-head-right { display: flex; align-items: center; gap: 10px; }
.plan-date { font-size: 12.5px; color: var(--text-2); }
.badge.all-done { color: var(--accent); font-weight: 700; }
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.plan-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.20); border-radius: 12px;
  padding: 10px 12px; font-size: 13.5px;
}
.plan-check {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  border: 1.8px solid var(--accent); background: transparent;
  color: #fff; font-size: 13px; line-height: 1; cursor: pointer; font-family: inherit;
}
.plan-item.done .plan-check { background: var(--accent); border-color: var(--accent); }
.plan-item.done .plan-title { text-decoration: line-through; color: var(--text-3); }
.plan-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-reason {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; flex-shrink: 0;
  background: rgba(230, 168, 60, 0.15); color: #8a6a2a; white-space: nowrap;
  max-width: 45%; overflow: hidden; text-overflow: ellipsis;
}
.plan-del {
  border: none; background: transparent; cursor: pointer;
  color: var(--text-3); font-size: 14px; padding: 2px 4px; border-radius: 6px; flex-shrink: 0;
}
.plan-del:hover { color: var(--danger); }
.plan-form { display: flex; gap: 8px; margin-top: 10px; }
.plan-form .input { flex: 1; }

/* ===== 思维库 ===== */
.mind-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.mind-stats b { color: var(--accent); }
.mind-review {
  margin-bottom: 14px; padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-soft), rgba(208, 191, 255, 0.18));
}
.mind-review h3 { margin: 0 0 10px; font-size: 14px; }
.rv-hint { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.rv-text { font-size: 15px; font-weight: 600; color: var(--text-1); margin: 0 0 10px; line-height: 1.6; }
.rv-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.rv-src { color: var(--text-3); }
.rv-btns { display: flex; gap: 10px; }
.rv-good { background: #5cc98f; color: #fff; border: none; }
.rv-good:hover { background: #4bb87e; }
.rv-again { background: rgba(230, 168, 60, 0.15); color: #8a6a2a; border: none; }
.mind-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.mind-form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mind-form-row .input { flex: 1; min-width: 140px; }
.mind-form-row .btn { flex-shrink: 0; }
.mind-wall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.mind-card {
  position: relative;
  background: rgba(255, 255, 255, 0.24);
  border-radius: 14px; padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mind-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(40, 76, 110, 0.12); }
.mind-text { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-1); word-break: break-word; }
.mind-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.mind-tags span { font-size: 11px; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; }
.mind-source { margin: 0; font-size: 11.5px; color: var(--text-3); }
.mind-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.mind-state {
  font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  background: rgba(133, 150, 168, 0.14); color: var(--text-2);
}
.mind-state.due { background: rgba(230, 168, 60, 0.18); color: #b57a17; }
.mind-state.mastered { background: rgba(92, 201, 143, 0.18); color: #2f8f63; }
.mind-verified { font-size: 11px; color: #2f8f63; font-weight: 600; }
.mind-del { position: absolute; top: 8px; right: 8px; }
.mind-addapp { margin-left: auto; font-size: 11px; padding: 3px 10px; }
.app-form { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.app-form .input { font-size: 12.5px; padding: 7px 10px; }
.app-btns { display: flex; gap: 6px; }
.app-btns .btn { flex: 1; }
.mind-apps { display: flex; flex-direction: column; gap: 5px; border-top: 1px dashed rgba(133, 150, 168, 0.3); padding-top: 6px; }
.mind-app {
  font-size: 12px; color: var(--text-2); line-height: 1.5;
  display: flex; gap: 6px; align-items: baseline;
}
.mind-app b { flex-shrink: 0; font-size: 11px; }
.mind-app.good b { color: #2f8f63; }
.mind-app:not(.good) b { color: #b57a17; }
.mind-app i { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--text-3); flex-shrink: 0; }

/* ===== 表单标签点选 chips ===== */
.tag-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-chips:empty { display: none; }
.tchip {
  border: 1.5px solid rgba(133, 150, 168, 0.35); background: rgba(255, 255, 255, 0.20);
  color: var(--text-2); font-size: 11.5px; font-family: inherit;
  padding: 2px 10px; border-radius: 999px; cursor: pointer;
  transition: all 0.15s ease;
}
.tchip:hover { border-color: var(--accent); color: var(--accent); }
.tchip.on {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
}

/* ===== 动画 ===== */
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; } }

/* ===== V2.7 质感与动效 ===== */
/* 主按钮光泽扫过 */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: '';
  position: absolute; top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.20), transparent);
  transform: skewX(-20deg);
  transition: left 0.45s ease;
  pointer-events: none;
}
.btn-primary:hover::after { left: 130%; }

/* 卡片 3D 微倾（仅精确指针设备） */
@media (hover: hover) and (pointer: fine) {
  .ov-card:hover { transform: perspective(620px) rotateX(1.6deg) rotateY(-1.6deg) translateY(-3px); }
  .mind-card:hover { transform: perspective(620px) rotateX(1.3deg) rotateY(1.3deg) translateY(-2px); }
}

/* 概览数字变化弹跳 */
.ov-num.pop { animation: num-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); display: inline-block; }
@keyframes num-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

/* 动效降级（无障碍） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 滚动条（紫灰调） */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(90, 96, 118, 0.28); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(90, 96, 118, 0.45); }
::-webkit-scrollbar-track { background: transparent; }

/* ===== V3.0 作战中心 ===== */
.cmd-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  background-image: linear-gradient(120deg, rgba(var(--accent-rgb), 0.14), rgba(94, 162, 232, 0.10));
}
.cmd-hero-main { display: flex; align-items: center; gap: 26px; flex: 1 1 380px; }
.cmd-count { display: flex; align-items: baseline; gap: 6px; }
.cmd-count-num {
  font-size: 68px; font-weight: 800; line-height: 1; letter-spacing: -2px;
  font-variant-numeric: tabular-nums; color: var(--accent);
  text-shadow: 0 3px 16px rgba(var(--accent-rgb), 0.28);
}
.cmd-count-num.urgent { color: var(--danger); text-shadow: 0 3px 16px rgba(217, 95, 74, 0.35); }
.cmd-count-unit { font-size: 15px; color: var(--text-2); font-weight: 600; }
.cmd-hero-meta { min-width: 0; }
.cmd-target { font-size: 17px; font-weight: 700; color: var(--text-1); margin-bottom: 8px; }
.cmd-stage-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cmd-stage-badge {
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
}
.cmd-stage-date { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cmd-stage-goal { font-size: 13.5px; color: var(--text-2); line-height: 1.6; margin: 0; }

.cmd-hero-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cmd-odds { position: relative; width: 120px; height: 120px; }
.odds-dial { width: 120px; height: 120px; transform: rotate(-90deg); }
.odds-bg { fill: none; stroke: rgba(var(--accent-rgb), 0.16); stroke-width: 9; }
.odds-fg {
  fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}
.odds-fg[data-level="safe"] { stroke: #48b48a; }
.odds-fg[data-level="good"] { stroke: #5ea2e8; }
.odds-fg[data-level="warn"] { stroke: #e0a252; }
.odds-fg[data-level="risk"] { stroke: var(--danger); }
.odds-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.odds-center b { font-size: 26px; font-weight: 800; color: var(--text-1); font-variant-numeric: tabular-nums; }
.odds-center span { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.odds-cap { font-size: 11.5px; color: var(--text-3); text-align: center; max-width: 150px; margin: 0; }
.odds-cap[data-level="safe"] { color: #3a9b74; }
.odds-cap[data-level="risk"] { color: var(--danger); }

/* 今日作战指令 */
.ops-hours-label { font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; }
.ops-hours-label .input-num { width: 62px; padding: 5px 8px; font-size: 13px; }
.ops-note { font-size: 12.5px; color: var(--text-3); margin: 0 0 14px; line-height: 1.6; }
.ops-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ops-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 15px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.30); border: 1px solid rgba(255, 255, 255, 0.34);
  transition: transform 0.16s ease, background 0.2s ease;
}
.ops-item:hover { transform: translateX(3px); background: rgba(255, 255, 255, 0.42); }
.ops-item.done { opacity: 0.62; }
.ops-item.done .ops-task { text-decoration: line-through; }
.ops-check {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%;
  border: 2px solid rgba(var(--accent-rgb), 0.42); background: transparent;
  color: #fff; font-size: 14px; cursor: pointer; transition: all 0.18s ease;
  display: flex; align-items: center; justify-content: center;
}
.ops-check:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.14); }
.ops-item.done .ops-check { background: var(--accent); border-color: var(--accent); }
.ops-time { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
.ops-time b { font-size: 14px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }
.ops-time span { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ops-body { flex: 1; min-width: 0; }
.ops-task { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 5px; }
.ops-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ops-subject {
  font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.15); color: var(--accent);
}
.ops-subject.s-math { background: rgba(124, 111, 224, 0.16); color: #6b5fd0; }
.ops-subject.s-english { background: rgba(94, 162, 232, 0.18); color: #3f86cc; }
.ops-subject.s-major { background: rgba(72, 168, 138, 0.16); color: #359074; }
.ops-subject.s-politics { background: rgba(224, 139, 82, 0.16); color: #c9762f; }
.ops-chapter { font-size: 11.5px; color: var(--text-3); }
.ops-min { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ops-focus { flex: 0 0 auto; }

/* 战略路线图 */
.road-track { display: flex; gap: 8px; margin-bottom: 20px; }
.road-node { flex: 1; text-align: center; position: relative; padding: 0 4px; }
.road-node::after {
  content: ''; position: absolute; top: 15px; left: 50%; right: -50%;
  height: 2px; background: rgba(var(--accent-rgb), 0.20); z-index: 0;
}
.road-node:last-child::after { display: none; }
.road-dot {
  width: 32px; height: 32px; margin: 0 auto 8px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; position: relative; z-index: 1;
  background: rgba(255, 255, 255, 0.55); color: var(--text-3);
  border: 2px solid rgba(var(--accent-rgb), 0.24);
}
.road-node.past .road-dot { background: #48b48a; color: #fff; border-color: #48b48a; }
.road-node.past::after { background: #48b48a; }
.road-node.current .road-dot {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0.20);
}
.road-node.current .road-name { color: var(--accent); font-weight: 700; }
.road-name { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 3px; }
.road-bound { font-size: 10.5px; color: var(--text-3); }
.road-gate { margin-top: 16px; }
.road-gate h3 { font-size: 13.5px; color: var(--text-2); margin: 0 0 10px; font-weight: 700; }
.road-must, .road-gate-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.road-must li, .road-gate-list li {
  font-size: 13px; color: var(--text-2); line-height: 1.6;
  padding-left: 20px; position: relative;
}
.road-must li::before {
  content: '▸'; position: absolute; left: 4px; color: var(--accent); font-weight: 700;
}
.road-gate-list li::before {
  content: '□'; position: absolute; left: 2px; color: var(--text-3);
}

/* 两列布局 */
.cmd-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }

/* 时间分配 */
.alloc-list { display: flex; flex-direction: column; gap: 15px; }
.alloc-row { position: relative; }
.alloc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.alloc-name { font-size: 13.5px; font-weight: 600; color: var(--text-1); }
.alloc-lvl { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; }
.alloc-lvl.lv-weak { background: rgba(217, 95, 74, 0.14); color: var(--danger); }
.alloc-lvl.lv-mid { background: rgba(var(--accent-rgb), 0.14); color: var(--accent); }
.alloc-lvl.lv-strong { background: rgba(72, 180, 138, 0.15); color: #359074; }
.alloc-min { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.alloc-pct { font-size: 11px; color: var(--text-3); text-align: right; margin-top: 4px; }

/* 风险诊断 */
.diag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.diag-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 13px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.28); border-left: 3px solid var(--text-3);
}
.diag-item b { font-size: 11px; font-weight: 700; flex: 0 0 auto; padding: 2px 7px; border-radius: 6px; }
.diag-item span { font-size: 12.8px; color: var(--text-2); line-height: 1.62; }
.diag-item.high { border-left-color: var(--danger); }
.diag-item.high b { background: rgba(217, 95, 74, 0.15); color: var(--danger); }
.diag-item.mid { border-left-color: #e0a252; }
.diag-item.mid b { background: rgba(224, 162, 82, 0.16); color: #c9762f; }
.diag-item.ok { border-left-color: #48b48a; }
.diag-item.ok b { background: rgba(72, 180, 138, 0.16); color: #359074; }

/* 知识地图 */
.map-chapters { display: flex; flex-direction: column; gap: 18px; }
.map-chap-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.map-chap-head h4 { font-size: 13.5px; color: var(--text-1); margin: 0; font-weight: 700; }
.map-chap-head span { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.map-nodes { display: flex; flex-wrap: wrap; gap: 8px; }
.map-node {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  font-size: 12.5px; border: 1.5px solid transparent;
  background: rgba(255, 255, 255, 0.42); color: var(--text-2);
  transition: all 0.16s ease;
}
.map-node:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.62); }
.map-node-st { font-size: 10.5px; opacity: 0.78; }
.map-node.st-untouched { border-color: rgba(150, 150, 170, 0.32); }
.map-node.st-learning { border-color: #e0a252; background: rgba(224, 162, 82, 0.14); color: #b06f22; }
.map-node.st-mastered { border-color: #48b48a; background: rgba(72, 180, 138, 0.14); color: #2f7f62; }
.map-node.st-review { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.14); color: var(--accent); }
.map-add { display: flex; gap: 9px; margin-top: 18px; }
.map-add .input { flex: 1; }

/* 关键节点 */
.node-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.node-item {
  display: grid; grid-template-columns: 62px 110px 1fr auto;
  align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.28);
}
.node-item.passed { opacity: 0.5; }
.node-date { font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.node-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.node-note { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.node-dd { font-size: 11.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 深色适配 */
body[data-mode="dark"] .ops-item { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.10); }
body[data-mode="dark"] .ops-item:hover { background: rgba(255, 255, 255, 0.11); }
body[data-mode="dark"] .ops-subject.s-math { background: rgba(124, 111, 224, 0.26); color: #b3a9f5; }
body[data-mode="dark"] .ops-subject.s-english { background: rgba(94, 162, 232, 0.26); color: #8dc4f5; }
body[data-mode="dark"] .ops-subject.s-major { background: rgba(72, 168, 138, 0.26); color: #7fd6b6; }
body[data-mode="dark"] .ops-subject.s-politics { background: rgba(224, 139, 82, 0.26); color: #f0b184; }
body[data-mode="dark"] .road-dot { background: rgba(255, 255, 255, 0.10); }
body[data-mode="dark"] .diag-item { background: rgba(255, 255, 255, 0.06); }
body[data-mode="dark"] .map-node { background: rgba(255, 255, 255, 0.09); }
body[data-mode="dark"] .map-node:hover { background: rgba(255, 255, 255, 0.15); }
body[data-mode="dark"] .map-node.st-learning { background: rgba(224, 162, 82, 0.24); color: #f0c084; }
body[data-mode="dark"] .map-node.st-mastered { background: rgba(72, 180, 138, 0.24); color: #8ddfc0; }
body[data-mode="dark"] .map-node.st-review { background: rgba(var(--accent-rgb), 0.26); color: #c3baf8; }
body[data-mode="dark"] .node-item { background: rgba(255, 255, 255, 0.06); }
body[data-mode="dark"] .odds-center b { color: var(--text-1); }

@supports not (backdrop-filter: blur(2px)) {
  .ops-item, .diag-item, .node-item { background: rgba(255, 255, 255, 0.72); }
  body[data-mode="dark"] .ops-item,
  body[data-mode="dark"] .diag-item,
  body[data-mode="dark"] .node-item { background: rgba(30, 32, 48, 0.90); }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .layout { padding: 12px 14px 32px; flex-direction: column; }
  .mobile-head { display: flex; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    border-radius: 0 var(--radius) var(--radius) 0;
    min-height: 100vh; max-height: 100vh;
    width: 250px;
    transform: translateX(-105%);
    transition: transform 0.28s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .drawer-mask.show { display: block; opacity: 1; pointer-events: auto; }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-clock { font-size: 36px; }
  .charts-row { grid-template-columns: 1fr; }
  .cmd-two-col { grid-template-columns: 1fr; }
  .cmd-count-num { font-size: 54px; }
  .node-item { grid-template-columns: 56px 1fr auto; }
  .node-note { display: none; }
}
@media (max-width: 560px) {
  .overview-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: column; text-align: center; padding: 22px 20px; }
  .hero-clock { font-size: 32px; }
  .card { padding: 18px 16px; }
  .input-date { width: 100%; }
  .pomo-dial { width: 218px; height: 218px; }
  .pomo-time { font-size: 46px; padding-bottom: 32px; }
  .pomo-mode { bottom: 50px; letter-spacing: 6px; }
  .pomo-box::before { width: 340px; height: 340px; }
  .cmd-hero-main { flex-direction: column; align-items: flex-start; gap: 16px; }
  .cmd-count-num { font-size: 46px; }
  .road-track { flex-wrap: wrap; gap: 14px 8px; }
  .road-node { flex: 1 1 28%; }
  .road-node::after { display: none; }
  .ops-item { flex-wrap: wrap; gap: 10px; }
  .ops-time { flex-direction: row; gap: 6px; min-width: auto; }
}
