/* ==========================================================================
   个人工作台 · 温润低饱和护眼样式系统（零外部依赖，离线秒开）
   配色体系：60% 温润纸感主画布 + 30% 柔和辅底栏 + 10% 低饱和语义锚点
   ========================================================================== */

:root {
  /* 基础浅色温润基底 */
  --bg-base: #f6f4ef;
  --bg-sidebar: #eeebe4;
  --bg-card: #fbfaf7;
  --bg-sub: #f2efe8;
  --bg-hover: rgba(44, 52, 58, 0.045);
  --fg-main: #232a30;
  --fg-muted: #68737d;
  --fg-faint: #8e98a1;
  --border-line: #e2ddd3;
  --border-strong: #cfc8bc;
  --shadow-soft: 0 8px 28px -16px rgba(35, 42, 48, 0.16);

  /* 默认色板：静谧雾青 (teal) */
  --tone-accent: #3b6f8c;
  --tone-accent-hover: #305c75;
  --tone-accent-soft: rgba(59, 111, 140, 0.11);
  --tone-accent-fg: #2b5973;
  --tone-inbox: #a87633;
  --tone-inbox-soft: rgba(168, 118, 51, 0.12);
  --tone-chore: #5d7369;
  --tone-chore-soft: rgba(93, 115, 105, 0.12);
  --tone-done: #40765e;
  --tone-done-soft: rgba(64, 118, 94, 0.11);
  --tone-due: #b0564a;
  --tone-due-soft: rgba(176, 86, 74, 0.11);
  --tone-report: #536587;
  --tone-report-soft: rgba(83, 101, 135, 0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 色板 2：暖纸松绿 (sage) */
[data-palette="sage"] {
  --bg-base: #f7f4ec;
  --bg-sidebar: #efeae0;
  --bg-card: #fcfaf4;
  --bg-sub: #f2ede2;
  --tone-accent: #42725c;
  --tone-accent-hover: #355e4b;
  --tone-accent-soft: rgba(66, 114, 92, 0.12);
  --tone-accent-fg: #315c48;
  --tone-inbox: #a47035;
  --tone-inbox-soft: rgba(164, 112, 53, 0.12);
  --tone-chore: #68756a;
  --tone-chore-soft: rgba(104, 117, 106, 0.12);
  --tone-done: #3b7158;
  --tone-done-soft: rgba(59, 113, 88, 0.12);
  --tone-report: #4d6a78;
  --tone-report-soft: rgba(77, 106, 120, 0.12);
}

/* 色板 3：沉稳靛灰 (slate) */
[data-palette="slate"] {
  --bg-base: #f4f5f7;
  --bg-sidebar: #eaecef;
  --bg-card: #fafbfc;
  --bg-sub: #eef0f3;
  --border-line: #dde1e7;
  --border-strong: #c8ced8;
  --tone-accent: #4e638a;
  --tone-accent-hover: #3e5073;
  --tone-accent-soft: rgba(78, 99, 138, 0.12);
  --tone-accent-fg: #3b4f75;
  --tone-inbox: #a6783a;
  --tone-inbox-soft: rgba(166, 120, 58, 0.12);
  --tone-chore: #676f7a;
  --tone-chore-soft: rgba(103, 111, 122, 0.12);
  --tone-done: #457564;
  --tone-done-soft: rgba(69, 117, 100, 0.12);
  --tone-report: #5c6285;
  --tone-report-soft: rgba(92, 98, 133, 0.12);
}

/* 温润深色护眼模式（不刺眼、低对比柔和石板底） */
[data-theme="dark"] {
  --bg-base: #1b1f23;
  --bg-sidebar: #16191d;
  --bg-card: #22272c;
  --bg-sub: #1e2328;
  --bg-hover: rgba(255, 255, 255, 0.05);
  --fg-main: #e4e7ea;
  --fg-muted: #98a2ac;
  --fg-faint: #6f7a85;
  --border-line: #2e343b;
  --border-strong: #3d454f;
  --shadow-soft: 0 12px 32px -16px rgba(0, 0, 0, 0.5);

  --tone-accent: #689cb8;
  --tone-accent-hover: #7bb0cc;
  --tone-accent-soft: rgba(104, 156, 184, 0.16);
  --tone-accent-fg: #9cc6dd;
  --tone-inbox: #d1a35d;
  --tone-inbox-soft: rgba(209, 163, 93, 0.16);
  --tone-chore: #95aba0;
  --tone-chore-soft: rgba(149, 171, 160, 0.16);
  --tone-done: #6ea88c;
  --tone-done-soft: rgba(110, 168, 140, 0.16);
  --tone-due: #d98276;
  --tone-due-soft: rgba(217, 130, 118, 0.16);
  --tone-report: #8e9fc2;
  --tone-report-soft: rgba(142, 159, 194, 0.16);
}

[data-theme="dark"][data-palette="sage"] {
  --tone-accent: #6fa389;
  --tone-accent-hover: #81b59b;
  --tone-accent-soft: rgba(111, 163, 137, 0.16);
  --tone-accent-fg: #a1ccb6;
}

[data-theme="dark"][data-palette="slate"] {
  --tone-accent: #7f95be;
  --tone-accent-hover: #92a7ce;
  --tone-accent-soft: rgba(127, 149, 190, 0.16);
  --tone-accent-fg: #b0c2e2;
}

/* 基础重置 */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-base);
  color: var(--fg-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* 主布局骨架 */
.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* 左侧导航栏（30% 辅底面） */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 12px;
}
.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--tone-accent);
}

