:root {
  --bg: #f6f5f2; --card: #fff; --ink: #1f1f1d; --mute: #8a877f; --line: #e7e4dd;
  --accent: #4f7cff; --urgent: #e5484d; --main: #4f7cff; --later: #a8a59c; --warn-bg: #fff4e0; --warn: #a15c00;
  --r: 14px; --nav-h: 60px; color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --card: #222220; --ink: #ecebe6; --mute: #8f8c84; --line: #34332f; --warn-bg: #3a2a10; --warn: #f0b45a; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h2 { font-size: 13px; color: var(--mute); font-weight: 600; margin: 18px 4px 8px; letter-spacing: .04em; }
[hidden] { display: none !important; }

/* 登录 */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 320px; display: grid; gap: 10px; }
.login h1 { text-align: center; font-size: 22px; }
input, select, textarea { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 11px 16px; cursor: pointer; }
button.ghost { background: transparent; color: var(--mute); border: 1px solid var(--line); }
button.danger { background: transparent; color: var(--urgent); border: 1px solid var(--line); }
.err { color: var(--urgent); min-height: 1em; text-align: center; }

/* 外壳：手机底部 Tab，电脑左侧导航 */
.shell main { padding: 12px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); max-width: 1280px; margin: 0 auto; }
.nav { position: fixed; z-index: 10; bottom: 0; left: 0; right: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line); display: flex; }
.nav .brand { display: none; }
.nav button { flex: 1; background: none; color: var(--mute); border-radius: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; }
.nav button span { font-size: 18px; }
.nav button.on { color: var(--accent); }

@media (min-width: 900px) {
  .nav { top: 0; right: auto; width: 180px; height: auto; flex-direction: column; border-top: 0; border-right: 1px solid var(--line); padding: 20px 10px; gap: 4px; }
  .nav .brand { display: block; font-weight: 700; padding: 0 10px 16px; }
  .nav button { flex: none; flex-direction: row; gap: 10px; font-size: 15px; padding: 10px; border-radius: 10px; }
  .nav button.on { background: var(--bg); }
  .shell main { margin-left: 180px; padding: 24px 32px; }
}

/* 一句话输入 */
.quick { display: flex; gap: 8px; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0; }
.quick input { flex: 1; min-width: 0; font-size: 16px; } /* 16px 防 iOS 聚焦放大 */
.hint { color: var(--mute); font-size: 13px; margin: 2px 4px; min-height: 1.2em; }
.warn { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-top: 8px; }

