/* ========== 文文 · 个人工作台（冷调蓝 · 双主题） ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ---------- 浅色主题（默认） ---------- */
:root {
  --bg: #f4f6fa;
  --bg-glow: rgba(231, 238, 251, 1);
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --border: #e5eaf2;
  --border-strong: #d6dfec;
  --text: #25334d;
  --text-dim: #71809a;
  --text-faint: #9aa7bd;
  --accent: #3a6ee8;
  --accent-hover: #2f5fd2;
  --accent-soft: #ecf2fd;
  --teal: #38a89e;
  --amber: #d99a4e;
  --rose: #d2607c;
  --track: #edf1f7;
  --row-border: #f0f3f8;
  --mask: rgba(37, 51, 77, .32);
  --toast-bg: #25334d;
  --toast-text: #ffffff;
  --scroll-thumb: #d5ddea;
  --selection: #d3e0fa;
  --color-scheme: light;
  --shadow-sm: 0 1px 2px rgba(37, 51, 77, .05);
  --shadow-md: 0 12px 32px rgba(37, 51, 77, .10);
  /* 图表 */
  --chart-grid: #edf1f7;
  --chart-tick: #9aa7bd;
  --chart-line: #3a6ee8;
  --chart-last: #38a89e;
  --chart-fill: rgba(58, 110, 232, .15);
  --chart-diet: #a9bcf0;
  --chart-burn: #3a6ee8;
  --chart-dot-stroke: #ffffff;
}

/* ---------- 深色主题 ---------- */
:root[data-theme="dark"] {
  --bg: #0d1320;
  --bg-glow: rgba(43, 74, 140, .22);
  --surface: #151c2c;
  --surface-2: #1a2336;
  --border: #232e45;
  --border-strong: #2c3a56;
  --text: #dbe2f0;
  --text-dim: #8b97b0;
  --text-faint: #5f6b84;
  --accent: #5b86f0;
  --accent-hover: #6f97f5;
  --accent-soft: rgba(91, 134, 240, .14);
  --teal: #3fb8ad;
  --amber: #d99a4e;
  --rose: #d97a92;
  --track: #232e45;
  --row-border: #1e2940;
  --mask: rgba(5, 8, 15, .55);
  --toast-bg: #e8edf8;
  --toast-text: #25334d;
  --scroll-thumb: #2c3a56;
  --selection: #2a3c63;
  --color-scheme: dark;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .30);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .45);
  /* 图表 */
  --chart-grid: #1e2940;
  --chart-tick: #5f6b84;
  --chart-line: #6f97f5;
  --chart-last: #3fb8ad;
  --chart-fill: rgba(111, 151, 245, .16);
  --chart-diet: #3d5386;
  --chart-burn: #6f97f5;
  --chart-dot-stroke: #151c2c;
}

html, body { height: 100%; }
body {
  font-family: -apple-system, "SF Pro SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 480px at 75% -10%, var(--bg-glow) 0%, transparent 60%),
    var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--selection); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

button { font-family: inherit; }
input, select { font-family: inherit; }
input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid rgba(58, 110, 232, .35);
  outline-offset: 1px;
}

/* 主题切换时的柔和过渡（不覆盖各组件自身的 transition） */
body, .sidebar, .glass, .menu-item, .kb-tab, .chip, .entry-block,
.head-date, .foot-card, .modal, .theme-toggle, input, select {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 228px; flex-shrink: 0;
  display: flex; flex-direction: column;
  padding: 28px 16px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(58, 110, 232, .28);
}
.brand-text h1 { font-size: 17px; font-weight: 600; letter-spacing: 1px; white-space: nowrap; }
.brand-text span { font-size: 11px; color: var(--text-faint); letter-spacing: 2px; }

.menu { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.menu-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border: none; border-radius: 9px;
  background: transparent; color: var(--text-dim);
  font-size: 14px; cursor: pointer; text-align: left;
  transition: background .15s ease, color .15s ease;
}
.menu-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.menu-item:hover { background: var(--surface-2); color: var(--text); }
.menu-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mi-label { flex: 1; letter-spacing: .5px; }

.sidebar-foot { padding-top: 16px; }

/* 主题切换按钮 */
.theme-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface-2); color: var(--text-dim);
  font-size: 13px; cursor: pointer;
  transition: all .15s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }

.foot-card {
  padding: 14px 16px; border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.foot-quote { font-size: 12px; color: var(--text-faint); line-height: 1.8; }

/* ---------- 主区域 ---------- */
.main { flex: 1; padding: 38px 44px 48px; min-width: 0; max-width: 1240px; }
.module { display: none; animation: fadeUp .35s ease; }
.module.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.module-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 26px;
}
.module-head h2 { font-size: 24px; font-weight: 600; letter-spacing: 1px; }
.module-sub { color: var(--text-dim); font-size: 13px; margin-top: 7px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.head-date {
  font-size: 12.5px; color: var(--text-dim);
  padding: 7px 15px; border-radius: 30px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums;
}

/* 卡片基类（沿用 glass 类名） */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

/* ---------- 统计卡片 ---------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.stat-card {
  display: flex; align-items: center; gap: 14px; padding: 20px 22px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-dim); letter-spacing: .5px; }
.stat-value {
  font-size: 21px; font-weight: 650; letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
}
.stat-delta { font-size: 11.5px; color: var(--text-faint); }
.stat-delta.up { color: var(--rose); }
.stat-delta.down { color: var(--teal); }
.mini-btn {
  background: none; border: none; color: var(--text-faint);
  cursor: pointer; font-size: 12px; padding: 0 2px;
}
.mini-btn:hover { color: var(--accent); }

/* ---------- 面板 ---------- */
.panel { padding: 24px 26px; margin-bottom: 18px; }
.panel-title { font-size: 14.5px; font-weight: 600; margin-bottom: 18px; letter-spacing: .5px; }
.panel-title small { color: var(--text-faint); font-weight: 400; }

/* ---------- 表单 ---------- */
.record-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: flex; flex-wrap: wrap; gap: 14px; }
.record-form label { display: flex; flex-direction: column; gap: 7px; }
.record-form label.grow { flex: 1; min-width: 160px; }
.record-form label > span, .kb-form label > span {
  font-size: 12px; color: var(--text-dim); letter-spacing: .5px;
}
.record-form input, .entry-add input, .entry-add select,
.kb-form input, .kb-search input, .modal-row input {
  padding: 9px 13px; border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font-size: 13.5px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.record-form input { width: 158px; }
.record-form label.grow input { width: 100%; }
.record-form input:focus, .entry-add input:focus, .entry-add select:focus,
.kb-form input:focus, .kb-search input:focus, .modal-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58, 110, 232, .12);
}
input::placeholder { color: var(--text-faint); }
input[type="date"] { color-scheme: var(--color-scheme); }
.entry-add select option { background: var(--surface); color: var(--text); }