.sync-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tone-done-soft);
  color: var(--tone-done);
  cursor: pointer;
  white-space: nowrap;
}
.sync-badge.warn {
  background: var(--tone-inbox-soft);
  color: var(--tone-inbox);
}
.sync-badge.err {
  background: var(--tone-due-soft);
  color: var(--tone-due);
}

.btn-primary-full {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  background: var(--tone-accent);
  color: #f8fafb;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s ease;
}
.btn-primary-full:hover { background: var(--tone-accent-hover); }
.btn-primary-full .kbd {
  font-size: 11px;
  opacity: 0.78;
  font-family: var(--font-mono);
}

.nav-section {
  margin-top: 18px;
}
.nav-section-label {
  font-size: 12px;
  color: var(--fg-faint);
  padding: 0 10px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-item {
  width: 100%;
  padding: 8px 10px 8px 14px;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  transition: background 0.14s ease, color 0.14s ease;
  margin-bottom: 2px;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--fg-main);
}
.nav-item.active {
  background: var(--bg-card);
  color: var(--fg-main);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 999px;
  background: var(--nav-color, var(--tone-accent));
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--nav-color, var(--tone-accent));
}
.nav-count {
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.count-accent { background: var(--tone-accent-soft); color: var(--tone-accent-fg); }
.count-inbox { background: var(--tone-inbox-soft); color: var(--tone-inbox); font-weight: 600; }
.count-chore { background: var(--tone-chore-soft); color: var(--tone-chore); }
.count-done { background: var(--tone-done-soft); color: var(--tone-done); }

.cat-sidebar-item {
  width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-sidebar-item:hover {
  background: var(--bg-hover);
  color: var(--fg-main);
}

.sidebar-footer {
  border-top: 1px solid var(--border-line);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fg-muted);
}
.link-muted {
  font-size: 12px;
  color: var(--fg-muted);
}
.link-muted:hover { color: var(--fg-main); }

/* 右侧单一宽敞主画布（60% 纸感留白） */
.main-stage {
  padding: 32px 36px 80px;
  overflow-y: auto;
}
.stage-inner {
  max-width: 740px;
  margin: 0 auto;
}

/* 示例数据提示横幅（极轻，一键清空） */
.demo-banner {
  margin-bottom: 18px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--tone-inbox-soft);
  color: var(--fg-main);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* 渐进披露的速记框 */
.capture-box {
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--tone-accent);
  box-shadow: var(--shadow-soft);
}
.capture-textarea {
  width: 100%;
  border: none;
  background: transparent;
  resize: none;
  min-height: 54px;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
}
.capture-textarea::placeholder { color: var(--fg-faint); }
.capture-hint {
  font-size: 12px;
  color: var(--tone-accent-fg);
  background: var(--tone-accent-soft);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.capture-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-line);
}
.capture-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.field-input {
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-line);
  background: var(--bg-base);
  font-size: 12px;
  outline: none;
}
.field-input:focus { border-color: var(--tone-accent); }