/* 今天：手机单列（项目卡片在最前），电脑三栏 */
.today-grid { display: flex; flex-direction: column; }
.today-grid .col-main { order: -1; }
@media (min-width: 1100px) {
  .today-grid { display: grid; grid-template-columns: 260px 1fr 280px; gap: 24px; }
  .today-grid .col-main { order: 0; }
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 10px; cursor: pointer; border-left: 4px solid var(--c, var(--accent)); }
.card.stale { opacity: .6; }
.card-top { display: flex; align-items: center; gap: 8px; }
.card-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--mute); white-space: nowrap; }
.pill.urgent { background: var(--urgent); color: #fff; }
.pill.due { color: var(--urgent); }
.next { margin: 8px 0 6px; font-size: 15px; }
.next::before { content: "→ "; color: var(--accent); }
.next.empty { color: var(--mute); }
.stages { display: flex; gap: 3px; margin-top: 8px; }
.stages i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.stages i.done { background: var(--c, var(--accent)); opacity: .45; }
.stages i.cur { background: var(--c, var(--accent)); }
.meta { font-size: 12px; color: var(--mute); margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.child { margin-left: 16px; }

.alert { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.alert .when { font-size: 12px; color: var(--mute); white-space: nowrap; min-width: 52px; }
.alert .when.over { color: var(--urgent); font-weight: 600; }
.alert .txt { flex: 1; min-width: 0; }
.alert .chk { background: none; color: var(--mute); border: 1px solid var(--line); padding: 2px 8px; font-size: 12px; }
.flag::before { content: "⚑ "; color: var(--urgent); }
.empty-note { color: var(--mute); font-size: 13px; padding: 4px; }

.tl { position: relative; border-left: 2px solid var(--line); margin-left: 44px; padding-left: 12px; }
.tl-item { position: relative; margin-bottom: 10px; background: var(--card); border-radius: 10px; padding: 8px 10px; border-left: 3px solid var(--c, var(--accent)); }
.tl-item .t { position: absolute; left: -64px; width: 44px; text-align: right; font-size: 12px; color: var(--mute); top: 9px; }
.tl-item small { color: var(--mute); display: block; }

/* 抽屉：手机全屏，电脑右侧面板 */
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer-bg { position: absolute; inset: 0; background: rgba(0,0,0,.3); }
.drawer-panel { position: absolute; inset: 0; background: var(--bg); overflow-y: auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); overflow-x: hidden; }
@media (min-width: 900px) { .drawer-panel { left: auto; width: 480px; box-shadow: -8px 0 30px rgba(0,0,0,.15); padding: 24px; } }
.drawer-head { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.drawer-head input { font-weight: 700; font-size: 18px; flex: 1; min-width: 0; }
.drawer-head button { white-space: nowrap; flex: none; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field > span { font-size: 12px; color: var(--mute); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1 1 130px; min-width: 0; }
.stage-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.stage-row input[type=radio] { width: auto; }
.stage-row input[type=text] { flex: 1; }
.stage-row input[type=text] { min-width: 0; }
.stage-row input[type=date] { width: 128px; flex: none; padding: 10px 6px; }
.stage-row button { padding: 6px 10px; }
.log-item { border-top: 1px solid var(--line); padding: 8px 0; font-size: 14px; }
.log-item small { color: var(--mute); }
input[type=color] { padding: 2px; height: 42px; }

/* 甘特：横向滚动，项目名列 sticky 固定在左边 */
.gantt-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 4px 0 12px; font-size: 13px; color: var(--mute); }
.gantt-toggle { display: flex; align-items: center; gap: 6px; }
.gantt-toggle input { width: auto; }
.gantt-legend { display: flex; align-items: center; gap: 6px; }
.gantt-legend i { display: inline-block; }
.lg-ms { width: 9px; height: 9px; transform: rotate(45deg); background: var(--accent); border-radius: 1px; }
.lg-task { width: 18px; height: 8px; border-radius: 3px; background: var(--accent); opacity: .6; }
.lg-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.lg-link { width: 10px; height: 10px; border-left: 2px solid var(--mute); border-bottom: 2px solid var(--mute); }
.gantt { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.g-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.g-inner { position: relative; }
.g-head { position: relative; height: 56px; border-bottom: 1px solid var(--line); }
.g-corner { position: sticky; left: 0; z-index: 6; height: 56px; background: var(--card); border-right: 1px solid var(--line); }
.g-month { position: absolute; top: 4px; font-size: 11px; font-weight: 600; color: var(--ink); padding-left: 4px; }
.g-day { position: absolute; top: 36px; text-align: center; font-size: 11px; color: var(--mute); }
.g-day.we { opacity: .6; }
.g-day.today { color: #fff; background: var(--urgent); border-radius: 6px; }
.g-body { position: relative; }
.g-we { position: absolute; top: 0; bottom: 0; background: var(--bg); opacity: .6; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--urgent); opacity: .5; z-index: 1; }
.g-links { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 2; }
.g-row { position: absolute; left: 0; right: 0; border-bottom: 1px solid var(--line); }
.g-name { position: sticky; left: 0; z-index: 6; height: 100%; display: flex; align-items: center; padding: 0 10px; background: var(--card);
  border-right: 1px solid var(--line); border-left: 4px solid var(--c); font-size: 13px; font-weight: 600; cursor: pointer;
  overflow: hidden; white-space: nowrap; }
.g-name.g-child { font-weight: 400; padding-left: 16px; }

.g-flag { position: absolute; top: 1px; font-size: 11px; color: var(--urgent); z-index: 3; }
.g-dot { position: absolute; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .7; z-index: 2; }

/* 阶段块 + 子任务（手机上日期换到第二行） */
.stage-block { border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 8px; background: var(--card); }
.stage-block .stage-row { margin-bottom: 4px; }
.task-list { margin-left: 22px; }
.task-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 0; border-top: 1px dashed var(--line); }
.task-row .t-done { width: auto; }
.task-row .t-name { flex: 1 1 120px; min-width: 0; padding: 7px 9px; }
.t-dates { display: flex; gap: 4px; align-items: center; color: var(--mute); }
.t-dates input { width: 118px; padding: 7px 4px; font-size: 13px; }
.task-row button { padding: 4px 9px; }
button.link { background: none; color: var(--accent); padding: 4px 0 0 22px; font-size: 13px; }
@media (max-width: 500px) { .t-dates { flex: 1 0 100%; padding-left: 22px; order: 5; } .t-dates input { flex: 1; width: auto; } }

/* 甘特子任务行 */
.g-fold { width: 18px; flex: none; color: var(--mute); font-size: 11px; cursor: pointer; display: inline-flex; align-items: center; }
.g-fold em { font-style: normal; font-size: 9px; margin-left: 1px; }

.g-task { border-bottom: 1px dashed var(--line); }
.g-name.g-tname { font-weight: 400; font-size: 12px; padding-left: 28px; color: var(--ink); display: flex; gap: 6px; }
.g-tname small { color: var(--mute); font-size: 10px; font-weight: 500; flex: none; width: var(--stw, 0px); white-space: nowrap; overflow: hidden; }
.g-tbar { position: absolute; top: 8px; height: 14px; border-radius: 4px; z-index: 2; overflow: hidden; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 35%, transparent); border-left: 3px solid var(--c); font-size: 10px; line-height: 14px; padding: 0 4px; color: var(--ink); }
.g-tbar span { overflow: hidden; text-overflow: ellipsis; display: block; }


/* 项目行：进度细线 + 里程碑菱形 */
.g-track { position: absolute; top: 22px; height: 3px; border-radius: 2px; background: var(--line); z-index: 1; }
.g-track.done { background: var(--c); opacity: .7; }
.g-ms { position: absolute; top: 16px; z-index: 3; display: flex; align-items: center; gap: 4px; transform: translateX(-7px); white-space: nowrap; }
.g-ms i { width: 11px; height: 11px; transform: rotate(45deg); border-radius: 2px; background: var(--card); border: 2px solid var(--c); flex: none; }
.g-ms.done i { background: var(--c); }
.g-ms.est i { border-style: dashed; }
.g-ms.late i { border-color: var(--urgent); }
.g-ms.late:not(.done) i { background: var(--urgent); }
.g-ms b { font-size: 10px; font-weight: 500; color: var(--mute); background: var(--card); padding: 0 2px; border-radius: 3px; margin-top: -16px; }
.g-ms.late b { color: var(--urgent); }

/* 子任务台阶 */
.g-tbar.cur { background: var(--c); color: #fff; }
.g-tbar.done { opacity: .45; text-decoration: line-through; }
.g-tbar.todo { background: transparent; border: 1.5px dashed var(--c); border-left-width: 3px; border-left-style: solid; color: var(--mute); line-height: 11px; }
.g-tbar.late { box-shadow: inset 0 0 0 1.5px var(--urgent); }
.g-tbar.todo.late { border-color: var(--urgent); }
.g-step { fill: none; stroke-width: 1.2; opacity: .55; }
.g-msline { stroke-width: 1; stroke-dasharray: 2 3; opacity: .5; }
.g-msline.late { stroke: var(--urgent) !important; opacity: .7; }
.g-branch { fill: none; stroke-width: 1.5; stroke-dasharray: 3 2; }

/* 详情页：里程碑勾选 + 子任务天数 */
.s-done-wrap { display: flex; align-items: center; gap: 2px; color: var(--accent); font-size: 13px; flex: none; }
.s-done-wrap input { width: auto; }
.s-done-wrap input:disabled + span { opacity: .6; }
.t-days-wrap { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--mute); }
.t-dates .t-days { width: 46px; padding: 7px 4px; text-align: center; }
@media (max-width: 500px) { .t-dates .t-days { flex: none; width: 46px; } .t-days-wrap { flex: none; } }

/* 详情页：开始 / 结束 / 计划天数 */
.dur-row .dur-days { flex: 0 0 90px; }
#pDurNote { margin: -6px 4px 12px; }
.pill.st-blocked { background: #f5a524; color: #3a2400; }
.pill.st-todo { border: 1px solid var(--line); }
.pill.st-done { background: #30a46c; color: #fff; }
.late-txt { color: var(--urgent); }

/* 甘特左侧可编辑表格：名称列始终固定；宽屏(.pin-cols)四列也固定，手机上四列跟着横滑 */
.g-row, .g-head { display: flex; }
.g-corner { display: flex; align-items: flex-end; padding: 0 10px 6px; font-size: 11px; color: var(--mute); flex: none; }
.g-cols { flex: none; display: grid; grid-template-columns: 64px 50px 50px 42px; gap: 4px; align-items: center; padding: 0 8px;
  background: var(--card); border-right: 1px solid var(--line); z-index: 5; height: 100%; }
.pin-cols .g-cols { position: sticky; }
.g-colhead { font-size: 11px; color: var(--mute); align-items: end; padding-bottom: 6px; }
.g-task .g-cols { background: color-mix(in srgb, var(--card) 96%, var(--c)); }
.g-name { gap: 4px; }
.g-in { border: 1px solid transparent; background: transparent; padding: 4px 5px; border-radius: 6px; min-width: 0; flex: 1; font: inherit; color: inherit; }
.g-in:hover { border-color: var(--line); }
.g-in:focus { border-color: var(--accent); background: var(--bg); outline: none; }
.g-pin { font-weight: 600; }
.g-tname .g-in { font-size: 12px; padding: 3px 5px; }
.g-branchmark { color: var(--mute); flex: none; }
.g-open { background: none; color: var(--mute); padding: 2px 6px; font-size: 16px; flex: none; border-radius: 6px; }
.g-open:hover { background: var(--bg); color: var(--ink); }
.g-sel { font-size: 11px; padding: 4px 2px; border-radius: 6px; width: 100%; }
.g-sel.st-active { color: var(--accent); }
.g-sel.st-blocked { color: #d48806; border-color: #f5a524; }
.g-sel.st-done { color: #30a46c; }
.g-sel.st-todo { color: var(--mute); }
.g-date { position: relative; font-size: 12px; text-align: center; padding: 4px 0; border-radius: 6px; cursor: pointer; border: 1px solid transparent; }
.g-date:hover { border-color: var(--line); }
.g-date.empty span, .g-date.muted span { color: var(--mute); }
.g-date.late span { color: var(--urgent); font-weight: 600; }
.g-date input { position: absolute; inset: 0; opacity: 0; width: 100%; padding: 0; cursor: pointer; }
.g-num { font-size: 12px; padding: 4px 2px; text-align: center; border-radius: 6px; width: 100%; -moz-appearance: textfield; }
.g-num::-webkit-inner-spin-button { display: none; }
.g-chk { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--mute); cursor: pointer; }
.g-chk input { width: auto; margin: 0; }
.g-chk.cur { color: var(--accent); }
.g-chk.done { color: #30a46c; }
@media (max-width: 700px) {
  .g-name { padding: 0 4px 0 6px; gap: 2px; }
  .g-name.g-child { padding-left: 8px; }
  .g-name.g-tname { padding-left: 14px; }
  .g-fold { width: 12px; }
  .g-open { padding: 2px 3px; }
  .g-in { padding: 4px 3px; }
}

/* 甘特顶部日程行 */
.g-lane { position: relative; display: flex; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--card) 94%, var(--accent)); cursor: pointer; }
.g-lanename { font-size: 12px; color: var(--mute); font-weight: 600; gap: 6px; cursor: default; }
.g-lanecols { position: relative; }
.g-add { background: none; color: var(--accent); padding: 0 6px; font-size: 16px; line-height: 1; }
.g-lanetoday { position: absolute; top: 0; bottom: 0; background: var(--urgent); opacity: .08; }
.g-ev { position: absolute; height: 17px; line-height: 17px; padding: 0 6px; border-radius: 5px; font-size: 11px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); z-index: 2; color: var(--ink); }
.g-ev b { font-weight: 600; color: var(--accent); }
.g-ev.is-today { border-left-color: var(--urgent); }
.g-ev.past { opacity: .45; }
.g-ev.done { text-decoration: line-through; opacity: .45; }
.g-more { position: absolute; font-size: 10px; color: var(--accent); font-weight: 600; z-index: 2; }
.g-head .g-day, .g-head .g-month { cursor: pointer; }
.g-head .g-day:hover { color: var(--ink); background: var(--bg); border-radius: 6px; }

/* 缩放 */
.gantt-tools { display: flex; align-items: center; gap: 14px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button { background: none; color: var(--mute); padding: 3px 10px; border-radius: 6px; font-size: 12px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.15); }

/* 当天卡片：手机底部弹出，电脑居中 */
.daycard { position: fixed; inset: 0; z-index: 30; }
.day-bg { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.day-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 80dvh; overflow-y: auto; background: var(--bg);
  border-radius: 16px 16px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .day-panel { left: 50%; right: auto; bottom: auto; top: 12vh; width: 440px; transform: translateX(-50%); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); } }
.day-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.day-head b { font-size: 17px; }
.day-head .hint { flex: 1; margin: 0; }
.day-ev, .day-add { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.day-ev .d-text, .day-add .d-text { flex: 1; min-width: 0; }
.d-time { width: 96px; flex: none; padding: 9px 6px; }
.day-ev.done .d-text { text-decoration: line-through; color: var(--mute); }
.day-add { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.day-ms { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--urgent)); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; font-size: 14px; }
.day-ms small { color: var(--mute); margin-left: 6px; }

/* ================= 整体打磨（电脑端） ================= */
.shell main { max-width: 1440px; }
@media (min-width: 900px) { .shell main { padding: 20px 28px 40px; } }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 4px 2px 6px; color: var(--mute); font-size: 13px; }
.page-head b { font-size: 20px; color: var(--ink); margin-right: 4px; }
.st-blocked-txt { color: #d48806; }

/* 卡片：更紧凑 */
.card { padding: 12px 14px; margin-bottom: 10px; }
.card .next { margin: 6px 0 4px; }
.card .stages { margin-top: 6px; }
.card .stages i { height: 4px; }
.card .meta { margin-top: 6px; }
.card:hover { border-color: color-mix(in srgb, var(--c) 50%, var(--line)); }
.card.child { margin-left: 0; }
.children { margin: 10px -4px -4px; border-top: 1px solid var(--line); padding-top: 4px; }
.child-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.child-row:hover { background: var(--bg); }
.child-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.child-row b { font-weight: 600; white-space: nowrap; }
.child-row .child-next { color: var(--mute); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.child-row .child-next::before { content: "→ "; color: var(--c); }
.child-row .child-next.empty::before { content: ""; }

/* 项目页：电脑上多列卡片网格 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; align-items: start; }
.card-grid .card { margin-bottom: 0; }

/* 今天页三栏：中间项目卡片在大屏也排两列 */
@media (min-width: 1100px) {
  .today-grid { grid-template-columns: 280px minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
  .today-grid .col { min-width: 0; }
}
@media (min-width: 1500px) {
  #cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; align-items: start; }
  #cards .card { margin-bottom: 0; }
}

/* 日程/提醒按天分组 */
.al-group { margin-bottom: 10px; }
.al-day { font-size: 12px; font-weight: 600; color: var(--mute); margin: 0 4px 4px; cursor: pointer; }
.al-day:hover { color: var(--ink); }
.al-day.is-today { color: var(--accent); }
.al-day.over { color: var(--urgent); }
.al-group .alert { margin-bottom: 4px; padding: 8px 10px; align-items: center; }
.al-group .alert .when { min-width: 40px; font-variant-numeric: tabular-nums; }
.al-group .alert .when:empty { min-width: 0; display: none; }

/* 时间线列 */
.tl { margin-left: 46px; }

/* 甘特：外框占满，少留空 */
.gantt-bar { margin: 0 0 10px; }
.g-cols { box-sizing: border-box; overflow: hidden; }
.g-sel, .g-num { min-width: 0; }
.day-ev .chk { background: none; color: var(--mute); border: 1px solid var(--line); padding: 6px 10px; font-size: 13px; flex: none; }
.day-ev .chk:hover { color: var(--ink); border-color: var(--mute); }
.d-time { width: 124px; }
.alert .chk, .al-group .chk { background: none; color: var(--mute); border: 1px solid var(--line); padding: 2px 8px; font-size: 12px; }
.no-cols .g-cols { display: none; }
@media (max-width: 700px) { .g-name.g-tname { padding-left: 12px; } .g-tname small { display: none; } }

/* ================= 日历（月历） ================= */
.cal-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav b { font-size: 20px; min-width: 120px; text-align: center; }
.cal-nav button { padding: 4px 12px; font-size: 18px; }
.cal-tools { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--mute); }
.cal-tools button { padding: 5px 12px; font-size: 13px; }
.calendar { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.cal-week span { padding: 8px 10px; font-size: 12px; color: var(--mute); font-weight: 600; }
.cal-week span.we { color: color-mix(in srgb, var(--mute) 70%, transparent); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 6px 8px; min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: color-mix(in srgb, var(--card) 92%, var(--accent)); }
.cal-cell.we { background: color-mix(in srgb, var(--card) 85%, var(--bg)); }
.cal-cell.other { opacity: .4; }
.cal-num { font-size: 13px; font-weight: 600; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; margin-bottom: 1px; }
.cal-cell.today .cal-num { background: var(--urgent); color: #fff; }
.cal-cell.past:not(.today) .cal-num { color: var(--mute); }
.cal-it { font-size: 12px; line-height: 18px; padding: 0 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--c) 16%, transparent); border-left: 3px solid var(--c); }
.cal-it b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-it.ms, .cal-it.dl { background: transparent; border-left: 0; padding-left: 2px; color: var(--c); font-weight: 500; }
.cal-it.dl { color: var(--urgent); }
.cal-it.est { opacity: .65; font-style: italic; }
.cal-it.late { color: var(--urgent); }
.cal-it.done { text-decoration: line-through; opacity: .5; }
.cal-cell.past .cal-it.ev { opacity: .55; }
.cal-more { font-size: 11px; color: var(--mute); padding-left: 4px; }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; padding-left: 3px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.cal-dots i.ms { border-radius: 1px; transform: rotate(45deg); }
.cal-dots i.dl { background: var(--urgent); }
.cal-dots em { font-size: 10px; color: var(--mute); font-style: normal; }
@media (max-width: 700px) {
  .cal-cell { padding: 4px 2px; align-items: center; }
  .cal-num { font-size: 12px; width: 22px; height: 22px; line-height: 22px; }
  .cal-week span { padding: 6px 0; text-align: center; }
  .cal-nav b { font-size: 17px; min-width: 96px; }
}
/* 底部导航 4 个按钮 */
.cal-agenda { margin-top: 16px; }
.cal-agenda .al-group { cursor: pointer; }
.cal-agenda .al-group.past { opacity: .5; }
.cal-agenda .alert { border-left: 3px solid var(--c); }
.cal-agenda .alert .when { color: var(--c); font-weight: 600; }
.cal-agenda .txt.done { text-decoration: line-through; color: var(--mute); }
.cal-agenda small { color: var(--mute); }

/* ================= 甘特：星期行 / 项目染色 / 铺满 / 表头固定 ================= */
.g-wk { position: absolute; top: 21px; text-align: center; font-size: 10px; color: var(--mute); letter-spacing: .02em; }
.g-wk.we { color: color-mix(in srgb, var(--urgent) 60%, var(--mute)); }
.g-day.today { top: 35px; }

/* 同一个项目（项目行 + 它的子任务行）一块淡色底，上下边线用项目色 */
.g-row { background: color-mix(in srgb, var(--c) 6%, transparent); }
.g-row.blk-top { border-top: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent); }
.g-row.blk-end { border-bottom: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent); }
.g-row .g-name, .g-row .g-cols { background: color-mix(in srgb, var(--c) 9%, var(--card)); }
.g-task .g-cols { background: color-mix(in srgb, var(--c) 9%, var(--card)); }

/* 甘特页铺满窗口宽度；高度也填满，表头和日程行固定在上面 */
body[data-tab="gantt"] .shell main { max-width: none; }
.g-scroll { overflow: auto; max-height: calc(100dvh - 120px); overscroll-behavior: contain; }
@media (max-width: 899px) { .g-scroll { max-height: calc(100dvh - 210px - env(safe-area-inset-bottom)); } }
.g-head { position: sticky; top: 0; z-index: 9; background: var(--card); }
.g-lane { position: sticky; top: 56px; z-index: 8; background: color-mix(in srgb, var(--card) 94%, var(--accent)); }
.g-lane .g-name, .g-lane .g-cols { background: color-mix(in srgb, var(--card) 94%, var(--accent)); }

/* 日宽拉条 */
.zoom-slider { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mute); }
.zoom-slider input { width: 140px; padding: 0; accent-color: var(--accent); background: none; border: 0; }
.g-month { overflow: visible; padding-left: 0; border-left: 1px solid var(--line); height: 18px; top: 2px !important; }
.g-month b { position: sticky; display: inline-block; padding: 0 6px; font-size: 11px; font-weight: 600; white-space: nowrap; }

