* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Hiragino Sans GB",
    "Noto Sans SC", "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  background: var(--bg);
  background-image: var(--bg-image);
  color: var(--t2);
  min-height: 100vh;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* ============ 整体布局 ============ */
.layout { display: flex; min-height: 100vh; }

/* ============ 侧边栏 ============ */
.sidebar {
  width: 200px; background: var(--surface);
  border-right: 1px solid var(--line);
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  padding: 18px 12px 14px; z-index: 100;
  overflow-y: auto;
  transition: transform 0.25s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 700; color: var(--t1);
  padding: 4px 8px 14px;
}
.brand-icon {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  overflow: hidden; background: #fbfbf9;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07), 0 1px 3px rgba(0, 0, 0, .3);
}
.brand-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.side-group { margin-bottom: 2px; }
.side-group-title { font-size: 11px; color: var(--t4); padding: 10px 10px 5px; }
.side-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 12px; border: none; background: none; border-radius: 10px;
  font-size: 13px; color: var(--t2); cursor: pointer; text-align: left;
  font-family: inherit; transition: all 0.15s;
}
.side-item:hover { background: var(--accent-soft); color: var(--accent-ink); }
.side-item.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.side-icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-collapse {
  margin-top: auto; display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border: none; background: none; color: var(--t3);
  font-size: 12px; cursor: pointer; border-radius: 10px;
  text-align: left; font-family: inherit; flex-shrink: 0;
}
.sidebar-collapse:hover { background: var(--accent-soft); color: var(--accent-ink); }

/* 收起状态 */
.layout.collapsed .sidebar { transform: translateX(-100%); }
.layout.collapsed .main { margin-left: 0; }
.sidebar-expand {
  display: none; position: fixed; top: 16px; left: 16px; z-index: 90;
  width: 40px; height: 40px; border: none; border-radius: 12px;
  background: var(--surface); color: var(--accent-ink); font-size: 18px; cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.18);
}
.layout.collapsed ~ .sidebar-expand { display: flex; }

/* ============ 主区域 ============ */
.main {
  flex: 1; margin-left: 200px; min-width: 0; max-width: 1480px;
  padding: 0 24px 36px;
  transition: margin-left 0.25s ease;
}
.main-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; padding-top: 20px; margin-bottom: 16px;
}
/* 侧边栏收起后，左上角的展开按钮不遮住问候语 */
.layout.collapsed .main-header .header { padding-left: 52px; }
.header .date { font-size: 12px; color: var(--t3); margin-bottom: 3px; }
.header .greeting { font-size: 21px; font-weight: 700; color: var(--t1); margin-bottom: 3px; }
.header .subtitle { font-size: 12px; color: var(--t4); }

.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.quick-actions button {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 16px; border: none; border-radius: 18px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap; font-family: inherit;
  transition: all 0.2s;
}
.quick-actions button:hover { background: var(--accent); color: var(--on-accent); }
.quick-actions button .icon { font-size: 14px; }

/* ============ 仪表盘三列网格 ============ */
.dashboard-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 14px; align-items: stretch; margin-bottom: 14px;
}
.dash-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* 每列最后一张卡片向下撑满，三列底边齐平 */
.dash-col > *:last-child { flex: 1 1 auto; }

/* ============ 卡片 ============ */
.card, .stats-card {
  background: var(--surface); border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}
.dash-col > .card:hover, .dash-col > .stats-card:hover {
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.1);
}
.card-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.card-header .title {
  font-size: 14px; font-weight: 700; color: var(--t1);
  display: flex; align-items: center; gap: 7px;
}
.card-header .title .emoji { font-size: 16px; }
.card-header .action {
  font-size: 13px; color: var(--accent-ink); cursor: pointer;
  border: none; background: none; font-weight: 500; font-family: inherit;
}
.card-header .action:hover { text-decoration: underline; }

/* ============ 进度条 ============ */
.progress-bar-container { margin-bottom: 12px; }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .progress-bar-bg { flex: 1; }
.progress-row .progress-text { margin-top: 0; white-space: nowrap; }
.progress-bar-bg { height: 6px; background: var(--accent-soft2); border-radius: 3px; overflow: hidden; }
.progress-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 3px; transition: width 0.5s ease;
}
.progress-text { font-size: 12px; color: var(--t3); }

/* ============ 任务 ============ */
.task-list { list-style: none; max-height: 264px; overflow-y: auto; }
.task-list::-webkit-scrollbar { width: 6px; }
.task-list::-webkit-scrollbar-thumb { background: var(--accent-soft2); border-radius: 3px; }
.task-list::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }
.task-item {
  display: flex; align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--line); gap: 10px;
}
.task-item:last-child { border-bottom: none; }
.task-checkbox {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line-accent); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.2s;
}
.task-checkbox.checked { background: var(--accent); border-color: var(--line-accent); }
.task-checkbox.checked::after { content: "✓"; color: var(--on-accent); font-size: 12px; font-weight: 700; }
.task-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.task-dot.purple { background: var(--accent); }
.task-dot.orange { background: var(--warn); }
.task-dot.green { background: var(--ok); }
.task-name { flex: 1; font-size: 14px; color: var(--t1); }
.task-name.done { text-decoration: line-through; color: var(--t4); }
.task-time { font-size: 12px; color: var(--t3); flex-shrink: 0; }

/* ============ 金额 ============ */
.amount { font-size: 28px; font-weight: 700; color: var(--t1); margin-bottom: 6px; }
.sub { font-size: 12px; color: var(--t3); display: flex; gap: 14px; }
.sub .income { color: var(--ok-ink); }
.sub .expense { color: var(--danger-ink); }

/* ============ 专注 ============ */
.focus-label { font-size: 14px; font-weight: 600; color: var(--t1); margin-bottom: 10px; }
.focus-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.focus-card .focus-time { font-size: 28px; font-weight: 700; color: var(--t1); margin-bottom: 3px; }
.focus-card .focus-rounds { font-size: 12px; color: var(--t3); }
.btn-focus {
  padding: 8px 14px; border: none; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s; font-family: inherit;
}
.btn-focus:hover { opacity: 0.9; }
.btn-focus.running { background: linear-gradient(135deg, var(--danger-soft2), var(--danger)); }

/* ============ 心情 ============ */
.mood-options { display: flex; justify-content: space-around; margin-top: 12px; }
.mood-option {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; padding: 6px 10px; border-radius: 12px; transition: all 0.2s;
}
.mood-option:hover, .mood-option.selected { background: var(--accent-soft); }
.mood-option .emoji { font-size: 24px; }
.mood-option .label { font-size: 11px; color: var(--t3); }
.mood-option.selected .label { color: var(--accent-ink); font-weight: 600; }
.mood-text {
  font-size: 14px; font-weight: 600; color: var(--t1); margin-top: 2px;
}
.mood-text small {
  display: block; font-size: 12px; font-weight: 400; color: var(--t3); margin-top: 4px;
}

/* --- 心情日历 --- */
.mood-head-actions { display: flex; align-items: center; gap: 10px; }
.card-header .action.active { color: var(--accent-ink); font-weight: 700; }
.mood-cal {
  display: none; margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.mood-cal.open { display: block; animation: mcIn 0.2s ease; }
@keyframes mcIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.mc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mc-title { font-size: 12px; font-weight: 600; color: var(--t1); }
.mc-nav {
  width: 22px; height: 22px; border: none; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; line-height: 1;
  cursor: pointer; font-family: inherit; padding: 0;
}
.mc-nav:hover:not(:disabled) { background: var(--accent-soft2); }
.mc-nav:disabled { opacity: 0.3; cursor: default; }
.mc-week, .mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mc-week span { text-align: center; font-size: 10px; color: var(--t4); }
.mc-day {
  border: none; background: none; font-family: inherit; padding: 0;
  border-radius: 9px; height: 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--t4); font-size: 11px; cursor: default; transition: all 0.15s;
}
.mc-day .mc-num { font-size: 11px; line-height: 1; }
.mc-day .mc-emo { font-size: 9px; line-height: 1; height: 9px; }
.mc-day.has { cursor: pointer; font-weight: 600; color: var(--t2); }
.mc-day.has:hover { filter: brightness(0.95); }
.mc-day.today { box-shadow: inset 0 0 0 1.5px var(--accent-2); }
.mc-day.picked { outline: 1.5px solid var(--line-accent); outline-offset: -1.5px; }
.mc-day.m-verygood { background: var(--accent-soft); color: var(--accent-ink); }
.mc-day.m-good { background: var(--ok-soft); color: var(--ok-ink); }
.mc-day.m-soso { background: var(--warn-soft); color: var(--warn-ink); }
.mc-day.m-tired { background: var(--info-soft); color: var(--info-ink); }
.mc-day.m-sad { background: var(--danger-soft); color: var(--danger-ink); }
.mc-detail { margin-top: 9px; min-height: 16px; font-size: 11px; line-height: 1.55; color: var(--t3); }
.mc-detail b { color: var(--accent-ink); font-weight: 600; }
.mc-pick-day { color: var(--t2); font-weight: 600; }
.mc-legend { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 8px; font-size: 10px; color: var(--t4); }
.mc-lg { display: inline-flex; align-items: center; gap: 3px; }
.mc-lg.m-verygood { color: var(--accent-ink); }
.mc-lg.m-good { color: var(--ok-ink); }
.mc-lg.m-soso { color: var(--warn-ink); }
.mc-lg.m-tired { color: var(--info-ink); }
.mc-lg.m-sad { color: var(--danger-ink); }

/* ============ 日程 ============ */
.schedule-list { list-style: none; }
.schedule-item {
  display: flex; align-items: flex-start; padding: 10px 0;
  border-bottom: 1px solid var(--line); gap: 14px;
}
.schedule-item:last-child { border-bottom: none; }
.schedule-time { font-size: 14px; font-weight: 700; color: var(--accent-ink); flex-shrink: 0; min-width: 46px; }
.schedule-info .name { font-size: 14px; font-weight: 600; color: var(--t1); margin-bottom: 2px; }
.schedule-info .location { font-size: 12px; color: var(--t3); }

/* ============ 时间计划 ============ */
.task-dot.blue { background: var(--info); }
.task-dot.pink { background: var(--danger); }
.task-empty, .schedule-empty {
  padding: 18px 0; text-align: center; font-size: 12px; color: var(--t4);
}

.plan-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.plan-title { font-size: 22px; font-weight: 700; color: var(--t1); letter-spacing: -0.2px; }
.plan-subtitle { font-size: 12.5px; color: var(--t3); margin-top: 5px; }
.plan-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-btn {
  height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); color: var(--t2); font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all .15s;
}
.plan-btn:hover { border-color: var(--line-accent); color: var(--accent-ink); background: var(--accent-soft); }
.plan-btn.primary {
  border: none; background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); box-shadow: 0 3px 9px rgba(var(--accent-rgb), .22);
}
.plan-btn.primary:hover { opacity: .92; color: var(--on-accent); }

/* 周视图 */
.plan-week { padding: 13px 16px 14px; margin-bottom: 14px; }
.plan-week-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }
.pw-label { font-size: 12px; font-weight: 600; color: var(--t3); letter-spacing: .2px; }
.pw-arrow {
  width: 24px; height: 24px; border: none; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 15px; line-height: 1;
  cursor: pointer; font-family: inherit;
}
.pw-arrow:hover { background: var(--accent-soft2); }
.plan-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.plan-day {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 8px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--accent-soft); cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.plan-day:hover { border-color: var(--line-accent); background: var(--accent-soft); }
.plan-day.selected {
  border-color: var(--line-accent); background: linear-gradient(160deg, var(--accent-soft), var(--accent-soft2));
  box-shadow: 0 3px 10px rgba(var(--accent-rgb), .16);
}
.pd-wd { font-size: 10.5px; color: var(--t4); }
.pd-num {
  width: 27px; height: 25px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 17px; font-weight: 700; color: var(--t2); line-height: 1;
}
.plan-day.today .pd-num { background: var(--accent); color: var(--on-accent); box-shadow: 0 2px 6px rgba(var(--accent-rgb), .25); }
.pd-meta { display: flex; align-items: center; gap: 4px; min-height: 12px; font-size: 9.5px; color: var(--accent-ink); }
.pd-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.pd-dot.t { background: var(--accent-2); }
.pd-dot.s { background: var(--warn); }
.pd-free { font-size: 9.5px; color: var(--accent-ink); }
.plan-week-legend {
  display: flex; justify-content: flex-end; gap: 12px;
  margin-top: 8px; font-size: 10px; color: var(--t4);
}
.plan-week-legend span { display: inline-flex; align-items: center; gap: 4px; }

/* 当日概览 */
.plan-summary { display: grid; grid-template-columns: repeat(4, 1fr); padding: 14px 18px; margin-bottom: 16px; }
.ps-block { display: flex; flex-direction: column; gap: 4px; padding: 0 18px; border-left: 1px solid var(--line); }
.ps-block:first-child { border-left: none; padding-left: 0; }
.ps-block b { font-size: 22px; font-weight: 700; color: var(--t1); line-height: 1.1; }
.ps-block span { font-size: 11px; color: var(--accent-ink); }

/* 主区域 */
.plan-grid {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .85fr);
  gap: 16px; align-items: start;
}
.plan-side { display: flex; flex-direction: column; gap: 16px; }

/* 时间轴 */
.plan-timeline-card { padding: 18px 20px 16px; --ptl-time: 46px; --ptl-gap: 10px; }
.plan-date-chip {
  margin-left: 4px; padding: 2px 8px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 10.5px; font-weight: 500;
}
.plan-count { font-size: 11.5px; color: var(--accent-ink); }
.plan-timeline { position: relative; }
.plan-timeline.is-empty::before { display: none; }
.plan-timeline::before {
  content: ""; position: absolute;
  left: calc(var(--ptl-time) + var(--ptl-gap) + 7px);
  top: 13px; bottom: 13px; width: 2px; background: var(--accent-2);
}
.ptl-item {
  display: grid; grid-template-columns: var(--ptl-time) 14px minmax(0, 1fr);
  gap: var(--ptl-gap); padding-bottom: 12px; position: relative;
}
.ptl-time {
  padding-top: 12px; text-align: right; font-size: 11.5px; font-weight: 600;
  color: var(--t3); font-variant-numeric: tabular-nums;
}
.ptl-rail { display: flex; justify-content: center; }
.ptl-dot {
  position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 15px;
  border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px var(--surface);
}
.ptl-dot.orange { background: var(--warn); }
.ptl-dot.green { background: var(--ok); }
.ptl-dot.blue { background: var(--info); }
.ptl-dot.pink { background: var(--danger); }
.ptl-dot.schedule { background: var(--warn); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px var(--warn-soft); }
.ptl-card {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--accent-soft);
  cursor: pointer; transition: all .15s;
}
.ptl-card:hover { border-color: var(--line-accent); background: var(--accent-soft); }
.ptl-item.done .ptl-card { opacity: .62; }
.ptl-main { display: flex; gap: 9px; flex: 1; min-width: 0; }
.ptl-text { flex: 1; min-width: 0; }
.ptl-name {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13.5px; font-weight: 600; color: var(--t2);
}
.ptl-item.done .ptl-name { text-decoration: line-through; color: var(--t4); }
.ptl-sub { margin-top: 3px; font-size: 11px; color: var(--accent-ink); }
.ptl-badge { padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-size: 9.5px; font-weight: 600; }
.ptl-badge.sched { background: var(--warn-soft); color: var(--warn-ink); }
.ptl-badge.conflict { background: var(--danger-soft); color: var(--danger-ink); }
.ptl-check {
  width: 17px; height: 17px; margin-top: 2px; border: 1.8px solid var(--line-accent);
  border-radius: 50%; background: var(--surface); cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--on-accent); padding: 0;
}
.ptl-check.checked { background: var(--accent); border-color: var(--line-accent); }
.ptl-check.checked::after { content: "✓"; font-weight: 700; }
.ptl-actions { display: flex; gap: 1px; opacity: 0; transition: opacity .15s; }
.ptl-card:hover .ptl-actions { opacity: 1; }
.ptl-act, .pt-act {
  border: none; background: none; color: var(--accent-ink); font-size: 12px; line-height: 1;
  padding: 3px 5px; border-radius: 6px; cursor: pointer; font-family: inherit;
}
.ptl-act:hover, .pt-act:hover { background: var(--accent-soft); color: var(--accent-ink); }
.ptl-act.del:hover, .pt-act.del:hover { background: var(--danger-soft); color: var(--danger-ink); }

.ptl-now { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; }
.ptl-now span { font-size: 10px; font-weight: 700; color: var(--danger-ink); white-space: nowrap; }
.ptl-now i { flex: 1; height: 1.5px; background: linear-gradient(90deg, var(--danger-soft2), rgba(var(--danger-rgb), 0)); }
.ptl-gap {
  display: flex; align-items: center; gap: 7px; margin: 0 0 12px calc(var(--ptl-time) + var(--ptl-gap) + 2px);
  font-size: 10px; color: var(--t4);
}
.ptl-gap::before { content: ""; width: 18px; height: 1px; background: var(--accent-soft2); }

