/* ==========================================================
   任务板 v2 · 全局样式（浅/深主题 · 桌面+手机）
   ========================================================== */
:root {
  --bg: #eef1f7; --card: #ffffff; --line: #e5e9f2; --line2: #dde2ec;
  --text: #1f2735; --muted: #79839a; --faint: #9aa3b6;
  --primary: #4f6ef7; --primary-strong: #3b5ae0; --primary-soft: #eef1fe;
  --danger: #e5484d; --danger-soft: #fdeeee;
  --ok: #22a55e;
  --shadow: 0 1px 2px rgba(23,32,60,.05), 0 8px 22px -10px rgba(23,32,60,.16);
  --shadow-lg: 0 18px 46px -12px rgba(23,32,60,.28);
  --radius: 16px; --radius-sm: 11px;
}
[data-theme="dark"] {
  --bg: #151922; --card: #1f2430; --line: #2b3140; --line2: #353c4e;
  --text: #e9ecf4; --muted: #8e97ab; --faint: #5f6879;
  --primary: #6e86ff; --primary-strong: #8599ff; --primary-soft: #262e4a;
  --danger: #ff5e63; --danger-soft: #3c2327;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 22px -10px rgba(0,0,0,.6);
  --shadow-lg: 0 18px 46px -12px rgba(0,0,0,.7);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; color: inherit; background: none; border: none; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }
svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 9px; border: 2px solid transparent; background-clip: content-box; }
[hidden] { display: none !important; }
#app { min-height: 100dvh; display: flex; flex-direction: column; }