/* 页面抬头 */
.view-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-line);
  margin-bottom: 18px;
}
.view-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.view-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.view-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.view-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--fg-muted);
}

/* 按钮体系 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.14s ease;
  white-space: nowrap;
}
.btn-solid {
  background: var(--tone-accent);
  color: #f8fafb;
}
.btn-solid:hover { background: var(--tone-accent-hover); }
.btn-outline {
  border: 1px solid var(--border-line);
  background: var(--bg-card);
  color: var(--fg-main);
}
.btn-outline:hover { border-color: var(--border-strong); background: var(--bg-sub); }
.btn-soft-accent { background: var(--tone-accent-soft); color: var(--tone-accent-fg); }
.btn-soft-accent:hover { filter: brightness(0.96); }
.btn-soft-inbox { background: var(--tone-inbox-soft); color: var(--tone-inbox); }
.btn-soft-chore { background: var(--tone-chore-soft); color: var(--tone-chore); }
.btn-soft-done { background: var(--tone-done-soft); color: var(--tone-done); }
.btn-ghost { color: var(--fg-muted); padding: 4px 8px; }
.btn-ghost:hover { color: var(--fg-main); background: var(--bg-hover); }

/* 极简下划线式分类筛选条 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--border-line);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 0 2px 8px;
  font-size: 13px;
  color: var(--fg-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.14s ease, border-color 0.14s ease;
}
.filter-tab:hover { color: var(--fg-main); }
.filter-tab.active {
  color: var(--fg-main);
  font-weight: 500;
  border-bottom-color: var(--tone-accent);
}
.filter-tab.active-done {
  color: var(--fg-main);
  font-weight: 500;
  border-bottom-color: var(--tone-done);
}

/* 项目卡片 & 归档分组卡片（单层边界，绝不套娃） */
.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-left: 3px solid var(--tone-accent);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
}
.group-card.archive-card {
  border-left-color: var(--tone-done);
}
.group-card.plain-card {
  border-left: 1px solid var(--border-line);
  padding: 4px 18px;
}
.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-line);
}
.group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--tone-accent-fg);
}
.archive-card .group-title { color: var(--tone-done); }
.group-meta {
  font-size: 12px;
  color: var(--fg-muted);
}

/* 任务行 */
.task-row {
  padding: 13px 0;
  border-bottom: 1px solid var(--border-line);
}
.task-row:last-child { border-bottom: none; padding-bottom: 4px; }
.task-main-line {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.task-body {
  flex: 1;
  min-width: 0;
}
.task-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.task-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-main);
  word-break: break-word;
}
.task-meta-row {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.meta-left, .meta-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* 统一低饱和暖灰分类标（克制不搞彩虹） */
.cat-tag {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 5px;
  background: var(--bg-sub);
  border: 1px solid var(--border-line);
  color: var(--fg-muted);
}
.pill-due {
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--tone-due-soft);
  color: var(--tone-due);
  font-weight: 500;
}
.pill-wait {
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--tone-inbox-soft);
  color: var(--tone-inbox);
  font-weight: 500;
}
.pill-track {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
}
.text-muted { color: var(--fg-muted); }
.text-done { color: var(--tone-done); }
.text-due { color: var(--tone-due); font-weight: 500; }

/* 勾选圆圈 */
.check-circle {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.14s ease;
}
.check-circle:hover {
  border-color: var(--tone-accent);
  background: var(--tone-accent-soft);
}
.check-circle.checked {
  background: var(--tone-done);
  border-color: var(--tone-done);
  color: #fff;
}