.plan-empty { padding: 44px 16px; text-align: center; color: var(--accent-ink); font-size: 13px; line-height: 1.7; }
.plan-empty b { display: block; margin-bottom: 7px; font-size: 26px; }
.plan-empty span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--accent-ink); }

/* 待办清单 */
.plan-todo-card { padding: 16px 18px; }
.plan-filters { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--accent-soft); }
.plan-filters button {
  border: none; background: none; padding: 4px 7px; border-radius: 6px;
  font-size: 10.5px; color: var(--t3); cursor: pointer; font-family: inherit; white-space: nowrap;
}
.plan-filters button.active {
  background: var(--surface); color: var(--accent-ink); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.plan-quickadd { display: flex; gap: 6px; margin: 11px 0 3px; }
#planQuickName {
  flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--accent-soft); font-size: 12.5px; outline: none;
  font-family: inherit; color: var(--t2); transition: all .15s;
}
#planQuickName:focus { border-color: var(--line-accent); background: var(--surface); }
#planQuickTime {
  width: 88px; padding: 8px 5px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--accent-soft); font-size: 11px; font-family: inherit; color: var(--t2); outline: none;
}
#planQuickTime:focus { border-color: var(--line-accent); background: var(--surface); }
.plan-quickadd > button {
  width: 34px; flex-shrink: 0; border: none; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 17px; line-height: 1; cursor: pointer;
}
.plan-quickadd > button:hover { opacity: .9; }

.plan-todo-list { list-style: none; max-height: 300px; overflow-y: auto; margin-top: 2px; }
.plan-todo-list::-webkit-scrollbar { width: 5px; }
.plan-todo-list::-webkit-scrollbar-thumb { background: var(--accent-soft2); border-radius: 3px; }
.plan-todo { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan-todo:last-child { border-bottom: none; }
.pt-check {
  width: 16px; height: 16px; flex-shrink: 0; border: 1.8px solid var(--line-accent);
  border-radius: 50%; background: var(--surface); cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 9px; color: var(--on-accent); padding: 0;
}
.pt-check.checked { background: var(--accent); border-color: var(--line-accent); }
.pt-check.checked::after { content: "✓"; font-weight: 700; }
.pt-color { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; }
.pt-color.purple { background: var(--accent); }
.pt-color.orange { background: var(--warn); }
.pt-color.green { background: var(--ok); }
.pt-color.blue { background: var(--info); }
.pt-color.pink { background: var(--danger); }
.pt-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 12.5px; color: var(--t2);
}
.plan-todo.done .pt-name { text-decoration: line-through; color: var(--t4); }
.pt-time { flex-shrink: 0; font-size: 10px; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.plan-todo .pt-act { opacity: 0; }
.plan-todo:hover .pt-act { opacity: 1; }
.plan-empty-sm { padding: 24px 0; text-align: center; font-size: 11.5px; color: var(--t4); }

/* 计划检查 */
.plan-check-card { padding: 16px 18px; }
.pc-badge { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 9.5px; font-weight: 600; }
.pc-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.pc-list li { display: flex; gap: 7px; font-size: 11.5px; line-height: 1.55; color: var(--t3); }
.pc-list li.warn { color: var(--warn-ink); }
.pc-list li.ok { color: var(--ok-ink); }
.pc-list li.clickable { cursor: pointer; }
.pc-list li.clickable:hover { color: var(--accent-ink); }
.pc-ico { flex-shrink: 0; font-size: 11px; line-height: 1.55; }

@media (max-width: 1100px) {
  .plan-grid { grid-template-columns: 1fr; }
  .plan-side { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .plan-side { grid-template-columns: 1fr; }
  .plan-summary { grid-template-columns: repeat(2, 1fr); gap: 12px 0; }
  .ps-block:nth-child(3) { border-left: none; padding-left: 0; }
}
@media (max-width: 700px) {
  .plan-head { align-items: flex-start; }
  .plan-title { font-size: 19px; }
  .plan-head-actions { width: 100%; }
  .plan-btn { flex: 1; padding: 0 8px; font-size: 12px; }
  .plan-days { gap: 4px; }
  .plan-day { padding: 7px 2px 6px; border-radius: 9px; }
  .pd-wd { font-size: 8.5px; }
  .pd-num { width: 23px; height: 22px; font-size: 14px; }
  .pd-meta { font-size: 8.5px; gap: 2px; }
  .plan-timeline-card { --ptl-time: 38px; --ptl-gap: 8px; padding: 16px 14px; }
  .ptl-time { font-size: 10.5px; }
  .ptl-card { padding: 9px 10px; }
  .ptl-name { font-size: 12.5px; }
  .ptl-actions { opacity: 1; }
  .plan-todo .pt-act { opacity: 1; }
}
@media (hover: none) {
  .ptl-actions, .plan-todo .pt-act { opacity: 1; }
}

/* ============ 学习进度 ============ */
.learning-card .progress-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.learning-card .progress-info .name { font-size: 14px; font-weight: 600; color: var(--t1); }
.learning-card .progress-info .pct { font-size: 13px; color: var(--accent-ink); font-weight: 600; }
.learning-card .progress-bar-bg { height: 6px; background: var(--accent-soft2); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.learning-card .progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 3px; }
.learning-card .meta { font-size: 12px; color: var(--t3); }

/* ============ 健康 ============ */
.health-stats { display: flex; gap: 10px; }
.health-stat { flex: 1; text-align: center; padding: 10px 6px; background: var(--accent-soft); border-radius: 10px; }
.health-stat .value { font-size: 16px; font-weight: 700; color: var(--t1); margin-bottom: 3px; }
.health-stat .label { font-size: 11px; color: var(--t3); }

/* ============ AI 健康顾问 ============ */
.ai-card {
  display: flex; flex-direction: column;
  background: linear-gradient(165deg, var(--accent-soft2) 0%, var(--accent-soft) 100%);
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.ai-card::after {
  content: ""; position: absolute; top: -46px; right: -34px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0) 70%);
  pointer-events: none;
}
.ai-card > * { position: relative; z-index: 1; }
.ai-card .card-header { margin-bottom: 10px; }
.ai-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.6px;
  padding: 1px 6px; border-radius: 6px; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

.ai-summary {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 1px 4px rgba(var(--accent-rgb), 0.07);
  min-height: 62px;
}
.ai-score-box {
  display: flex; align-items: baseline; gap: 2px; flex-shrink: 0;
  padding-right: 12px; border-right: 1px solid var(--line);
}
.ai-score { font-size: 24px; font-weight: 700; color: var(--accent-ink); line-height: 1; }
.ai-score-unit { font-size: 10px; color: var(--t4); }
.ai-summary-text { min-width: 0; }
.ai-summary-title { font-size: 13px; font-weight: 700; color: var(--t1); margin-bottom: 3px; }
.ai-summary-desc { font-size: 11.5px; color: var(--t3); line-height: 1.55; }

.ai-tips { list-style: none; margin-top: 8px; flex: 1 1 auto; }
.ai-tip {
  display: flex; gap: 9px; padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  animation: aiFadeUp 0.35s ease both;
}
.ai-tip:last-child { border-bottom: none; }
.ai-tip-icon {
  width: 24px; height: 24px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; background: var(--accent-soft);
}
.ai-tip.good .ai-tip-icon { background: var(--ok-soft); }
.ai-tip.warn .ai-tip-icon { background: var(--warn-soft); }
.ai-tip.bad  .ai-tip-icon { background: var(--danger-soft); }
.ai-tip.tip  .ai-tip-icon { background: var(--info-soft); }
.ai-tip-title { font-size: 12px; font-weight: 600; color: var(--t2); margin-bottom: 2px; }
.ai-tip-text { font-size: 11.5px; color: var(--t3); line-height: 1.6; }
.ai-more {
  padding: 8px 0 2px; font-size: 11.5px; color: var(--accent-ink);
  cursor: pointer; text-align: right;
}
.ai-more:hover { text-decoration: underline; }

.ai-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line);
  font-size: 10.5px; color: var(--t4);
}

/* 分析中 */
.ai-thinking { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--t3); }
.ai-thinking .dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2);
  animation: aiBlink 1.2s infinite ease-in-out;
}
.ai-thinking .dot:nth-child(2) { animation-delay: 0.2s; }
.ai-thinking .dot:nth-child(3) { animation-delay: 0.4s; }
.ai-thinking-text { margin-left: 4px; line-height: 1.5; }
.ai-tip.skeleton {
  height: 30px; border-radius: 8px; border-bottom: none;
  background: linear-gradient(90deg, var(--accent-soft) 25%, var(--accent-soft2) 37%, var(--accent-soft) 63%);
  background-size: 400% 100%;
  animation: aiShimmer 1.2s infinite linear;
}

@keyframes aiFadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes aiBlink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@keyframes aiShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ============ 健康管理页 ============ */
.health-stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 14px;
}
.health-stat-card {
  background: var(--surface); border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}
.health-stat-card:hover { box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.1); }
.hs-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--t3); margin-bottom: 8px; }
.hs-icon { font-size: 14px; }
.hs-value { font-size: 20px; font-weight: 700; color: var(--t1); }
.health-update-card { margin-bottom: 14px; }
.update-title { font-size: 15px; font-weight: 700; color: var(--t1); margin-bottom: 16px; }
.health-update-card .field { margin-bottom: 14px; }

@media (max-width: 900px) {
  .health-stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ============ 图表 ============ */
.chart-container {
  display: flex; align-items: flex-end; justify-content: space-around;
  height: 110px; padding: 8px 0 0;
}
/* 卡片被拉伸时，图表区域跟着变高，柱子按百分比缩放 */
.chart-card { display: flex; flex-direction: column; }
.chart-card .chart-container { flex: 1 1 auto; height: auto; min-height: 110px; }
.chart-bar-wrapper {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; height: 100%; justify-content: flex-end; gap: 6px;
}
.chart-bar {
  width: 30px; background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-radius: 5px 5px 0 0; transition: height 0.5s ease; min-height: 4px;
}
.chart-label { font-size: 11px; color: var(--t3); }
.chart-empty {
  width: 100%; align-self: center; text-align: center;
  font-size: 12px; color: var(--t4); line-height: 1.7; padding: 0 12px;
}

/* ============ 记录 ============ */
.record-list { list-style: none; }
.record-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.record-item:last-child { border-bottom: none; }
.record-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.record-content { flex: 1; font-size: 14px; color: var(--t1); }
.record-meta { font-size: 12px; color: var(--t3); text-align: right; flex-shrink: 0; }
.record-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }

/* ============ 笔记 / 随手记 ============ */
.quick-note { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.quick-note input {
  flex: 1; padding: 9px 14px; border: 1px solid var(--line-2);
  border-radius: 12px; font-size: 13px; outline: none; font-family: inherit;
  background: var(--accent-soft); min-width: 0;
}
.quick-note input:focus { border-color: var(--line-accent); background: var(--surface); }
.quick-note .mic { font-size: 14px; opacity: 0.5; flex-shrink: 0; cursor: pointer; transition: opacity 0.2s; }
.quick-note .mic:hover { opacity: 0.9; }
.quick-note button.add {
  width: 34px; height: 34px; flex-shrink: 0; border: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--on-accent);
  font-size: 17px; cursor: pointer; transition: opacity 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.quick-note button.add:hover { opacity: 0.88; }

/* 标签胶囊 */
.note-chip {
  display: inline-block; flex-shrink: 0;
  font-size: 11px; font-weight: 600; line-height: 1.6;
  padding: 1px 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.note-chip.purple { background: var(--accent-soft); color: var(--accent-ink); }
.note-chip.orange { background: var(--warn-soft); color: var(--warn-ink); }
.note-chip.blue   { background: var(--info-soft); color: var(--info-ink); }
.note-chip.pink   { background: var(--danger-soft); color: var(--danger-ink); }

/* 随手记录页：输入区 + 标签选择 */
.note-composer { margin-bottom: 14px; }
.note-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.note-tag-chip {
  padding: 6px 14px; border: none; border-radius: 16px;
  background: var(--accent-soft); color: var(--t3); font-size: 12.5px;
  cursor: pointer; font-family: inherit; transition: all 0.18s;
}
.note-tag-chip:hover { background: var(--accent-soft); color: var(--accent-ink); }
.note-tag-chip.active {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-weight: 600;
  box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.25);
}

/* 随手记录页：标签卡片网格 */
.note-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.note-card {
  background: var(--surface); border-radius: 14px; padding: 14px 16px;
  border-top: 3px solid var(--line-2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.note-card:hover { box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.12); transform: translateY(-1px); }
.note-card.purple { border-top-color: var(--line-accent); }
.note-card.orange { border-top-color: var(--warn-soft2); }
.note-card.blue   { border-top-color: var(--info-soft2); }
.note-card.pink   { border-top-color: var(--danger-soft2); }
.note-card-top { display: flex; align-items: center; justify-content: space-between; }
.note-del {
  border: none; background: none; color: var(--accent-ink); cursor: pointer;
  font-size: 12px; line-height: 1; padding: 4px 6px; border-radius: 6px;
  transition: all 0.15s;
}
.note-del:hover { background: var(--danger-soft); color: var(--danger-ink); }
.note-card-text { font-size: 13.5px; color: var(--t2); line-height: 1.65; word-break: break-word; }
.note-card-time { font-size: 11px; color: var(--t4); margin-top: auto; display: flex; align-items: center; gap: 4px; }
.note-clock { font-size: 10px; opacity: 0.75; }
.note-empty {
  grid-column: 1 / -1; text-align: center; padding: 44px 16px;
  background: var(--surface); border-radius: 14px; color: var(--t3); font-size: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); line-height: 1.8;
}
.note-empty small { color: var(--t4); font-size: 12px; }

/* 分类胶囊（实心） */
.note-cat {
  display: inline-block; flex-shrink: 0;
  font-size: 11px; font-weight: 600; line-height: 1.7;
  padding: 1px 8px; border-radius: 6px;
}
.note-cat.purple { background: var(--accent-soft); color: var(--accent-ink); }
.note-cat.blue   { background: var(--info-soft); color: var(--info-ink); }
.note-cat.green  { background: var(--ok-soft); color: var(--ok-ink); }
.note-cat.orange { background: var(--warn-soft); color: var(--warn-ink); }

/* 标签（浅色） */
.note-tag-mini {
  display: inline-block; flex-shrink: 0;
  font-size: 10.5px; line-height: 1.7;
  padding: 1px 7px; border-radius: 6px;
  background: var(--accent-soft); color: var(--t3);
}
.note-tag-mini.purple { background: var(--accent-soft); color: var(--accent-ink); }
.note-tag-mini.orange { background: var(--warn-soft); color: var(--warn-ink); }
.note-tag-mini.blue   { background: var(--info-soft); color: var(--info-ink); }
.note-tag-mini.pink   { background: var(--danger-soft); color: var(--danger-ink); }

.note-card-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-width: 0; }

/* 录入区：分类行 + 标签输入 */
.composer-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.composer-label { font-size: 12px; color: var(--t3); flex-shrink: 0; }
.tag-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px dashed var(--line-2); border-radius: 10px;
  background: var(--accent-soft);
}
.tag-input-row:focus-within { border-color: var(--line-accent); background: var(--surface); }
.tag-hash { color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.tag-input-row input {
  flex: 1; border: none; outline: none; background: none;
  font-size: 12.5px; font-family: inherit; color: var(--t2); min-width: 0;
}
.tag-input-row input::placeholder { color: var(--accent-ink); }

/* 筛选栏：分类 + 标签 */
.note-filters { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 14px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border: none; border-radius: 14px;
  background: var(--surface); color: var(--t3); font-size: 12px; cursor: pointer;
  font-family: inherit; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.18s;
}
.filter-chip:hover { color: var(--accent-ink); }
.filter-chip.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.filter-chip.tag { background: var(--accent-soft); }
.filter-chip.tag.active { background: var(--accent-soft2); }
.filter-count {
  min-width: 16px; padding: 0 5px; border-radius: 8px;
  background: var(--accent-soft); color: var(--t4); font-size: 10.5px; text-align: center;
}
.filter-chip.active .filter-count { background: var(--accent); color: var(--on-accent); }

@media (max-width: 1100px) { .note-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px)  { .note-cards { grid-template-columns: 1fr; } }

.notes-list { list-style: none; max-height: 190px; overflow-y: auto; }
.notes-list::-webkit-scrollbar { width: 6px; }
.notes-list::-webkit-scrollbar-thumb { background: var(--accent-soft2); border-radius: 3px; }
.note-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.note-item:last-child { border-bottom: none; }
.note-item .note-text { flex: 1; font-size: 13px; color: var(--t2); line-height: 1.6; min-width: 0; }
.note-item .note-time { font-size: 11px; color: var(--t4); flex-shrink: 0; white-space: nowrap; }

/* ============ 食谱 / 提示列表 ============ */
.recipe-list, .tips-list { list-style: none; }
.recipe-item, .tip-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--t2); line-height: 1.6;
}
.recipe-item:last-child, .tip-item:last-child { border-bottom: none; }
.recipe-emoji { font-size: 26px; flex-shrink: 0; }
.recipe-name { font-size: 15px; font-weight: 600; color: var(--t1); margin-bottom: 2px; }
.recipe-desc { font-size: 13px; color: var(--t3); }

