/* 首页把待复习行动放在第一屏，次要信息保持可访问但不争抢视觉。 */
body { background-color: #f8faf9; background-image: none; }
.today-focus { padding: 7px 3px 24px; }
.today-focus .eyebrow { color: #54829a; letter-spacing: 1.6px; }
.today-count { display: flex; align-items: baseline; gap: 11px; margin: 12px 0 6px; color: #24475e; }
.today-count strong { font-size: clamp(62px, 18vw, 80px); font-weight: 680; letter-spacing: -0.08em; line-height: 1; }
.today-count span { font-size: 22px; font-weight: 580; }
.today-summary { color: #728592; font-size: 12px; }
.today-meter { height: 6px; margin: 21px 0 18px; overflow: hidden; border-radius: 9px; background: #e4edf0; }
.today-meter span { display: block; height: 100%; border-radius: inherit; background: #4d89aa; transition: width 0.3s ease; }
.today-action { width: 100%; min-height: 50px; border: 0; border-radius: 12px; color: #fff; background: #315f81; font-size: 14px; font-weight: 650; }
.today-action:active { transform: scale(.985); }
.today-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; color: #8b9aa3; font-size: 11px; }
.today-meta strong { color: #47677b; font-size: 14px; }
.today-section { margin: 6px 0 22px; }
.today-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 11px; }
.today-section-head h2 { font-size: 15px; }
.today-section-head span, .today-section-head button { padding: 0; border: 0; color: #8698a2; background: none; font-size: 11px; }
.today-chart { max-height: 168px; overflow: hidden; }
.today-chart .plan-summary { display: none; }
.today-chart .plan-chart { min-height: 0; }
.today-recent { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 9px 0; border: 0; border-top: 1px solid #e5ebed; color: #344a58; background: none; text-align: left; }
.today-recent span { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.today-recent small { flex: none; color: #91a0a8; font-size: 10px; }
.today-more { margin-top: 16px; border-top: 1px solid #e5ebed; }
.today-more summary { padding: 18px 2px; color: #5c7482; font-size: 12px; cursor: pointer; }
.today-more .stats-grid { border: 1px solid #e5ebed; border-radius: 12px; background: white; }
.today-more .rhythm-panel { border: 1px solid #e5ebed; box-shadow: none; }

/* 记忆页的列表与图谱并列，搜索栏留在画布外防止拖动画布时误触。 */
.memory-switch { display: flex; gap: 20px; margin: -4px 0 17px; border-bottom: 1px solid #e5ebec; }
.memory-switch button { min-height: 40px; padding: 0 2px 10px; border: 0; border-bottom: 2px solid transparent; color: #91a0a7; background: none; font-size: 13px; }
.memory-switch button.is-active { border-color: #3c7b92; color: #315b70; font-weight: 650; }
.graph-search { display: flex; align-items: center; gap: 8px; min-height: 43px; margin-bottom: 12px; padding: 0 12px; border: 1px solid #e5ecee; border-radius: 10px; color: #93a3ac; background: white; }
.graph-search input { flex: 1; min-width: 0; border: 0; outline: 0; color: #2c4554; background: transparent; font-size: 12px; }

/* 画布默认仅展示星群；点开主题或节点后才出现更细的点和线。 */
.atlas-viewport { position: relative; height: clamp(420px, calc(100svh - 275px), 620px); overflow: hidden; border: 1px solid #e5ebeb; border-radius: 16px; background: #fbfcfa; touch-action: none; -webkit-touch-callout: none; }
.atlas-stage { position: absolute; inset: 0; transform-origin: 50% 50%; }
.atlas-context { position: absolute; top: 18px; left: 16px; z-index: 2; color: #8b9ba3; font-size: 11px; }
.atlas-group { position: absolute; display: grid; place-content: center; transform: translate(-50%, -50%); border: 0; border-radius: 50%; color: #315565; background: #e7f0ee; text-align: center; }
.atlas-group:nth-of-type(2n) { background: #e9eff3; }
.atlas-group:nth-of-type(3n) { background: #f1efe9; }
.atlas-group.is-quiet { color: #75858b; background: #edf0ef; }
.atlas-group strong { max-width: 95px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.atlas-group small { margin-top: 3px; color: #7a939e; font-size: 10px; }
.atlas-hud { position: absolute; bottom: 16px; left: 50%; z-index: 4; transform: translateX(-50%); padding: 8px 13px; border: 1px solid #e3e9e9; border-radius: 99px; color: #607a88; background: white; box-shadow: 0 5px 16px #28465318; font-size: 11px; white-space: nowrap; }
.atlas-overview { position: absolute; top: 12px; right: 12px; z-index: 4; padding: 8px 10px; border: 1px solid #e2e9ea; border-radius: 99px; color: #547d8b; background: #fff; font-size: 11px; }
.atlas-node { position: absolute; z-index: 2; display: grid; justify-items: center; gap: 5px; min-width: 30px; max-width: 120px; padding: 0; transform: translate(-50%, -50%); border: 0; color: #4f6670; background: none; text-align: center; }
.atlas-node-dot { display: block; width: 11px; height: 11px; border-radius: 50%; background: #9baeb2; }
.atlas-node-label { display: none; max-width: 110px; overflow: hidden; font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.atlas-node.is-labelled .atlas-node-label { display: block; }
.atlas-node.is-small .atlas-node-dot { width: 7px; height: 7px; background: #bccbcb; }
.atlas-node.is-focus { color: #315d70; font-weight: 700; }
.atlas-node.is-focus .atlas-node-dot { width: 48px; height: 48px; border: 8px solid #e3eff0; background: #53899c; box-shadow: 0 0 0 13px #e9f3f14d; }
.atlas-node.is-focus .atlas-node-label { font-size: 14px; }
.atlas-node.is-manual .atlas-node-dot { background: #4d8da1; }
.atlas-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.atlas-edges path { fill: none; stroke: #d4ddde; stroke-width: 1.2; }
.atlas-edges path.is-manual { stroke: #4e899d; stroke-width: 2; }
.atlas-edges .atlas-edge-label { fill: #356477; stroke: #fbfcfa; stroke-width: 3px; paint-order: stroke; font-size: 9px; font-weight: 650; }
.atlas-peek { position: absolute; right: 0; bottom: 0; left: 0; z-index: 3; padding: 15px 17px 18px; border-top: 1px solid #e7ecec; border-radius: 15px 15px 0 0; background: #fff; box-shadow: 0 -6px 18px #324f5b10; }
.atlas-peek > div { display: flex; justify-content: space-between; gap: 12px; }
.atlas-peek strong { overflow: hidden; color: #2d4d5d; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.atlas-peek button { padding: 0; border: 0; color: #3f8299; background: none; font-size: 11px; white-space: nowrap; }
.atlas-peek p { margin: 7px 0 9px; color: #8798a0; font-size: 11px; }
.atlas-peek .atlas-link-action { padding: 7px 10px; border-radius: 7px; background: #eaf3f4; font-weight: 600; }
.atlas-empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 9px; padding: 25px; color: #667d88; text-align: center; }
.atlas-empty strong { color: #355367; font-size: 15px; }.atlas-empty p { font-size: 12px; }
.atlas-empty button { width: fit-content; margin: 8px auto; padding: 9px 13px; border: 0; border-radius: 9px; color: white; background: #315f81; font-size: 12px; }
.atlas-candidates { display: grid; max-height: 46vh; margin-top: 12px; overflow-y: auto; }
.atlas-candidate { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 47px; border-bottom: 1px solid #e5ebee; }
.atlas-candidate span { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.atlas-candidate span { display: grid; min-width: 0; }
.atlas-candidate small { overflow: hidden; color: #78919d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.atlas-candidate button { flex: none; padding: 7px 9px; border: 0; border-radius: 6px; color: #37778d; background: #eaf3f4; font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  .today-meter span { transition: none; }
}

/* ===== 关联图谱：纸页画布 + 墨点关系 ===== */
body { background-color: var(--bg); background-image: none; }
.memory-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef0f2;
}
.memory-switch button { min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px; color: var(--text-secondary); background: transparent; font-size: 12px; }
.memory-switch button.is-active { border: 1px solid var(--line); color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(31, 42, 56, 0.08); font-weight: 650; }
.graph-search { min-height: 42px; margin-bottom: 12px; padding: 0 13px; border-color: var(--line-strong); border-radius: 10px; color: var(--text-muted); background: var(--surface); box-shadow: none; }
.graph-search input { color: var(--text); }
.atlas-viewport {
  height: clamp(360px, calc(100svh - 350px), 560px);
  border-color: var(--line);
  border-radius: 14px;
  background-color: #fffdf9;
  background-image: radial-gradient(circle at 1px 1px, rgba(47, 111, 174, 0.12) 1px, transparent 0);
  background-size: 22px 22px;
  box-shadow: var(--shadow);
}
.atlas-viewport::before { position: absolute; top: 16px; right: 16px; z-index: 1; color: var(--text-muted); content: 'MEMORY ATLAS'; font-size: 9px; letter-spacing: 1.6px; }
.atlas-context { top: 17px; left: 16px; color: var(--text-secondary); font-size: 11px; }
.atlas-group { border: 1px solid rgba(47, 111, 174, 0.24); color: var(--text); background: rgba(237, 244, 250, 0.92); box-shadow: 0 8px 18px rgba(31, 42, 56, 0.08); transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease; }
.atlas-group:nth-of-type(2n) { background: rgba(247, 244, 237, 0.94); border-color: rgba(175, 145, 86, 0.24); }
.atlas-group:nth-of-type(3n) { background: rgba(242, 242, 239, 0.94); border-color: rgba(112, 125, 137, 0.24); }
.atlas-group:hover { border-color: var(--accent); box-shadow: 0 12px 24px rgba(31, 42, 56, 0.14); transform: translate(-50%, -50%) translateY(-2px); }
.atlas-group.is-quiet { color: var(--text-secondary); background: rgba(247, 248, 248, 0.94); border-color: var(--line-strong); }
.atlas-group strong { font-size: 14px; }
.atlas-group small { color: var(--text-secondary); }
.atlas-node { color: var(--text-secondary); }
.atlas-node-dot { width: 10px; height: 10px; background: var(--accent); box-shadow: 0 0 0 5px rgba(47, 111, 174, 0.10); }
.atlas-node.is-preview { z-index: 3; }
.atlas-node.is-preview .atlas-node-dot { width: 7px; height: 7px; background: #8ba3b3; box-shadow: 0 0 0 3px rgba(139, 163, 179, 0.12); }
.atlas-node.is-small .atlas-node-dot { width: 6px; height: 6px; background: #aab7bf; box-shadow: none; }
.atlas-node.is-focus .atlas-node-dot { width: 46px; height: 46px; border: 7px solid #e8f1f6; background: var(--accent); box-shadow: 0 0 0 11px rgba(47, 111, 174, 0.10); }
.atlas-node.is-manual .atlas-node-dot { background: #b57935; }
.atlas-edges path { stroke: rgba(47, 111, 174, 0.22); stroke-width: 1.1; }
.atlas-edges path.is-manual { stroke: #b57935; stroke-width: 2; }
.atlas-hud { bottom: 14px; padding: 7px 12px; border-color: var(--line); color: var(--text-secondary); background: rgba(255, 253, 249, 0.94); box-shadow: 0 6px 16px rgba(31, 42, 56, 0.10); }
.atlas-overview { top: 12px; right: 12px; border-color: var(--line); color: var(--accent); background: rgba(255, 253, 249, 0.94); }
.atlas-peek { border-top-color: var(--line); background: rgba(255, 253, 249, 0.96); box-shadow: 0 -8px 20px rgba(31, 42, 56, 0.08); }
.atlas-peek strong { color: var(--text); }
.atlas-peek button { color: var(--accent); }
.atlas-peek .atlas-link-action { color: var(--accent); background: var(--accent-soft); }
.atlas-viewport { transition: border-color var(--motion-base) ease, box-shadow var(--motion-base) ease; }
.atlas-viewport.is-dragging { cursor: grabbing; border-color: rgba(47, 111, 174, 0.42); box-shadow: 0 12px 30px rgba(31, 42, 56, 0.14); }
.atlas-stage { transition: transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.atlas-viewport.is-dragging .atlas-stage { transition: none; }
.atlas-node { transition: transform 160ms ease, opacity 160ms ease, color 160ms ease; animation: atlas-node-in 280ms ease-out both; }
.atlas-node:hover { color: var(--accent); transform: translate(-50%, -50%) scale(1.06); }
.atlas-node.is-focus { animation: atlas-focus-in 300ms cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.atlas-edges path { stroke-dasharray: 160; stroke-dashoffset: 160; animation: atlas-edge-in 420ms ease-out forwards; }
.atlas-edges path:nth-child(2) { animation-delay: 35ms; }
.atlas-edges path:nth-child(3) { animation-delay: 70ms; }
.atlas-edges path:nth-child(4) { animation-delay: 105ms; }
@keyframes atlas-node-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes atlas-focus-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.75); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes atlas-edge-in { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .atlas-stage, .atlas-viewport, .atlas-node { transition: none; animation: none; }
  .atlas-edges path { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
}