/* 微图形 5px 真实进度条 */
.progress-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.micro-track {
  width: 88px;
  height: 5px;
  border-radius: 999px;
  background: var(--border-line);
  overflow: hidden;
}
.micro-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--tone-accent);
  transition: width 0.2s ease;
}
.micro-fill.waiting { background: var(--tone-inbox); }
.progress-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--tone-accent-fg);
  font-weight: 500;
}
.progress-label.waiting { color: var(--tone-inbox); }

/* 渐进展开的子步骤面板 */
.steps-drawer {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-sub);
  border: 1px solid var(--border-line);
}
.sub-step-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
}
.sub-step-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.sub-check {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}
.sub-check.done {
  background: var(--tone-accent);
  border-color: var(--tone-accent);
  color: #fff;
}
.sub-step-text.done {
  text-decoration: line-through;
  color: var(--fg-muted);
}
.sub-step-del {
  font-size: 12px;
  color: var(--fg-faint);
  padding: 2px 5px;
  opacity: 0.6;
}
.sub-step-del:hover { opacity: 1; color: var(--tone-due); }

.steps-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.add-step-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}
.add-step-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 12px;
  outline: none;
  padding: 3px 0;
}
.template-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

/* 完工归档留痕确认条 */
.archive-confirm-bar {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-base);
  border: 1px solid var(--tone-done);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.archive-confirm-input {
  flex: 1;
  min-width: 200px;
  border: none;
  background: transparent;
  font-size: 12px;
  outline: none;
}

/* 周报/月报文档面 */
.report-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.seg-group {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-sm);
  background: var(--bg-sidebar);
  border: 1px solid var(--border-line);
}
.seg-btn {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--fg-muted);
}
.seg-btn.active {
  background: var(--bg-card);
  color: var(--fg-main);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.report-paper {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.8;
  color: var(--fg-main);
}

/* 空状态 */
.empty-state {
  padding: 44px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--fg-muted);
}

/* 弹窗（设置 / 同步 / AI / 分类 / 项目管理） */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 28, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}
.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-line);
  margin-bottom: 16px;
}
.modal-title { font-size: 16px; font-weight: 600; margin: 0; }
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 5px;
}
.form-control {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-line);
  background: var(--bg-base);
  font-size: 13px;
  outline: none;
}
.form-control:focus { border-color: var(--tone-accent); }
.form-tip { font-size: 12px; color: var(--fg-faint); margin-top: 4px; }

.palette-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.palette-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-line);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-muted);
}
.palette-pill.active {
  border-color: var(--tone-accent);
  background: var(--tone-accent-soft);
  color: var(--fg-main);
  font-weight: 500;
}
.swatch { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }

/* 轻提示 Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--fg-main);
  color: var(--bg-card);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: var(--shadow-soft);
  z-index: 80;
  pointer-events: none;
}

.hidden { display: none !important; }

/* 手机端专属底部栏 & 悬浮 + 按钮（桌面隐藏） */
.mobile-topbar, .mobile-bottom-nav, .mobile-fab { display: none; }

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar { display: none; }
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-line);
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .main-stage {
    padding: 18px 14px 110px;
  }
  .view-title { font-size: 18px; }
  .group-card { padding: 12px 14px; }
  .report-paper { padding: 16px; font-size: 13px; }
  .mobile-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 18px;
    bottom: 72px;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    background: var(--tone-accent);
    color: #fff;
    box-shadow: 0 10px 24px -6px rgba(35, 42, 48, 0.35);
    z-index: 40;
  }
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-line);
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
  }
  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: var(--fg-muted);
    position: relative;
  }
  .mobile-nav-btn.active {
    color: var(--tone-accent-fg);
    font-weight: 600;
  }
  .mobile-nav-badge {
    position: absolute;
    top: -2px;
    right: 18%;
    font-size: 10px;
    min-width: 15px;
    height: 15px;
    line-height: 15px;
    border-radius: 999px;
    background: var(--tone-inbox);
    color: #fff;
    padding: 0 4px;
    text-align: center;
  }
  .toast { bottom: 84px; }
}