/* ============ 弹窗 ============ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.4); z-index: 200;
  align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--surface); border-radius: 20px;
  width: 100%; max-width: 460px; padding: 24px 20px;
  max-height: 80vh; overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; color: var(--t1); }
.modal input, .modal textarea, .modal select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-2);
  border-radius: 10px; font-size: 14px; margin-bottom: 12px;
  outline: none; font-family: inherit;
}
.modal input:focus, .modal textarea:focus { border-color: var(--line-accent); }
.modal textarea { resize: vertical; min-height: 80px; }
.modal-btns { display: flex; gap: 12px; margin-top: 8px; }
.modal-btns button {
  flex: 1; padding: 12px; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn-cancel { background: var(--accent-soft); color: var(--accent-ink); }
.btn-confirm { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--on-accent); }
.modal-row { display: flex; gap: 10px; }
.modal-row .modal-field { flex: 1; min-width: 0; }
.modal-field { display: block; margin-bottom: 12px; }
.modal-field > span { display: block; margin-bottom: 6px; font-size: 11.5px; color: var(--t3); }
.modal-field input, .modal-field select { margin-bottom: 0; }
.modal-btns .btn-delete { flex: 0 0 auto; background: var(--danger-soft); color: var(--danger-ink); padding-left: 16px; padding-right: 16px; }
.modal-btns .btn-delete:hover { background: var(--danger); color: var(--on-accent); }

.section-hidden { display: none; }

/* ============ 偏好设置 ============ */
.settings-wrap { max-width: 880px; margin: 0 auto; padding-top: 8px; }
.settings-title-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.settings-back {
  width: 34px; height: 34px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface-2); color: var(--accent-ink); font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; line-height: 1; transition: all .18s;
}
.settings-back:hover { background: var(--surface-3); border-color: var(--line-accent); }
.settings-title { font-size: 22px; font-weight: 700; color: var(--t1); letter-spacing: -0.2px; }
.settings-subtitle { font-size: 13px; color: var(--t3); margin-top: 2px; }

/* 页头：kicker + 标题，和日记 / 资讯页同一套层级 */
.settings-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.settings-head-text { flex: 1; min-width: 0; }
.settings-kicker {
  display: flex; align-items: center; gap: 8px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 2.6px; color: var(--accent-ink);
}
.settings-kicker::before {
  content: ""; width: 16px; height: 1px; flex-shrink: 0;
  background: var(--accent-ink); opacity: 0.5;
}
.settings-head .settings-title { margin-top: 7px; font-size: 25px; font-weight: 650; letter-spacing: -0.4px; }
.settings-head .settings-subtitle { margin-top: 5px; font-size: 12px; color: var(--t3); }

/* 卡片栅格：宽屏两列，主题与 AI 通栏 */
.settings-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px; align-items: stretch;
}
.settings-grid > .settings-section { margin-bottom: 0; height: 100%; }
.settings-section.span-2 { grid-column: 1 / -1; }

.settings-section {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 20px 20px;
  box-shadow: var(--card-shadow); margin-bottom: 16px;
}
.settings-section-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 650; color: var(--t1);
  letter-spacing: 0.1px; margin-bottom: 14px;
}
.settings-section-head .s-title { flex: 1; min-width: 0; }
.settings-section-head .s-icon {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent-soft); border: 1px solid var(--line-accent);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
}
.settings-section-head .s-icon svg { width: 14px; height: 14px; }
/* 危险区：只把图标染色，卡片本身不动 */
.settings-section.is-danger .s-icon {
  background: var(--danger-soft); border-color: rgba(var(--danger-rgb), 0.28); color: var(--danger-ink);
}

.field { flex: 1; min-width: 0; }
.field label { display: block; font-size: 11.5px; color: var(--t3); letter-spacing: .4px; margin-bottom: 7px; }
.field input {
  width: 100%; box-sizing: border-box; padding: 10px 13px; border: 1px solid var(--line-2);
  border-radius: 10px; font-size: 13.5px; outline: none; font-family: inherit;
  background: var(--surface-2); color: var(--t1);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: var(--t4); }
.field input:focus {
  border-color: var(--line-accent); background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row + .field { margin-top: 12px; }

/* 带单位的数字输入 */
.input-unit { position: relative; }
.input-unit input { padding-right: 52px; }
.input-unit span {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 11.5px; color: var(--t4); pointer-events: none; letter-spacing: .3px;
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input[type="number"] { -moz-appearance: textfield; }

/* 说明文字：比正文小一档，贴着对应控件 */
.settings-hint { font-size: 11px; line-height: 1.65; color: var(--t4); margin-top: 10px; }
.settings-divider { height: 1px; background: var(--line); margin: 14px 0; }

/* 个人信息：头像 + 昵称 */
.settings-profile { display: flex; align-items: flex-start; gap: 14px; }
.settings-profile .field { flex: 1; min-width: 0; }
.settings-avatar {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--accent-soft2), var(--accent-soft));
  border: 1px solid var(--line-accent); color: var(--accent-ink);
  font-size: 18px; font-weight: 600; letter-spacing: .5px;
}

.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.switch-label { font-size: 14px; color: var(--t1); font-weight: 500; }
.switch-desc { font-size: 12px; color: var(--t4); margin-top: 3px; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--surface-3); border-radius: 26px; transition: 0.25s;
}
.switch .slider::before {
  content: ""; position: absolute; width: 20px; height: 20px;
  left: 3px; top: 3px; background: var(--on-accent); border-radius: 50%;
  transition: 0.25s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.settings-note { font-size: 12.5px; color: var(--t3); line-height: 1.65; margin-bottom: 14px; }
.danger-row { display: flex; gap: 10px; flex-wrap: wrap; }
.settings-grid .danger-row > button { flex: 1 1 45%; font-size: 13px; padding: 10px 12px; }
.settings-grid .ai-settings-actions .btn-outline { font-size: 13px; padding: 9px 14px; }

/* 保存条：吸底浮层，滚到哪儿都能点 */
.settings-save-bar {
  position: sticky; bottom: 10px; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  margin-top: 16px; padding: 10px 10px 10px 16px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}
.settings-save-hint { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.5; color: var(--t4); }
.settings-save-bar .btn-save {
  width: auto; padding: 11px 24px; font-size: 13.5px; border-radius: 11px;
  box-shadow: 0 6px 16px -6px rgba(var(--accent-rgb), 0.55);
}

/* 容器不够宽时退回单列：两列各自小于 380px 就会挤 */
@media (max-width: 1000px) {
  .settings-wrap { max-width: 560px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .settings-section.span-2 { grid-column: auto; }
  .settings-grid > .settings-section { height: auto; }
  .settings-grid .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .settings-head { gap: 12px; margin-bottom: 16px; }
  .settings-head .settings-title { font-size: 21px; }
  .settings-section { padding: 16px 15px 17px; border-radius: 16px; }
  .settings-save-bar { bottom: 8px; padding: 8px; border-radius: 14px; }
  .settings-save-hint { display: none; }
  .settings-save-bar .btn-save { width: 100%; }
  .settings-grid .danger-row > button { flex: 1 1 100%; }
}
.btn-outline {
  padding: 10px 18px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); color: var(--t2); font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.btn-outline:hover { border-color: var(--line-accent); color: var(--accent-ink); }
.btn-danger {
  padding: 10px 18px; border: none; border-radius: 10px;
  background: var(--danger-soft); color: var(--danger-ink); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.btn-danger:hover { background: var(--danger); color: var(--on-accent); }

.btn-save {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: opacity 0.2s;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}
.btn-save:hover { opacity: 0.92; }

/* 专注目标进度 */
.focus-goal { margin-top: 16px; }
.focus-goal .progress-bar-bg { background: var(--accent-soft2); }
.focus-goal-text { font-size: 12px; color: var(--t3); margin-top: 6px; }

/* ============ 轻提示 ============ */
#toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: var(--toast-bg); color: var(--on-accent);
  padding: 10px 22px; border-radius: 24px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 300;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 美味食谱 ============ */
.recipes-wrap { max-width: 760px; margin: 0 auto; padding-top: 8px; }
.recipes-title-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.recipes-title-row .settings-title-row-gap { flex: 1; }
.btn-recipe-add {
  margin-left: auto; padding: 9px 16px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: opacity 0.2s; flex-shrink: 0;
}
.btn-recipe-add:hover { opacity: 0.9; }

.recipes-toolbar {
  display: flex; gap: 12px; margin-bottom: 14px; align-items: stretch;
}

/* 分区内标签：全部食谱 / 收藏夹 */
.recipe-tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.recipe-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: none; border-radius: 20px;
  background: var(--surface); color: var(--t2); font-size: 13px; cursor: pointer;
  font-family: inherit; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.2s;
}
.recipe-tab:hover { color: var(--accent-ink); }
.recipe-tab.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.recipe-tab .tab-star { color: var(--accent-ink); font-size: 14px; transition: color 0.2s; }
.recipe-tab.active .tab-star { color: var(--warn-ink); }
.tab-count {
  min-width: 18px; padding: 1px 6px; border-radius: 10px;
  background: var(--accent-soft); color: var(--t3); font-size: 12px; text-align: center;
}
.recipe-tab.active .tab-count { background: var(--accent); color: var(--on-accent); }
.recipe-search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 14px; min-width: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.recipe-search:focus-within { border-color: var(--line-accent); }
.recipe-search .search-icon { font-size: 14px; opacity: 0.6; }
.recipe-search input {
  flex: 1; border: none; outline: none; background: none;
  padding: 11px 0; font-size: 14px; font-family: inherit; min-width: 0;
}

.cat-dropdown { position: relative; flex-shrink: 0; }.cat-btn {
  display: flex; align-items: center; gap: 8px; height: 100%;
  padding: 0 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--t2); font-size: 14px; cursor: pointer;
  font-family: inherit; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.cat-btn:hover { border-color: var(--line-accent); color: var(--accent-ink); }
.cat-btn .caret { font-size: 12px; color: var(--t3); }
.cat-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 160px; background: var(--surface); border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); padding: 6px; z-index: 50;
}
.cat-menu.open { display: block; }
.cat-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 9px 12px; border: none; background: none;
  border-radius: 8px; font-size: 14px; color: var(--t2); cursor: pointer;
  text-align: left; font-family: inherit;
}
.cat-item:hover { background: var(--accent-soft); color: var(--accent-ink); }
.cat-item.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.cat-count { font-size: 12px; color: var(--t4); }

.recipes-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.recipe-card {
  background: var(--surface); border-radius: 14px; padding: 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  transition: box-shadow 0.2s;
}
.recipe-card:hover { box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.12); }
.recipe-card-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.recipe-card-name { font-size: 16px; font-weight: 700; color: var(--t1); }
.star-btn {
  border: none; background: none; cursor: pointer; font-size: 20px;
  color: var(--accent-ink); padding: 2px 4px; line-height: 1; transition: transform 0.15s;
}
.star-btn:hover { transform: scale(1.15); }
.star-btn.active { color: var(--warn-ink); }

.recipe-tag {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 6px;
}
.recipe-tag.purple { background: var(--accent-soft); color: var(--accent-ink); }
.recipe-tag.pink   { background: var(--danger-soft); color: var(--danger-ink); }
.recipe-tag.orange { background: var(--warn-soft); color: var(--warn-ink); }
.recipe-tag.green  { background: var(--ok-soft); color: var(--ok-ink); }
.recipe-tag.blue   { background: var(--info-soft); color: var(--info-ink); }

.recipe-card-body { display: flex; flex-direction: column; gap: 6px; }
.recipe-line { font-size: 13px; color: var(--t2); line-height: 1.6; }
.recipe-card-foot {
  display: flex; gap: 6px; justify-content: flex-end; width: 100%; margin-top: auto;
}
.icon-btn {
  border: none; background: none; cursor: pointer; font-size: 15px;
  color: var(--t3); padding: 6px 8px; border-radius: 8px; transition: all 0.15s;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger-ink); }

.recipes-empty {
  grid-column: 1 / -1; text-align: center; padding: 48px 16px;
  background: var(--surface); border-radius: 14px; color: var(--t2); font-size: 15px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.recipes-empty small { color: var(--t4); font-size: 13px; }

@media (max-width: 560px) {
  .recipes-grid { grid-template-columns: 1fr; }
  .recipes-toolbar { flex-direction: column; }
  .cat-btn { min-height: 44px; justify-content: center; }
}

/* ============ 下载中心 ============ */
.dl-wrap { max-width: 1080px; margin: 0 auto; }
.dl-head { display: flex; align-items: flex-start; gap: 14px; padding-top: 4px; margin-bottom: 18px; }
.dl-head-text { min-width: 0; }
.dl-title { margin-top: 7px; font-size: 25px; font-weight: 650; letter-spacing: -0.4px; color: var(--t1); }
.dl-subtitle { margin-top: 5px; font-size: 12px; line-height: 1.6; color: var(--t3); }

/* 离线版主卡：左边说清是什么，右边一个窗口示意 */
.dl-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.72fr);
  gap: 22px; align-items: center;
  padding: 26px 26px 24px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 22px;
  background:
    radial-gradient(520px 220px at 8% -30%, var(--accent-soft2), transparent 70%),
    linear-gradient(160deg, var(--surface-2), var(--surface));
  box-shadow: var(--card-shadow);
}
.dl-hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.55), transparent);
}
.dl-hero-body { min-width: 0; }
.dl-hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line-accent); background: var(--accent-soft);
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px; color: var(--accent-ink);
}
.dl-hero h2 {
  margin: 13px 0 9px; font-size: 22px; font-weight: 650; line-height: 1.35;
  letter-spacing: -0.3px; color: var(--t1);
}
.dl-hero p { font-size: 12.5px; line-height: 1.75; color: var(--t3); max-width: 46em; }
.dl-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.dl-pill {
  padding: 4px 10px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 11px; color: var(--t2); font-variant-numeric: tabular-nums;
}
.dl-pill-mute { color: var(--t4); }
.dl-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dl-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
  box-shadow: 0 12px 26px -14px rgba(var(--accent-rgb), 0.95);
}
.dl-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -14px rgba(var(--accent-rgb), 1); }
.dl-btn-primary:active { transform: translateY(0); }
.dl-btn-primary:disabled { cursor: progress; opacity: 0.8; transform: none; }
.dl-btn-ico { font-size: 13px; line-height: 1; }
.dl-btn-ghost {
  padding: 12px 18px; border: 1px solid var(--line-2); border-radius: 12px;
  background: transparent; color: var(--t2); font-size: 13px; font-weight: 500;
  font-family: inherit; cursor: pointer; transition: all 0.18s;
}
.dl-btn-ghost:hover { border-color: var(--line-accent); color: var(--accent-ink); }
.dl-spin {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: currentColor;
  animation: dl-spin 0.7s linear infinite;
}
@keyframes dl-spin { to { transform: rotate(360deg); } }

/* 使用步骤：点开才出现 */
.dl-steps {
  margin-top: 16px; padding: 14px 16px;
  list-style: none; counter-reset: none;
  border: 1px dashed var(--line-2); border-radius: 14px;
  background: var(--surface); display: flex; flex-direction: column; gap: 9px;
}
.dl-steps[hidden] { display: none; }
.dl-steps li { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.6; color: var(--t3); }
.dl-step-num {
  flex-shrink: 0; width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft2); color: var(--accent-ink);
  font-size: 10px; font-weight: 600; margin-top: 1px;
}
.dl-steps code {
  padding: 1px 5px; border-radius: 5px; background: var(--surface-3);
  border: 1px solid var(--line); font-size: 11.5px; color: var(--t1);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* 右侧窗口示意：纯 CSS，不额外加载图片 */
.dl-hero-art { position: relative; display: flex; align-items: center; justify-content: center; min-height: 186px; }
.dl-art-glow {
  position: absolute; width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.28), transparent 68%);
  filter: blur(10px); pointer-events: none;
}
.dl-window {
  position: relative; width: 100%; max-width: 310px;
  border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 26px 50px -22px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: perspective(900px) rotateY(-11deg) rotateX(5deg);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.dl-hero:hover .dl-window { transform: perspective(900px) rotateY(-4deg) rotateX(2deg) translateY(-3px); }
.dl-window-bar {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 10px; background: var(--surface-3);
  border-bottom: 1px solid var(--line);
}
.dl-window-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--t4); opacity: 0.5; }
.dl-window-bar span { margin-left: 7px; font-size: 9.5px; color: var(--t4); letter-spacing: 0.3px; }
.dl-window-body { display: flex; gap: 8px; padding: 10px; }
.dl-window-side { width: 32px; flex-shrink: 0; display: flex; flex-direction: column; gap: 5px; }
.dl-window-side b { height: 10px; border-radius: 3px; background: var(--accent-soft2); }
.dl-window-side i { height: 6px; border-radius: 3px; background: var(--accent-soft); }
.dl-window-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dl-block-row { display: flex; gap: 6px; }
.dl-block-row u {
  flex: 1; height: 17px; border-radius: 5px;
  background: var(--accent-soft); border: 1px solid var(--line);
}
.dl-block {
  height: 30px; border-radius: 7px;
  background: linear-gradient(100deg, var(--accent-soft2), var(--accent-soft));
  border: 1px solid var(--line);
}
.dl-block.is-short { height: 20px; opacity: 0.65; }

