* { margin: 0; padding: 0; box-sizing: border-box; }
  

  body { font-family: var(--font-main); background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; font-size: 13px; transition: background var(--anim-hover, 0.5s) ease, color var(--anim-hover, 0.5s) ease; position: relative; }
  .app { display: flex; height: 100vh; padding-bottom: 22px; box-sizing: border-box; position: relative; z-index: 1; }

  /* ===== 左栏 ===== */
  .left-panel { width: 250px; min-width: 180px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0; }
  .panel-header { padding: 10px 14px; border-bottom: 1px solid var(--border-light); font-weight: 600; display: flex; gap: 6px; }
  .tab-btn { flex: 1; padding: 6px 8px; text-align: center; border: 1px solid var(--border); background: var(--surface); border-radius: 5px; cursor: pointer; font-size: 12px; font-weight: 500; }
  /* .tab-btn.active 的渐变外观统一在「2.1 按钮统一」区定义 */
  .tab-content { flex: 1; overflow-y: auto; min-height: 0; }
  .panel-section { padding: 12px 14px; border-bottom: 1px solid var(--border-light); }
  .panel-section-title { font-size: 11px; color: var(--text); font-weight: 700; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.4px; }
  .chart-note { font-size: 10px; color: var(--text-light); text-align: center; margin-bottom: 10px; }
  .bw-list-item { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12px; }
  .bw-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .bw-pct { margin-left: auto; font-size: 11px; color: var(--text-muted); }
  .hidden { display: none !important; }
  .proj-card { border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 4px; padding: 10px; margin-bottom: 8px; cursor: pointer; background: var(--surface); }
  .proj-card:hover { border-color: var(--brand); box-shadow: 0 1px 4px color-mix(in srgb, var(--brand) 20%, transparent); }
  .proj-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
  .proj-card-name { font-weight: 600; font-size: 13px; flex: 1; }
  .proj-card-date { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
  .proj-card-bar { height: 4px; background: var(--border-light); border-radius: 2px; overflow: hidden; margin: 6px 0; }
  .proj-card-bar-fill { height: 100%; border-radius: 2px; }
  .proj-card-ms { font-size: 11px; color: var(--text-muted); line-height: 1.6; }
  .proj-card-ms-item { display: flex; align-items: center; gap: 4px; }
  .proj-card-ms-dot { width: 10px; font-size: 10px; }
  .archive-group-title { font-size: 11px; color: var(--text-muted); font-weight: 600; padding: 6px 0 3px; border-top: 1px solid var(--border-light); }
  .archive-item { font-size: 12px; padding: 3px 0; color: var(--text-muted); cursor: pointer; }
  .archive-item:hover { color: var(--brand); }

  /* 项目详情模态框：开/合动画（遮罩淡入淡出 + 内容缩放上浮），时长由"动效时长"(--anim-hover) 控制 */
  .modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 100; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--anim-hover, 0.5s) ease, visibility var(--anim-hover, 0.5s) ease; }
  .modal-overlay:not(.hidden) { opacity: 1; visibility: visible; pointer-events: auto; }
  /* 覆盖全局 .hidden 的 display:none，改用透明度/可见性过渡（关闭动画期间保持显示） */
  .modal-overlay.hidden { display: flex !important; }
  .modal-overlay .modal-box { transform: scale(0.94) translateY(14px); opacity: 0; transition: transform var(--anim-hover, 0.5s) ease, opacity var(--anim-hover, 0.5s) ease; }
  .modal-overlay:not(.hidden) .modal-box { transform: scale(1) translateY(0); opacity: 1; }
  .modal-box { background: var(--surface); border-radius: 12px; width: 480px; max-height: 80vh; display: flex; flex-direction: column; }
  .modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border-light); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
  .modal-title { font-size: 16px; font-weight: 700; flex: 1; }
  .modal-title-input { font-size: 16px; font-weight: 700; flex: 1; border: none; outline: none; background: transparent; }
  .modal-close { cursor: pointer; font-size: 20px; color: var(--text-muted); padding: 0 10px; }
  .modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; min-height: 0; }
  .modal-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
  .modal-label { color: var(--text-muted); min-width: 60px; }
  .modal-input { border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px; font-size: 13px; flex: 1; }
  .modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
  .modal-select { border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px; font-size: 13px; }
  .ms-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border-light); }
  .ms-check { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .ms-check.done { background: var(--success); border-color: var(--success); color: #fff; }
  .ms-name { flex: 1; font-size: 13px; border: none; outline: none; background: transparent; }
  .ms-date { font-size: 11px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 3px; padding: 2px 4px; width: 90px; }
  .ms-del { cursor: pointer; color: var(--danger); font-size: 14px; padding: 0 4px; }
  .ms-move { cursor: pointer; font-size: 14px; padding: 0 2px; color: var(--text-light); }
  .pm-ms-block { border-bottom: 1px solid var(--border-light); padding-bottom: 4px; margin-bottom: 4px; }
  .ms-items { margin-left: 28px; }
  .ms-item-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
  .ms-item-check { width: 16px; height: 16px; border: 2px solid var(--border); border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 9px; color: #fff; }
  .ms-item-check.done { background: var(--success); border-color: var(--success); }
  .ms-item-name { flex: 1; font-size: 12px; border: none; outline: none; background: transparent; }
  .ms-item-date { font-size: 10px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 3px; padding: 2px 4px; width: 80px; }
  .ms-item-add { font-size: 11px; color: var(--brand); cursor: pointer; padding: 2px 0 2px 34px; }
  .ms-item-wait { font-size: 10px; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 2px; flex-shrink: 0; white-space: nowrap; }
  .ms-item-wait input { width: 12px; height: 12px; cursor: pointer; margin: 0; }
  .ms-item-wait:has(input:checked) { color: var(--success); }
  .pm-waiting-badge { font-size: 10px; background: var(--warning); color: #fff; padding: 1px 6px; border-radius: 8px; margin-left: 4px; }
  .modal-foot { padding: 12px 20px; border-top: 1px solid var(--border-light); display: flex; justify-content: space-between; gap: 8px; }
  .modal-btn { padding: 6px 16px; border-radius: 6px; cursor: pointer; font-size: 13px; border: 1px solid var(--border); background: var(--surface); }
  /* .modal-btn:not(.danger) 的渐变外观统一在「2.1 按钮统一」区定义 */
  .modal-btn.danger { color: var(--danger); border-color: var(--danger); }

  /* 拖拽幽灵：外层 .drag-wrap 承载浅灰色悬浮阴影（独立于透明度，阴影清晰），内层 .drag-ghost 为原事件块克隆（形状/尺寸不变，透明度按你的 0.7 偏好） */
  .drag-wrap { position: fixed; pointer-events: none; z-index: 9999; transform: translate(2px, 2px); border-radius: 4px; box-shadow: 0 2px 6px rgba(140,140,140,0.35), 0 10px 24px rgba(140,140,140,0.4); transition: none !important; }
  .drag-ghost { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0.7 !important; transition: none !important; }
  /* Ctrl+拖拽复制：幽灵右上角 "+" 徽标 */
  .drag-ghost.drag-copy::after {
    content: '+';
    position: absolute;
    top: -7px; right: -7px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--brand, #007aff);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
  /* 批量拖拽到甘特图：落点预览上的 ×N 数量徽标 */
  .drop-preview .drop-badge {
    position: absolute;
    top: -9px; right: -6px;
    min-width: 20px; height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--brand, #007aff);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    z-index: 2;
  }
  /* 落点预览：与事件同形状的虚线高亮（替代整条泳道高亮） */
  .drop-preview { position: absolute; left: 3px; right: 3px; outline: 2px dashed var(--brand) !important; outline-offset: -2px; border-radius: 4px; background: color-mix(in srgb, var(--brand) 8%, transparent); pointer-events: none; z-index: 20; }
  .gantt-bar.dragging, .evt.dragging { opacity: 0.25; }

  /* 面板拖拽分隔条 */
  .v-resizer {
    position: fixed; top: 0; bottom: 22px; width: 8px; z-index: 45;
    cursor: col-resize; background: transparent; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .v-resizer:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); }
  .v-resizer::before { content: ''; width: 3px; height: 44px; background: var(--text-light); border-radius: 2px; opacity: .55; }
  .v-resizer:hover::before { background: var(--brand); opacity: 1; }

  /* ===== 中栏 ===== */
  .main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
  .cal-toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; }
  .toolbar-btn { padding: 4px 10px; border: 1px solid var(--border); background: var(--surface); border-radius: 5px; cursor: pointer; font-size: 12px; }
  .toolbar-search { padding: 4px 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 5px; font-size: 12px; width: 180px; flex-shrink: 0; }
  .toolbar-search:focus { outline: none; border-color: var(--brand); }
  .toolbar-filter { padding: 4px 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 5px; font-size: 12px; flex-shrink: 0; }
  kbd { display: inline-block; padding: 1px 6px; font-size: 11px; font-family: monospace; background: var(--bg); border: 1px solid var(--border); border-radius: 3px; box-shadow: 0 1px 0 var(--border); }
  .focus-info { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
  .focus-info strong { color: var(--brand); }
  .toolbar-hint { margin-left: auto; font-size: 11px; color: var(--text-light); flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .views-wrap { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
  /* 三个视图块：默认占满主区域（单块独占，左栏 tab 决定显示哪一个） */
  .view-block { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
  /* 板块聚焦框：配色跟随主题（--brand），inset 避免被滚动条/子元素遮挡 */
  .view-block.panel-focused { box-shadow: inset 0 0 0 2px var(--brand); }
  /* 单块独占：仅显示当前模式的视图块，其余隐藏 */
  .views-wrap[data-mode="attention"] .pm-view,
  .views-wrap[data-mode="attention"] .rv-view,
  .views-wrap[data-mode="project"] .tm-view,
  .views-wrap[data-mode="project"] .rv-view,
  .views-wrap[data-mode="review"] .tm-view,
  .views-wrap[data-mode="review"] .pm-view { display: none; }
  /* 视图切换动效：固定淡入淡出（与界面效果毛玻璃/液态玻璃叠加，fade 仅透明度过渡） */
  .view-block.tab-anim-fade { animation: tabFade .3s ease; }
  @keyframes tabFade { from { opacity: 0; } to { opacity: 1; } }
  /* 日复盘板块：N 天文本泳道（每列一天，横向滚动，列数=显示天数） */
  .rv-head { padding: 5px 16px; font-size: 12px; font-weight: 600; color: var(--text); background: var(--surface-muted); border-bottom: 1px solid var(--grid); flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; }
  .rv-scroll { flex: 1; overflow: auto; min-height: 0; }
  .rv-inner { display: flex; min-width: max-content; position: relative; height: 100%; }
  .rv-day-col { width: 390px; min-width: 390px; border-right: 1px solid var(--grid); display: flex; flex-direction: column; background: var(--surface); }
  .rv-day-col.today { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
  .rv-day-head { padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--grid); background: var(--surface-muted); flex-shrink: 0; position: sticky; top: 0; z-index: 2; }
  .rv-day-body { flex: 1; overflow-y: auto; padding: 8px 10px; cursor: text; min-height: 0; position: relative; }
  .rv-md { font-size: 12.5px; line-height: 1.65; color: var(--text); }
  .rv-md-empty { color: var(--text-light); font-size: 12px; }
  .rv-md-h1 { font-size: 17px; font-weight: 700; margin: 10px 0 4px; color: var(--text); }
  .rv-md-h2 { font-size: 15px; font-weight: 700; margin: 8px 0 3px; color: var(--text); }
  .rv-md-h3 { font-size: 13.5px; font-weight: 700; margin: 6px 0 2px; color: var(--text); }
  .rv-md-p { margin: 4px 0; }
  .rv-md-p:empty { min-height: 1.65em; }
  .rv-md-ul { margin: 4px 0 4px 16px; list-style: disc; }
  .rv-md-ul li { margin: 2px 0; }
  .rv-md-ol { margin: 4px 0 4px 16px; list-style: decimal; }
  .rv-md-ol li { margin: 2px 0; }
  .rv-md-hr { border: none; border-top: 1px solid var(--grid); margin: 8px 0; }
  /* todo 复选框：渲染态可点击切换 [ ]↔[x]（点击不进入编辑） */
  .rv-md-ul li.rv-todo { list-style: none; margin-left: -16px; }
  .rv-todo-box { cursor: pointer; user-select: none; font-size: 13px; color: var(--text-light); margin-right: 2px; display: inline-block; line-height: 1.1; }
  .rv-todo-box:hover { filter: brightness(1.2); }
  .rv-todo-box.checked { color: var(--brand); }
  .rv-md-ul li.rv-todo.checked-content .rv-md-inline { text-decoration: line-through; opacity: .75; }
  .rv-edit { position: absolute; top: 6px; right: 6px; bottom: 6px; left: 6px; width: auto; height: auto; min-height: 0; border: none; outline: 1px solid var(--brand); background: var(--surface); color: var(--text); font-size: 12.5px; line-height: 1.65; padding: 8px; resize: none; box-sizing: border-box; font-family: inherit; }
  .view-label { padding: 4px 16px; background: var(--surface-muted); font-size: 11px; color: var(--text-muted); font-weight: 600; display: flex; justify-content: space-between; flex-shrink: 0; }
  .view-label .hint { font-weight: 400; color: var(--text-light); }
  .view-label .label-right { display: flex; align-items: center; gap: 8px; }
  /* 缩放比例徽章：hover 有交互反馈，点击恢复 100%（hover 渐变外观统一在「2.1 按钮统一」区） */
  .zoom-chip {
    padding: 1px 9px;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.7;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--anim-hover, 0.3s) ease;
    flex-shrink: 0;
  }
  .zoom-chip:active { transform: scale(0.92); }
  .cal-scroll-x { flex: 1; overflow: auto; min-height: 0; scrollbar-width: thin; }
  .cal-scroll-x::-webkit-scrollbar { height: 8px; width: 8px; }
  .cal-scroll-x::-webkit-scrollbar-track { background: var(--surface-muted); }
  .cal-scroll-x::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
  .cal-inner { display: flex; min-width: max-content; position: relative; }

  /* ===== 统一的网格结构（上下共用）===== */
  /* 首列：180px sticky，上下一致；表头行内 z-index 提升（背景透明度在 1.1b 区统一处理） */
  .first-col, .tm-ruler { width: 180px; min-width: 180px; border-right: 1px solid var(--grid); background: var(--surface); position: sticky; left: 0; z-index: 25; flex-shrink: 0; }
  .head-row .first-col { z-index: 31; }
  /* 日期列：110px，上下一致 */
  .day-cell { width: 110px; min-width: 110px; border-right: 1px solid var(--grid); position: relative; flex-shrink: 0; }
  /* 今天列 / 聚焦区间列：时间列、项目格、打卡格共用同一高亮（hover 变体在打卡区单独定义） */
  .day-cell.today, .tm-day-col.today, .pm-day-cell.today, .checkin-cell.today { background: color-mix(in srgb, var(--brand) 12%, transparent) !important; }
  .day-cell.in-focus, .tm-day-col.in-focus, .pm-day-cell.in-focus, .checkin-cell.in-focus { background: color-mix(in srgb, var(--brand) 6%, transparent); }
  /* 表头行：50px，上下一致，统一背景色，sticky 固定 */
  .head-row { display: flex; height: 50px; background: var(--surface-muted); border-bottom: 1px solid var(--grid); align-items: center; flex-shrink: 0; position: sticky; top: 0; z-index: 30; pointer-events: none; }
  .head-cell { text-align: center; font-size: 11px; color: var(--text-muted); display: flex; flex-direction: column; justify-content: center; height: 50px; }
  .head-cell .weekday { font-size: 10px; color: var(--text-light); }
  .head-cell .daynum { font-size: 14px; font-weight: 600; }
  .head-cell .daynum.today-num { color: var(--brand); }
  /* 内容行 */
  .content-row { display: flex; border-bottom: 1px solid var(--grid); align-items: stretch; }

  /* 时间管理结构（上部）*/
  .tm-view .cal-inner { flex-direction: column; height: max-content; }
  .tm-ruler-slot { height: 80px; padding-right: 12px; text-align: right; font-size: 11px; color: var(--text-muted); line-height: 80px; border-bottom: 1px solid var(--border-light); }
  .tm-day-col { width: 110px; min-width: 110px; border-right: 1px solid var(--grid); position: relative; background: var(--surface); }
  .tm-day-body { position: relative; height: 1920px; background-image: linear-gradient(to bottom, var(--grid) 1px, transparent 1px); background-size: 100% 80px; }
  .evt { position: absolute; left: 3px; right: 3px; border-radius: 4px; padding: 2px 7px; font-size: 10px; line-height: 1.25; cursor: grab; overflow: hidden; border-left: 3px solid; box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), inset 0 -1px 0 rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.05); }
  /* 同分类相邻事件：浮雕细分隔线（分类色加深，非纯黑，随主题自适应） */
  .evt[data-boundary="same"] { border-top: 1px solid color-mix(in srgb, var(--evt-color, var(--brand)) 45%, transparent); }
  /* hover 焦点反馈：分类色发光 + 微上浮，时长可调 */
  .evt:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--evt-color, var(--brand)) 50%, transparent), 0 0 14px color-mix(in srgb, var(--evt-color, var(--brand)) 40%, transparent), 0 4px 10px rgba(0,0,0,0.12); transform: translateY(-1px); z-index: 10; }
  .evt.stacked-behind { opacity: 0.85; box-shadow: 1px 0 3px rgba(0,0,0,0.1); }
  .evt.stacked-behind:hover { opacity: 1; z-index: 15; box-shadow: 0 0 0 1px color-mix(in srgb, var(--evt-color, var(--brand)) 50%, transparent), 0 0 14px color-mix(in srgb, var(--evt-color, var(--brand)) 40%, transparent), 0 4px 10px rgba(0,0,0,0.12); transform: translateY(-1px); }
  .stack-badge { position: absolute; top: 2px; right: 4px; font-size: 9px; color: rgba(255,255,255,0.85); background: rgba(0,0,0,0.3); border-radius: 3px; padding: 0 3px; line-height: 1.3; }
  .evt.selected { outline: 2px solid var(--brand); outline-offset: 1px; z-index: 11; }
  /* 垂直调整手柄：事件上下边缘 7px 热区，拖拽调整开始/结束时间（Shift+拖联动相邻事件） */
  .evt-resize-top, .evt-resize-bottom { position: absolute; left: 0; right: 0; height: 7px; cursor: ns-resize; z-index: 6; }
  .evt-resize-top { top: 0; }
  .evt-resize-bottom { bottom: 0; }
  .evt:hover .evt-resize-top, .evt:hover .evt-resize-bottom { background: color-mix(in srgb, var(--evt-color, var(--brand)) 22%, transparent); }
  .evt-resize-top:hover, .evt-resize-bottom:hover { background: color-mix(in srgb, var(--evt-color, var(--brand)) 40%, transparent); }
  .evt.multi-selected { outline: 2px solid var(--danger); outline-offset: 1px; z-index: 11; box-shadow: 0 0 0 2px rgba(255,59,48,0.15); }
  .gantt-bar.multi-selected { outline: 2px solid var(--danger); outline-offset: 1px; box-shadow: 0 0 0 2px rgba(255,59,48,0.15); }
  .box-sel-rect { position: absolute; border: 1.5px dashed var(--danger); background: rgba(255,59,48,0.08); pointer-events: none; z-index: 50; }
  .import-option { border: 1px solid var(--border); border-radius: 8px; padding: 12px; cursor: pointer; transition: all var(--anim-hover, 0.5s); }
  .import-option:hover { border-color: var(--brand); }
  .import-option-danger { border-color: rgba(255,59,48,0.4); }
  .import-option-danger:hover { border-color: var(--danger); background: rgba(255,59,48,0.04); box-shadow: 0 2px 8px rgba(255,59,48,0.12); }
  .import-option-merge:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
  .evt.waiting { opacity: 0.55; border-style: dashed; }
  .evt-title { font-weight: 600; }
  .evt-sub { font-size: 9px; opacity: 0.8; }

  /* 分类色：背景混 transparent（35%半透明，透出网格线），文字混 text（保持清晰） */
  .cat-career { --evt-color: var(--cat-career); background: color-mix(in srgb, var(--cat-career) 35%, transparent); border-color: var(--cat-career); color: color-mix(in srgb, var(--cat-career) 75%, var(--text)); }
  .cat-finance { --evt-color: var(--cat-finance); background: color-mix(in srgb, var(--cat-finance) 35%, transparent); border-color: var(--cat-finance); color: color-mix(in srgb, var(--cat-finance) 75%, var(--text)); }
  .cat-social { --evt-color: var(--cat-social); background: color-mix(in srgb, var(--cat-social) 35%, transparent); border-color: var(--cat-social); color: color-mix(in srgb, var(--cat-social) 75%, var(--text)); }
  .cat-health { --evt-color: var(--cat-health); background: color-mix(in srgb, var(--cat-health) 35%, transparent); border-color: var(--cat-health); color: color-mix(in srgb, var(--cat-health) 75%, var(--text)); }
  .cat-recreation { --evt-color: var(--cat-recreation); background: color-mix(in srgb, var(--cat-recreation) 35%, transparent); border-color: var(--cat-recreation); color: color-mix(in srgb, var(--cat-recreation) 75%, var(--text)); }
  .cat-family { --evt-color: var(--cat-family); background: color-mix(in srgb, var(--cat-family) 35%, transparent); border-color: var(--cat-family); color: color-mix(in srgb, var(--cat-family) 75%, var(--text)); }
  .cat-growth { --evt-color: var(--cat-growth); background: color-mix(in srgb, var(--cat-growth) 35%, transparent); border-color: var(--cat-growth); color: color-mix(in srgb, var(--cat-growth) 75%, var(--text)); }
  .cat-actual { --evt-color: var(--cat-actual); background: color-mix(in srgb, var(--cat-actual) 35%, transparent); border-color: var(--cat-actual); color: color-mix(in srgb, var(--cat-actual) 75%, var(--text)); }
  .cat-other { --evt-color: var(--cat-other); background: color-mix(in srgb, var(--cat-other) 35%, transparent); border-color: var(--cat-other); color: color-mix(in srgb, var(--cat-other) 75%, var(--text)); }

  /* 项目管理结构(甘特图) - 与时间管理统一结构 */
  .pm-view .cal-inner { flex-direction: column; min-height: 100%; }
  .pm-first-col { width: 180px; min-width: 180px; padding: 0 8px; font-size: 12px; border-right: 1px solid var(--grid); display: flex; align-items: center; gap: 6px; position: sticky; left: 0; background: var(--surface); z-index: 3; flex-shrink: 0; }
  .content-row:nth-child(odd) .pm-first-col { background: var(--surface-muted); }
  /* 打卡行：淡黄底随主题协调，不再硬编码颜色 */
  .content-row.checkin-row { background: color-mix(in srgb, var(--warning) 8%, var(--surface)); }
  .content-row.checkin-row .pm-first-col { background: color-mix(in srgb, var(--warning) 15%, var(--surface)); }
  .pm-first-col .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .pm-day-cell { width: 110px; min-width: 110px; height: 100%; border-right: 1px solid var(--grid); position: relative; flex-shrink: 0; }
  .gantt-bar { position: absolute; z-index: 1; border-radius: 4px; padding: 0 6px; font-size: 11px; color: #fff; overflow: hidden; white-space: nowrap; cursor: pointer; border-left: 3px solid rgba(0,0,0,0.15); }
  .gantt-bar:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
  .gantt-bar.selected { outline: 2px solid var(--brand); }
  .gantt-bar.waiting { opacity: 0.6; border-style: dashed; background-image: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(255,255,255,0.3) 4px, rgba(255,255,255,0.3) 8px); }
  .milestone { position: absolute; left: 50%; transform: translateX(0); height: 16px; line-height: 16px; font-size: 10px; padding: 0 4px; border-radius: 3px; background: rgba(255,149,0,0.15); color: var(--warning); cursor: pointer; z-index: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid rgba(255,149,0,0.3); }
  .milestone.done { background: rgba(52,199,89,0.15); color: var(--success); border-color: rgba(52,199,89,0.3); }
  .checkin-cell { width: 110px; min-width: 110px; border-right: 1px solid var(--grid); display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; flex-shrink: 0; overflow: hidden; }
  .checkin-cell:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
  .checkin-cell.in-focus:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
  .checkin-cell.today:hover { background: color-mix(in srgb, var(--brand) 16%, transparent) !important; }
  /* 打卡圆圈：固定尺寸不随行高缩放（缩放只作用于垂直间距/行高） */
  .checkin-mark { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--text-light); display: flex; align-items: center; justify-content: center; font-size: 12px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
  .checkin-cell.in-focus .checkin-mark:not(.done):not(.pass):not(.partial):not(.fail) { border-color: var(--text-muted); background: var(--surface); }
  .checkin-cell.today .checkin-mark:not(.done):not(.pass):not(.partial):not(.fail) { border-color: var(--text); border-width: 2px; background: var(--surface); box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 80%, transparent); }
  .checkin-cell.today.in-focus .checkin-mark:not(.done):not(.pass):not(.partial):not(.fail) { border-color: var(--text); }
  .checkin-mark.pass { background: var(--success); border-color: var(--success); color: #fff; }
  .checkin-mark.partial { background: var(--warning); border-color: var(--warning); color: #fff; }
  .checkin-mark.fail { background: var(--danger); border-color: var(--danger); color: #fff; }
  .checkin-mark.done { background: var(--success); border-color: var(--success); color: #fff; }
  .checkin-stack { display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; max-width: 100%; padding: 0 4px; }
  .ci-note-text { font-size: 10px; color: var(--text-light); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px; }
  /* 得分行：圆圈下方 [得分徽章 + 备注] 横排 */
  .ci-score-row { display: flex; align-items: center; gap: 3px; min-height: 14px; max-width: 100%; }
  .ci-score { font-size: 10px; font-weight: 600; line-height: 1.3; padding: 0 4px; border-radius: 3px; flex: none; }
  .ci-score.pos { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
  .ci-score.neg { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
  .ci-score.zero { color: var(--text-light); background: var(--surface-muted); }
  /* 打卡行名称后积分徽章：该项在视图 N 天内的累计积分 */
  .checkin-row-pts { font-size: 10px; font-weight: 600; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 8px; padding: 0 6px; line-height: 1.5; white-space: nowrap; flex: none; }
  /* 每日积分合计行 */
  .checkin-sum-row { background: color-mix(in srgb, var(--brand) 6%, transparent); }
  .checkin-sum-cell { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--brand); border-right: 1px solid var(--grid); cursor: default; }

  /* ===== 左栏：积分与兑换区块 ===== */
  .pts-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
  .pts-title { font-size: 12px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.4px; }
  .pts-streak { font-size: 10px; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); padding: 1px 7px; border-radius: 10px; }
  .pts-stats { display: flex; gap: 6px; margin-bottom: 8px; }
  .pts-stat { flex: 1; background: var(--surface-muted); border-radius: 6px; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; }
  .pts-stat span { font-size: 10px; color: var(--text-light); }
  .pts-stat b { font-size: 15px; font-weight: 700; color: var(--text); }
  .pts-stat.pts-total { background: color-mix(in srgb, var(--brand) 8%, var(--surface-muted)); }
  .pts-stat.pts-total b { color: var(--brand); }
  .pts-streak-cfg { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
  .pts-streak-cfg .pts-mini-btn { margin-left: auto; }
  .pts-streak-cfg input { width: 42px; padding: 2px 4px; border: 1px solid var(--border); border-radius: 4px; font-size: 11px; font-family: inherit; background: var(--surface); color: var(--text); }
  .pts-streak-cfg input:focus { border-color: var(--brand); box-shadow: var(--btn-shadow); outline: none; }
  .pts-mini-btn { font-size: 10px; padding: 3px 9px; border-radius: 5px; font-family: inherit; line-height: 1.4; cursor: pointer; white-space: nowrap; }
  .pts-redeem-btn { font-weight: 600; }
  .pts-subhead { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text); font-weight: 600; margin: 10px 0 6px; }
  .pts-goal-list, .pts-redeem-list { display: flex; flex-direction: column; gap: 4px; }
  .pts-goal { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); font-size: 11px; cursor: pointer; }
  .pts-goal:hover { border-color: var(--brand); }
  .pts-goal-name { flex: 1; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pts-goal-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--border-light); overflow: hidden; }
  .pts-goal-bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
  .pts-goal-cost { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
  .pts-goal-ok { font-size: 9px; color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); padding: 0 5px; border-radius: 8px; white-space: nowrap; }
  .pts-goal-wait { font-size: 9px; color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); padding: 0 5px; border-radius: 8px; white-space: nowrap; }
  .pts-goal-del, .pts-redeem-del { color: var(--text-light); cursor: pointer; font-size: 11px; padding: 0 2px; }
  .pts-goal-del:hover, .pts-redeem-del:hover { color: var(--danger); }
  .pts-redeem { display: flex; align-items: center; gap: 6px; padding: 3px 6px; background: var(--surface-muted); border-radius: 5px; font-size: 10px; }
  .pts-redeem-date { color: var(--text-light); flex: none; }
  .pts-redeem-note { flex: 1; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pts-redeem-amt { color: var(--danger); font-weight: 600; flex: none; }
  /* 兑换弹窗：目标快捷标签 */
  .redeem-tag { font-size: 11px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 13px; color: var(--text-muted); cursor: pointer; }
  .redeem-tag:hover { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); }
  /* 打卡模板弹窗：四状态分值行 */
  .ms-score-row { display: flex; align-items: center; gap: 10px; padding: 0 0 8px 16px; font-size: 10px; color: var(--text-light); }
  .ms-score-row label { display: flex; align-items: center; gap: 3px; }
  .ms-score-row .score-input { width: 44px; padding: 2px 4px; border: 1px solid var(--border); border-radius: 3px; font-size: 11px; background: var(--surface); color: var(--text); }
  .ms-score-row .score-hint { color: var(--text-light); }

  /* ===== 右栏 ===== */
  .right-panel { width: 270px; min-width: 200px; background: var(--surface); border-left: 1px solid var(--border); overflow-y: auto; flex-shrink: 0; }
  /* 左右面板：任何屏幕宽度下都可划入/划出（抽屉），配边缘细长开关按钮 */
  /* 用 .app 前缀提高特异性，覆盖手绘主题里对面板的 position 定义 */
  .app .left-panel, .app .right-panel {
    position: fixed; top: 0; bottom: 22px; z-index: 40;
    width: 275px; max-width: 84vw;
    box-shadow: 0 0 28px rgba(0,0,0,.28);
    border: none;
    transition: transform .28s ease;
  }
  .app .left-panel { left: 0; transform: translateX(-105%); }
  .app .right-panel { right: 0; transform: translateX(105%); }
  .app .left-panel.open, .app .right-panel.open { transform: translateX(0); }

  .edge-handle {
    position: fixed; top: 50%; transform: translateY(-50%);
    height: 120px; width: 20px;
    display: flex; align-items: center; justify-content: center;
    padding: 0; margin: 0;
    background: color-mix(in srgb, var(--brand) 62%, transparent);
    color: #fff; border: none; border-radius: 5px;
    opacity: .9; cursor: pointer; z-index: 50;
    font-size: 16px; font-weight: 700; line-height: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
    transition: box-shadow var(--anim-hover, .4s) ease, transform var(--anim-hover, .4s) ease, filter var(--anim-hover, .4s) ease;
  }
  .edge-handle span { display: block; user-select: none; }
  .edge-handle.left { left: 0; }
  .edge-handle.right { right: 0; }
  /* hover：品牌色光晕 + 轻微外凸（时长跟随后台"动效时长"配置 --anim-hover） */
  .edge-handle:hover {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 60%, transparent),
                0 0 18px color-mix(in srgb, var(--brand) 55%, transparent),
                0 4px 14px rgba(0,0,0,.28);
    transform: translateY(-50%) scale(1.05);
  }
  .edge-handle:active { filter: brightness(.9); transform: translateY(-50%) scale(.96); }
  .right-section { padding: 12px 14px; border-bottom: 1px solid var(--border-light); }
  .right-section-title { font-size: 11px; color: var(--text); font-weight: 700; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.4px; }
  .right-group { margin-bottom: 4px; }
  .right-group > summary { font-size: 12px; font-weight: 700; color: var(--brand); cursor: pointer; padding: 6px 0; user-select: none; border-bottom: 1px solid var(--border-light); margin-bottom: 6px; list-style: none; }
  .right-group > summary::before { content: '▾ '; font-size: 10px; }
  .right-group[open] > summary::before { content: '▾ '; }
  .right-group:not([open]) > summary::before { content: '▸ '; }
  .right-group:not([open]) > .right-section { display: none; }
  .setting-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 12px; cursor: pointer; }
  .setting-val { color: var(--brand); font-size: 12px; }
  /* 主题下拉菜单：与设置行同高度，随主题自动适配 */
  .setting-select { font-size: 12px; color: var(--brand); background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px; max-width: 130px; cursor: pointer; }
  .mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; font-size: 10px; }
  .mini-cal-head { text-align: center; color: var(--text-light); padding: 3px 0; font-weight: 600; }
  .mini-cal-cell { text-align: center; padding: 4px 0; cursor: pointer; }
  .mini-cal-cell:hover { background: var(--surface-muted); }
  .mini-cal-cell.other-month { color: var(--text-light); }
  .mini-cal-cell.today { font-weight: 700; color: var(--brand); }
  .mini-cal-cell.in-focus { background: color-mix(in srgb, var(--brand) 25%, transparent); color: var(--brand-on); font-weight: 600; }
  .mini-cal-cell.selected { background: var(--brand); color: var(--brand-on); font-weight: 700; }
  .mini-cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
  .mini-cal-nav-btn { cursor: pointer; color: var(--brand); padding: 2px 8px; }
  .mini-cal-title { font-size: 12px; font-weight: 600; }
  .tpl-item { padding: 6px 8px; border: 1px solid var(--border); border-radius: 5px; margin-bottom: 6px; font-size: 12px; }
  .tpl-item-title { font-weight: 600; margin-bottom: 4px; display: flex; justify-content: space-between; }
  .tpl-badge { font-size: 9px; padding: 1px 5px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
  .tpl-entry { display: flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 0; color: var(--text-muted); }
  .tpl-entry .type-tag { font-size: 9px; padding: 0 4px; border-radius: 3px; }
  .type-habit { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
  .type-negative { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
  .btn-ghost { width: 100%; padding: 5px; border: 1px dashed var(--border); background: none; border-radius: 4px; cursor: pointer; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
  .btn-ghost.brand { border-color: var(--brand); color: var(--brand); }
  .status-bar { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 3px 16px; font-size: 10px; color: var(--text-light); background: var(--surface-muted); border-top: 1px solid var(--border); z-index: 50; }
  /* 图表容器 */
  .chart-canvas-wrap { width: 100%; height: 160px; position: relative; margin-bottom: 6px; }
  /* 事件里程碑进度浮层 */
  .evt-popover { position: fixed; z-index: 200; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); padding: 10px 12px; min-width: 200px; max-width: 280px; font-size: 12px; }
  .evt-popover.hidden { display: none; }
  .evt-popover-title { font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
  .evt-popover-progress { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
  .evt-popover-bar { height: 4px; background: var(--border-light); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
  .evt-popover-bar-fill { height: 100%; border-radius: 2px; }
  .evt-popover-ms { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 11px; }
  .evt-popover-ms-done { color: var(--success); }
  .evt-popover-ms-pending { color: var(--text-muted); }
  .evt-popover-ms-date { color: var(--text-light); font-size: 10px; margin-left: auto; }
  /* 日表 */
  .daily-table { width:100%; border-collapse:collapse; font-size:11px; }
  .daily-table th { text-align:right; padding:3px 4px; color:var(--text-muted); font-weight:500; border-bottom:1px solid var(--border); }
  .daily-table th:first-child { text-align:left; }
  .daily-table td { text-align:right; padding:3px 4px; border-bottom:1px solid var(--border); color:var(--text-light); font-weight:400; }
  .daily-table td:first-child { text-align:left; color:var(--text-light); font-weight:400; }
  .daily-table tr.total-row { font-weight:bold; border-top:2px solid var(--border); color:var(--text-muted); }
  .daily-table .cov-high { color:var(--brand); }
  .daily-table .cov-mid { color:var(--warning); }
  .daily-table .cov-low { color:var(--danger); }
  /* 每日大类概要 */
  .dcs-row { display:flex; align-items:center; gap:6px; padding:2px 0; font-size:10px; }
  .dcs-day { width:56px; flex-shrink:0; color:var(--text-light); }
  .dcs-bar { flex:1; height:10px; border-radius:3px; overflow:hidden; display:flex; background:var(--border-light); }
  .dcs-seg { height:100%; min-width:0; }
  .dcs-top { width:76px; flex-shrink:0; text-align:right; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  /* 有子小类的事件视觉区分 */
  .evt.has-subcat { border-left: 3px solid rgba(255,255,255,0.7); }
  /* 左侧面板：未完成待办项 */
  .rv-todo-item { display: flex; align-items: flex-start; gap: 6px; padding: 4px 2px; font-size: 12px; border-bottom: 1px dashed var(--border-light); }
  .rv-todo-item-box { cursor: pointer; color: var(--text-muted); flex-shrink: 0; user-select: none; line-height: 1.6; }
  .rv-todo-item-box:hover { color: var(--brand); }
  .rv-todo-urgent { flex-shrink: 0; color: #fff; background: var(--danger, #ff3b30); border-radius: 3px; font-size: 10px; padding: 0 5px; line-height: 1.6; margin-top: 1px; }
  .rv-todo-item-text { flex: 1; color: var(--text); word-break: break-all; line-height: 1.6; }
  .rv-todo-item-date { flex-shrink: 0; font-size: 10px; color: var(--text-light); line-height: 1.9; }
  /* 已完成待办项 */
  .rv-todo-item.done { opacity: 0.7; }
  .rv-todo-item-box.checked { color: var(--success); }
  .rv-todo-item-text.checked { text-decoration: line-through; color: var(--text-light); }
  /* 三视图同步：带日期时间的待办 */
  /* 左栏列表与日记列内的调度徽标（虚线小标签） */
  .rv-todo-item-sched, .rv-todo-sched-badge { flex-shrink: 0; font-size: 10px; color: var(--brand); border: 1px dashed var(--brand); border-radius: 3px; padding: 0 4px; line-height: 1.5; white-space: nowrap; }
  .rv-todo-item-sched { margin-left: auto; line-height: 1.9; }
  /* 时间管理视图的待办条：虚线边框 + 半透明底，叠加在事件流之上，可点击勾选/跳转 */
  .evt-todo { position: absolute; left: 2px; right: 2px; display: flex; align-items: center; gap: 3px; padding: 0 4px; border: 1px dashed var(--brand); border-radius: 4px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--text); font-size: 10px; overflow: hidden; white-space: nowrap; z-index: 20; cursor: pointer; box-sizing: border-box; }
  .evt-todo:hover { background: color-mix(in srgb, var(--brand) 22%, transparent); }
  .evt-todo-box { cursor: pointer; user-select: none; font-size: 11px; color: var(--brand); flex: none; }
  .evt-todo-title { overflow: hidden; text-overflow: ellipsis; }
  .evt-todo.urgent { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
  .evt-todo.urgent .evt-todo-box { color: var(--danger); }
  /* 项目管理视图的"日记待办"行：每天格子的待办条 */
  .pm-todo-cell { position: relative; overflow: hidden; }
  .pm-todo-bar { position: absolute; left: 3px; right: 3px; display: flex; align-items: center; padding: 0 6px; border: 1px dashed var(--brand); border-radius: 3px; background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--text); font-size: 10px; cursor: pointer; overflow: hidden; white-space: nowrap; box-sizing: border-box; }
  .pm-todo-bar:hover { background: color-mix(in srgb, var(--brand) 20%, transparent); }
  .pm-todo-bar.urgent { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }

  /* ====== 美丽的废物 · 手绘装饰元素 ====== */
  .deco-layer {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
  }
  [data-mood="hand"] .deco-layer { opacity: var(--deco-opacity, 1); }
  [data-mood="hand"] .deco-layer.subtle { opacity: 0.6; }

  /* 角落森林 —— 左下角小树丛 */
  .deco-forest {
    bottom: 20px;
    left: -10px;
    width: 140px;
    height: 110px;
  }
  /* 溪流 —— 右下角水波纹 */
  .deco-stream {
    bottom: 20px;
    right: -10px;
    width: 150px;
    height: 80px;
  }
  /* 沙滩 —— 底部沙粒点缀 */
  .deco-beach {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 30px;
  }
  /* 绿洲 —— 右上角棕榈 */
  .deco-oasis {
    top: 0;
    right: 280px;
    width: 90px;
    height: 90px;
  }
  /* 云朵 —— 顶部点缀 */
  .deco-clouds {
    top: 0;
    left: 260px;
    right: 370px;
    height: 40px;
  }
  /* 飞鸟 —— 随机点缀 */
  .deco-birds {
    top: 20px;
    right: 390px;
    width: 70px;
    height: 35px;
  }

  /* 手绘模式下的app背景纸感 */
  [data-mood="hand"] body {
    background-image:
      radial-gradient(ellipse at 20% 80%, color-mix(in srgb, var(--brand) 4%, transparent) 0%, transparent 50%),
      radial-gradient(ellipse at 80% 20%, color-mix(in srgb, var(--warning) 4%, transparent) 0%, transparent 50%);
    background-color: var(--bg);
  }
  [data-mood="hand"] .app {
    position: relative;
  }
  /* 手绘面板内的小涂鸦装饰 */
  [data-mood="hand"] .left-panel {
    position: relative;
    overflow: hidden;
  }
  [data-mood="hand"] .left-panel::after {
    content: '';
    position: absolute;
    bottom: 60px;
    right: 8px;
    width: 50px;
    height: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Cg stroke='%235a7a4a' stroke-width='1.2' fill='none' stroke-linecap='round' opacity='0.25'%3E%3Cpath d='M25,48 L25,25 M15,35 L25,18 L35,35 M18,28 L25,12 L32,28 M21,22 L25,10 L29,22'/%3E%3Cpath d='M10,48 Q12,43 14,48 M16,48 Q18,42 20,48 M30,48 Q32,43 34,48 M36,48 Q38,44 40,48'/%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
  }
  [data-mood="hand"] .right-panel {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
  }
  [data-mood="hand"] .right-panel::after {
    content: '';
    position: absolute;
    bottom: 40px;
    left: 8px;
    width: 45px;
    height: 35px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 45 35'%3E%3Cg stroke='%23c05040' stroke-width='1.2' fill='none' stroke-linecap='round' opacity='0.2'%3E%3Cpath d='M5,30 Q10,15 15,30 Q20,10 25,30 Q30,18 35,30 Q40,22 45,30'/%3E%3Cpath d='M8,25 Q12,15 16,25 M22,22 Q26,14 30,22 M34,26 Q38,18 42,26'/%3E%3Ccircle cx='12' cy='10' r='2' fill='%23d0a040' fill-opacity='0.3'/%3E%3Ccircle cx='30' cy='8' r='1.5' fill='%23d0a040' fill-opacity='0.25'/%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
  }
  /* 手绘模式下主内容区边缘装饰 */
  [data-mood="hand"] .main-area::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 20px;
    width: 35px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 35 20'%3E%3Cg stroke='%23887858' stroke-width='1' fill='none' stroke-linecap='round' opacity='0.2'%3E%3Cpath d='M5,12 Q10,5 17,8 Q22,3 30,10'/%3E%3Cpath d='M8,10 Q12,6 16,9 M20,7 Q25,4 28,8'/%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 5;
  }
  /* 让面板内容在装饰之上 */
  [data-mood="hand"] .left-panel > *,
  [data-mood="hand"] .right-panel > * {
    position: relative;
    z-index: 1;
  }
  /* 笔记本横线已移除（1.3），保留 main-area 定位供装饰使用 */
  [data-mood="hand"] .main-area {
    position: relative;
  }

  /* 手绘模式下的页脚小插画 */
  [data-mood="hand"] .status-bar {
    font-family: var(--font-hand);
    border-top: 1.5px solid var(--border);
  }
  [data-mood="hand"] .status-bar::before {
    content: '~';
    margin-right: 8px;
    color: var(--brand);
    opacity: 0.6;
  }
  [data-mood="hand"] .status-bar::after {
    content: '~';
    margin-left: 8px;
    color: var(--brand);
    opacity: 0.6;
  }

  /* 手绘模式：按钮/卡片更有纸张感 */
  [data-mood="hand"] .btn-ghost {
    border-style: dashed;
    border-width: 1.5px;
    border-radius: 4px 7px 5px 6px;
  }
  [data-mood="hand"] .btn-ghost.brand {
    border-style: solid;
    border-width: 1.5px;
  }
  [data-mood="hand"] .panel-section-title {
    font-family: var(--font-hand);
    font-style: italic;
    letter-spacing: 0.5px;
  }
  [data-mood="hand"] .right-section-title {
    font-family: var(--font-hand);
    font-style: italic;
  }
  [data-mood="hand"] .view-label {
    font-family: var(--font-hand);
    border-bottom: 1.5px dashed var(--border);
  }
  [data-mood="hand"] .head-row {
    border-bottom: 1.5px solid var(--grid);
  }
  [data-mood="hand"] .day-cell,
  [data-mood="hand"] .tm-day-col,
  [data-mood="hand"] .first-col {
    border-right: 1.5px dashed var(--border);
  }
  [data-mood="hand"] .tm-day-body {
    background-image:
      linear-gradient(to bottom, var(--border-light) 1.5px, transparent 1.5px);
    background-size: 100% 80px;
  }

  /* ====== 全局UI打磨 ====== */
  /* 滚动条美化 */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--text-light) 50%, transparent);
    border-radius: 3px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
  }
  .cal-scroll-x::-webkit-scrollbar,
  .rv-scroll::-webkit-scrollbar,
  .tab-content::-webkit-scrollbar,
  .right-panel::-webkit-scrollbar {
    width: 5px; height: 5px;
  }

  /* 选中态优化 */
  ::selection {
    background: color-mix(in srgb, var(--brand) 30%, transparent);
    color: var(--text);
  }

  /* 焦点环优化 */
  button:focus-visible,
  select:focus-visible,
  input:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent);
    outline-offset: 1px;
  }

  /* 工具栏按钮 hover：渐变外观统一在「2.1 按钮统一」区处理 */
  .tab-btn:hover:not(.active) {
    background: color-mix(in srgb, var(--brand) 6%, transparent);
    border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
  }

  /* 面板分隔条更精致 */
  .v-resizer {
    transition: background 0.2s ease;
  }
  .v-resizer::before {
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .v-resizer:hover::before {
    transform: scaleY(1.2);
  }

  /* 模态框更有层次 */
  .modal-box {
    box-shadow: 0 12px 48px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  }
  [data-mood="dark"] .modal-box {
    box-shadow: 0 12px 48px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
  }

  /* 事件块过渡动画（唯一定义处：时长随「动效时长」设置） */
  .evt {
    transition: left var(--anim-hover, 0.3s) ease, opacity var(--anim-hover, 0.3s) ease, box-shadow var(--anim-hover, 0.3s) ease, transform var(--anim-hover, 0.3s) ease, background var(--anim-hover, 0.3s) ease;
  }

  /* 状态条更融合 */
  .status-bar {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  /* 设置行hover反馈 */
  .setting-row:hover {
    color: var(--brand);
  }
  .setting-row:hover .setting-val {
    font-weight: 600;
  }

  /* 迷你日历更精致（border-radius 唯一定义处） */
  .mini-cal-cell {
    transition: all 0.15s ease;
    border-radius: 4px;
  }
  .mini-cal-cell:hover:not(.selected):not(.in-focus) {
    background: color-mix(in srgb, var(--brand) 10%, transparent);
  }

  /* 主题方向快捷切换按钮栏 */
  .mood-switcher {
    display: flex;
    gap: 4px;
    padding: 8px 14px 4px;
    border-bottom: 1px solid var(--border-light);
  }
  .mood-btn {
    flex: 1;
    padding: 5px 8px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    font-family: inherit;
  }
  .mood-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 6%, transparent);
  }
  .mood-btn .mood-icon {
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
  }

  /* 配置分组标签 */
  .config-group-label {
    font-size: 10px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 14px 4px;
  }

  /* ============================================================
   * v6-49 UI 调优：底层流动色 / 按钮按压 / 树形菜单动画 / 数字雨 / 手绘歪扭
   * ============================================================ */

  /* ---------- 1.2 底层流动色（光斑随主题配色自动派生） ---------- */
  .ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .ambient .a-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(58px);
    -webkit-filter: blur(58px);
    will-change: transform, opacity;
    opacity: .6;
  }
  :root {
    --blob-a: color-mix(in srgb, var(--brand) 58%, var(--bg));
    --blob-b: color-mix(in srgb, var(--cat-growth) 52%, var(--bg));
    --blob-c: color-mix(in srgb, var(--cat-social) 50%, var(--bg));
    --blob-d: color-mix(in srgb, var(--warning) 45%, var(--bg));
  }
  @keyframes adrift1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(5vw,3vh)} }
  @keyframes adrift2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-4vw,5vh)} }
  @keyframes adrift3 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(4vw,-4vh)} }
  @keyframes adrift4 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-5vw,-3vh)} }
  /* 手绘保持纸感；黑客帝国用数字雨替代光斑 */
  [data-mood="hand"] .ambient,
  [data-mood="dark"][data-palette="matrix"] .ambient {
    display: none;
  }

  /* ---------- 3.2 黑客帝国数字雨 ---------- */
  .matrix-rain {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: none;
    pointer-events: none;
  }
  [data-mood="dark"][data-palette="matrix"] .matrix-rain {
    display: block;
  }

  /* ---------- 1.1b 三个视图面板统一 60% 透明（底层流动色透过面板可见） ---------- */
  .tm-view .view-label, .pm-view .view-label, .rv-view .view-label {
    background: color-mix(in srgb, var(--surface-muted) 40%, transparent);
  }
  .tm-view .first-col,
  .tm-view .tm-day-col,
  .rv-view .rv-head,
  .rv-view .rv-day-head,
  .rv-view .rv-day-col {
    background: color-mix(in srgb, var(--surface) 30%, transparent);
  }
  /* 时间刻度列：比其余面板更不透明 */
  .tm-view .tm-ruler,
  .tm-view .head-row,
  .tm-view .head-row .first-col {
    background: color-mix(in srgb, var(--surface) 50%, transparent);
  }
  .rv-view .rv-day-col.today {
    background: color-mix(in srgb, var(--brand) 10%, color-mix(in srgb, var(--surface) 40%, transparent));
  }

  /* ---------- 2.1 按钮统一（index「打开应用」风格：渐变 + 阴影，按压响应） ---------- */
  :root {
    --btn-grad: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #7fb0ff));
    --btn-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 40%, transparent);
    --btn-shadow-press: 0 4px 12px color-mix(in srgb, var(--brand) 26%, transparent);
    --btn-on: var(--brand-on);
  }
  [data-palette="default"] {
    --btn-grad: linear-gradient(135deg, #007aff, #4a9bff);
    --btn-shadow: 0 10px 26px rgba(0,122,255,0.35);
    --btn-shadow-press: 0 4px 12px rgba(0,122,255,0.22);
    --btn-on: #ffffff;
  }
  .tab-btn.active, .toolbar-btn, .btn-ghost, .btn-ghost.brand, .modal-btn:not(.danger),
  .mood-btn.active, .mini-cal-nav-btn, .zoom-chip, .pts-mini-btn {
    background: var(--btn-grad);
    color: var(--btn-on, var(--brand-on));
    border: 1px solid transparent;
  }
  /* 阴影：仅选中态或 hover 态才显示（与未选中按钮保持一致） */
  .tab-btn:hover, .toolbar-btn:hover, .btn-ghost:hover, .modal-btn:hover,
  .mood-btn:hover, .mini-cal-nav-btn:hover, .zoom-chip:hover, .pts-mini-btn:hover,
  .import-option:hover, .apply-mode-opt:hover,
  .tab-btn.active, .mood-btn.active {
    box-shadow: var(--btn-shadow);
  }
  /* 搜索框：默认无阴影，聚焦时才显示 */
  .toolbar-search, #archiveSearch { box-shadow: none; }
  .toolbar-search:focus, #archiveSearch:focus { box-shadow: var(--btn-shadow); }
  .tab-btn, .toolbar-btn, .btn-ghost, .modal-btn, .mood-btn,
  .mini-cal-nav-btn, .import-option, .apply-mode-opt, .pts-mini-btn {
    transition: transform var(--anim-hover, .2s) ease, filter var(--anim-hover, .2s) ease,
      box-shadow var(--anim-hover, .2s) ease, background-color var(--anim-hover, .2s) ease,
      color var(--anim-hover, .2s) ease, border-color var(--anim-hover, .2s) ease,
      opacity var(--anim-hover, .2s) ease, background var(--anim-hover, .2s) ease;
  }
  .tab-btn:active, .toolbar-btn:active, .btn-ghost:active, .modal-btn:active,
  .mood-btn:active, .mini-cal-nav-btn:active, .import-option:active, .apply-mode-opt:active,
  .zoom-chip:active, .pts-mini-btn:active {
    transform: translateY(1px) scale(.97);
    filter: brightness(.93);
    box-shadow: var(--btn-shadow-press);
  }
  /* hover 保持渐变外观，避免被旧的 hover 规则覆盖 */
  .toolbar-btn:hover, .zoom-chip:hover, .mini-cal-nav-btn:hover {
    background: var(--btn-grad);
    color: var(--btn-on, var(--brand-on));
    border-color: transparent;
    filter: brightness(1.06);
  }
  .setting-row, .right-group-title, .mini-cal-cell, .checkin-mark, .tpl-item, .proj-card {
    transition: filter var(--anim-hover, .2s) ease, box-shadow var(--anim-hover, .2s) ease,
      background-color var(--anim-hover, .2s) ease, color var(--anim-hover, .2s) ease,
      transform var(--anim-hover, .2s) ease;
  }
  .setting-row:active, .right-group-title:active, .mini-cal-cell:active,
  .checkin-mark:active, .tpl-item:active, .proj-card:active {
    filter: brightness(.94);
    transform: translateY(1px);
  }

  /* ---------- 2.2 树形菜单折叠动画容器（overflow 由 JS 在动画期间临时控制） ---------- */

  /* ---------- 1.3 手绘线条歪扭增强 ---------- */
  [data-stroke="hand"] .evt {
    transform: rotate(var(--evt-tilt, 0deg));
  }
  [data-stroke="hand"] .evt:nth-child(odd)  { --evt-tilt: -0.35deg; }
  [data-stroke="hand"] .evt:nth-child(even) { --evt-tilt: 0.3deg; }
  [data-stroke="hand"] .gantt-bar:nth-child(odd)  { transform: rotate(-0.25deg); }
  [data-stroke="hand"] .gantt-bar:nth-child(even) { transform: rotate(0.2deg); }
  [data-stroke="hand"] .view-block {
    border-radius: 8px 6px 9px 5px;
  }

  @media (prefers-reduced-motion: reduce) {
    .ambient .a-blob { animation: none !important; }
  }

  /* ---------- 4-1 描述性文字三级体系：大标题重+粗 / 小标题重 / 正文淡 ---------- */
  .bw-name { color: var(--text-light); font-weight: 400; }

  /* ---------- 1.3c 手绘：真正的"线不直"（SVG 手绘边框 + 虚线分隔） ---------- */
  [data-stroke="hand"] .left-panel,
  [data-stroke="hand"] .right-panel,
  [data-stroke="hand"] .cal-toolbar,
  [data-stroke="hand"] .modal-box {
    border: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120' preserveAspectRatio='none'><path d='M7,9 C18,6 52,7 90,7 C128,7 170,6 192,9 C197,10 199,14 199,22 C199,50 198,82 199,100 C200,110 197,114 191,115 C160,117 90,117 40,116 C16,115 5,112 4,104 C3,80 4,50 3,28 C2,16 4,10 7,9 Z' fill='none' stroke='%23c8b888' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  [data-stroke="hand"] .head-row {
    border-bottom-style: dashed !important;
  }
  [data-stroke="hand"] .tm-ruler,
  [data-stroke="hand"] .rv-day-col {
    border-right-style: dashed !important;
  }
  [data-stroke="hand"] .view-label {
    border-bottom: 1.5px dashed var(--border);
  }

  /* ---------- 1.3d 手绘：所有控件字体跟随手绘字体 ---------- */
  [data-mood="hand"] button,
  [data-mood="hand"] input,
  [data-mood="hand"] select,
  [data-mood="hand"] textarea {
    font-family: var(--font-hand);
  }