/* 拖动排序 */
.drag { cursor: grab; color: var(--mute); font-size: 13px; letter-spacing: -3px; padding: 6px 6px 6px 2px; user-select: none; touch-action: none; flex: none; line-height: 1; }
.drag:hover { color: var(--ink); }
.dragging { opacity: .55; outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 10px; }
.dragging .drag { cursor: grabbing; }
.task-list { min-height: 6px; }

/* 详情抽屉：电脑上加宽，子任务一行排完 */
@media (min-width: 900px) {
  .drawer-panel { width: 600px; }
  .task-row { flex-wrap: nowrap; }
  .task-row .t-name { flex: 1 1 auto; }
  .t-dates { flex: none; }
}
.gantt-tools { flex-wrap: wrap; gap: 8px 14px; }
.zoom-slider, .gantt-toggle { white-space: nowrap; }
@media (max-width: 700px) { .zoom-slider input { width: 96px; } .gantt-legend { font-size: 12px; } }
.drag { -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
body.is-sorting, body.is-sorting * { user-select: none !important; -webkit-user-select: none !important; cursor: grabbing !important; }

/* 甘特：鼠标经过的那一行轻轻调亮（色块上再叠一层半透明白/黑） */
:root { --row-hover: rgba(0, 0, 0, .035); }
@media (prefers-color-scheme: dark) { :root { --row-hover: rgba(255, 255, 255, .06); } }
.g-row:hover, .g-row:hover .g-name, .g-row:hover .g-cols { background-image: linear-gradient(var(--row-hover), var(--row-hover)); }

/* 折叠三角放大，点击区域也大一点 */
.g-fold { width: 22px; height: 22px; font-size: 15px; justify-content: center; border-radius: 6px; color: var(--ink); opacity: .7; }
.g-fold:hover { opacity: 1; background: var(--row-hover); }
.g-fold em { font-size: 10px; }
@media (max-width: 700px) { .g-fold { width: 18px; font-size: 14px; } }

/* 子任务条不写字后变细一点更像时间块 */
.g-tbar { padding: 0; }

/* 颜色：HEX 输入 + 色块 + 色板 */
.hex-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.swatch { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); flex: none; cursor: pointer; overflow: hidden; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; padding: 0; border: 0; }
#pColor { width: 104px; flex: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .03em; }
#pColor.bad { border-color: var(--urgent); }
.palette { display: flex; gap: 6px; flex-wrap: wrap; }
.pal { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.pal:hover { transform: scale(1.12); }
.g-fold svg { width: 11px; height: 11px; transition: transform .15s; pointer-events: none; }
.g-fold.is-folded svg { transform: rotate(-90deg); }
.g-fold em { pointer-events: none; }

/* 日期格清除按钮 */
.g-date { position: relative; }
.g-clr { position: absolute; top: -4px; right: -6px; z-index: 2; width: 16px; height: 16px; padding: 0; border-radius: 50%; font-size: 11px; line-height: 15px;
  background: var(--card); color: var(--mute); border: 1px solid var(--line); display: none; }
.g-date:hover .g-clr { display: block; }
.g-clr:hover { color: var(--urgent); border-color: var(--urgent); }
@media (hover: none) { .g-clr { display: block; } }
/* 只有截止、没有起点的子任务：在截止那天画一个小三角 */
.g-tdue { position: absolute; top: 6px; font-size: 13px; color: var(--c); z-index: 2; }
.g-tdue.late { color: var(--urgent); }
/* 详情页子任务的开始日 */
.t-dates .t-start { width: 118px; padding: 7px 4px; font-size: 13px; }
@media (min-width: 900px) { .drawer-panel { width: 680px; } }
@media (max-width: 500px) { .t-dates .t-start { flex: 1; width: auto; } }

/* ================= 甘特不限高：整页往下滚，表头 + 日程行吸顶 ================= */
.gantt { overflow: clip; }                         /* clip 不会变成滚动容器，吸顶才能跟着页面 */
.g-scroll { max-height: none !important; overflow-x: auto; overflow-y: hidden; overscroll-behavior: auto; }
.g-headwrap { position: sticky; top: 0; z-index: 10; overflow: hidden; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.g-headinner { transform: translateX(calc(-1 * var(--sl))); will-change: transform; }
.g-headinner .g-head, .g-headinner .g-lane { position: relative; top: auto; }
/* 表头里本该固定在左边的格子：反向平移抵消 */
.g-headinner .g-corner, .g-headinner .g-lanename { position: relative; transform: translateX(var(--sl)); }
.pin-cols .g-headinner .g-cols { position: relative; transform: translateX(var(--sl)); }
/* 月份文字：停在可见时间轴的左边，直到这个月滚出去 */
.g-month b { position: static; transform: translateX(clamp(0px, calc(var(--sl) + var(--stk) - var(--ml)), max(0px, calc(var(--mw) - 64px)))); }
/* 表头里的列不再 sticky，要去掉为 sticky 写的 left 偏移，否则会被推到右边 */
.g-headinner .g-cols, .g-headinner .g-corner, .g-headinner .g-lanename { left: auto !important; }

/* ================= 子任务状态 / 暂停中 ================= */
.g-tbar.active { background: var(--c); color: #fff; }
.g-tbar.blocked { background: repeating-linear-gradient(135deg, #f5a524 0 6px, color-mix(in srgb, #f5a524 55%, transparent) 6px 12px); }
.g-sel.st-paused { color: #8a7cff; border-color: color-mix(in srgb, #8a7cff 60%, var(--line)); }
.g-sel:disabled { opacity: 1; cursor: default; appearance: none; -webkit-appearance: none; text-align: center; background-image: none; }
.pill.st-paused { background: color-mix(in srgb, #8a7cff 22%, transparent); color: #8a7cff; }
.t-status { width: 76px; flex: none; padding: 6px 4px; font-size: 12px; border-radius: 8px; }
.t-status.st-active { color: var(--accent); }
.t-status.st-blocked { color: #d48806; }
.t-status.st-done { color: #30a46c; }
.t-status.st-todo { color: var(--mute); }

/* 列高光 + 今天按钮 */
.g-colhl { position: absolute; top: 0; bottom: 0; display: none; pointer-events: none; z-index: 1; background: var(--row-hover); box-shadow: inset 1px 0 0 var(--line), inset -1px 0 0 var(--line); }
.g-headinner { position: relative; }
.g-head .g-day.hl:not(.today) { color: var(--ink); font-weight: 600; background: var(--row-hover); border-radius: 6px; }
.g-todaybtn { padding: 4px 12px; font-size: 12px; }

/* ================= 甘特时间轴点一下的小卡片 ================= */
.gpop { position: fixed; z-index: 25; width: 340px; max-height: 70vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.35); padding: 12px; font-size: 13px; }
@media (max-width: 699px) { .gpop { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; border-radius: 16px 16px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); } }
.gp-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.gp-head b { font-size: 15px; }
.gp-head span { flex: 1; min-width: 0; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-head small { color: var(--mute); margin-left: 4px; font-size: 11px; }
.gp-x { background: none; color: var(--mute); padding: 0 6px; font-size: 18px; line-height: 1; }
.gp-hint { color: var(--mute); font-size: 12px; margin: 2px 0 8px; }
.gp-ms { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 10px; }
.gp-ms.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.gp-put { flex: none; padding: 5px 8px; font-size: 12px; background: var(--bg); color: var(--accent); border: 1px solid var(--line); }
.gp-ms.on .gp-put { background: var(--accent); color: #fff; border-color: var(--accent); }
.gp-name { flex: 1; min-width: 0; padding: 5px 7px; font-size: 13px; }
.gp-date { flex: none; font-size: 11px; color: var(--mute); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.gp-mini { flex: none; padding: 4px 7px; font-size: 11px; background: none; color: var(--mute); border: 1px solid var(--line); }
.gp-mini.danger:hover { color: var(--urgent); border-color: var(--urgent); }
.gp-add { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.gp-add input { flex: 1; min-width: 0; padding: 7px 9px; font-size: 13px; }
.gp-add button { padding: 7px 12px; font-size: 13px; }
.gp-now { margin: 4px 0 10px; color: var(--mute); }
.gp-now b { color: var(--ink); font-variant-numeric: tabular-nums; }
.gp-now small { font-size: 11px; }
.gp-btns { display: flex; gap: 8px; }
.gp-btns button { flex: 1; padding: 9px; }
.gp-btns.small { margin-top: 6px; }
.gp-btns.small button { padding: 5px; font-size: 12px; }
.gp-btns.small:empty { display: none; }
.g-body [data-row] { cursor: pointer; }
.g-body .g-name, .g-body .g-cols { cursor: default; }

/* 名称格里的「今天」按钮 */
.g-corner { justify-content: space-between; gap: 6px; padding-right: 8px; }
.g-corner .g-todaybtn { background: var(--accent); color: #fff; border: 0; padding: 3px 10px; font-size: 11px; border-radius: 999px; line-height: 1.4; cursor: pointer; }
.g-corner .g-todaybtn:hover { filter: brightness(1.1); }

/* ================= 项目分类 ================= */
.pill.cat { background: color-mix(in srgb, var(--cc) 18%, transparent); color: var(--cc); border: 1px solid color-mix(in srgb, var(--cc) 40%, transparent); }
.cat-manager { margin: 4px 0 6px; }
.cat-manager details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.cat-manager summary { cursor: pointer; font-size: 13px; font-weight: 600; display: flex; gap: 10px; align-items: center; list-style: none; }
.cat-manager summary::-webkit-details-marker { display: none; }
.cat-manager summary::before { content: "▸"; color: var(--mute); transition: transform .15s; }
.cat-manager details[open] summary::before { transform: rotate(90deg); }
.hint-inline { color: var(--mute); font-weight: 400; font-size: 12px; }
.hint-inline .dot, .cat-manager .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.cat-list { margin-top: 10px; display: grid; gap: 6px; }
.cat-row { display: flex; align-items: center; gap: 8px; }
.cat-row .cat-name { flex: 0 1 220px; padding: 6px 9px; font-size: 13px; }
.swatch.sm { width: 26px; height: 26px; border-radius: 8px; }
.cat-add { display: flex; gap: 6px; margin-top: 4px; }
.cat-add input { flex: 0 1 300px; padding: 7px 9px; font-size: 13px; }
.cat-add button { padding: 7px 12px; font-size: 13px; }

/* ================= 甘特悬浮筛选按钮 ================= */
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 15; width: 52px; height: 52px; border-radius: 50%; padding: 0; display: none;
  align-items: center; justify-content: center; background: var(--accent); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
body[data-tab="gantt"] .fab { display: flex; }
.fab:hover { filter: brightness(1.1); }
.fab-badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--urgent); color: #fff; font-size: 11px; line-height: 18px; font-weight: 700; }
.gfilter { position: fixed; right: 24px; bottom: 86px; z-index: 16; width: 260px; max-height: 60vh; overflow-y: auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.35); padding: 10px 12px; font-size: 13px; }
@media (max-width: 899px) { .fab { bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); right: 16px; } .gfilter { right: 16px; bottom: calc(var(--nav-h) + 78px + env(safe-area-inset-bottom)); } }
.gf-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.gf-row { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-radius: 8px; cursor: pointer; }
.gf-row:hover { background: var(--row-hover); }
.gf-row input { width: auto; margin: 0; accent-color: var(--accent); }
.gf-row span { flex: 1; }
.gf-row em { font-style: normal; color: var(--mute); font-size: 12px; }
.gf-row.all { border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; margin-bottom: 4px; font-weight: 600; }
.gf-row .dot { width: 9px; height: 9px; border-radius: 50%; }

/* ================= 日历：周 / 日时间轴 ================= */
.cal-tools .seg button { padding: 4px 12px; font-size: 13px; }
.tg { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: clip; }
.tg-head, .tg-allrow { display: grid; grid-template-columns: 52px repeat(var(--cols), minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.tg-gutter { font-size: 11px; color: var(--mute); padding: 6px 6px 0 0; text-align: right; }
.tg-dh { display: flex; flex-direction: column; align-items: center; padding: 6px 0; cursor: pointer; border-left: 1px solid var(--line); }
.tg-dh span { font-size: 11px; color: var(--mute); }
.tg-dh b { font-size: 18px; width: 32px; height: 32px; line-height: 32px; text-align: center; border-radius: 50%; }
.tg-dh.today b { background: var(--urgent); color: #fff; }
.tg-dh.we span { color: color-mix(in srgb, var(--urgent) 60%, var(--mute)); }
.tg-ad { border-left: 1px solid var(--line); padding: 4px 3px; min-height: 30px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; }
.tg-scroll { height: calc(100dvh - 230px); min-height: 360px; overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 899px) { .tg-scroll { height: calc(100dvh - 300px - env(safe-area-inset-bottom)); } }
.tg-body { position: relative; display: grid; grid-template-columns: 52px repeat(var(--cols), minmax(0, 1fr)); }
.tg-hours { position: relative; }
.tg-hours span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 10px; color: var(--mute); font-variant-numeric: tabular-nums; }
.tg-col { position: relative; border-left: 1px solid var(--line); cursor: cell; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 48px), repeating-linear-gradient(to bottom, transparent 0 24px, color-mix(in srgb, var(--line) 45%, transparent) 24px 25px, transparent 25px 48px); }
.tg-col.today { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
.tg-ev { position: absolute; z-index: 2; overflow: hidden; border-radius: 6px; padding: 2px 6px; font-size: 11px; line-height: 1.3; cursor: pointer;
  background: color-mix(in srgb, var(--c) 28%, var(--card)); border-left: 3px solid var(--c); color: var(--ink); }
.tg-ev b { font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 2px; }
.tg-ev small { display: block; color: var(--mute); font-size: 10px; }
.tg-ev.ev { background: color-mix(in srgb, var(--c) 18%, var(--card)); border-left-style: dashed; }
.tg-ev.done { opacity: .5; text-decoration: line-through; }
.tg-ev:hover { filter: brightness(1.12); }
.tg-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; touch-action: none; }
.tg-resize::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: color-mix(in srgb, var(--c) 70%, transparent); opacity: 0; }
.tg-ev:hover .tg-resize::after { opacity: 1; }
.tg-ghost { position: absolute; left: 2px; right: 2px; z-index: 1; border-radius: 6px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); pointer-events: none; }
/* 现在时间：红线横穿整个时间轴，今天那一列上有个红点 */
.tg-now { position: absolute; left: 52px; right: 0; height: 0; border-top: 2px solid var(--urgent); z-index: 3; pointer-events: none; }
.tg-now b { position: absolute; top: -6px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--urgent); }
/* 长按菜单 / 编辑卡片 */
.cm-actions { display: grid; gap: 8px; margin-top: 6px; }
.cm-actions button { padding: 10px; text-align: left; }
.cm-form { display: grid; gap: 8px; margin-top: 6px; }
.cm-form label { display: grid; gap: 4px; font-size: 12px; color: var(--mute); }
.cm-form select, .cm-form input { padding: 8px 9px; font-size: 13px; }
.cm-search { padding: 8px 10px; font-size: 13px; margin: 6px 0 8px; }
.cm-pick { display: grid; gap: 8px; }
.cm-gname { font-size: 12px; font-weight: 600; color: var(--c); margin: 2px 0 4px; }
.cm-task { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--c); margin-bottom: 4px; text-align: left; }
.cm-task:hover { border-color: var(--c); }
.cm-task small { color: var(--mute); font-size: 11px; flex: none; }
.cm-times { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; }
.cm-times input { flex: 1; padding: 8px; }
.danger-txt { color: var(--urgent) !important; }
#calMenu { width: 320px; }