/* 下半部分：导出卡片 */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dl-card {
  display: flex; flex-direction: column;
  padding: 18px 20px 20px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); box-shadow: var(--card-shadow);
}
.dl-card-wide { grid-column: 1 / -1; }
.dl-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dl-card-head h3 { font-size: 13.5px; font-weight: 650; color: var(--t1); letter-spacing: 0.1px; }
.dl-card-hint { flex: 1; min-width: 0; font-size: 11px; color: var(--t4); text-align: right; }
.dl-card-text { font-size: 12.5px; line-height: 1.7; color: var(--t3); margin-bottom: 15px; }
.dl-link {
  border: none; background: none; padding: 4px 6px; border-radius: 7px;
  font-size: 12px; font-family: inherit; color: var(--accent-ink); cursor: pointer;
  transition: background 0.15s;
}
.dl-link:hover { background: var(--accent-soft); }
.dl-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: auto; }
.dl-btn-outline {
  flex: 1 1 44%;
  padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface-2); color: var(--t2);
  font-size: 12.5px; font-weight: 500; font-family: inherit;
  cursor: pointer; white-space: nowrap; transition: all 0.18s;
}
.dl-btn-outline:hover {
  border-color: var(--line-accent); color: var(--accent-ink);
  background: var(--accent-soft);
}

/* 表格导出的数据块 */
.dl-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.dl-chip {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); cursor: pointer; font-family: inherit;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.dl-chip:hover {
  border-color: var(--line-accent); background: var(--accent-soft);
  transform: translateY(-1px);
}
.dl-chip-ico {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft2); font-size: 13px;
}
.dl-chip-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-chip-name { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; font-weight: 550; color: var(--t1); }
.dl-chip-name b { font-size: 11px; font-weight: 600; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.dl-chip-hint {
  font-size: 10.5px; color: var(--t4); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.dl-footnote { margin-top: 16px; font-size: 11px; line-height: 1.7; color: var(--t4); text-align: center; }

@media (max-width: 1000px) {
  .dl-wrap { max-width: 620px; }
  .dl-hero { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  .dl-hero-art { display: none; }
  .dl-hero h2 { font-size: 19px; }
  .dl-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .dl-card-wide { grid-column: auto; }
  .dl-title { font-size: 21px; }
}
@media (max-width: 560px) {
  .dl-hero { border-radius: 18px; padding: 18px 16px; }
  .dl-hero h2 { font-size: 17.5px; }
  .dl-btn-primary { width: 100%; justify-content: center; }
  .dl-btn-ghost { width: 100%; }
  .dl-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-chip { flex-direction: column; align-items: flex-start; gap: 7px; }
  .dl-chip-hint { white-space: normal; }
  .dl-card-head { flex-wrap: wrap; }
  .dl-card-hint { text-align: left; flex-basis: 100%; order: 3; }
  .dl-btn-outline { flex: 1 1 100%; }
}

/* ============ 响应式 ============ */
@media (max-width: 1280px) {
  /* 两列：第三列（专注/随手记/趋势）横铺一整行 */
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .dash-col:nth-child(3) {
    grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: stretch;
  }
  .dash-col:nth-child(3) > * { flex: 1 1 240px; }
}
@media (max-width: 820px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dash-col:nth-child(3) { flex-direction: column; }
  .dash-col:nth-child(3) > * { flex: 1 1 auto; }
  .record-grid { grid-template-columns: 1fr; }
  .main { padding: 0 16px 32px; }
  .main-header { padding-top: 16px; margin-bottom: 16px; }
}

/* ============ 心情日记：精装本与纸页（全面跟随主题） ============ */
.diary-book {
  position: relative;
  margin: 8px auto 0;
  max-width: 840px;
  padding: 16px 18px 18px 56px;
  border-radius: 18px;
  background: var(--j-cover);
  border: 1px solid var(--j-cover-line);
  box-shadow: var(--j-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* 书脊 + 装订环：细金属环，不再是黄铜大圆扣 */
.diary-spine {
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 46px;
  display: flex; flex-direction: column;
  justify-content: space-evenly; align-items: center;
  border-radius: 18px 0 0 18px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.06) 62%, rgba(255, 255, 255, 0.05));
  box-shadow: inset -1px 0 0 var(--j-cover-line);
}
.diary-ring {
  position: relative;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--j-ring);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}
.diary-ring::after {
  content: "";
  position: absolute; inset: 4px;
  border-radius: 50%;
  background: var(--j-hole);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 纸页堆叠：两片薄纸错位，避免厚书页的笨重感 */
.diary-sheets { position: relative; }
.diary-sheets::before,
.diary-sheets::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 4px 9px 11px 4px;
  background: var(--j-sheet);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}
.diary-sheets::before { transform: translate(6px, 5px) rotate(0.35deg); opacity: 0.7; }
.diary-sheets::after { transform: translate(3px, 3px); }

/* 纸张：细密横线 + 主题纸色 */
.diary-page {
  position: relative;
  z-index: 2;
  display: flex; flex-direction: column;
  min-height: 430px;
  padding: 26px 34px 24px 64px;
  border-radius: 4px 9px 11px 4px;
  background-color: var(--j-paper);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 22%),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--j-rule) 31px 32px);
  background-position: 0 0, 0 26px;
  box-shadow: inset 0 0 0 1px var(--j-paper-line), 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--j-ink);
}
/* 左侧竖排边线：主题强调色，淡到像印上去的 */
.diary-page::before {
  content: "";
  position: absolute; left: 48px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--j-margin) 9%, var(--j-margin) 91%, transparent);
}

.diary-page-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 4px;
}
.diary-date { font-size: 22px; font-weight: 700; color: var(--j-ink); letter-spacing: 0.5px; }
.diary-year { font-size: 11.5px; color: var(--j-ink-2); letter-spacing: 1.6px; margin-top: 4px; }
.diary-mood {
  font-size: 28px; line-height: 1; flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.18));
}

.diary-body { flex: 1; padding-top: 16px; }
.diary-text {
  margin: 0 0 12px;
  font-family: "LXGW WenKai", "Kaiti SC", "KaiTi", "楷体", Georgia, "Songti SC", serif;
  font-size: 15.5px;
  line-height: 32px;
  color: var(--j-ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.diary-text:last-child { margin-bottom: 0; }

.diary-page-foot {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 12px; padding-top: 14px; flex-wrap: wrap;
}
.diary-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.diary-foot-right { display: flex; align-items: center; gap: 10px; }
.diary-time { font-size: 12px; color: var(--j-ink-2); }
.diary-del {
  border: none; background: none; padding: 2px 4px;
  font-size: 12px; color: var(--j-ink-2); opacity: 0.6; cursor: pointer;
  font-family: inherit; border-radius: 6px; transition: all 0.2s;
}
.diary-del:hover { color: var(--danger-ink); background: var(--danger-soft); opacity: 1; }

/* 空白页 */
.diary-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 40px 0;
}
.diary-empty-icon { margin-bottom: 6px; color: var(--j-ink-2); opacity: 0.55; }
.diary-empty-icon svg { width: 36px; height: 36px; }
.diary-empty-title { font-size: 16px; font-weight: 600; color: var(--j-ink); }
.diary-empty-text { font-size: 13px; color: var(--j-ink-2); }

/* 书签丝带：跟随强调色 */
.diary-ribbon {
  position: absolute; right: 30px; top: 0; width: 14px; height: 56px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.35);
  z-index: 5;
  pointer-events: none;
}

/* 翻页条 */
.diary-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 18px 0 4px;
}
.diary-nav {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--accent-ink);
  font-size: 18px; line-height: 1; cursor: pointer; font-family: inherit;
  box-shadow: var(--card-shadow);
  transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.diary-nav:hover:not(:disabled) {
  background: var(--accent); color: var(--on-accent); border-color: var(--accent);
}
.diary-nav:disabled { opacity: 0.32; cursor: default; }
.diary-page-num {
  font-size: 12.5px; color: var(--t3); min-width: 96px; text-align: center;
  letter-spacing: 0.4px; font-variant-numeric: tabular-nums;
}

@keyframes diaryInNext { from { opacity: 0; transform: translateX(16px) rotate(0.3deg); } to { opacity: 1; transform: none; } }
@keyframes diaryInPrev { from { opacity: 0; transform: translateX(-16px) rotate(-0.3deg); } to { opacity: 1; transform: none; } }
.diary-page.turn-next { animation: diaryInNext 0.32s ease; }
.diary-page.turn-prev { animation: diaryInPrev 0.32s ease; }

