/* 外观选择不依赖当前主题，切换时始终保持相同位置。 */
.appearance-panel { padding: 4px 0 18px; border-bottom: 1px solid var(--line); }
.appearance-panel h2 { margin-bottom: 11px; font-size: 15px; }
.appearance-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.appearance-options button { display: grid; gap: 4px; min-width: 0; padding: 9px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); background: var(--surface); text-align: left; }
.appearance-options button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.appearance-options strong { font-size: 12px; }
.appearance-options small { color: var(--text-muted); font-size: 10px; }
.appearance-swatch { display: block; height: 45px; border: 1px solid var(--line); border-radius: 4px; }
.classic-swatch { background: linear-gradient(150deg, #fff 18%, #eaf1fa 18% 50%, #f4f6fa 50%); }
.atlas-swatch { background: radial-gradient(circle at 67% 50%, #7faabd 0 5px, #eaf3f5 6px 18px, transparent 19px), radial-gradient(circle at 25% 34%, #c49868 0 4px, transparent 5px), #fffdf9; }

/* 图谱主题沿用图谱页材质与关系色，经典主题不受影响。 */
html[data-theme="atlas"] { --bg: #f5f7f5; --surface: #fffdf9; --surface-soft: #fbfcf9; --surface-tint: #eaf2f3; --text: #263e4c; --text-secondary: #637d89; --text-muted: #81959e; --line: #dce6e5; --line-strong: #cbdcde; --accent: #3e7895; --accent-soft: #e7f0f3; --shadow: 0 5px 17px #365e6b0e; --shadow-lift: 0 8px 22px #365e6b18; --radius: 7px; }
html[data-theme="atlas"] body { background: var(--bg); background-image: none; }
html[data-theme="atlas"] .app-shell { max-width: 800px; }
html[data-theme="atlas"] .app-header { border-color: var(--line); }
html[data-theme="atlas"] .eyebrow { color: #7397a7; }
html[data-theme="atlas"] .app-header h1 { color: #294757; }
html[data-theme="atlas"] .icon-button, html[data-theme="atlas"] .round-button { border-radius: 50%; background: #fffdf9; }
html[data-theme="atlas"] .glass-panel { border-color: var(--line); border-radius: 7px; background: var(--surface); box-shadow: none; }

/* 首页以进度、关联和最近记录连续展开，不堆叠漂浮卡片。 */
html[data-theme="atlas"] .today-focus { padding: 17px 0 21px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
html[data-theme="atlas"] .today-focus .eyebrow { color: #a87544; letter-spacing: 1px; }
html[data-theme="atlas"] .today-count strong { color: #284d61; font-size: 56px; font-weight: 650; }
html[data-theme="atlas"] .today-meter { height: 5px; border-radius: 4px; background: #e1e9e8; }
html[data-theme="atlas"] .today-meter span { background: #6998a9; }
html[data-theme="atlas"] .today-action { border-radius: 5px; background: #39708c; box-shadow: none; }
html[data-theme="atlas"] .today-meta { border-color: var(--line); }
html[data-theme="atlas"] .today-section, html[data-theme="atlas"] .rhythm-panel { padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
html[data-theme="atlas"] .today-section-head { margin-bottom: 12px; }
html[data-theme="atlas"] .today-recent { border-color: var(--line); }
html[data-theme="atlas"] .today-recent:hover { background: #eaf2f3; }
html[data-theme="atlas"] .today-more { border-color: var(--line); }

/* 图谱预览只在图谱主题中出现，内容由真实记忆关系推导。 */
.home-graph-preview { display: none; }
html[data-theme="atlas"] .home-graph-preview { display: block; padding: 18px 0; border-bottom: 1px solid var(--line); }
.home-graph-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.home-graph-preview-head h2 { font-size: 16px; }
.home-graph-preview-head button { padding: 5px 0; border: 0; color: var(--accent); background: transparent; font-size: 11px; }
.home-graph-map { position: relative; height: 150px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background-color: #fffdf9; background-image: radial-gradient(circle, #d1e0e3 1px, transparent 1px); background-size: 20px 20px; }
.home-graph-map svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.home-graph-map path { fill: none; stroke: #a7c3cd; stroke-width: 1.5; }
.home-graph-map path.is-manual { stroke: #bd8954; stroke-width: 2; }
.home-graph-node { position: absolute; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; padding: 5px; transform: translate(-50%, -50%); border: 2px solid #a9c9d4; border-radius: 50%; color: #315f76; background: #eef5f5; font-size: 10px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.home-graph-node.is-neighbor { width: 46px; height: 46px; border-width: 1px; background: #fffdf9; font-size: 9px; }
.home-graph-node.is-manual { border-color: #c69a69; color: #8b5e34; }
.home-graph-empty { display: grid; height: 100%; place-items: center; padding: 15px; color: var(--text-secondary); font-size: 12px; text-align: center; }

html[data-theme="atlas"] .filter-chip, html[data-theme="atlas"] .capture-mode { border-radius: 5px; }
html[data-theme="atlas"] .memory-card { border-color: var(--line); }
html[data-theme="atlas"] .memory-card:hover { background: #eaf2f3; }
html[data-theme="atlas"] .capture-editor, html[data-theme="atlas"] .capture-tags-field input { border-radius: 6px; background: #fffdf9; }
html[data-theme="atlas"] .capture-mode.is-active { color: var(--accent); background: var(--accent-soft); }
html[data-theme="atlas"] .button-primary { border-color: #39708c; border-radius: 5px; background: #39708c; box-shadow: none; }
html[data-theme="atlas"] .button-primary:hover { background: #2f6079; }
html[data-theme="atlas"] .button-secondary, html[data-theme="atlas"] .button-quiet { border-radius: 5px; }
html[data-theme="atlas"] .review-card { border-color: var(--line); }
html[data-theme="atlas"] .settings-panel { padding: 15px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
html[data-theme="atlas"] .model-setting { border-radius: 6px; background: var(--surface); }
html[data-theme="atlas"] .model-setting.is-default { border-color: #9bbecb; background: #eaf3f4; }
html[data-theme="atlas"] .sheet { border-color: var(--line); border-radius: 9px 9px 0 0; background: var(--surface); }
html[data-theme="atlas"] .tab-bar { border-top-color: var(--line); background: #fafbf9f5; box-shadow: 0 -5px 14px #365e6b0c; }
html[data-theme="atlas"] .tab-button { border-radius: 5px; }
html[data-theme="atlas"] .tab-button.is-active { background: #e7f0f3; }
html[data-theme="atlas"] .atlas-viewport { border-radius: 7px; box-shadow: none; }

@media (prefers-reduced-motion: reduce) { .home-graph-node, .appearance-options button { transition: none; } }
