/* ==========================================================================
   CSS 分层（Cascade Layers）：reset → base → components → utilities
   层序只在下面这一行声明一次，与各层代码块在文件里的书写先后无关：
     · 普通声明：层序靠后的胜出（utilities 因此能稳定覆盖 components，不必再加 !important）；
     · !important 声明：顺序相反，层序靠前的胜出；
     · 不在任何层里的规则优先级最高，本文件已无此类规则。
   各层职责：
     reset      —— 盒模型、根滚动容器、表单元素外观等零基础重置，不含视觉主题
     base       —— 设计令牌（:root）与全站排版/文字级默认（选中态、输入光标、列表标记、断词）
     components —— 全部组件与视图样式，含响应式断点、高对比度/forced-colors 降级与打印样式
     utilities  —— 单类通用助手；需要覆盖组件时写在这里，而不是加 !important
   ========================================================================== */
@layer reset, base, components, utilities;

/* ==========================================================================
   reset：零基础重置。只统一盒模型、根滚动容器与表单元素外观，
   不写死品牌色，也不产生任何视觉主题。
   ========================================================================== */
@layer reset {

* { box-sizing: border-box; }
/* 字号稳定：禁止 iOS Safari 在横屏（或窄容器）时对文字做自动放大（text autosizing），
   保证各断点下字号与设计稿一致、不发生无预期的重新排版。声明在根元素上，全站继承。 */
/* 触控：关闭 WebKit 在移动端的默认点击高亮方块（灰/蓝色块），按下反馈统一交给下方各控件的 :active 表达。
   该属性可继承，声明在 html 上即可覆盖全站；再对标准交互元素显式声明一次，兼容不继承该属性的内核。 */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  /* 滚动条槽位：根滚动容器始终预留滚动条宽度。
     切换视图（如列表长短变化）导致纵向滚动条出现/消失时，页面可用宽度会突变，
     居中布局与整页内容会左右抖动；预留槽位后内容宽度恒定，不随滚动条状态跳变。
     只作用于根容器的滚动条槽位，不改任何元素自身的滚动能力与滚动条外观。 */
  scrollbar-gutter: stable;
}
a, button, summary, label, input, select, textarea, [role="button"], [role="tab"], [tabindex] { -webkit-tap-highlight-color: transparent; }
/* 滚动边界：根滚动容器到达上下边界时不再触发整页橡皮筋回弹 / 下拉刷新。
   同时阻断子滚动容器（.logs、.journal-transcript-list 等）滚到底后把回弹链传给整页。
   只声明根容器，不改任何元素自身的滚动能力与内部滚动条。 */
html, body { overscroll-behavior: none; }
body { margin: 0; min-height: 100vh; background: #fbfbfd; color: var(--ink); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, select, textarea { font: inherit; }
input[type="date"], input[type="datetime-local"], input[type="number"], input[type="time"] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
button { border: 0; cursor: pointer; }

} /* @layer reset 结束 */

/* ==========================================================================
   base：设计令牌 + 全站排版与文字级默认。
   令牌只在此处声明一次；移动端、prefers-contrast、forced-colors 等场景对令牌的覆盖
   仍写在 components 层，靠层序天然覆盖本层，不需要提高特异性或重复声明。
   ========================================================================== */
@layer base {

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
  background: #fbfbfd;
  color: #1d1d1f;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --panel: #ffffff;
  --accent: #2e6244;
  --accent-soft: #eaf3ed;
  --warm: #7c4a2a;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --panel-strong: #ffffff;
  --panel-soft: #f5f5f7;
  --line-strong: rgba(0, 0, 0, 0.14);
  --accent-ink: #1b3826;
  --warm-soft: #faf4ef;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --motion-press: 100ms;
  --motion-ui: 150ms;
  --radius-control: 10px;
  --radius-card: 16px;
  --radius-panel: 20px;
  --focus-ring: var(--accent);
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
  --anchor-scroll-offset: 100px;
  --list-intrinsic-size: 240px;
}

/* 选中文字：用主题色作底色、近白作前景，保证选中态可辨识且对比度 ≥ 4.5:1 */
::selection {
  background: var(--accent);
  color: var(--panel-soft);
  text-shadow: none;
}

/* 输入光标（caret）：统一为主题强调色，与上面 ::selection 的选中底色同源，
   避免浏览器默认黑光标在深色/主题面板上不协调、也避免各控件光标颜色不一致。
   颜色只取既有变量 --accent，不新增魔法数字；caret-color 可继承，声明在输入类元素上即可覆盖全站。
   只改光标颜色，不动尺寸、边框与动效。 */
input, textarea, [contenteditable] {
  caret-color: var(--accent);
}

/* 列表标记（::marker）：统一全站 <li> 标记的颜色与字号。
   默认标记会继承 li 的文字颜色，并随各列表自己的字号（10px / 12px 混用）变化，
   于是不同面板里的圆点颜色与大小不一致。这里固定为强调色 + 1em（跟随所在列表的文字大小），
   使同一列表内标记尺寸统一、跨列表颜色一致；不改字号绝对值，避免大列表出现突兀大圆点。
   对比度：--accent(#536a5d) 在页面底色 #f2f1ec 上约 5.2:1，在白色/浅色面板上更高，均 ≥ 4.5:1。
   只作用于标记本身，不动列表的间距、缩进与布局。 */
li::marker {
  color: var(--accent);
  font-size: 1em;
}

/* Product Design Standards: Typography balance & tabular numbers */
h1, h2, h3, h4, h5, .topbar h1, .view-intro h2, .section-title h2 {
  text-wrap: balance;
}
p:not(.section-kicker), .hint, .view-intro p {
  text-wrap: pretty;
}
.tabular-nums, time, [role="status"], .stats-metrics strong, .workspace-snapshot strong, .multi-day-grid strong, .multi-day-grid small, .data-health-metrics strong, .stats-bar-row strong, .nav-badge, .search-result-head time, .day-time-guide time, .day-event-meta, .review-summary strong, .review-summary small, .review-day-card strong, .file-meta, .auto-ingest-history-row small, .auto-ingest-history-row time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.review-summary p, .review-summary small, .review-empty span, .drop-copy span, .selected-files.empty span, .status-copy, .setting-status, .review-day-card span, .review-day-card strong, .hint {
  text-wrap: balance;
}
.stats-surface, .review-dashboard, .journal-dashboard, .auto-ingest-history-row, .selected-files, .day-event-card, .multi-day-grid {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.search-category, .life-ledger-head strong, .journal-metrics strong, .workspace-event-meta strong, .pipeline-state-head strong, .setting-badge, #jev-confidence-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* 长文本容器：英文长词按音节断行，避免超长英文单词（URL、专有名词、ASR 转写里的长词）
   在窄栏里整词溢出，或把两列/多列卡片撑破。
   断词词典由「内容语言」决定：本页是 <html lang="zh-CN">，中文没有断词词典，
   英文长词在 zh 语言下也不会被断，所以对这些容器显式声明内容语言 -webkit-locale: "en"
   （Blink/WebKit 用它决定断词与字体回退所用的语言），只作用于下面这些容器，不改全站中文排版。
   hyphens: auto 只提供断点、不改变中文本身的换行规则；overflow-wrap: break-word 作兜底，
   在拿不到英文词典的内核（如内容未标 lang="en" 的 Firefox）里仍能断行不溢出。
   不作用于 <pre>/<code>/日志/JSON 等代码块：代码里插连字符会改变语义。 */
.pattern-card > p,
.pattern-evidence blockquote,
.search-result-text,
.search-evidence,
.review-draft-session li p,
.journal-review-note p,
.workspace-event-card p,
.daily-reflection li,
.day-event-title,
.day-event-source p,
.journal-transcript-row p,
.journal-transcript-row small,
.multi-day-note,
.multi-day-observations.insufficient > p,
.result-card p,
.natural-correction-feedback,
.pinned-memo-text,
.deepseek-summary-box,
.deepseek-chat-answer,
.chat-bubble {
  hyphens: auto;
  -webkit-hyphens: auto;
  -webkit-locale: "en";
  overflow-wrap: break-word;
}

/* 语言设置：显式标成英文的子树即使处在 zh-CN 文档里也按英文断词。
   :lang() 是标准机制，内容侧给英文段落加 lang="en" 后，不认 -webkit-locale 的内核同样生效。 */
:lang(en) {
  hyphens: auto;
  -webkit-hyphens: auto;
}

} /* @layer base 结束 */

/* ==========================================================================
   components：全部组件与视图样式。
   响应式断点、prefers-* / forced-colors 降级、@supports 能力探测与打印样式
   都留在本层内、并按原有顺序排在组件规则之后，因此它们覆盖组件的效果与分层前一致
   （同一层内，后写的胜出）。
   ========================================================================== */