/* ============ 顶栏 ============ */
#topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 22px; background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 9px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--primary);
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px -3px rgba(79,110,247,.55);
}
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.top-tabs { display: flex; gap: 6px; margin-left: 8px; }
.ttab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  color: var(--muted);
}
.ttab svg { width: 16px; height: 16px; }
.ttab:hover { color: var(--primary); }
.ttab.active { background: var(--primary-soft); color: var(--primary); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sync-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 20px;
}
.sync-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.sync-pill i.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(34,165,94,.18); }
.sync-pill i.bad { background: var(--danger); box-shadow: 0 0 0 3px rgba(229,72,77,.18); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); border: 1px solid var(--line); background: var(--card);
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--primary); color: #fff; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: 11px;
  box-shadow: 0 5px 14px -5px rgba(79,110,247,.6);
}
.btn-primary:hover { background: var(--primary-strong); }
.btn-primary svg { width: 16px; height: 16px; stroke-width: 2.3; }
.btn-ghost {
  padding: 8px 15px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); border: 1px solid var(--line); background: var(--card);
}
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger {
  padding: 9px 20px; border-radius: 10px; font-weight: 600; color: #fff; background: var(--danger);
}
.btn-danger:hover { filter: brightness(1.06); }
.link-btn { color: var(--primary); font-size: 13.5px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ============ 页面骨架 ============ */
#pageHost { flex: 1; }
.page { max-width: 1060px; margin: 0 auto; padding: 20px 20px 90px; }

/* ============ 卡片通用 ============ */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ============ 速记页 ============ */
.record-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.hero-card { padding: 22px 22px 16px; }
.hero-h { font-size: 22px; font-weight: 800; }
.hero-sub { color: var(--muted); font-size: 13.5px; margin: 5px 0 16px; }
.quick-input-wrap { position: relative; }
#quickInput {
  width: 100%; padding: 14px 16px; font-size: 15.5px; line-height: 1.6;
  border: 1.5px solid var(--line2); border-radius: 13px; resize: vertical;
  background: var(--bg); outline: none; transition: border-color .15s, box-shadow .15s;
}
#quickInput:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--card); }
.quick-hint-row {
  display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap;
}
.parsed { flex: 1; min-width: 200px; display: flex; flex-wrap: wrap; gap: 6px; }
.p-hint { color: var(--faint); font-size: 12.5px; }
.pchip {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.pchip.t-blue { background: #e7edff; color: #3b5ae0; border-color: transparent; }
.pchip.t-orange { background: #fff0e2; color: #d06a12; border-color: transparent; }
.pchip.t-gray { background: #eef1f5; color: #5b6478; border-color: transparent; }
[data-theme="dark"] .pchip.t-blue { background: #262e4a; color: #93a7ff; }
[data-theme="dark"] .pchip.t-orange { background: #3c2b1c; color: #f2a35f; }
[data-theme="dark"] .pchip.t-gray { background: #2b303d; color: #aab2c4; }
.pchip.p-high { background: var(--danger-soft); color: var(--danger); }
.pchip.p-mid { background: #fff4e5; color: #d9822b; }
.pchip.p-low { background: #e9f7ef; color: #22a55e; }
[data-theme="dark"] .pchip.p-mid { background: #3a2e1c; color: #f0a952; }
.pchip.p-time, .pchip.p-asg, .pchip.p-tag { background: var(--primary-soft); color: var(--primary); }
.pchip.p-rem { background: var(--danger-soft); color: var(--danger); }
.example-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px;
  color: var(--faint); font-size: 12.5px;
  border-top: 1px dashed var(--line); padding-top: 12px;
}
.ex-btn {
  font-size: 12.5px; color: var(--muted); border: 1px solid var(--line);
  background: var(--bg); padding: 4px 11px; border-radius: 20px;
  transition: all .15s;
}
.ex-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }

/* 马卡龙励志卡 */
.macaron {
  padding: 24px 24px 14px; border: none; position: relative;
  box-shadow: var(--shadow); transition: background .4s;
}
.mac-quote { font-size: 19px; font-weight: 800; line-height: 1.5; min-height: 58px; }
.mac-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.mac-theme { font-size: 12px; font-weight: 600; opacity: .7; letter-spacing: .4px; }
.mac-actions { display: flex; gap: 6px; }
.mac-btn {
  width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.5); opacity: .75;
}
.mac-btn svg { width: 15px; height: 15px; }
.mac-btn:hover { opacity: 1; transform: rotate(8deg); }

/* 最近记录 */
.recent-block .block-h { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 12px; }
.block-h h2 { font-size: 16px; font-weight: 800; }
.recent-list { display: flex; flex-direction: column; gap: 9px; }
.recent-item {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; box-shadow: var(--shadow); animation: rise .3s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.recent-item:hover { border-color: var(--primary); }
.recent-item.done { opacity: .55; }
.recent-item.done .r-content { text-decoration: line-through; color: var(--muted); }
.check {
  width: 21px; height: 21px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  border: 2px solid #c7cddb; background: transparent; position: relative;
  display: flex; align-items: center; justify-content: center; color: transparent;
}
.check svg { width: 12px; height: 12px; stroke-width: 3; }
.check:hover { border-color: var(--primary); }
.check.done { background: var(--primary); border-color: var(--primary); color: #fff; }
.r-main { flex: 1; min-width: 0; }
.r-line { display: flex; align-items: flex-start; gap: 8px; }
.r-content { font-size: 14.5px; font-weight: 600; word-break: break-word; }
.t-ic { display: inline-flex; align-items: center; justify-content: center; }
.t-ic svg { width: 15px; height: 15px; }
.t-blue { color: #3b5ae0; } .t-orange { color: #e07c1f; } .t-gray { color: #7b8498; }
.r-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.r-ops { display: flex; opacity: 0; }
.recent-item:hover .r-ops { opacity: 1; }
.op-btn {
  width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px;
}
.op-btn svg { width: 15px; height: 15px; }
.op-btn:hover { background: var(--primary-soft); color: var(--primary); }
.op-btn.del:hover { background: var(--danger-soft); color: var(--danger); }
.recent-empty { text-align: center; color: var(--muted); padding: 30px 0; font-size: 13.5px; }

/* ============ 整理页 ============ */
.organize-inner { display: flex; flex-direction: column; gap: 14px; }
.stats-panel {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px;
  padding: 16px 20px;
}
.sp-col h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.sp-tip { font-size: 11px; color: var(--faint); font-weight: 500; }
.dist-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12.5px; }
.d-name { width: 30px; flex-shrink: 0; font-weight: 600; color: var(--muted); }
.d-bar { flex: 1; height: 7px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.d-bar i { display: block; height: 100%; border-radius: 6px; min-width: 2px; }
.d-num { width: 20px; text-align: right; color: var(--muted); }
.dist-empty { color: var(--faint); font-size: 12.5px; }
#hotWords { display: flex; flex-wrap: wrap; gap: 6px; }
.hot-chip {
  font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 20px;
  background: var(--primary-soft); color: var(--primary);
}
.hot-chip em { font-style: normal; opacity: .6; font-size: 11px; }
.hot-chip:hover { background: var(--primary); color: #fff; }

/* 工具栏 */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.seg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--primary); color: #fff; }
.seg.full { width: 100%; }
.tool-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.fsel {
  padding: 7px 10px; border-radius: 9px; font-size: 12.5px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  outline: none; cursor: pointer;
}
.fsel:hover { border-color: var(--primary); color: var(--primary); }
.tool-search {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  padding: 6px 11px; color: var(--muted); min-width: 150px; flex: 0 0 auto; margin-left: auto;
}
.tool-search svg { width: 14px; height: 14px; }
.tool-search input { border: none; outline: none; background: none; width: 120px; font-size: 13px; }
.tool-search input::placeholder { color: var(--faint); }

/* 标签云 */
.tagcloud {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 14px;
}
.tc-label { font-size: 12px; color: var(--faint); font-weight: 700; margin-right: 4px; }
.tc-chip {
  font-size: 12px; padding: 4px 10px; border-radius: 20px; font-weight: 500;
  border: 1px solid var(--line); color: var(--muted); background: var(--card);
}
.tc-chip em { font-style: normal; opacity: .6; font-size: 10.5px; }
.tc-chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.tc-chip:hover { border-color: var(--primary); color: var(--primary); }
.tc-clear { font-size: 12px; color: var(--danger); font-weight: 600; margin-left: 4px; }

/* 批量栏 */
.batch-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-color: var(--primary);
}
.batch-count { font-size: 13px; font-weight: 700; color: var(--primary); }
.batch-actions { margin-left: auto; display: flex; gap: 8px; }

/* 任务卡 */
.note-list { display: flex; flex-direction: column; gap: 9px; }
.note-card {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--line));
  border-radius: var(--radius-sm); padding: 12px 14px;
  box-shadow: var(--shadow); animation: rise .25s ease both;
  transition: transform .12s, box-shadow .12s, opacity .3s;
}
.note-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.note-card.bd-over { border-left-color: var(--danger); }
.note-card.bd-today { border-left-color: var(--mid, #f59e0b); }
.note-card.done { opacity: .58; }
.note-card.done .nc-content { text-decoration: line-through; color: var(--muted); }
.note-card.p-high { border-left-color: #e5484d; }
.note-card.p-mid { border-left-color: #f59e0b; }
.note-card.p-low { border-left-color: var(--line2); }
.nc-main { flex: 1; min-width: 0; }
.nc-line1 { display: flex; align-items: flex-start; gap: 7px; }
.nc-content { font-size: 14.5px; font-weight: 600; word-break: break-word; flex: 1; }
.rem-ind { color: var(--mid, #f59e0b); display: inline-flex; animation: pulse 1.6s infinite; }
.rem-ind.now { color: var(--danger); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.rem-ind svg { width: 15px; height: 15px; }
.nc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; padding: 1.5px 8px; border-radius: 20px;
  background: #eef1f5; color: #59627a;
}
[data-theme="dark"] .chip { background: #2b3140; color: #a8b1c5; }
.chip.p-high { background: var(--danger-soft); color: var(--danger); }
.chip.p-mid { background: #fff4e5; color: #c77a1e; }
.chip.p-low { background: #e9f7ef; color: #1c8a52; }
[data-theme="dark"] .chip.p-mid { background: #3a2e1c; color: #eaa64c; }
.chip .pri-dot { width: 6px; height: 6px; border-radius: 50%; }
.chip.c-over { color: var(--danger); font-weight: 700; }
.chip.c-warn { color: #d9822b; font-weight: 700; }
.chip.c-info { color: var(--primary); }
.chip.c-mute { color: var(--muted); }
.sub-mini { width: 52px; height: 4px; border-radius: 4px; background: var(--bg); overflow: hidden; display: inline-block; }
.sub-mini i { display: block; height: 100%; background: var(--primary); }
.nc-sub { display: flex; gap: 4px 12px; flex-wrap: wrap; margin-top: 7px; }
.sub-line { font-size: 12px; color: var(--muted); }
.sub-line.on { text-decoration: line-through; opacity: .6; }
.nc-ops { display: flex; flex-direction: column; gap: 2px; opacity: 0; }
.note-card:hover .nc-ops, .note-card:focus-within .nc-ops { opacity: 1; }

/* 分组头（按日期） */
.group-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; color: var(--muted);
  margin: 12px 2px 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.group-head .g-dot { width: 8px; height: 8px; border-radius: 50%; }
.group-head.g-red .g-dot { background: var(--danger); } .group-head.g-red { color: var(--danger); }
.group-head.g-orange .g-dot { background: #f59e0b; }
.group-head.g-blue .g-dot { background: var(--primary); }
.group-head.g-lblue .g-dot { background: #93a7ff; }
.group-head.g-gray .g-dot { background: var(--muted); }
.group-head.g-lgray .g-dot { background: var(--faint); }
.g-cnt { font-style: normal; margin-left: auto; background: var(--bg); padding: 1px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.grp-collapse { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--faint); font-size: 12.5px; padding: 8px 0; }

/* 多选 checkbox */
.chk-row { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; user-select: none; }
.chk-row input { display: none; }
.chk-row i {
  width: 18px; height: 18px; border-radius: 6px; border: 2px solid #c7cddb;
  display: inline-flex; align-items: center; justify-content: center; background: var(--card);
  position: relative;
}
.chk-row i::after { content: ''; width: 9px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(0.5px,-1px); opacity: 0; }
.chk-row input:checked + i { background: var(--primary); border-color: var(--primary); }
.chk-row input:checked + i::after { opacity: 1; }
.chk-big { font-size: 14px; font-weight: 600; }
.ck-multi { margin-top: 3px; }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.empty p { font-size: 13.5px; margin-bottom: 16px; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(18,24,42,.45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fadein .16s ease;
}
@keyframes fadein { from { opacity: 0; } }
.modal {
  background: var(--card); border-radius: 18px; width: 100%; max-width: 520px;
  padding: 20px 22px; box-shadow: var(--shadow-lg);
  max-height: 92dvh; overflow-y: auto; animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.97) translateY(6px); opacity: 0; } }
.modal-wide { max-width: 560px; }
.modal-sm { max-width: 360px; }
.modal h2 { font-size: 16.5px; font-weight: 800; margin-bottom: 6px; }
.modal-txt { color: var(--muted); font-size: 13.5px; margin: 8px 0 2px; }
.f-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 13px 0 5px; }
.f-label i { color: var(--danger); font-style: normal; }
.f-input {
  width: 100%; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); outline: none;
}
.f-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--card); }
textarea.f-input { resize: vertical; min-height: 58px; }
select.f-input { cursor: pointer; }
.f-grid4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; }
.f-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.tag-editor { display: flex; flex-direction: column; gap: 8px; }
.tchip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12.5px; font-weight: 600; padding: 4px 6px 4px 11px; border-radius: 20px;
}
.tchip button { color: var(--primary); font-size: 14px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.tchip button:hover { background: rgba(0,0,0,.08); }
.st-list { display: flex; flex-direction: column; gap: 5px; }
.st-row { display: flex; align-items: center; gap: 7px; }
.st-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #c7cddb; font-size: 12px; color: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-check:hover { border-color: var(--primary); }
.st-row.on .st-check { background: var(--primary); border-color: var(--primary); color: #fff; }
.st-text {
  flex: 1; border: none; background: transparent; border-bottom: 1px dashed var(--line);
  padding: 4px 2px; font-size: 13.5px; outline: none; min-width: 0;
}
.st-text:focus { border-bottom-color: var(--primary); }
.st-row.on .st-text { text-decoration: line-through; color: var(--muted); }
.st-del { color: var(--faint); width: 22px; height: 22px; border-radius: 6px; }
.st-del:hover { color: var(--danger); background: var(--danger-soft); }
.sub-input-row { margin-top: 7px; }

/* ============ Toast ============ */
.toast-stack {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(430px, 92vw);
}
.toast {
  background: var(--card); border: 1px solid var(--ok); border-radius: 13px;
  box-shadow: var(--shadow-lg); padding: 11px 15px;
  display: flex; align-items: center; gap: 11px;
  font-size: 13.5px; animation: drop .3s cubic-bezier(.2,.9,.3,1.15);
}
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } }
.toast.err { border-color: var(--danger); }
.t-ic { color: var(--ok); display: inline-flex; }
.toast.err .t-ic { color: var(--danger); }
.t-ic svg { width: 17px; height: 17px; }

/* ============ 悬浮球 / 面板 ============ */
#floatBall {
  position: fixed; right: 22px; bottom: 26px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, #4f6ef7, #7c5cf0);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(90,95,240,.6);
  cursor: pointer; transition: transform .15s;
}
#floatBall:hover { transform: scale(1.06); }
#floatBall svg { width: 24px; height: 24px; stroke-width: 2; }
#fbCount {
  position: absolute; top: -3px; right: -3px; font-style: normal;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
  padding: 0 5px; border: 2px solid var(--card);
}
#fbAlert {
  position: absolute; top: 4px; right: 4px; width: 11px; height: 11px; border-radius: 50%;
  background: #f59e0b; border: 2px solid #fff;
}
#fbAlert.red { background: var(--danger); animation: pulse 1.3s infinite; }
#floatPanel {
  position: fixed; right: 22px; bottom: 90px; z-index: 61;
  width: 350px; max-height: 66vh; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .22s ease;
}
.fp-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.fp-head b { font-size: 14.5px; }
.fp-sub { font-size: 12px; color: var(--muted); }
.fp-x { margin-left: auto; color: var(--muted); width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.fp-x svg { width: 14px; height: 14px; }
.fp-x:hover { background: var(--bg); }
.fp-list { overflow-y: auto; flex: 1; padding: 6px 8px; }
.fp-item { display: flex; gap: 9px; padding: 9px 8px; border-radius: 10px; cursor: pointer; border-left: 3px solid transparent; }
.fp-item:hover { background: var(--bg); }
.fp-item.over { border-left-color: var(--danger); }
.fp-item.today { border-left-color: #f59e0b; }
.fp-check {
  width: 19px; height: 19px; border-radius: 50%; border: 2px solid #c7cddb; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: transparent; margin-top: 1px;
}
.fp-check svg { width: 11px; height: 11px; stroke-width: 3; }
.fp-check:hover { border-color: var(--primary); }
.fp-item:hover .fp-check { border-color: var(--primary); }
.fp-main { min-width: 0; }
.fp-title { font-size: 13.5px; font-weight: 600; word-break: break-word; }
.fp-meta { display: flex; gap: 8px; align-items: center; margin-top: 2px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.fp-meta .t-ic svg { width: 12px; height: 12px; }
.fp-meta .c-over { color: var(--danger); font-weight: 700; }
.fp-meta .c-warn { color: #d9822b; }
.fp-meta .c-info { color: var(--primary); }
.fp-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 10px; }
.fp-foot {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  border-top: 1px solid var(--line);
}
.fp-add {
  font-size: 13px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); padding: 6px 14px; border-radius: 9px;
}
.fp-add:hover { background: var(--primary); color: #fff; }
.fp-note { font-size: 11px; color: var(--faint); margin-left: auto; }

/* ============ 手机端 ============ */
.fab, #mobileTab { display: none; }

@media (max-width: 860px) {
  #topbar { padding: 10px 14px; gap: 10px; }
  .ttab { padding: 7px 12px; font-size: 13px; }
  .brand-name { display: none; }
  .sync-pill span { display: none; }
  .sync-pill { padding: 5px 9px; }
  .page { padding: 12px 12px 100px; }
  .stats-panel { grid-template-columns: 1fr; gap: 14px; }
  .toolbar { gap: 8px; }
  .tool-search { margin-left: 0; flex: 1; min-width: 120px; }
  .tool-search input { width: 100%; }
  #mobileTab {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
  }
  .m-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 2px; color: var(--muted); font-size: 10.5px; font-weight: 600;
    position: relative;
  }
  .m-item svg { width: 20px; height: 20px; }
  .m-item.active { color: var(--primary); }
  .m-count {
    position: absolute; top: 0; right: 14%;
    font-style: normal; background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
  }
  .fab {
    display: flex; position: fixed; right: 16px; bottom: 74px; z-index: 54;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--primary); color: #fff; align-items: center; justify-content: center;
    box-shadow: 0 8px 22px -4px rgba(79,110,247,.6);
  }
  .fab svg { width: 23px; height: 23px; stroke-width: 2.2; }
  .fab:active { transform: scale(.93); }
  .nc-ops { opacity: 1; flex-direction: row; }
  .f-grid4 { grid-template-columns: 1fr 1fr; }
  .f-grid2 { grid-template-columns: 1fr; }
  #floatBall, #floatPanel { display: none; }

  /* ===== 执行情况记录 ===== */
  .log-timeline { position: relative; padding-left: 15px; margin: 2px 0 8px; }
  .log-timeline::before { content: ""; position: absolute; left: 4px; top: 7px; bottom: 7px;
    width: 2px; background: var(--line); border-radius: 2px; }
  .log-item { position: relative; margin-bottom: 9px; }
  .log-item::before { content: ""; position: absolute; left: -14px; top: 4px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--card); border: 2px solid var(--primary); }
  .log-time { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
  .log-text { font-size: 13px; line-height: 1.55; background: var(--card); border: 1px solid var(--line);
    border-radius: 9px; padding: 7px 9px; word-break: break-word; display: flex; gap: 6px; align-items: flex-start; }
  .log-text span { flex: 1; }
  .log-del { width: 18px; height: 18px; border-radius: 5px; border: none; background: transparent;
    color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; }
  .log-del:hover { background: var(--danger-soft); color: var(--danger); }
  .log-add { display: flex; gap: 8px; align-items: flex-end; }
  .log-add textarea { flex: 1; border: 1px solid var(--line); border-radius: 9px; background: var(--bg);
    padding: 8px 10px; font-family: inherit; font-size: 13px; line-height: 1.5; resize: vertical;
    min-height: 42px; outline: none; color: var(--text); }
  .log-add textarea:focus { border-color: var(--primary); }
  .log-add .btn-sm { padding: 8px 16px; white-space: nowrap; }

  /* 任务卡上的执行情况角标 */
  .chip.log-chip { background: var(--primary-soft); color: var(--primary-strong); }

}