/* ============ 心情日记：头图（玻璃卡 + 强调色光边） ============ */
.diary-hero {
  position: relative; max-width: 840px; margin: 4px auto 14px; overflow: hidden;
  padding: 22px 24px 16px; border: 1px solid var(--line); border-radius: 22px;
  background:
    radial-gradient(680px 220px at 88% -34%, rgba(var(--accent-rgb), 0.16), transparent 64%),
    linear-gradient(150deg, var(--surface-2), var(--surface) 58%, var(--surface-2));
  box-shadow: var(--card-shadow);
}
/* 顶部一道极细的强调色光边，比整块渐变克制 */
.diary-hero::before {
  content: ""; position: absolute; top: 0; left: 26px; right: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.55), transparent);
  pointer-events: none;
}
/* 极淡网格纹，只在上半区可见 */
.diary-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 64%);
  mask-image: linear-gradient(160deg, #000 0%, transparent 64%);
}
.diary-hero-glow {
  position: absolute; right: -60px; top: -100px; width: 240px; height: 240px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.20), transparent 70%);
}
.diary-hero-top { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 14px; }
.diary-back {
  width: 34px; height: 34px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface-2); color: var(--accent-ink); font-size: 20px; line-height: 1;
  cursor: pointer; font-family: inherit; transition: all .18s;
}
.diary-back:hover { background: var(--surface-3); border-color: var(--line-accent); }
.diary-hero-heading { flex: 1; min-width: 0; }
.diary-kicker {
  display: flex; align-items: center; gap: 8px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 2.6px; color: var(--accent-ink);
}
.diary-kicker::before {
  content: ""; width: 16px; height: 1px; flex-shrink: 0;
  background: var(--accent-ink); opacity: 0.5;
}
.diary-hero-title {
  margin-top: 7px; font-size: 25px; font-weight: 650; line-height: 1.28;
  color: var(--t1); letter-spacing: -0.3px;
}
.diary-hero-sub { margin-top: 5px; font-size: 12px; color: var(--t3); letter-spacing: 0.2px; }
.diary-write {
  flex-shrink: 0; height: 38px; padding: 0 16px; border: 1px solid var(--line-accent);
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent);
  font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(var(--accent-rgb), 0.55); transition: all .18s;
}
.diary-write span { margin-right: 4px; }
.diary-write:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(var(--accent-rgb), 0.6); }
.diary-hero-bottom {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.diary-hero .diary-ov-main { flex: 1 1 280px; min-width: 0; }
.diary-hero .diary-ov-icon {
  width: 38px; height: 38px; border-radius: 12px; font-size: 18px;
  background: linear-gradient(140deg, var(--accent-soft2), var(--accent-soft));
  border: 1px solid var(--line-accent);
  color: var(--accent-ink);
  box-shadow: none;
}
.diary-ov-icon svg { width: 18px; height: 18px; }
.diary-hero .diary-ov-title {
  font-size: 10.5px; font-weight: 600; color: var(--t4); letter-spacing: 0.8px;
}
.diary-hero .diary-ov-sub { margin-top: 3px; font-size: 12.5px; color: var(--t2); }
.diary-hero .diary-ov-stats { flex-shrink: 0; }
.diary-hero .ov-stat { gap: 3px; padding: 0 13px; }
.diary-hero .ov-stat b { font-size: 19px; color: var(--t1); }
.diary-hero .ov-stat span { font-size: 10.5px; color: var(--t3); letter-spacing: 0.4px; }
.diary-hero .ov-stat + .ov-stat { border-left: 1px solid var(--line); }
.diary-hero .diary-ov-moods { flex-shrink: 0; }
.diary-hero .ov-mood {
  background: var(--surface-3); border: 1px solid var(--line); color: var(--t2);
}
.diary-hero .ov-mood-n { color: var(--accent-ink); }
.diary-hero .diary-ov-empty { color: var(--t4); }
.diary-hero .diary-ov-latest {
  margin-left: 0; background: var(--accent-soft); border: 1px solid var(--line-accent);
  color: var(--accent-ink);
}
.diary-hero .diary-ov-latest:hover { background: var(--accent-soft2); }

/* 日记纸页细节 */
.diary-page::after { content: none; }
.diary-curl {
  position: absolute; right: 0; bottom: 0; width: 34px; height: 34px;
  border-radius: 0 0 11px 0; pointer-events: none;
  background: linear-gradient(135deg, transparent 46%, var(--j-paper) 47%, var(--j-sheet) 100%);
  box-shadow: -2px -2px 6px rgba(0, 0, 0, 0.12);
}
.diary-mood-box { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
.diary-mood-box .diary-mood { font-size: 30px; }
.diary-mood-box span { font-size: 8.5px; letter-spacing: 1.2px; color: var(--j-ink-2); }
.diary-page { min-height: 390px; }
.diary-text { text-indent: 2em; }

@media (max-width: 700px) {
  .diary-hero { padding: 16px 15px 14px; border-radius: 18px; }
  .diary-hero-top { flex-wrap: nowrap; }
  .diary-hero-title { font-size: 19.5px; }
  .diary-write { width: auto; height: 34px; padding: 0 11px; margin-top: 0; font-size: 11.5px; }
  .diary-hero-bottom { gap: 10px; }
  .diary-hero .diary-ov-main { flex: 1 1 100%; }
  .diary-hero .diary-ov-stats { width: 100%; justify-content: space-between; }
  .diary-hero .ov-stat { flex: 1; padding: 0; border-left: none; }
  .diary-hero .ov-stat + .ov-stat { border-left: 1px solid var(--line); }
  .diary-hero .diary-ov-moods { flex: 1 1 auto; }
  .diary-hero .diary-ov-latest { width: auto; flex: 0 0 auto; padding: 7px 10px; font-size: 11px; }
  .diary-book { padding: 12px 12px 14px 40px; border-radius: 15px; }
  .diary-spine { width: 34px; border-radius: 15px 0 0 15px; }
  .diary-ring { width: 13px; height: 13px; }
  .diary-ring::after { inset: 3px; }
  .diary-page { padding: 22px 18px 20px 42px; min-height: 360px; }
  .diary-page::before { left: 30px; }
  .diary-date { font-size: 19px; }
  .diary-mood { font-size: 26px; }
  .diary-ribbon { right: 20px; height: 52px; width: 12px; }
  .diary-curl { width: 28px; height: 28px; }
  .diary-mood-box .diary-mood { font-size: 26px; }
}

/* ============ 每日学习 ============ */
.learn-goal { font-size: 12px; color: var(--t3); font-weight: 600; }
.learn-today-bar { margin-bottom: 6px; }
.learn-task-list { list-style: none; }
.learn-task {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px dashed var(--line);
}
.learn-task:last-child { border-bottom: none; }
.learn-task .w { font-size: 14px; font-weight: 700; color: var(--t1); flex-shrink: 0; }
.learn-task .m {
  flex: 1; min-width: 0; font-size: 12px; color: var(--t3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.learn-badge { font-size: 10px; padding: 2px 7px; border-radius: 8px; flex-shrink: 0; white-space: nowrap; }
.learn-badge.ok { background: var(--ok-soft); color: var(--ok-ink); }
.learn-badge.review { background: var(--warn-soft); color: var(--warn-ink); }
.learn-badge.new { background: var(--accent-soft); color: var(--accent-ink); }
.learn-btns { display: flex; gap: 6px; flex-shrink: 0; }
.learn-btns button {
  border: none; font-family: inherit; font-size: 11px; font-weight: 600;
  padding: 5px 10px; border-radius: 8px; cursor: pointer; transition: all 0.15s;
}
.learn-btns .learn-ok { background: var(--ok-soft); color: var(--ok-ink); }
.learn-btns .learn-ok:hover { background: var(--ok-soft2); }
.learn-btns .learn-no { background: var(--danger-soft); color: var(--danger-ink); }
.learn-btns .learn-no:hover { background: var(--danger-soft); }
.learn-done-tip { margin-top: 8px; font-size: 12px; color: var(--ok-ink); }
.learn-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.learn-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 0; background: var(--accent-soft); border-radius: 10px;
  font-size: 10px; color: var(--t4);
}
.learn-day .d-n { font-size: 14px; font-weight: 700; color: var(--t4); }
.learn-day.hit .d-n { color: var(--accent-ink); }
.learn-day.today { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-2); }
.learn-add { display: flex; gap: 8px; margin-bottom: 10px; }
.learn-add input {
  flex: 1; min-width: 0; height: 34px;
  border: 1px solid var(--line); border-radius: 9px; padding: 0 10px;
  font-size: 12px; font-family: inherit; outline: none; transition: border-color 0.15s;
}
.learn-add input:focus { border-color: var(--line-accent); }
.learn-add-btn {
  border: none; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--on-accent);
  font-size: 12px; font-weight: 600; padding: 0 14px; border-radius: 9px;
  cursor: pointer; font-family: inherit; transition: opacity 0.15s; flex-shrink: 0;
}
.learn-add-btn:hover { opacity: 0.9; }
.learn-filters { display: flex; gap: 6px; margin-bottom: 6px; }
.learn-lib-list { list-style: none; max-height: 280px; overflow-y: auto; }
.learn-lib-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 12px;
}
.learn-lib-item:last-child { border-bottom: none; }
.learn-lib-item .w { font-weight: 700; color: var(--t1); min-width: 96px; }
.learn-lib-item .m {
  flex: 1; min-width: 0; color: var(--t3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.learn-del {
  border: none; background: none; color: var(--t4); cursor: pointer;
  font-size: 12px; padding: 2px 5px; border-radius: 6px; flex-shrink: 0;
  font-family: inherit; transition: all 0.15s;
}
.learn-del:hover { color: var(--danger-ink); background: var(--danger-soft); }
@media (max-width: 700px) {
  .learn-add { flex-wrap: wrap; }
  .learn-add input { min-width: 45%; }
  .learn-task .learn-btns button { padding: 5px 7px; }
}

/* ============ AI 学习助手 · 小测 ============ */
.learn-quiz { margin-top: 12px; border-top: 1px dashed var(--line-2); padding-top: 12px; }
.aiq-intro-t { font-size: 13px; font-weight: 700; color: var(--t1); }
.aiq-intro-m { font-size: 11.5px; color: var(--t3); line-height: 1.55; margin: 5px 0 10px; }
.aiq-start {
  border: none; cursor: pointer; background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 12px; font-weight: 600; padding: 7px 16px; border-radius: 16px;
}
.aiq-start:hover { opacity: .88; }
.aiq-quit { border: none; background: none; cursor: pointer; font-size: 11px; color: var(--t4); margin-top: 8px; }
.aiq-quit:hover { color: var(--t3); }
.aiq-progress {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--accent-ink); margin-bottom: 8px;
}
.aiq-stem { font-size: 14px; font-weight: 700; color: var(--t1); margin-bottom: 10px; }
.aiq-stem b { color: var(--accent-ink); }
.aiq-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.aiq-opt {
  display: flex; align-items: center; gap: 8px; text-align: left;
  border: 1.5px solid var(--line); background: var(--accent-soft); border-radius: 10px;
  padding: 9px 12px; cursor: pointer; font-size: 12.5px; color: var(--t2);
  transition: border-color .15s, background .15s;
}
.aiq-opt:hover { border-color: var(--line-accent); background: var(--accent-soft); }
.aiq-opt .k {
  flex: none; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft2);
  color: var(--accent-ink); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.aiq-opt .v { min-width: 0; line-height: 1.4; }
.aiq-opt.locked { cursor: default; pointer-events: none; }
.aiq-opt.right { border-color: var(--ok-soft2); background: var(--ok-soft); }
.aiq-opt.right .k { background: var(--ok-soft2); color: var(--ok-ink); }
.aiq-opt.wrong { border-color: var(--danger-soft2); background: var(--danger-soft); }
.aiq-opt.wrong .k { background: var(--danger-soft2); color: var(--danger-ink); }
.aiq-opt.reveal { border-color: var(--line-accent); background: var(--accent-soft); }
.aiq-done { text-align: center; padding: 6px 0 2px; }
.aiq-score { font-size: 15px; font-weight: 700; color: var(--t1); }
.aiq-score b { font-size: 26px; color: var(--accent-ink); }
.aiq-score span { font-size: 12px; font-weight: 400; color: var(--t3); margin-left: 6px; }
.aiq-done-msg { font-size: 12px; color: var(--t2); margin: 6px 0; }
.aiq-wrong { font-size: 11.5px; color: var(--accent-ink); margin-bottom: 8px; }
.aiq-wrong b { color: var(--danger-ink); font-weight: 600; }
.aiq-done-btns { display: flex; gap: 8px; justify-content: center; }
.aiq-done-btns .aiq-quit { margin-top: 0; }
.aiq-done .aiq-quit { margin-top: 0; }

/* ============ 白噪音播放器 ============ */
.noise-head { display: flex; align-items: center; gap: 7px; }
.noise-status {
  font-size: 11px; color: var(--t4); display: flex; align-items: center; gap: 5px;
}
.noise-status.on { color: var(--accent-ink); font-weight: 600; }
.noise-stop {
  display: none; align-items: center; height: 21px; padding: 0 9px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-ink); font-size: 11px; font-family: inherit; cursor: pointer;
  transition: all .15s;
}
.noise-stop.show { display: inline-flex; }
.noise-stop:hover { border-color: var(--line-accent); background: var(--accent-soft); color: var(--accent-ink); }
.noise-desc {
  margin-top: 10px; font-size: 11.5px; line-height: 1.55; color: var(--t3);
  min-height: 18px;
}
.np-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2);
  animation: npPulse 1.2s ease-in-out infinite;
}
@keyframes npPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.noise-chips {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 4px;
}
@media (max-width: 980px) {
  .noise-chips { grid-template-columns: repeat(3, 1fr); }
}
.noise-chip {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 1.5px solid var(--line); background: var(--accent-soft); border-radius: 12px;
  padding: 10px 6px 8px; cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.noise-chip:hover { border-color: var(--line-accent); background: var(--accent-soft); }
.noise-chip:active { transform: scale(.96); }
.noise-chip .ne { font-size: 20px; line-height: 1; }
.noise-chip .nn { font-size: 11.5px; color: var(--t2); font-weight: 600; }
.noise-chip.active {
  border-color: var(--line-accent); background: linear-gradient(160deg, var(--accent-soft2), var(--accent-soft));
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), .18);
}
.noise-chip.active .nn { color: var(--accent-ink); }
.neq { display: none; align-items: flex-end; gap: 2px; height: 8px; }
.noise-chip.active .neq { display: flex; }
.neq i {
  width: 3px; border-radius: 2px; background: var(--accent-2);
  animation: neqBounce .9s ease-in-out infinite;
}
.neq i:nth-child(1) { height: 5px; animation-delay: 0s; }
.neq i:nth-child(2) { height: 8px; animation-delay: .25s; }
.neq i:nth-child(3) { height: 6px; animation-delay: .5s; }
@keyframes neqBounce { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.noise-volume {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.nv-icon { font-size: 14px; }
.noise-volume input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-soft2)); outline: none; cursor: pointer;
}
.noise-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 15px; height: 15px;
  border-radius: 50%; background: var(--accent-2); border: 2.5px solid var(--line);
  box-shadow: 0 1px 4px rgba(var(--accent-rgb), .4); cursor: pointer;
}
.nv-text { font-size: 11.5px; color: var(--t3); width: 34px; text-align: right; }

/* ============ 日记概览卡片 ============ */
.diary-ov-main { display: flex; align-items: center; gap: 12px; flex: 1 1 210px; min-width: 0; }
.diary-ov-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: linear-gradient(140deg, var(--accent-soft2), var(--accent-soft));
  border: 1px solid var(--line-accent);
}
.diary-ov-title { font-size: 13px; font-weight: 600; color: var(--t3); }
.diary-ov-sub {
  font-size: 11.5px; color: var(--t2); margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.diary-ov-stats { display: flex; align-items: center; }
.ov-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 14px; }
.ov-stat:first-child { padding-left: 0; }
.ov-stat + .ov-stat { border-left: 1px solid var(--line); }
.ov-stat b { font-size: 18px; font-weight: 700; color: var(--t1); line-height: 1; font-variant-numeric: tabular-nums; }
.ov-stat span { font-size: 10px; color: var(--t4); letter-spacing: 0.4px; }
.diary-ov-moods { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ov-mood {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 8px; border-radius: 10px; font-size: 12px;
  background: var(--surface-3); border: 1px solid var(--line); color: var(--t2);
}
.ov-mood-n { font-size: 10px; color: var(--accent-ink); }
.diary-ov-empty { font-size: 11px; color: var(--t4); }
.diary-ov-latest {
  margin-left: auto;
  border: 1px solid var(--line-accent); background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12px; font-family: inherit; font-weight: 500;
  padding: 7px 12px; border-radius: 10px; cursor: pointer; transition: all 0.18s;
}
.diary-ov-latest:hover { background: var(--accent-soft2); }
/* ============ 日记页心情日历卡 ============ */
.diary-mood-card {
  max-width: 840px; margin: 16px auto 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 18px 22px 20px;
  box-shadow: var(--card-shadow);
}
.diary-mood-card .card-header { margin-bottom: 12px; }
.diary-mood-card .card-header .title { color: var(--t1); }
.diary-mood-tip { font-size: 11.5px; color: var(--t4); }
.diary-mood-card .mood-cal { display: block; margin: 0; padding: 0; border-top: none; }
.diary-mood-card .mc-head { margin-bottom: 10px; }
.diary-mood-card .mc-title { color: var(--t1); font-size: 13px; font-weight: 600; }
.diary-mood-card .mc-nav {
  width: 24px; height: 24px; background: var(--surface-3);
  color: var(--t3); border: 1px solid var(--line);
}
.diary-mood-card .mc-nav:hover:not(:disabled) {
  background: var(--accent-soft); color: var(--accent-ink); border-color: var(--line-accent);
}
.diary-mood-card .mc-week span { color: var(--t4); font-size: 11px; }
.diary-mood-card .mc-grid { gap: 5px; }
.diary-mood-card .mc-day { height: 42px; border-radius: 11px; }
.diary-mood-card .mc-day .mc-num { font-size: 13px; }
.diary-mood-card .mc-day .mc-emo { font-size: 14px; height: 15px; }
.diary-mood-card .mc-detail { margin-top: 11px; font-size: 12px; color: var(--t3); }
.diary-mood-card .mc-detail b { color: var(--t1); }
.diary-mood-card .mc-pick-day { color: var(--accent-ink); }
.diary-mood-card .mc-legend { margin-top: 12px; font-size: 11px; }
@media (max-width: 700px) {
  .diary-mood-card { padding: 14px 14px 16px; }
  .diary-mood-card .mc-day { height: 38px; }
}

/* ============ 日记搜索 ============ */
.diary-search {
  position: relative;
  z-index: 30;
  max-width: 840px;
  margin: 0 auto 14px;
  height: 42px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 8px 0 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.diary-search:focus-within {
  border-color: var(--line-accent);
  box-shadow: var(--card-glow);
}
.diary-search-icon { font-size: 14px; opacity: 0.5; flex-shrink: 0; }
.diary-search input {
  flex: 1; min-width: 0; height: 100%;
  border: none; outline: none; background: none;
  font-size: 14px; color: var(--t1); font-family: inherit;
}
.diary-search input::placeholder { color: var(--t4); }
.diary-search-clear {
  display: none; align-items: center; justify-content: center;
  width: 24px; height: 24px; flex-shrink: 0;
  border: none; border-radius: 50%;
  background: var(--surface-3); color: var(--t3);
  font-size: 11px; cursor: pointer; font-family: inherit;
  transition: all 0.18s;
}
.diary-search-clear:hover { background: var(--accent-soft2); color: var(--accent-ink); }

/* 搜索结果浮层 */
.diary-results {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 8px);
  display: none;
  padding: 6px;
  max-height: 330px; overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, 0.32);
}
.diary-results.open { display: block; }
.diary-results::-webkit-scrollbar { width: 6px; }
.diary-results::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.diary-result-tip { font-size: 12px; color: var(--t4); padding: 6px 10px 8px; }
.diary-result {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  border: none; border-radius: 9px; background: none;
  text-align: left; cursor: pointer; font-family: inherit;
  transition: background 0.16s;
}
.diary-result:hover, .diary-result:focus-visible { background: var(--accent-soft); outline: none; }
.dr-emoji { font-size: 18px; flex-shrink: 0; }
.dr-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.dr-title {
  font-size: 14px; font-weight: 600; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dr-snippet {
  font-size: 12px; color: var(--t3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dr-date {
  font-size: 11.5px; color: var(--t4); flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.diary-results mark {
  background: var(--accent-soft2); color: var(--accent-ink);
  border-radius: 3px; padding: 0 1px;
}
.diary-no-result {
  padding: 18px 12px; text-align: center;
  font-size: 13px; color: var(--t3); line-height: 1.8;
}
.diary-no-result small { color: var(--t4); font-size: 12px; }

/* 纸页上的标题 */
.diary-title-line {
  font-family: "LXGW WenKai", "Kaiti SC", "KaiTi", "楷体", Georgia, "Songti SC", serif;
  font-size: 19px; font-weight: 700; color: var(--j-ink);
  letter-spacing: 0.4px;
  margin: 12px 0 0;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--j-margin);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.diary-body { padding-top: 8px; }

@media (max-width: 700px) {
  .diary-search { height: 40px; margin-bottom: 12px; }
  .diary-search input { font-size: 13px; }
  .diary-title-line { font-size: 17px; }
}

/* ============ AI 食谱推荐 ============ */
.chef-card {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, var(--accent-soft2) 0%, var(--accent-soft) 100%);
  border: 1px solid var(--line);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.chef-card::after {
  content: ""; position: absolute; top: -60px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.15), rgba(var(--accent-rgb), 0) 70%);
  pointer-events: none;
}
.chef-card > * { position: relative; z-index: 1; }

.chef-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.chef-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 700; color: var(--t1);
}
.chef-title .emoji { font-size: 17px; }
.chef-slot {
  font-size: 11.5px; color: var(--accent-ink);
  background: var(--accent-soft); border-radius: 8px; padding: 3px 9px;
}
.chef-slot b { color: var(--accent-ink); }

.chef-input-row { display: flex; gap: 8px; margin-bottom: 10px; }
.chef-input-row input {
  flex: 1; min-width: 0; height: 38px; padding: 0 13px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); font-size: 13.5px; color: var(--t2);
  font-family: inherit; outline: none; transition: all 0.18s;
}
.chef-input-row input::placeholder { color: var(--accent-ink); }
.chef-input-row input:focus { border-color: var(--line-accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.13); }
.chef-go {
  height: 38px; padding: 0 16px; flex-shrink: 0;
  border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: opacity 0.2s;
}
.chef-go:hover { opacity: 0.9; }

.chef-chip-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.chef-chip-label { font-size: 11.5px; color: var(--t3); width: 56px; flex-shrink: 0; }
.chef-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.chef-chip {
  padding: 4px 10px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--t3); font-size: 12px; cursor: pointer;
  font-family: inherit; transition: all 0.18s; white-space: nowrap;
}
.chef-chip:hover { border-color: var(--line-accent); color: var(--accent-ink); }
.chef-chip.active {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent; color: var(--on-accent); font-weight: 600;
}

/* 输出区 */
.chef-output { margin-top: 12px; }
.chef-idle {
  font-size: 12.5px; color: var(--t3); line-height: 1.7;
  background: var(--surface); border: 1px dashed var(--line-2);
  border-radius: 10px; padding: 14px; text-align: center;
}
.chef-thinking {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 12.5px; color: var(--accent-ink);
  background: var(--surface); border-radius: 10px; padding: 15px;
}
.chef-dots { display: inline-flex; gap: 3px; }
.chef-dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2); animation: aiBlink 1.1s infinite;
}
.chef-dots i:nth-child(2) { animation-delay: 0.18s; }
.chef-dots i:nth-child(3) { animation-delay: 0.36s; }

.chef-reason {
  display: flex; gap: 8px; margin-bottom: 12px;
  padding: 10px 12px; border-radius: 8px;
  background: var(--surface); border-left: 3px solid var(--line-accent);
  font-size: 12.5px; color: var(--t2); line-height: 1.75;
  animation: aiFadeUp 0.3s ease both;
}
.chef-reason-icon { flex-shrink: 0; }
.chef-reason b { color: var(--accent-ink); }