@layer components {

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 232px; display: flex; flex-direction: column; padding: 26px 18px 20px; border-right: 1px solid rgba(65, 72, 66, .10); background: rgba(246, 245, 240, .86); -webkit-backdrop-filter: blur(20px) saturate(125%); backdrop-filter: blur(20px) saturate(125%); z-index: 30; }
.brand-block { display: flex; align-items: center; gap: 11px; padding: 0 8px 24px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #26312b; color: #fff; font: 700 16px/1 Georgia, serif; box-shadow: 0 8px 18px rgba(35, 48, 40, .18); }
.brand-block strong { display: block; font-size: 14px; letter-spacing: -.01em; }
.brand-block span { display: block; margin-top: 2px; color: #646864; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.app-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { position: relative; width: 100%; min-height: 44px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 0 11px; border-radius: 12px; background: transparent; color: #646a65; text-align: left; font-size: 13px; font-weight: 650; transition: background-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out), box-shadow var(--motion-press) var(--ease-out); }
.nav-item:hover { background: rgba(255,255,255,.7); color: #303531; }
.nav-item.active { background: #fff; color: #202621; box-shadow: 0 6px 18px rgba(50, 55, 51, .06), inset 0 0 0 1px rgba(52, 61, 54, .07); }
.nav-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: #646864; font-size: 16px; font-weight: 500; }
.nav-item.active .nav-icon { background: var(--accent-soft); color: var(--accent); }
.nav-badge { min-width: 22px; height: 20px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; background: #fff0dd; color: #9d653d; font-size: 10px; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 10px 0; color: #646864; font-size: 10px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #a8ada9; box-shadow: 0 0 0 4px rgba(128,136,130,.10); transition: background-color var(--motion-ui) var(--ease-out), box-shadow var(--motion-ui) var(--ease-out); }
.status-dot.ready { background: #67a17d; box-shadow: 0 0 0 4px rgba(103,161,125,.10); }
.status-dot.warning { background: #c9944f; box-shadow: 0 0 0 4px rgba(201,148,79,.12); }
.status-dot.error { background: #bc6f68; box-shadow: 0 0 0 4px rgba(188,111,104,.12); }

.workspace { grid-column: 2; width: min(1120px, calc(100vw - 264px)); margin: 0 auto; padding: 34px 34px 80px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: -34px -10px 24px; padding: 30px 10px 16px; background: linear-gradient(180deg, rgba(242,241,236,.98) 70%, rgba(242,241,236,0)); backdrop-filter: blur(14px) saturate(125%); }
.page-kicker, .section-kicker { margin: 0 0 5px; color: #646864; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.topbar h1 { margin: 0; font: 600 clamp(24px, 3.5vw, 32px)/1.15 -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif; letter-spacing: -.025em; color: var(--ink); }
.topbar-actions { display: flex; gap: 8px; }
.system-status-panel { display: grid; gap: 9px; margin: -14px 0 20px; padding: 12px 15px; border: 1px solid rgba(58,65,60,.10); border-radius: 13px; background: rgba(255,255,255,.74); box-shadow: 0 5px 18px rgba(50,55,51,.035); }
.system-status-head, .system-status-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.system-status-head > strong { color: #48514a; font-size: 11px; }
.system-status-overall { padding: 4px 8px; border-radius: 999px; background: #eff1ed; color: #68716a; font-size: 10px; font-weight: 750; }
.system-status-overall.ready { background: #edf5ed; color: #426d4a; }
.system-status-overall.active { background: #edf3f8; color: #42657e; }
.system-status-overall.warning { background: #fff4e5; color: #8a6534; }
.system-status-items { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.system-status-items > span { display: grid; gap: 3px; min-width: 0; }
.system-status-items b { color: #646864; font-size: 10px; font-weight: 650; }
.system-status-items em { overflow: hidden; color: #59625b; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
/* [2026-10-14] 状态条真实数据接线后的色调（原先 JS 从不更新这些元素，无色调需求） */
.system-status-overall.checking { background: #eff1ed; color: #68716a; }
.system-status-items em[data-tone="ok"] { color: #426d4a; font-weight: 650; }
.system-status-items em[data-tone="active"] { color: #42657e; font-weight: 650; }
.system-status-items em[data-tone="warn"] { color: #8a6534; }
.system-status-items em[data-tone="bad"] { color: #a04a44; font-weight: 650; }
.system-status-foot small { color: #646864; font-size: 10px; }
.system-status-link { padding: 3px 0; background: transparent; color: #55745b; cursor: pointer; font-size: 10px; font-weight: 750; }
.system-status-drawer { margin: -14px 0 20px; border-radius: 12px; background: rgba(0,0,0,.02); border: 1px dashed rgba(58,65,60,.16); padding: 6px 12px; }
.system-status-toggle { font-size: 12px; color: #646864; cursor: pointer; user-select: none; padding: 4px 0; font-weight: 600; outline: none; }
.system-status-drawer[open] .system-status-toggle { margin-bottom: 10px; }
.nav-group-label { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: #727a74; text-transform: uppercase; padding: 8px 12px 2px; }
.day-event-play-btn { display: inline-flex; align-items: center; gap: 4px; background: rgba(43,84,54,.08); border: 1px solid rgba(43,84,54,.18); border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 600; color: #235431; cursor: pointer; margin-left: auto; transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out); }
.day-event-play-btn:hover { background: rgba(43,84,54,.16); }
.day-event-play-btn:active { transform: scale(0.95); }
.day-event-play-btn.playing { background: #16a34a; color: #fff; border-color: #15803d; }
.play-icon { font-size: 9px; }
.quiet-button, .new-import-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 13px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.quiet-button { background: rgba(255,255,255,.68); color: #69706b; border: 1px solid #dfdfd9; transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out); }
.quiet-button:hover { background: #fff; color: #252b27; }
.new-import-button { background: #27312b; color: #fff; box-shadow: 0 8px 18px rgba(39,49,43,.14); transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), box-shadow var(--motion-press) var(--ease-out); }
.view-panel { display: none; }
.view-panel.active { display: block; }
.view-intro { max-width: 690px; margin: 0 0 20px; }
.view-intro h2 { margin: 0; font: 600 28px/1.2 Georgia, "Songti SC", serif; letter-spacing: -.025em; }
.view-intro p:not(.section-kicker) { margin: 8px 0 0; color: #646864; font-size: 13px; line-height: 1.7; }
.surface { background: var(--panel); border: 1px solid rgba(58, 65, 60, .10); border-radius: var(--radius-panel); padding: 22px; box-shadow: 0 1px 0 rgba(255,255,255,.8), var(--shadow); }
.hero-surface { padding: 26px; border-color: rgba(72, 86, 77, .14); background: linear-gradient(180deg, var(--panel-strong), rgba(252,252,248,.94)); }
.surface + .surface { margin-top: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-title h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.section-title .hint { margin: 6px 0 0; }

.stats-surface { padding: 20px; }
.stats-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stats-presets, .stats-range-fields { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.stats-range-fields label { display: grid; gap: 5px; color: #646864; font-size: 10px; font-weight: 700; }
.stats-range-fields input { min-height: 36px; padding: 0 9px; border: 1px solid #dfe2dd; border-radius: 9px; background: #fff; color: #333a35; }
.stats-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.stats-metrics article { padding: 14px; border: 1px solid #e2e5e1; border-radius: 13px; background: #fafbf9; }
.stats-metrics span { display: block; color: #646864; font-size: 10px; }
.stats-metrics strong { display: block; margin-top: 5px; color: #29322c; font-size: 23px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.stats-grid > section { min-width: 0; padding: 15px; border: 1px solid #e3e6e2; border-radius: 14px; background: #fff; }
.stats-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.stats-section-head span { color: #646864; font-size: 10px; }
.stats-bars { display: grid; gap: 9px; }
.stats-bar-row { display: grid; grid-template-columns: 82px minmax(0,1fr) 36px; align-items: center; gap: 8px; }
.stats-bar-row > span { color: #6f7771; font-size: 10px; }
.stats-bar-row > div { height: 8px; overflow: hidden; border-radius: 999px; background: #eef1ed; }
.stats-bar-row i { display: block; height: 100%; border-radius: 999px; background: #718879; }
.stats-bar-row strong { color: #424a44; font-size: 10px; text-align: right; }
.stats-empty { margin-top: 12px; padding: 11px 12px; border: 1px dashed #dfe4df; border-radius: 11px; background: #f8faf8; color: #646864; font-size: 10px; line-height: 1.55; }
.stats-visual-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.stats-chart-card { min-width: 0; padding: 16px; border: 1px solid #e3e6e2; border-radius: 14px; background: #fff; }
/* 横向滚动停靠：滚动结束时吸附到列首，不会停在半根柱子上。
   用 proximity 而非 mandatory——列宽小、数量不定，强制吸附会打断连续拖拽手感。
   子项用 > * 匹配，图表列由脚本注入，不绑定具体类名。 */
.stats-trend-chart { height: 140px; display: flex; align-items: flex-end; gap: 8px; padding-top: 20px; overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; }
.stats-trend-chart > * { scroll-snap-align: start; }
.trend-bar-col { flex: 1; min-width: 32px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
/* 柱高由脚本内联写入，height 是布局属性：过渡它会让浏览器每帧重新 layout/reflow 整个图表。
   这里只过渡颜色（纯重绘，不触发布局），柱高变化即时生效。 */
.trend-bar { width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: #275638; transition: background-color var(--motion-ui) var(--ease-out); cursor: pointer; }
.trend-bar:hover { background: #1e3f2a; transform: translateY(-1px); }
.trend-bar.empty { min-height: 3px; background: #e5e7eb; }
.trend-bar-val { font-size: 10px; font-weight: 700; color: #4b5563; margin-bottom: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.trend-bar-label { font-size: 10px; color: #646864; margin-top: 6px; white-space: nowrap; }
.stats-hourly-chart { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 120px; align-items: flex-end; padding-top: 16px; margin-bottom: 4px; }
.hourly-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; cursor: pointer; }
/* 同上：24 根柱子同时过渡 height 会造成整屏重排，只保留颜色的重绘过渡。 */
.hourly-bar { width: 100%; min-height: 4px; border-radius: 3px 3px 1px 1px; background: #cbd5e1; transition: background-color var(--motion-ui) var(--ease-out); }
.hourly-col:hover .hourly-bar { background: #3b82f6; }
.hourly-bar.active-high { background: #1e40af; }
.hourly-bar.active-mid { background: #3b82f6; }
.hourly-bar.active-low { background: #93c5fd; }
.hourly-label { font-size: 10px; color: #627693; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stats-ratio-card { margin-top: 14px; padding: 16px; border: 1px solid #e3e6e2; border-radius: 14px; background: #fff; }
.stats-ratio-bar { height: 14px; display: flex; overflow: hidden; border-radius: 999px; background: #eef1ed; margin-top: 8px; }
.ratio-seg { height: 100%; }
.stats-ratio-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.ratio-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #475569; }
.ratio-color-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.patterns-surface { padding: 20px; }
.pattern-sample-hint { margin-top: 14px; padding: 10px 12px; border: 1px dashed #d8c99d; border-radius: 11px; background: #fffaf0; color: #7d6a35; font-size: 10px; line-height: 1.55; }
.pattern-sample-hint.ready { border-style: solid; border-color: #dbe4dc; background: #f3f7f3; color: #5f7164; }
.pattern-observation-list { display: grid; gap: 10px; }
.pattern-card { padding: 15px; border: 1px solid #e3e6e2; border-radius: 14px; background: #fff; }
.pattern-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pattern-card-head span { display: block; color: #646864; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.pattern-card-head strong { display: block; margin-top: 3px; color: #303832; font-size: 14px; }
.pattern-card-head small { color: #646864; font-size: 10px; }
.pattern-card > p { margin: 10px 0 0; color: #657069; font-size: 11px; line-height: 1.65; }
.pattern-evidence { margin-top: 12px; border-top: 1px solid #edf0ec; padding-top: 9px; }
.pattern-evidence summary { color: #67766c; font-size: 10px; font-weight: 700; cursor: pointer; }
.pattern-evidence > div { display: grid; gap: 7px; margin-top: 9px; }
.pattern-evidence article { padding: 9px 10px; border-radius: 10px; background: #f8f9f7; }
.pattern-evidence article > div { display: flex; justify-content: space-between; gap: 10px; color: #646864; font-size: 10px; }
.pattern-evidence article p { margin: 5px 0 0; color: #424b45; font-size: 10px; font-weight: 700; }
.pattern-evidence blockquote { margin: 5px 0 0; color: #646864; font-size: 10px; line-height: 1.55; }
.pattern-evidence-empty { margin-top: 8px; color: #646864; font-size: 10px; }


.search-surface { padding: 20px; }
.global-search-form { display: flex; flex-direction: column; gap: 12px; }
.search-input-wrap { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; min-height: 54px; padding: 5px 6px 5px 10px; border: 1px solid #d9ddd8; border-radius: 16px; background: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.search-input-wrap:focus-within { border-color: #91a497; box-shadow: 0 0 0 4px rgba(83,106,93,.08); }
.search-input-icon { color: #646864; font-size: 20px; text-align: center; }
.search-input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #202521; font-size: 14px; }
.search-input-wrap input::placeholder { color: #646864; }
.search-submit { min-height: 42px; padding: 0 18px; border-radius: 11px; background: #27312b; color: #fff; font-size: 12px; font-weight: 750; }
.search-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.search-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.search-filter { min-height: 36px; padding: 0 11px; border: 1px solid #e0e2dd; border-radius: 999px; background: #f8f8f5; color: #646864; font-size: 10px; font-weight: 750; }
.search-filter.active { border-color: #596f61; background: #e8eee9; color: #486052; }
.search-quick-capsules { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; align-items: center; }
.search-capsule { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid #dbe0db; background: #f8faf8; color: #4c564f; font-size: 11px; font-weight: 650; cursor: pointer; transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out); }
.search-capsule:hover { background: #eef3ee; border-color: #bcc6bd; color: #242c26; }
.search-capsule.active { background: #27312b; border-color: #27312b; color: #fff; box-shadow: 0 2px 6px rgba(39,49,43,0.2); }
.search-audio-play-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 1px 11px; border: 1px solid #c2d4c6; border-radius: 999px; background: #eef5f0; color: #275638; font-size: 10px; font-weight: 700; cursor: pointer; transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out); flex: 0 0 auto; }
.search-audio-play-btn:hover { background: #275638; color: #fff; border-color: #275638; }
.search-audio-play-btn.playing { background: #dc2626; color: #fff; border-color: #dc2626; }
.search-play-icon { font-size: 10px; }

.search-structured-filters { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.search-date-field, .search-category-field, .search-amount-field { display: flex; align-items: center; gap: 8px; color: #646864; font-size: 10px; font-weight: 700; }
.search-date-field input, .search-category-field select, .search-amount-field input { min-height: 32px; border: 1px solid #e0e2dd; border-radius: 9px; padding: 0 8px; background: #fff; color: #515852; font-size: 10px; }
.search-category-field select { min-width: 112px; }
.search-amount-field input { width: 84px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.search-summary { margin: 18px 0 10px; color: #646864; font-size: 10px; }
.search-results { display: flex; flex-direction: column; gap: 9px; }

.search-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 4px 2px;
}
.search-results-toolbar-stats {
  font-size: 11px;
  color: #6a726d;
}
.search-results-toolbar-stats strong {
  color: var(--ink);
  font-weight: 700;
}
.search-results-toolbar-stats .dot-sep {
  margin: 0 6px;
  color: #646864;
}
.search-results-toolbar-actions {
  display: flex;
  gap: 6px;
}
.search-results-action-btn {
  padding: 4px 10px;
  border: 1px solid #dce0d9;
  border-radius: var(--radius-control, 10px);
  background: #fdfdfb;
  color: #4f5751;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out);
}
.search-results-action-btn:hover {
  background: #f2f5f0;
  border-color: #b9c4bb;
  color: var(--ink);
}

.search-day-card {
  display: block;
  border: 1px solid #e0e3dd;
  border-radius: 16px;
  background: #ffffff;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-day-card:hover {
  border-color: #c5ccc4;
}
.search-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8f9f6;
  border-bottom: 1px solid #ebeee8;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}
.search-day-head:hover {
  background: #f2f4ef;
}
.search-day-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search-day-icon {
  font-size: 14px;
  line-height: 1;
}
.search-day-title {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  color: #1e2420;
  letter-spacing: -0.01em;
}
.search-day-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
}
.search-day-badge.count {
  background: #ebeee9;
  color: #4b574e;
}
.search-day-badge.event {
  background: #e6f0e8;
  color: #3b6148;
}
.search-day-badge.utterance {
  background: #edf1f8;
  color: #4e6088;
}
.search-day-badge.expense {
  background: #fef2e6;
  color: #ad5a1c;
  font-weight: 700;
}
.search-day-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #646864;
  font-size: 11px;
}
.search-day-toggle-label {
  font-weight: 600;
}
.search-day-toggle-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
  display: inline-block;
}
.search-day-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.search-day-card.collapsed .search-day-body {
  display: none;
}
.search-day-card.collapsed .search-day-head {
  border-bottom: none;
}
.search-day-card.collapsed .search-day-toggle-icon {
  transform: rotate(-90deg);
}

.search-empty { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed #dde0db; border-radius: 15px; background: #fafaf7; text-align: center; color: #6c746e; }
.search-empty strong { font-size: 13px; }
.search-empty span { max-width: 440px; color: #646864; font-size: 10px; line-height: 1.6; }
.search-result-card { display: block; padding: 14px 15px; border: 1px solid #e3e5e0; border-radius: 14px; background: #fff; color: inherit; text-decoration: none; transition: border-color var(--motion-press) var(--ease-out), box-shadow var(--motion-press) var(--ease-out), transform var(--motion-press) var(--ease-out); }
.search-result-card:hover { border-color: #b9c5bc; box-shadow: 0 9px 24px rgba(45,53,47,.07); }
.search-result-head, .search-result-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.search-result-badges { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.search-result-head time { flex: 0 0 auto; color: #646864; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.search-type, .search-category { padding: 3px 6px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.search-type.utterance { background: #edf0f7; color: #64708d; }
.search-type.event { background: #e8f0ea; color: #55705e; }
.search-category { background: #f6f2e9; color: #8a704f; }
.search-result-text { margin-top: 10px; color: #292e2a; font-size: 13px; line-height: 1.65; font-weight: 650; }
.search-result-text mark, .search-evidence mark { padding: 1px 2px; border-radius: 3px; background: #fff0ae; color: inherit; }
.search-evidence { margin-top: 7px; padding-left: 10px; border-left: 2px solid #dfe5df; color: #646864; font-size: 11px; line-height: 1.6; }
.search-result-foot { margin-top: 11px; padding-top: 9px; border-top: 1px solid #f0f1ed; color: #646864; font-size: 10px; }
.search-result-foot span:nth-child(2) { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-foot strong { flex: 0 0 auto; color: #55705e; font-size: 10px; }

.import-live-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.import-live-head > span:first-child { color: #646864; font-size: 10px; font-weight: 700; }
.drop-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; border: 1px dashed #d8d9d2; border-radius: 18px; background: linear-gradient(135deg, rgba(248,249,246,.96), rgba(238,242,238,.75)); transition: border-color var(--motion-ui) var(--ease-out), background-color var(--motion-ui) var(--ease-out), transform var(--motion-press) var(--ease-out); }
.drop-hero:hover { border-color: #bdc8c0; background: linear-gradient(135deg, #fbfcf9, #eef3ee); }
.drop-hero.drag-active { border-color: #8da192; background: linear-gradient(135deg, #f7fbf7, #e8f1ea); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(48,56,50,.07); }
.drop-copy { display: flex; align-items: center; gap: 13px; min-width: 0; }
.drop-icon { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: #27312b; color: white; font-size: 19px; }
.drop-copy strong { display: block; font-size: 15px; }
.drop-copy span { display: block; margin-top: 4px; color: #646864; font-size: 11px; line-height: 1.55; }
.picker-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.file-picker { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 13px; border-radius: 10px; background: #27312b; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out), box-shadow var(--motion-press) var(--ease-out); }
.file-picker.secondary { background: #fff; color: #59615b; border: 1px solid #dcded8; }
.file-picker input { display: none; }
.import-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.time-field, .pipeline-preview { min-height: 112px; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 15px; border-radius: 25px; background: #f6f6f2; }
.time-field > span, .pipeline-preview > span { color: #646864; font-size: 11px; font-weight: 700; }
.time-field input { width: 100%; max-width: none; min-height: 40px; border: 1px solid #dfe0db; border-radius: 10px; padding: 0 10px; background: #fff; transition: border-color var(--motion-press) var(--ease-out), box-shadow var(--motion-press) var(--ease-out); }
.time-field input:focus-visible { outline: none; border-color: #8da092; box-shadow: 0 0 0 3px rgba(113,136,121,.12); }
.time-field small, .pipeline-preview small { color: #646864; font-size: 10px; line-height: 1.5; }
.pipeline-preview strong { font-size: 13px; }
.selected-files { --nested-padding: 8px; --nested-radius: 10px; border: 1px solid #e1e2dd; border-radius: calc(var(--nested-radius) + var(--nested-padding)); max-height: 210px; overflow: auto; margin: 14px 0; padding: var(--nested-padding); background: #fff; }
.selected-files.empty { min-height: 96px; display: grid; place-items: center; gap: 4px; color: #6c746e; padding: 16px; font-size: 12px; text-align: center; border-style: dashed; background: #fafbf8; }
.selected-files.empty strong { display: block; color: #667068; font-size: 12px; }
.selected-files.empty span { display: block; max-width: 360px; color: #6c746e; font-size: 10px; line-height: 1.55; }
.primary { width: 100%; min-height: 46px; border-radius: 12px; background: #27312b; color: #fff; font-weight: 750; transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), box-shadow var(--motion-press) var(--ease-out); }
.primary:hover:not(:disabled) { background: #202a24; box-shadow: 0 8px 18px rgba(39,49,43,.12); }
.primary:active:not(:disabled) { transform: scale(.995); }
.primary[aria-busy="true"] { cursor: progress; }
.primary:disabled { background: #c9ccc9; cursor: not-allowed; }
.status-copy { min-height: 18px; margin: 9px 0 0; color: #646864; font-size: 11px; transition: color var(--motion-press) var(--ease-out); }
.status-copy.ready::before, .status-copy.warning::before, .status-copy.error::before, .status-copy.checking::before,
.setting-status.ready::before, .setting-status.warning::before, .setting-status.error::before, .setting-status.checking::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: .08em;
}
.status-copy.checking::before, .setting-status.checking::before {
  animation: statusPulse 1.1s var(--ease-out) infinite alternate;
}
@keyframes statusPulse {
  from { transform: scale(.82); opacity: .5; }
  to { transform: scale(1); opacity: 1; }
}
.status-copy.ready, .setting-status.ready { color: #55705e; }
.status-copy.warning, .setting-status.warning { color: #8b6a32; }
.status-copy.error, .setting-status.error { color: #9b625d; }
.status-copy.checking, .setting-status.checking { color: #64758b; }

.settings-surface { padding: 6px 22px; }
.deepseek-settings-panel { display: grid; gap: 10px; padding: 0 0 18px; }
.deepseek-model-line { display: flex; align-items: center; gap: 9px; color: #646864; font-size: 11px; }
.deepseek-model-line strong { color: #3f4c43; }
.deepseek-model-line code { padding: 3px 6px; border-radius: 5px; background: #f1f2ee; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.deepseek-input-row { grid-template-columns: minmax(0,1fr) auto; }
.deepseek-settings-panel > small { color: #646864; font-size: 10px; line-height: 1.55; }
.deepseek-settings-panel .setting-status:empty { display: none; }
.context-extraction-panel { display: grid; gap: 9px; margin: 14px 0; padding: 14px 16px; border: 1px solid #e2e6e0; border-radius: 13px; background: #fbfcfa; }
.context-extraction-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.context-extraction-heading > strong { color: #445248; font-size: 11px; }
.context-extraction-metrics { display: flex; flex-wrap: wrap; gap: 7px; }
.context-extraction-metrics > span { padding: 5px 8px; border-radius: 7px; background: #f0f2ee; color: #69746c; font-size: 10px; }
.context-extraction-panel small { color: #646864; font-size: 10px; line-height: 1.5; }
.context-recovery-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.context-recovery-button { min-height: 34px; padding: 0 12px; font-size: 10px; }
.context-recovery-status { padding: 8px 10px; border-radius: 8px; background: #f1f3ef; color: #66716a; font-size: 10px; }
.context-recovery-status.warning { background: #fff8e9; color: #826b3b; }
.context-recovery-status.error { background: #fff4f2; color: #9b625d; }
.context-recovery-archives { color: #646864; font-size: 10px; }
.context-recovery-archives a { color: #526d5b; text-decoration: underline; text-underline-offset: 2px; }
.settings-tabs { display: inline-flex; gap: 4px; margin: 0 0 18px; padding: 4px; border: 1px solid #dfe2dc; border-radius: 13px; background: rgba(238,240,235,.9); box-shadow: inset 0 1px 0 rgba(255,255,255,.72); }
.settings-tab { min-height: 35px; padding: 0 13px; border-radius: 9px; background: transparent; color: #646864; font-size: 11px; font-weight: 750; transition: background-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out), box-shadow var(--motion-press) var(--ease-out); }
.settings-tab.active { background: #fffefa; color: #344039; box-shadow: 0 1px 5px rgba(31,38,33,.09); }
.settings-page { display: none; }
.settings-page.active { display: block; }
.mobile-brief-surface { display: none; }
.mobile-access-surface { padding: 22px; }
.mobile-access-head { align-items: flex-start; }
.mobile-token-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 13px 14px; border: 1px solid #e2e5e1; border-radius: 13px; background: #fafbf9; }
.mobile-token-card > div { min-width: 0; }
.mobile-token-card span, .mobile-token-card small { display: block; color: #646864; font-size: 10px; }
.mobile-token-card code { display: block; overflow-wrap: anywhere; margin: 5px 0; color: #334139; font-size: 11px; }
.mobile-access-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.mobile-security-note { margin-top: 14px; padding: 12px 13px; border-radius: 12px; background: #fff7ea; color: #745f3e; }
.mobile-security-note strong { display: block; font-size: 10px; }
.mobile-security-note p { margin: 5px 0 0; font-size: 10px; line-height: 1.6; }
.mobile-trusted-bind { display: grid; gap: 6px; margin-top: 12px; padding: 13px 14px; border: 1px solid #e2e5e1; border-radius: 13px; background: #fafbf9; }
.mobile-trusted-bind > span { color: #4d5951; font-size: 11px; font-weight: 750; }
.mobile-trusted-bind input { min-height: 38px; padding: 0 10px; border: 1px solid #dfe2dd; border-radius: 10px; background: #fff; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.mobile-trusted-bind small { color: #646864; font-size: 10px; line-height: 1.55; }
.mobile-brief-actions { display: none; }
.mobile-capture-card { display: none; }
.mobile-capture-card.hidden { display: none !important; }
.mobile-capture-settings { display: grid; gap: 10px; margin-top: 14px; padding: 13px 14px; border: 1px solid #e2e5e1; border-radius: 13px; background: #fafbf9; }
.mobile-capture-settings > div > strong { color: #46534a; font-size: 11px; }
.mobile-capture-settings > div > p { margin: 4px 0 0; color: #646864; font-size: 10px; line-height: 1.55; }
.access-token-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(30,35,31,.46); backdrop-filter: blur(12px); }
.access-token-overlay.hidden { display: none; }
.access-token-card { width: min(420px, 100%); padding: 24px; border: 1px solid rgba(255,255,255,.7); border-radius: 20px; background: #fff; box-shadow: 0 24px 70px rgba(25,31,27,.22); }
.access-token-card h2 { margin: 0; font-size: 21px; }
.access-token-card > p:not(.section-kicker) { color: #646864; font-size: 11px; line-height: 1.65; }
.access-token-card input { width: 100%; min-height: 42px; margin: 10px 0; padding: 0 11px; border: 1px solid #dfe2dd; border-radius: 10px; background: #fff; }
.access-token-card .primary-action { width: 100%; min-height: 40px; }
.file-action { position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.file-action input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 22px 0; border-bottom: 1px solid #ecece7; }
.setting-row:last-child { border-bottom: 0; }
.setting-row h3 { margin: 0; font-size: 15px; }
.setting-row p { max-width: 690px; margin: 7px 0 0; color: #646864; font-size: 12px; line-height: 1.65; }
.setting-title-line { display: flex; align-items: center; gap: 9px; }
.setting-badge { padding: 4px 8px; border: 1px solid rgba(82,92,85,.08); border-radius: 999px; background: #f0f0ec; color: #646864; font-size: 10px; font-weight: 750; letter-spacing: .01em; transition: background-color var(--motion-ui) var(--ease-out), border-color var(--motion-ui) var(--ease-out), color var(--motion-ui) var(--ease-out), opacity var(--motion-ui) var(--ease-out); }
.setting-badge.ready { border-color: #d7e5da; background: #e8f2eb; color: #4b775a; }
.setting-badge.warning { border-color: #efd9c0; background: #fff1e3; color: #96623c; }
.setting-badge.error { border-color: #ecd3d0; background: #fff4f2; color: #9b625d; }
.switch { flex: 0 0 auto; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 44px; height: 26px; display: block; padding: 3px; border-radius: 999px; background: #d6d9d5; transition: background-color var(--motion-ui) var(--ease-out), box-shadow var(--motion-ui) var(--ease-out); }
.switch-track span { width: 20px; height: 20px; display: block; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.14); transition: transform var(--motion-ui) var(--ease-out); }
.switch input:checked + .switch-track { background: #5b7565; }
.switch input:checked + .switch-track span { transform: translateX(18px); }
.jev-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 0 22px; }
.setting-field, .config-note { min-height: 106px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 15px; border-radius: 14px; background: #f6f6f2; }
.setting-field > span, .config-note strong { font-size: 11px; color: #6f766f; }
.setting-field small, .config-note span { color: #646864; font-size: 10px; line-height: 1.55; }
.range-row { display: grid; grid-template-columns: 1fr 46px; gap: 10px; align-items: center; }
.range-row input { accent-color: #5b7565; }
.range-row output { text-align: right; font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.jev-setup-panel { min-height: 132px; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 16px; border: 1px solid #e5e6e1; border-radius: 14px; background: #fff; }
.jev-setup-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jev-setup-copy strong { font-size: 12px; }
.setup-state { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 750; }
.setup-state.ready { background: #e8f2eb; color: #4b775a; }
.setup-state.warning { background: #fff1e3; color: #96623c; }
.secret-input-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 7px; }
.secret-input-row input { min-width: 0; height: 40px; padding: 0 11px; border: 1px solid #dfe1dc; border-radius: 9px; background: #fafaf8; color: #242925; }
.secret-input-row input:focus-visible { border-color: #9cad9f; outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: var(--focus-ring-offset); }
.setting-action { min-height: 40px; padding: 0 12px; border: 1px solid #dfe1dc; border-radius: 9px; background: #fff; color: #626a64; font-size: 11px; font-weight: 750; transition: transform var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out); }
.setting-action:hover:not(:disabled) { border-color: #aebcb1; color: #334038; }
.setting-action.primary-action { border-color: #35443b; background: #35443b; color: #fff; }
.setting-action.install-action { align-self: flex-start; }
.setting-action:disabled { opacity: .5; cursor: default; }
.auto-ingest-surface { margin-top: 16px; }
.auto-ingest-head { align-items: flex-start; }
.auto-ingest-head .hint { max-width: 760px; }
.passport-stream-surface { border-color: #d7e2d9; background: linear-gradient(180deg, rgba(252,254,251,.98), rgba(247,250,247,.94)); box-shadow: 0 1px 0 rgba(255,255,255,.85), 0 18px 48px rgba(49,68,55,.07); }
/* :has() 依赖的观感增强：不支持的内核直接忽略，边框回到 .passport-stream-surface 的默认色，不影响可用性 */
@supports selector(:has(*)) {
  .passport-stream-surface:has(#passport-stream-badge.ready) { border-color: #bfd4c4; }
  .passport-stream-surface:has(#passport-stream-badge.warning) { border-color: #e8cda9; background: linear-gradient(180deg, #fffdf9, #fbf7f0); }
}
.passport-receiver-health { flex: 0 0 auto; display: grid; gap: 6px; min-width: 150px; }
.receiver-health-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 4px 8px; border: 1px solid #e2e5e1; border-radius: 999px; background: #f4f5f2; color: #646864; font-size: 10px; font-weight: 750; white-space: nowrap; }
.receiver-health-chip.checking { border-style: dashed; color: #646864; }
.receiver-health-chip.ready { border-color: #d7e5da; background: #e8f2eb; color: #4b775a; }
.receiver-health-chip.warning { border-color: #efd9c0; background: #fff1e3; color: #96623c; }
.receiver-health-chip.off { color: #646864; }
.auto-ingest-config { display: grid; gap: 12px; }
.auto-ingest-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border: 1px solid #e2e5e0; border-radius: 13px; background: #f8f9f6; }
.auto-ingest-toggle strong, .auto-ingest-folders > span, .auto-ingest-options label > span { display: block; color: #59635c; font-size: 11px; }
.auto-ingest-toggle small, .auto-ingest-folders small { display: block; margin-top: 4px; color: #646864; font-size: 10px; line-height: 1.5; }
.auto-ingest-folder-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.auto-ingest-folder-head .setting-action { min-height: 32px; }
.auto-ingest-folders textarea { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid #dfe2dd; border-radius: 11px; background: #fff; color: #303732; resize: vertical; font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.auto-ingest-folders textarea:focus, .auto-ingest-options input:focus { outline: 2px solid rgba(83,106,93,.12); border-color: #9cad9f; }
.auto-ingest-folders textarea:focus-visible, .auto-ingest-options input:focus-visible { border-color: #9cad9f; outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: var(--focus-ring-offset); }
.auto-ingest-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auto-ingest-options label { padding: 12px; border-radius: 12px; background: #f6f7f4; }
.auto-ingest-options label > div { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.auto-ingest-options input { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #dfe2dd; border-radius: 9px; background: #fff; }
.auto-ingest-options small { color: #646864; font-size: 10px; }
.auto-ingest-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 14px; }
.auto-ingest-summary > div { padding: 11px; border: 1px solid #e5e8e3; border-radius: 11px; background: #fff; min-width: 0; }
.auto-ingest-summary span { display: block; color: #646864; font-size: 10px; }
.auto-ingest-summary strong { display: block; margin-top: 5px; overflow: hidden; color: #39413b; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.auto-ingest-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.auto-ingest-actions .status-copy { flex: 1 1 260px; margin: 0; }
.auto-ingest-history-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eceee9; }
.auto-ingest-history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auto-ingest-history-head strong { font-size: 11px; }
.auto-ingest-history-head span { color: #646864; font-size: 10px; }
.auto-ingest-history { --nested-padding: 8px; --nested-radius: 10px; display: grid; gap: 7px; margin-top: 9px; padding: var(--nested-padding); border-radius: calc(var(--nested-radius) + var(--nested-padding)); background: #f1f4ef; }
.auto-ingest-history-row { display: grid; grid-template-columns: 118px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: var(--nested-radius); background: #f7f8f5; color: #68706a; font-size: 10px; }
.auto-ingest-history-row time { color: #646864; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.auto-ingest-history-row strong { overflow: hidden; color: #4c564f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.auto-ingest-history-row em { color: #646864; font-style: normal; font-weight: 750; }
.auto-ingest-history-row.session-complete em { color: #4f765a; }
.auto-ingest-history-row.session-receiving em { color: #526f88; }
.auto-ingest-history-row.session-event em { color: #766b4f; }
.auto-ingest-history-row.error { background: #fff4ef; color: #9a6550; }
.auto-ingest-history-row.error strong { color: #7c4f3e; }
.watch-reception-session { grid-template-columns: 118px minmax(0,1fr) auto; }
.watch-device-statuses { display: grid; gap: 6px; margin-top: 10px; }
.watch-device-status { display: grid; gap: 3px; padding: 9px 11px; border: 1px solid #dfe5dc; border-radius: 9px; background: #f7f8f5; font-size: 10px; }
.watch-device-status strong { color: #46524a; font-size: 11px; }
.watch-device-status span { color: #646864; overflow-wrap: anywhere; }
.watch-device-status.fresh { border-color: #cfe2d0; background: #f2f8f1; }
.watch-device-status.fresh strong { color: #35653d; }
.watch-device-status.stale, .watch-device-status.unknown { border-color: #eadfc5; background: #fffaf0; }
.watch-device-status.stale strong, .watch-device-status.unknown strong { color: #80662e; }
.watch-history-toggle { grid-column: 1 / -1; justify-self: start; padding: 6px 9px; border: 1px solid #d8e1d8; border-radius: 8px; background: #fff; color: #526b57; cursor: pointer; font: inherit; font-size: 10px; font-weight: 700; }
.watch-reception-session > small, .watch-formal-job { grid-column: 1 / -1; }
.watch-formal-job { display: grid; gap: 6px; width: 100%; padding: 9px 10px; border: 1px solid #dfe7df; border-radius: 10px; background: #f4f7f3; }
.watch-formal-job > strong { color: #476d50; font-size: 10px; }
.watch-formal-job > span { color: #68766b; font-size: 10px; }
.watch-job-open { justify-self: start; padding: 5px 8px; border: 1px solid #cbd9cc; border-radius: 7px; background: #fff; color: #41664a; cursor: pointer; font: inherit; font-size: 10px; font-weight: 700; }
.watch-formal-transcripts { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.watch-formal-transcripts li { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 8px; padding-top: 5px; border-top: 1px solid #e4eae2; color: #424b44; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.watch-formal-transcripts time { color: #646864; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.jev-setup-panel small { color: #646864; font-size: 10px; line-height: 1.55; word-break: break-word; }
.jev-setup-panel code { padding: 2px 5px; border-radius: 5px; background: #f1f2ee; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.setting-status { min-height: 20px; margin: -7px 0 7px; color: #69716b; font-size: 10px; line-height: 1.55; transition: color var(--motion-press) var(--ease-out); }

.model-settings-surface { margin-bottom: 16px; }
.model-settings-head { align-items: flex-start; }
.recommended-model-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid #dbe4dc; border-radius: 15px; background: linear-gradient(135deg, #eef4ef, #fafbf8); }
.recommended-model-banner strong { display: inline-block; margin-left: 7px; font-size: 14px; }
.recommended-model-banner p { margin: 6px 0 0; color: #646864; font-size: 11px; line-height: 1.55; }
.recommend-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 999px; background: #dceadf; color: #4f7058; font-size: 10px; font-weight: 800; }
.model-stage { margin-top: 20px; }
.model-stage-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 9px; }
.model-stage-heading > div { display: flex; align-items: center; gap: 8px; }
.model-stage-heading > div span { color: #646864; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.model-stage-heading strong { font-size: 12px; }
.model-stage-heading small { color: #646864; font-size: 10px; }
.model-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.model-option { min-height: 126px; padding: 13px; border: 1px solid #e1e4df; border-radius: 13px; background: #fff; color: inherit; text-align: left; }
.model-option:hover:not(:disabled) { border-color: #aebdb1; }
.model-option.selected { border-color: #718a79; box-shadow: inset 0 0 0 1px #718a79; background: #fbfdfb; }
.model-option.disabled { cursor: default; opacity: .68; }
.model-option-head, .model-option-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.model-option-head strong { font-size: 12px; }
.model-option-head span { padding: 3px 6px; border-radius: 999px; background: #eef2ed; color: #637268; font-size: 10px; font-weight: 800; }
.model-option p { margin: 9px 0 12px; color: #646864; font-size: 10px; line-height: 1.6; }
.model-option-foot { margin-top: auto; color: #646864; font-size: 10px; }
.model-option-foot em { color: #55705e; font-style: normal; font-weight: 800; }
.event-model-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; border-radius: 12px; background: #f7f8f5; color: #646864; font-size: 10px; }
.event-model-summary strong { color: #4f5f54; }
.model-settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #eceee9; }
.model-settings-footer > span { color: #646864; font-size: 10px; }

.agent-connect-surface { display: grid; gap: 18px; }
.agent-connect-head { align-items: flex-start; margin-bottom: 0; }
.agent-connect-head .hint { max-width: 720px; }
.agent-endpoint-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid #dfe3dd; border-radius: 14px; background: #f7f9f6; }
.agent-endpoint-card > div:first-child { min-width: 0; }
.agent-endpoint-card span { display: block; margin-bottom: 5px; color: #646864; font-size: 10px; font-weight: 750; }
.agent-endpoint-card code { color: #34463a; font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.agent-endpoint-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.agent-prompt-block { padding: 16px; border: 1px solid #e2e4df; border-radius: 16px; background: #fff; }
.agent-prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.agent-prompt-head strong { display: block; font-size: 13px; }
.agent-prompt-head span { display: block; margin-top: 4px; color: #646864; font-size: 10px; }
.agent-connect-prompt { width: 100%; min-height: 290px; resize: vertical; padding: 14px; border: 1px solid #e0e2dd; border-radius: 12px; background: #f7f8f5; color: #4c554f; font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.agent-connect-prompt:focus-visible { border-color: #a2b0a6; outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: var(--focus-ring-offset); }
.doctor-surface { display: grid; gap: 16px; }
.doctor-head { align-items: flex-start; margin-bottom: 0; }
.doctor-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.doctor-actions .setting-status { margin: 0; }
.doctor-checks { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.doctor-check { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 9px; padding: 12px; border: 1px solid #e2e5df; border-radius: 12px; background: #fafbf8; }
.doctor-check.warning { border-color: #eed8c2; background: #fff8f0; }
.doctor-mark { font-size: 16px; }
.doctor-check strong { display: block; font-size: 11px; }
.doctor-check p, .doctor-check small { display: block; margin: 4px 0 0; color: #646864; font-size: 10px; line-height: 1.5; word-break: break-word; }
.doctor-check small { color: #946548; }
.doctor-jobs-block { padding-top: 14px; border-top: 1px solid #eceee9; }
.doctor-jobs-block > strong { font-size: 11px; }
.doctor-jobs { display: grid; gap: 6px; margin-top: 9px; color: #646864; font-size: 10px; }
.doctor-job-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; background: #f7f8f5; }
.doctor-job-row code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doctor-job-row small { color: #646864; }
.agent-prompt-block .setting-status { margin: 9px 1px 0; }
.agent-capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.agent-capability-grid article { padding: 14px; border-radius: 13px; background: #f6f7f3; }
.agent-capability-grid article > span { color: #646864; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.agent-capability-grid strong { display: block; margin-top: 8px; font-size: 11px; }
.agent-capability-grid p { margin: 6px 0 0; color: #646864; font-size: 10px; line-height: 1.6; }
.agent-api-note { padding: 14px 16px; border-radius: 13px; background: #f1f3ef; }
.agent-api-note strong { font-size: 10px; }
.agent-api-note p { margin: 6px 0 0; color: #646864; font-size: 10px; line-height: 1.65; }
.agent-api-note code { color: #52635a; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }

body.inline-viewer-open { overflow: hidden; }
.inline-viewer-workspace { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; background: #f2f1ec; }
.inline-viewer-workspace.hidden { display: none; }
.inline-viewer-bar { flex: 0 0 58px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 8px 16px; border-bottom: 1px solid rgba(58,66,60,.12); background: rgba(250,250,247,.96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.inline-viewer-bar > div { min-width: 0; text-align: center; }
.inline-viewer-bar span { display: block; color: #646864; font-size: 10px; font-weight: 750; letter-spacing: .05em; }
.inline-viewer-bar strong { display: block; margin-top: 2px; overflow: hidden; color: #39413b; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.inline-viewer-back, .inline-viewer-external { min-height: 34px; padding: 0 11px; border: 1px solid #d9ddd8; border-radius: 9px; background: #fff; color: #53675a; font: 11px inherit; font-weight: 700; cursor: pointer; }
.inline-viewer-back:hover, .inline-viewer-external:hover { border-color: #9faf9f; background: #f6f8f5; }
.inline-viewer-frame { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: #f2f1ec; }

.diagnostic-error-panel { position: fixed; right: 18px; bottom: 18px; z-index: 140; width: min(520px, calc(100vw - 36px)); padding: 15px; border: 1px solid #e6c8ba; border-radius: 16px; background: rgba(255,250,247,.98); box-shadow: 0 20px 60px rgba(47,35,30,.18); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.diagnostic-error-panel.hidden { display: none; }
.diagnostic-error-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.diagnostic-error-head > div { min-width: 0; }
.diagnostic-error-head span { display: block; color: #9d6850; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.diagnostic-error-head strong { display: block; margin-top: 5px; color: #4a342b; font-size: 14px; }
.diagnostic-error-head p { margin: 6px 0 0; color: #775d51; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.diagnostic-close { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px; background: #f4e7e0; color: #89614f; font-size: 18px; }
.diagnostic-error-actions { display: flex; gap: 7px; margin-top: 12px; }
.diagnostic-error-detail { margin-top: 10px; border-top: 1px solid #eedbd2; padding-top: 9px; }
.diagnostic-error-detail summary { color: #8a6859; font-size: 10px; font-weight: 750; cursor: pointer; }
.diagnostic-error-detail pre { max-height: 260px; overflow: auto; margin: 8px 0 0; padding: 10px; border-radius: 10px; background: #342b27; color: #f5eee9; white-space: pre-wrap; overflow-wrap: anywhere; font: 9px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 680px) {
  .diagnostic-error-panel { right: 10px; bottom: 10px; width: calc(100vw - 20px); }
}
.onboarding-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; background: rgba(31,36,32,.38); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.onboarding-overlay.hidden { display: none; }

/* 顶层浮层背板（::backdrop）：只对进入 top layer 的元素生效（showModal() 打开的 <dialog>、[popover]）。
   本页 index.html 现有的两个模态 #access-token-overlay / #onboarding-overlay 是普通 <div>，
   ::backdrop 对它们不适用，它们仍走各自的 .*-overlay 遮罩；这条规则保证今后改用原生 <dialog> 时，
   遮罩与现有浮层同色同模糊，而不是浏览器默认的纯黑半透明。
   取值复用 .access-token-overlay 的既有遮罩 rgba(30,35,31,.46) 与 blur(12px)，不新造色值；
   只画背板，不改任何元素的尺寸、间距与动效。 */
dialog::backdrop {
  background: rgba(30, 35, 31, .46);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.onboarding-card { width: min(620px, 100%); padding: 22px; border: 1px solid rgba(255,255,255,.55); border-radius: 24px; background: #fffefb; box-shadow: 0 30px 90px rgba(25,31,27,.24); }
.onboarding-top { display: flex; justify-content: space-between; align-items: center; color: #646864; font-size: 10px; font-weight: 750; }
.onboarding-top button { width: 30px; height: 30px; border-radius: 9px; background: #f2f3ef; color: #646864; font-size: 18px; }
.onboarding-copy { margin-top: 18px; }
.onboarding-copy h2 { margin: 0; font: 600 28px/1.15 Georgia, "Songti SC", serif; letter-spacing: -.03em; }
.onboarding-copy > p:not(.section-kicker) { margin: 8px 0 0; color: #646864; font-size: 12px; line-height: 1.65; }
.onboarding-plan { margin-top: 18px; padding: 17px; border: 1px solid #d9e2da; border-radius: 16px; background: #f4f8f4; }
.onboarding-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.onboarding-plan-head > div { display: flex; align-items: center; gap: 8px; }
.onboarding-plan-head strong { font-size: 13px; }
.onboarding-plan-head > span { color: #646864; font-size: 10px; }
.onboarding-flow { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.onboarding-flow span { padding: 6px 8px; border-radius: 9px; background: #fff; color: #536158; font-size: 10px; font-weight: 750; }
.onboarding-flow i { color: #646864; font-style: normal; }
.onboarding-plan ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 14px 0 0; padding: 0; list-style: none; }
.onboarding-plan li { padding: 8px; border-radius: 9px; background: rgba(255,255,255,.72); color: #646864; font-size: 10px; text-align: center; }
.onboarding-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.review-empty { min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #6f756f; }
.review-empty-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 50%; background: #e9f1eb; color: #51705b; font-size: 20px; }
.review-dashboard[aria-busy="true"] .review-empty-icon { animation: reviewPulse 1.1s var(--ease-out) infinite alternate; }
.review-empty span { max-width: 420px; margin-top: 6px; color: #646864; font-size: 11px; line-height: 1.6; }
.review-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid #ecece7; }
.review-summary > div { display: grid; grid-template-columns: auto auto; align-items: end; gap: 0 8px; }
.review-summary span { grid-column: 1 / -1; color: #646864; font-size: 10px; }
.review-summary strong { font: 600 34px/1 Georgia, serif; }
.review-summary small { color: #646864; font-size: 10px; padding-bottom: 3px; }
.review-summary p { max-width: 420px; margin: 0; color: #646864; font-size: 11px; line-height: 1.6; }
.review-day-list { --nested-padding: 8px; --nested-radius: 14px; display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding: var(--nested-padding); border-radius: calc(var(--nested-radius) + var(--nested-padding)); background: #f5f7f3; }
.review-day-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 15px; border: 1px solid #e5e6e1; border-radius: var(--nested-radius); color: inherit; text-decoration: none; background: #fff; transition: border-color var(--motion-press) var(--ease-out), box-shadow var(--motion-press) var(--ease-out), transform var(--motion-press) var(--ease-out); }
.review-day-card:hover { border-color: #bec8c0; box-shadow: 0 8px 22px rgba(48,56,50,.06); transform: translateY(-1px); }
.review-day-card:active { transform: translateY(0) scale(.995); }
.review-day-card:focus-visible { border-color: #8ea193; outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: var(--focus-ring-offset); }
.review-transcript-drafts { display: grid; gap: 12px; margin-top: 18px; padding: 16px; border: 1px solid #dfe7e0; border-radius: 16px; background: #f7faf7; }
.review-draft-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 12px; border-bottom: 1px solid #e3eae4; }
.review-draft-heading > div > span { color: #646864; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.review-draft-heading h3 { margin-top: 4px; color: #354139; font-size: 14px; }
.review-draft-heading p { max-width: 440px; margin: 0; color: #646864; font-size: 10px; line-height: 1.55; }
.review-draft-session-list { display: grid; gap: 10px; }
.review-draft-session { overflow: hidden; border: 1px solid #e2e8e2; border-radius: 12px; background: #fff; }
.review-draft-session-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 13px; background: #f4f7f4; }
.review-draft-session-head strong { color: #404b42; font-size: 11px; }
.review-draft-session-head span { color: #646864; font-size: 10px; text-align: right; }
.review-draft-session ol { display: grid; gap: 0; margin: 0; padding: 0 13px; list-style: none; }
.review-draft-session li { padding: 10px 0; border-top: 1px solid #eef1ed; }
.review-draft-row-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: #646864; font-size: 10px; }
.review-draft-row-meta small { color: #646864; }
.review-draft-session li p { margin: 4px 0 0; color: #303832; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-dashboard[aria-busy="true"] { min-height: 180px; opacity: .72; pointer-events: none; }
@keyframes reviewPulse { from { transform: scale(.96); opacity: .58; } to { transform: scale(1); opacity: 1; } }
.review-day-card span { display: block; color: #646864; font-size: 10px; }
.review-day-card strong { display: block; margin-top: 3px; font-size: 13px; }
.review-open { color: #55705e !important; font-weight: 700; }
.review-open::after { content: "›"; display: inline-block; margin-left: 4px; transition: transform var(--motion-press) var(--ease-out); }
.review-day-card:is(:hover, :focus-visible) .review-open::after { transform: translateX(2px); }
.shell { width: min(900px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 80px; }
header { margin-bottom: 28px; }
.eyebrow { color: #68796f; font-size: 12px; letter-spacing: .18em; margin: 0 0 10px; }
h1 { font-size: clamp(36px, 7vw, 58px); line-height: 1; margin: 0 0 14px; letter-spacing: -.05em; }
h2 { font-size: 18px; margin: 0; }
h3, h4 { margin: 0; }
.intro, .hint { color: #68707b; line-height: 1.6; }
.card { background: rgba(255,255,255,.86); border: 1px solid #e0e3e8; border-radius: 18px; padding: 22px; margin: 16px 0; box-shadow: 0 12px 36px rgba(36, 44, 62, .05); }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.file-picker:hover { box-shadow: 0 7px 16px rgba(39,49,43,.10); }
.file-picker:active { transform: scale(.985); }
.file-picker:focus-within { box-shadow: 0 0 0 3px rgba(113,136,121,.14); }
/* 同上：:has() 从共享选择器列表里拆出来单独包 @supports，
   否则不支持 :has() 的内核会连 .file-picker:focus-visible 一起丢掉，键盘焦点环消失。 */
.file-picker:focus-visible { box-shadow: none; outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: var(--focus-ring-offset); }
@supports selector(:has(*)) {
  .file-picker:has(input:focus-visible), label.file-picker:has(input:focus-visible) { box-shadow: none; outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: var(--focus-ring-offset); }
}
@supports not selector(:has(*)) {
  .file-picker:focus-within { box-shadow: none; outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: var(--focus-ring-offset); }
}
.time-field { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; font-weight: 600; }
input[type="datetime-local"] { border: 1px solid #d9dce3; border-radius: 10px; padding: 11px 12px; font: inherit; max-width: 260px; }
.hint { font-size: 13px; margin: 10px 0; }
.file-row, .job-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; border-radius: 10px; border-bottom: 0; }
.selected-files .file-row + .file-row { margin-top: 4px; }
.selected-files .file-row { border-radius: var(--nested-radius); background: #f8f9f6; transition: background-color var(--motion-press) var(--ease-out); }
.selected-files .file-row:hover { background: #f2f5f1; }
.file-row:last-child, .job-list-item:last-child .job-row { border-bottom: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta, .muted { color: #6e7580; font-size: 12px; }
.current-title-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.current-live-status, .journal-freshness { min-height: 28px; display: inline-flex; align-items: center; padding: 0 9px; border: 1px solid #e1e4df; border-radius: 999px; background: #f6f7f4; color: #646864; font-size: 10px; font-weight: 750; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; white-space: nowrap; }
.current-live-status.ready, .journal-freshness.ready { border-color: #d8e4da; background: #f1f6f2; color: #5e7564; }
.current-live-status.warning, .journal-freshness.stale, .journal-freshness.warning { border-color: #e8d7b8; background: #fff8eb; color: #8b6a32; }
.current-live-status.error, .journal-freshness.error { border-color: #ecd3d0; background: #fff4f2; color: #9b625d; }
.current-live-status.off { border-color: #e3e4e0; background: #f7f7f4; color: #646864; }
button { font: inherit; border: 0; cursor: pointer; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.link-button { background: transparent; color: #55705e; padding: 4px 0; }
.journal-title { align-items: flex-start; }
.journal-title .hint { margin: 5px 0 0; }
.journal-title-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.journal-skeleton { display: grid; gap: 10px; padding: 8px 0 14px; }
.journal-skeleton span { display: block; height: 44px; border-radius: 12px; background: linear-gradient(90deg, #f1f2ef 20%, #f8f9f6 45%, #f1f2ef 70%); background-size: 220% 100%; animation: journal-skeleton-pulse 1.4s ease-in-out infinite; }
.journal-skeleton span:nth-child(2) { width: 78%; }
.journal-skeleton span:nth-child(3) { width: 58%; }
@keyframes journal-skeleton-pulse { from { background-position: 100% 0; } to { background-position: -120% 0; } }
.journal-nav { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.quick-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick-day { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid #e2e5eb; border-radius: 11px; background: #fffefa; color: #303640; font-weight: 700; transition: border-color var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out); }
.quick-day:hover { border-color: #aeb5e7; background: #fafaff; }
.quick-day.active { border-color: #83958a; background: #f0f4f0; color: #33423a; }
.quick-day small { color: #6e7582; font-size: 11px; font-weight: 500; }
/* [2026-10-14] 统一日期轴：替代原「快捷日期大卡 + 最近记录 chips」两段式。
   一条横向滚动条，新→旧连续排列；今天/昨天只加角标。 */
.days-strip { display: flex; gap: 7px; align-items: stretch; overflow-x: auto; padding-bottom: 3px; }
.day-chip-badge { padding: 1px 5px; border-radius: 999px; background: #e6ece6; color: #426d4a; font-size: 10px; font-style: normal; font-weight: 750; letter-spacing: .02em; }
.day-chip.active .day-chip-badge { background: rgba(255,255,255,.22); color: #fff; }
.day-chip-today { background: #eef2ee; }
.recent-days { display: flex; gap: 7px; align-items: stretch; overflow-x: auto; padding-bottom: 3px; }
.recent-days > span { flex: 0 0 auto; display: flex; align-items: center; color: #6e7582; font-size: 11px; padding-right: 2px; }
.day-chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; background: #f4f5f2; color: #575f6a; font-weight: 700; transition: background-color var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out); }
.day-chip small { color: #6e7582; font-size: 10px; font-weight: 500; }
.day-chip.active { background: #1d1d1f !important; color: #fff !important; }
.day-chip.active small { color: rgba(255, 255, 255, 0.75) !important; }
.day-chip.active .day-chip-badge { background: rgba(255, 255, 255, 0.22) !important; color: #fff !important; }
.journal-day-header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; border-top: 1px solid #eceef2; padding-top: 14px; margin-bottom: 8px; }
.journal-kicker { color: #6d7682; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.journal-day-header h3 { margin-top: 3px; font-size: 19px; }
.journal-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.journal-action { display: inline-flex; min-height: 30px; align-items: center; padding: 0 9px; border: 1px solid #dfe2e8; border-radius: 8px; color: #5864c4; font-size: 11.5px; font-weight: 700; text-decoration: none; transition: transform var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out); }
.journal-action.primary-action { background: #324039; border-color: #324039; color: #fff; }
.journal-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; margin: 10px 0 12px; }
.journal-metrics > div { min-width: 0; padding: 9px 11px; border: 1px solid #e7e9e4; border-radius: 11px; background: rgba(255,255,253,.9); box-shadow: inset 0 1px 0 rgba(255,255,255,.72); }
.journal-metrics span { display: block; color: #6e7580; font-size: 10px; }
.journal-metrics strong { display: block; margin-top: 2px; font-size: 18px; letter-spacing: -.03em; }
.journal-metrics small { display: block; margin-top: 2px; color: #926f3d; font-size: 10px; }
.journal-metrics .needs-review { background: #fff7e9; }
.journal-metrics .needs-review strong { color: #9b681d; }
.journal-category-strip { display: flex; align-items: center; gap: 10px; min-height: 36px; margin: 0 0 12px; padding: 6px 10px; border: 1px solid #e8e9e5; border-radius: 11px; background: #fafaf7; }
.journal-category-strip > span { flex: 0 0 auto; color: #646864; font-size: 10px; font-weight: 750; }
.journal-body { display: grid; grid-template-columns: .8fr 1.2fr; gap: 12px; }
.journal-body-summary { grid-template-columns: 1fr 1fr; }
.journal-section { border: 1px solid #e5e7eb; border-radius: 11px; padding: 11px; min-width: 0; }
.journal-section h4 { font-size: 12.5px; margin-bottom: 8px; }
.journal-review-note p { color: #6e7580; font-size: 11.5px; line-height: 1.6; margin: 0; }
.category-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.category-chip { padding: 4px 8px; border-radius: 999px; background: #eaf0eb; color: #55705e; font-size: 10.5px; font-weight: 700; }
.daily-workspace { margin-top: 12px; padding: 14px 16px; border: 1px solid #dce2dc; border-radius: 16px; background: #f8faf7; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.daily-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.daily-workspace-head h4 { margin-top: 3px; font-size: 19px; letter-spacing: -.025em; }
.daily-workspace-head p { max-width: 630px; margin: 4px 0 0; color: #646864; font-size: 10px; line-height: 1.55; }
.workspace-trust-note { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: #e9f1eb; color: #55705e; font-size: 10px; font-weight: 750; }
.workspace-snapshot { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; margin: 10px 0 12px; }
.workspace-snapshot article { min-height: 74px; padding: 8px 10px; border: 1px solid #e2e6e1; border-radius: 11px; background: rgba(255,255,253,.92); }
.workspace-snapshot article.attention { border-color: #ead8b8; background: #fffaf0; }
.workspace-snapshot span, .workspace-snapshot small { display: block; color: #646864; font-size: 8.5px; }
.workspace-snapshot strong { display: block; margin: 6px 0 3px; color: #303630; font: 650 18px/1.05 Georgia, "Songti SC", serif; letter-spacing: -.02em; }
.workspace-snapshot article.attention strong { color: #9b681d; }
.workspace-board { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.workspace-lane { min-width: 0; min-height: 140px; padding: 10px; border: 1px solid #e1e4df; border-radius: 12px; background: rgba(255,255,255,.88); }
.workspace-lane.todo-lane { border-top: 3px solid #8ba08f; }
.workspace-lane.work-lane { border-top: 3px solid #8790b5; }
.workspace-lane.idea-lane { border-top: 3px solid #b7a275; }
.workspace-lane-head, .life-ledger-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.workspace-lane-head span, .life-ledger-head span, .daily-reflection-head span { display: block; color: #646864; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.workspace-lane-head h5, .life-ledger-head h5, .daily-reflection-head h5 { margin: 2px 0 0; font-size: 11.5px; }
.workspace-lane-head > strong, .life-ledger-head > strong { color: #646864; font-size: 10.5px; }
.workspace-lane-body, .life-ledger-list { display: grid; gap: 5px; }
.workspace-event-card { min-width: 0; padding: 8px 9px; border: 1px solid #e8ebe6; border-radius: 10px; background: #fffefa; box-shadow: 0 1px 0 rgba(255,255,255,.8); }
.workspace-event-meta { display: flex; align-items: center; gap: 5px; min-width: 0; }
.workspace-event-meta time { flex: 0 0 auto; color: #646864; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.workspace-event-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 5px; border-radius: 999px; background: #eef2ed; color: #627068; font-size: 10px; font-weight: 750; }
.workspace-event-meta strong { margin-left: auto; color: #6d604e; font-size: 10px; }
.workspace-event-card p { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 5px 0 0; color: #3d433e; font-size: 10px; font-weight: 650; line-height: 1.5; }
.task-card { transition: border-color var(--motion-press) var(--ease-out), opacity var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out); }
.task-card.task-completed { opacity: .66; background: #f5f6f3; }
.task-card.task-completed p { text-decoration: line-through; text-decoration-color: #aeb5af; }
.task-state-label { margin-left: auto; color: #647168 !important; font-size: 10px !important; }
.task-state-actions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px; margin-top: 6px; }
.task-state-actions button { min-height: 24px; padding: 0 5px; border: 1px solid #e1e4df; border-radius: 6px; background: #fff; color: #646864; font-size: 10px; font-weight: 750; }
.task-state-actions button:hover { border-color: #aebbb1; color: #526158; }
.task-state-actions button.active { border-color: #728778; background: #e9f0ea; color: #4e6d58; }
.workspace-lane-empty { min-height: 56px; display: flex; align-items: center; justify-content: center; padding: 8px 10px; border: 1px dashed #e0e3de; border-radius: 9px; color: #646864; font-size: 10px; line-height: 1.5; text-align: center; }
.life-ledger { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.life-ledger > section { min-width: 0; padding: 10px; border: 1px solid #e3e5e1; border-radius: 12px; background: rgba(250,250,247,.9); }
.daily-reflection { margin-top: 8px; padding: 11px 13px; border: 1px solid #dde5de; border-radius: 12px; background: #eef4ef; }
.daily-reflection-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.daily-reflection-head small { color: #646864; font-size: 10px; }
.daily-reflection ul { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
.daily-reflection li { position: relative; padding-left: 12px; color: #627068; font-size: 9.5px; line-height: 1.55; }
.daily-reflection li::before { content: ""; position: absolute; left: 0; top: .65em; width: 4px; height: 4px; border-radius: 50%; background: #738878; }
.day-timeline-section { margin-top: 14px; border: 0; border-radius: 0; background: transparent; padding: 0; overflow: visible; box-shadow: none; }
.day-timeline-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.day-timeline-heading h4 { margin-top: 3px; font-size: 18px; letter-spacing: -.02em; }
.day-axis-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px 82px; }
.day-axis-summary span { padding: 6px 9px; border-radius: 9px; background: #f5f6f8; color: #6e7580; font-size: 11px; }
.day-axis-summary strong { color: #343b45; }
.day-axis-canvas { position: relative; margin: 0 0 0 0; min-height: 760px; }
.day-axis-line { position: absolute; left: 78px; top: 0; bottom: 0; width: 3px; border-radius: 999px; background: linear-gradient(180deg, #a9b9ad 0%, #5d7767 50%, #8d775f 100%); box-shadow: 0 0 0 5px rgba(83,106,93,.06); }
.day-recording-interval { position: absolute; z-index: 1; left: 78px; transform: translateX(-50%); width: 8px; min-height: 1px; border-radius: 999px; background: linear-gradient(180deg, #38b56d, #16844b); box-shadow: 0 0 0 2px rgba(40,166,91,.12); pointer-events: auto; }
.day-recording-interval.live-recording-pulsing { background: linear-gradient(180deg, #22c55e, rgba(34, 197, 94, 0.4)); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25), 0 0 10px rgba(34, 197, 94, 0.35); animation: live-recording-pulse 1.8s ease-in-out infinite alternate; z-index: 2; }
@keyframes live-recording-pulse { 0% { opacity: 0.6; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15); } 100% { opacity: 1; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.4), 0 0 12px rgba(34, 197, 94, 0.5); } }
.day-recording-legend { display: inline-flex; align-items: center; gap: 6px; color: #646864; font-size: 11px; }
.day-recording-legend i, .day-axis-recording-summary i { display: inline-block; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #25a45e; box-shadow: 0 0 0 2px rgba(37,164,94,.14); }
.day-axis-summary .day-axis-recording-summary { display: inline-flex; align-items: center; gap: 6px; background: #eef8f0; color: #31814d; }
.day-axis-summary .day-axis-recording-summary strong { color: #247744; }
.day-axis-summary .day-axis-recording-only { background: #f3f7f3; color: #6b7a6e; }
.day-axis-summary .day-axis-recording-unavailable { background: #fff7e9; color: #8a6a39; }
.day-axis-scene-trail { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; margin: 6px 0 0 0; padding: 6px 10px; border-radius: 10px; background: rgba(248, 250, 252, 0.95); border: 1px solid #e2e8f0; }
.day-axis-scene-trail strong { font-size: 11px; color: #475569; margin-right: 2px; }
.day-scene-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #fff; color: #1e293b; border: 1px solid var(--scene-color, #cbd5e1); box-shadow: 0 1px 3px rgba(0,0,0,0.04); cursor: default; transition: transform 0.15s ease; }
.day-scene-tag:hover { transform: scale(1.04); }
.day-scene-tag small { color: #64748b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.day-scene-layer { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; }
.day-scene-interval { position: absolute; z-index: 2; left: 85px; width: 4px; border-radius: 999px; background: var(--scene-color, #6b7280); box-shadow: 0 0 0 1px rgba(0,0,0,0.06); pointer-events: auto; opacity: 0.9; transform-origin: left; transition: transform 0.2s ease, opacity 0.2s ease; }
.day-scene-interval:hover { transform: scaleX(1.75); opacity: 1; }
.day-scene-capsule { position: absolute; left: 92px; z-index: 10; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--scene-color, #cbd5e1); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.6); font-size: 10px; font-weight: 600; color: #1e293b; pointer-events: auto; cursor: default; transition: transform 0.2s ease, box-shadow 0.2s ease; white-space: nowrap; }
.day-scene-capsule:hover { transform: translateY(-50%) scale(1.05); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); z-index: 25; }
.day-scene-capsule time { font-size: 10px; color: #64748b; font-weight: 500; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.day-time-guide { position: absolute; left: 0; right: 0; height: 1px; transform: translateY(-1px); pointer-events: none; }
.day-time-guide time { position: absolute; left: 0; top: -7px; width: 54px; color: #6d7682; font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; }
.day-time-guide span { position: absolute; left: 94px; right: 0; top: 0; border-top: 1px dashed #f1f2f4; }
.day-time-guide.major span { border-top-color: #e6e9ed; }
.day-time-guide.major time { color: #6d7681; font-weight: 700; }
.day-phase-label { position: absolute; left: 102px; transform: translateY(-50%); z-index: 2; padding: 3px 7px; border-radius: 999px; background: #f4f5f8; color: #646864; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.day-event-anchor { position: absolute; left: 0; right: 0; height: 0; transform: translateY(-16px); pointer-events: none; }
.day-event-node { position: absolute; left: 0; top: 0; width: 94px; height: 34px; }
.day-event-node span { position: absolute; left: 72px; top: 10px; width: 13px; height: 13px; border-radius: 50%; border: 3px solid #fff; background: #5d7767; box-shadow: 0 0 0 3px rgba(83,106,93,.14), 0 2px 7px rgba(48,73,58,.22); }
.surface, .hero-surface { border: 1px solid rgba(0, 0, 0, 0.07) !important; background: #ffffff !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 6px 16px rgba(0, 0, 0, 0.02) !important; border-radius: 16px !important; }
.day-event-card { pointer-events: auto; position: absolute; top: var(--card-shift, 0px); left: calc(106px + var(--lane) * ((100% - 112px) / var(--lane-count))); width: calc((100% - 112px - (var(--lane-count) - 1) * 8px) / var(--lane-count)); min-width: 0; border: 1px solid rgba(0,0,0,0.07); border-radius: 14px; background: #ffffff; padding: 11px 13px; box-shadow: 0 2px 6px rgba(0,0,0,0.03), 0 8px 20px rgba(0,0,0,0.025); transition: transform 100ms cubic-bezier(0.23, 1, 0.32, 1); }
.day-event-card:active { transform: scale(0.985); }
.day-event-card::before { content: ""; position: absolute; left: -10px; top: 16px; width: 9px; border-top: 1px solid #ccd3cd; }
.day-event-card:focus-within { border-color: #a6b7aa; box-shadow: 0 0 0 2px rgba(83,106,93,.1), 0 7px 20px rgba(41,49,43,.065); }
.day-event-meta { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; min-width: 0; }
.day-event-meta strong { flex: 0 0 auto; font: 700 10px ui-monospace, SFMono-Regular, Menlo, monospace; color: #4a514c; }
.day-event-meta span { flex: 0 0 auto; padding: 2px 5px; border-radius: 999px; background: #eaf0eb; color: #55705e; font-size: 10px; font-weight: 800; }
.day-event-meta em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #646864; font-size: 10px; font-style: normal; }
.day-event-play-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; min-height: 19px; padding: 1px 7px; border: 1px solid #c2d4c6; border-radius: 999px; background: #eef5f0; color: #275638; font-size: 10px; font-weight: 700; cursor: pointer; transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out); flex: 0 0 auto; }
.day-event-play-btn:hover { background: #275638; color: #fff; border-color: #275638; }
.day-event-play-btn.playing { background: #dc2626; color: #fff; border-color: #dc2626; }
.day-play-icon { font-size: 10px; }
.day-event-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 11px; line-height: 1.45; font-weight: 700; color: #252a26; }
.day-event-source { margin-top: 8px; border-top: 1px solid #eef0f3; padding-top: 7px; }
.day-event-source summary { color: #6d7682; font-size: 10px; cursor: pointer; user-select: none; }
.day-event-source p { margin: 7px 0 0; color: #6e7580; font-size: 11px; line-height: 1.6; }
.day-now-marker { position: absolute; left: 64px; right: 0; z-index: 15; border-top: 1px solid #de5567; }
.day-now-marker::before { content: ""; position: absolute; left: 8px; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: #de5567; }
.day-now-marker span { position: absolute; right: 0; top: -11px; padding: 3px 7px; border-radius: 999px; background: #fff0f2; color: #bd3f50; font-size: 10px; font-weight: 700; }
.day-task-marker { position: absolute; left: 64px; right: 0; z-index: 18; pointer-events: auto; }
.day-task-marker.active { border-top: 2px solid #e53e3e; z-index: 18; }
.day-task-marker.active::before { content: ""; position: absolute; left: 6px; top: -6px; width: 11px; height: 11px; border-radius: 50%; background: #e53e3e; box-shadow: 0 0 0 3px rgba(229,62,62,.25); animation: task-needle-pulse 2s infinite; }
.day-task-marker.completed { border-top: 2px dashed #38a169; z-index: 16; }
.day-task-marker.completed::before { content: ""; position: absolute; left: 6px; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: #38a169; box-shadow: 0 0 0 2px rgba(56,161,105,.2); }
@keyframes task-needle-pulse { 0% { box-shadow: 0 0 0 0 rgba(229,62,62,.6); } 70% { box-shadow: 0 0 0 8px rgba(229,62,62,0); } 100% { box-shadow: 0 0 0 0 rgba(229,62,62,0); } }
.day-task-badge { position: absolute; right: 0; display: inline-flex; align-items: center; border-radius: 999px; }
.day-task-badge.active, .day-task-badge:not(.completed) { top: -13px; gap: 6px; padding: 3px 9px; background: #fff5f5; border: 1px solid #feb2b2; color: #c53030; box-shadow: 0 2px 8px rgba(197,48,48,.12); }
.day-task-badge.active strong, .day-task-badge:not(.completed) strong { font-size: 10px; font-weight: 800; color: #9b2c2c; }
.day-task-badge.active small, .day-task-badge:not(.completed) small { font-size: 10px; font-weight: 600; color: #c53030; }
.day-task-badge.completed { top: -12px; gap: 5px; padding: 2px 9px; background: #f0fff4; border: 1px solid #9ae6b4; color: #276749; box-shadow: 0 1px 4px rgba(39,103,73,.12); }
.day-task-badge.completed strong { font-size: 10px; font-weight: 700; color: #22543d; }
.day-task-badge.completed small { font-size: 10px; font-weight: 500; color: #2f855a; }
.day-task-check-dot { font-size: 10px; font-weight: 800; color: #2e8456; line-height: 1; }
.day-task-pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: #e53e3e; animation: task-dot-flash 1.2s ease-in-out infinite alternate; flex: 0 0 auto; }
@keyframes task-dot-flash { from { opacity: .4; transform: scale(.85); } to { opacity: 1; transform: scale(1.15); } }
@keyframes live-pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.3; transform: scale(1.4); } 100% { opacity: 1; transform: scale(1); } }
.day-recording-interval.processing { background: repeating-linear-gradient(-45deg, rgba(229,62,62,.35), rgba(229,62,62,.35) 4px, rgba(229,62,62,.6) 4px, rgba(229,62,62,.6) 8px) !important; box-shadow: 0 0 0 2px #e53e3e; }
.day-recording-interval.pending-queue { opacity: .4; background: repeating-linear-gradient(45deg, rgba(120,140,130,.25), rgba(120,140,130,.25) 3px, rgba(160,180,170,.45) 3px, rgba(160,180,170,.45) 6px) !important; }
.journal-transcripts { margin-top: 18px; border: 1px solid #dfe3de; border-radius: 18px; background: #fffefa; padding: 18px 20px; }
.journal-transcript-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.journal-transcript-head h4 { margin-top: 4px; font-size: 19px; }
.journal-transcript-head h4 small { color: #646864; font-size: 11px; font-weight: 500; }
.journal-transcript-filters { display: flex; gap: 5px; flex-wrap: wrap; }
.journal-transcript-filter { padding: 6px 10px; border: 1px solid #dfe3de; border-radius: 999px; background: #fff; color: #68716a; font-size: 11px; }
.journal-transcript-filter.active { border-color: #536a5d; background: #324039; color: #fff; }
.journal-transcript-status { margin: 10px 0; padding: 9px 11px; border-radius: 9px; background: #fff7e9; color: #806336; font-size: 11px; line-height: 1.5; }
.journal-transcript-list { display: grid; gap: 0; max-height: 620px; overflow: auto; }
.journal-transcript-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 10px 2px; border-top: 1px solid #ecefe9; }
.journal-transcript-row time { padding-top: 2px; color: #6f7971; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.journal-transcript-row p { display: inline; margin: 0 0 0 7px; color: #303832; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.journal-transcript-row small { display: block; margin-top: 5px; color: #646864; font-size: 10px; overflow-wrap: anywhere; }
.journal-transcript-label { display: inline-block; padding: 2px 6px; border-radius: 999px; background: #fff3d8; color: #806336; font-size: 10px; font-weight: 700; }
.journal-transcript-label.self { background: #e8f2e9; color: #3f7048; }
.journal-transcript-label.non_self { background: #edf0f3; color: #596775; }
.journal-source-outcome { display: inline-block; margin-left: 5px; padding: 2px 6px; border-radius: 999px; background: #edf0f3; color: #596775; font-size: 10px; font-weight: 700; }
.journal-source-outcome.processed { background: #e8f2e9; color: #3f7048; }
.journal-source-outcome.no_event { background: #f0f1ed; color: #68716a; }
.journal-source-outcome.pending { background: #fff3d8; color: #806336; }
.journal-source-outcome.failed { background: #fff0f0; color: #a83d3d; }
.journal-source-outcome-summary { display: inline-block; margin-left: 7px; color: #59645c; font-weight: 700; }
.journal-transcript-candidates { margin-top: 8px; padding: 8px 10px; border: 1px solid #d9e7da; border-radius: 9px; background: #f5faf5; color: #435748; font-size: 10px; }
.journal-transcript-candidates > strong { font-size: 10px; }
.journal-transcript-candidates ul { display: grid; gap: 4px; margin: 5px 0 0; padding-left: 16px; }
.journal-transcript-candidates li { line-height: 1.45; }
.journal-transcript-candidates li span { margin-left: 4px; color: #646864; }
.journal-relation-candidates { border-color: #d7dff0; background: #f6f8fc; color: #48546d; }
.journal-relation-candidate { display: grid; gap: 5px; }
.journal-relation-candidate + .journal-relation-candidate { margin-top: 9px; padding-top: 8px; border-top: 1px solid #e3e8f0; }
.journal-relation-candidate-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.journal-relation-review-state { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; background: #fff3d8; color: #806336; font-size: 10px; font-weight: 700; }
.journal-relation-review-state.accepted { background: #e8f2e9; color: #3f7048; }
.journal-relation-review-state.rejected { background: #f0f1ed; color: #68716a; }
.journal-relation-review-state.unavailable { background: #fff0f0; color: #a83d3d; }
.journal-relation-candidate blockquote { margin: 1px 0; padding-left: 8px; border-left: 2px solid #bdc9dd; color: #59647a; }
.journal-relation-review-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.journal-relation-review { padding: 4px 8px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #475569; font-size: 10px; font-weight: 700; cursor: pointer; }
.journal-relation-review.accept { border-color: #b9d2bd; color: #32623c; }
.journal-relation-review.reject { border-color: #d9c9c9; color: #8a4d4d; }
.journal-relation-review:disabled { cursor: progress; opacity: .6; }
.journal-relation-review-feedback { color: #657080 !important; }
.journal-transcript-review { display: inline-flex; margin-top: 7px; padding: 5px 9px; border: 1px solid #b9d2bd; border-radius: 8px; background: #f1f8f2; color: #32623c; font-size: 10px; font-weight: 700; cursor: pointer; }
.journal-transcript-review:hover { border-color: #6e9b75; background: #e7f3e9; }
.journal-transcript-review:disabled { cursor: progress; opacity: .65; }
.journal-transcript-review-status { color: #397348 !important; }
.journal-transcript-error { color: #a83d3d; font-size: 12px; }
@media (max-width: 620px) { .journal-transcripts { padding: 14px; } .journal-transcript-head { align-items: flex-start; flex-direction: column; } .journal-transcript-row { grid-template-columns: 44px minmax(0, 1fr); gap: 6px; } }
.day-task-banner { margin: 10px 0 16px; padding: 12px 14px; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.day-task-banner.active, .day-task-banner:not(.completed) { background: linear-gradient(135deg, #fff5f5, #fffafa); border: 1px solid #fed7d7; }
.day-task-banner.completed { background: linear-gradient(135deg, #f0fff4, #f7fafc); border: 1px solid #c6f6d5; padding: 10px 14px; }
.day-task-banner-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.day-task-banner-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex: 0 0 auto; }
.day-task-banner-icon.active, .day-task-banner-icon:not(.completed) { background: #fee2e2; color: #e22727; }
.day-task-banner-icon.completed { background: #c6f6d5; color: #22543d; font-size: 13px; font-weight: 800; }
.day-task-banner-info { min-width: 0; }
.day-task-banner.active .day-task-banner-info strong, .day-task-banner:not(.completed) .day-task-banner-info strong { display: block; font-size: 12px; color: #9b2c2c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-task-banner.active .day-task-banner-info span, .day-task-banner:not(.completed) .day-task-banner-info span { display: block; font-size: 11px; color: #742a2a; margin-top: 2px; }
.day-task-banner.completed .day-task-banner-info strong { display: block; font-size: 12px; color: #22543d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-task-banner.completed .day-task-banner-info span { display: block; font-size: 11px; color: #4a5568; margin-top: 2px; }
.day-task-progress-box { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.day-task-progress-bar { width: 100px; height: 6px; border-radius: 999px; background: #fed7d7; overflow: hidden; }
.day-task-progress-fill { height: 100%; border-radius: 999px; background: #e53e3e; }
.day-task-progress-pct { font-size: 11px; font-weight: 800; color: #9b2c2c; font-variant-numeric: tabular-nums; }
.day-task-completed-pill { font-size: 10px; font-weight: 700; color: #276749; background: #c6f6d5; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.task-metric-completed { border-color: #c6f6d5 !important; background: #f0fff4 !important; }
.day-axis-empty { display: flex; flex-direction: column; gap: 5px; padding: 24px 10px; border: 1px dashed #dfe2e7; border-radius: 11px; color: #6e7580; }
.day-axis-empty span { color: #6e7581; font-size: 11px; }
.multi-day-observations { margin: 16px 0 20px; border: 1px solid #dde3de; border-radius: 18px; background: linear-gradient(135deg, #f8faf7, #fff); padding: 17px 18px; }
.multi-day-observations.insufficient { border-style: dashed; background: #fafbf9; }
.multi-day-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.multi-day-head span { display: block; color: #646864; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.multi-day-head h4 { margin: 3px 0 0; color: #2d3530; font-size: 17px; }
.multi-day-head small, .multi-day-note, .multi-day-observations.insufficient > p { color: #646864; font-size: 10px; line-height: 1.6; }
.multi-day-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.multi-day-grid article { min-width: 0; border: 1px solid #e7eae7; border-radius: 12px; background: rgba(255,255,255,.88); padding: 11px; }
.multi-day-grid span, .multi-day-grid small { display: block; color: #646864; font-size: 10px; }
.multi-day-grid strong { display: block; margin: 5px 0 3px; color: #2c332f; font-size: 18px; line-height: 1.1; }
.multi-day-note { margin: 11px 1px 0; }
.journal-empty { display: flex; flex-direction: column; gap: 5px; padding: 24px 2px; color: #6e7580; }
.journal-empty span { color: #6e7581; font-size: 12px; }
.service-version-warning { display: flex; gap: 9px; align-items: baseline; margin: -8px 0 15px; padding: 10px 12px; border: 1px solid #e7c979; border-radius: 12px; background: #fff9e9; color: #705b22; font-size: 11px; line-height: 1.55; }
.service-version-warning strong { flex: 0 0 auto; }
.data-backup-card { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px; border: 1px solid #e3e6e2; border-radius: 13px; background: #fafbf9; }
.data-backup-card p { margin: 5px 0 0; color: #646864; font-size: 11px; line-height: 1.55; }
.data-backup-card .setting-action.disabled { pointer-events: none; opacity: .55; }
.data-health-card { margin-top: 12px; padding: 14px; border: 1px solid #e3e6e2; border-radius: 13px; background: #fafbf9; }
.data-health-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.data-health-head p { margin: 5px 0 0; color: #646864; font-size: 11px; line-height: 1.55; }
.data-health-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 8px; margin-top: 12px; }
.data-health-metrics > div { padding: 10px; border: 1px solid #e7e9e6; border-radius: 10px; background: #fff; }
.data-health-metrics span { display: block; color: #646864; font-size: 10px; }
.data-health-metrics strong { display: block; margin-top: 4px; color: #333b36; font-size: 16px; }
.data-health-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hidden { display: none; }
.status-line { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 14px; }
.status { font-weight: 700; }
.status.running { color: #55705e; }
.status.completed { color: #238458; }
.status.failed, .status.interrupted { color: #ba4b4b; }
.progress { height: 8px; background: #eceef2; border-radius: 10px; overflow: hidden; margin: 12px 0; }
.progress > div { height: 100%; background: #5d7767; transform-origin: left center; transition: transform var(--motion-ui) var(--ease-out); }
.pipeline-state { margin: 0 0 15px; padding: 14px; border: 1px solid #e4e6e1; border-radius: 14px; background: #f8f8f5; }
.pipeline-state-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.pipeline-state-head span { color: #646864; font-size: 10px; font-weight: 700; }
.pipeline-state-head strong { color: #5b635d; font-size: 10px; font-weight: 700; }
.pipeline-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 7px; }
.pipeline-step { position: relative; min-width: 0; display: flex; align-items: center; gap: 7px; color: #646864; font-size: 10px; font-weight: 700; }
.pipeline-step:not(:last-child)::after { content: ""; position: absolute; left: 25px; right: -4px; top: 10px; height: 1px; background: #dfe2dd; z-index: 0; }
.pipeline-dot { position: relative; z-index: 1; flex: 0 0 auto; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #d7dbd7; background: #fff; color: #646864; font-size: 10px; }
.pipeline-step.completed { color: #55705e; }
.pipeline-step.completed .pipeline-dot { border-color: #8fa393; background: #e8f0ea; color: #4f725b; }
.pipeline-step.running, .pipeline-step.active { color: #2f3d34; }
.pipeline-step.running .pipeline-dot, .pipeline-step.active .pipeline-dot { border-color: #5d7767; background: #5d7767; color: #fff; box-shadow: 0 0 0 4px rgba(83,106,93,.09); }
.pipeline-step.failed { color: #a34b48; }
.pipeline-step.failed .pipeline-dot { border-color: #d08d88; background: #fff0ef; color: #a34b48; }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 16px 0; }
.detail { background: #f7f8fa; border-radius: 10px; padding: 10px 12px; }
.detail strong { display: block; margin-top: 4px; }
.logs { background: #20242b; color: #d8dce5; border-radius: 10px; padding: 12px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; max-height: 180px; overflow: auto; white-space: pre-wrap; }
.logs-details { margin: 18px 0; }
.logs-details summary { color: #6e7581; font-size: 12px; cursor: pointer; }
.logs-details .logs { margin-top: 9px; }
.results-panel { margin: 22px 0; }
.results-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 12px; }
.results-heading h3 { margin: 0; font-size: 17px; }
.results-heading p { color: #6e7581; font-size: 13px; line-height: 1.5; margin: 5px 0 0; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.result-card { display: flex; flex-direction: column; min-height: 156px; padding: 15px; border: 1px solid #e1e4ea; border-radius: 13px; background: #fffefa; color: #20242b; text-decoration: none; transition: border-color var(--motion-press) var(--ease-out), transform var(--motion-press) var(--ease-out), box-shadow var(--motion-press) var(--ease-out); }
.result-card:hover { border-color: #aeb5e7; box-shadow: 0 8px 24px rgba(44, 52, 89, .08); }
.result-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.result-card-top strong { font-size: 15px; }
.result-badge { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; background: #eaf0eb; color: #55705e; font-size: 11px; font-weight: 700; }
.result-card p { color: #69717d; font-size: 12px; line-height: 1.55; margin: 10px 0; }
.result-context { color: #6e7582; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-open { color: #55705e; font-size: 12px; font-weight: 700; margin-top: auto; padding-top: 12px; }
.result-empty { color: #6e7582; padding: 14px 0; }
.technical-results { margin-top: 14px; border-top: 1px solid #eceef2; padding-top: 12px; }
.technical-results summary { color: #6e7581; font-size: 12px; cursor: pointer; user-select: none; }
.technical-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.technical-links a { display: flex; justify-content: space-between; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: 8px; background: #f7f8fa; color: #5964c3; font-size: 12px; text-decoration: none; }
.technical-links a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.technical-links small { flex: 0 0 auto; color: #646864; font-size: 10px; }
.error { color: #a83d3d; background: #fff0f0; border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.job-row { width: 100%; align-items: center; cursor: pointer; background: transparent; color: inherit; text-align: left; }
.job-list-item[data-status="partial"] .job-row, .job-list-item.job-partial .job-row, .job-row.job-partial { background: #fffaf2; }
.job-list-item[data-status="partial"] .job-row:hover, .job-list-item.job-partial .job-row:hover, .job-row.job-partial:hover { background: #fdf3e6; }
.job-list-item[data-status="partial"] .job-row .muted, .job-list-item.job-partial .job-row .muted, .job-row.job-partial .muted { color: #8b6a32; }
.job-row .muted, .job-mode { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.job-row:hover { background: #f8f8ff; }
.job-row:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: -2px; background: #f8f8ff; }
.job-title { flex: 1; }
.job-mode { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: #eef1ed; color: #637068; font-size: 10px; font-weight: 750; }
.file-main { min-width: 0; flex: 1; }
.local-reminders-surface { margin-top: 14px; }
.reminder-head { align-items: flex-start; }
.local-reminders-list { display: grid; gap: 8px; }
.local-reminder-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; border: 1px solid #e5e7e2; border-radius: 12px; background: #fafbf9; }
.local-reminder-copy { min-width: 0; }
.local-reminder-copy strong { display: block; color: #343c36; font-size: 12px; }
.local-reminder-copy span { display: block; margin-top: 4px; color: #646864; font-size: 10px; text-wrap: pretty; }
.local-reminder-actions { display: flex; align-items: center; gap: 7px; }
.local-reminder-actions input { min-height: 34px; border: 1px solid #dfe2dd; border-radius: 9px; padding: 0 8px; background: #fff; color: #4e5751; font-size: 10px; }
.local-reminder-actions .setting-action { min-height: 34px; padding: 0 10px; font-size: 11px; white-space: nowrap; }
.local-reminder-actions .reminder-btn-complete:hover { border-color: #2e7d32; color: #2e7d32; background: #f1f8f1; }
.local-reminder-actions .reminder-btn-dismiss:hover { border-color: #d32f2f; color: #d32f2f; background: #fdf2f2; }
.pattern-alert-list:empty { display: none; }
.pattern-alert-list { display: grid; gap: 8px; margin: 12px 0; }
.pattern-alert-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pattern-alert-heading strong { color: #765d36; font-size: 11px; }
.pattern-alert-heading span { color: #83735a; font-size: 10px; }
.pattern-alert-card { padding: 12px 13px; border: 1px solid #eadfc9; border-radius: 13px; background: #fff9ef; }
.pattern-alert-card > div span { display: block; color: #88714f; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.pattern-alert-card > div strong { display: block; margin-top: 3px; color: #644e2f; font-size: 12px; }
.pattern-alert-card > p { margin: 7px 0 0; color: #756349; font-size: 10px; line-height: 1.65; }

/* 统一键盘焦点环（唯一来源）：所有可聚焦控件共用 --focus-ring 一套视觉，键盘导航时焦点始终可见。
   注意：这里不能混入 :has() 选择器——不支持的旧内核会把整条规则一起作废，
   label.file-picker 的 :has() 变体已移到上方 @supports selector(:has(*)) 里。 */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible, [role="button"]:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: var(--focus-ring-offset); }

/* 容器级焦点反馈（:focus-within）：复合控件内部有任一子元素获得焦点时，容器本身也要有可见提示。
   否则焦点落进「输入框 + 按钮」这类组合里时，从外面看不出焦点在哪一组。
   只改 outline 与 border-color 两个不参与布局的属性，因此不会产生位移；颜色与宽度全部复用
   上方同一套 --focus-ring / --focus-ring-width / --focus-ring-offset，不新增魔法数字与动效。
   .search-input-wrap 与 .file-picker 已有各自的 :focus-within / :has() 处理，这里不重复。 */
.correction-input-row:focus-within,
.secret-input-row:focus-within,
.time-field:focus-within,
.agent-prompt-block:focus-within,
.access-token-card:focus-within,
.setting-field:focus-within,
.search-date-field:focus-within,
.search-category-field:focus-within,
.search-amount-field:focus-within,
.mobile-trusted-bind:focus-within,
.auto-ingest-folders:focus-within,
.auto-ingest-options label:focus-within,
.stats-range-fields label:focus-within {
  border-color: var(--focus-ring);
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* 开关（.switch）里的 checkbox 是视觉隐藏的（position: absolute + opacity: 0），
   全局 input:focus-visible 的焦点环画在它身上等于看不见。这里把焦点提示转移到可见的轨道上，
   键盘用户才能确认当前停在哪个开关；轨道已有 border-radius，outline 会跟随圆角。 */
.switch:focus-within .switch-track {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* Emil Kowalski tactile press feedback: scale(0.96) */
.setting-action:active, .new-import-button:active, .file-picker:active, .journal-action:active, .quiet-button:active, .search-submit:active, .search-filter:active, .nav-item:active, .tab-item:active, .review-action:active, .mobile-nav-btn:active, .mobile-sub-tab:active, .search-capsule:active, .day-event-play-btn:active, .search-audio-play-btn:active, .sync-now-button:active, .quick-chip:active, .mic-toggle-btn:active, .ctrl-btn:active {
  transform: scale(0.96);
}

/* 补全按下反馈（配合已关闭的默认点击高亮）：任何可点区域按下都要有可见变化。
   整行/链接类用底色，卡片用极轻微下沉，纯文本链接与 <summary> 用透明度，
   开关用现有焦点色描边；色值与动效变量均复用文件内既有值。 */
.search-day-head:active, .job-row:active, .technical-links a:active { background: #eef1ed; }
.search-result-card:active, .result-card:active, .model-option:active { transform: translateY(0) scale(.995); }
.system-status-link:active, summary:active { opacity: .72; }
.switch:active .switch-track { box-shadow: 0 0 0 4px rgba(83,106,93,.09); }

@media (hover: hover) and (pointer: fine) {
  .search-result-card:hover, .result-card:hover { transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  .search-result-card, .result-card, .setting-action, .new-import-button, .file-picker, .journal-action, .switch-track, .switch-track span, .setting-badge, .settings-tab, .quick-day, .day-chip, .task-card { transition-duration: 120ms; }
  .search-result-card:hover, .result-card:hover, .setting-action:active, .new-import-button:active, .file-picker:active, .journal-action:active { transform: none; }
  .switch-track span, .progress > div { transition: none; }
  .status-dot { transition: none; }
  .journal-skeleton span { animation: none; background: #f1f2ef; }
  .review-dashboard[aria-busy="true"] .review-empty-icon { animation: none; }
  .status-copy.checking::before, .setting-status.checking::before { animation: none; }
  .drop-hero.drag-active { transform: none; }
  .review-day-card:hover, .review-day-card:active, .primary:active:not(:disabled) { transform: none; }
  .file-picker:active { transform: none; }
  /* 新增的按下反馈：减弱动效时只保留底色/透明度变化，取消所有位移与缩放 */
  .search-results-action-btn:active, .inline-viewer-back:active, .inline-viewer-external:active, .diagnostic-close:active, .mic-toggle-btn:active, .pinned-memo-copy-btn:active, .quick-prompt-pill:active, .quick-day:active, .day-chip:active, .settings-tab:active, .task-state-actions button:active, .onboarding-top button:active, .search-result-card:active, .result-card:active, .model-option:active { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .sidebar, .topbar, .inline-viewer-bar { background: #f6f5f0; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* 高对比度偏好（prefers-contrast: more）：加深边框与次要文字，保证可读性 ≥4.5:1。
   颜色统一收敛到现有变量（--muted / --line-strong / --focus-ring），不散落新的魔法数字。 */
@media (prefers-contrast: more) {
  :root {
    --muted: #3b423c;
    --line: #a7ada6;
    --line-strong: #6f766f;
    --focus-ring: var(--ink);
    --focus-ring-width: 3px;
  }

  /* 卡片 / 面板 / 输入控件边框：统一加深到 --line-strong（保持 1px，避免布局位移） */
  .surface,
  .hero-surface,
  .system-status-panel,
  .inline-viewer-bar,
  .stats-range-fields input,
  .stats-metrics article,
  .stats-grid > section,
  .stats-chart-card,
  .stats-ratio-card,
  .pattern-card,
  .mobile-token-card,
  .mobile-trusted-bind,
  .mobile-trusted-bind input,
  .mobile-capture-settings,
  .access-token-card input,
  .receiver-health-chip,
  .auto-ingest-folders textarea,
  .auto-ingest-options input,
  .model-option,
  .review-draft-session li,
  .current-live-status,
  .journal-freshness,
  .journal-section,
  .workspace-snapshot article,
  .workspace-lane,
  .task-state-actions button,
  .data-backup-card,
  .data-health-card,
  .local-reminder-actions input {
    border-color: var(--line-strong);
  }

  /* 次要 / 说明文字与占位符：统一加深到 --muted */
  .brand-block span,
  .sidebar-foot,
  .page-kicker,
  .section-kicker,
  .system-status-overall,
  .system-status-items b,
  .system-status-foot small,
  .view-intro p:not(.section-kicker),
  .stats-metrics span,
  .stats-bar-row > span,
  .search-input-icon,
  .search-input-wrap input::placeholder,
  .search-result-head time,
  .status-copy,
  .access-token-card > p:not(.section-kicker),
  .setting-badge,
  .receiver-health-chip,
  .auto-ingest-options small,
  .auto-ingest-summary span,
  .auto-ingest-history-head span,
  .agent-endpoint-card span,
  .current-live-status,
  .journal-freshness,
  .workspace-snapshot span,
  .workspace-snapshot small,
  .task-state-actions button,
  .day-event-meta em,
  .journal-transcript-filter,
  .data-backup-card p,
  .data-health-head p {
    color: var(--muted);
  }

  /* 鼠标聚焦态边框同步加深，与键盘焦点环视觉一致 */
  .search-input-wrap:focus-within,
  .day-event-card:focus-within {
    border-color: var(--focus-ring);
  }
}

/* Windows 高对比度模式（forced-colors: active）：系统会把 color / background-color / border-color
   一律强制成系统色，于是「只用底色表达」的控件会与页面同色而消失，box-shadow 环也不再绘制。
   这里只做两件事：① 令牌换成系统色关键字（CanvasText / Highlight），让边框、次要文字、焦点环
   取用户主题配色并保持 ≥4.5:1；② 给靠底色表达「可点 / 选中 / 开关 / 进度 / 状态」的元素补可见描边。
   只改颜色与描边，不改尺寸、间距与动效，避免高对比度下出现布局位移。
   系统色关键字本身就是主题令牌，因此不新增魔法数字。 */
@media (forced-colors: active) {
  :root {
    --ink: CanvasText;
    --muted: CanvasText;      /* 不用 GrayText：部分主题下低于 4.5:1 */
    --line: CanvasText;
    --line-strong: CanvasText;
    --focus-ring: Highlight;  /* 系统保证 Highlight 与 Canvas 有对比，焦点环始终可见 */
    --focus-ring-width: 3px;
  }

  /* 选中文字：与系统选中配色成对使用，保证前景/背景都可读 */
  ::selection { background: Highlight; color: HighlightText; }

  /* 输入光标：caret-color 不在系统强制改色的属性列表里，--accent 在 Canvas 上可能对比不足，
     改回系统文字色 CanvasText，与输入框文字同色，保证光标始终可见 */
  input, textarea, [contenteditable] { caret-color: CanvasText; }

  /* 顶层浮层背板：forced-colors 下 background-color 会被系统强制改写，显式取系统色 Canvas，
     让各内核表现一致（不透明窗口底色，与浮层内容形成明确隔离），不写死任何具体颜色值。 */
  dialog::backdrop { background: Canvas; }

  /* 实心按钮：底色被强制成 Canvas 后与页面同色，改用系统按钮配色 + 1px 描边保留「可点」边界 */
  .primary,
  .new-import-button,
  .search-submit,
  .file-picker {
    background: ButtonFace;
    color: ButtonText;
    border: 1px solid CanvasText;
  }

  /* 禁用态：主按钮的禁用原本只靠底色表达（会被强制成 Canvas），改用系统 GrayText 与可用态区分 */
  .primary:disabled { color: GrayText; border-color: GrayText; }

  /* 选中 / 激活态：底色与 inset 阴影都会消失，统一用 Highlight 描边标出当前项 */
  .nav-item.active,
  .settings-tab.active,
  .day-chip.active,
  .quick-day.active,
  .model-option.selected {
    border: 1px solid Highlight;
  }

  /* 未选中的日期 chip 只有底色，补上描边，避免退化成纯文字 */
  .day-chip { border-color: CanvasText; }

  /* 开关：轨道与滑块都靠底色区分，改为系统色描边 + Highlight 表示开启 */
  .switch-track { outline: 1px solid CanvasText; outline-offset: -1px; }
  .switch-track span { background: CanvasText; }
  .switch input:checked + .switch-track { background: Highlight; outline-color: HighlightText; }
  .switch input:checked + .switch-track span { background: HighlightText; }

  /* 进度条：轨道与填充同样只剩底色，改为描边轨道 + Highlight 填充 */
  .progress { outline: 1px solid CanvasText; outline-offset: -1px; }
  .progress > div { background: Highlight; }

  /* 状态点：7px 圆点只靠底色表达，其颜色语义在高对比度下无法保留，
     改为纯系统色实心点；状态仍由相邻文字（role="status"）承担 */
  .status-dot,
  .status-dot.ready,
  .status-dot.warning,
  .status-dot.error { background: CanvasText; }

  /* 药丸标签（计数 / 模式 / 结果）与失败提示块：只有底色，补 1px 描边保住轮廓 */
  .nav-badge, .job-mode, .result-badge, .error { border: 1px solid CanvasText; }

  /* 日视图时间轴主线是渐变底色，强制配色下会消失，改为实心线 */
  .day-axis-line { background: CanvasText; }
}

@media (max-width: 620px) { .shell { padding-top: 28px; } .file-picker { width: 100%; } .file-row, .job-row { align-items: flex-start; flex-direction: column; gap: 5px; } .result-grid, .technical-links, .journal-body { grid-template-columns: 1fr; } .quick-days { grid-template-columns: 1fr; } .journal-day-header, .day-timeline-heading, .daily-workspace-head { align-items: flex-start; flex-direction: column; } .journal-actions { justify-content: flex-start; } .journal-metrics, .workspace-snapshot { grid-template-columns: repeat(2, 1fr); } .workspace-board, .life-ledger { grid-template-columns: 1fr; } .workspace-lane { min-height: 0; } .workspace-trust-note { align-self: flex-start; } .day-axis-line { left: 54px; } .day-time-guide time { width: 38px; font-size: 10px; } .day-time-guide span { left: 68px; } .day-phase-label { left: 74px; } .day-event-anchor { grid-template-columns: 68px minmax(0, 1fr); } .day-event-node span { left: 48px; } .day-axis-summary { margin-left: 0; } .day-event-card { margin-left: 13px; padding: 11px 12px; } .day-event-title { font-size: 14px; } .day-now-marker, .day-task-marker { left: 43px; } }
@media (max-width: 620px) { .day-recording-interval { left: 54px; } .day-scene-interval { left: 60px; } .day-scene-capsule { left: 66px; font-size: 10px; padding: 1px 5px; } }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .sidebar { width: 82px; padding-inline: 12px; }
  .brand-block { justify-content: center; padding-inline: 0; }
  .brand-block > div:last-child, .nav-item > span:not(.nav-icon):not(.nav-badge), .sidebar-foot span:last-child { display: none; }
  .nav-item { grid-template-columns: 1fr; place-items: center; padding: 0; }
  .nav-badge { position: absolute; right: 5px; top: 4px; }
  .sidebar-foot { justify-content: center; padding-inline: 0; }
  .workspace { width: calc(100vw - 82px); padding-inline: 24px; }
}

@media (max-width: 620px) {
  body { padding-bottom: 84px; }
  .app-shell { display: block; }
  .sidebar { display: none !important; }
  .mobile-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    position: fixed;
    inset: auto 10px calc(env(safe-area-inset-bottom, 8px) + 6px);
    height: 58px;
    padding: 5px 4px;
    border-radius: 20px;
    background: rgba(250,250,247,.96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(54,62,56,.14);
    box-shadow: 0 14px 38px rgba(37,43,39,.18);
    z-index: 900;
  }
  .mobile-nav-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    background: transparent;
    border: none;
    color: #646a65;
    font-size: 10px;
    font-weight: 650;
    cursor: pointer;
    transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out), box-shadow var(--motion-press) var(--ease-out);
  }
  .mobile-nav-btn:hover { background: rgba(238,243,239,.6); color: #202621; }
  .mobile-nav-btn.active { background: #fff; color: #202621; box-shadow: 0 3px 10px rgba(0,0,0,.06), inset 0 0 0 1px rgba(0,0,0,.04); }
  .mobile-nav-icon { font-size: 18px; line-height: 1.1; margin-bottom: 2px; }
  .mobile-nav-btn .nav-badge {
    position: absolute;
    top: 3px;
    right: calc(50% - 20px);
    min-width: 17px;
    height: 16px;
    font-size: 10px;
    line-height: 16px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    padding: 0 4px;
  }
  .mobile-sub-nav {
    display: flex !important;
    gap: 3px;
    padding: 3px;
    margin: 0 0 16px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
  }
  .mobile-sub-tab {
    flex: 1;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #6e6e73;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 120ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  .mobile-sub-tab:hover {
    color: #1d1d1f;
  }
  .mobile-sub-tab:active {
    transform: scale(0.97);
  }
  .mobile-sub-tab.active {
    background: #ffffff !important;
    color: #1d1d1f !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  }
  .mobile-sub-tab .nav-badge {
    background: #fff0dd;
    color: #9d653d;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
  }
  .workspace { width: 100%; padding: 22px 14px 26px; }
  .topbar { margin: -22px -2px 18px; padding: 20px 2px 13px; }
  :root { --anchor-scroll-offset: 88px; }
  .topbar h1 { font-size: 29px; }
  .system-status-panel { gap: 8px; margin: -9px 0 15px; padding: 10px 11px; }
  .system-status-items { gap: 5px; }
  .system-status-items b { font-size: 10px; }
  .system-status-items em { font-size: 10px; }
  .quiet-button { display: none; }
  .new-import-button { min-height: 36px; }
  .surface { padding: 16px; border-radius: 17px; }
  .new-import-button { display: none; }
  .mobile-brief-surface { display: block; margin-bottom: 12px; }
  .mobile-brief-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .mobile-brief-head h2 { margin: 0; font-size: 19px; }
  .mobile-brief-head .quiet-button { display: inline-flex; min-height: 32px; padding: 0 10px; }
  .mobile-brief-content { margin-top: 12px; }
  .mobile-brief-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .mobile-brief-meta strong { font-size: 18px; }
  .mobile-brief-meta span { color: #646864; font-size: 10px; }
  .mobile-brief-categories { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
  .mobile-brief-categories span { padding: 4px 7px; border-radius: 999px; background: #eef3ef; color: #587060; font-size: 10px; }
  .mobile-brief-list { display: grid; gap: 6px; }
  .mobile-brief-list article { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 8px; align-items: baseline; padding: 8px 9px; border-radius: 10px; background: #f8f9f7; }
  .mobile-brief-list article span { color: #646864; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
  .mobile-brief-list article strong { color: #343b36; font-size: 11px; line-height: 1.45; }
  .mobile-brief-list p { margin: 0; color: #646864; font-size: 10px; }
  .mobile-brief-todos { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf0ec; color: #646864; font-size: 10px; }
  .mobile-brief-todos strong { color: #354139; }
  .mobile-brief-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
  .mobile-doctor-action { grid-column: 1 / -1; }
  .mobile-capture-card { display: grid; gap: 10px; margin: 0 0 12px; padding: 14px; border: 1px solid #dfe5df; border-radius: 15px; background: #f7faf7; }
  .mobile-capture-card > div > strong { display: block; color: #354139; font-size: 14px; }
  .mobile-capture-card > div > p { margin: 5px 0 0; color: #646864; font-size: 10px; line-height: 1.55; }
  .mobile-capture-picker { width: 100%; min-height: 44px; }
  #mobile-capture-status { margin: 0; }
  .mobile-brief-actions .setting-action { min-height: 44px; width: 100%; }
  #mobile-brief-action-status { margin-bottom: 0; }
  .drop-hero, .review-summary { align-items: stretch; flex-direction: column; }
  .picker-row { justify-content: stretch; }
  .file-picker { width: 100%; }
  .import-grid, .jev-options { grid-template-columns: 1fr; }
  .stats-metrics { grid-template-columns: 1fr 1fr; }
  .stats-grid, .stats-visual-row { grid-template-columns: 1fr; }
  .settings-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .agent-endpoint-card, .agent-prompt-head { align-items: stretch; flex-direction: column; }
  .agent-endpoint-actions { width: 100%; }
  .agent-endpoint-actions .setting-action, .agent-prompt-head .setting-action { flex: 1; }
  .agent-capability-grid { grid-template-columns: 1fr; }
  .mobile-token-card, .mobile-access-actions { align-items: stretch; flex-direction: column; }
  .mobile-trusted-bind input { width: 100%; }
  .mobile-token-card .setting-action, .mobile-access-actions .setting-action { width: 100%; }
  .local-reminder-row, .local-reminder-actions { align-items: stretch; flex-direction: column; }
  .local-reminder-actions input, .local-reminder-actions .setting-action { width: 100%; }
  .review-day-list { --nested-padding: 6px; --nested-radius: 12px; padding: var(--nested-padding); border-radius: calc(var(--nested-radius) + var(--nested-padding)); }
  .review-day-card { align-items: stretch; flex-direction: column; min-height: 72px; padding: 13px; border-radius: var(--nested-radius); }
  .review-draft-heading, .review-draft-session-head { align-items: stretch; flex-direction: column; }
  .review-draft-session-head span { text-align: left; }
  .review-open { display: flex !important; align-items: center; justify-content: center; min-height: 40px; padding: 0 10px; border-radius: 9px; background: #eef3ef; }
  #review-action-status { min-height: 18px; }
  .model-option-grid { grid-template-columns: 1fr; }
  .recommended-model-banner, .model-settings-footer { align-items: stretch; flex-direction: column; }
  .onboarding-plan ul { grid-template-columns: 1fr; }
  .onboarding-actions { flex-direction: column-reverse; }
  .onboarding-actions .setting-action { width: 100%; }
  .search-toolbar { align-items: flex-start; flex-direction: column; }
  .search-structured-filters { width: 100%; justify-content: stretch; }
  .search-date-field, .search-category-field, .search-amount-field { flex: 1 1 100%; justify-content: space-between; }
  .search-date-field input, .search-category-field select, .search-amount-field input { flex: 1; min-width: 0; width: auto; }
  .search-result-head, .search-result-foot { align-items: flex-start; }
  .search-result-foot { flex-wrap: wrap; }
  .setting-row { align-items: flex-start; }
  .day-timeline-section { padding: 13px; }
  .day-axis-line { left: 54px; }
  .day-event-node { width: 68px; }
  .day-event-node span { left: 48px; }
  .day-event-card { margin-left: 0; left: calc(78px + var(--lane) * ((100% - 82px) / var(--lane-count))); width: calc((100% - 82px - (var(--lane-count) - 1) * 5px) / var(--lane-count)); padding: 7px 8px; }
  .day-event-title { font-size: 10px; }
  .day-event-meta em { display: none; }
  .day-time-guide time { width: 38px; font-size: 10px; }
  .day-time-guide span { left: 68px; }
  .day-phase-label { left: 72px; }
  .day-now-marker, .day-task-marker { left: 43px; }
  .multi-day-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-grid, .technical-links, .journal-body { grid-template-columns: 1fr; }
  .journal-metrics { grid-template-columns: repeat(2, 1fr); }
  .quick-days { grid-template-columns: 1fr; }
  .auto-ingest-history { --nested-padding: 6px; padding: var(--nested-padding); border-radius: calc(var(--nested-radius) + var(--nested-padding)); }
  .auto-ingest-history-row { grid-template-columns: 1fr; gap: 4px; border-radius: var(--nested-radius); }
  .auto-ingest-history-row strong { display: -webkit-box; overflow: hidden; white-space: normal; text-overflow: clip; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-wrap: balance; }
  .watch-reception-session { grid-template-columns: 1fr; }
  .watch-formal-transcripts li { grid-template-columns: 1fr; gap: 2px; }
  .selected-files .file-row { align-items: flex-start; }
  .selected-files .file-name { display: -webkit-box; min-width: 0; overflow: hidden; white-space: normal; text-overflow: clip; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-wrap: pretty; }
  .job-title .muted { white-space: normal; text-wrap: pretty; }
}

/* 顶部立即同步按钮与动画 Toast */
.sync-now-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--line-strong, #d7dad4);
  border-radius: var(--radius-control, 10px);
  padding: 0 14px;
  min-height: 44px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink, #1e211f);
  cursor: pointer;
  transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out), box-shadow var(--motion-press) var(--ease-out);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sync-now-button:hover {
  background: #f4f5f0;
  border-color: #cbd0c4;
}

.sync-now-button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.sync-now-button:active {
  transform: scale(0.96);
}

.sync-now-button .sync-icon {
  display: inline-block;
  transition: transform var(--motion-ui) var(--ease-out);
}

.sync-now-button.syncing .sync-icon {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sync-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e2420;
  color: #646864;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
  pointer-events: none;
}

.sync-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.natural-correction-surface {
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 246, 0.94));
  border: 1px solid rgba(46, 125, 50, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.spotlight-card {
  margin-bottom: 22px !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 999px !important;
  padding: 5px 8px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02), 0 8px 24px rgba(0, 0, 0, 0.03) !important;
  transition: box-shadow var(--motion-ui) var(--ease-out), border-color var(--motion-ui) var(--ease-out);
}
.spotlight-card:focus-within {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12), 0 8px 24px rgba(0, 0, 0, 0.04) !important;
}
.spotlight-row {
  margin-top: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.spotlight-icon {
  font-size: 15px;
  color: var(--accent);
  padding-left: 12px;
}
.spotlight-input {
  border: none !important;
  background: transparent !important;
  padding: 8px 6px !important;
  font-size: 13.5px !important;
  box-shadow: none !important;
  outline: none !important;
  flex: 1;
}
.spotlight-mic-btn {
  border-radius: 50% !important;
  width: 32px;
  height: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  font-size: 13px;
  padding: 0;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.06);
}
.spotlight-btn {
  border-radius: 999px !important;
  padding: 0 16px !important;
  min-height: 32px !important;
  font-size: 12px !important;
  box-shadow: none !important;
}

.correction-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.correction-text-input {
  flex: 1;
  padding: 11px 16px;
  border: 1.5px solid #d0d7de;
  border-radius: var(--radius-control, 10px);
  font-size: 14px;
  background: #ffffff;
  color: #1f2328;
  outline: none;
  transition: border-color var(--motion-ui) var(--ease-out), box-shadow var(--motion-ui) var(--ease-out);
}

.correction-text-input:focus {
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.mic-toggle-btn {
  background: #f6f8fa;
  border: 1.5px solid #d0d7de;
  border-radius: var(--radius-control, 10px);
  padding: 9px 12px;
  font-size: 16px;
  cursor: pointer;
  transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out);
}

.mic-toggle-btn:hover {
  background: #eef2f6;
  border-color: #2e7d32;
}

.mic-toggle-btn.recording {
  background: #ffebe9;
  border-color: #cf222e;
  animation: pulse-mic 1.2s infinite;
}

@keyframes pulse-mic {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(207, 34, 46, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(207, 34, 46, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(207, 34, 46, 0); }
}

.natural-correction-feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.natural-correction-feedback.success {
  background: #dafbe1;
  color: #1a7f37;
  border: 1px solid rgba(26, 127, 55, 0.25);
}

.natural-correction-feedback.error {
  background: #ffebe9;
  color: #cf222e;
  border: 1px solid rgba(207, 34, 46, 0.25);
}

.natural-correction-feedback.checking {
  background: #f6f8fa;
  color: #57606a;
  border: 1px solid #d0d7de;
}

/* ========================================================
   Pinned Memos, Nutrition & Fitness Ledgers, DeepSeek Session
   ======================================================== */

.pinned-memos-section {
  margin: 14px 0 16px;
  padding: 12px 14px;
  border: 1px solid #e2d9c2;
  border-left: 4px solid #d49a3d;
  border-radius: 12px;
  background: #fdfbf7;
}
.pinned-memos-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pinned-memos-head span {
  font-weight: 750;
  font-size: 13px;
  color: #8c5b10;
}
.pinned-memos-head small {
  color: #83735a;
  font-size: 11px;
}
.pinned-memos-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pinned-memo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.95);
  border: 1px solid #eee5d3;
  gap: 8px;
}
.pinned-memo-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.pinned-memo-clock {
  font-size: 11px;
  font-weight: 700;
  color: #8c5b10;
  background: #faedd7;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.pinned-memo-text {
  font-size: 13px;
  color: #2c332d;
  font-weight: 550;
  word-break: break-word;
}
.pinned-memo-copy-btn {
  background: transparent;
  border: 1px solid #d6c6a5;
  color: #8c5b10;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.pinned-memo-copy-btn:hover {
  background: #faedd7;
}

.health-ledgers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
@media (max-width: 768px) {
  .health-ledgers-grid {
    grid-template-columns: 1fr;
  }
}
.journal-nutrition-card, .journal-fitness-card {
  padding: 14px 16px;
  border: 1px solid #dde3dc;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.journal-nutrition-card {
  border-top: 3px solid #38a169;
}
.journal-fitness-card {
  border-top: 3px solid #3182ce;
}
.ledger-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ledger-card-head h4 {
  font-size: 15px;
  margin: 2px 0 0;
  color: #2d3748;
}
.ledger-card-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.journal-nutrition-card .ledger-card-badge {
  background: #f0fff4;
  color: #276749;
  border: 1px solid #c6f6d5;
}
.journal-fitness-card .ledger-card-badge {
  background: #ebf8ff;
  color: #2b6cb0;
  border: 1px solid #bee3f8;
}
.macros-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  background: #f7faf7;
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid #eef2ed;
}
@media (max-width: 480px) {
  .macros-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 4px;
  }
}
.macro-stat {
  text-align: center;
}
.macro-stat span {
  display: block;
  font-size: 10px;
  color: #68768c;
}
.macro-stat strong {
  font-size: 13px;
  color: #276749;
}
.meals-list, .workout-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meal-item-row, .workout-item-row {
  padding: 9px 11px;
  border-radius: 8px;
  background: #f8faf8;
  border: 1px solid #edf2ed;
  font-size: 12px;
}
.meal-item-title, .workout-item-title {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 3px;
}
.meal-item-notes, .workout-item-notes {
  color: #68768c;
  font-size: 11px;
  line-height: 1.45;
}
.muscle-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ebf8ff;
  color: #2b6cb0;
  font-size: 11px;
  font-weight: 700;
  margin-right: 6px;
}
.feeling-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #feebc8;
  color: #c05621;
  font-size: 11px;
  font-weight: 600;
}

.journal-deepseek-synthesis {
  margin: 16px 0;
  padding: 16px 18px;
  border: 1px solid #cbd5e0;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f7f9fc 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.deepseek-synthesis-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.deepseek-synthesis-head h4 {
  font-size: 17px;
  color: #1a365d;
  margin: 2px 0 4px;
}
.deepseek-summary-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  line-height: 1.65;
  color: #2d3748;
  margin-bottom: 12px;
}
.deepseek-insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 640px) {
  .deepseek-insights-grid {
    grid-template-columns: 1fr;
  }
}
.insight-subcard {
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #edf2f7;
  font-size: 12px;
}
.insight-subcard strong {
  display: block;
  color: #2b6cb0;
  margin-bottom: 4px;
}
.insight-subcard p {
  margin: 0;
  color: #4a5568;
  line-height: 1.55;
}
.deepseek-chat-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e0;
}
.deepseek-chat-input-row {
  display: flex;
  gap: 8px;
}
.deepseek-chat-input-row input {
  flex: 1;
}
.deepseek-chat-answer {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f0f7ff;
  border: 1px solid #bee3f8;
  font-size: 13px;
  line-height: 1.65;
  color: #2c5282;
  white-space: pre-wrap;
}

/* Multi-Domain Ledgers Grid & Cards */
.multi-ledgers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
@media (max-width: 860px) {
  .multi-ledgers-grid {
    grid-template-columns: 1fr;
  }
}

.journal-smoking-card, .journal-expense-card, .journal-work-card {
  padding: 14px 16px;
  border: 1px solid #dde3dc;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.journal-smoking-card {
  border-top: 3px solid #dd6b20;
}
.journal-expense-card {
  border-top: 3px solid #d69e2e;
}
.journal-work-card {
  border-top: 3px solid #805ad5;
}

.journal-smoking-card .ledger-card-badge {
  background: #fffaf0;
  color: #c05621;
  border: 1px solid #fbd38d;
}
.journal-expense-card .ledger-card-badge {
  background: #fefcbf;
  color: #744210;
  border: 1px solid #faf089;
}
.journal-work-card .ledger-card-badge {
  background: #faf5ff;
  color: #553c9a;
  border: 1px solid #e9d8fd;
}

.smoking-conflict-banner {
  padding: 8px 12px;
  background: #fffaf0;
  border: 1px solid #feebc8;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 11.5px;
  color: #9c4221;
  line-height: 1.5;
}
.smoking-conflict-banner strong {
  display: block;
  margin-bottom: 2px;
  color: #c05621;
}

.expense-breakdown-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.expense-category-pill {
  padding: 3px 8px;
  background: #f7fafc;
  border: 1px solid #edf2f7;
  border-radius: 6px;
  font-size: 11px;
  color: #4a5568;
}
.expense-category-pill strong {
  color: #2b6cb0;
  margin-left: 2px;
}

.expense-amount-badge {
  font-weight: 700;
  color: #9f691b;
  font-size: 13px;
}
.expense-payment-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #edf2f7;
  color: #4a5568;
  font-size: 10.5px;
  margin-left: 6px;
}

.work-bullet-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  font-size: 12px;
  margin-bottom: 6px;
  line-height: 1.5;
}
.work-bullet-item strong {
  display: inline-block;
  color: #44337a;
  margin-right: 4px;
}

.deepseek-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.quick-prompts-label {
  font-size: 11px;
  color: #68768c;
  font-weight: 600;
}
.quick-prompt-pill {
  padding: 4px 10px;
  background: #ffffff;
  border: 1px solid #cbd5e0;
  border-radius: 999px;
  font-size: 11.5px;
  color: #2b6cb0;
  cursor: pointer;
  transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out);
}
.quick-prompt-pill:hover {
  background: #ebf8ff;
  border-color: #bee3f8;
  color: #2c5282;
}

.keyboard-shortcut-hint {
  font-size: 10.5px;
  color: #617792;
  margin-left: 6px;
}
.keyboard-shortcut-hint kbd {
  display: inline-block;
  padding: 1px 4px;
  font-size: 10px;
  font-family: inherit;
  background: #edf2f7;
  border: 1px solid #cbd5e0;
  border-radius: 3px;
  color: #4a5568;
}

.deepseek-chat-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  margin-top: 12px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.chat-bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble.user-bubble {
  align-self: flex-end;
  background: #3182ce;
  color: #646864;
  border-bottom-right-radius: 2px;
}
.chat-bubble.assistant-bubble {
  align-self: flex-start;
  background: #ffffff;
  color: #2d3748;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.chat-bubble.typing {
  color: #68768c;
  font-style: italic;
}

/* ==========================================================================
   长列表渲染性能：对内容较长的列表容器开启 content-visibility: auto，
   视口外的列表内容跳过布局与绘制；contain-intrinsic-size 用 auto 关键字
   记住上次真实尺寸、首屏前用 --list-intrinsic-size 兜底，避免滚动条跳动。
   只加在容器上，不改内部结构、不改 JS、不引入依赖。
   两者都属较新特性，统一包进 @supports：不支持的内核整块跳过，
   列表照常全量渲染，不会出现空白占位或高度塌陷。
   ========================================================================== */
@supports (content-visibility: auto) {
  .search-results,
  .search-day-body,
  .pattern-observation-list,
  .pattern-alert-list,
  .review-day-list,
  .workspace-lane-body,
  .life-ledger-list,
  .pinned-memos-list,
  .auto-ingest-history,
  .local-reminders-list,
  .doctor-jobs,
  .meals-list,
  .workout-list,
  .deepseek-chat-stream,
  .selected-files {
    content-visibility: auto;
    /* 先给纯长度兜底（支持面更广），再升级为 auto <length>：让浏览器记住真实尺寸 */
    contain-intrinsic-size: var(--list-intrinsic-size);
    contain-intrinsic-size: auto var(--list-intrinsic-size);
  }
}

/* ==========================================================================
   旧内核降级：backdrop-filter（毛玻璃）只有较新内核支持。
   这些元素本身是半透明底色，缺了模糊时下层内容会直接透出来，
   面板上的次要文字对比度可能掉到 4.5:1 以下 —— 给不支持的内核换成不透明底色，
   颜色复用文件内既有的 #f6f5f0 / #f2f1ec / #fafaf7 / #fffaf7，不新造色值。
   条件里把 -webkit- 前缀一起判断（用 or），
   这样「只认前缀」的旧 Safari 会走前缀分支保住模糊，而不是被误判成不支持。
   ========================================================================== */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar { background: #f6f5f0; }
  .topbar { background: #f2f1ec; }
  .inline-viewer-bar,
  .mobile-bottom-nav { background: #fafaf7; }
  .diagnostic-error-panel { background: #fffaf7; }
}

/* ==========================================================================
   打印样式：只输出当前视图正文，去掉侧边栏 / 顶栏 / 按钮等交互外壳
   ========================================================================== */
@media print {
  @page { margin: 12mm; }

  /* 白底黑字，正文占满可打印宽度（解除 232px 侧栏偏移与 1120px 限宽） */
  :root { background: #fff; }
  body { min-height: 0; padding-bottom: 0; background: #fff; color: #000; }
  .app-shell { display: block; min-height: 0; }
  .workspace { grid-column: auto; width: 100%; max-width: none; margin: 0; padding: 0; }

  /* 非内容元素：侧边栏、顶栏、移动端导航、浮层 */
  .sidebar,
  .topbar,
  .mobile-bottom-nav,
  .mobile-sub-nav,
  .onboarding-overlay,
  .access-token-overlay,
  .diagnostic-error-panel { display: none !important; }

  /* 交互控件与操作区：按钮、输入、工具栏、状态条 */
  button,
  input,
  select,
  textarea,
  .file-picker,
  .picker-row,
  .global-search-form,
  .stats-toolbar,
  .search-toolbar,
  .search-structured-filters,
  .search-results-toolbar-actions,
  .deepseek-chat-input-row,
  .deepseek-quick-prompts,
  .journal-title-actions,
  .current-title-actions,
  .auto-ingest-actions,
  .data-health-actions,
  .agent-endpoint-actions,
  .doctor-actions,
  .mobile-access-actions,
  .mobile-brief-actions,
  .system-status-link,
  .model-settings-footer,
  .inline-viewer-bar { display: none !important; }

  /* 内联查看器：把全屏固定层还原为普通文档流，正文随页宽 */
  body.inline-viewer-open { overflow: visible; }
  body.inline-viewer-open .app-shell { display: none; }
  .inline-viewer-workspace { position: static; inset: auto; z-index: auto; background: #fff; }
  .inline-viewer-frame { display: block; width: 100%; height: auto; min-height: 0; }

  /* 内容卡片：去阴影圆角，避免小卡片跨页断裂 */
  .surface,
  .hero-surface,
  .search-result-card,
  .search-day-card,
  .day-event-card,
  .stats-metrics article,
  .stats-chart-card,
  .stats-ratio-card,
  .pattern-card,
  .journal-nutrition-card,
  .journal-fitness-card,
  .journal-smoking-card,
  .journal-expense-card,
  .journal-work-card,
  .insight-subcard,
  .workspace-event-card,
  .chat-bubble {
    background: #fff;
    border-color: var(--line);
    border-radius: 0;
    box-shadow: none !important;
  }
  .search-result-card,
  .search-day-card,
  .day-event-card,
  .stats-metrics article,
  .pattern-card,
  .insight-subcard,
  .workspace-event-card,
  .chat-bubble { break-inside: avoid; }
  h1, h2, h3, h4, h5, .section-title { break-after: avoid; }

  /* 打印对比度：把浅灰次要文字加深到可读 */
  .hint, small, time, .section-kicker, .view-intro p, .search-summary { color: #3a3f3b; }

  /* 打印展开链接地址：在链接文字后附上真实 URL，纸面也能追溯来源。
     排除页内锚点(#)、脚本链接(javascript:)和 data: 占位，它们在纸上没有意义。
     颜色沿用上面的打印次要文字色 #3a3f3b，保证白底对比度仍 ≥ 4.5:1。 */
  a[href]:not([href^="#"]):not([href^="javascript:"]):not([href^="data:"])::after {
    content: " (" attr(href) ")";
    color: #3a3f3b;
    font-size: 90%;
    word-break: break-all;
  }
}

} /* @layer components 结束 */

   utilities：单类通用助手。
   本层排在最后，所以这里的普通声明天然覆盖 components，不必再写 !important；
   反过来，带 !important 的组件声明（如移动端导航断点内的 display: grid）仍优先于本层
   —— !important 的层序是反的，靠前的层胜出，因此分层前后行为一致。
   ========================================================================== */
@layer utilities {

/* 仅供读屏的隐藏文本：整条规则都是 !important，归入本层不会与组件样式互相影响 */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* 桌面端隐藏移动端导航容器；移动端断点内用 !important 重新显示（见 components 层） */
.mobile-bottom-nav, .mobile-sub-nav { display: none !important; }

} /* @layer utilities 结束 */

/* 强制桌面端彻底隐藏移动端子导航与底部栏（严防重复显示） */
@media (min-width: 621px) {
  .mobile-sub-nav,
  .mobile-bottom-nav,
  .mobile-hub-nav {
    display: none !important;
  }
}

/* ===== Codex 响应式（ui-opt 2/10，从 ll-ui-work 摘出；设计令牌已还原为具体像素）===== */
@media (max-width: 819px) {
  .workspace { min-width: 0; max-width: 100%; padding-inline: 16px; overflow-wrap: anywhere; }
  .workspace :is(input, select, textarea, audio, img, video, svg) { min-width: 0; max-width: 100%; }
  .workspace :is(.surface, .view-panel, .settings-page, .journal-dashboard) { min-width: 0; }
  :is(.topbar, .section-title, .setting-row, .journal-day-header, .daily-workspace-head,
      .day-timeline-heading, .pipeline-state-head, .deepseek-synthesis-head) > div { min-width: 0; }
  :is(.topbar-actions, .section-title, .setting-title-line, .system-status-head,
      .system-status-foot, .journal-day-header, .daily-workspace-head, .day-timeline-heading,
      .stats-section-head, .auto-ingest-history-head, .model-stage-heading,
      .deepseek-model-line, .deepseek-synthesis-head, .ledger-card-head,
      .day-event-meta, .day-axis-summary .day-axis-recording-summary) { flex-wrap: wrap; }
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .topbar-actions { max-width: 100%; }
  .setting-row { gap: 14px; }
  .setting-row > div { flex: 1; }
  :is(.import-grid, .jev-options, .setting-field-grid, .model-option-grid,
      .stats-grid, .stats-visual-row, .journal-body, .workspace-board, .life-ledger,
      .agent-capability-grid, .doctor-checks, .result-grid, .technical-links) {
    grid-template-columns: minmax(0, 1fr);
  }
  :is(.import-grid, .jev-options, .setting-field-grid, .model-option-grid,
      .stats-metrics, .journal-metrics, .multi-day-grid, .auto-ingest-options,
      .auto-ingest-summary, .details, .macros-strip) > * { min-width: 0; }
  :is(.stats-metrics, .journal-metrics, .workspace-snapshot, .multi-day-grid,
      .auto-ingest-summary, .macros-strip) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .details { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
  :is(.agent-endpoint-card, .agent-prompt-head, .mobile-token-card,
      .mobile-access-actions, .recommended-model-banner, .model-settings-footer,
      .local-reminder-row, .drop-hero, .review-summary) { align-items: stretch; flex-direction: column; }
  :is(.agent-endpoint-actions, .local-reminder-actions, .correction-input-row,
      .deepseek-chat-input-row, .pinned-memo-item, .pinned-memo-content,
      .day-task-banner, .day-task-banner-left, .pipeline-state-head) { flex-wrap: wrap; }
  :is(.correction-text-input, .deepseek-chat-input-row input) { min-width: 0; }
  .stats-range-fields { min-width: 0; max-width: 100%; }
  .stats-range-fields label { min-width: 0; flex: 1 1 140px; }
  .stats-range-fields input { width: 100%; }
  .workspace-lane { min-height: 0; }
  .recent-days { flex-wrap: wrap; overflow-x: visible; }
  .stats-trend-chart { flex-wrap: wrap; height: auto; min-height: 140px; overflow-x: visible; }
  .trend-bar-col { flex: 1 1 32px; height: 140px; }
  .stats-hourly-chart { grid-template-columns: repeat(24, minmax(0, 1fr)); }
  :is(.auto-ingest-history-row, .watch-reception-session, .doctor-job-row,
      .watch-formal-transcripts li, .journal-transcript-row) { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  :is(.auto-ingest-history-row strong, .doctor-job-row code, .current-live-status,
      .journal-freshness, .day-task-completed-pill, .local-reminder-actions .setting-action) {
    white-space: normal; overflow-wrap: anywhere;
  }
  .logs { overflow-wrap: anywhere; }

  /* Inline heights and lane coordinates come from the desktop timeline renderer. */
  .day-axis-summary { margin-left: 0; }
  .day-axis-canvas { display: flex; flex-direction: column; gap: 10px; height: auto !important; min-height: 0; }
  :is(.day-axis-line, .day-time-guide, .day-phase-label, .day-event-node) { display: none; }
  .day-event-anchor { position: static; height: auto; transform: none; }
  .day-event-card { position: static; width: 100%; margin: 0; padding: 12px; }
  .day-event-card::before { display: none; }
  .day-event-title { display: block; overflow: visible; font-size: 13px; }
  .day-event-meta strong { flex-shrink: 1; }
  .day-event-meta em { display: block; white-space: normal; }
  /* Keep genuine coverage gaps in a separate compact rail above the event list. */
  .day-recording-layer { position: relative; height: 160px; margin: 8px 0; }
  .day-recording-layer::before {
    content: attr(aria-label); display: block; padding-left: 30px;
    color: #237543; font-size: 11px; line-height: 1.6;
  }
  .day-recording-interval { left: 12px; }
  :is(.day-now-marker, .day-task-marker) { position: static; max-width: 100%; padding-top: 6px; }
  :is(.day-now-marker, .day-task-marker)::before { display: none; }
  .day-now-marker span, .day-task-badge { position: static; display: inline-flex; flex-wrap: wrap; max-width: 100%; }
  .sync-toast { max-width: calc(100vw - 32px); overflow-wrap: anywhere; }
}

@media (max-width: 429px) {
  .workspace { padding-inline: 12px; }
  .surface { padding: 14px; }
  :is(.system-status-items, .stats-metrics, .journal-metrics, .workspace-snapshot,
      .multi-day-grid, .auto-ingest-summary, .auto-ingest-options, .macros-strip,
      .secret-input-row, .deepseek-input-row, .pipeline-steps) { grid-template-columns: minmax(0, 1fr); }
  .pipeline-steps { grid-auto-flow: row; grid-auto-columns: auto; }
  .system-status-items em { white-space: normal; overflow-wrap: anywhere; }
  :is(.correction-input-row, .deepseek-chat-input-row, .local-reminder-actions,
      .search-result-head, .pattern-card-head, .journal-transcript-head) { align-items: stretch; flex-direction: column; }
  :is(.correction-input-row, .deepseek-chat-input-row, .local-reminder-actions) > :is(input, button) { width: 100%; }
  .search-input-wrap { grid-template-columns: 24px minmax(0, 1fr); gap: 6px; }
  .search-submit { grid-column: 1 / -1; }
  .mobile-sub-nav { flex-wrap: wrap; }
  .mobile-sub-tab { min-width: 0; flex-basis: 40%; }
  .pipeline-step:not(:last-child)::after { display: none; }
  .inline-viewer-bar { flex-basis: auto; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px; }
  .inline-viewer-bar > div { grid-column: 1 / -1; grid-row: 1; }
  .sync-toast { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* 【2026-10-14 修 · 2026-10-15 恢复】日期轴统一为一条连续条所用的样式。
   合并 UI 优化线时被覆盖，本次从 merge-backup-2026-10-15 恢复。 */
.days-strip { display: flex; gap: 7px; align-items: stretch; overflow-x: auto; padding-bottom: 3px; }
.day-chip-badge { padding: 1px 5px; border-radius: 999px; background: #e6ece6; color: #426d4a; font-size: 10px; font-style: normal; font-weight: 750; letter-spacing: .02em; }
.day-chip.active .day-chip-badge { background: rgba(255,255,255,.22); color: #fff; }
.day-chip-today { background: #eef2ee; }

/* 【2026-10-14 修 · 2026-10-15 恢复】当日事件轴：接入反重力设计的瀑布图（web/daily-timeline-live.html）。
 原来是 app.js 内联渲染，现改为同源 iframe；高度由 fitDayTimelineFrame() 动态覆盖，
 这里的 1440px 只是内容加载前的兜底值。
 ⚠️ 此修复曾在 2026-10-15 合并 UI 优化线时被覆盖，本次从备份恢复。 */
.day-timeline-frame { display: block; width: 100%; min-width: 0; height: 1440px; border: 0; border-radius: 10px; background: transparent; }
@media (max-width: 620px) { .day-timeline-frame { height: 1800px; } }

/* 【2026-10-14 修 · 2026-10-15 恢复】生理状态格：窄屏时跨两列，
   与相邻指标分开呈现（备份行为）。 */
@media (max-width: 620px) { .journal-metric-health { grid-column: span 2; } }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, label.file-picker:has(input:focus-visible) { outline: 2px solid rgba(83,106,93,.42); outline-offset: 2px; }
=======

/* ==== 待人工审核（pending_sources）===================================== */
.pending-review { margin-top: 14px; padding: 16px 16px 12px; border: 1px solid #e4e0d6; border-radius: 16px; background: rgba(255,253,247,.94); }
.pending-review-head h4 { margin: 3px 0 0; font-size: 13px; }
.pending-review-head p { margin: 6px 0 0; color: #646864; font-size: 10px; line-height: 1.6; }
.pending-review-body { display: grid; gap: 9px; margin-top: 12px; }
.pending-review-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pending-review-chips span { padding: 3px 9px; border: 1px solid #e5e2d9; border-radius: 999px; background: #fbfaf6; color: #646864; font-size: 10px; font-weight: 750; }
.pending-review-chips span.is-actionable { border-color: #e3cfa5; background: #fdf6e6; color: #8a5f16; }
.pending-review-chips span.is-noise { border-color: #d9dee4; background: #f4f7fa; color: #5f6b78; }
.pending-review-chips span.is-dump { border-color: #e6e6e3; background: #f6f6f4; color: #646864; font-weight: 650; }
.pending-review-group { min-width: 0; padding: 12px; border: 1px solid #e7e5dd; border-radius: 13px; background: #fffefb; }
.pending-review-group.is-actionable { border-top: 3px solid #c79a3f; }
.pending-review-group.is-noise, .pending-review-group.is-unknown { border-top: 3px solid #b6bfc9; }
.pending-review-group.is-dump { border-top: 3px solid #dcdcd6; background: #fafaf8; }
.pending-review-group-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.pending-review-group-head span { display: block; color: #646864; font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.pending-review-group-head strong { display: block; margin-top: 3px; color: #4b514b; font: 650 14px/1.1 Georgia, "Songti SC", serif; }
.pending-review-group-head small { max-width: 58%; color: #646864; font-size: 10px; line-height: 1.55; text-align: right; }
.pending-review-items { display: grid; gap: 8px; margin-top: 10px; }
.pending-review-dump-note, .pending-review-more, .pending-review-foot { margin: 9px 0 0; color: #646864; font-size: 10px; line-height: 1.6; }
.pending-review-dump-note code { padding: 1px 4px; border-radius: 4px; background: #f1f0ec; font-size: 10px; }
.pending-review-item { min-width: 0; padding: 11px 12px; border: 1px solid #e9e6de; border-radius: 11px; background: #fffefa; }
.pending-review-item.is-actionable { border-color: #ecdcc0; background: #fffdf7; box-shadow: inset 3px 0 0 #d8ab52; }
.pending-review-item.is-noise { background: #fdfefe; }
.pending-review-item-meta { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pending-review-item-meta time { flex: 0 0 auto; color: #646864; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.pending-review-item-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 6px; border-radius: 999px; background: #eef2ed; color: #627068; font-size: 10px; font-weight: 750; }
.pending-review-item-meta strong { margin-left: auto; color: #6d604e; font-size: 10px; font-weight: 750; }
.pending-review-quote { margin: 8px 0 0; color: #3a403b; font-size: 11px; font-weight: 650; line-height: 1.65; }
.pending-review-reason { margin: 5px 0 0; color: #646864; font-size: 8.5px; line-height: 1.6; }
.pending-review-buttons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.pending-review-buttons button { min-height: 28px; padding: 0 10px; border: 1px solid #e2e5e0; border-radius: 8px; background: #fff; color: #646864; font-size: 10px; font-weight: 750; }
.pending-review-buttons button:hover { border-color: #aebbb1; color: #4f5f54; }
.pending-review-skeleton, .pending-review-alert { padding: 12px; border: 1px dashed #e2ded4; border-radius: 10px; color: #646864; font-size: 10px; line-height: 1.6; text-align: center; }
.pending-review-alert { border-style: solid; border-color: #ead8b8; background: #fffaf0; color: #8a6a2c; text-align: left; }
@media (max-width: 620px) { .pending-review-group-head { align-items: flex-start; flex-direction: column; } .pending-review-group-head small { max-width: none; text-align: left; } }

/* 【2026-10-14】当日事件轴：接入反重力设计的瀑布图（web/daily-timeline-live.html）。
 原来是 app.js 内联渲染，现改为同源 iframe；高度由 fitDayTimelineFrame() 动态覆盖，
 这里的 1440px 只是内容加载前的兜底值。 */
.day-timeline-frame { display: block; width: 100%; min-width: 0; height: 1440px; border: 0; border-radius: 10px; background: transparent; }
@media (max-width: 620px) { .day-timeline-frame { height: 1800px; } }

/* ==========================================================================
   全天生活仪表盘 (Daily Life Dashboard) 视觉层级与紧凑排版
   ========================================================================== */
.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-card, 14px);
  gap: 12px;
}
.dashboard-date-picker-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dashboard-date-picker-wrap label {
  font-weight: 650;
  font-size: 12.5px;
  color: var(--ink-secondary, #4a504c);
}
.dashboard-date-picker-wrap input[type="date"] {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong, #d7dad4);
  border-radius: var(--radius-control, 10px);
  font-size: 12.5px;
}
.dashboard-card {
  padding: 13px 15px;
  margin-bottom: 12px;
  border-radius: var(--radius-card, 14px);
}
.dashboard-card .section-title {
  margin-bottom: 10px;
}
.dashboard-card .section-title h3 {
  margin: 0;
  font-size: 14.5px;
  letter-spacing: -0.015em;
  font-weight: 700;
}
.dashboard-ai-content {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 12px;
  color: var(--ink, #1e211f);
  background: var(--panel-soft, #f7f7f2);
  padding: 10px 12px;
  border-radius: var(--radius-control, 10px);
  border: 1px solid rgba(65, 72, 66, 0.08);
}
.dashboard-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.health-card {
  padding: 9px 11px;
  border-radius: var(--radius-control, 10px);
  min-width: 0;
}
.health-card-hr {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.18);
}
.health-card-steps {
  background: rgba(59, 130, 246, 0.07);
  border: 1px solid rgba(59, 130, 246, 0.18);
}
.health-card-sleep {
  background: rgba(147, 51, 234, 0.07);
  border: 1px solid rgba(147, 51, 234, 0.18);
}
.health-card-stress {
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.18);
}
.health-card-label {
  font-size: 11px;
  font-weight: 700;
}
.health-card-hr .health-card-label { color: #dc2626; }
.health-card-steps .health-card-label { color: #2563eb; }
.health-card-sleep .health-card-label { color: #9333ea; }
.health-card-stress .health-card-label { color: #b06105; }
.health-card-val {
  font-size: 18px;
  font-weight: 700;
  margin-top: 3px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.health-card-sub {
  font-size: 10px;
  color: var(--muted, #58605a);
  margin-top: 2px;
}
.dashboard-split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.dashboard-scene-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dashboard-scene-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dashboard-scene-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
}
.dashboard-scene-header span:first-child {
  font-weight: 600;
  color: var(--ink, #1e211f);
}
.dashboard-scene-header span:last-child {
  font-weight: 700;
  color: var(--ink-secondary, #4a504c);
  font-variant-numeric: tabular-nums;
}
.dashboard-scene-track {
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  overflow: hidden;
}
.dashboard-scene-fill {
  height: 100%;
  border-radius: 999px;
}
.dashboard-social-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dashboard-social-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-secondary, #4a504c);
  font-weight: 600;
}
.dashboard-social-track {
  height: 9px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}
#dashboard-self-bar {
  height: 100%;
  background: linear-gradient(90deg, #4b7b7c, #536a5d);
  border-radius: 999px 0 0 999px;
}
#dashboard-others-bar {
  height: 100%;
  background: linear-gradient(90deg, #78827c, #8a8f8b);
  border-radius: 0 999px 999px 0;
}
.dashboard-social-empty {
  font-size: 11px;
  color: var(--muted, #58605a);
}
.dashboard-social-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.dashboard-laughter-label {
  font-size: 11px;
  color: var(--muted, #58605a);
}
.dashboard-laughter-val {
  font-size: 16px;
  font-weight: 700;
  color: #a26807;
  margin-top: 2px;
}
.dashboard-captures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}
.dashboard-capture-card {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}
.dashboard-capture-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  margin-bottom: 3px;
  gap: 6px;
}
.dashboard-capture-type {
  font-weight: 700;
}
.dashboard-capture-time {
  color: var(--muted, #58605a);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}
.dashboard-capture-body {
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.45;
  color: var(--ink, #1e211f);
  overflow-wrap: break-word;
  word-break: break-word;
}
.dashboard-captures-loading {
  color: var(--muted, #58605a);
  font-size: 11.5px;
  padding: 8px;
}

/* ==========================================================================
   移动端屏幕 (<= 620px) 响应式规则：确保事件卡片绝不横向溢出
   ========================================================================== */
@media (max-width: 620px) {
  .dashboard-toolbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
  }
  .dashboard-date-picker-wrap {
    width: 100%;
    justify-content: space-between;
  }
  .dashboard-date-picker-wrap input[type="date"] {
    flex: 1;
    min-width: 0;
  }
  .dashboard-health-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .dashboard-split-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .dashboard-captures-grid {
    grid-template-columns: 1fr !important;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }
  .dashboard-capture-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .workspace-board,
  .life-ledger {
    grid-template-columns: 1fr !important;
    width: 100%;
    min-width: 0;
  }
  .workspace-lane,
  .life-ledger > section {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .workspace-event-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }
  .day-timeline-section {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  .day-timeline-frame {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .journal-metric-health {
    grid-column: span 2;
  }
}

/* ==========================================================================
   第二大脑生活记忆问答 (Personal Memory Q&A) 设计系统
   ========================================================================== */
.memory-qa-surface {
  padding: 18px 20px;
  border-radius: var(--radius-card, 14px);
  margin-bottom: 16px;
}
.memory-qa-prompts-wrap {
  margin-bottom: 14px;
}
.memory-qa-prompts-label {
  display: block;
  font-size: 11.5px;
  color: var(--muted, #58605a);
  font-weight: 650;
  margin-bottom: 8px;
}
.memory-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quick-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--motion-press) var(--ease-out), background-color var(--motion-press) var(--ease-out), border-color var(--motion-press) var(--ease-out), color var(--motion-press) var(--ease-out);
}
.quick-chip.chip-blue {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: #2563eb;
}
.quick-chip.chip-blue:hover {
  background: rgba(59, 130, 246, 0.16);
}
.quick-chip.chip-green {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #04855d;
}
.quick-chip.chip-green:hover {
  background: rgba(16, 185, 129, 0.16);
}
.quick-chip.chip-amber {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #b06105;
}
.quick-chip.chip-amber:hover {
  background: rgba(245, 158, 11, 0.16);
}
.quick-chip.chip-purple {
  background: rgba(147, 51, 234, 0.08);
  border: 1px solid rgba(147, 51, 234, 0.22);
  color: #9333ea;
}
.quick-chip.chip-purple:hover {
  background: rgba(147, 51, 234, 0.16);
}
.memory-qa-form {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.memory-qa-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-control, 10px);
  font-size: 13px;
  min-width: 0;
}
.memory-qa-submit {
  padding: 10px 20px;
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
}
.memory-qa-result-area {
  margin-top: 14px;
}
.memory-qa-placeholder {
  color: var(--muted, #58605a);
  font-size: 13px;
  text-align: center;
  padding: 34px 16px;
  background: var(--panel-soft, #f7f7f2);
  border-radius: var(--radius-control, 10px);
  border: 1px dashed rgba(65, 72, 66, 0.12);
}
.memory-qa-loading {
  padding: 24px;
  text-align: center;
  color: var(--ink-secondary, #4a504c);
  background: var(--panel-soft, #f7f7f2);
  border-radius: var(--radius-control, 10px);
}
.memory-qa-loading-icon {
  font-size: 20px;
  display: inline-block;
  animation: pulse-spin 1.4s infinite ease-in-out;
  color: var(--accent, #536a5d);
}
.memory-qa-loading-text {
  margin-top: 8px;
  font-weight: 600;
  font-size: 12.5px;
}
.memory-qa-card {
  background: rgba(83, 106, 93, 0.05);
  border: 1px solid rgba(83, 106, 93, 0.18);
  border-radius: var(--radius-card, 14px);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(35, 40, 36, 0.04);
}
.memory-qa-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.memory-qa-question {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--accent-ink, #34463a);
}
.memory-qa-confidence {
  font-variant-numeric: tabular-nums;
  background: rgba(37, 164, 94, 0.12);
  color: #1e7040;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
}
.memory-qa-answer {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink, #1e211f);
  white-space: pre-wrap;
  margin-bottom: 14px;
}
.memory-qa-citations {
  border-top: 1px dashed rgba(65, 72, 66, 0.14);
  padding-top: 12px;
  margin-top: 12px;
}
.memory-qa-citations-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #58605a);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.memory-qa-citations-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.memory-citation-item {
  font-size: 11.5px;
  color: var(--ink-secondary, #4a504c);
  background: rgba(255, 255, 255, 0.7);
  padding: 8px 12px;
  border-radius: var(--radius-control, 8px);
  border: 1px solid rgba(65, 72, 66, 0.06);
  line-height: 1.5;
}
.memory-citation-head {
  font-weight: 700;
  color: var(--ink, #1e211f);
  margin-right: 4px;
}
.memory-citation-snippet {
  color: var(--ink-secondary, #4a504c);
}
.memory-qa-error {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-control, 10px);
  padding: 14px 16px;
  font-size: 12.5px;
  font-weight: 600;
}

/* 豆包网格响应式 */
.doubao-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 620px) {
  .doubao-field-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@keyframes pulse-spin {
  0% { transform: scale(0.9) rotate(0deg); opacity: 0.7; }
  50% { transform: scale(1.15) rotate(180deg); opacity: 1; }
  100% { transform: scale(0.9) rotate(360deg); opacity: 0.7; }
}

/* ===== 2026-10-15 从 UI 优化线补回（合并时优先备份策略丢失） ===== */
/* 锚点/焦点跳转补偿：sticky .topbar 会遮住目标顶部，为其预留高度，避免标题被盖住 */
#main-content,
.surface,
.system-status-panel {
  scroll-margin-top: var(--anchor-scroll-offset);
}
/* :has() 是较新选择器。它一旦出现在选择器列表里，整个列表在不支持的内核里会一起失效，
   所以 :has() 规则单独用 @supports 包住；不支持时退回 :focus-within，保证焦点环不丢。 */
@supports selector(:has(*)) {
  .search-input-wrap:has(input:focus-visible) { border-color: #91a497; box-shadow: none; outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: var(--focus-ring-offset); }
}
.search-input-icon { color: #8d958f; font-size: 20px; text-align: center; }
/* 横向滚动停靠：每个日期条是一格，滚动停止时对齐到条目左缘。
   标签「最近记录」也算吸附点，否则滚到最左端时最近的吸附点在下一个日期条上，会莫名向前跳一格。 */
.recent-days { display: flex; gap: 7px; align-items: stretch; overflow-x: auto; padding-bottom: 3px; scroll-snap-type: x proximity; }
.recent-days > * { scroll-snap-align: start; }
/* 【2026-10-15 恢复】列宽改回 auto-fit：今天恢复了第 5 格「生理状态」
   （见 app.js 的 #journal-metric-health），固定 4 列会让它孤零零掉到第二行。 */
.journal-metrics > div { min-width: 0; padding: 12px 13px; border: 1px solid #e7e9e4; border-radius: 12px; background: rgba(255,255,253,.9); box-shadow: inset 0 1px 0 rgba(255,255,255,.72); }
/* Emil Kowalski tactile press feedback: scale(0.96) */
.setting-action:active, .new-import-button:active, .file-picker:active, .journal-action:active, .quiet-button:active, .search-submit:active, .search-filter:active, .nav-item:active, .tab-item:active, .review-action:active, .mobile-nav-btn:active, .mobile-sub-tab:active, .search-capsule:active, .day-event-play-btn:active, .search-audio-play-btn:active, .search-results-action-btn:active, .inline-viewer-back:active, .inline-viewer-external:active, .diagnostic-close:active, .mic-toggle-btn:active, .pinned-memo-copy-btn:active, .quick-prompt-pill:active, .quick-day:active, .day-chip:active, .settings-tab:active, .task-state-actions button:active, .onboarding-top button:active {
  transform: scale(0.96);
}
}

} /* @layer components 结束 */

/* ==========================================================================
   utilities：单类通用助手。
   本层排在最后，所以这里的普通声明天然覆盖 components，不必再写 !important；
   反过来，带 !important 的组件声明（如移动端导航断点内的 display: grid）仍优先于本层
   —— !important 的层序是反的，靠前的层胜出，因此分层前后行为一致。
   ========================================================================== */
@layer utilities {

/* 仅供读屏的隐藏文本：整条规则都是 !important，归入本层不会与组件样式互相影响 */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