/* 运动 / 饮食录入块 */
.entry-block {
  padding: 16px 18px; border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.entry-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.entry-title { font-size: 13.5px; font-weight: 600; letter-spacing: .5px; }
.entry-total {
  font-size: 12px; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.entry-add { display: flex; flex-wrap: wrap; gap: 10px; }
.entry-add select { min-width: 210px; color: var(--text); }
.entry-add input { width: 150px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips:empty { margin-top: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 8px 5px 12px; border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 12.5px; color: var(--text);
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
}
.chip-x {
  background: none; border: none; color: var(--text-faint);
  cursor: pointer; font-size: 11px; padding: 2px 3px; border-radius: 50%;
}
.chip-x:hover { color: var(--rose); }

.form-foot {
  display: flex; justify-content: space-between;
  align-items: center; gap: 14px; flex-wrap: wrap;
}
.form-hint { font-size: 12px; color: var(--text-faint); }

/* ---------- 按钮 ---------- */
.btn-primary {
  padding: 10px 24px; border: none; border-radius: 9px;
  background: var(--accent); color: #fff;
  font-size: 13.5px; font-weight: 500; cursor: pointer; letter-spacing: 1px;
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 6px 16px rgba(58, 110, 232, .30); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  padding: 9px 18px; border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-dim);
  font-size: 13px; cursor: pointer;
  transition: all .15s ease;
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ---------- 今日营养构成 ---------- */
.macro-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
}
.macro-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim); margin-bottom: 9px;
}
.macro-head .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.macro-val {
  margin-left: auto; font-weight: 650; font-size: 15px; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.macro-bar { position: relative; height: 5px; border-radius: 4px; overflow: hidden; background: var(--track); }
.macro-zone {
  position: absolute; top: 0; bottom: 0; left: 0; width: 0;
  background: rgba(58, 110, 232, .16);
}
:root[data-theme="dark"] .macro-zone { background: rgba(91, 134, 240, .22); }
.macro-fill { position: relative; height: 100%; border-radius: 4px; width: 0; transition: width .5s ease; }
.macro-fill.c { background: #7aa2f7; }
.macro-fill.p { background: #45b6ab; }
.macro-fill.f { background: #9fb0cc; }
.macro-fill.over { background: var(--rose); }
.macro-sub { font-size: 11px; color: var(--text-faint); margin-top: 7px; }
.macro-status { font-size: 11px; margin-top: 3px; min-height: 14px; }
.macro-status.ok { color: var(--teal); }
.macro-status.warn { color: var(--amber); }
.macro-status.over { color: var(--rose); }
.dot.c { background: #7aa2f7; } .dot.p { background: #45b6ab; } .dot.f { background: #9fb0cc; }
.bmr-line {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-dim);
  display: flex; align-items: center; gap: 8px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 图表 ---------- */
.chart-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px;
}
.chart-grid .panel { margin-bottom: 18px; }
.chart-wrap { position: relative; height: 220px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-legend { font-size: 12px; color: var(--text-dim); margin: -10px 0 12px; }
.chart-legend .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin: 0 6px 0 14px;
}
.chart-legend .dot:first-child { margin-left: 0; }
.dot.diet { background: var(--chart-diet); }
.dot.burn { background: var(--chart-burn); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.record-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.record-table th {
  text-align: left; padding: 8px 12px 12px;
  font-size: 11.5px; letter-spacing: 1px;
  color: var(--text-faint); font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.record-table td { padding: 11px 12px; border-bottom: 1px solid var(--row-border); color: var(--text); }
.record-table tbody tr:last-child td { border-bottom: none; }
.record-table tbody tr { transition: background .12s ease; }
.record-table tbody tr:hover { background: var(--surface-2); }
.record-table .num { font-variant-numeric: tabular-nums; }
.net-pos { color: var(--teal); }
.net-neg { color: var(--amber); }
.del-btn {
  background: none; border: none; color: var(--text-faint);
  cursor: pointer; font-size: 13px; opacity: 0; transition: opacity .15s ease, color .15s ease;
}
.record-table tr:hover .del-btn { opacity: 1; }
.del-btn:hover { color: var(--rose); }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 52px 0 44px; display: none; }
.empty-state.show { display: block; }
.empty-state p { color: var(--text-faint); font-size: 13.5px; margin-bottom: 20px; letter-spacing: .5px; }

/* ---------- 知识库 ---------- */
.kb-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.kb-tab {
  padding: 8px 20px; border-radius: 30px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-dim);
  font-size: 13px; cursor: pointer;
  transition: all .15s ease;
}
.kb-tab:hover { color: var(--text); border-color: var(--accent); }
.kb-tab.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 500;
}
.kb-pane { display: none; }
.kb-pane.active { display: block; animation: fadeUp .3s ease; }

.kb-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 20px; }
.kb-form label { display: flex; flex-direction: column; gap: 7px; }
.kb-form input { width: 132px; }
.kb-hint { font-size: 12px; color: var(--text-faint); padding-bottom: 11px; }

.kb-search { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.kb-search input { flex: 0 1 280px; border-radius: 20px; }
.kb-count { font-size: 12px; color: var(--text-faint); }
.kb-table .del-btn { opacity: 1; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 50;
  background: var(--mask);
  display: none; place-items: center;
}
.modal-mask.show { display: grid; }
.modal {
  width: 320px; padding: 28px;
  background: var(--surface);
  border-radius: 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  animation: fadeUp .25s ease;
}
.modal h3 { margin-bottom: 6px; font-size: 16px; }
.modal-sub { font-size: 12px; color: var(--text-dim); margin-bottom: 18px; }
.modal-row { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.modal-row input { flex: 1; font-size: 15px; }
.modal-row span { color: var(--text-dim); font-size: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 34px; left: 50%; z-index: 60;
  transform: translate(-50%, 16px);
  padding: 10px 24px; border-radius: 30px;
  background: var(--toast-bg); color: var(--toast-text);
  font-size: 13px; letter-spacing: .5px;
  opacity: 0; pointer-events: none;
  box-shadow: 0 10px 28px rgba(37, 51, 77, .3);
  transition: all .28s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 待办事项 ---------- */
.todo-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.todo-form label { display: flex; flex-direction: column; gap: 7px; }
.todo-form label.grow { flex: 1; min-width: 220px; }
.todo-form label > span { font-size: 12px; color: var(--text-dim); letter-spacing: .5px; }
.todo-form input {
  padding: 9px 13px; border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font-size: 13.5px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.todo-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58, 110, 232, .12);
}

.todo-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.todo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background .15s ease;
  animation: fadeUp .25s ease;
}
.todo-item:hover { background: var(--accent-soft); }
.todo-check {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%; border: 1.5px solid var(--border-strong);
  background: var(--surface); cursor: pointer;
  display: grid; place-items: center;
  color: transparent; font-size: 12px; line-height: 1;
  transition: all .15s ease;
}
.todo-check:hover { border-color: var(--accent); }
.todo-item.done .todo-check {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.todo-text { flex: 1; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-item.done .todo-text { text-decoration: line-through; color: var(--text-faint); }
.todo-due {
  flex-shrink: 0; font-size: 12px;
  padding: 4px 10px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.todo-due:hover { border-color: var(--accent); color: var(--accent); }
.todo-due-input {
  flex-shrink: 0; width: 140px;
  padding: 4px 8px; border-radius: 9px;
  border: 1px solid var(--accent);
  background: var(--surface); color: var(--text);
  font-size: 12.5px; font-family: inherit; outline: none;
  color-scheme: var(--color-scheme);
  box-shadow: 0 0 0 3px rgba(58, 110, 232, .12);
}
.todo-due.soon { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.todo-due.today { color: #b57a1f; border-color: #e5c48a; background: #fdf3e2; }
.todo-due.overdue { color: var(--rose); border-color: var(--rose); background: rgba(210, 96, 124, .08); }
:root[data-theme="dark"] .todo-due.today { color: #e0b56a; border-color: #8a6c33; background: rgba(217, 154, 78, .12); }
.todo-item .del-btn { flex-shrink: 0; }

/* ---------- AI 新闻推送 ---------- */
.mi-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rose); display: none; flex-shrink: 0;
}
.mi-dot.show { display: block; }

.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-card {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 22px 24px;
  text-decoration: none; color: var(--text);
  transition: box-shadow .2s ease, transform .2s ease;
  animation: fadeUp .3s ease;
}
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.news-rank {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font-size: 16px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.news-card:nth-child(1) .news-rank { background: var(--accent); color: #fff; }
.news-body { flex: 1; min-width: 0; }
.news-title { font-size: 15.5px; font-weight: 600; line-height: 1.5; margin-bottom: 7px; }
.news-summary {
  font-size: 13px; color: var(--text-dim); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 10px;
}
.news-meta { font-size: 12px; color: var(--text-faint); display: flex; gap: 12px; flex-wrap: wrap; }
.news-arrow {
  flex-shrink: 0; color: var(--text-faint); font-size: 16px;
  transition: transform .15s ease, color .15s ease;
  margin-top: 4px;
}
.news-card:hover .news-arrow { transform: translateX(4px); color: var(--accent); }
.news-empty { text-align: center; padding: 44px 24px; }
.news-empty p { color: var(--text-faint); font-size: 13.5px; }

/* ---------- 植物大战僵尸 ---------- */
.pvz-panel { padding: 18px; }
.pvz-wrap {
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border);
  background: #2f5d34; /* 草坪底色，canvas 加载前的占位 */
  box-shadow: var(--shadow-md);
}
.pvz-wrap canvas { display: block; width: 100%; height: auto; cursor: pointer; }
.pvz-hint {
  margin-top: 14px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
}
.pvz-tip { font-size: 12px; color: var(--text-faint); }
.pvz-keys { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.pvz-keys kbd {
  padding: 2px 8px; border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  font-family: inherit; font-size: 11px; color: var(--text-dim);
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .sidebar { width: 68px; padding: 20px 10px; }
  .brand { justify-content: center; padding-bottom: 20px; }
  .brand-text, .mi-label, .sidebar-foot .foot-card, #themeLabel { display: none; }
  .menu-item { justify-content: center; padding: 12px 0; }
  .theme-toggle { justify-content: center; }
  .main { padding: 24px 18px 36px; }
}