.chef-main {
  background: var(--surface); border-radius: 12px; padding: 14px;
  box-shadow: 0 1px 4px rgba(var(--accent-rgb), 0.07);
  animation: aiFadeUp 0.36s ease both;
}
.chef-main-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 8px;
}
.chef-dish-name { font-size: 17px; font-weight: 700; color: var(--t1); margin-bottom: 5px; }
.chef-dish-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--t3); }
.chef-tagline { color: var(--accent-ink); font-weight: 600; }
.chef-match { text-align: right; flex-shrink: 0; line-height: 1; }
.chef-match b { font-size: 21px; font-weight: 700; color: var(--accent-ink); }
.chef-match small { display: block; margin-top: 3px; font-size: 10px; color: var(--accent-ink); }

.chef-dish-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.chef-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.chef-dish-block {
  display: flex; gap: 8px;
  font-size: 12.5px; color: var(--t2); line-height: 1.75;
  margin-bottom: 6px;
}
.chef-dish-block b { flex-shrink: 0; width: 28px; color: var(--t3); font-weight: 600; }

.chef-ask {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.chef-ask > span { font-size: 12.5px; color: var(--t2); }
.chef-ask-btns { display: flex; gap: 8px; }
.chef-add {
  padding: 7px 14px; border: none; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: opacity 0.2s;
}
.chef-add:hover:not(:disabled) { opacity: 0.9; }
.chef-add:disabled { background: var(--accent-soft2); color: var(--accent-ink); cursor: default; }
.chef-skip {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--accent-ink); font-size: 12.5px;
  cursor: pointer; font-family: inherit; transition: all 0.18s;
}
.chef-skip:hover { border-color: var(--line-accent); color: var(--accent-ink); }

.chef-alts-title { font-size: 11.5px; color: var(--accent-ink); margin: 12px 0 7px; }
.chef-alts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chef-alt {
  display: flex; flex-direction: column; gap: 3px;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); cursor: pointer; text-align: left; font-family: inherit;
  transition: all 0.18s;
}
.chef-alt:hover {
  border-color: var(--line-accent); transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.12);
}
.chef-alt-name { font-size: 12.5px; font-weight: 600; color: var(--t2); }
.chef-alt-meta { font-size: 11px; color: var(--accent-ink); }

@media (max-width: 820px) {
  .chef-alts { grid-template-columns: 1fr 1fr; }
  .chef-input-row { flex-direction: column; }
  .chef-go { width: 100%; }
  .chef-chip-label { width: auto; }
}

/* ============ 仪表盘卡片点击跳转 ============ */
.card[data-goto], .stats-card[data-goto] {
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
@media (hover: hover) {
  .card[data-goto]:hover, .stats-card[data-goto]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--accent-rgb), .13);
  }
}

/* ============ 灵感与信息 ============ */
.insp-draw-card { background: linear-gradient(140deg, var(--accent-soft) 0%, var(--warn-soft) 100%); }
.insp-prompt {
  font-size: 14.5px; line-height: 1.75; color: var(--accent-ink); font-weight: 600;
  padding: 12px 14px; border-radius: 12px; background: rgba(var(--surface-rgb), .72);
  border: 1px solid var(--line); margin-bottom: 10px;
}
.insp-prompt b { color: var(--accent-ink); }
.insp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.insp-tag {
  font-size: 10.5px; color: var(--t3); background: var(--surface); border: 1px solid var(--line);
  padding: 3px 9px; border-radius: 10px;
}
.insp-tag.limit { color: var(--warn-ink); border-color: var(--warn-soft2); background: var(--warn-soft); }
.insp-save {
  border: none; cursor: pointer; background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 12px; font-weight: 600; padding: 8px 18px; border-radius: 16px;
}
.insp-save:hover { opacity: .88; }
.insp-hint { font-size: 11px; color: var(--t4); }
.insp-count { font-size: 11.5px; color: var(--accent-ink); }
.insp-add { display: flex; gap: 8px; margin-bottom: 10px; }
.insp-add input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px;
  font-size: 12.5px; outline: none; background: var(--accent-soft); color: var(--t1);
}
.insp-add input:focus { border-color: var(--line-accent); background: var(--surface); }
.insp-add-btn {
  border: none; cursor: pointer; background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12px; font-weight: 600; padding: 0 14px; border-radius: 10px;
}
.insp-add-btn:hover { background: var(--accent-soft2); }
.insp-list { list-style: none; }
.insp-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 2px; border-bottom: 1px dashed var(--line);
}
.insp-item:last-child { border-bottom: none; }
.insp-text { flex: 1; font-size: 12.5px; color: var(--accent-ink); line-height: 1.6; }
.insp-time { font-size: 10.5px; color: var(--t4); white-space: nowrap; }
.insp-del {
  border: none; background: none; color: var(--accent-ink); cursor: pointer;
  font-size: 12px; padding: 0 2px; line-height: 1.4;
}
.insp-del:hover { color: var(--danger-ink); }
.insp-empty { font-size: 12.5px; color: var(--t4); text-align: center; padding: 18px 0; }
.model-name { font-size: 16px; font-weight: 800; color: var(--t2); margin-bottom: 6px; }
.model-desc { font-size: 12.5px; color: var(--t2); line-height: 1.7; margin-bottom: 10px; }
.model-use {
  font-size: 12px; color: var(--t2); line-height: 1.7;
  background: var(--accent-soft); border-left: 3px solid var(--line-accent); border-radius: 8px; padding: 9px 12px;
}
.model-use b { color: var(--accent-ink); margin-right: 6px; font-size: 11px; }
.fact-item {
  display: flex; gap: 10px; align-items: flex-start; list-style: none;
  padding: 9px 2px; border-bottom: 1px dashed var(--line);
  font-size: 12.5px; color: var(--accent-ink); line-height: 1.65;
}
.fact-item:last-child { border-bottom: none; }
.fact-no {
  flex: none; font-size: 10.5px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent-soft); border-radius: 6px; padding: 2px 6px; margin-top: 1px;
}

/* ============ 实时资讯 ============ */
.news-live-card .ai-badge { font-size: 9.5px; padding: 1px 6px; }
.news-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.news-tab {
  font-size: 11.5px; padding: 4px 11px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line); background: var(--accent-soft); color: var(--t2);
  transition: all .15s;
}
.news-tab:hover { border-color: var(--line-2); color: var(--accent-ink); }
.news-tab.active {
  background: var(--accent-soft); border-color: var(--line-accent); color: var(--accent-ink); font-weight: 700;
}
.news-list { list-style: none; }
.news-row {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 2px; border-bottom: 1px dashed var(--line);
}
.news-row:last-child { border-bottom: none; }
.news-rank {
  flex: none; width: 18px; text-align: center; font-size: 11px; font-weight: 800;
  color: var(--accent-ink); line-height: 1.7;
}
.news-rank.top1 { color: var(--danger-ink); }
.news-rank.top2 { color: var(--warn-ink); }
.news-rank.top3 { color: var(--warn-ink); }
.news-title {
  flex: 1; font-size: 12.5px; color: var(--accent-ink); line-height: 1.65;
  text-decoration: none; word-break: break-word;
}
.news-title:hover { color: var(--accent-ink); text-decoration: underline; }
.news-hot { flex: none; font-size: 10.5px; color: var(--warn-ink); white-space: nowrap; padding-top: 1px; }
.news-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10.5px; color: var(--t4); margin-top: 10px;
  padding-top: 8px; border-top: 1px solid var(--line);
}
.news-skel {
  height: 12px; border-radius: 6px; margin: 9px 2px;
  background: linear-gradient(90deg, var(--accent-soft) 25%, var(--accent-soft2) 37%, var(--accent-soft) 63%);
  background-size: 400% 100%; animation: newsShimmer 1.4s ease infinite;
}
@keyframes newsShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.news-err {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--warn-soft); border: 1px dashed var(--warn-soft2); border-radius: 10px;
  padding: 12px; font-size: 12px; color: var(--warn-ink); line-height: 1.6;
}
.news-err button {
  border: none; cursor: pointer; background: var(--warn-soft); color: var(--warn-ink);
  font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 10px;
}
.news-err button:hover { background: var(--warn-soft2); }
.news-empty { font-size: 12px; color: var(--t4); text-align: center; padding: 16px 0; }

/* ============ 页面通用标题 ============ */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-title {
  font-size: 22px; font-weight: 700; color: var(--t1); letter-spacing: -0.2px;
  display: flex; align-items: center; gap: 6px;
}
.page-subtitle { font-size: 12.5px; color: var(--t3); margin-top: 4px; }
.side-badge {
  margin-left: auto; padding: 1px 5px; border-radius: 5px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 8.5px; font-weight: 700; letter-spacing: .5px;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  padding: 10px 16px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-size: 13px; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--line-accent); outline-offset: 2px; }

/* ============ AI 今日简报 ============ */
.ai-brief {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 18px 22px; margin-bottom: 16px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(120deg, var(--accent-soft) 0%, var(--accent-soft) 48%, var(--surface) 100%);
  box-shadow: 0 6px 22px rgba(var(--accent-rgb), .08);
}
.ai-brief-orb {
  position: absolute; right: -70px; top: -90px; width: 250px; height: 250px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .22), rgba(var(--accent-rgb), 0) 70%);
}
.ai-brief-icon {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 22px;
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), .28);
}
.ai-brief-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.ai-brief-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 700; color: var(--accent-ink);
}
.ai-brief-text { margin-top: 4px; font-size: 12.5px; line-height: 1.65; color: var(--t2); }
.ai-brief-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-brief-tag {
  padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--accent-ink); font-size: 10.5px;
}
.ai-brief-btn {
  position: relative; z-index: 1; flex-shrink: 0;
  height: 38px; padding: 0 16px; border: none; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 12.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; box-shadow: 0 4px 12px rgba(var(--accent-rgb), .25);
}
.ai-brief-btn span { margin-left: 4px; }
.ai-brief-btn:hover { opacity: .92; }

/* ============ AI 助手页 ============ */
.ai-title-spark { color: var(--accent-ink); margin-right: 2px; }
.ai-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-mode {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--t3); font-size: 11px; font-weight: 600;
}
.ai-mode i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
.ai-mode.online { background: var(--ok-soft); color: var(--ok-ink); }
.ai-mode.online i { background: var(--ok); animation: npPulse 1.5s ease-in-out infinite; }
.ai-head-btn {
  height: 28px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--surface); color: var(--t2); font-size: 11.5px; font-family: inherit; cursor: pointer;
}
.ai-head-btn:hover { border-color: var(--line-accent); color: var(--accent-ink); background: var(--accent-soft); }

.ai-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px; align-items: start;
}
.ai-chat-card {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  min-height: 560px; max-height: calc(100vh - 190px);
}
.ai-chat-log {
  flex: 1; overflow-y: auto; padding: 20px 22px 8px;
  display: flex; flex-direction: column; gap: 16px;
}
.ai-chat-log::-webkit-scrollbar { width: 6px; }
.ai-chat-log::-webkit-scrollbar-thumb { background: var(--accent-soft2); border-radius: 3px; }

.ai-msg { display: flex; align-items: flex-start; gap: 10px; }
.ai-msg.user { flex-direction: row-reverse; }
.ai-avatar {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 14px;
  box-shadow: 0 3px 9px rgba(var(--accent-rgb), .22);
}
.ai-bubble {
  max-width: 78%; padding: 11px 14px;
  background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
}
.ai-msg.user .ai-bubble {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent; color: var(--on-accent);
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), .2);
}
.ai-msg-text { font-size: 13px; line-height: 1.7; color: var(--t2); word-break: break-word; }
.ai-msg.user .ai-msg-text { color: var(--on-accent); }
.ai-msg-text p { margin: 0 0 6px; }
.ai-msg-text p:last-child { margin-bottom: 0; }
.ai-msg-text ul { margin: 4px 0 6px; padding-left: 18px; }
.ai-msg-text li { margin: 2px 0; }
.ai-msg-text strong { font-weight: 700; color: var(--accent-ink); }
.ai-msg.user .ai-msg-text strong { color: var(--on-accent); }
.ai-msg-text code {
  padding: 1px 5px; border-radius: 5px; background: var(--accent-soft);
  color: var(--accent-ink); font-size: 11.5px; font-family: ui-monospace, Consolas, monospace;
}
.ai-msg.user .ai-msg-text code { background: rgba(var(--surface-rgb), .2); color: var(--on-accent); }
.ai-msg-meta { margin-top: 5px; font-size: 9.5px; color: var(--t4); }
.ai-msg.user .ai-msg-meta { color: rgba(255, 255, 255, .72); text-align: right; }

.ai-typing { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--t3); }
.ai-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2); animation: aiBounce 1s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .15s; }
.ai-typing i:nth-child(3) { animation-delay: .3s; }
.ai-typing span { margin-left: 5px; }
@keyframes aiBounce { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-3px); opacity: 1; } }

.ai-quick {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 22px 10px; border-top: 1px solid var(--line);
}
.ai-quick-chip {
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-family: inherit;
  cursor: pointer; transition: all .15s;
}
.ai-quick-chip:hover { border-color: var(--line-accent); background: var(--accent-soft); }
.ai-composer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface);
}
#aiInput {
  flex: 1; min-height: 40px; max-height: 120px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; resize: none;
  background: var(--accent-soft); color: var(--t2); font-size: 13px; line-height: 1.5;
  font-family: inherit; outline: none;
}
#aiInput:focus { border-color: var(--line-accent); background: var(--surface); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .08); }
.ai-send {
  width: 64px; height: 40px; flex-shrink: 0; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent); font-size: 12.5px; font-weight: 600; font-family: inherit;
  cursor: pointer;
}
.ai-send:hover { opacity: .92; }
.ai-send:disabled { opacity: .45; cursor: default; }
.ai-privacy { padding: 0 18px 11px; font-size: 10.5px; color: var(--t4); line-height: 1.5; }

.ai-side { display: flex; flex-direction: column; gap: 16px; }
.ai-context-card { padding: 16px 18px; }
.ai-ctx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.ai-ctx-grid > div {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 4px; border-radius: 10px; background: var(--accent-soft);
}
.ai-ctx-grid b { font-size: 18px; font-weight: 700; color: var(--accent-ink); line-height: 1.1; }
.ai-ctx-grid span { font-size: 9.5px; color: var(--accent-ink); }
.ai-ctx-lines { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; line-height: 1.65; color: var(--t3); }
.ai-ctx-lines b { color: var(--t2); }
.ai-help-card { padding: 16px 18px; }
.ai-help-list { list-style: none; }
.ai-help-list li {
  display: flex; flex-direction: column; gap: 3px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.ai-help-list li:last-child { border-bottom: none; }
.ai-help-list code {
  align-self: flex-start; padding: 2px 7px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 11px;
  font-family: ui-monospace, Consolas, monospace;
}
.ai-help-list span { font-size: 10.5px; color: var(--accent-ink); }
.ai-help-foot { margin-top: 8px; font-size: 10.5px; line-height: 1.6; color: var(--t4); }

.ai-settings-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.ai-test-status { font-size: 11.5px; color: var(--accent-ink); }
.ai-test-status.ok { color: var(--ok-ink); }
.ai-test-status.bad { color: var(--danger-ink); }
.ai-key-note { margin-top: 6px; }

@media (max-width: 1100px) {
  .ai-layout { grid-template-columns: 1fr; }
  .ai-chat-card { min-height: 560px; max-height: none; }
  .ai-side { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .ai-side { grid-template-columns: 1fr; }
  .ai-brief { flex-wrap: wrap; padding: 16px 18px; }
  .ai-brief-btn { width: 100%; }
}
@media (max-width: 700px) {
  .page-title { font-size: 19px; }
  .ai-page-head { align-items: flex-start; }
  .ai-head-actions { width: 100%; }
  .ai-mode { margin-right: auto; }
  .ai-chat-card { height: calc(100vh - 470px); min-height: 380px; max-height: 620px; }
  .ai-chat-log { padding: 16px 14px 6px; }
  .ai-bubble { max-width: 86%; }
  .ai-quick { padding: 8px 14px; }
  .ai-composer { padding: 9px 12px; }
  .ai-privacy { padding: 0 14px 10px; }
  .ai-ctx-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* ============ 首次进入引导 ============ */
.welcome-overlay {
  display: none; position: fixed; inset: 0; z-index: 400;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(var(--accent-rgb), .48); backdrop-filter: blur(6px);
}
.welcome-overlay.show { display: flex; }
body.welcome-open { overflow: hidden; }
.welcome-card {
  position: relative; width: 100%; max-width: 500px; overflow: hidden;
  padding: 28px 30px 22px; border-radius: 22px; background: var(--surface);
  max-height: 92vh; overflow-y: auto;
  box-shadow: 0 24px 70px rgba(var(--accent-rgb), .3);
  text-align: center; animation: welcomeIn .3s ease;
}
.welcome-card::before {
  content: ""; position: absolute; top: -120px; right: -80px;
  width: 260px; height: 260px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .18), transparent 70%);
}
.welcome-kicker {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 10.5px; font-weight: 700;
  letter-spacing: .3px;
}
.welcome-card h2 { margin: 14px 0 8px; font-size: 24px; color: var(--t1); letter-spacing: -.4px; }
.welcome-card p {
  max-width: 380px; margin: 0 auto 14px;
  font-size: 12.5px; line-height: 1.7; color: var(--t3);
}
/* 昵称设置：与全站输入框同一套语义色，不抢主视觉 */
.welcome-field {
  max-width: 380px; margin: 0 auto 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-2); text-align: left;
  transition: border-color .2s, box-shadow .2s;
}
.welcome-field:focus-within { border-color: var(--line-accent); box-shadow: var(--card-glow); }
.welcome-field-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 8px; cursor: pointer;
}
.welcome-field-label { font-size: 12px; font-weight: 600; color: var(--t2); letter-spacing: .3px; }
.welcome-field-note { font-size: 10px; color: var(--t4); letter-spacing: .4px; }
.welcome-field-input {
  width: 100%; height: 38px; box-sizing: border-box;
  padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--t1);
  font-size: 13.5px; font-family: inherit; letter-spacing: .2px;
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.welcome-field-input::placeholder { color: var(--t4); }
.welcome-field-input:focus { border-color: var(--line-accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.welcome-field-tip {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: 7px; font-size: 10.5px; line-height: 1.6; color: var(--t4);
}
.welcome-saved {
  flex-shrink: 0; font-size: 10px; letter-spacing: .3px;
  color: var(--ok-ink); opacity: 0; transform: translateY(2px);
  transition: opacity .22s, transform .22s;
}
.welcome-saved.show { opacity: 1; transform: none; }

.welcome-points {
  list-style: none; display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 18px; padding: 12px 14px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: var(--accent-soft);
}
.welcome-points li { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--t2); }
.welcome-points b { flex-shrink: 0; color: var(--accent-ink); }
.welcome-actions { display: flex; gap: 10px; }
.welcome-actions button { flex: 1; }
.welcome-actions .btn-save:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .28); }
@keyframes welcomeIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }



@media (max-width: 700px) {
  .welcome-card { padding: 22px 20px 18px; }
  .welcome-card h2 { font-size: 21px; }
  .welcome-actions { flex-direction: column; }
}

/* ============ Windows 桌面端适配 ============
   1. 滚动条：Windows 默认是 17px 的浅灰方块，深色界面里非常出戏
   2. 宽屏：≥1780px 时内容列在侧边栏右侧居中，不再一路贴左
   3. 细节：焦点环、输入框自动填充、文本选中
   4. 打印：只留报告区，去掉边栏与工具栏
   通过 html.is-win 只在 Windows 上启用系统级调整，不影响 mac 的浮层滚动条。 */

/* ---------- 滚动条 ---------- */
.is-win { scrollbar-color: var(--line-2) transparent; }
.is-win * { scrollbar-width: thin; }
.is-win ::-webkit-scrollbar { width: 11px; height: 11px; }
.is-win ::-webkit-scrollbar-track { background: transparent; }
.is-win ::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 8px;
}
.is-win ::-webkit-scrollbar-thumb:hover { background: var(--t4); background-clip: padding-box; }
.is-win ::-webkit-scrollbar-corner { background: transparent; }

/* 宽屏：内容列居中，两侧留出稳定留白 */
.main { --main-max: 1480px; }
@media (min-width: 1780px) {
  .main {
    max-width: none;
    margin-left: 0;
    padding-left: calc(200px + max(24px, (100vw - 200px - var(--main-max)) / 2));
    padding-right: max(24px, (100vw - 200px - var(--main-max)) / 2);
  }
  .layout.collapsed .main {
    padding-left: max(24px, (100vw - var(--main-max)) / 2);
    padding-right: max(24px, (100vw - var(--main-max)) / 2);
  }
}
@media (min-width: 2160px) {
  .main { --main-max: 1600px; }
}

/* 细节：键盘焦点、自动填充、选中色 */
::selection { background: rgba(var(--accent-rgb), 0.3); color: var(--t1); }
:focus-visible { outline: 2px solid rgba(var(--accent-rgb), 0.7); outline-offset: 2px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
input:-webkit-autofill, textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--t1);
  caret-color: var(--t1);
  box-shadow: 0 0 0 1000px var(--surface-2) inset;
}

/* ---------- 打印 ---------- */
.dl-print { display: none; }

@media print {
  @page { size: A4; margin: 15mm 14mm; }
  html, body { background: #fff !important; background-image: none !important; color: #1b1b1b; }
  .sidebar, .sidebar-expand, .quick-actions, .welcome-overlay,
  .modal-overlay, .toast, .skip-link { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  /* 打印报告时整个应用外壳（边栏 + 主区）都让位，避免空出第一页 */
  html.is-printing .layout { display: none !important; }
  html.is-printing .dl-print { display: block !important; }

  .pr-page {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    color: #1b1b1b; font-size: 10pt; line-height: 1.65;
  }
  .pr-head { padding-bottom: 10px; margin-bottom: 18px; border-bottom: 2px solid #1b1b1b; }
  .pr-kicker { font-size: 8pt; letter-spacing: 2.4px; color: #777; margin-bottom: 6px; }
  .pr-head h1 { font-size: 19pt; font-weight: 700; letter-spacing: -0.4px; color: #111; }
  .pr-meta { margin-top: 5px; font-size: 8.5pt; color: #777; }

  .pr-sec { margin-bottom: 16px; break-inside: avoid; }
  .pr-sec h2 {
    font-size: 11pt; font-weight: 700; color: #111;
    padding-left: 8px; margin-bottom: 9px;
    border-left: 3px solid #1b1b1b; letter-spacing: 0.5px;
  }

  .pr-table { width: 100%; border-collapse: collapse; }
  .pr-table th {
    width: 96px; text-align: left; font-weight: 500; color: #666;
    font-size: 9pt; padding: 5px 8px 5px 0; vertical-align: top;
    border-bottom: 1px solid #ececec;
  }
  .pr-table td { font-size: 9.5pt; padding: 5px 0; border-bottom: 1px solid #ececec; }

  .pr-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
  .pr-list li { display: flex; align-items: baseline; gap: 7px; font-size: 9.5pt; }
  .pr-list li.is-done { color: #888; text-decoration: line-through; }
  .pr-box {
    flex-shrink: 0; width: 9pt; height: 9pt; border: 1px solid #999; border-radius: 2px;
    font-size: 7pt; line-height: 9pt; text-align: center; color: #1b1b1b; text-decoration: none;
  }
  .pr-notes li { flex-wrap: wrap; }
  .pr-note-time { flex-shrink: 0; color: #888; font-size: 8.5pt; }
  .pr-notes b { flex-shrink: 0; font-weight: 600; }

  .pr-week { display: flex; align-items: flex-end; gap: 10px; height: 92px; padding-top: 6px; }
  .pr-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
  .pr-day-name { font-size: 8pt; color: #666; }
  .pr-day-bar {
    flex: 1; width: 60%; display: flex; align-items: flex-end;
    background: #f2f2f2; border-radius: 2px; overflow: hidden;
  }
  .pr-day-bar i { display: block; width: 100%; background: #444; border-radius: 2px 2px 0 0; }
  .pr-day-val { font-size: 8pt; color: #333; font-variant-numeric: tabular-nums; }

  .pr-moods { display: flex; flex-wrap: wrap; gap: 6px; }
  .pr-mood {
    padding: 3px 9px; border: 1px solid #ddd; border-radius: 999px;
    font-size: 9pt; color: #444;
  }
  .pr-mood b { font-weight: 600; color: #111; }

  .pr-entry { margin-bottom: 9px; padding-left: 9px; border-left: 2px solid #e2e2e2; break-inside: avoid; }
  .pr-entry-head { display: flex; gap: 8px; align-items: baseline; }
  .pr-entry-head span { font-size: 8.5pt; color: #777; font-variant-numeric: tabular-nums; }
  .pr-entry-head b { font-size: 9.5pt; color: #111; }
  .pr-entry p { margin-top: 2px; font-size: 9pt; color: #444; }

  .pr-empty { font-size: 9pt; color: #999; }
  .pr-foot {
    margin-top: 20px; padding-top: 8px; border-top: 1px solid #e2e2e2;
    font-size: 8pt; color: #999; letter-spacing: 0.3px;
  }
}

/* ============ 账号 / 个人中心 ============ */
.profile-wrap { max-width: 880px; }
.auth-shell {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 16px; align-items: stretch; margin-top: 4px;
}
.auth-intro {
  position: relative; overflow: hidden; padding: 28px 26px;
  border: 1px solid var(--line); border-radius: 20px;
  background:
    radial-gradient(circle at 92% -10%, var(--accent-soft2), transparent 55%),
    linear-gradient(160deg, var(--surface-2), var(--surface));
}
.auth-intro::after {
  content: ""; position: absolute; right: -50px; bottom: -80px; width: 220px; height: 220px;
  border-radius: 50%; border: 1px solid var(--line); opacity: .6; pointer-events: none;
}
.auth-intro-kicker { font-size: 10px; font-weight: 700; letter-spacing: 1.6px; color: var(--accent-ink); }
.auth-intro h2 { margin: 12px 0 10px; font-size: 24px; line-height: 1.3; letter-spacing: -.4px; color: var(--t1); }
.auth-intro p { max-width: 34em; font-size: 12.5px; line-height: 1.8; color: var(--t3); }
.auth-points { list-style: none; display: grid; gap: 10px; margin-top: 20px; }
.auth-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.6; color: var(--t2); }
.auth-points b {
  flex-shrink: 0; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); font-size: 10px;
}
.auth-points strong { color: var(--t1); font-weight: 650; }
.auth-warning {
  margin-top: 20px; padding: 10px 12px; border: 1px solid color-mix(in srgb, #f59e0b 35%, var(--line));
  border-radius: 10px; background: color-mix(in srgb, #f59e0b 8%, var(--surface));
  font-size: 11.5px; line-height: 1.65; color: var(--t2);
}
.auth-secure { margin-top: 14px; font-size: 11px; line-height: 1.7; color: var(--t4); }
.auth-card {
  padding: 24px 22px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); box-shadow: 0 12px 36px rgba(0,0,0,.12);
}
.auth-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 20px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2);
}
.auth-tabs button {
  flex: 1; padding: 8px 10px; border: none; border-radius: 8px; background: none;
  color: var(--t3); font-size: 12.5px; font-family: inherit; cursor: pointer; transition: all .18s;
}
.auth-tabs button.active { background: var(--surface); color: var(--t1); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.auth-offline {
  margin-bottom: 14px; padding: 10px 12px; border-radius: 9px;
  background: color-mix(in srgb, #f59e0b 9%, var(--surface-2));
  border: 1px solid color-mix(in srgb, #f59e0b 30%, var(--line));
  color: var(--t2); font-size: 11px; line-height: 1.6;
}
.auth-offline code { color: var(--accent-ink); font-size: 10.5px; }
.auth-form { display: grid; gap: 14px; }
.auth-field label { display: block; margin-bottom: 6px; font-size: 11.5px; font-weight: 600; color: var(--t2); }
.auth-field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--t1); font-size: 13px; font-family: inherit;
  outline: none; transition: border-color .18s, box-shadow .18s;
}
.auth-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-field input:disabled { opacity: .55; cursor: not-allowed; }
.auth-hint { margin-top: 5px; font-size: 10.5px; color: var(--t4); line-height: 1.5; }
.auth-error {
  padding: 9px 11px; border: 1px solid rgba(239,68,68,.35); border-radius: 9px;
  background: rgba(239,68,68,.09); color: #f87171; font-size: 11.5px; line-height: 1.55;
}
.auth-submit { width: 100%; margin-top: 2px; }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; }
.auth-foot { margin-top: 16px; font-size: 11.5px; color: var(--t3); line-height: 1.7; text-align: center; }
.auth-foot button { border: none; background: none; color: var(--accent-ink); font-family: inherit; font-size: inherit; cursor: pointer; padding: 0; }
.auth-foot button:hover { text-decoration: underline; }
.auth-foot-sep { margin: 0 6px; color: var(--t4); }
.profile-loading { padding: 46px 20px; text-align: center; color: var(--t3); font-size: 12px; }
.profile-loading span { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent-ink); animation: profileSpin .8s linear infinite; vertical-align: -2px; }
@keyframes profileSpin { to { transform: rotate(360deg); } }
.profile-hero {
  display: flex; align-items: center; gap: 16px; padding: 22px 24px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 20px;
  background:
    radial-gradient(circle at 94% -20%, var(--accent-soft2), transparent 58%),
    linear-gradient(140deg, var(--surface-2), var(--surface));
}
.profile-avatar {
  width: 58px; height: 58px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 18px; font-size: 25px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px var(--accent-soft2);
}
.profile-hero-main { flex: 1; min-width: 0; }
.profile-name { font-size: 23px; font-weight: 680; letter-spacing: -.4px; color: var(--t1); }
.profile-handle { margin-top: 2px; font-size: 12px; color: var(--accent-ink); }
.profile-meta { margin-top: 6px; font-size: 10.5px; color: var(--t4); line-height: 1.5; }
.profile-sync-pill {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--t3); font-size: 10.5px; white-space: nowrap;
}
.profile-sync-pill i, .profile-sync-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--t4); }
.profile-sync-pill.is-ok i, .profile-sync-state.is-ok i { background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.12); }
.profile-sync-pill.is-syncing i, .profile-sync-state.is-syncing i { background: #fbbf24; animation: profilePulse 1s ease-in-out infinite; }
.profile-sync-pill.is-error i, .profile-sync-state.is-error i { background: #f87171; }
@keyframes profilePulse { 50% { opacity: .35; } }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.profile-card {
  padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: 17px;
  background: var(--surface);
}
.profile-card-wide { grid-column: 1 / -1; }
.profile-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.profile-card-icon { width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--accent-soft); font-size: 13px; }
.profile-card-head h3 { font-size: 13.5px; font-weight: 650; color: var(--t1); }
.profile-card-text { margin-bottom: 13px; font-size: 11.5px; line-height: 1.7; color: var(--t3); }
.profile-list { display: grid; gap: 9px; }
.profile-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.profile-list > div:last-child { padding-bottom: 0; border-bottom: none; }
.profile-list dt { flex-shrink: 0; font-size: 11px; color: var(--t4); }
.profile-list dd { min-width: 0; text-align: right; font-size: 11.5px; color: var(--t2); overflow-wrap: anywhere; }
.profile-link { margin-left: 5px; padding: 0; border: none; background: none; color: var(--accent-ink); font-size: 10.5px; font-family: inherit; cursor: pointer; }
.profile-link:hover { text-decoration: underline; }
.profile-sync-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.profile-sync-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--t2); }
.profile-sync-time { font-size: 10.5px; color: var(--t4); }
.profile-error { margin-top: 9px; padding: 8px 10px; border-radius: 8px; background: rgba(239,68,68,.08); color: #f87171; font-size: 10.5px; line-height: 1.5; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.profile-actions .btn-outline { padding: 8px 12px; font-size: 11.5px; }
.profile-danger { color: #f87171 !important; border-color: rgba(239,68,68,.35) !important; }
.profile-note { margin-top: 10px; font-size: 10px; line-height: 1.6; color: var(--t4); }
.welcome-account {
  display: block; width: 100%; margin-top: 12px; padding: 2px; border: none; background: none;
  color: var(--t4); font-size: 11.5px; font-family: inherit; cursor: pointer;
}
.welcome-account:hover { color: var(--accent-ink); }

/* 下载中心：手机端 */
.dl-mobile-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 26px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 20px;
  background:
    radial-gradient(circle at 88% -30%, var(--accent-soft2), transparent 58%),
    linear-gradient(140deg, var(--surface-2), var(--surface));
}
.dl-mobile-copy { min-width: 0; }
.dl-mobile-copy h2 { margin: 9px 0 7px; font-size: 20px; line-height: 1.35; letter-spacing: -.3px; color: var(--t1); }
.dl-mobile-copy p { max-width: 46em; font-size: 12px; line-height: 1.75; color: var(--t3); }
.dl-mobile-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.dl-mobile-help { margin-top: 13px; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11px; line-height: 1.8; color: var(--t3); }
.dl-mobile-help[hidden] { display: none; }
.dl-mobile-help b { color: var(--t1); font-weight: 600; }
.dl-qr { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.dl-qr img { width: 132px; height: 132px; padding: 8px; border-radius: 13px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.dl-qr span { font-size: 10.5px; color: var(--t2); }
.dl-qr small { font-size: 9.5px; color: var(--t4); }

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-intro { padding: 22px 20px; border-radius: 17px; }
  .auth-intro h2 { font-size: 21px; }
  .auth-card { padding: 20px 18px; border-radius: 17px; }
  .profile-hero { flex-wrap: wrap; padding: 18px; border-radius: 17px; }
  .profile-avatar { width: 50px; height: 50px; border-radius: 15px; font-size: 22px; }
  .profile-name { font-size: 21px; }
  .profile-sync-pill { margin-left: 66px; }
  .profile-grid { grid-template-columns: 1fr; gap: 12px; }
  .profile-card-wide { grid-column: auto; }
  .dl-mobile-card { flex-direction: column; align-items: stretch; padding: 20px 18px; border-radius: 17px; }
  .dl-mobile-copy h2 { font-size: 18px; }
  .dl-qr { margin-top: 4px; }
  .dl-qr img { width: 118px; height: 118px; }
}

@media (max-width: 760px) {
  .auth-card { order: -1; }
  .auth-intro { order: 1; }
}
/* ============ 美味食谱 v2：更宽的三列食谱卡片 ============ */
.recipes-wrap { max-width: 1040px; padding-top: 4px; }
.recipes-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.recipes-head .settings-back { margin-top: 2px; flex-shrink: 0; }
.recipes-head-main { flex: 1; min-width: 0; }
.recipes-kicker {
  display: flex; align-items: center; gap: 7px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.7px; color: var(--accent-ink);
}
.recipes-kicker::before { content: ""; width: 15px; height: 1px; background: currentColor; opacity: .65; }
.recipes-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-top: 7px;
}
.recipes-head-text { min-width: 0; }
.recipes-title {
  margin: 0; font-size: 28px; line-height: 1.25; font-weight: 700;
  letter-spacing: -.6px; color: var(--t1);
}
.recipes-subtitle { margin: 5px 0 0; font-size: 12px; color: var(--t3); }
.recipes-head-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.recipes-stats {
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--t4); font-size: 10.5px; white-space: nowrap;
}
.recipes-head .btn-recipe-add {
  padding: 10px 16px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 6px 16px var(--accent-soft2);
}

/* AI 推荐：桌面完整，手机折叠高级选项 */
.chef-card {
  padding: 18px 20px 16px; border-radius: 18px; margin-bottom: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 92% -18%, var(--accent-soft2), transparent 56%),
    linear-gradient(150deg, var(--surface-2), var(--surface));
  box-shadow: 0 10px 28px -22px rgba(var(--accent-rgb), .5);
}
.chef-card::after {
  content: ""; position: absolute; right: -54px; top: -80px; width: 210px; height: 210px;
  border-radius: 50%; background: radial-gradient(circle, var(--accent-soft2), transparent 68%);
  pointer-events: none;
}
.chef-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.chef-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chef-mark {
  width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  font-size: 19px; box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.chef-brand-text { min-width: 0; }
.chef-title { font-size: 15.5px; font-weight: 700; color: var(--t1); }
.chef-title .ai-badge { margin-left: 5px; vertical-align: 2px; }
.chef-sub { margin-top: 3px; font-size: 10.5px; color: var(--t4); }
.chef-slot { flex-shrink: 0; font-size: 10.5px; padding: 4px 9px; border-radius: 8px; }
.chef-input-row { display: flex; gap: 8px; margin-bottom: 11px; }
.chef-input-row input {
  flex: 1; min-width: 0; height: 42px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); font-size: 13px; color: var(--t1);
}
.chef-input-row input::placeholder { color: var(--t4); }
.chef-go { height: 42px; padding: 0 18px; border-radius: 11px; }
.chef-advanced { display: block; }
.chef-chip-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 7px; flex-wrap: wrap; }
.chef-chip-label { width: 52px; padding-top: 4px; font-size: 10.5px; color: var(--t4); flex-shrink: 0; }
.chef-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.chef-chip { padding: 4px 9px; border-radius: 12px; font-size: 11.5px; background: var(--surface); }
.chef-more { display: none; }
.chef-output { margin-top: 10px; }
.chef-idle { padding: 12px 14px; border-radius: 10px; font-size: 11.5px; line-height: 1.65; }

/* 搜索 / 筛选 / 标签：合并成一条浏览器栏 */
.recipes-browser {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.recipes-browser .recipe-search {
  flex: 1 1 220px; height: 42px; min-width: 0; padding: 0 12px;
  border: none; border-radius: 10px; background: var(--surface-2);
  box-shadow: none;
}
.recipes-browser .recipe-search input { height: 100%; padding: 0; font-size: 13px; }
.recipes-browser .recipe-search .search-icon { font-size: 13px; }
.recipes-browser .recipe-tabs {
  display: flex; gap: 2px; margin: 0; padding: 3px; flex-shrink: 0;
  border-radius: 11px; background: var(--surface-2);
}
.recipes-browser .recipe-tab {
  padding: 7px 11px; border-radius: 8px; background: transparent;
  box-shadow: none; font-size: 12px; white-space: nowrap;
}
.recipes-browser .recipe-tab.active {
  background: var(--surface); color: var(--accent-ink);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.recipes-browser .recipe-tab .tab-count { font-size: 10.5px; padding: 1px 5px; }
.recipes-browser .cat-btn {
  height: 42px; padding: 0 12px; border: none; border-radius: 10px;
  background: var(--surface-2); font-size: 12.5px; box-shadow: none;
}
.recipes-browser .cat-menu { top: calc(100% + 8px); }
.recipes-result {
  margin-left: auto; padding: 0 6px; font-size: 10.5px; color: var(--t4); white-space: nowrap;
}

/* 三列卡片 */
.recipes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.recipe-card {
  padding: 0; overflow: hidden; align-items: stretch; gap: 0;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.recipe-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-accent);
  box-shadow: 0 12px 28px -20px rgba(var(--accent-rgb), .55);
}
.recipe-cover {
  position: relative; height: 96px; display: flex; align-items: center;
  padding: 0 16px; overflow: hidden;
}
.recipe-cover.purple { background: linear-gradient(135deg, var(--accent-soft2), var(--accent-soft)); }
.recipe-cover.pink { background: linear-gradient(135deg, var(--danger-soft), var(--surface-2)); }
.recipe-cover.orange { background: linear-gradient(135deg, var(--warn-soft), var(--surface-2)); }
.recipe-cover.green { background: linear-gradient(135deg, var(--ok-soft), var(--surface-2)); }
.recipe-cover.blue { background: linear-gradient(135deg, var(--info-soft), var(--surface-2)); }
.recipe-cover::after {
  content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%;
  right: -42px; top: -58px; background: rgba(255,255,255,.22); pointer-events: none;
}
.recipe-cover-emoji {
  font-size: 42px; line-height: 1; transform: rotate(-4deg);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.12)); position: relative; z-index: 1;
}
.recipe-cover .recipe-tag {
  position: absolute; left: 14px; bottom: 11px; z-index: 2;
  padding: 3px 8px; border-radius: 6px; font-size: 9.5px; font-weight: 650;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(5px); color: var(--t2);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.recipe-cover .recipe-tag.purple { color: var(--accent-ink); }
.recipe-cover .recipe-tag.pink { color: var(--danger-ink); }
.recipe-cover .recipe-tag.orange { color: var(--warn-ink); }
.recipe-cover .recipe-tag.green { color: var(--ok-ink); }
.recipe-cover .recipe-tag.blue { color: var(--info-ink); }
.recipe-cover .star-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(5px); color: var(--t3); font-size: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.recipe-cover .star-btn:hover { background: var(--surface); transform: scale(1.08); }
.recipe-cover .star-btn.active { color: var(--warn-ink); }
.recipe-card-content {
  display: flex; flex-direction: column; gap: 10px;
  padding: 13px 15px 14px; flex: 1; min-width: 0;
}
.recipe-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.recipe-card-name {
  margin: 0; min-width: 0; font-size: 16px; line-height: 1.4; font-weight: 700;
  letter-spacing: -.2px; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recipe-index { flex-shrink: 0; padding-top: 3px; font-size: 9.5px; color: var(--t4); font-variant-numeric: tabular-nums; }
.recipe-card-body { display: flex; flex-direction: column; gap: 9px; flex: 1; }
.recipe-field-label {
  display: block; margin-bottom: 3px;
  font-size: 9.5px; font-weight: 650; letter-spacing: 1.1px; color: var(--t4);
}
.recipe-line {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin: 0; font-size: 12px; line-height: 1.65; color: var(--t2);
}
.recipe-steps { -webkit-line-clamp: 3; color: var(--t3); }
.recipe-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line);
}
.recipe-action {
  padding: 2px 0; border: none; background: none; color: var(--t4);
  font-size: 10.5px; font-family: inherit; cursor: pointer; transition: color .15s;
}
.recipe-action:hover { color: var(--accent-ink); }
.recipe-action.danger:hover { color: var(--danger-ink); }

/* 空状态 */
.recipes-empty {
  grid-column: 1 / -1; padding: 44px 20px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line-2);
  border-radius: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.03);
}
.recipes-empty-art {
  width: 58px; height: 58px; display: grid; place-items: center;
  margin: 0 auto 12px; border-radius: 18px;
  background: var(--accent-soft); font-size: 26px;
}
.recipes-empty h3 { margin: 0 0 6px; font-size: 15px; color: var(--t1); }
.recipes-empty p { max-width: 32em; margin: 0 auto 14px; font-size: 11.5px; line-height: 1.7; color: var(--t3); }
.recipes-empty-btn {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--accent-ink);
  font-size: 11.5px; font-family: inherit; cursor: pointer;
}
.recipes-empty-btn:hover { border-color: var(--line-accent); }

@media (max-width: 900px) {
  .recipes-wrap { max-width: 760px; }
  .recipes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .recipes-head { gap: 10px; margin-bottom: 16px; }
  .recipes-head .settings-back { width: 32px; height: 32px; }
  .recipes-head-row { flex-wrap: wrap; align-items: flex-start; gap: 10px; }
  .recipes-title { font-size: 24px; }
  .recipes-subtitle { font-size: 11.5px; }
  .recipes-head-side { width: 100%; justify-content: space-between; }
  .recipes-stats { font-size: 10px; padding: 4px 8px; }
  .recipes-head .btn-recipe-add { padding: 8px 13px; font-size: 12px; }
  .chef-card { padding: 14px 13px; border-radius: 16px; margin-bottom: 14px; }
  .chef-head { gap: 8px; margin-bottom: 11px; }
  .chef-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
  .chef-title { font-size: 14px; }
  .chef-sub { font-size: 10px; }
  .chef-slot { font-size: 9.5px; padding: 3px 7px; }
  .chef-input-row { flex-direction: column; gap: 8px; margin-bottom: 9px; }
  .chef-go { width: 100%; height: 40px; }
  .chef-advanced { display: none; }
  .chef-advanced.open { display: block; margin-top: 10px; }
  .chef-more {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; margin-top: 2px; padding: 9px 11px;
    border: 1px solid var(--line); border-radius: 9px;
    background: var(--surface); color: var(--t3);
    font-size: 11px; font-family: inherit; cursor: pointer;
  }
  .chef-more span { font-size: 13px; color: var(--accent-ink); }
  .chef-chip-row { margin-bottom: 8px; }
  .chef-chip-label { width: 48px; font-size: 10px; }
  .chef-chip { font-size: 11px; padding: 4px 8px; }
  .chef-output { margin-top: 8px; }
  .chef-idle { padding: 11px; font-size: 11px; line-height: 1.6; }
  .recipes-browser { padding: 7px; gap: 7px; border-radius: 13px; margin-bottom: 14px; }
  .recipes-browser .recipe-search { flex: 1 1 100%; order: 1; height: 42px; }
  .recipes-browser .recipe-tabs { order: 2; flex: 1 1 auto; min-width: 0; padding: 3px; }
  .recipes-browser .recipe-tab { flex: 1; justify-content: center; padding: 7px 8px; font-size: 11px; }
  .recipes-browser .cat-dropdown { order: 3; flex-shrink: 0; }
  .recipes-browser .cat-btn { height: 38px; padding: 0 10px; font-size: 11px; }
  .recipes-result { display: none; }
  .recipes-grid { grid-template-columns: 1fr; gap: 12px; }
  .recipe-cover { height: 88px; padding: 0 14px; }
  .recipe-cover-emoji { font-size: 36px; }
  .recipe-card-content { padding: 12px 14px 13px; }
  .recipe-card-name { font-size: 15.5px; }
}
@media (max-width: 380px) {
  .recipes-browser .recipe-tab { font-size: 10.5px; padding: 6px; }
  .recipes-browser .recipe-tab .tab-star,
  .recipes-browser .recipe-tab .tab-count { display: none; }
}

@media (max-width: 700px) {
  .chef-head { flex-wrap: wrap; }
}

/* 食谱卡片底部操作在深色主题下也保持可读 */
.recipe-action { font-size: 11px; color: var(--t3); }
.recipe-action.danger { color: var(--danger-ink); opacity: .82; }

/* ============ 心情日记：桌面双栏 ============ */
.diary-hero, .diary-search { max-width: 1040px; }
.diary-workspace {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px; max-width: 1040px; margin: 0 auto; align-items: start;
}
.diary-main { min-width: 0; }
.diary-workspace .diary-book { max-width: none; margin: 0; }
.diary-workspace .diary-pager { margin: 14px 0 0; }
.diary-workspace .diary-mood-card {
  max-width: none; margin: 0; height: 100%; padding: 16px 16px 18px;
}
.diary-mood-card .card-header { flex-wrap: wrap; align-items: flex-start; gap: 3px 8px; }
.diary-mood-card .diary-mood-tip { flex-basis: 100%; font-size: 10.5px; }
.diary-mood-card .mc-grid { gap: 4px; }
.diary-mood-card .mc-day { height: 38px; border-radius: 9px; }
.diary-mood-card .mc-day .mc-num { font-size: 12px; }
.diary-mood-card .mc-day .mc-emo { font-size: 13px; }
.diary-mood-card .mc-legend { gap: 6px; font-size: 10px; line-height: 1.8; }
.diary-workspace .diary-page { min-height: 360px; }

@media (max-width: 1180px) {
  .diary-hero, .diary-search { max-width: 840px; }
  .diary-workspace { grid-template-columns: 1fr; max-width: 840px; }
  .diary-workspace .diary-mood-card { margin-top: 14px; height: auto; }
}
@media (max-width: 700px) {
  .diary-workspace { gap: 0; }
  .diary-workspace .diary-mood-card { margin-top: 14px; padding: 14px 14px 16px; }
  .diary-workspace .diary-page { min-height: 340px; }
}

/* ============ 数据管理独立分区 ============ */
.data-wrap { max-width: 880px; }
.data-banner {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 20px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 18px;
  background:
    radial-gradient(circle at 94% -22%, var(--accent-soft2), transparent 58%),
    linear-gradient(150deg, var(--surface-2), var(--surface));
  box-shadow: var(--card-shadow);
}
.data-banner-icon {
  width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center;
  border: 1px solid var(--line-accent); border-radius: 13px;
  background: var(--accent-soft); font-size: 20px;
}
.data-banner-title { font-size: 14px; font-weight: 700; color: var(--t1); }
.data-banner p { max-width: 54em; margin: 4px 0 0; font-size: 11.5px; line-height: 1.75; color: var(--t3); }
.data-grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: stretch; }
.data-grid > .settings-section { height: 100%; margin-bottom: 0; display: flex; flex-direction: column; }
.data-grid > .settings-section .danger-row { margin-top: auto; }
.data-footnote {
  margin: 16px 0 0; padding: 0 8px; text-align: center;
  font-size: 10.5px; line-height: 1.7; color: var(--t4);
}
@media (max-width: 760px) {
  .data-banner { padding: 15px 14px; border-radius: 15px; }
  .data-banner-icon { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; }
  .data-banner-title { font-size: 13px; }
  .data-grid { grid-template-columns: 1fr; }
  .data-footnote { padding: 0; text-align: left; }
}

/* 侧边栏品牌：完整字标横向组合 */
.sidebar-brand { display: block; padding: 5px 8px 12px; }
.brand-lockup {
  display: block; width: 170px; height: auto;
  border-radius: 9px; background: #fbfbf9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

/* ============ 专注趋势：柱状 + 累计折线组合图 ============ */
.chart-container {
  position: relative; display: block;
  height: 140px; padding: 0;
}
.chart-card .chart-container { flex: 1 1 auto; height: auto; min-height: 110px; }
.chart-container canvas { display: block; width: 100%; height: 100%; }
.focus-line-canvas { cursor: crosshair; }
.chart-tip {
  position: absolute; z-index: 5; display: none;
  transform: translateX(-50%);
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--t1);
  box-shadow: 0 8px 22px -10px rgba(0,0,0,.35);
  font-size: 10.5px; line-height: 1.45; white-space: nowrap;
  pointer-events: none;
}
.chart-tip.show { display: block; }
.chart-tip span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--t3); }
