  /* Fraunces variable — 本地打包，避免在 Android WebView 退化到 CJK serif（Songti/Noto Serif SC）
     从而把 Latin 字符渲染成怪样子。font-display:swap 让首屏先用 fallback 再无缝换上。 */
  @font-face {
    font-family: "Fraunces";
    src: url("/client/vendor/fraunces.woff2") format("woff2-variations"),
         url("/client/vendor/fraunces.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
  }

  :root {
    /* 品牌主色（来自 logo） */
    --brand-navy: #18395C;       /* logo 主体，深沉的山影 */
    --brand-ink: var(--brand-navy);
    --brand-navy-soft: #2C4A75;
    --brand-navy-bg: rgba(24,57,92,0.06);
    --brand-navy-border: rgba(24,57,92,0.20);
    --brand-amber: #E89935;      /* logo 点睛，黎明那点光 */
    --brand-amber-strong: #C97D1F;
    --brand-amber-soft: #FDF4E5;
    --brand-amber-mid: #F5C481;

    /* Surface（偏暖的 cream，不是死白） */
    --c-bg: #FAF8F4;
    --c-surface: #FFFFFF;
    --c-surface-2: #F8F6F1;
    /* Borders（带暖色调） */
    --c-border: #E8E4DD;
    --c-border-soft: #F2EFE9;
    /* Text（拉向 navy 而非纯黑） */
    --c-text: #0F1F35;
    --c-text-2: #2C3E5C;
    --c-muted: #6B6E78;
    --c-muted-soft: #9FA1AA;
    /* Accent = amber（替代旧 indigo） */
    --c-accent: var(--brand-amber);
    --c-accent-strong: var(--brand-amber-strong);
    --c-accent-soft: var(--brand-amber-soft);
    --c-accent-border: var(--brand-amber-mid);
    /* 别名 */
    --c-pending: var(--c-accent);
    --c-pending-bg: var(--c-accent-soft);
    --c-pending-border: var(--c-accent-border);
    /* Status */
    --c-success: #10B981;
    --c-danger: #EF4444;
    --c-warn: #E89935;
    /* Shadows - 用 navy 着色而非纯黑，更温润 */
    --shadow-card: 0 1px 2px 0 rgba(24,57,92,0.05);
    --shadow-bar: 0 10px 32px -14px rgba(24,57,92,0.18), 0 2px 6px -2px rgba(24,57,92,0.08);
    --shadow-sheet: 0 -10px 32px -14px rgba(24,57,92,0.18);
    --shadow-pop: 0 18px 40px -14px rgba(24,57,92,0.22);

    /* Typography 三栈 — 全部系统字，无网络依赖 */
    /* 注意：不要把 CJK serif（Songti SC / Noto Serif SC）放在 fallback 里 —— Android WebView 没有
       "New York"/"Source Serif" 时会一路掉到 CJK 字体，把 Latin 字符渲染得怪怪的。 */
    --font-display: "Fraunces", "New York", ui-serif, "Iowan Old Style", "Source Serif Pro", "Source Serif 4", Georgia, serif;
    --font-ui:      -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Helvetica Neue", system-ui, sans-serif;
    --font-mono:    "SF Mono", ui-monospace, "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  }
  html, body {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-ui);
    line-height: 1.45;
    letter-spacing: -0.003em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100vh;
    overscroll-behavior: none;
  }
  h1, h2, h3 { letter-spacing: -0.015em; font-weight: 600; }
  /* 全站时间/数字等宽对齐 */
  body { font-variant-numeric: tabular-nums; }
  /* ─── 排版工具类 ─── */
  .section-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.014em;
    color: var(--c-text);
    text-transform: none;
  }
  .section-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    color: var(--c-muted);
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
  }
  /* 区块标题 sticky（滚动时固定顶部） */
  .section-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(255,255,255,0.5);
    padding-top: 12px;
    margin-bottom: 0;
  }
  .section-add-btn {
    min-height: 32px;
    min-width: 0;
    padding: 0 9px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--c-muted);
    font-size: 11px;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
  }
  .section-add-btn:hover {
    color: var(--c-text);
    background: var(--c-border-soft);
  }
  /* 安排网格左边的小时刻度 — 在 viewport 内、网格左侧 padding 区 */
  .hour-label {
    position: absolute;
    left: 4px;
    top: -6px;
    width: 42px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: var(--c-muted-soft);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    text-align: left;
  }

  /* 焦点环：工程标记感 */
  *:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
    border-radius: 4px;
  }
  button:focus { outline: none; }
  button:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
  * { -webkit-tap-highlight-color: transparent; }

  /* ─── Logo ─── */
  .logo-mark {
    color: var(--c-text);
    display: inline-flex;
  }

  /* ─── 安排网格 ─── */
  .timeline-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
  }
  @media (max-width: 767px) {
    .timeline-scroll { max-height: none; }
  }
  .timeline-grid {
    background-image: linear-gradient(to bottom, var(--c-border) 1px, transparent 1px);
    background-size: calc(100% - 50px) 60px;
    background-position: 50px 0;
    background-repeat: repeat-y;
  }
  .timeline-empty {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 12px;
    color: var(--c-muted);
    font-size: 12px;
  }
  .timeline-empty-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(232,153,53,0.08);
    color: var(--brand-amber-strong);
    flex: 0 0 auto;
  }
  .timeline-empty-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .timeline-card {
    position: absolute;
    left: 52px; right: 8px;
    border-radius: 7px;
    padding: 7px 26px 7px 10px;  /* 右侧 26px 给手柄留位 */
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    cursor: default;             /* 拖动手势移到 .timeline-card-drag-handle 上 */
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: pan-y;         /* body 放过纵向滚动；手柄自身设 touch-action:none */
    /* transform transition 给"被推让"的卡片用；source 用 [data-dragging] 关掉过渡跟手 */
    transition: box-shadow 0.18s, transform 0.2s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;  /* 让 ::before 边条紧贴圆角边界 */
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  /* 右侧拖动手柄：仅这里能拖，hover/touch 时三点 grip 显现 */
  .timeline-card-drag-handle {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    padding-right: 5px;
    cursor: grab;
    touch-action: none;
    color: var(--c-muted);
    opacity: 0.35;
    background: linear-gradient(to left, rgba(9,9,11,0.025), transparent);
    border-radius: 0 7px 7px 0;
    transition: opacity 0.15s ease, background 0.15s ease;
  }
  .timeline-card-drag-handle span {
    width: 3px; height: 3px; border-radius: 50%;
    background: currentColor;
    display: block;
  }
  .timeline-card-drag-handle:hover,
  .timeline-card:hover .timeline-card-drag-handle {
    opacity: 0.85;
    background: linear-gradient(to left, rgba(9,9,11,0.06), transparent);
  }
  .timeline-card[data-dragging="true"] .timeline-card-drag-handle {
    cursor: grabbing;
    opacity: 1;
  }
  .timeline-card.compact { padding-right: 22px; }
  .timeline-card.compact .timeline-card-drag-handle { width: 18px; }
  /* 左侧完成开关：和待办行 .check 同视觉，仅落地日程卡片显示 */
  .timeline-card.has-done { padding-left: 30px; }
  .timeline-card.compact.has-done { padding-left: 28px; }
  .timeline-card-done {
    position: absolute;
    left: 9px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; border-radius: 5px;
    border: 1.5px solid #d6d3d1;
    background: var(--c-surface);
    display: grid; place-items: center;
    padding: 0; cursor: pointer;
    line-height: 1; color: transparent;
    z-index: 2;
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  .timeline-card-done[data-done="true"] {
    background: var(--brand-amber); border-color: var(--brand-amber); color: #fff;
  }
  .timeline-card-done[data-done="true"]::after { content: "✓"; font-size: 11px; }
  /* tag 痕迹：4px 左侧色条 */
  .timeline-card[data-has-tag]::before,
  .task-row[data-has-tag]::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--tag-stripe, transparent);
    opacity: 0.55;
    pointer-events: none;
  }
  .task-row[data-has-tag] { position: relative; }
  .timeline-card[data-dragging="true"] {
    will-change: transform;
    transition: none;  /* 源卡片：无过渡跟手 */
  }
  /* 冲突时，被推让的"原位置"鬼影 */
  .displaced-ghost {
    position: absolute;
    left: 52px; right: 8px;
    border: 1.5px dashed var(--brand-amber);
    background: rgba(232,153,53,0.08);
    border-radius: 7px;
    pointer-events: none;
    z-index: 2;
    animation: ghost-fade-in 0.18s ease-out;
  }
  /* 拖动时源卡片的原位置占位框 */
  .source-ghost {
    position: absolute;
    left: 52px; right: 8px;
    border: 1.5px dashed var(--c-accent);
    border-radius: 7px;
    background: rgba(232,153,53,0.06);
    pointer-events: none;
    z-index: 2;
    animation: ghost-fade-in 0.18s ease-out;
  }
  @keyframes ghost-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  .timeline-card:hover {
    border-color: var(--c-muted-soft);
  }
  .timeline-card[data-dragging="true"] {
    cursor: grabbing;
    z-index: 10;
    box-shadow: 0 16px 36px -10px rgba(9,9,11,0.28), 0 2px 8px -2px rgba(9,9,11,0.12);
    border-color: var(--c-accent);
    transition: none;
  }
  /* 跟随光标显示目标时间的小气泡 */
  .drag-time-bubble {
    position: fixed;
    background: var(--c-text);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 8px 20px -4px rgba(9,9,11,0.4);
    white-space: nowrap;
    /* 拖动手柄在卡片右侧 → 气泡若往右弹会被屏幕边缘裁掉。
       这里改为以光标为锚点向左偏移气泡自身宽度 + 12px，保持稳稳贴在手指/光标左侧。 */
    transform: translate(calc(-100% - 12px), -32px);
    animation: bubble-in 0.12s cubic-bezier(0.32, 0.72, 0, 1);
  }
  @keyframes bubble-in {
    from { opacity: 0; transform: translate(calc(-100% - 12px), -28px) scale(0.9); }
    to   { opacity: 1; transform: translate(calc(-100% - 12px), -32px) scale(1); }
  }
  .drag-time-bubble .arrow {
    color: rgba(255,255,255,0.5);
    margin: 0 4px;
  }
  .drag-time-bubble .new {
    color: #FCD34D;  /* amber-300 — drag bubble 的"新值"色 */
  }
  /* 冲突态：橙色警示 */
  .drag-time-bubble.conflict {
    background: var(--c-warn);
    box-shadow: 0 8px 20px -4px rgba(245,158,11,0.45);
  }
  .drag-time-bubble.conflict .new { color: #fff; font-weight: 600; }
  .drag-time-bubble.conflict .arrow { color: rgba(255,255,255,0.6); }
  .drag-time-bubble.conflict::after {
    content: " · 时段冲突";
    opacity: 0.85;
  }

  /* 拖动时显示的目标位置 slot */
  .drag-target-slot {
    position: absolute;
    left: 52px; right: 8px;
    border: 1.5px dashed var(--c-accent);
    border-radius: 7px;
    background: var(--c-accent-soft);
    opacity: 0.55;
    pointer-events: none;
    z-index: 1;
    transition: top 0.06s ease-out, height 0.06s ease-out, border-color 0.12s, background 0.12s;
  }
  .drag-target-slot.conflict {
    border-color: var(--c-warn);
    background: #fef3c7;
  }
  /* 长按 ≥250ms 的「我看见你按住了」反馈，到 1s 进编辑器前一直保持 */
  .timeline-card[data-pressing="true"],
  .task-row[data-pressing="true"] {
    background: var(--c-accent-soft) !important;
    box-shadow: inset 0 0 0 2px var(--c-accent);
    transition: background 0.5s ease-out, box-shadow 0.5s ease-out;
  }
  /* 常规卡片：标题左 + 时间右，标题自动换行或截断 */
  .card-body-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    width: 100%;
  }
  .card-body-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .card-body-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--c-text);
    /* 允许换行，最多 2 行，超出省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
  }
  .card-origin,
  .task-origin {
    min-width: 0;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--c-muted);
    font-size: 10.5px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .card-origin svg,
  .task-origin svg {
    flex: 0 0 auto;
    opacity: 0.78;
  }
  .card-body-time {
    flex-shrink: 0;
    min-width: 46px;
    font-size: 11px;
    color: var(--c-muted);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    line-height: 1.35;
    padding-top: 1px;
    white-space: nowrap;
    text-align: right;
  }
  .card-body-diff {
    font-size: 10px;
    font-weight: 400;
    margin-top: 2px;
  }
  .card-body-time-new {
    color: var(--c-accent);
    font-weight: 500;
  }
  /* compact 模式：30 分钟以下的短卡片（高度 < 44px） */
  .timeline-card.compact {
    padding: 4px 9px;
    overflow: hidden;
  }
  .timeline-card.compact .compact-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
  }
  .timeline-card.compact .compact-line .title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
  }
  .timeline-card.compact .compact-line .time-text {
    flex-shrink: 0;
    color: var(--c-muted);
    font-size: 10.5px;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
  }
  .timeline-card.compact .btn-icon {
    width: 22px; height: 22px;
    font-size: 11px;
  }
  .timeline-card.pending {
    border: 1px dashed var(--c-accent);
    background: var(--c-accent-soft);
    box-shadow: 0 0 0 3px rgba(232,153,53,0.06);
    animation: float-in 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  }
  /* pending 状态：用 dashed border + accent-soft 背景表意；与 .task-row.pending 同源做法。
     ::before 始终留给 [data-has-tag] 的左色条 —— overflow:hidden 会裁掉浮动徽标，所以不再画。 */
  .timeline-card.just-modified,
  .timeline-card.pending.just-modified {
    animation: pulse 1s ease-out 1;
  }
  .timeline-card.exiting,
  .task-row.exiting {
    animation: card-out 0.2s ease-in forwards !important;
    pointer-events: none;
  }
  @keyframes float-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes card-out {
    to { opacity: 0; transform: translateY(-6px) scale(0.97); }
  }
  @keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(232,153,53,0.32); }
    60%  { box-shadow: 0 0 0 8px rgba(232,153,53,0); }
    100% { box-shadow: 0 0 0 0 rgba(232,153,53,0); }
  }
  /* ─── 当前时间指示线 ─── */
  .now-line {
    position: absolute;
    left: 52px; right: 8px;
    height: 1px;
    background: repeating-linear-gradient(90deg, rgba(232,153,53,0.42) 0, rgba(232,153,53,0.42) 4px, transparent 4px, transparent 8px);
    z-index: 4;
    pointer-events: none;
  }
  .now-line::before {
    content: "";
    position: absolute;
    left: -3px; top: -2.5px;
    width: 6px; height: 6px;
    background: var(--brand-amber);
    border-radius: 50%;
  }
  /* 时间 tip：与 hour-label 同列、同字号、同左对齐，仅用 amber 高亮区分"现在" */
  .now-line::after {
    content: attr(data-time);
    position: absolute;
    left: -48px;
    top: -6px;
    width: 42px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: var(--brand-amber);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    font-weight: 500;
  }
  .ai-badge {
    display: inline-flex;
    align-items: center;
    color: var(--c-accent);
    margin-left: 5px;
    opacity: 0.85;
    vertical-align: -1px;
  }
  /* ─── 任务标题：可动画的描线划掉 ─── */
  .task-row .item-title {
    position: relative;
    display: inline-block;
    transition: color 0.3s, opacity 0.3s;
  }
  .task-row .item-title::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .task-row.item-done .item-title::after { transform: scaleX(1); }
  .task-row.item-done .item-title { color: var(--c-muted); opacity: 0.65; }
  .item-done .item-title { text-decoration: none; }  /* 覆盖旧规则，避免双重划线 */
  .diff-old { text-decoration: line-through; color: var(--c-muted); margin-right: 6px; }
  .diff-new { color: var(--c-accent); font-weight: 500; }

  /* ─── Canvas 切日期转场 ─── */
  .canvas-wrap.slide-from-right { animation: slide-fr 0.28s cubic-bezier(0.32, 0.72, 0, 1); }
  .canvas-wrap.slide-from-left  { animation: slide-fl 0.28s cubic-bezier(0.32, 0.72, 0, 1); }
  @keyframes slide-fr { from { transform: translateX(6%); opacity: 0.4; } to { transform: none; opacity: 1; } }
  @keyframes slide-fl { from { transform: translateX(-6%); opacity: 0.4; } to { transform: none; opacity: 1; } }

  /* ─── AI 律动光晕（共用） ─── */
  .ai-aura {
    position: relative;
    isolation: isolate;
  }
  .ai-aura::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: inherit;
    padding: 1.5px;
    /* 日出渐变：从 amber 到 saffron 再到一抹 navy 山影 */
    background: linear-gradient(120deg, #E89935, #F5C481, #FFC97A, #6E8AA8, #E89935);
    background-size: 300% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation: aura-shift 16s linear infinite;
    transition: opacity 0.4s;
  }
  /* 闲态：极淡或不显 */
  .ai-aura[data-aura="idle"]::before { opacity: 0.18; animation-duration: 16s; }
  /* 思考/答复态：渐变流转 + 呼吸 opacity 振荡（0.55↔1.0），双动画叠加 */
  .ai-aura[data-aura="active"]::before {
    animation: aura-shift 2.4s linear infinite, aura-breathe 1.6s ease-in-out infinite;
  }
  /* 录音态：保留 amber 主色（与"思考中"一致），只用更急促的动效区分 */
  .ai-aura[data-aura="recording"]::before {
    animation: aura-shift 1.2s linear infinite, aura-breathe 0.8s ease-in-out infinite;
  }
  @keyframes aura-shift {
    0%   { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
  }
  @keyframes aura-breathe {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1.0; }
  }

  /* ─── 流式回答从下流入 ─── */
  .stream-in {
    animation: stream-in 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  }
  @keyframes stream-in {
    from { opacity: 0; transform: translateY(8px); filter: blur(2px); }
    to   { opacity: 1; transform: translateY(0);   filter: blur(0); }
  }

  /* ─── 录音波形 ─── */
  .waveform {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 26px;
  }
  .waveform span {
    width: 3px;
    background: var(--c-accent);
    border-radius: 2px;
    animation: bar-wave 0.9s ease-in-out infinite;
  }
  .waveform span:nth-child(1) { animation-delay: 0s; }
  .waveform span:nth-child(2) { animation-delay: 0.1s; }
  .waveform span:nth-child(3) { animation-delay: 0.2s; }
  .waveform span:nth-child(4) { animation-delay: 0.3s; }
  .waveform span:nth-child(5) { animation-delay: 0.4s; }
  @keyframes bar-wave {
    0%, 100% { height: 4px; }
    50%      { height: 22px; }
  }
  .waveform.recording span { background: var(--brand-amber); }

  @keyframes rec-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232,153,53,0.5); }
    50%      { box-shadow: 0 0 0 5px rgba(232,153,53,0); }
  }

  /* ─── 桌面录音：始终渲染同一结构，CSS 切换显隐 ─── */

  /* 默认隐藏录音专用元素 */
  .chat-rec-bars { display: none; }
  .chat-input-cancel { display: none; }

  /* ── 录音态：隐藏输入+sparkle+mic，显示波形+取消 ── */
  .chat-input-shell.recording .chat-input-mark { display: none; }
  .chat-input-shell.recording input { display: none; }
  .chat-input-shell.recording .chat-input-mic { display: none; }

  .chat-input-shell.recording .chat-rec-bars {
    flex: 1; min-width: 0;
    display: flex; align-items: center;
    gap: 5px; height: 32px; padding: 0 2px;
    animation: rec-bars-fade 0.5s ease-out both;
  }
  .chat-rec-bars .voice-bar {
    flex: 1 1 0; min-width: 6px; max-width: 10px;
    height: 18%;
    background: linear-gradient(180deg, #FFB148 0%, #E89935 100%);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(192,114,18,0.35);
    will-change: height;
  }

  .chat-input-shell.recording .chat-input-cancel {
    flex: 0 0 auto;
    width: 34px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    border: none;
    background: #DC2626;
    color: #fff;
    cursor: pointer;
    animation: rec-cancel-pop 0.5s cubic-bezier(.34,1.4,.64,1) 0.08s both;
    transition: background 0.15s, transform 0.12s;
  }
  .chat-input-cancel:hover { background: #B91C1C; }
  .chat-input-cancel:active { transform: scale(0.92); }

  /* 录音态 shell：从白渐变到琥珀 + 琥珀雾团光晕 */
  .chat-input-shell.recording {
    animation: rec-shell-warm 0.5s ease-out forwards;
    position: relative; overflow: visible;
  }
  .chat-input-shell.recording::after {
    content: "";
    position: absolute;
    inset: -18px -24px;
    border-radius: 28px;
    background: radial-gradient(ellipse at center, rgba(255,220,166,0.45) 0%, rgba(255,220,166,0) 70%);
    pointer-events: none;
    z-index: -1;
    animation: rec-glow-in 0.8s ease-out both;
  }
  /* 聊聊页录音态发送按钮：红色（仅移动端停止键，桌面保持琥珀色） */
  @media (max-width: 767px) {
    .chat-input-shell.recording .chat-input-send {
      background: #DC2626;
    }
    .chat-input-shell.recording .chat-input-send:hover {
      background: #B91C1C;
    }
  }
  /* modalAnim 二次 render 抑制动画重播 */
  .chat-input-shell.recording.no-anim { animation: none; }
  .chat-input-shell.recording.no-anim::after { animation: none; opacity: 1; }
  .chat-input-shell.recording.no-anim .chat-rec-bars { animation: none; }
  .chat-input-shell.recording.no-anim .chat-input-cancel { animation: none; opacity: 1; }
  .chat-input-shell.recording.no-anim .chat-input-send { animation: none; }

  /* ── 停止录音回退动画 ── */
  .chat-input-shell.rec-exit .chat-input-send {
    animation: rec-send-slide-right 0.45s cubic-bezier(.22,.61,.36,1) both;
  }

  @keyframes rec-shell-warm {
    0%   { background: #fff; border-color: var(--c-border);
           box-shadow: 0 1px 0 rgba(15,31,53,0.02), 0 6px 18px -12px rgba(15,31,53,0.18); }
    100% { background: linear-gradient(180deg, #FFF1D8 0%, #FFE0A8 100%); border-color: var(--brand-amber);
           box-shadow: 0 6px 18px -12px rgba(232,153,53,0.6); }
  }
  @keyframes rec-glow-in {
    0%   { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
  }
  @keyframes rec-bars-fade {
    0%   { opacity: 0; }
    100% { opacity: 1; }
  }
  @keyframes rec-cancel-pop {
    0%   { opacity: 0; transform: scale(0.4); }
    70%  { transform: scale(1.06); }
    100% { opacity: 1; transform: scale(1); }
  }
  @keyframes rec-send-slide-left {
    0%   { transform: translateX(42px); }
    100% { transform: none; }
  }
  @keyframes rec-send-slide-right {
    0%   { transform: translateX(-42px); }
    100% { transform: none; }
  }

  .parse-line {
    height: 1px;
    background: var(--c-border-soft);
    position: relative;
    overflow: hidden;
  }
  .parse-line::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 35%; height: 100%;
    background: linear-gradient(90deg, transparent, var(--c-accent), transparent);
    animation: parse-flow 1.1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }
  @keyframes parse-flow {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(calc(100vw + 100%)); }
  }
  /* ─── 历史抽屉（⌘/） ─── */
  .history-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.18);
    z-index: 40;
    animation: fade-in 0.18s ease-out;
  }
  .history-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(420px, 100vw);
    background: var(--c-surface);
    box-shadow: -10px 0 30px -8px rgba(0,0,0,0.15);
    z-index: 41;
    animation: slide-in-right 0.22s ease-out;
    display: flex; flex-direction: column;
  }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes slide-in-right { from { transform: translateX(100%); } to { transform: none; } }

  /* ─── 移动 FAB —— 仅「清单」空态出现，点击回到「聊聊」主输入 ─── */
  .fab {
    position: fixed;
    right: 16px;
    /* 只避开底部导航；AI 交互保留在「对话」页，不在整理页再铺一层输入条。 */
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--brand-amber);
    color: #fff;
    opacity: 0.75;
    box-shadow: 0 8px 20px -6px rgba(232,153,53,0.45), 0 2px 6px -2px rgba(232,153,53,0.20);
    display: grid; place-items: center;
    z-index: 40;
    transition: transform 0.1s, box-shadow 0.1s, bottom 0.22s ease, opacity 0.18s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .fab:active { transform: scale(0.95); }
  .fab:hover { background: var(--brand-amber-strong); box-shadow: 0 12px 24px -8px rgba(232,153,53,0.55); }
  /* 键盘弹起时隐藏 FAB，避免遮住输入区 */
  body.kb-open .fab { opacity: 0; pointer-events: none; }

  /* ─── 移动主导航 ───
     稳定入口优先：聊聊 / 清单。生活节奏与设置收在头像里。 */
  .tabbar {
    display: none;
  }
  @media (min-width: 768px) { .tabbar { display: none; } }
  .tabbar-item {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    position: relative;
    flex: 0 1 132px;
    padding: 0 9px;
    display: flex; align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 34px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 650;
    font-family: inherit;
    color: var(--c-muted);
    transition: color 0.15s, background 0.15s, border-color 0.15s, transform 0.12s;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tabbar-item:active { transform: translateY(1px); }
  .tabbar-item:focus-visible {
    outline: 2px solid var(--brand-amber);
    outline-offset: -3px;
    border-radius: 999px;
  }
  .tabbar-item[data-active="true"] {
    color: var(--brand-ink);
    background: rgba(255,248,234,0.62);
    border-color: rgba(232,153,53,0.20);
  }
  .tabbar-item[data-primary="true"][data-active="true"] {
    background: rgba(255,248,234,0.62);
    border-color: rgba(232,153,53,0.20);
    color: var(--brand-ink);
  }
  .tabbar-item[data-primary="true"][data-active="true"] .tab-badge {
    background: var(--brand-amber);
    color: #fff;
    border-color: rgba(255,255,255,0.45);
  }
  .tabbar-item[data-tone="attention"] {
    color: #9A5D08;
  }
  .tabbar-item[data-tone="soft"] {
    color: #44617A;
  }
  .tab-icon {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
  }
  .tab-badge {
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(24,57,92,0.08);
    color: var(--c-muted);
    font-size: 9.5px;
    line-height: 1;
    font-weight: 700;
  }

  /* ─── Toast ─── */
  .toast {
    position: fixed;
    left: 50%; transform: translateX(-50%);
    background: var(--c-text);
    color: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 12px;
    box-shadow: 0 6px 20px -4px rgba(0,0,0,0.2);
    z-index: 50;
    animation: toast-in 0.22s ease-out, toast-out 0.3s ease-in 5.7s forwards;
    display: inline-flex; align-items: center; gap: 12px;
  }
  .toast-action {
    background: var(--brand-amber);
    color: #fff;
    border: none;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s;
  }
  .toast-action:hover { background: var(--brand-amber-strong); }
  @keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
  @keyframes toast-out { to { opacity: 0; transform: translate(-50%, 8px); } }

  /* ─── 对话气泡 ─── */
  .bubble-user {
    background: var(--brand-amber-soft); color: var(--c-text);
    border-radius: 14px 14px 4px 14px;
    padding: 8px 12px; max-width: 85%;
    font-size: 13.5px;
    align-self: flex-end;
  }
  .bubble-ai {
    background: #f4f4f5;
    color: var(--c-text);
    border-radius: 14px 14px 14px 4px;
    padding: 8px 12px; max-width: 90%;
    font-size: 13.5px;
    align-self: flex-start;
  }
  .chip-btn {
    display: block; width: 100%; text-align: left;
    margin-top: 4px;
    padding: 6px 10px; border-radius: 8px;
    background: #fff; border: 1px solid var(--c-border);
    font-size: 12px;
  }
  .chip-btn:hover { border-color: var(--c-pending-border); background: var(--c-pending-bg); }

  /* ─── kbd ─── */
  kbd {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 10px;
    padding: 1px 5px;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    background: #fff;
    color: var(--c-muted);
  }
  .kbd-on-dark {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.85);
  }

  /* ─── 响应式开关 ─── */
  .desktop-only { display: block; }
  .mobile-only { display: none; }
  @media (max-width: 767px) {
    .desktop-only { display: none; }
    .mobile-only { display: revert; }
    /* 移动端没有物理键盘，所有 ⌘/Esc/⏎ 之类的快捷键提示统一隐藏，
       既腾出寸土寸金的纵向空间，也避免误导触屏用户。 */
    .kbd-hint { display: none !important; }
    .canvas-wrap { padding: 0 14px !important; max-width: 100% !important; }
    .timeline-card { left: 48px; }
    body { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
    /* 移动头部预留刘海/灵动岛空间；状态栏颜色与 cream 主色 (#FAF8F4) 一致，融为一体 */
    .app-shell > .main-area > header.md\:hidden {
      padding-top: calc(env(safe-area-inset-top, 0px) + 2px);
    }
  }

  /* ─── App Shell：左 sidebar + 主区 ─── */
  :root { --sidebar-w: 220px; }
  @media (max-width: 767px) { :root { --sidebar-w: 0px; } }
  .app-shell {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;   /* mobile: row1=main, row2=tabbar；desktop tabbar 不占（display:none） */
    height: 100vh;
    overflow: hidden;
  }
  @media (min-width: 768px) {
    .app-shell { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  }
  .main-area {
    display: flex;
    flex-direction: column;
    min-height: 0;          /* grid 1fr row 自动给高度，不再写死 100vh（否则 tabbar 行被挤出屏幕） */
    overflow: hidden;
    touch-action: pan-y;
    /* Android windowSoftInputMode=adjustNothing：键盘弹起时 WebView 不缩、不推 →
       layout viewport 不变，tabbar 永远留在屏底，键盘从屏外盖上把 tabbar / 部分内容遮住。
       interactions.js 用 @capacitor/keyboard 原生事件算 --kb-h，这里 padding-bottom 把
       内容区整体抬起 → 输入框紧贴键盘上沿，输入框以上的卡片/列表跟着一起起伏。
       关键：主区是 grid row 1，tabbar 是 row 2 占 --tabbar-h 高度。padding 只需补
       (kb - tabbar)，否则会出现"输入框停在键盘上方一个 tabbar 高度"的悬浮 bug。
       桌面没有软键盘 → --kb-h 始终 0，--tabbar-h 也是 0（tabbar display:none），无副作用。 */
    padding-bottom: max(0px, calc(var(--kb-h, 0px) - var(--tabbar-h, 0px)));
    transition: padding-bottom 0.18s cubic-bezier(.2,.7,.2,1);
  }
  @media (prefers-reduced-motion: reduce) {
    .main-area { transition: none; }
  }
  .canvas-wrap {
    flex: 1;
    overflow: hidden;
  }
  /* 日程页 6.5:3.5 分栏 */
  .canvas-columns {
    display: flex;
    gap: 8px;
    height: 100%;
    overflow: hidden;
    flex: 1;
    padding-bottom: 32px;
  }
  .canvas-page-slider {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    touch-action: pan-y;
  }
  .canvas-page-track {
    height: 100%;
    display: flex;
    transform: translateX(0);
    will-change: transform;
  }
  .canvas-page-slider[data-active-view="inbox"] .canvas-page-track {
    transform: translateX(-100%);
  }
  .canvas-page-slider[data-slide="chat-inbox"] .canvas-page-track {
    animation: canvas-page-chat-inbox 0.28s cubic-bezier(.2,.8,.2,1) both;
  }
  .canvas-page-slider[data-slide="inbox-chat"] .canvas-page-track {
    animation: canvas-page-inbox-chat 0.28s cubic-bezier(.2,.8,.2,1) both;
  }
  .canvas-page {
    flex: 0 0 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    touch-action: pan-y;
  }
  .canvas-page[aria-hidden="true"] {
    pointer-events: none;
  }
  @keyframes canvas-page-chat-inbox {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
  }
  @keyframes canvas-page-inbox-chat {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
  }
  @media (prefers-reduced-motion: reduce) {
    .canvas-page-slider[data-slide] .canvas-page-track {
      animation: none;
    }
  }
  .canvas-columns .col-timeline {
    flex: 65; overflow-y: auto; min-width: 0;
    border: 1px solid var(--c-border-soft); border-radius: 10px;
    background: rgba(255,255,255,0.5);
    padding: 0 8px;
  }
  .canvas-columns .col-tasks {
    flex: 35; overflow-y: auto; min-width: 0;
    border: 1px solid var(--c-border-soft); border-radius: 10px;
    background: rgba(255,255,255,0.5);
    padding: 0 8px;
  }
  @media (max-width: 767px) {
    .canvas-columns { flex-direction: column; padding-bottom: 0; padding-left: 6px; padding-right: 6px; }
    .canvas-columns .col-timeline { flex: 7; border-radius: 10px; margin-bottom: 3px; }
    .canvas-columns .col-timeline[data-empty="true"] {
      flex: 0 0 auto;
      overflow: visible;
    }
    .canvas-columns .col-timeline[data-empty="true"] .section-header {
      padding-top: 8px;
    }
    .canvas-columns .col-tasks    { flex: 3; border-radius: 10px; margin-bottom: 6px; }
    .canvas-columns .col-tasks[data-empty="true"] {
      flex: 0 0 auto;
      overflow: visible;
    }
    .canvas-columns .col-tasks[data-empty="true"] .section-header {
      padding-top: 8px;
    }
    .canvas-columns .col-timeline,
    .canvas-columns .col-tasks { margin-top: 0; }
  }
  @media (min-width: 768px) {
    .app-shell { grid-template-columns: 1fr; }
    /* 桌面：canvas-columns 与对话框/卡片同宽（max 760px），居中 */
    .canvas-columns {
      padding-left: 6px; padding-right: 6px; padding-bottom: 85px;
      max-width: 760px;
      margin: 0 auto;
      width: 100%;
    }
    .canvas-columns .col-timeline { border-right: none; border-top-right-radius: 0; border-bottom-right-radius: 0; }
    .canvas-columns .col-tasks    { border-left: none; border-top-left-radius: 0; border-bottom-left-radius: 0; }
  }
  .sidebar {
    display: none;
    flex-direction: column;
    border-right: 1px solid var(--c-border);
    padding: 14px 10px 12px;
    background: var(--c-bg);
    position: sticky;
    top: 0;
    height: 100vh;
  }
  @media (min-width: 768px) {
    .sidebar { display: none; }
  }
  .sidebar-top {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 8px 14px;
  }
  /* Brand wordmark: 用 display serif 跟 page-title 形成 editorial 体系 */
  .sidebar-brand {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 16px;
    letter-spacing: -0.010em;
    color: var(--brand-navy);
    /* 一层柔光阴影，与 logo 扁平气质呼应 */
    text-shadow: 1px 2px 4px rgba(24,57,92,0.10);
    transform: translateY(0.5px);
  }
  .brand-text-mobile {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: -0.008em;
    color: var(--brand-navy);
    text-shadow: 1px 2px 4px rgba(24,57,92,0.10);
    transform: translateY(0.5px);
  }
  .mobile-app-header {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 76px;
    align-items: center;
    gap: 8px;
    padding: calc(env(safe-area-inset-top, 0px) + 2px) 12px 5px;
  }
  .mobile-brand-lockup {
    justify-self: start;
    min-width: 0;
  }
  .mobile-header-nav {
    justify-self: center;
    min-width: 0;
    max-width: 100%;
  }
  .mobile-header-nav .top-view-nav {
    min-height: 30px;
    max-width: 100%;
  }
  .mobile-header-nav .top-view-nav-item {
    min-width: 58px;
    padding: 0 8px;
    font-size: 11.5px;
  }
  .mobile-header-nav .top-view-nav-icon {
    display: none;
  }
  .mobile-header-nav .top-view-nav-badge {
    min-width: 14px;
    height: 14px;
    font-size: 8.5px;
  }
  .desktop-main-nav {
    min-height: 38px;
    gap: 12px;
  }
  .top-view-nav {
    --nav-pad: 3px;
    --nav-gap: 3px;
    --nav-shift: 0px;
    position: relative;
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(72px, 1fr));
    align-items: center;
    gap: var(--nav-gap);
    min-height: 30px;
    padding: var(--nav-pad);
    border: 1px solid rgba(24,57,92,0.08);
    border-radius: 999px;
    background: rgba(255,255,255,0.58);
    overflow: hidden;
  }
  .top-view-nav::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: var(--nav-pad);
    top: var(--nav-pad);
    bottom: var(--nav-pad);
    width: calc((100% - (var(--nav-pad) * 2) - var(--nav-gap)) / 2);
    border-radius: 999px;
    background: rgba(255,248,234,0.74);
    box-shadow: inset 0 0 0 1px rgba(232,153,53,0.14), 0 4px 14px rgba(24,57,92,0.06);
    opacity: 1;
    transform: translateX(var(--nav-shift));
    transition: transform 0.22s cubic-bezier(.2,.8,.2,1), opacity 0.16s ease, background 0.18s ease, box-shadow 0.18s ease;
  }
  .top-view-nav[data-active-view="inbox"] {
    --nav-shift: calc(100% + var(--nav-gap));
  }
  .top-view-nav:not([data-active-view="chat"]):not([data-active-view="inbox"])::before {
    opacity: 0;
  }
  .top-view-nav[data-slide="chat-inbox"]::before {
    animation: top-nav-slide-chat-inbox 0.26s cubic-bezier(.2,.8,.2,1) both;
  }
  .top-view-nav[data-slide="inbox-chat"]::before {
    animation: top-nav-slide-inbox-chat 0.26s cubic-bezier(.2,.8,.2,1) both;
  }
  @keyframes top-nav-slide-chat-inbox {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100% + var(--nav-gap))); }
  }
  @keyframes top-nav-slide-inbox-chat {
    from { transform: translateX(calc(100% + var(--nav-gap))); }
    to { transform: translateX(0); }
  }
  .top-view-nav-item {
    position: relative;
    z-index: 1;
    min-height: 24px;
    min-width: 0;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--c-muted);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: color 0.15s ease;
  }
  .top-view-nav-item:hover {
    color: var(--c-text);
  }
  .top-view-nav-item[data-active="true"] {
    color: var(--brand-ink);
  }
  .top-view-nav-icon {
    width: 13px;
    height: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .top-view-nav-badge {
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(24,57,92,0.08);
    color: var(--c-muted);
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
  }
  @media (prefers-reduced-motion: reduce) {
    .top-view-nav::before,
    .top-view-nav-item {
      animation: none;
      transition: none;
    }
  }
  /* Arrivo 的 o 作为呼吸灯 */
  .brand-letter {
    transition: color 0.6s ease;
    color: var(--brand-navy);
  }
  .brand-letter.breathing {
    animation: letter-breathe 2.4s ease-in-out infinite;
  }
  @keyframes letter-breathe {
    0%, 100% { color: var(--brand-navy); text-shadow: 1px 2px 4px rgba(24,57,92,0.10); }
    50%      { color: var(--brand-amber); text-shadow: 0 0 8px rgba(232,153,53,0.5); }
  }
  .sidebar-nav {
    display: flex; flex-direction: column;
    gap: 1px;
    margin-top: 4px;
    padding: 4px 0;
    border-top: 1px solid var(--c-border-soft);
  }
  .sb-item {
    position: relative;
    display: flex; align-items: center; gap: 9px;
    padding: 6px 9px 6px 13px;
    border-radius: 5px;
    font-size: 13px;
    color: var(--c-muted);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    text-align: left;
    width: 100%;
    line-height: 1.4;
  }
  .sb-item:hover { background: var(--c-border-soft); color: var(--c-text); }
  /* 选中态：amber 软底 + amber 强色 + 左侧 3px 竖条锚点；与未选中差异显著 */
  .sb-item[data-active="true"] {
    background: var(--c-accent-soft);
    color: var(--brand-amber-strong);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(232,153,53,0.22);
  }
  .sb-item[data-active="true"]::before {
    content: "";
    position: absolute;
    left: 4px; top: 7px; bottom: 7px;
    width: 3px;
    background: var(--brand-amber);
    border-radius: 999px;
  }
  .sb-item.disabled { opacity: 0.4; cursor: default; pointer-events: none; }
  .sb-item .sb-icon {
    width: 16px; height: 16px;
    display: inline-flex; flex-shrink: 0;
    color: currentColor;
  }
  .sb-item .sb-badge {
    margin-left: auto;
    font-size: 10px;
    background: var(--c-accent);
    color: #fff;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 500;
    line-height: 1.4;
  }
  .sb-item[data-active="true"] .sb-badge { background: var(--brand-amber); }
  .sidebar-shortcuts {
    margin-top: auto;
    padding: 8px 10px 16px;
    display: flex; flex-wrap: wrap; gap: 8px;
    font-size: 10px;
    color: var(--c-muted-soft);
  }
  .sidebar-shortcuts kbd {
    margin-right: 3px;
    font-family: var(--font-mono);
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    background: var(--c-border-soft);
    color: var(--c-muted);
  }
  /* 主区 topbar (desktop) */
  .topbar-desktop {
    display: none;
  }
  @media (min-width: 768px) {
    .topbar-desktop { display: flex; align-items: baseline; gap: 10px; }
  }
  /* page-title 用 display serif（macOS New York / Win Georgia / CN PingFang），编辑头版感 */
  .page-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.018em;
    color: var(--c-text);
    line-height: 1.2;
  }
  /* page-sub 用 mono — 日期/数字工整对齐 */
  .page-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--c-muted);
    letter-spacing: 0.01em;
  }

  /* ─── 任务行 ─── */
  .task-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px;
    border-radius: 6px;
    transition: background 0.1s;
    user-select: none;
    -webkit-touch-callout: none;
  }
  .task-row:hover { background: var(--c-border-soft); }
  .task-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .task-open {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 5px;
  }
  .task-open:focus-visible {
    outline: 2px solid var(--brand-amber);
    outline-offset: 2px;
  }
  .task-main .item-title {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .task-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 10.5px;
    line-height: 1.25;
    color: var(--brand-amber-strong);
  }
  .task-meta svg {
    flex: 0 0 auto;
  }
  .task-row.pending {
    background: var(--brand-amber-soft);
    border: 1px dashed var(--brand-amber-mid);
    position: relative;
  }
  .task-pending-hint {
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid var(--brand-amber-mid);
    background: #fff;
    color: var(--brand-amber-strong);
    font-size: 11px;
    line-height: 1;
    padding: 6px 8px;
    white-space: nowrap;
  }
  .tasks-empty {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 12px;
    color: var(--c-muted);
    font-size: 12px;
  }
  .tasks-empty-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(24,57,92,0.06);
    color: var(--c-muted);
    flex: 0 0 auto;
  }
  .tasks-empty-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .check {
    width: 18px; height: 18px; border-radius: 5px;
    border: 1.5px solid #d6d3d1;
    display: grid; place-items: center;
    font-size: 11px;
    flex-shrink: 0;
  }
  .check[data-done="true"] { background: var(--brand-amber); border-color: var(--brand-amber); color: #fff; }
  .check[data-done="true"]::after { content: "✓"; font-size: 12px; line-height: 1; }
  .check[data-pending="true"] { border-color: var(--brand-amber-mid); border-style: dashed; }

  /* ─── 视图切换胶囊（桌面） ─── */
  .view-nav {
    display: flex; gap: 2px;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    padding: 3px;
  }
  .view-nav button {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--c-muted);
    display: flex; align-items: center; gap: 6px;
  }
  .view-nav button[data-active="true"] {
    background: var(--c-text); color: #fff;
  }
  .view-nav .badge {
    background: var(--c-pending);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    line-height: 1;
  }
  .view-nav button[data-active="true"] .badge {
    background: rgba(255,255,255,0.22);
  }
  .tab-badge {
    position: absolute;
    top: 4px; right: 18px;
    background: var(--c-accent);
    color: #fff;
    font-size: 9px;
    padding: 0 4px; min-width: 14px;
    height: 14px; line-height: 14px;
    border-radius: 999px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 0 0 2px var(--c-surface);
  }

  /* ─── Inbox 行 ─── */
  .inbox-view {
    min-height: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .inbox-structured-layout {
    display: grid;
    grid-template-rows: minmax(220px, 54fr) minmax(188px, 46fr);
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
  }
  .inbox-section-header {
    align-items: center;
    padding-top: 8px;
    padding-bottom: 5px;
    margin-bottom: 5px !important;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(10px);
  }
  .inbox-section-header .section-meta {
    max-width: min(258px, calc(100vw - 126px));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
  }
  .inbox-section-header .section-add-btn {
    min-height: 30px;
    padding: 0 8px;
    gap: 4px;
    border: 1px solid rgba(24,57,92,0.07);
    background: rgba(255,255,255,0.54);
  }
  .inbox-structured-top,
  .inbox-structured-bottom {
    min-width: 0;
  }
  .inbox-structured-top {
    margin: 0 8px 2px;
    padding-bottom: 2px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .inbox-structured-top::-webkit-scrollbar {
    display: none;
  }
  .inbox-inline-filter {
    min-width: 0;
    margin: 3px 0 1px;
    padding: 0 1px 1px;
  }
  .inbox-inline-filter .tag-filter-row {
    gap: 4px;
    padding: 1px 0 0;
  }
  .inbox-inline-filter .tag-chip {
    gap: 4px;
    min-height: 22px;
    padding: 1px 6px;
    font-size: 11px;
    line-height: 1.15;
  }
  .inbox-inline-filter .tag-chip-count {
    font-size: 9px;
  }
  .inbox-inline-filter .tag-chip-all {
    color: var(--c-muted);
    background: transparent;
    border-color: rgba(24,57,92,0.10);
  }
  .inbox-inline-filter .tag-chip-all.tag-chip-active {
    color: var(--c-text);
    background: rgba(24,57,92,0.05);
    border-color: rgba(24,57,92,0.12);
  }
  .inbox-inline-filter .tag-dot {
    width: 5px;
    height: 5px;
  }
  .inbox-pending-brief {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: 4px 0 0;
    padding: 4px 1px 0;
    border-top: 1px solid rgba(24,57,92,0.06);
  }
  .inbox-pending-brief-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--c-muted);
    font-size: 10.5px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .inbox-pending-brief-chips {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .inbox-pending-brief-chips::-webkit-scrollbar {
    display: none;
  }
  .inbox-pending-brief-chips span {
    min-height: 19px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(250,250,249,0.72);
    color: var(--c-muted);
    font-size: 9.8px;
    white-space: nowrap;
  }
  .inbox-structured-bottom {
    position: relative;
    margin: 0 8px 0;
    padding-top: 11px;
    border-top: 1px dashed rgba(24,57,92,0.18);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .inbox-structured-bottom::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 0;
    right: 0;
    border-top: 1px dashed rgba(24,57,92,0.14);
    pointer-events: none;
  }
  .inbox-panel-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 1px;
    color: var(--c-muted);
    font-size: 11px;
    line-height: 1.2;
  }
  .inbox-panel-label span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 650;
    color: var(--brand-ink);
  }
  .inbox-panel-label small {
    min-width: max-content;
    color: var(--c-muted);
    font-size: 10px;
  }
  .inbox-panel-actions {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }
  .inbox-completed-toggle {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 6px;
    border-radius: 6px;
    color: var(--c-muted-soft);
    font-size: 10px;
    font-weight: 560;
    line-height: 1;
    cursor: pointer;
    opacity: 0.72;
    transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  }
  .inbox-completed-toggle:hover {
    color: var(--c-muted);
    background: rgba(24,57,92,0.04);
    opacity: 1;
  }
  .inbox-completed-toggle[aria-pressed="true"] {
    color: var(--brand-ink);
    background: rgba(255,255,255,0.56);
    opacity: 0.86;
  }
  .inbox-management {
    display: grid;
    gap: 5px;
    margin: 5px 0 4px;
  }
  .inbox-day-strip {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    overflow: hidden;
    scrollbar-width: none;
    padding: 2px 1px;
    color: var(--c-muted);
  }
  .inbox-day-strip span {
    flex: 0 0 auto;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.64);
    color: var(--c-muted);
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
  }
  .inbox-day-strip .inbox-day-strip-summary {
    flex: 1 1 auto;
    justify-content: flex-start;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--brand-ink);
    font-family: inherit;
    font-size: 11px;
    font-weight: 650;
    background: transparent;
    padding-left: 0;
  }
  .inbox-day-strip .inbox-day-strip-summary em {
    color: var(--c-text);
    font-style: normal;
    font-size: 11px;
    font-weight: 760;
  }
  .inbox-day-strip .inbox-day-strip-summary strong {
    color: var(--c-text);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 760;
  }
  .inbox-day-strip .inbox-day-strip-attention {
    max-width: min(176px, 42vw);
    color: var(--brand-amber-strong);
    background: rgba(232,153,53,0.10);
    font-family: inherit;
    font-weight: 680;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .inbox-day-strip .inbox-day-strip-empty {
    color: var(--c-muted);
    background: transparent;
    border: 1px dashed rgba(24,57,92,0.12);
    font-family: inherit;
  }
  .inbox-day-strip strong {
    color: var(--c-text);
    font-size: 11px;
    font-weight: 760;
  }
  .inbox-date-box {
    display: grid;
    gap: 0;
  }
  .inbox-date-presets {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
    padding: 1px 0 2px;
  }
  .inbox-date-preset {
    min-width: 0;
    width: 100%;
    min-height: 32px;
    padding: 2px 0;
    border: 1px solid rgba(24,57,92,0.08);
    border-radius: 7px;
    background: rgba(255,255,255,0.48);
    color: var(--c-muted);
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
  .inbox-date-preset span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.05;
  }
  .inbox-date-preset small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--c-muted);
    font-family: var(--font-mono);
    font-size: 9.5px;
    line-height: 1.05;
  }
  .inbox-date-preset.active small {
    color: var(--brand-amber-strong);
  }
  @media (max-width: 480px) {
    .inbox-structured-layout {
      grid-template-rows: minmax(214px, 54fr) minmax(182px, 46fr);
    }
    .inbox-structured-bottom {
      min-height: 0;
      padding-top: 10px;
    }
    #inbox-list {
      padding-bottom: 1px !important;
    }
    .inbox-day-strip span {
      min-height: 21px;
      padding: 0 6px;
      font-size: 9.8px;
    }
    .inbox-date-preset {
      min-height: 31px;
      font-size: 10.5px;
    }
    .inbox-date-preset small {
      font-size: 8.8px;
    }
  }
  .inbox-date-preset.active {
    color: var(--brand-ink);
    border-color: rgba(232,153,53,0.26);
    background: rgba(232,153,53,0.10);
  }
  .inbox-management-empty {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(24,57,92,0.08);
    padding-top: 6px;
    color: var(--c-muted);
    font-size: 12px;
  }
  .inbox-structured-bottom > .empty-state {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 16px 12px;
  }
  #inbox-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    padding-bottom: 1px !important;
  }
  #inbox-list::-webkit-scrollbar {
    display: none;
  }
  .inbox-completed-list {
    flex: 1 1 auto;
    min-height: 0;
    padding: 2px 2px 2px;
  }
  .inbox-completed-empty {
    min-height: 72px;
    display: grid;
    place-items: center;
    color: var(--c-muted);
    font-size: 12px;
  }
  .inbox-management-section {
    border-top: 1px solid rgba(24,57,92,0.08);
    padding-top: 4px;
  }
  .inbox-management-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 4px;
    color: var(--c-muted);
    font-size: 11px;
    line-height: 1.2;
  }
  .inbox-management-head span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
  }
  .inbox-management-list {
    display: grid;
    gap: 1px;
  }
  .inbox-manage-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 2px 0;
    border-radius: 7px;
  }
  .inbox-manage-row:hover {
    background: rgba(255,255,255,0.54);
  }
  .inbox-manage-check {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--c-border-soft);
    border-radius: 7px;
    color: var(--brand-amber-strong);
    background: rgba(255,255,255,0.68);
    font-size: 12px;
    line-height: 1;
  }
  .inbox-manage-row[data-done="true"] .inbox-manage-check {
    color: #fff;
    border-color: var(--brand-amber);
    background: var(--brand-amber);
  }
  .inbox-manage-row[data-done="true"] {
    opacity: 0.66;
  }
  .inbox-manage-row[data-done="true"] .inbox-manage-title {
    color: var(--c-muted);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(120,113,108,0.55);
  }
  .inbox-manage-row[data-done="true"] .inbox-manage-meta {
    color: var(--c-muted-soft);
  }
  .inbox-manage-main {
    min-width: 0;
    display: grid;
    gap: 1px;
    text-align: left;
    border-radius: 7px;
    padding: 2px 4px;
  }
  .inbox-manage-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-text);
    font-size: 12.5px;
    font-weight: 560;
    line-height: 1.25;
  }
  .inbox-manage-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    color: var(--c-muted);
    font-size: 10.5px;
    line-height: 1.2;
  }
  .inbox-manage-meta > span {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .inbox-item {
    display: flex; align-items: flex-start; gap: 6px;
    padding: 2px 0;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background 0.1s, border-color 0.1s, opacity 0.18s;
    user-select: none;
  }
  .inbox-item:hover {
    background: var(--c-border-soft);
  }
  .inbox-item[data-selected="true"] {
    background: var(--brand-amber-soft);
    border-color: var(--brand-amber-mid);
  }
  .inbox-item.processing {
    opacity: 0.55;
    pointer-events: none;
  }
  .inbox-item.snoozed {
    padding: 5px 6px;
    border-color: rgba(24,57,92,0.08);
    background: rgba(255,255,255,0.62);
  }
  .inbox-item.snoozed .dot {
    background: #a8a29e;
    opacity: 0.7;
  }
  /* archiveReuse 之后落到清单队尾的一次性入场 — flash 字段在 attach() 里同帧清掉，
     所以后续 render 不会再加这个 class，不会重放。 */
  .inbox-item.arriving {
    animation: inbox-arrive 0.55s cubic-bezier(0.32, 0.72, 0, 1);
  }
  @keyframes inbox-arrive {
    0%   { opacity: 0; transform: translateY(-6px); box-shadow: 0 0 0 0 rgba(232,153,53,0); background: #FFF8EC; }
    35%  { opacity: 1; transform: none; box-shadow: 0 0 0 4px rgba(232,153,53,0.18); background: #FFF8EC; }
    100% { opacity: 1; transform: none; box-shadow: 0 0 0 0 rgba(232,153,53,0); background: transparent; }
  }
  .inbox-item[data-draggable="true"] {
    /* live-shift: 被推让的其他行需要 transform 过渡才平滑 */
    transition: transform 0.18s cubic-bezier(0.32, 0.72, 0, 1);
  }
  /* 左列：可选框在上，拖动手柄（仅选中时出现）在下，撑满整行高度 */
  .inbox-left {
    display: flex; flex-direction: column; align-items: center;
    align-self: stretch; flex-shrink: 0; gap: 2px;
  }
  .inbox-drag-handle {
    flex: 1; min-height: 14px;
    display: flex; align-items: center; justify-content: center;
    width: 18px;
    color: #c4c0bb;
    cursor: grab; touch-action: none;
    border-radius: 4px;
  }
  .inbox-drag-handle:hover { color: var(--brand-amber); background: var(--c-border-soft); }
  .inbox-drag-handle:active { cursor: grabbing; }
  .inbox-item[data-dragging="true"] {
    cursor: grabbing;
    z-index: 10;
    box-shadow: 0 14px 32px -10px rgba(24,57,92,0.22);
    background: #fff !important;
    border-color: var(--c-border);
    will-change: transform;
    transition: none;  /* 源行跟手，无过渡 */
  }
  /* 拖动期间的"原位置 ghost" — 单独 absolute 元素，独立于 source 的 transform */
  .reorder-ghost {
    position: absolute;
    border: 1.5px dashed var(--c-accent-border);
    background: var(--c-accent-soft);
    border-radius: 6px;
    opacity: 0.55;
    pointer-events: none;
    z-index: 1;
  }
  .inbox-item .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--brand-amber);
    margin-top: 4px; flex-shrink: 0;
    opacity: 0.5;
  }
  .inbox-item.processing .dot {
    opacity: 1;
    animation: ai-pulse 1.4s ease-in-out infinite;
  }
  @keyframes ai-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50%      { transform: scale(1.4); opacity: 1; }
  }
  .inbox-item .meta {
    font-size: 11px; color: #a8a29e; margin-top: -1px; line-height: 1.18;
  }
  .inbox-meta-strip {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    min-width: 0;
  }
  .inbox-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 18px;
    max-width: 100%;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(120,113,108,0.07);
    color: var(--c-muted);
    font-size: 10.5px;
    font-weight: 560;
    line-height: 1.2;
    white-space: nowrap;
  }
  .inbox-meta-chip.ai {
    background: rgba(232,153,53,0.08);
    color: var(--brand-amber-strong);
  }
  .inbox-meta-strip .tag-edit-btn,
  .inbox-manage-meta .tag-edit-btn {
    min-width: 0;
    min-height: 0;
    display: inline-flex;
    align-items: center;
  }
  /* AI 标记的"为什么先排"理由：和 meta 同字号同颜色风格，琥珀色高亮区分 */
  .inbox-item .meta .ai-reason {
    color: var(--brand-amber-strong);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 180px;
    min-height: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(232,153,53,0.08);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .inbox-group {
    padding: 1px 0 4px;
  }
  .inbox-group:last-child {
    padding-bottom: 0;
  }
  .inbox-group[data-kind="tag"] {
    padding-top: 3px;
  }
  .inbox-group + .inbox-group {
    margin-top: 4px;
    border-top: 1px solid var(--c-border-soft);
    padding-top: 5px;
  }
  .inbox-group[data-kind="tag"] + .inbox-group[data-kind="tag"] {
    margin-top: 4px;
    padding-top: 6px;
    border-top-style: dashed;
  }
  .inbox-group-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 1px;
    min-width: 0;
  }
  .inbox-group-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--c-text);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    min-width: 0;
  }
  .inbox-group-soft {
    margin-left: 5px;
    font-size: 10px;
    font-weight: 650;
    color: var(--brand-amber-strong);
    opacity: 0.78;
  }
  .inbox-group-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
    color: var(--c-muted);
    text-align: right;
  }
  .inbox-checkbox {
    width: 18px; height: 18px;
    border: 1.5px solid #d6d3d1;
    border-radius: 5px;
    display: grid; place-items: center;
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 0;
    transition: background 0.12s, border-color 0.12s;
  }
  .inbox-checkbox:hover { border-color: var(--brand-amber); }
  .inbox-checkbox[data-checked="true"] {
    background: var(--brand-amber);
    border-color: var(--brand-amber);
    color: #fff;
  }
  .inbox-actions {
    display: flex; gap: 4px; margin-left: auto;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    max-width: min(220px, 40vw);
    opacity: 1;
    transition: opacity 0.15s;
  }
  .inbox-actions-mobile {
    display: none;
  }
  .inbox-action {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 5px;
    background: #fff;
    border: 1px solid var(--c-border);
    color: var(--c-text);
    white-space: nowrap;
    transition: border-color 0.1s, background 0.1s, color 0.1s;
  }
  .inbox-action:hover { border-color: var(--brand-amber-mid); background: var(--brand-amber-soft); }
  .inbox-action-icon {
    width: 26px;
    min-width: 26px;
    padding-left: 0;
    padding-right: 0;
  }
  .inbox-discard-confirm {
    align-items: center;
    max-width: min(360px, 62vw);
  }
  .inbox-discard-confirm-copy {
    color: var(--c-muted);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
  }
  .inbox-action-life {
    color: #166534;
    border-color: #bbf7d0;
    background: #f0fdf4;
  }
  .inbox-action-life:hover {
    color: #14532d;
    border-color: #86efac;
    background: #dcfce7;
  }
  .inbox-action.danger:hover { border-color: #fecaca; background: #fef2f2; color: var(--c-danger); }
  .inbox-action-more {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid var(--c-border);
    background: rgba(255,255,255,0.82);
    color: var(--c-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
  }
  .inbox-action-more-wrap {
    position: relative;
    display: inline-flex;
  }
  .inbox-action-more:hover,
  .inbox-actions-mobile[data-open="true"] .inbox-action-more {
    border-color: var(--brand-amber-mid);
    background: var(--brand-amber-soft);
    color: var(--brand-amber-strong);
  }
  .inbox-action-menu {
    position: absolute;
    right: 0;
    top: 34px;
    z-index: 20;
    min-width: 112px;
    padding: 4px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background: rgba(255,255,255,0.97);
    box-shadow: 0 12px 28px -18px rgba(24,57,92,0.35);
  }
  .inbox-action-menu-item {
    width: 100%;
    min-height: 30px;
    border-radius: 6px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--c-text);
    text-align: left;
  }
  .inbox-action-menu-item:hover {
    background: var(--c-border-soft);
  }
  .inbox-action-menu-item.danger {
    color: var(--c-danger);
  }
  .snoozed-inbox-section {
    margin: 4px 8px 14px;
    padding-top: 10px;
    border-top: 1px solid var(--c-border-soft);
  }
  .snoozed-inbox-title {
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--c-muted);
  }
  @media (max-width: 767px) {
    .inbox-item {
      flex-wrap: nowrap;
      gap: 5px;
      align-items: flex-start;
      padding: 3px 0;
    }
    .inbox-left {
      width: 36px;
      gap: 0;
    }
    .inbox-checkbox {
      position: relative;
      width: 32px;
      height: 32px;
      border: none;
      border-radius: 9px;
      background: transparent;
    }
    .inbox-checkbox::before {
      content: "";
      width: 18px;
      height: 18px;
      border: 1.5px solid #d6d3d1;
      border-radius: 5px;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      transition: background 0.12s, border-color 0.12s;
    }
    .inbox-checkbox:hover::before {
      border-color: var(--brand-amber);
    }
    .inbox-checkbox[data-checked="true"] {
      background: transparent;
      border-color: transparent;
    }
    .inbox-checkbox[data-checked="true"]::before {
      background: var(--brand-amber);
      border-color: var(--brand-amber);
    }
    .inbox-drag-handle {
      width: 32px;
      min-height: 10px;
    }
    .inbox-actions-desktop {
      display: none;
    }
    .inbox-actions-mobile {
      position: relative;
      display: flex;
      align-items: center;
      flex: 0 0 auto;
      gap: 4px;
      margin-left: 4px;
    }
    .inbox-action {
      min-height: 32px;
      min-width: 34px;
      padding: 0 8px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .inbox-actions-mobile .inbox-action.mobile-quick {
      min-width: 0;
      height: 30px;
      min-height: 30px;
      padding: 0 7px;
      gap: 4px;
      font-size: 11px;
      border-radius: 7px;
    }
    .inbox-actions-mobile .inbox-action.mobile-quick.inbox-action-icon {
      width: 30px;
      min-width: 30px;
      padding-left: 0;
      padding-right: 0;
    }
    .inbox-actions-mobile.inbox-discard-confirm {
      gap: 3px;
      margin-left: 2px;
    }
    .inbox-actions-mobile.inbox-discard-confirm .inbox-action.mobile-quick {
      padding: 0 6px;
    }
    .inbox-item.snoozed .inbox-action {
      min-height: 32px;
      min-width: 34px;
    }
    .inbox-group-head {
      align-items: flex-start;
      flex-direction: column;
      gap: 2px;
    }
    .inbox-group-meta {
      max-width: 100%;
      text-align: left;
    }
  }

  /* 归档行删除按钮 */
  .archive-row { position: relative; }
  .archive-row .archive-delete {
    opacity: 0;
    font-size: 11px;
    color: #a8a29e;
    padding: 1px 6px;
    border-radius: 5px;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    margin-left: 4px;
    flex-shrink: 0;
  }
  .archive-row:hover .archive-delete { opacity: 0.7; }
  .archive-row .archive-delete:hover { opacity: 1; color: var(--c-danger); background: #fef2f2; }
  /* "再来一次"按钮 */
  .archive-row .archive-reuse {
    opacity: 0;
    font-size: 12px;
    color: #a8a29e;
    padding: 1px 6px;
    border-radius: 5px;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    margin-left: 4px;
    flex-shrink: 0;
  }
  .archive-row:hover .archive-reuse { opacity: 0.7; }
  .archive-row .archive-reuse:hover { opacity: 1; color: var(--brand-amber-strong); background: var(--c-accent-soft); }
  /* "完成 X/N 次"小标签 */
  .archive-row .archive-extra {
    font-size: 10px;
    color: var(--brand-amber-strong);
    background: var(--c-accent-soft);
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: 4px;
    font-family: var(--font-mono);
  }
  /* 去向：点一下跳到该日程所在的那天 */
  .archive-row .archive-dest {
    font-size: 10px;
    color: var(--brand-amber);
    background: var(--brand-amber-soft);
    padding: 1px 7px;
    border-radius: 999px;
    flex-shrink: 0;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: background 0.15s;
  }
  .archive-row .archive-dest:hover { background: var(--c-accent-soft); color: var(--brand-amber-strong); }
  @media (max-width: 767px) {
    .archive-row .archive-delete, .archive-row .archive-reuse { opacity: 0.55; }
  }

  /* session "第 X 次" 角标 */
  .series-badge {
    display: inline-flex; align-items: center;
    font-size: 10px;
    color: var(--c-muted);
    background: var(--c-border-soft);
    padding: 1px 7px;
    border-radius: 999px;
    margin-right: 6px;
    font-family: var(--font-mono);
    line-height: 1.5;
  }
  /* item editor 的 series ref 段 */
  .ie-series {
    background: var(--c-accent-soft);
    border: 1px solid var(--c-accent-border);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 12px;
    display: flex; align-items: center; gap: 8px;
  }
  .ie-series-label {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 10px; color: var(--brand-amber-strong); font-weight: 500;
  }
  .ie-series-ref { color: var(--c-text); font-weight: 500; }

  .mobile-head-action {
    min-width: 36px;
    min-height: 36px;
    display: grid;
    place-items: center;
  }
  @media (max-width: 767px) {
  }

  /* 月历 popover — 简洁 anchored popover */
  .datepicker-overlay {
    position: fixed; inset: 0;
    z-index: 70;
  }
  .datepicker-panel {
    position: fixed;
    z-index: 71;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    box-shadow: 0 12px 36px -8px rgba(9,9,11,0.16);
    padding: 6px;
    width: 260px;
    animation: dp-pop-in 0.18s ease-out;
  }
  @keyframes dp-pop-in {
    from { opacity: 0; transform: translateY(-4px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  .datepicker-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 2px 6px;
  }
  .datepicker-nav button {
    width: 26px; height: 26px;
    border-radius: 6px;
    background: transparent;
    color: var(--c-text);
    font-size: 16px;
    border: none; cursor: pointer;
    display: grid; place-items: center;
  }
  .datepicker-nav button:hover { background: var(--c-bg); }
  .datepicker-nav .month-label {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 13px;
    color: var(--brand-amber);
  }
  .datepicker-dows {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    margin-bottom: 2px;
  }
  .datepicker-dows .dow {
    text-align: center;
    font-size: 9px;
    font-weight: 600;
    color: var(--c-muted-soft);
    letter-spacing: 0.04em;
    padding: 2px 0 4px;
  }
  .datepicker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }
  .datepicker-grid .day {
    height: 32px;
    border-radius: 6px;
    display: grid; place-items: center;
    font-size: 12px;
    font-weight: 400;
    color: var(--c-text);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
  }
  .datepicker-grid .day:hover { background: var(--c-bg); }
  .datepicker-grid .day.today { font-weight: 600; color: var(--brand-amber); }
  .datepicker-grid .day.selected { background: var(--brand-amber); color: #fff; font-weight: 600; }
  .datepicker-grid .day.selected:hover { background: var(--brand-amber-strong); }
  .datepicker-grid .day.empty { pointer-events: none; }
  .datepicker-grid .day { position: relative; }
  /* 角标：无背景，只一个 amber 小数字浮在右上角，不挡日期数字 */
  .day-badge {
    position: absolute;
    top: 1px; right: 3px;
    font-size: 8px;
    font-weight: 600;
    color: var(--brand-amber);
    font-family: var(--font-mono);
    line-height: 1;
    pointer-events: none;
    letter-spacing: -0.03em;
  }
  .datepicker-grid .day.selected .day-badge { color: #fff; opacity: 0.85; }
  .datepicker-grid .day.today .day-badge { color: var(--brand-amber-strong); }

  @media (max-width: 767px) {
    .datepicker-panel {
      right: 8px;
    }
  }

  .assistant-review-card {
    margin: 8px 8px 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(24,57,92,0.10);
    border-radius: 8px;
    background: rgba(255,255,255,0.72);
    box-shadow: none;
  }
  .assistant-review-card[data-status="running"] .assistant-review-icon svg {
    animation: review-spin 1s linear infinite;
  }
  .assistant-review-card[data-status="running"] .assistant-review-avatar {
    animation: avatar-breathe 1.5s ease-in-out infinite;
  }
  .assistant-review-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--brand-amber-soft);
    color: var(--brand-amber-strong);
  }
  .assistant-review-body { flex: 1; min-width: 0; }
  .assistant-review-kicker {
    margin-bottom: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--brand-amber-strong);
  }
  .assistant-workbench-moment {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid rgba(232,153,53,0.18);
    background: rgba(232,153,53,0.09);
    color: var(--brand-amber-strong);
    font-size: 10px;
    font-weight: 760;
    line-height: 1;
    white-space: nowrap;
  }
  .assistant-workbench-moment[data-kind="knowledge"] {
    border-color: rgba(111,115,80,0.16);
    background: rgba(111,115,80,0.10);
    color: #546A2A;
  }
  .assistant-workbench-moment[data-kind="wrapup"],
  .assistant-workbench-moment[data-kind="reminder"] {
    border-color: rgba(37,99,235,0.12);
    background: rgba(37,99,235,0.07);
    color: #1d4ed8;
  }
  .assistant-review-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .assistant-review-meta {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--c-muted);
    line-height: 1.35;
  }
  .assistant-workbench-status {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .assistant-workbench-status::-webkit-scrollbar {
    display: none;
  }
  .assistant-workbench-status-chip {
    flex: 0 0 auto;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 7px;
    border: 1px solid rgba(24,57,92,0.08);
    border-radius: 999px;
    background: rgba(255,255,255,0.62);
    color: var(--c-muted);
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
  }
  .assistant-workbench-status-chip[data-kind="pending"] {
    color: var(--brand-amber-strong);
    border-color: rgba(232,153,53,0.24);
    background: rgba(232,153,53,0.08);
  }
  .assistant-workbench-status-chip[data-kind="attention"] {
    color: #546A2A;
    border-color: rgba(111,115,80,0.14);
    background: rgba(111,115,80,0.06);
  }
  .assistant-workbench-status-chip[data-kind="memory"] {
    color: #4F625E;
    border-color: rgba(78,122,108,0.16);
    background: rgba(78,122,108,0.07);
  }
  .assistant-workbench-purpose {
    margin-top: 5px;
    min-width: 0;
    display: flex;
  }
  .assistant-workbench-purpose span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 4px 6px;
    border-radius: 7px;
    background: rgba(255,255,255,0.50);
    color: var(--c-muted);
    font-size: 10.5px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .assistant-workbench-purpose[data-kind="morning"] span,
  .assistant-workbench-purpose[data-kind="today"] span {
    color: #365D6B;
    background: rgba(52, 120, 142, 0.08);
  }
  .assistant-workbench-purpose[data-kind="wrapup"] span,
  .assistant-workbench-purpose[data-kind="reminder"] span {
    color: #6F5632;
    background: rgba(232,153,53,0.10);
  }
  .assistant-workbench-purpose[data-kind="knowledge"] span {
    color: #4F625E;
    background: rgba(78,122,108,0.08);
  }
  .assistant-workbench-cadence {
    margin-top: 5px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .assistant-workbench-cadence::-webkit-scrollbar {
    display: none;
  }
  .assistant-workbench-cadence span {
    flex: 0 0 auto;
    min-height: 24px;
    display: inline-grid;
    grid-template-columns: auto auto;
    grid-template-areas:
      "icon label"
      "icon sub";
    align-items: center;
    column-gap: 4px;
    padding: 3px 7px;
    border-radius: 8px;
    border: 1px solid rgba(24,57,92,0.07);
    background: rgba(255,255,255,0.38);
    color: var(--c-muted);
    line-height: 1;
    white-space: nowrap;
  }
  .assistant-workbench-cadence svg {
    grid-area: icon;
    color: rgba(24,57,92,0.52);
  }
  .assistant-workbench-cadence strong {
    grid-area: label;
    color: var(--brand-ink);
    font-size: 10px;
    font-weight: 720;
  }
  .assistant-workbench-cadence small {
    grid-area: sub;
    color: var(--c-muted);
    font-size: 9px;
    line-height: 1.05;
  }
  .assistant-workbench-cadence span[data-active="true"] {
    border-color: rgba(232,153,53,0.24);
    background: rgba(232,153,53,0.11);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.62);
  }
  .assistant-workbench-cadence span[data-active="true"] svg,
  .assistant-workbench-cadence span[data-active="true"] strong {
    color: var(--brand-amber-strong);
  }
  .assistant-workbench-handoff {
    display: grid;
    gap: 4px;
  }
  .assistant-workbench-handoff-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 5px 7px;
    border: 1px solid rgba(24,57,92,0.07);
    border-radius: 8px;
    background: rgba(255,255,255,0.48);
  }
  .assistant-workbench-handoff-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--brand-amber-strong);
    background: rgba(232,153,53,0.10);
  }
  .assistant-workbench-handoff-main {
    min-width: 0;
    display: grid;
    gap: 1px;
  }
  .assistant-workbench-handoff-main strong,
  .assistant-workbench-handoff-main small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .assistant-workbench-handoff-main strong {
    color: var(--c-text);
    font-size: 11px;
    font-weight: 720;
    line-height: 1.15;
  }
  .assistant-workbench-handoff-main small {
    color: var(--c-muted);
    font-size: 10px;
    line-height: 1.15;
  }
  .assistant-workbench-handoff-row[data-tone="reminder"] .assistant-workbench-handoff-icon {
    color: #1d4ed8;
    background: rgba(37,99,235,0.08);
  }
  .assistant-workbench-handoff-row[data-tone="inbox"] .assistant-workbench-handoff-icon {
    color: #4F625E;
    background: rgba(78,122,108,0.08);
  }
  .assistant-workbench-handoff-row[data-tone="knowledge"] .assistant-workbench-handoff-icon {
    color: #1f7a5a;
    background: rgba(31,122,90,0.09);
  }
  .assistant-workbench-handoff-row[data-tone="guard"] .assistant-workbench-handoff-icon {
    color: #315b7c;
    background: rgba(49,91,124,0.08);
  }
  .assistant-workbench-handoff-row[data-tone="question"] .assistant-workbench-handoff-icon {
    color: #99620f;
    background: rgba(232,153,53,0.10);
  }
  .assistant-attention-strip {
    margin-top: 9px;
    padding: 7px 8px;
    border: 1px solid rgba(24,57,92,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.58);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px 8px;
  }
  .assistant-attention-strip[data-load="full"] {
    border-color: rgba(161, 98, 7, 0.18);
    background: rgba(255, 251, 235, 0.74);
  }
  .assistant-attention-main {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .assistant-attention-icon {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(24,57,92,0.06);
    color: var(--c-muted);
    flex: 0 0 18px;
  }
  .assistant-attention-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--c-text);
  }
  .assistant-attention-chips {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
    flex-wrap: wrap;
  }
  .assistant-attention-chips span {
    border-radius: 999px;
    padding: 2px 5px;
    background: rgba(24,57,92,0.06);
    color: #6F7350;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
  }
  .assistant-attention-advice {
    grid-column: 1 / -1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-muted);
    font-size: 10.5px;
    line-height: 1.25;
  }
  .assistant-posture-strip {
    margin-top: 7px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 7px;
    border: 1px solid rgba(111,115,80,0.12);
    border-radius: 8px;
    background: rgba(111,115,80,0.045);
    color: var(--c-muted);
    font-size: 10.5px;
    line-height: 1.2;
  }
  .assistant-posture-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(111,115,80,0.10);
    color: #6F7350;
  }
  .assistant-posture-title {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: var(--c-text);
  }
  .assistant-posture-chips {
    min-width: 0;
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    overflow: hidden;
  }
  .assistant-posture-chips span {
    flex: 0 0 auto;
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.65);
    color: #6F7350;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 650;
  }
  @media (max-width: 430px) {
    .assistant-posture-strip { align-items: flex-start; }
    .assistant-posture-chips span:nth-child(n+3) { display: none; }
  }
  .assistant-handoff-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 5px 7px;
    border: 1px solid rgba(111,115,80,0.14);
    border-radius: 7px;
    background: rgba(111,115,80,0.06);
    color: #546A2A;
    font-size: 11px;
    line-height: 1.25;
  }
  .assistant-handoff-summary-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(111,115,80,0.10);
  }
  .assistant-handoff-summary-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
  }
  .assistant-handoff-summary-advice {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-muted);
  }
  .assistant-learning-strip {
    margin-top: 7px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 6px 7px;
    border: 1px solid rgba(24,57,92,0.08);
    border-radius: 7px;
    background: rgba(255,255,255,0.50);
  }
  .assistant-profile-strip {
    margin-top: 7px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 6px 7px;
    border: 1px solid rgba(24,57,92,0.08);
    border-radius: 7px;
    background: rgba(24,57,92,0.035);
  }
  .assistant-learning-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .assistant-learning-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--brand-ink);
    background: rgba(24,57,92,0.06);
  }
  .assistant-learning-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
  }
  .assistant-learning-copy strong,
  .assistant-learning-copy small,
  .assistant-learning-next {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .assistant-learning-copy strong {
    color: var(--c-text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
  }
  .assistant-learning-copy small {
    color: var(--c-muted);
    font-size: 10.5px;
    line-height: 1.2;
  }
  .assistant-learning-next {
    color: #8A5A16;
    font-size: 10px;
    line-height: 1.2;
  }
  .assistant-learning-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .assistant-profile-options {
    grid-column: 1 / -1;
    display: flex;
    gap: 5px;
    min-width: 0;
    overflow-x: auto;
    padding-top: 1px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .assistant-profile-options::-webkit-scrollbar { display: none; }
  .assistant-profile-evidence {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
  }
  .assistant-profile-evidence span {
    max-width: 100%;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 7px;
    border-radius: 7px;
    border: 1px solid rgba(24,57,92,0.07);
    background: rgba(255,255,255,0.52);
    color: var(--c-muted);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .assistant-profile-option {
    min-height: 28px;
    max-width: 170px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(24,57,92,0.08);
    background: rgba(255,255,255,0.62);
    color: var(--brand-ink);
    font-size: 10.5px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
  }
  .assistant-profile-option:hover {
    border-color: rgba(232,153,53,0.20);
    background: rgba(232,153,53,0.08);
  }
  .assistant-learning-btn {
    min-height: 26px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
  }
  .assistant-learning-btn.primary {
    color: #fff;
    background: var(--brand-amber);
  }
  .assistant-learning-btn.ghost {
    color: var(--c-muted);
    background: rgba(24,57,92,0.05);
  }
  .assistant-rhythm-insight {
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    padding: 5px 7px;
    border: 1px solid rgba(24,57,92,0.08);
    border-radius: 7px;
    background: rgba(24,57,92,0.035);
    color: var(--c-muted);
    font-family: var(--font-mono);
    font-size: 10.5px;
    line-height: 1.25;
  }
  .assistant-rhythm-insight-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(24,57,92,0.06);
    color: var(--brand-ink);
  }
  .assistant-rhythm-insight-text {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .assistant-rhythm-insight-text span {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
  }
  .assistant-rule-strip {
    margin-top: 9px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    max-width: 100%;
  }
  .assistant-rule-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .assistant-rule-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(24,57,92,0.06);
    color: var(--c-muted);
  }
  .assistant-rule-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--c-text);
  }
  .assistant-rule-chips {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
  }
  .assistant-rule-chip {
    max-width: 100%;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 7px;
    background: rgba(24,57,92,0.06);
    color: var(--c-muted);
    font-size: 11px;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .assistant-rule-action {
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(24,57,92,0.12);
    border-radius: 7px;
    background: rgba(255,255,255,0.64);
    color: var(--brand-amber-strong);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
  }
  .assistant-rule-action:hover {
    border-color: rgba(232,153,53,0.32);
    background: rgba(232,153,53,0.09);
  }
  .assistant-focus-strip {
    margin-top: 8px;
  }
  .assistant-focus-strip + .assistant-rule-strip {
    margin-top: 6px;
  }
  .assistant-focus-strip .assistant-rule-icon {
    background: rgba(13,148,136,0.08);
    color: #0f766e;
  }
  .assistant-focus-strip .assistant-rule-action {
    color: #0f766e;
  }
  .assistant-focus-strip .assistant-rule-action:hover {
    border-color: rgba(13,148,136,0.28);
    background: rgba(13,148,136,0.08);
  }
  .assistant-local-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 9px;
  }
  .assistant-local-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid rgba(232,153,53,0.18);
    border-radius: 7px;
    background: rgba(255,255,255,0.70);
  }
  .assistant-local-row[data-knowledge="true"] {
    border-color: rgba(84,106,42,0.20);
    background: rgba(250,253,244,0.76);
  }
  .assistant-local-row.arriving {
    animation: assistant-local-arrive 0.62s cubic-bezier(0.32, 0.72, 0, 1);
  }
  @keyframes assistant-local-arrive {
    0% {
      transform: translateY(-4px);
      background: #FFF8EC;
      border-color: rgba(232,153,53,0.48);
      box-shadow: 0 0 0 0 rgba(232,153,53,0);
    }
    42% {
      transform: translateY(0);
      background: #FFF8EC;
      border-color: rgba(232,153,53,0.42);
      box-shadow: 0 0 0 4px rgba(232,153,53,0.16);
    }
    100% {
      transform: translateY(0);
      background: rgba(255,255,255,0.70);
      border-color: rgba(232,153,53,0.18);
      box-shadow: 0 0 0 0 rgba(232,153,53,0);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .assistant-pending-row.arriving,
    .assistant-local-row.arriving { animation: none; }
  }
  .assistant-local-rank {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(232,153,53,0.12);
    color: var(--brand-amber-strong);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
  }
  .assistant-local-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .assistant-local-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-text);
  }
  .assistant-local-meta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--c-muted);
  }
  .assistant-local-experiment {
    color: #546A2A;
    font-weight: 700;
  }
  .assistant-local-awaiting {
    color: var(--brand-amber-strong);
    font-weight: 600;
  }
  .assistant-local-meta-line {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    overflow: hidden;
  }
  .assistant-ai-reason {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--brand-amber-strong);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
  }
  .assistant-local-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
  }
  .assistant-local-btn {
    min-height: 28px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
  }
  .assistant-local-btn.primary {
    color: #fff;
    background: var(--brand-amber);
  }
  .assistant-local-btn.primary:hover { background: var(--brand-amber-strong); }
  .assistant-local-btn.primary.experiment {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #6F7F32;
  }
  .assistant-local-btn.primary.experiment:hover { background: #546A2A; }
  .assistant-local-btn.ghost {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--brand-amber-strong);
    border: 1px solid transparent;
    background: transparent;
  }
  .assistant-local-btn.ghost:hover {
    border-color: rgba(232,153,53,0.36);
    background: rgba(232,153,53,0.10);
  }
  .assistant-focus-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 9px;
  }
  .assistant-focus-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
  }
  .assistant-focus-section + .assistant-focus-section {
    margin-top: 2px;
  }
  .assistant-focus-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 0 2px;
    min-width: 0;
    color: var(--c-muted);
    font-family: var(--font-mono);
    font-size: 10.5px;
    line-height: 1.2;
  }
  .assistant-focus-section-head span {
    color: var(--c-text);
    font-weight: 750;
    white-space: nowrap;
  }
  .assistant-focus-section-head small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
  }
  .assistant-focus-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid rgba(232,153,53,0.18);
    border-radius: 7px;
    background: rgba(255,255,255,0.70);
    color: inherit;
    text-align: left;
  }
  .assistant-focus-row[data-overdue="true"] {
    border-color: rgba(24,57,92,0.16);
    background: rgba(255,255,255,0.82);
  }
  .assistant-focus-row[data-tomorrow="true"] {
    border-color: rgba(24,57,92,0.14);
    background: rgba(255,255,255,0.82);
  }
  .assistant-focus-row[data-tomorrow="true"] .assistant-focus-rank {
    color: var(--brand-ink);
    background: rgba(24,57,92,0.08);
  }
  .assistant-focus-row[data-weekly-carry="true"] {
    border-color: rgba(24,57,92,0.14);
    background: rgba(255,255,255,0.82);
  }
  .assistant-focus-row[data-weekly-carry="true"] .assistant-focus-rank {
    color: var(--brand-ink);
    background: rgba(24,57,92,0.08);
  }
  .assistant-focus-row[data-weekly-stale="true"] {
    border-color: rgba(232,153,53,0.30);
    background: rgba(255,248,235,0.84);
  }
  .assistant-focus-row[data-weekly-stale="true"] .assistant-focus-rank {
    color: var(--brand-amber-strong);
    background: rgba(232,153,53,0.14);
  }
  .assistant-focus-row[data-habit-preview="true"] {
    border-color: rgba(111,127,50,0.22);
    background: rgba(255,255,255,0.78);
  }
  .assistant-focus-row[data-habit-preview="true"] .assistant-focus-rank {
    color: #546A2A;
    background: rgba(111,127,50,0.12);
  }
  .assistant-focus-row[data-habit-completed="true"] {
    border-color: rgba(111,127,50,0.18);
    background: rgba(111,127,50,0.055);
  }
  .assistant-focus-row[data-habit-completed="true"] .assistant-focus-rank {
    color: #486125;
    background: rgba(111,127,50,0.14);
  }
  .assistant-focus-row[data-idea-preview="true"] {
    border-color: rgba(24,57,92,0.10);
    background: rgba(255,255,255,0.62);
  }
  .assistant-focus-row[data-idea-preview="true"] .assistant-focus-rank {
    color: var(--c-muted);
    background: rgba(24,57,92,0.06);
  }
  .assistant-focus-rank {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(232,153,53,0.12);
    color: var(--brand-amber-strong);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
  }
  button.assistant-focus-rank {
    border: 0;
    cursor: pointer;
  }
  button.assistant-focus-rank:hover {
    background: rgba(111,127,50,0.18);
  }
  .assistant-focus-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .assistant-focus-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-text);
  }
  .assistant-focus-meta {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--c-muted);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .assistant-focus-meta .assistant-ai-reason {
    margin-left: 4px;
    vertical-align: -1px;
  }
  .assistant-accepted-flow {
    min-width: 0;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--brand-amber-strong);
    font-family: var(--font-mono);
    font-size: 10.5px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .assistant-accepted-flow svg {
    flex: 0 0 auto;
  }
  .assistant-focus-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
  }
  .assistant-focus-btn {
    min-height: 28px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
  }
  .assistant-focus-btn.primary {
    color: #fff;
    background: var(--brand-amber);
  }
  .assistant-focus-btn.primary:hover { background: var(--brand-amber-strong); }
  .assistant-focus-btn.ghost {
    color: var(--brand-amber-strong);
    border: 1px solid transparent;
    background: transparent;
  }
  .assistant-focus-btn.ghost:hover {
    border-color: rgba(232,153,53,0.36);
    background: rgba(232,153,53,0.10);
  }
  .assistant-weekly-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 9px;
  }
  .assistant-weekly-stat {
    min-width: 0;
    padding: 8px 8px;
    border: 1px solid rgba(24,57,92,0.12);
    border-radius: 7px;
    background: rgba(255,255,255,0.78);
  }
  .assistant-weekly-stat span {
    display: block;
    font-size: 10.5px;
    color: var(--c-muted);
  }
  .assistant-weekly-stat strong {
    display: block;
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 17px;
    line-height: 1;
    color: var(--brand-ink);
  }
  .assistant-weekly-note {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.45;
    color: var(--c-muted);
  }
  .assistant-pending-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 8px;
  }
  .assistant-pending-summary {
    min-width: 0;
    font-size: 11.5px;
    line-height: 1.35;
    color: var(--brand-ink);
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .assistant-pending-continuation {
    min-width: 0;
    font-size: 11px;
    line-height: 1.35;
    color: var(--brand-amber-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .assistant-pending-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid rgba(24,57,92,0.10);
    border-radius: 7px;
    background: rgba(255,255,255,0.78);
  }
  .assistant-pending-row.arriving {
    animation: assistant-local-arrive 0.62s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .assistant-pending-row[data-conflict="true"] {
    border-color: rgba(180,83,9,0.30);
    background: rgba(255,251,235,0.82);
  }
  .assistant-pending-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .assistant-pending-title-line {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .assistant-pending-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 680;
    color: var(--c-text);
  }
  .assistant-pending-meta {
    font-family: var(--font-ui);
    font-size: 11px;
    color: var(--c-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    flex-wrap: wrap;
    row-gap: 3px;
  }
  .assistant-pending-understanding {
    min-width: 0;
    max-width: 100%;
    display: grid;
    gap: 3px;
  }
  .assistant-pending-understanding-primary,
  .assistant-pending-understanding-secondary {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
  }
  .assistant-pending-understanding-secondary {
    color: var(--c-muted);
  }
  .assistant-pending-summary-line {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .assistant-pending-route,
  .assistant-pending-basis,
  .assistant-pending-load {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-muted);
    font-weight: 520;
  }
  .assistant-pending-route b,
  .assistant-pending-basis b,
  .assistant-pending-load b {
    flex: 0 0 auto;
    color: var(--brand-ink);
    font-size: 10px;
    font-weight: 760;
  }
  .assistant-pending-route {
    color: #1d4ed8;
    max-width: 100%;
    font-size: 11.5px;
    font-weight: 720;
  }
  .assistant-pending-basis {
    max-width: 100%;
  }
  .assistant-pending-load {
    max-width: 100%;
    color: #6F7350;
  }
  .assistant-pending-summary-text {
    min-width: 0;
    color: var(--c-muted);
    font-weight: 520;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .assistant-life-meta {
    color: #6F7350;
    font-weight: 600;
    white-space: nowrap;
  }
  .assistant-prior-meta {
    color: var(--c-muted);
    font-weight: 500;
    white-space: nowrap;
  }
  .assistant-prior-source {
    color: var(--brand-amber-strong);
    font-weight: 650;
  }
  .assistant-prior-accept {
    appearance: none;
    border: 1px solid rgba(232,153,53,0.18);
    background: rgba(232,153,53,0.08);
    color: var(--brand-amber-strong);
    border-radius: 999px;
    padding: 0 5px;
    line-height: 1.35;
    cursor: pointer;
  }
  .assistant-prior-accept:hover {
    background: rgba(232,153,53,0.13);
  }
  .assistant-card-type,
  .chat-card-type {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    padding: 1px 5px;
    border-radius: 999px;
    border: 1px solid rgba(24,57,92,0.10);
    background: rgba(24,57,92,0.05);
    color: var(--brand-ink);
    font-size: 10.5px;
    line-height: 1.25;
    font-weight: 700;
    white-space: nowrap;
  }
  .assistant-card-type[data-kind="experiment"],
  .chat-card-type[data-kind="experiment"] {
    background: rgba(111,115,80,0.10);
    border-color: rgba(111,115,80,0.16);
    color: #546A2A;
  }
  .assistant-card-type[data-kind="stage"],
  .chat-card-type[data-kind="stage"] {
    background: rgba(30,95,186,0.08);
    border-color: rgba(30,95,186,0.14);
    color: #1E5FBA;
  }
  .assistant-card-type[data-kind="action"],
  .chat-card-type[data-kind="action"] {
    background: rgba(232,153,53,0.10);
    border-color: rgba(232,153,53,0.18);
    color: var(--brand-amber-strong);
  }
  .assistant-card-type[data-kind="rest"],
  .chat-card-type[data-kind="rest"] {
    background: rgba(120,113,108,0.08);
    border-color: rgba(120,113,108,0.14);
    color: var(--c-muted);
  }
  .assistant-card-type[data-kind="question"],
  .chat-card-type[data-kind="question"] {
    background: rgba(138,90,18,0.08);
    border-color: rgba(138,90,18,0.16);
    color: #8A5A12;
  }
  .assistant-card-type[data-kind="memory"],
  .chat-card-type[data-kind="memory"] {
    background: rgba(37,99,235,0.07);
    border-color: rgba(37,99,235,0.14);
    color: #1d4ed8;
  }
  .assistant-card-type[data-kind="routine"],
  .chat-card-type[data-kind="routine"] {
    background: rgba(111,115,80,0.08);
    border-color: rgba(111,115,80,0.14);
    color: #5f6541;
  }
  .assistant-card-type[data-kind="plan"],
  .chat-card-type[data-kind="plan"],
  .assistant-card-type[data-kind="route"],
  .chat-card-type[data-kind="route"],
  .assistant-card-type[data-kind="draft"],
  .chat-card-type[data-kind="draft"] {
    background: rgba(24,57,92,0.055);
    border-color: rgba(24,57,92,0.11);
    color: var(--brand-ink);
  }
  .inbox-life-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(111,115,80,0.08);
    color: #6F7350;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    vertical-align: -1px;
    white-space: nowrap;
  }
  .inbox-flow-chip,
  .inbox-placement-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid rgba(24,57,92,0.06);
    background: rgba(24,57,92,0.045);
    color: var(--brand-ink);
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
  }
  .inbox-flow-chip[data-kind="stage"],
  .inbox-placement-chip[data-kind="step"] {
    background: rgba(37,99,235,0.07);
    border-color: rgba(37,99,235,0.10);
    color: #1d4ed8;
  }
  .inbox-flow-chip[data-kind="light"],
  .inbox-placement-chip[data-kind="life"] {
    background: rgba(111,115,80,0.09);
    border-color: rgba(111,115,80,0.11);
    color: #5f6541;
  }
  .inbox-flow-chip[data-kind="rest"],
  .inbox-placement-chip[data-kind="rest"] {
    background: rgba(120,113,108,0.07);
    border-color: rgba(120,113,108,0.10);
    color: var(--c-muted);
  }
  .inbox-flow-chip[data-kind="must"],
  .inbox-placement-chip[data-kind="arrange"] {
    background: rgba(232,153,53,0.09);
    border-color: rgba(232,153,53,0.12);
    color: var(--brand-amber-strong);
  }
  .inbox-placement-chip[data-kind="tag"],
  .inbox-placement-chip[data-kind="organize"] {
    background: rgba(24,57,92,0.045);
    color: var(--c-muted);
  }
  .inbox-life-chip.assistant-prior-meta {
    color: var(--c-muted);
    font-weight: 500;
  }
  .inbox-life-chip.assistant-prior-source {
    color: var(--brand-amber-strong);
    font-weight: 650;
  }
  .inbox-life-chip.assistant-prior-accept {
    appearance: none;
    border: 1px solid rgba(232,153,53,0.18);
    background: rgba(232,153,53,0.08);
    color: var(--brand-amber-strong);
    border-radius: 999px;
    padding: 0 5px;
    line-height: 1.35;
    cursor: pointer;
  }
  .assistant-placement {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    max-width: 100%;
    color: var(--brand-amber-strong);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .assistant-placement[data-kind="tag"] {
    max-width: 150px;
    padding: 1px 5px;
    border-radius: 999px;
    background: var(--tag-bg);
    color: var(--tag-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .assistant-placement[data-kind="habit"] {
    color: #546A2A;
  }
  .assistant-handoff-placement {
    color: #6F7350;
    font-weight: 650;
  }
  .assistant-handoff-placement[data-handoff="rest"] {
    color: var(--c-muted);
  }
  .assistant-pending-when {
    min-width: 0;
    flex: 0 0 auto;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 1px 5px;
    border-radius: 999px;
    border: 1px solid rgba(24,57,92,0.08);
    background: rgba(24,57,92,0.04);
    color: var(--c-muted);
    font-size: 10px;
    line-height: 1.25;
    font-weight: 650;
  }
  .assistant-pending-source {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--brand-amber-strong);
  }
  .assistant-pending-source::before {
    content: "";
    width: 3px;
    height: 3px;
    margin-right: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.5;
  }
  .assistant-pending-confidence {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    color: #8A6A14;
  }
  .assistant-pending-source-note {
    min-width: 0;
    max-width: 132px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #6F7350;
    font-weight: 560;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }
  .assistant-pending-source-note svg {
    flex: 0 0 auto;
  }
  .assistant-pending-when {
    color: var(--c-muted);
  }
  .assistant-pending-confidence::before {
    content: "";
    width: 3px;
    height: 3px;
    margin-right: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.45;
  }
  .assistant-pending-conflict {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    color: #B45309;
    font-weight: 600;
  }
  .assistant-pending-conflict::before {
    content: "";
    width: 3px;
    height: 3px;
    margin-right: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.55;
  }
  .assistant-pending-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    max-width: 46%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .assistant-pending-actions::-webkit-scrollbar {
    display: none;
  }
  .assistant-pending-btn {
    min-height: 28px;
    min-width: 36px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
  }
  .assistant-pending-btn.primary {
    color: #fff;
    background: var(--brand-amber);
  }
  .assistant-pending-btn.primary:hover { background: var(--brand-amber-strong); }
  .assistant-pending-btn.ghost {
    color: #9A6A2A;
    border: 1px solid transparent;
    background: transparent;
  }
  .assistant-pending-btn.ghost:hover {
    border-color: rgba(232,153,53,0.16);
    background: rgba(232,153,53,0.10);
  }
  .assistant-pending-btn.icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 30px;
    padding: 0;
  }
  .assistant-pending-more {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 8px;
    border: 1px solid rgba(24,57,92,0.10);
    border-radius: 7px;
    background: rgba(255,255,255,0.58);
    font-size: 11px;
    color: var(--c-muted);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
  }
  .assistant-pending-more:hover {
    border-color: rgba(232,153,53,0.26);
    background: rgba(232,153,53,0.08);
    color: var(--brand-amber-strong);
  }
  .assistant-pending-shortcuts {
    align-self: flex-start;
    font-size: 10px;
    color: var(--c-muted-soft);
    line-height: 1.3;
  }
  .assistant-pending-shortcuts kbd {
    font-size: 9px;
    padding: 1px 4px;
  }
  .assistant-review-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
  }
  .assistant-review-btn {
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s, opacity 0.12s;
  }
  .assistant-review-btn.primary {
    background: var(--brand-amber);
    color: #fff;
  }
  .assistant-review-btn.primary:hover { background: var(--brand-amber-strong); }
  .assistant-review-btn.ghost {
    border: 1px solid transparent;
    color: var(--c-muted);
    background: transparent;
  }
  .assistant-review-btn.ghost:hover {
    border-color: rgba(232,153,53,0.34);
    color: var(--c-text);
    background: #fff;
  }
  .assistant-review-btn:disabled {
    opacity: 0.6;
    cursor: default;
  }
  .assistant-review-dismiss {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--c-muted);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
  }
  .assistant-review-dismiss:hover {
    background: rgba(255,255,255,0.75);
    border-color: var(--c-border);
    color: var(--c-text);
  }
  .assistant-review-close {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255,255,255,0.52);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    touch-action: manipulation;
  }
  .assistant-review-close::before {
    content: "";
    position: absolute;
    inset: -6px;
  }
  @keyframes review-spin { to { transform: rotate(360deg); } }
  @keyframes avatar-breathe {
    0%, 100% {
      transform: translateZ(0) scale(1);
      box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.58),
        0 4px 14px -10px rgba(15,31,53,0.28),
        0 0 0 0 rgba(232,153,53,0.18);
    }
    50% {
      transform: translateY(-1px) scale(1.045);
      box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.72),
        0 8px 20px -10px rgba(15,31,53,0.36),
        0 0 0 5px rgba(232,153,53,0.11);
    }
  }
  @media (max-width: 767px) {
    .assistant-review-card {
      display: grid;
      grid-template-columns: 26px minmax(0, 1fr);
      align-items: flex-start;
      gap: 8px;
      margin: 6px 6px 8px;
      padding: 8px 9px;
    }
    .assistant-review-icon {
      width: 26px;
      height: 26px;
      flex-basis: 26px;
      border-radius: 7px;
    }
    .assistant-review-actions {
      grid-column: 2;
      justify-content: flex-start;
      gap: 5px;
      max-width: 100%;
      margin-top: 6px;
      overflow-x: auto;
      flex-wrap: nowrap;
      scrollbar-width: none;
      padding-bottom: 1px;
    }
    .assistant-review-actions::-webkit-scrollbar { display: none; }
    .assistant-review-btn {
      width: auto;
      min-width: 0;
      min-height: 32px;
      height: auto;
      padding: 0 10px;
      border-radius: 8px;
    }
    .assistant-review-dismiss {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      flex: 0 0 auto;
    }
    .assistant-review-card[data-pending="true"] {
      align-items: flex-start;
    }
    .assistant-review-card[data-pending="true"] .assistant-review-actions {
      margin-top: 5px;
    }
    .assistant-review-card[data-pending="true"] .assistant-review-btn {
      min-width: 0;
      padding: 0 8px;
    }
    .assistant-review-card[data-pending="true"] .assistant-review-btn.primary {
      min-width: 0;
    }
    .assistant-review-card[data-pending="true"] .assistant-review-btn.ghost {
      border-color: transparent;
      background: transparent;
    }
    .assistant-review-card[data-accepted="true"] {
      align-items: flex-start;
    }
    .assistant-review-card[data-accepted="true"] .assistant-review-actions {
      margin-top: 5px;
    }
    .assistant-review-card[data-accepted="true"] .assistant-review-btn {
      flex: 0 0 auto;
      min-width: 0;
    }
    .assistant-review-card[data-focus="true"] {
      align-items: flex-start;
    }
    .assistant-review-card[data-focus="true"] .assistant-review-actions {
      margin-top: 5px;
    }
    .assistant-review-card[data-focus="true"] .assistant-review-btn {
      flex: 0 0 auto;
      min-width: 0;
    }
    .assistant-review-card[data-weekly="true"] {
      align-items: flex-start;
    }
    .assistant-review-card[data-weekly="true"] .assistant-review-actions {
      margin-top: 5px;
    }
    .assistant-review-card[data-weekly="true"] .assistant-review-btn {
      flex: 0 0 auto;
      min-width: 0;
    }
    .assistant-review-card[data-local="true"] {
      align-items: flex-start;
    }
    .assistant-review-card[data-local="true"] .assistant-review-actions {
      margin-top: 5px;
    }
    .assistant-review-card[data-local="true"] .assistant-review-btn {
      min-width: 0;
    }
    .assistant-local-row {
      align-items: center;
    }
    .assistant-local-actions {
      align-items: center;
      gap: 4px;
    }
    .assistant-local-btn {
      min-height: 28px;
      min-width: 0;
      padding: 0 6px;
      border-radius: 6px;
    }
    .assistant-local-title {
      white-space: normal;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      line-height: 1.35;
      word-break: break-word;
    }
    .assistant-learning-strip {
      grid-template-columns: 1fr;
      gap: 6px;
    }
    .assistant-profile-strip {
      grid-template-columns: 1fr;
      gap: 6px;
    }
    .assistant-learning-actions {
      justify-content: flex-end;
    }
    .assistant-focus-row {
      align-items: center;
    }
    .assistant-focus-actions {
      gap: 4px;
      flex-wrap: wrap;
      justify-content: flex-start;
    }
    .assistant-focus-btn {
      min-height: 28px;
      min-width: 0;
      padding: 0 6px;
      border-radius: 6px;
    }
    .assistant-pending-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      align-items: flex-start;
      gap: 6px;
    }
    .assistant-pending-main { min-width: 0; }
    .assistant-pending-meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 4px;
      min-width: 0;
      overflow: hidden;
      white-space: normal;
    }
    .assistant-pending-title-line {
      align-items: flex-start;
    }
    .assistant-pending-understanding {
      gap: 3px;
    }
    .assistant-pending-understanding-primary,
    .assistant-pending-understanding-secondary {
      flex-wrap: wrap;
      row-gap: 3px;
    }
    .assistant-pending-route,
    .assistant-pending-basis,
    .assistant-pending-load,
    .assistant-pending-source-note {
      max-width: 100%;
    }
    .assistant-pending-meta > * {
      max-width: 100%;
    }
    .assistant-pending-actions {
      gap: 5px;
      justify-content: flex-start;
      flex-wrap: nowrap;
      max-width: 100%;
      overflow-x: auto;
      margin-top: 1px;
      scrollbar-width: none;
    }
    .assistant-pending-actions::-webkit-scrollbar { display: none; }
    .assistant-pending-btn {
      min-height: 36px;
      min-width: 0;
      padding: 0 10px;
      border-radius: 8px;
    }
    .assistant-pending-btn.icon-only {
      width: 36px;
      min-width: 36px;
      padding: 0;
    }
    .assistant-pending-more {
      width: auto;
      min-height: 34px;
      padding: 0 10px;
    }
    .assistant-rule-main,
    .assistant-rule-action {
      min-height: 30px;
    }
    .assistant-rule-action {
      min-width: 0;
      padding: 0 8px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .assistant-review-card[data-status="running"] .assistant-review-icon svg { animation: none; }
    .assistant-review-avatar,
    .assistant-review-card[data-status="running"] .assistant-review-avatar { animation: none; }
  }

  /* 项目 chip：在 task-row / timeline-card / inbox meta 上展示进度 */
  .project-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10.5px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(232, 153, 53, 0.06);
    color: var(--brand-amber);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
    line-height: 1.5;
    border: 1px solid rgba(24, 57, 92, 0.12);
    margin-left: 6px;
    vertical-align: 1px;
  }
  .project-chip svg { opacity: 0.7; }
  .project-chip.ready {  /* total 已达成但项目还没标记 done — 提示用户该结束了 */
    background: var(--c-accent-soft);
    color: var(--brand-amber-strong);
    border-color: var(--brand-amber-mid);
  }
  .project-chip.done {
    background: var(--c-border-soft);
    color: var(--c-muted);
    border-color: var(--c-border);
    text-decoration: line-through;
  }

  /* AI 推荐按钮右上角微弱指示点 */
  .inbox-action[data-suggested-dot] { position: relative; }
  .inbox-action[data-suggested-dot]::before {
    content: "";
    position: absolute;
    top: -3px; right: -3px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--c-accent);
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
  }

  .inbox-note-icon {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 5px;
    color: #a8a29e;
  }

  .archive-list {
    padding: 4px 12px 12px;
  }
  .archive-row {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0;
    font-size: 12px;
  }
  .archive-row .title {
    color: #a8a29e;
    text-decoration: line-through;
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .archive-row .action-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #f5f5f4;
    color: var(--c-muted);
    flex-shrink: 0;
  }
  .archive-row .time {
    color: #d6d3d1; font-size: 10px; flex-shrink: 0;
  }

  /* ─── Tag 标签系统 ─── */
  .tag-filter-row {
    display: flex;
    gap: 5px;
    padding: 2px 0 1px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tag-filter-row::-webkit-scrollbar { display: none; }
  .tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-muted);
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    cursor: pointer;
    flex-shrink: 0;
  }
  .tag-chip:hover { border-color: var(--c-muted-soft); }
  .tag-chip-active {
    background: var(--tag-bg, var(--c-accent-soft));
    color: var(--tag-text, var(--c-accent-strong));
    border-color: color-mix(in srgb, var(--tag-text, var(--c-accent)) 40%, transparent);
  }
  .tag-chip-sm { padding: 3px 8px; font-size: 11px; }
  .tag-chip-count {
    font-size: 10px;
    opacity: 0.6;
    font-family: var(--font-mono);
  }
  .tag-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .tag-inline {
    position: relative;
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 500;
    background: var(--tag-bg);
    color: var(--tag-text);
    vertical-align: 1px;
  }
  .tag-inline.ai-suggested-tag::after {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--brand-amber);
    box-shadow: 0 0 0 1.5px #fff;
  }
  /* inbox 行内编辑入口：包住 tag-inline 或 +标签 占位 */
  .tag-edit-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    line-height: inherit;
    vertical-align: baseline;
  }
  .tag-edit-btn:hover .tag-inline { filter: brightness(0.95); }
  .tag-edit-btn .tag-empty {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 500;
    background: transparent;
    color: var(--c-muted-soft);
    border: 1px dashed var(--c-border);
    vertical-align: 1px;
  }
  .tag-edit-btn:hover .tag-empty { color: var(--c-muted); border-color: var(--c-muted-soft); }
  @media (max-width: 767px) {
    .tag-edit-btn {
      min-height: 44px;
      min-width: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      vertical-align: middle;
    }
    .tag-edit-btn .tag-empty {
      padding: 6px 8px;
    }
  }

  /* 项目创建预览 */
  .pc-preview {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--c-muted);
    padding: 6px 8px;
    background: var(--c-border-soft);
    border-radius: 6px;
    line-height: 1.6;
  }

  /* 行内 tag picker overlay */
  .tag-picker-body {
    padding: 12px 16px;
  }
  .tag-picker-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-bottom: 10px;
  }
  .capture-tags {
    padding: 6px 16px 8px;
    border-top: 1px solid var(--c-border-soft);
  }
  .capture-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  .tag-new-input {
    border: 1px dashed var(--c-border);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    width: 80px;
    outline: none;
    background: transparent;
    color: var(--c-text);
    transition: border-color 0.12s, width 0.12s;
  }
  .tag-new-input:focus { border-color: var(--c-accent); width: 110px; }
  .tag-new-input::placeholder { color: var(--c-muted-soft); }

  /* ─── 批量操作条（多选时浮动） ─── */
  .batch-bar {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-amber);
    color: #fff;
    border-radius: 999px;
    padding: 6px 8px 6px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 12px 32px -10px rgba(24,57,92,0.3);
    z-index: 28;
    animation: batch-in 0.22s cubic-bezier(0.32, 0.72, 0, 1);
    font-size: 12px;
  }
  @keyframes batch-in {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
  }
  .batch-bar .count {
    font-weight: 500;
    margin-right: 4px;
  }
  .batch-bar button {
    background: rgba(255,255,255,0.13);
    color: #fff;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 11.5px;
    transition: background 0.12s;
  }
  .batch-bar button:hover { background: rgba(255,255,255,0.22); }
  .batch-bar button.danger:hover { background: rgba(239,68,68,0.4); }
  .batch-bar button.cancel { background: transparent; color: rgba(255,255,255,0.6); }
  .batch-bar button.cancel:hover { color: #fff; }
  @media (max-width: 767px) {
    .batch-bar { bottom: 76px; left: 8px; right: 8px; transform: none; justify-content: space-between; }
    .batch-bar { animation: batch-in-mobile 0.22s cubic-bezier(0.32, 0.72, 0, 1); }
    @keyframes batch-in-mobile {
      from { opacity: 0; transform: translateY(8px); }
      to   { opacity: 1; transform: none; }
    }
  }

  /* ─── 项目编辑器 popover ─── */
  .item-editor-overlay {
    position: fixed; inset: 0;
    background: rgba(9,9,11,0.18);
    z-index: 60;
    animation: fade-in 0.14s ease-out;
  }
  .item-editor {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, 92vw);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    box-shadow: 0 20px 50px -16px rgba(9,9,11,0.22);
    z-index: 61;
    padding: 14px;
    animation: capture-in 0.16s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .ie-header {
    display: flex; align-items: flex-start; gap: 8px;
    margin-bottom: 10px;
  }
  .ie-title-input {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    background: transparent;
    outline: none;
    padding: 5px 7px;
    border-radius: 5px;
    margin-left: -7px;
    color: var(--c-text);
  }
  .ie-title-input:hover, .ie-title-input:focus {
    background: var(--c-border-soft);
  }
  .ie-title-input:focus { background: var(--c-surface); border-color: var(--c-accent); }
  .ie-close {
    width: 24px; height: 24px;
    border-radius: 5px;
    font-size: 16px;
    color: var(--c-muted);
    display: grid; place-items: center;
    flex-shrink: 0;
  }
  .ie-close:hover { background: var(--c-border-soft); color: var(--c-text); }
  /* Item Editor 里的 4-wheel time picker：紧凑模式（高度比 scheduler 略矮） */
  .item-editor .time-wheels { height: 116px; margin-bottom: 10px; }
  .item-editor .time-wheel-pad { height: 42px; }   /* (116 - 32) / 2 = 42 */
  .ie-upgrade-hint {
    font-size: 11px;
    color: var(--c-muted-soft);
    margin: -4px 4px 10px;
    display: flex; align-items: center; gap: 4px;
  }
  /* item editor 里的"备注"区 */
  .ie-note { margin-bottom: 10px; }
  .ie-note-label {
    display: flex; align-items: center; gap: 4px;
    font-size: 11px; color: var(--c-muted);
    margin-bottom: 5px;
  }
  .ie-note-input {
    width: 100%;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid var(--c-border-soft);
    background: var(--c-surface);
    outline: none;
    padding: 7px 9px;
    border-radius: 7px;
    color: var(--c-text);
    resize: vertical;
    font-family: inherit;
  }
  .ie-note-input::placeholder { color: var(--c-muted-soft); }
  .ie-note-input:focus { border-color: var(--c-accent); }
  .ie-understand {
    border: 1px solid var(--c-border-soft);
    background: rgba(232,153,53,0.045);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
  }
  .ie-understand-head {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-amber);
    margin-bottom: 7px;
  }
  .ie-understand-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .ie-understand-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    color: var(--c-muted);
  }
  .ie-understand-field-wide {
    grid-column: span 3;
  }
  .ie-understand-select,
  .ie-understand-input {
    min-width: 0;
    width: 100%;
    height: 28px;
    border: 1px solid var(--c-border-soft);
    border-radius: 6px;
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 11px;
    padding: 0 6px;
    outline: none;
  }
  .ie-understand-input::placeholder {
    color: var(--c-muted-soft);
  }
  .ie-understand-select:focus,
  .ie-understand-input:focus {
    border-color: var(--c-accent);
  }
  /* item editor 里的"项目"区 */
  .ie-project {
    background: rgba(24, 57, 92, 0.04);
    border: 1px solid rgba(24, 57, 92, 0.12);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 12px;
  }
  .ie-project-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
  .ie-project-tag {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 10px; color: var(--brand-amber); font-weight: 500;
    background: rgba(232,153,53,0.08); padding: 1px 6px; border-radius: 999px;
  }
  .ie-project-title { font-weight: 500; color: var(--c-text); }
  .ie-project-progress { font-size: 11px; color: var(--c-muted); margin-bottom: 6px; font-family: var(--font-mono); }
  .ie-project-actions { display: flex; gap: 6px; flex-wrap: wrap; }
  .ie-meta {
    font-size: 11px;
    color: var(--c-muted);
    padding-top: 8px;
    border-top: 1px solid var(--c-border-soft);
    margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
  }
  .ie-origin {
    min-width: 0;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--c-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ie-actions {
    display: flex; justify-content: space-between; align-items: center;
  }
  .ie-delete {
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--c-muted);
    border: 1px solid transparent;
    transition: color 0.1s, background 0.1s, border-color 0.1s;
  }
  .ie-delete:hover {
    color: var(--c-danger);
    background: #fef2f2;
    border-color: #fecaca;
  }
  .ie-secondary {
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--c-muted);
    border: 1px solid transparent;
    transition: color 0.1s, background 0.1s, border-color 0.1s;
  }
  .ie-secondary:hover {
    color: var(--c-accent);
    background: var(--c-accent-soft);
    border-color: var(--c-accent-border);
  }
  .ie-done {
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: var(--brand-amber);
    color: #fff;
    box-shadow: 0 2px 6px -2px rgba(232,153,53,0.45);
  }
  .ie-done:hover { background: var(--brand-amber-strong); }

  /* ─── 捕捉模态 ─── */
  .capture-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.32);
    z-index: 60;
    animation: fade-in 0.18s ease-out;
  }
  .capture-panel {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, 92vw);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    box-shadow: 0 22px 56px -18px rgba(9,9,11,0.28), 0 2px 8px -2px rgba(9,9,11,0.06);
    z-index: 61;
    overflow: hidden;
    animation: capture-in 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  }
  /* 全量 innerHTML 重渲染时，对仍处于打开状态的 modal 通过 .no-anim 抑制重放入场动画。
     由 render.js 的 modalAnim() 写入。详见 CLAUDE.md「Modal re-render flicker」。 */
  .capture-overlay.no-anim,
  .capture-panel.no-anim { animation: none; }
  @keyframes capture-in {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)) scale(0.97); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }
  /* 移动端：屏幕中央偏上（避免被键盘遮，又不至于贴顶） */
  @media (max-width: 767px) {
    .capture-panel {
      top: 18vh; left: 50%;
      transform: translateX(-50%);
      width: min(360px, calc(100vw - 28px));
      border-radius: 12px;
      box-shadow: 0 18px 40px -14px rgba(9,9,11,0.30);
      animation: capture-mobile-in 0.22s cubic-bezier(0.32, 0.72, 0, 1);
    }
    @keyframes capture-mobile-in {
      from { opacity: 0; transform: translate(-50%, -10px) scale(0.97); }
      to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
    }
  }
  .capture-panel header {
    padding: 12px 14px 4px;
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--c-muted);
  }
  .capture-panel textarea {
    width: 100%;
    padding: 4px 14px 10px;
    border: none; outline: none;
    font-size: 16px;
    background: transparent;
    color: var(--c-text);
    resize: none;
    min-height: 68px;
    font-family: inherit;
  }
  .capture-panel footer {
    padding: 8px 14px;
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid var(--c-border);
    background: #fafaf9;
    font-size: 11px;
    color: var(--c-muted);
  }
  .capture-panel footer kbd { font-size: 10px; }
  @media (max-width: 767px) {
    .kbd-hint-desktop { display: none !important; }
    .capture-panel footer { justify-content: flex-end; }
  }

  /* ─── capture footer 操作按钮 ─── */
  .capture-actions { display: inline-flex; gap: 6px; margin-left: auto; }
  .capture-btn {
    min-height: 32px;
    min-width: 52px;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid var(--c-border);
    background: #fff;
    color: var(--c-text);
    transition: background 0.12s, border-color 0.12s, transform 0.06s;
  }
  .capture-btn:active { transform: translateY(1px); }
  .capture-btn.cancel:hover { background: #f5f5f4; }
  .capture-btn.primary {
    background: var(--brand-amber);
    color: #fff;
    border-color: var(--brand-amber);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 4px 10px -4px rgba(232,153,53,0.45);
  }
  .capture-btn.primary:hover { background: #d0871f; border-color: #d0871f; }

  .capture-tags-hint {
    margin-top: 6px;
    font-size: 10.5px;
    color: var(--c-muted-soft);
  }

  /* ─── tag chip 双击重命名 / 二次确认删除 ─── */
  .tag-rename-input {
    background: var(--tag-bg, #f5f5f4);
    color: var(--tag-text, var(--c-text));
    border: 1px solid var(--tag-text, var(--c-border));
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    padding: 5px 10px;
    width: 96px;
    min-width: 64px;
    max-width: 140px;
    outline: none;
    font-weight: 500;
    box-shadow: 0 0 0 3px rgba(232,153,53,0.18);
  }
  .tag-chip-confirm {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 5px 3px 10px;
    border-radius: 999px;
    background: #FFF1E9;
    color: #B85C0E;
    border: 1px solid #F0C7A8;
    font-size: 11px;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .tag-chip-confirm-text { line-height: 1.2; }
  .tag-chip-confirm-sub { display: block; opacity: 0.7; font-size: 9.5px; margin-top: 1px; }
  .tag-chip-confirm-btn {
    border: none;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
  }
  .tag-chip-confirm-btn.cancel { background: #fff; color: var(--c-muted); border: 1px solid var(--c-border); }
  .tag-chip-confirm-btn.cancel:hover { background: #fafaf9; }
  .tag-chip-confirm-btn.danger { background: var(--c-danger, #d94d4d); color: #fff; }
  .tag-chip-confirm-btn.danger:hover { filter: brightness(0.94); }
  .inbox-inline-filter .tag-chip-confirm-filter {
    gap: 4px;
    min-height: 30px;
    max-width: none;
    padding: 2px 3px 2px 8px;
    font-size: 10.5px;
    background: #FFF4ED;
    border-color: #F2CBAE;
    box-shadow: 0 2px 10px -8px rgba(232,153,53,0.35);
  }
  .inbox-inline-filter .tag-chip-confirm-filter .tag-chip-confirm-text {
    max-width: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .inbox-inline-filter .tag-chip-confirm-filter .tag-chip-confirm-btn {
    min-width: 38px;
    height: 24px;
    padding: 0 8px;
    font-size: 10.5px;
  }

  /* ─── 排程面板 ─── */
  .scheduler-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.32);
    z-index: 60;
    animation: sched-overlay-in 0.18s ease-out;
  }
  .scheduler-panel {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(400px, 90vw);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    box-shadow: 0 22px 56px -18px rgba(9,9,11,0.28), 0 2px 8px -2px rgba(9,9,11,0.06);
    z-index: 61;
    overflow: hidden;
    animation: sched-panel-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: 50% 50%;
  }
  /* 重渲染时仍在打开状态的面板：跳过入场动画（CLAUDE.md §5.1） */
  .scheduler-overlay.no-anim,
  .scheduler-panel.no-anim { animation: none; }
  @keyframes sched-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  @keyframes sched-panel-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }
  @media (max-width: 767px) {
    .scheduler-panel {
      width: min(360px, calc(100vw - 28px));
    }
  }
  .sched-header {
    padding: 14px 16px 10px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 14px; font-weight: 500; color: var(--c-text);
  }
  .sched-header button {
    background: none; border: none; font-size: 18px; color: var(--c-muted-soft);
    cursor: pointer; padding: 2px 8px; border-radius: 6px;
    transition: background 0.12s, color 0.12s;
  }
  .sched-header button:hover { background: var(--c-border-soft); color: var(--c-muted); }
  .sched-body { padding: 4px 16px 8px; }
  .sched-section { margin-bottom: 14px; }
  .sched-section-title {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--c-muted-soft);
    letter-spacing: 0.08em;
    font-weight: 500;
    margin-bottom: 8px;
  }
  .sched-title-brand {
    color: var(--brand-amber);
    text-transform: none;
  }
  /* 日期 / 时长等 chip 行 */
  .sched-chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
  .sched-chip {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
    line-height: 1.2;
  }
  .sched-chip:hover { border-color: var(--c-muted-soft); background: var(--c-border-soft); }
  .sched-chip.active {
    background: var(--c-accent-soft);
    border-color: var(--c-accent-border);
    color: var(--brand-amber-strong);
    font-weight: 500;
  }
  /* 时间行：select + select + 提示 */
  /* 强制单行不换行 */
  .sched-time-row { display: flex; flex-direction: column; gap: 10px; }
  /* iOS 风滚轮 time picker */
  .time-wheels {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
    height: 132px;             /* 4 行 × 32 + 上下各 2px 余 */
    padding: 0 8px;
    background: var(--c-border-soft);
    border-radius: 10px;
    user-select: none;
  }
  /* 中央高亮 band：横贯整条行的浅色填充 + 上下淡色分隔线 */
  .time-band {
    position: absolute;
    left: 4px; right: 4px;
    top: 50%;
    height: 32px;
    transform: translateY(-50%);
    background: var(--c-accent-soft);
    border-top: 1px solid var(--c-accent-border);
    border-bottom: 1px solid var(--c-accent-border);
    border-radius: 6px;
    pointer-events: none;
    z-index: 0;
  }
  .time-wheel {
    position: relative;
    z-index: 1;
    min-width: 42px;
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* 让滚轮内容可滚动到第一个/最后一个 item 居中 */
    overscroll-behavior: contain;
    /* 滚动平滑（CSS smooth：tap-to-scroll 才平滑；滑动时由浏览器原生处理） */
  }
  .time-wheel::-webkit-scrollbar { display: none; }
  /* 顶/底占位：让首尾 item 也能落到中央 band */
  .time-wheel-pad { height: 50px; pointer-events: none; }   /* (132 - 32) / 2 = 50 */
  .time-wheel-item {
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--c-muted);
    font-variant-numeric: tabular-nums;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    cursor: pointer;
    transition: color 0.12s, font-weight 0.12s;
  }
  .time-wheel-item.selected {
    color: var(--brand-amber-strong);
    font-weight: 700;
  }
  .time-wheel-colon, .time-wheel-arrow {
    align-self: center;
    color: var(--c-muted);
    font-family: var(--font-mono);
    font-size: 14px;
    z-index: 1;
  }
  .time-wheel-arrow { margin: 0 4px; color: var(--c-muted-soft); }

  /* 快速按钮行：放在 wheel 下方 */
  .sched-quick-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .sched-quick-label {
    color: var(--c-muted);
    font-size: 12px;
    flex-shrink: 0;
  }
  .sched-quick {
    padding: 4px 10px;
    border: 1px solid var(--c-accent-border);
    border-radius: 999px;
    background: var(--c-accent-soft);
    color: var(--brand-amber-strong);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    line-height: 1.3;
    flex-shrink: 0;
  }
  .sched-quick:hover { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }

  .sched-select {
    padding: 7px 10px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 13px;
    font-family: var(--font-mono);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 26px;
    min-width: 100px;
  }
  .sched-select:focus { outline: none; border-color: var(--c-accent); }
  .sched-time-arrow {
    color: var(--c-muted);
    font-size: 13px;
    margin: 0 2px;
  }
  .sched-time-colon {
    color: var(--c-muted);
    font-family: var(--font-mono);
    font-size: 13px;
    margin: 0;
  }
  /* 时/分紧凑 select：只显示 2 位数字 */
  .sched-select-hm {
    min-width: 0;
    padding: 6px 22px 6px 8px;
    font-size: 13px;
  }
  /* AI 输入行 */
  .sched-ai-row { display: flex; gap: 8px; }
  .sched-ai-input {
    flex: 1; padding: 7px 12px; border: 1px solid var(--c-border);
    border-radius: 8px; font-size: 13px; background: var(--c-surface);
    color: var(--c-text); font-family: inherit;
  }
  .sched-ai-input:focus { outline: none; border-color: var(--c-accent); }
  .sched-ai-btn {
    padding: 7px 14px; border-radius: 8px; border: none;
    background: var(--c-accent); color: #fff; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: background 0.12s;
  }
  .sched-ai-btn:hover { background: var(--c-accent-strong); }
  /* 底部确认 / 取消 */
  .sched-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--c-border-soft);
    background: rgba(250,248,244,0.5);
    display: flex; justify-content: flex-end; gap: 8px;
  }
  .sched-btn {
    padding: 8px 18px; border-radius: 8px; border: none;
    background: var(--brand-amber); color: #fff; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: opacity 0.12s, background 0.12s;
  }
  .sched-btn:hover { background: var(--brand-amber-strong); }
  .sched-btn-cancel {
    padding: 8px 14px; border-radius: 8px;
    border: 1px solid var(--c-border);
    background: transparent;
    color: var(--c-muted);
    font-size: 13px;
    cursor: pointer; transition: border-color 0.12s, color 0.12s;
  }
  .sched-btn-cancel:hover { border-color: var(--c-muted-soft); color: var(--c-text); }
  .sched-ai-btn:hover { opacity: 0.9; }

  /* ─── AI 来源标签 ─── */

  .ai-tag {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: 4px;
    font-weight: 500;
    letter-spacing: 0.3px;
  }
  .ai-tag-builtin { background: var(--c-accent-soft); color: var(--brand-amber-strong); }
  .ai-tag-custom  { background: #FDF4E5; color: var(--brand-amber); }
  .ai-tag-mock    { background: var(--c-border-soft); color: var(--c-muted); }

  /* ─── 设置面板字段 ─── */
  .settings-field {
    margin-bottom: 10px;
  }
  .settings-field label {
    display: block;
    font-size: 11px;
    color: var(--c-muted);
    margin-bottom: 3px;
  }
  .settings-field input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--c-border);
    border-radius: 7px;
    font-size: 13px;
    font-family: ui-monospace, Menlo, monospace;
    outline: none;
    color: var(--c-text);
    background: #fff;
  }
  .settings-field input:focus { border-color: var(--c-pending); }
  .settings-field select.settings-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--c-border);
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    color: var(--c-text);
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a29e' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
  }
  .settings-field select.settings-select:focus { border-color: var(--c-pending); }
  .settings-field .hint {
    font-size: 10px;
    color: #a8a29e;
    margin-top: 3px;
  }
  .range-row {
    display: flex; align-items: center; gap: 8px;
  }
  .range-row input[type="number"] {
    width: 72px;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 13px;
    text-align: center;
    padding: 6px 8px;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    outline: none;
    background: #fff;
    color: var(--c-text);
  }
  .range-row input:focus { border-color: var(--c-accent); }
  .range-row .arrow { color: var(--c-muted); }
  .range-row .unit { font-size: 11px; color: var(--c-muted); }

  /* ─── Avatar 按钮 + 下拉 ─── */
  .avatar-anchor { position: relative; }
  .avatar-btn {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-amber-strong), var(--c-accent));
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid var(--c-border);
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.15s, transform 0.12s;
    flex-shrink: 0;
    line-height: 1;
  }
  .avatar-btn .avatar-initial { letter-spacing: 0; }
  .avatar-btn .avatar-fallback { display: inline-flex; }
  .avatar-btn:hover { box-shadow: 0 2px 8px -2px rgba(232,153,53,0.45); }
  .avatar-btn:active { transform: scale(0.96); }

  /* 有可更新版本时的橙色提示点 —— 默认内联（菜单项/分节标题用），头像处覆盖为右上角绝对定位 */
  .update-dot {
    display: inline-block; width: 7px; height: 7px;
    border-radius: 50%; background: #E89935;
    margin-left: 5px; vertical-align: middle; flex-shrink: 0;
  }
  .avatar-anchor > .update-dot {
    position: absolute; top: 0; right: 0;
    width: 9px; height: 9px; margin: 0;
    border: 1.5px solid var(--c-bg);
    box-shadow: 0 0 0 0.5px rgba(0,0,0,0.04);
    pointer-events: none;
  }

  .avatar-dropdown {
    position: absolute;
    z-index: 70;
    min-width: 240px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    box-shadow: 0 14px 36px -10px rgba(9,9,11,0.22), 0 2px 6px -2px rgba(9,9,11,0.06);
    padding: 10px;
    display: flex; flex-direction: column; gap: 8px;
    animation: avatar-dd-in 0.15s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .avatar-dropdown.no-anim { animation: none; }
  @keyframes avatar-dd-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  /* 默认：avatar 在右上（桌面顶栏 / 移动 header 共用），dropdown 朝右下展开 */
  .avatar-anchor .avatar-dropdown {
    top: 100%;
    right: 0;
    margin-top: 6px;
  }
  .avatar-dd-uid {
    display: flex; flex-direction: column; gap: 4px;
    padding: 6px 8px;
    background: var(--c-border-soft);
    border-radius: 8px;
  }
  .avatar-dd-account {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 10px;
    background: var(--c-border-soft);
    border-radius: 8px;
  }
  .avatar-dd-account-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text);
  }
  .avatar-dd-account-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .avatar-dd-account-name.avatar-dd-account-guest {
    color: var(--c-muted);
    font-weight: 400;
  }
  .avatar-dd-pro-badge {
    display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0;
    padding: 2px 8px; border-radius: 6px;
    background: linear-gradient(135deg, #F6C760, #E89935);
    color: #5A3A06; font-size: 11px; font-weight: 700;
    box-shadow: 0 1px 3px rgba(232,153,53,0.35);
  }
  .avatar-dd-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-muted);
  }
  .login-gate {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
    background: var(--c-bg);
  }
  .login-gate-shell {
    width: min(390px, 100%);
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .login-gate-brand {
    width: fit-content;
    align-self: center;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--brand-ink);
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
  }
  .login-gate h1 {
    margin: 2px 0 0;
    color: var(--c-text);
    font-size: 28px;
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: 0;
  }
  .login-gate p {
    margin: 0;
    color: var(--c-muted);
    font-size: 14px;
    line-height: 1.65;
  }
  .login-gate-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .login-gate-points span {
    display: inline-flex;
    align-items: center;
    color: var(--c-muted);
    font-size: 12px;
    font-weight: 600;
  }
  .login-gate-primary {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    background: var(--brand-amber);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease;
  }
  .login-gate-primary:hover { background: var(--brand-amber-strong); }
  .avatar-dd-id-row { display: flex; align-items: center; gap: 6px; }
  .avatar-dd-mono {
    flex: 1; min-width: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--c-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .avatar-dd-mono.avatar-dd-empty { color: var(--c-muted-soft); font-style: italic; }
  .avatar-dd-copy {
    padding: 4px;
    border-radius: 5px;
    color: var(--c-muted);
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
  }
  .avatar-dd-copy:hover { background: var(--c-surface); color: var(--c-text); }
  .avatar-dd-hint {
    font-size: 10px;
    color: var(--c-muted-soft);
    line-height: 1.4;
  }
  .avatar-dd-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--c-text);
    cursor: pointer;
    transition: background 0.1s;
  }
  .avatar-dd-item span:first-of-type {
    min-width: 0;
  }
  .avatar-dd-item:hover { background: var(--c-border-soft); }

  /* ─── 设置面板：accordion ─── */
  .settings-panel { display: flex; flex-direction: column; max-height: min(85vh, 720px); }
  /* 移动端 .capture-panel { top: 18vh }，再叠 85vh 会落到 103vh → 底部出界。
     这里收紧到 76vh，留 6vh 视觉缓冲 + safe-area。 */
  @media (max-width: 767px) {
    .settings-panel { max-height: calc(76vh - env(safe-area-inset-bottom, 0px)); }
  }
  .settings-accordion {
    padding: 6px 14px 4px;
    overflow-y: auto;
    flex: 1;
  }
  .settings-section {
    border-top: 1px solid var(--c-border-soft);
  }
  .settings-section:first-child { border-top: none; }
  .settings-section-header {
    width: 100%;
    display: flex; align-items: center; gap: 10px;
    padding: 10px 4px;
    text-align: left;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--c-text);
    font-size: 13px;
    transition: color 0.12s;
  }
  .settings-section-header:hover { color: var(--brand-amber-strong); }
  .settings-section-title {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 500;
    color: inherit;
  }
  .settings-section-status {
    font-size: 11px;
    color: var(--c-muted);
    font-family: var(--font-mono);
  }
  .settings-section-chevron {
    margin-left: auto;
    color: var(--c-muted);
    display: inline-flex;
    transition: transform 0.2s ease;
  }
  .settings-section[data-open="true"] .settings-section-chevron {
    transform: rotate(180deg);
  }
  .settings-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    padding: 0 4px;
  }
  .settings-section[data-open="true"] .settings-section-body {
    /* 大数值足以容下任一节，超出则容器滚动 */
    max-height: 520px;
    padding: 0 4px 14px;
  }

  /* 账号节 */
  .settings-uid-row {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    background: var(--c-border-soft);
    border-radius: 8px;
  }
  .settings-uid-mono {
    flex: 1; min-width: 0;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--c-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .settings-uid-empty { color: var(--c-muted-soft); font-style: italic; }
  .settings-uid-copy {
    padding: 5px;
    border-radius: 5px;
    color: var(--c-muted);
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
  }
  .settings-uid-copy:hover { background: var(--c-surface); color: var(--brand-amber-strong); }
  .settings-recovery-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    background: var(--c-border-soft);
    border-radius: 8px;
  }
  .settings-recovery-row .settings-uid-mono { font-family: var(--font-ui); font-size: 13px; }
  .settings-recovery-row .settings-inline-reset { margin-top: 0; flex-shrink: 0; }

  /* 账号节：用户名行（输入框 + Pro 金标 / 升级按钮）+ 绑定方式行 */
  .settings-account-row { display: flex; align-items: center; gap: 8px; }
  .settings-account-input { flex: 1; min-width: 0; font-family: var(--font-ui) !important; font-weight: 500; }
  .settings-pro-gold {
    display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0;
    padding: 4px 10px; border-radius: 7px;
    background: linear-gradient(135deg, #F6C760, #E89935);
    color: #5A3A06; font-size: 12px; font-weight: 700;
    box-shadow: 0 1px 3px rgba(232,153,53,0.35);
  }
  .settings-pro-upgrade {
    display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
    padding: 5px 11px; border-radius: 7px;
    border: 1px solid var(--c-accent); background: var(--c-accent-soft);
    color: var(--brand-amber-strong); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: background 0.12s, border-color 0.12s;
  }
  .settings-pro-upgrade:hover { background: var(--c-accent); color: #fff; }
  .settings-plan-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 6px;
    padding: 8px 9px;
    border: 1px solid rgba(232,153,53,0.15);
    border-radius: 9px;
    background:
      linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,248,236,0.72)),
      radial-gradient(circle at 88% 0%, rgba(232,153,53,0.16), transparent 34%);
    box-shadow: 0 7px 18px -16px rgba(41,37,36,0.28);
  }
  .settings-plan-card-pro {
    border-color: rgba(232,153,53,0.28);
    background:
      linear-gradient(135deg, rgba(255,252,245,0.96), rgba(255,244,221,0.70)),
      radial-gradient(circle at 88% 0%, rgba(232,153,53,0.22), transparent 36%);
  }
  .settings-plan-card-pro .settings-plan-head {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .settings-plan-card-pro .settings-plan-title,
  .settings-plan-card-free .settings-plan-title {
    display: flex;
    align-items: baseline;
    gap: 6px;
    align-self: center;
  }
  .settings-plan-card-pro .settings-plan-title span,
  .settings-plan-card-free .settings-plan-title span {
    flex: 1 1 auto;
  }
  .settings-plan-card-free {
    border-color: rgba(24,57,92,0.11);
    background:
      linear-gradient(135deg, rgba(255,255,255,0.94), rgba(250,250,249,0.82)),
      radial-gradient(circle at 88% 0%, rgba(24,57,92,0.08), transparent 34%);
  }
  @supports (backdrop-filter: blur(12px)) {
    .settings-plan-card {
      background-color: rgba(255,255,255,0.68);
      backdrop-filter: blur(14px) saturate(1.08);
      -webkit-backdrop-filter: blur(14px) saturate(1.08);
    }
  }
  .settings-plan-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
  }
  .settings-plan-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: var(--brand-amber-strong);
    background: rgba(232,153,53,0.12);
    box-shadow: inset 0 0 0 1px rgba(232,153,53,0.10);
  }
  .settings-plan-title {
    min-width: 0;
    display: grid;
    gap: 1px;
  }
  .settings-plan-title strong {
    color: var(--c-text);
    font-size: 12.5px;
    font-weight: 760;
    line-height: 1.15;
  }
  .settings-plan-title span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-muted);
    font-size: 10.5px;
    line-height: 1.25;
  }
  .settings-plan-state,
  .settings-plan-cta {
    min-height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
  }
  .settings-plan-state {
    color: #7A4D0B;
    background: rgba(232,153,53,0.14);
    border: 1px solid rgba(232,153,53,0.16);
  }
  .settings-plan-cta {
    border: 1px solid rgba(232,153,53,0.24);
    background: var(--brand-amber);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 16px -14px rgba(232,153,53,0.75);
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  }
  .settings-plan-cta:hover {
    background: var(--brand-amber-strong);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px -14px rgba(232,153,53,0.85);
  }
  .settings-plan-upgrade {
    display: grid;
    gap: 4px;
    padding-top: 5px;
    border-top: 1px solid rgba(120,113,108,0.10);
  }
  .settings-plan-upgrade > span {
    color: var(--c-muted);
    font-size: 10.5px;
    font-weight: 650;
  }
  .settings-plan-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .settings-plan-chips span {
    min-height: 19px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border: 1px solid rgba(232,153,53,0.13);
    border-radius: 999px;
    background: rgba(255,255,255,0.66);
    color: #6F4B16;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
  }
  @media (max-width: 430px) {
    .settings-plan-head {
      grid-template-columns: auto minmax(0, 1fr);
    }
    .settings-plan-card-free .settings-plan-head {
      grid-template-columns: auto minmax(0, 1fr) auto;
    }
    .settings-plan-state,
    .settings-plan-cta {
      grid-column: 2;
      justify-self: start;
      min-height: 22px;
    }
    .settings-plan-card-free .settings-plan-cta {
      grid-column: 3;
      justify-self: end;
      align-self: start;
    }
  }
  .settings-segment {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 2px;
    border: 1px solid var(--c-border);
    border-radius: 9px;
    background: rgba(250,250,249,0.78);
    overflow: hidden;
  }
  .settings-segment::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: calc((100% - 8px) / 2);
    border-radius: 7px;
    background: rgba(255,248,236,0.96);
    box-shadow: 0 6px 18px -18px rgba(232,153,53,0.52), inset 0 0 0 1px rgba(232,153,53,0.18);
    transform: translateX(0);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .settings-segment:has(input[value="inbox"]:checked)::before {
    transform: translateX(calc(100% + 4px));
  }
  .settings-segment-compact {
    width: fit-content;
    min-width: 148px;
    max-width: 100%;
  }
  .settings-segment-option {
    position: relative;
    z-index: 1;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 8px;
    border-radius: 7px;
    color: var(--c-muted);
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: color 0.16s ease;
  }
  .settings-field .settings-segment-option {
    display: inline-flex;
  }
  .settings-segment-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .settings-segment-option:has(input:checked) {
    color: var(--brand-amber-strong);
  }
  .settings-segment-option:has(input:focus-visible) {
    outline: 2px solid rgba(232,153,53,0.34);
    outline-offset: 2px;
  }
  .settings-segment-icon {
    display: inline-flex;
    color: currentColor;
  }
  .settings-style-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--c-border);
    border-radius: 11px;
    background: rgba(250,250,249,0.78);
    overflow: hidden;
  }
  .settings-style-grid::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 14px) / 3);
    border-radius: 8px;
    background: rgba(255,248,236,0.96);
    box-shadow: 0 6px 18px -18px rgba(232,153,53,0.52), inset 0 0 0 1px rgba(232,153,53,0.18);
    transform: translateX(calc(100% + 4px));
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .settings-style-grid:has(input[value="quiet"]:checked)::before {
    transform: translateX(0);
  }
  .settings-style-grid:has(input[value="balanced"]:checked)::before {
    transform: translateX(calc(100% + 4px));
  }
  .settings-style-grid:has(input[value="proactive"]:checked)::before {
    transform: translateX(calc(200% + 8px));
  }
  .settings-style-option {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 38px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    padding: 5px 6px;
    border-radius: 8px;
    background: transparent;
    color: var(--c-muted);
    font-family: var(--font-ui);
    cursor: pointer;
    transition: color 0.16s ease;
  }
  .settings-field .settings-style-option {
    display: grid;
  }
  .settings-style-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .settings-style-option span,
  .settings-style-option small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
  }
  .settings-style-option span {
    color: var(--c-text);
    font-size: 11.5px;
    font-weight: 720;
    line-height: 1.2;
  }
  .settings-style-option small {
    color: var(--c-muted);
    font-size: 10px;
    line-height: 1.15;
  }
  .settings-style-option:has(input:checked) {
    color: var(--brand-amber-strong);
  }
  .settings-style-option:has(input:focus-visible) {
    outline: 2px solid rgba(232,153,53,0.34);
    outline-offset: 2px;
  }
  .settings-style-option:has(input:checked) span {
    color: var(--brand-amber-strong);
  }
  @media (prefers-reduced-motion: reduce) {
    .settings-segment::before,
    .settings-style-grid::before {
      transition: none;
    }
  }
  .settings-bind-row {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    background: var(--c-border-soft);
    border-radius: 8px;
  }
  .settings-bind-row + .settings-bind-row { margin-top: 6px; }
  .settings-bind-row-disabled { opacity: 0.62; }
  .settings-bind-icon {
    display: flex; flex-shrink: 0;
    color: var(--c-muted);
  }
  .settings-bind-main { flex: 1; min-width: 0; }
  .settings-bind-name { font-size: 13px; font-weight: 500; color: var(--c-text); }
  .settings-bind-sub {
    font-size: 12px; color: var(--c-text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .settings-bind-sub-empty { color: var(--c-muted); font-style: italic; }
  .settings-bind-empty {
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--c-border-soft);
    color: var(--c-muted);
    font-size: 12px;
  }
  .settings-bind-actions {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .settings-bind-action {
    flex-shrink: 0;
    padding: 0; background: transparent; border: none;
    color: var(--c-muted); font-size: 12px; cursor: pointer;
    text-decoration: underline; text-underline-offset: 2px;
  }
  .settings-bind-action:hover { color: var(--brand-amber-strong); }
  .settings-bind-action-on { color: var(--brand-amber-strong); font-weight: 500; }
  .settings-phone-bind-row {
    align-items: center;
  }
  .settings-phone-bind-input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--c-text);
    font-family: var(--font-ui);
    font-size: 12px;
    line-height: 20px;
    outline: none;
  }
  .settings-phone-bind-input.code {
    max-width: 120px;
  }
  .settings-phone-bind-input::placeholder { color: var(--c-muted-soft); }
  .settings-phone-bind-input:focus {
    color: var(--c-text);
  }
  .settings-phone-bind-btn {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand-amber-strong);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
  }
  .settings-phone-bind-btn:hover {
    color: var(--brand-amber);
  }
  .settings-phone-bind-btn:disabled,
  .settings-bind-action:disabled,
  .settings-phone-bind-input:disabled {
    opacity: 0.62;
    cursor: not-allowed;
  }
  .settings-bind-error,
  .settings-bind-dev {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.35;
  }
  .settings-bind-error { color: var(--c-danger, #d9534f); }
  .settings-bind-dev { color: var(--c-muted); }
  .settings-bind-dev code {
    color: var(--c-text);
    font-family: var(--font-ui);
    font-weight: 700;
  }
  .settings-bind-soon {
    flex-shrink: 0;
    font-size: 11px; color: var(--c-muted-soft);
  }
  .settings-logout-wrap { margin-top: 4px; text-align: center; }
  .settings-logout-link {
    padding: 4px 8px; background: transparent; border: none;
    color: var(--c-muted-soft); font-size: 11px; cursor: pointer;
    text-decoration: underline; text-underline-offset: 2px;
  }
  .settings-logout-link:hover { color: var(--c-muted); }
  .settings-logout-confirm { color: var(--c-danger, #d9534f); }
  .settings-logout-confirm:hover { color: var(--c-danger, #d9534f); }

  /* LLM 节：内联重置链接 */
  .settings-inline-reset {
    margin-top: 4px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--c-muted);
    font-size: 11px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .settings-inline-reset:hover { color: var(--brand-amber-strong); }

  /* 数据节 */
  .settings-data-row {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 8px;
  }
  .settings-data-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
  }
  .settings-data-btn:hover { border-color: var(--c-accent); color: var(--brand-amber-strong); background: var(--c-accent-soft); }
  .settings-kb-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0;
  }
  .settings-kb-item + .settings-kb-item {
    border-top: 1px solid var(--c-border-soft);
  }
  .settings-kb-info { display: flex; flex-direction: column; gap: 1px; }
  .settings-kb-name { font-weight: 500; font-size: 12px; }
  .settings-kb-desc { font-size: 10px; color: var(--c-muted); }
  .kb-toggle {
    position: relative; width: 34px; height: 18px;
    background: var(--c-border); border-radius: 9px;
    border: none; cursor: pointer; padding: 0;
    transition: background 0.2s;
    flex-shrink: 0;
  }
  .kb-toggle::after {
    content: ""; position: absolute;
    top: 2px; left: 2px;
    width: 14px; height: 14px;
    background: #fff; border-radius: 50%;
    transition: transform 0.2s;
  }
  .kb-toggle[data-on="true"] { background: var(--c-accent); }
  .kb-toggle[data-on="true"]::after { transform: translateX(16px); }
  .kb-toggle:disabled { opacity: 0.5; cursor: not-allowed; }
  .settings-kb-config {
    padding: 8px 0 4px;
    border-top: 1px solid var(--c-border-soft);
  }
  .settings-kb-config .settings-field { margin-bottom: 8px; }
  .settings-kb-status {
    display: flex; align-items: center; gap: 5px;
    font-size: 10px; color: var(--c-muted); margin-top: 1px;
  }
  .settings-kb-status .dot {
    width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
  }
  .settings-kb-status .dot-ok { background: #16a34a; }
  .settings-kb-status .dot-err { background: #dc2626; }
  .settings-kb-status .dot-off { background: var(--c-border); }
  .settings-kb-link {
    font-size: 10px; color: var(--c-accent); cursor: pointer;
    background: none; border: none; padding: 0; text-decoration: underline;
  }
  .settings-danger-row {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--c-border);
  }
  .settings-danger-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  .settings-danger-buttons + .settings-danger-confirm {
    margin-top: 10px;
  }
  .settings-danger {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #c0392b;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
  }
  .settings-danger:hover { background: #fee2e2; border-color: #fca5a5; }
  .settings-danger[disabled] { opacity: .55; cursor: not-allowed; }
  .settings-danger-confirm {
    display: flex; flex-direction: column; gap: 8px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff7f6;
  }
  .settings-danger-warn {
    display: inline-flex; align-items: flex-start; gap: 6px;
    font-size: 12px; color: #b32424; line-height: 1.5;
  }
  .settings-danger-actions {
    display: flex; gap: 8px; justify-content: flex-end;
  }

  /* settings 模态 footer：左侧改为提示文字而非操作按钮 */
  .settings-panel footer {
    border-top: 1px solid var(--c-border);
    background: #fafaf9;
    padding: 10px 16px;
    display: flex; align-items: center; justify-content: space-between;
  }
  /* 移动端 kbd 提示已隐藏，footer 只剩按钮组 → 靠右（覆盖上面同特异度的 space-between） */
  @media (max-width: 767px) {
    .settings-panel footer { justify-content: flex-end; }
  }

  .ai-gate-panel header {
    position: relative;
    padding-right: 48px;
  }
  .ai-gate-close {
    position: absolute;
    right: 10px;
    top: 0;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--c-muted);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
  }
  .ai-gate-close:hover {
    background: var(--c-border-soft);
    color: var(--c-text);
  }
  .ai-gate-lead {
    padding: 2px 0 4px;
  }
  .ai-gate-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-text);
  }
  .ai-gate-copy {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--c-muted);
  }
  .ai-gate-steps {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .ai-gate-step {
    min-width: 0;
    min-height: 58px;
    padding: 8px 7px;
    border: 1px solid rgba(24,57,92,0.08);
    border-radius: 7px;
    background: rgba(255,255,255,0.70);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }
  .ai-gate-step span {
    width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--brand-amber-soft);
    color: var(--brand-amber-strong);
    font-size: 10px;
    font-weight: 700;
  }
  .ai-gate-step strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-text);
    font-size: 11.5px;
    font-weight: 700;
  }
  .ai-gate-panel .editor-footer {
    gap: 8px;
  }
  @media (max-width: 767px) {
    .ai-gate-close {
      width: 44px;
      height: 44px;
      top: 3px;
      right: 4px;
    }
    .ai-gate-panel .editor-footer {
      justify-content: stretch;
    }
    .ai-gate-panel .editor-footer button {
      flex: 1 1 0;
      min-width: 0;
      min-height: 44px;
    }
  }

  /* ─── 空状态 ─── */
  .empty-state {
    text-align: center;
    padding: 56px 16px 64px;
    color: var(--c-muted-soft);
  }
  .empty-state .empty-logo {
    margin: 0 auto 18px;
    width: 56px; height: 56px;
    display: grid; place-items: center;
    opacity: 0.12;
  }
  .empty-state .empty-headline {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    color: var(--c-text);
    letter-spacing: -0.018em;
    margin-bottom: 4px;
  }
  .empty-state .empty-sub {
    font-size: 13px;
    color: var(--c-muted);
    margin-bottom: 14px;
  }
  .empty-state .hint { font-size: 12px; margin-top: 8px; }
  .empty-state .empty-icon {
    color: var(--c-muted-soft);
    margin: 0 auto 12px;
    width: 28px; height: 28px;
    display: grid; place-items: center;
    opacity: 0.6;
  }

  /* ─── Pending icon buttons ─── */
  .btn-icon {
    width: 28px; height: 28px;
    border-radius: 7px;
    display: grid; place-items: center;
    font-size: 13px;
  }
  .btn-icon.accept { background: var(--c-pending); color: #fff; }
  .btn-icon.reject { background: #fff; border: 1px solid var(--c-border); color: var(--c-muted); }
  .btn-icon.snooze {
    background: #fff;
    border: 1px solid var(--c-border);
    color: var(--brand-amber-strong);
    font-size: 11px;
  }

  /* ─── 习惯 / 目标 视图 ─── */
  .habit-list { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
  .habit-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    background: var(--c-surface);
    border: 1px solid var(--c-border-soft);
    border-radius: 10px;
    transition: border-color 0.12s, box-shadow 0.12s;
  }
  .habit-row:hover { border-color: var(--c-border); box-shadow: var(--shadow-card); }
  .habit-check {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--c-border);
    background: var(--c-surface);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    display: grid; place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s, border-color 0.12s;
  }
  .habit-check[data-on="true"] {
    background: var(--c-accent);
    border-color: var(--c-accent);
  }
  .habit-check:hover { border-color: var(--c-accent-border); }
  .habit-main {
    flex: 1; min-width: 0;
    text-align: left;
    background: none; border: none; padding: 0;
    cursor: pointer;
  }
  .habit-title {
    font-size: 14px; color: var(--c-text);
    font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .habit-meta {
    display: flex; align-items: center; gap: 8px;
    margin-top: 3px;
    font-size: 11px; color: var(--c-muted);
    min-width: 0;
  }
  .habit-meta-empty { color: var(--c-muted-soft); font-style: italic; }
  .habit-source {
    min-width: 0;
    max-width: 128px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #6F7350;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .habit-source svg { flex: 0 0 auto; color: var(--brand-amber-strong); }
  .habit-streak { color: var(--c-muted-soft); font-size: 11px; }
  .habit-streak.on { color: var(--c-warn); font-weight: 500; }
  .heatmap {
    display: grid;
    grid-template-columns: repeat(7, 14px);
    gap: 3px;
    flex-shrink: 0;
  }
  .heatmap-cell {
    width: 14px; height: 14px;
    border-radius: 3px;
    border: 1px solid var(--c-border-soft);
    background: var(--c-surface-2);
    cursor: pointer;
    padding: 0;
    transition: background 0.12s, border-color 0.12s, transform 0.12s;
  }
  .heatmap-cell:hover { transform: scale(1.15); border-color: var(--c-muted-soft); }
  .heatmap-cell[data-on="true"] { background: var(--c-accent); border-color: var(--c-accent); }
  .heatmap-cell[data-today="true"] { box-shadow: 0 0 0 1.5px var(--c-accent-border); }
  @media (max-width: 767px) {
    .habit-row { gap: 10px; padding: 10px; }
    .heatmap { grid-template-columns: repeat(7, 12px); gap: 2px; }
    .heatmap-cell { width: 12px; height: 12px; }
  }

  .goal-list { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
  .goal-card {
    display: flex; align-items: stretch;
    background: var(--c-surface);
    border: 1px solid var(--c-border-soft);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.12s, box-shadow 0.12s;
  }
  .goal-card:hover { border-color: var(--c-border); box-shadow: var(--shadow-card); }
  .goal-card-main {
    flex: 1; min-width: 0;
    text-align: left;
    background: none; border: none;
    padding: 12px 14px;
    cursor: pointer;
  }
  .goal-edit {
    background: none; border: none;
    border-left: 1px solid var(--c-border-soft);
    color: var(--c-muted-soft);
    font-size: 18px;
    padding: 0 14px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
  }
  .goal-edit:hover { background: var(--c-border-soft); color: var(--c-text); }
  .goal-card-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px;
  }
  .goal-title {
    font-size: 14px; font-weight: 500; color: var(--c-text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    flex: 1; min-width: 0;
  }
  .goal-progress {
    height: 6px;
    background: var(--c-border-soft);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
  }
  .goal-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--c-accent), var(--brand-amber-strong));
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .goal-meta {
    display: flex; align-items: center; gap: 10px;
    font-size: 11px; color: var(--c-muted);
  }
  .goal-count { font-weight: 500; color: var(--c-text-2); }
  .goal-deadline { color: var(--c-muted); }
  .goal-toggle {
    background: none; border: 1px solid var(--c-border);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    color: var(--c-muted);
    cursor: pointer;
  }
  .goal-toggle[data-on="true"] {
    background: var(--c-accent-soft);
    border-color: var(--c-accent-border);
    color: var(--brand-amber-strong);
  }
  .goal-done-list {
    list-style: none; padding: 0; margin: 0;
    border-top: 1px solid var(--c-border-soft);
  }
  .goal-done-list li {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--c-border-soft);
    font-size: 13px;
  }
  .goal-done-title {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--c-text-2);
  }
  .goal-done-date { color: var(--c-muted-soft); font-size: 11px; flex-shrink: 0; }
  .goal-done-empty {
    padding: 16px 8px;
    text-align: center;
    color: var(--c-muted-soft);
    font-size: 12px;
  }

  /* habit / goal 编辑器复用 .capture-panel 框架，body / footer / 字段微调 */
  .editor-body { padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 12px; }
  .editor-body .settings-field { gap: 4px; }
  .editor-body label { font-size: 11px; color: var(--c-muted); display: flex; align-items: baseline; gap: 6px; }
  .editor-body .hint-inline { font-size: 10px; color: var(--c-muted-soft); font-weight: normal; }
  .settings-static-field {
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background: var(--c-surface);
  }
  .editor-body input[type="text"],
  .editor-body input[type="number"],
  .editor-body input[type="date"],
  .editor-body input[type="email"],
  .editor-body input[type="tel"],
  .editor-body input[type="password"],
  .editor-body select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background: var(--c-surface);
    font-size: 13px;
    color: var(--c-text);
    font-family: inherit;
    outline: none;
    transition: border-color 0.12s;
  }
  .editor-body input:focus,
  .editor-body select:focus { border-color: var(--c-accent-border); }
  .editor-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .editor-footer {
    padding: 10px 16px;
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid var(--c-border);
    background: #fafaf9;
    gap: 10px;
  }
  .editor-footer-right { display: flex; gap: 6px; }
  .editor-footer .ie-delete {
    background: none; border: none;
    color: var(--c-danger);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
  }
  .editor-footer .ie-delete:hover { background: rgba(239,68,68,0.08); }
  .editor-footer .sched-btn {
    background: var(--c-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12px; font-weight: 500;
    cursor: pointer;
    transition: background 0.12s;
  }
  .editor-footer .sched-btn:hover { background: var(--c-accent-strong); }
  .editor-footer .sched-btn-cancel {
    background: none;
    color: var(--c-muted);
    border: 1px solid var(--c-border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
  }
  .editor-footer .sched-btn-cancel:hover { background: var(--c-border-soft); }
  .editor-footer button[disabled] { opacity: 0.55; cursor: not-allowed; }
  .devlimit-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .devlimit-actions button {
    min-height: 34px;
    white-space: nowrap;
  }
  @media (max-width: 480px) {
    .capture-panel[data-editor="devlimit"] .editor-footer {
      align-items: stretch;
    }
    .capture-panel[data-editor="devlimit"] .editor-footer > span {
      display: none;
    }
    .devlimit-actions {
      width: 100%;
    }
    .devlimit-actions button {
      flex: 1 1 calc(50% - 4px);
      min-width: 0;
    }
    .devlimit-actions .sched-btn {
      flex-basis: 100%;
    }
  }

  /* ── pair modal（短码 + QR / 输码） ── */
  .pair-body { align-items: center; }
  .pair-qr {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--c-border);
    width: 180px; height: 180px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
  }
  .pair-qr svg { width: 100%; height: 100%; display: block; }
  .pair-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 6px;
    text-align: center;
    color: var(--c-text);
    background: var(--c-border-soft);
    border-radius: 10px;
    padding: 12px 8px;
  }
  .pair-tip {
    font-size: 11px;
    color: var(--c-muted);
    text-align: center;
  }
  .pair-hint {
    font-size: 12px;
    color: var(--c-muted);
    line-height: 1.55;
    text-align: center;
  }
  .pair-loading {
    font-size: 13px;
    color: var(--c-muted);
    text-align: center;
    padding: 24px 0;
  }
  .pair-error {
    color: var(--c-danger);
    font-size: 12px;
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.18);
    border-radius: 6px;
    padding: 6px 10px;
    text-align: center;
  }
  .pair-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-align: center;
    letter-spacing: 6px;
    font-size: 20px;
    text-transform: uppercase;
  }

  /* ── recovery modal（登录方式绑定 / 找回） ── */
  .recovery-status {
    font-size: 12px;
    border-radius: 6px;
    padding: 8px 12px;
    text-align: center;
  }
  .recovery-ok {
    color: var(--c-accent-strong);
    background: rgba(232, 153, 53, 0.08);
    border: 1px solid rgba(232, 153, 53, 0.20);
  }
  .recovery-error {
    color: var(--c-danger);
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.18);
  }
  .recovery-dev {
    font-size: 11px;
    color: var(--c-muted);
    padding: 8px 12px;
    background: var(--c-border-soft);
    border-radius: 6px;
    word-break: break-all;
  }
  .recovery-dev-link {
    color: var(--c-accent);
    text-decoration: underline;
  }

  /* ── login modal：单主行动，按钮克制但保持移动端触控面积 ── */
  .login-panel header {
    min-height: 48px;
  }
  .login-close {
    margin-left: auto;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--c-muted);
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
  }
  .login-close:hover {
    background: var(--c-border-soft);
    color: var(--c-text);
  }
  .login-field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--c-muted);
    font-size: 12px;
    font-weight: 600;
  }
  .login-footer {
    gap: 8px;
  }
  .login-footer-single {
    justify-content: stretch;
  }
  .login-submit,
  .login-secondary {
    min-height: 44px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  }
  .login-submit {
    flex: 1;
    border: 0;
    background: var(--c-accent);
    color: #fff;
  }
  .login-submit:hover {
    background: var(--c-accent-strong);
  }
  .login-secondary {
    padding: 0 14px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--c-muted);
  }
  .login-secondary:hover {
    border-color: var(--c-border);
    background: var(--c-border-soft);
    color: var(--c-text);
  }
  .login-submit[disabled],
  .login-secondary[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
  }

  /* ── merge modal（两端数据合并） ── */
  .merge-intro {
    font-size: 13px;
    color: var(--c-text);
    margin-bottom: 8px;
  }
  .merge-sides {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .merge-side {
    background: var(--c-border-soft);
    border-radius: 10px;
    padding: 10px 12px;
  }
  .merge-side-label {
    font-size: 11px;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
  }
  .merge-side-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 3px;
    font-size: 13px;
    color: var(--c-text);
  }
  .merge-side-empty {
    font-size: 12px;
    color: var(--c-muted);
    font-style: italic;
  }
  .merge-strategy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
  }
  .merge-strategy-btn {
    background: none;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--c-text);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    text-align: center;
  }
  .merge-strategy-btn:hover { background: var(--c-border-soft); }
  .merge-strategy-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
  .merge-strategy-primary {
    background: var(--c-accent);
    color: #fff;
    border-color: var(--c-accent);
    font-weight: 500;
  }
  .merge-strategy-primary:hover { background: var(--c-accent-strong); }

  /* ── avatar 登录态强调 ── */
  .avatar-btn-auth { box-shadow: 0 0 0 2px rgba(232, 153, 53, 0.18); }
  .avatar-dd-primary {
    color: var(--c-accent) !important;
    font-weight: 500;
  }

  /* ═══════════════════════════════════════════════════════════════
     聊聊 (chat view) — 沉浸对话主场
     ═══════════════════════════════════════════════════════════════ */
  /* chat-view：主视图即「聊聊」。提醒、追问和草案都在消息流里完成。 */
  .chat-view {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
  }
  /* 对话卡片承载完整消息流；草案、提醒和追问都在对话里完成。 */
  .chat-card {
    flex: 1; min-height: 0;
    overflow-y: auto;
    border: 1px solid var(--c-border-soft);
    border-radius: 10px;
    background: rgba(255,255,255,0.5);
    padding: 0 8px 0;
    display: flex; flex-direction: column;
  }
  /* header 直接复用 .section-header（sticky + padding-top:12px + 卡片同色 bg）
     + Tailwind 工具类 flex/items-baseline/justify-between/mb-3/px-2，与「清单」完全同源。 */

  .chat-messages {
    display: flex; flex-direction: column; gap: 6px;
    padding: 18px 8px 16px;
    scroll-padding-top: 18px;
    /* 不要 overflow / scroll-behavior —— 卡片整体滚动由 .chat-card 承担；
       这里只是 flex 容器，padding 与 .chat-view-header 的 px-2 保持纵向边线一致。 */
  }
  .chat-time-divider {
    text-align: center;
    margin: 14px 0 6px;
    position: relative;
  }
  .chat-time-divider::before,
  .chat-time-divider::after {
    content: ""; position: absolute; top: 50%;
    width: 32%; height: 1px;
    background: var(--c-border-soft);
  }
  .chat-time-divider::before { left: 6%; }
  .chat-time-divider::after  { right: 6%; }
  .chat-time-divider span {
    display: inline-block;
    padding: 2px 12px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--c-muted-soft);
    letter-spacing: 0.6px;
    background: rgba(250,248,244,0.6);
    border-radius: 999px;
  }

  .chat-row { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0; }
  .chat-row-user { justify-content: flex-end; }
  .chat-row-user .bubble-user {
    align-self: auto;
    max-width: 78%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.55;
    border-radius: 16px 16px 4px 16px;
    background: var(--brand-amber-soft);
    color: var(--c-text);
    box-shadow: 0 1px 0 rgba(15,31,53,0.04);
    word-wrap: break-word;
  }
  .chat-row-ai .chat-avatar-ai {
    flex: 0 0 34px; height: 34px; width: 34px;
    border-radius: 50%;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    margin-top: 2px;
  }
  .chat-row-ai .chat-avatar-ai img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    user-select: none;
  }
  .chat-bubble-wrap { display: flex; flex-direction: column; gap: 6px; max-width: 78%; min-width: 0; }
  .chat-memory-wrap {
    max-width: min(520px, 78%);
  }
  .chat-memory-card {
    padding: 8px 10px;
    border: 1px solid rgba(24,57,92,0.08);
    border-radius: 10px;
    background: rgba(24,57,92,0.035);
    color: var(--c-text);
  }
  .chat-memory-card[data-kind="knowledge"],
  .chat-memory-card[data-kind="experiment"] {
    border-color: rgba(111,115,80,0.16);
    background: rgba(111,115,80,0.055);
  }
  .chat-memory-card[data-kind="arrangement"] {
    border-color: rgba(232,153,53,0.16);
    background: rgba(255,251,235,0.58);
  }
  .chat-memory-card[data-kind="reminder"] {
    border-color: rgba(37,99,235,0.13);
    background: rgba(37,99,235,0.045);
  }
  .chat-memory-head {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--brand-ink);
  }
  .chat-memory-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(24,57,92,0.06);
  }
  .chat-memory-card[data-kind="knowledge"] .chat-memory-icon,
  .chat-memory-card[data-kind="experiment"] .chat-memory-icon {
    color: #4b5f37;
    background: rgba(111,115,80,0.10);
  }
  .chat-memory-card[data-kind="arrangement"] .chat-memory-icon {
    color: var(--brand-amber-strong);
    background: rgba(232,153,53,0.11);
  }
  .chat-memory-card[data-kind="reminder"] .chat-memory-icon {
    color: #2563eb;
    background: rgba(37,99,235,0.08);
  }
  .chat-memory-text {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--c-text);
    word-break: break-word;
  }
  .chat-memory-details {
    display: grid;
    gap: 4px;
    margin-top: 6px;
  }
  .chat-memory-detail {
    min-width: 0;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
    gap: 6px;
    padding: 5px 6px;
    border: 1px solid rgba(24,57,92,0.06);
    border-radius: 7px;
    background: rgba(255,255,255,0.48);
  }
  .chat-memory-detail span {
    color: var(--brand-amber-strong);
    font-size: 10.5px;
    font-weight: 750;
    line-height: 1.35;
    white-space: nowrap;
  }
  .chat-memory-detail p {
    min-width: 0;
    margin: 0;
    color: var(--c-muted);
    font-size: 11px;
    line-height: 1.35;
    word-break: break-word;
  }
  .chat-memory-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: 5px;
    font-size: 10.5px;
    line-height: 1.2;
    color: var(--c-muted);
  }
  .chat-memory-foot > span:first-child {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .chat-memory-actions {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .chat-memory-btn {
    min-height: 24px;
    padding: 0 7px;
    border-radius: 6px;
    border: 1px solid rgba(24,57,92,0.10);
    background: rgba(255,255,255,0.62);
    color: var(--brand-ink);
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
  }
  .chat-memory-btn:hover {
    background: #fff;
    border-color: rgba(24,57,92,0.18);
  }
  .chat-structured-card {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 7px 8px;
    border: 1px solid rgba(24,57,92,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.64);
    box-shadow: 0 1px 0 rgba(15,31,53,0.025);
  }
  .chat-draft-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 8px;
    border-color: rgba(232,153,53,0.16);
    background:
      linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,251,235,0.52)),
      rgba(255,255,255,0.58);
  }
  .chat-structured-card[data-kind="action"] {
    border-color: rgba(232,153,53,0.18);
    background: rgba(255,251,235,0.58);
  }
  .chat-structured-card[data-kind="experiment"] {
    border-color: rgba(111,115,80,0.16);
    background: rgba(111,115,80,0.055);
  }
  .chat-structured-card[data-kind="question"] {
    border-color: rgba(138,90,18,0.15);
    background: rgba(255,255,255,0.68);
  }
  .chat-structured-card[data-kind="memory"] {
    border-color: rgba(37,99,235,0.14);
    background: rgba(37,99,235,0.045);
  }
  .chat-structured-card[data-kind="stage"],
  .chat-structured-card[data-kind="plan"],
  .chat-structured-card[data-kind="route"],
  .chat-structured-card[data-kind="draft"] {
    border-color: rgba(24,57,92,0.10);
    background: rgba(255,255,255,0.66);
  }
  .chat-structured-head {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    grid-column: 1 / -1;
  }
  .chat-structured-eyebrow {
    min-width: 0;
    color: var(--c-muted);
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
  }
  .chat-structured-main {
    min-width: 0;
    display: grid;
    gap: 2px;
  }
  .chat-structured-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-text);
    font-size: 12.5px;
    font-weight: 660;
    line-height: 1.25;
  }
  .chat-structured-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-muted);
    font-size: 10.5px;
    line-height: 1.25;
  }
  .chat-structured-intent {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-muted);
    font-size: 10.5px;
    line-height: 1.25;
  }
  .chat-draft-fields {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .chat-draft-fields::-webkit-scrollbar {
    display: none;
  }
  .chat-draft-fields span {
    flex: 0 0 auto;
    max-width: min(190px, 46vw);
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid rgba(24,57,92,0.07);
    background: rgba(255,255,255,0.62);
    color: var(--c-muted);
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .chat-draft-fields b {
    color: var(--brand-ink);
    font-size: 9.5px;
    font-weight: 760;
  }
  .chat-draft-fields span[data-kind="basis"],
  .chat-draft-fields span[data-kind="load"] {
    background: rgba(232,153,53,0.075);
    border-color: rgba(232,153,53,0.12);
  }
  .chat-draft-fields span[data-kind="source"] {
    background: rgba(111,115,80,0.07);
    border-color: rgba(111,115,80,0.10);
  }
  .chat-structured-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    grid-column: 2;
    grid-row: 2;
  }
  .chat-structured-btn {
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(24,57,92,0.10);
    border-radius: 7px;
    background: rgba(255,255,255,0.66);
    color: var(--brand-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
  .chat-structured-btn:hover {
    background: #fff;
    border-color: rgba(24,57,92,0.18);
  }
  .chat-structured-btn.primary {
    border-color: rgba(232,153,53,0.38);
    background: var(--brand-amber);
    color: #fff;
  }
  .chat-auto-confirm {
    color: rgba(15,23,42,0.50);
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
  }
  .chat-structured-btn.ghost {
    color: var(--c-muted);
  }
  .me-section[data-focus="true"] {
    border-color: rgba(232,153,53,0.30);
    background: rgba(255,255,255,0.72);
    box-shadow: 0 0 0 2px rgba(232,153,53,0.08);
  }
  @media (max-width: 420px) {
    .chat-memory-detail {
      grid-template-columns: 32px minmax(0, 1fr);
      padding: 5px;
    }
    .chat-memory-foot {
      align-items: flex-start;
      flex-direction: column;
      gap: 6px;
    }
    .chat-memory-actions {
      width: 100%;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .chat-memory-btn {
      width: 100%;
      min-width: 0;
      padding: 0 5px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .chat-structured-card {
      padding: 6px 7px;
      gap: 6px;
    }
    .chat-draft-card {
      grid-template-columns: minmax(0, 1fr);
    }
    .chat-structured-actions {
      grid-column: 1;
      grid-row: auto;
      justify-content: stretch;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      width: 100%;
    }
    .chat-structured-btn {
      min-width: 0;
      padding: 0 5px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .chat-auto-confirm {
      grid-column: 1 / -1;
      justify-self: center;
      order: 4;
      margin-top: -1px;
    }
  }
  .chat-row-ai .bubble-ai {
    align-self: auto;
    max-width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 4px 16px 16px 16px;
    background: #fff;
    color: var(--c-text);
    border: 1px solid var(--c-border-soft);
    box-shadow: 0 1px 0 rgba(15,31,53,0.02);
    word-wrap: break-word;
  }
  .bubble-ai-text { white-space: normal; }
  .bubble-ai-text > :first-child { margin-top: 0; }
  .bubble-ai-text > :last-child { margin-bottom: 0; }
  .bubble-ai-text .md-p { margin: 0 0 8px; }
  .bubble-ai-text .md-h { font-weight: 600; margin: 10px 0 6px; }
  .bubble-ai-text .md-list { margin: 0 0 8px; padding-left: 20px; }
  .bubble-ai-text .md-list li { margin: 2px 0; }
  .bubble-ai-text strong { font-weight: 600; }
  .bubble-ai-text em { font-style: italic; }
  .bubble-ai-text a { color: var(--c-accent); text-decoration: underline; }
  .bubble-ai-text .md-callout {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 7px 0 8px;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid rgba(232, 153, 53, 0.22);
    background: rgba(232, 153, 53, 0.075);
    color: #4d3513;
    line-height: 1.5;
  }
  .bubble-ai-text .md-callout-label {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 650;
    color: #b56a0b;
    white-space: nowrap;
  }
  .bubble-ai-text .md-callout-label::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 5px;
    border-radius: 999px;
    background: currentColor;
    vertical-align: 1px;
  }
  .bubble-ai-text .md-callout-text { min-width: 0; }
  .bubble-ai-text .md-callout[data-kind="important"] {
    border-color: rgba(24, 57, 92, 0.15);
    background: rgba(24, 57, 92, 0.045);
    color: var(--c-text);
  }
  .bubble-ai-text .md-callout[data-kind="important"] .md-callout-label { color: var(--c-brand); }
  .bubble-ai-text .md-callout[data-kind="danger"] {
    border-color: rgba(220, 38, 38, 0.17);
    background: rgba(220, 38, 38, 0.065);
    color: #7f1d1d;
  }
  .bubble-ai-text .md-callout[data-kind="danger"] .md-callout-label { color: #dc2626; }
  .bubble-ai-text .md-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92em;
    background: rgba(15,31,53,0.05);
    padding: 1px 4px;
    border-radius: 4px;
  }
  .bubble-ai-text .md-pre {
    margin: 0 0 8px;
    padding: 8px 10px;
    background: rgba(15,31,53,0.05);
    border-radius: 8px;
    overflow-x: auto;
  }
  .bubble-ai-text .md-pre code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92em;
    white-space: pre;
  }
  .bubble-ai-text .md-table {
    border-collapse: collapse;
    margin: 0 0 8px;
    width: 100%;
    font-size: 0.95em;
    display: block;
    overflow-x: auto;
  }
  .bubble-ai-text .md-table th,
  .bubble-ai-text .md-table td {
    border: 1px solid var(--c-border-soft);
    padding: 5px 9px;
    text-align: left;
  }
  .bubble-ai-text .md-table th {
    background: rgba(15,31,53,0.04);
    font-weight: 600;
  }

  .chat-progress {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    min-height: 18px;
    padding: 1px 1px 1px 0;
    color: var(--c-muted);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 560;
    line-height: 1.25;
    white-space: nowrap;
  }
  .chat-progress[data-phase="executing"] {
    color: #48658d;
  }
  .chat-progress-label {
    display: inline-flex;
    align-items: center;
  }
  .chat-progress-dots {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    width: 13px;
  }
  .chat-progress-dots span {
    width: 2.5px;
    height: 2.5px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.34;
    animation: chat-progress-dot 1.2s ease-in-out infinite;
  }
  .chat-progress-dots span:nth-child(2) { animation-delay: 0.16s; }
  .chat-progress-dots span:nth-child(3) { animation-delay: 0.32s; }
  @keyframes chat-progress-dot {
    0%, 70%, 100% { opacity: 0.26; transform: translateY(0); }
    35% { opacity: 0.82; transform: translateY(-1px); }
  }
  .chat-typing { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; }
  .chat-typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--c-muted-soft);
    animation: chat-typing-dot 1.2s infinite ease-in-out;
  }
  .chat-typing span:nth-child(2) { animation-delay: 0.15s; }
  .chat-typing span:nth-child(3) { animation-delay: 0.3s; }
  @keyframes chat-typing-dot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
  }
  @media (prefers-reduced-motion: reduce) {
    .chat-progress-dots span {
      animation: none;
    }
  }

  .chat-ask {
    background: var(--brand-amber-soft);
    border: 1px solid rgba(232,153,53,0.22);
    border-radius: 12px;
    padding: 10px 12px;
  }
  .chat-ask-q {
    font-size: 12.5px;
    color: var(--brand-amber-strong);
    margin-bottom: 6px;
    font-weight: 500;
  }
  .chat-ask-context {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
    color: var(--c-muted);
    font-family: var(--font-mono);
    font-size: 10.5px;
    line-height: 1;
  }
  .chat-ask-context span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 18px;
    padding: 0 5px;
    border: 1px solid rgba(232,153,53,0.14);
    border-radius: 6px;
    background: rgba(255,255,255,0.42);
    white-space: nowrap;
  }
  .chat-ask-chips, .chat-suggestions {
    display: flex; flex-direction: column; gap: 4px;
  }
  .chat-ask-chips .chip-btn, .chat-suggestions .chip-btn {
    margin-top: 0;
    transition: opacity 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
  }
  /* 已选过：所有 chip 都不可再点；未选项变灰；已选项保留 brand-amber 标记 */
  .chip-btn.chip-locked {
    pointer-events: none;
    cursor: default;
    opacity: 0.45;
  }
  .chip-btn.chip-picked {
    opacity: 1;
    background: var(--brand-amber);
    color: #fff;
    border-color: var(--brand-amber);
    font-weight: 500;
  }
  .chip-btn.chip-picked.chip-locked {
    opacity: 1;  /* 已选项要醒目，不跟着 locked 变灰 */
  }
  .chat-reminder-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid rgba(232,153,53,0.22);
    border-radius: 10px;
    background: rgba(255,255,255,0.74);
  }
  .chat-reminder-actions.resolved {
    display: inline-flex;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-amber-strong);
    background: rgba(232,153,53,0.10);
  }
  .chat-reminder-btn {
    min-height: 36px;
    padding: 0 11px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
  }
  .chat-reminder-btn.primary {
    background: var(--brand-amber);
    color: #fff;
  }
  .chat-reminder-btn.primary:hover { background: var(--brand-amber-strong); }
  .chat-reminder-btn.ghost {
    color: var(--brand-amber-strong);
    border: 1px solid rgba(232,153,53,0.24);
    background: rgba(255,255,255,0.82);
  }
  .chat-reminder-btn.ghost:hover {
    border-color: rgba(232,153,53,0.38);
    background: rgba(232,153,53,0.10);
  }
  @media (max-width: 767px) {
    .chat-reminder-actions {
      align-items: stretch;
      gap: 4px;
      padding: 6px;
    }
    .chat-reminder-btn {
      min-height: 34px;
      padding: 0 9px;
      border-radius: 7px;
    }
  }

  .chat-empty {
    margin: auto;
    text-align: center;
    padding: 46px 18px;
    color: var(--c-muted);
  }
  .chat-empty-dialogue {
    padding: 28px 18px;
  }
  .chat-empty-icon {
    color: var(--brand-amber);
    margin-bottom: 14px;
    opacity: 0.75;
  }
  .chat-empty-headline {
    font-family: var(--font-display);
    font-size: 17px;
    color: var(--c-text);
    margin-bottom: 6px;
  }
  .chat-empty-sub {
    font-size: 12.5px;
    color: var(--c-muted-soft);
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.6;
  }
  .chat-empty-flow {
    width: min(360px, 100%);
    margin: 12px auto 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .chat-empty-flow span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 7px;
    border: 1px solid rgba(24,57,92,0.08);
    border-radius: 7px;
    background: rgba(255,255,255,0.54);
    color: var(--c-muted);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
  }
  .chat-empty-flow svg {
    color: var(--brand-amber-strong);
  }
  .chat-empty-dialogue .chat-empty-icon {
    margin-bottom: 10px;
    opacity: 0.62;
  }
  .chat-empty-dialogue .chat-empty-flow {
    margin-top: 10px;
  }
  .assistant-starter-flow {
    width: min(336px, 100%);
    margin: 0;
    justify-content: flex-start;
  }
  .assistant-starter-flow span {
    min-height: 22px;
    padding: 0 6px;
    font-size: 10px;
  }
  .chat-empty-cues {
    width: min(320px, 100%);
    margin: 16px auto 0;
    display: grid;
    gap: 7px;
    text-align: left;
  }
  .chat-empty-cue {
    border: 0;
    background: transparent;
    padding: 4px 0;
    text-align: left;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--c-muted);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
  }
  .chat-empty-cue:hover {
    color: var(--c-text);
    border-color: rgba(232,153,53,0.24);
    background: rgba(255,255,255,0.74);
  }
  .assistant-starter-cues {
    width: min(336px, 100%);
    margin: 10px 0 0;
    gap: 6px;
  }
  .assistant-starter-cues .chat-empty-cue {
    min-height: 38px;
    padding: 5px 7px;
    border: 1px solid rgba(232,153,53,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.58);
    font-size: 11.5px;
  }
  .chat-empty-cue-type {
    min-width: 58px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 7px;
    border: 1px solid rgba(24,57,92,0.07);
    border-radius: 999px;
    background: rgba(255,255,255,0.62);
    color: var(--brand-ink);
    font-size: 10px;
    font-weight: 760;
    white-space: nowrap;
  }
  .chat-empty-cue[data-kind="experiment"] .chat-empty-cue-type {
    color: #5f6541;
    background: rgba(111,115,80,0.08);
    border-color: rgba(111,115,80,0.12);
  }
  .chat-empty-cue[data-kind="profile"] .chat-empty-cue-type {
    color: #1d4ed8;
    background: rgba(37,99,235,0.06);
    border-color: rgba(37,99,235,0.11);
  }
  .chat-empty-cue[data-kind="reminder"] .chat-empty-cue-type {
    color: var(--brand-amber-strong);
    background: rgba(232,153,53,0.08);
    border-color: rgba(232,153,53,0.13);
  }
  .assistant-aha-cue > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .assistant-aha-cue > span.chat-empty-cue-type {
    flex-direction: row;
  }
  .assistant-aha-cue strong,
  .assistant-aha-cue small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .assistant-aha-cue strong {
    color: var(--c-text);
    font-size: 11.5px;
    line-height: 1.25;
  }
  .assistant-aha-cue small {
    color: var(--c-muted);
    font-size: 10.5px;
    line-height: 1.25;
  }

  .chat-input-region {
    flex: 0 0 auto;
    padding: 10px 0 14px;
    /* 不再加 border-top / 背景遮罩 —— .chat-view 现在是透明容器，
       多余的边线/底色会和 .chat-messages 卡片产生视觉撕裂感。 */
  }
  /* AI 不可达 / 配置缺失：贴在 shell 上方的临时提示条，点正文 → 打开设置；点 × → 仅关闭。
     不入 conversation —— 由 state.aiError 临时驱动，下次发送或开始打字会自动清掉。 */
  .chat-input-error {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #FDF1EE;
    border: 1px solid rgba(192,57,43,0.22);
    border-radius: 12px;
    color: #A0271B;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
  }
  .chat-input-error:hover { background: #FBE6E1; border-color: rgba(192,57,43,0.35); }
  .chat-input-error-icon { display: inline-flex; flex-shrink: 0; color: #C0392B; }
  .chat-input-error-text { flex: 1; min-width: 0; }
  .chat-input-error-close {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 6px;
    background: transparent;
    color: #A0271B;
    font-size: 18px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.15s;
  }
  .chat-input-error-close:hover { background: rgba(192,57,43,0.10); }
  .voice-fallback {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 6px 8px 6px 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(232,153,53,0.20);
    border-radius: 12px;
    background: rgba(255,248,237,0.95);
    color: #7A4A12;
    font-size: 12.5px;
    line-height: 1.35;
  }
  .voice-fallback-icon {
    display: inline-flex;
    flex: 0 0 auto;
    color: var(--brand-amber-strong);
  }
  .voice-fallback-text {
    flex: 1 1 auto;
    min-width: 0;
  }
  .voice-fallback-action,
  .voice-fallback-close {
    flex: 0 0 auto;
    min-width: 32px;
    min-height: 32px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
  }
  .voice-fallback-action {
    padding: 0 9px;
    background: #fff;
    color: #8A5A12;
    font-weight: 600;
    border: 1px solid rgba(232,153,53,0.18);
  }
  .voice-fallback-action:hover {
    background: rgba(232,153,53,0.10);
    color: var(--brand-amber-strong);
  }
  .voice-fallback-close {
    width: 32px;
    min-width: 44px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(122,74,18,0.68);
    font-size: 18px;
    line-height: 1;
  }
  .voice-fallback-close:hover {
    background: rgba(122,74,18,0.08);
    color: #7A4A12;
  }
  /* shell 在 error 状态时给 input 边框轻微染红，但保持可输入（用户可以改完再发） */
  .chat-input-shell.error {
    border-color: rgba(192,57,43,0.35);
  }
  .chat-input-shell.error:focus-within {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(232,153,53,0.12), 0 6px 18px -12px rgba(15,31,53,0.18);
  }
  .chat-input-shell {
    display: flex; align-items: center; gap: 6px;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 13px;
    padding: 4px 6px 4px 10px;
    box-shadow: 0 1px 0 rgba(15,31,53,0.02), 0 6px 18px -12px rgba(15,31,53,0.18);
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .chat-input-shell:focus-within {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(232,153,53,0.12), 0 6px 18px -12px rgba(15,31,53,0.18);
  }
  .chat-input-shell.preview { border-color: var(--c-pending-border); }
  .chat-input-shell.parsing { border-color: var(--c-pending-border); }
  .chat-input-mark { color: var(--brand-amber); flex: 0 0 auto; display: inline-flex; }
  .chat-input-shell input {
    flex: 1; min-width: 0;
    border: none; outline: none;
    background: transparent;
    font-size: 14px;
    font-family: var(--font-ui);
    color: var(--c-text);
    padding: 5px 0;
  }
  .chat-input-shell input:not(:focus) {
    /* 屏蔽非焦点状态下的长按复制/粘贴菜单，确保长按完美触发录音 */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  .chat-input-shell input::placeholder { color: var(--c-muted-soft); }
  .chat-input-mic, .chat-input-send {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--c-muted);
    cursor: pointer;
    /* 关键：长按手势必须独占触摸事件，否则 Android WebView 把 down/up 当成滚动手势消化掉，
       pointerdown 还在但 pointerup 走不到我们的 listener，录音停不下来。 */
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    transition: background 0.15s, color 0.15s;
  }
  .chat-input-mic:hover { background: var(--c-border-soft); color: var(--c-text); }

  /* ─── 语音 Ribbon（豆包式录音条）────────────────────────────
     替代旧 .chat-input-shell.recording / .chat-rec-inline。录音中整条 ribbon
     替换 input shell：上半为 7 根胖 bar 跟随频段实时舞动，下半为 mic icon +
     松开提示 hint。bars 高度由 interactions.js::startVolumeMeter 用
     getByteFrequencyData 60fps 直写（不走 render()）。上滑 80px 触发
     body.chat-mic-cancel-armed → 橙→红、hint 切"松开 取消"、mic 圈变 ×。 */
  /* 与对话框等高的单行：波形撑满 + 取消 + mic。圆角 / padding 对齐 .chat-input-shell。 */
  .voice-ribbon {
    flex: 1; min-width: 0;
    display: flex; flex-direction: row; align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 12px;
    border-radius: 13px;
    border: 1px solid var(--brand-amber);
    background: linear-gradient(180deg, #FFF1D8 0%, #FFE0A8 100%);
    box-shadow: 0 6px 18px -12px rgba(232,153,53,0.6),
                inset 0 1px 0 rgba(255,255,255,0.6);
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    -webkit-user-select: none; user-select: none;
    touch-action: none;  /* 长按手势独占触摸事件，避免被滚动消化 */
  }
  /* 波形：撑满中段、垂直居中，高度对齐按钮行（32px）。 */
  .voice-ribbon-bars {
    flex: 1; min-width: 0;
    display: flex; align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 2px;
  }
  .voice-bar {
    flex: 1 1 0;
    min-width: 6px;
    max-width: 10px;
    height: 18%;  /* 初始静态值；rAF 持续覆盖 */
    background: linear-gradient(180deg, #FFB148 0%, #E89935 100%);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(192,114,18,0.35);
    transform-origin: center;
    transition: background 0.18s, box-shadow 0.18s;
    will-change: height;
  }
  /* 取消键：丢弃本次录音、不发送。放在完成键左侧。 */
  .voice-ribbon-cancel {
    flex: 0 0 auto;
    width: 32px; height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,0.7);
    color: #6B3A05;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    touch-action: auto;
    transition: background 0.15s, color 0.15s, transform 0.12s;
  }
  .voice-ribbon-cancel:hover { background: #fff; color: #7A1B10; }
  .voice-ribbon-cancel:active { transform: scale(0.92); }
  /* 完成键：录音中点一下结束并发送（主操作，红色实心） */
  .voice-ribbon-stop {
    flex: 0 0 auto;
    width: 32px; height: 32px;
    border-radius: 999px;
    border: none;
    background: #DC2626;
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    touch-action: auto;
    box-shadow: 0 2px 8px -2px rgba(220,38,38,0.5);
    transition: background 0.15s, color 0.15s, transform 0.12s;
  }
  .voice-ribbon-stop:hover { background: #B91C1C; }
  .voice-ribbon-stop:active { transform: scale(0.92); }

  /* 取消态（上滑 80px+）：整条变红 + mic 圈变 ×。
     无大动效切换—— body class 切一下立刻全套属性 transition 过去，"红"是用户唯一需要 register 的信号。 */
  body.chat-mic-cancel-armed .voice-ribbon {
    border-color: #C0392B;
    background: linear-gradient(180deg, #FFE0DA 0%, #F8B8AD 100%);
    box-shadow: 0 14px 32px -16px rgba(192,57,43,0.6),
                inset 0 1px 0 rgba(255,255,255,0.55);
  }
  body.chat-mic-cancel-armed .voice-bar {
    background: linear-gradient(180deg, #E45A48 0%, #C0392B 100%);
    box-shadow: 0 1px 2px rgba(122,27,16,0.4);
  }
  body.chat-mic-cancel-armed .voice-ribbon-stop { color: #7A1B10; background: rgba(255,255,255,0.75); }

  /* 识别中：松手到 STT 返回之间。冷色 + 慢呼吸，区别于"采集中"的暖色波形。 */
  .voice-ribbon.voice-ribbon-transcribing {
    border-color: var(--c-border);
    background: #F4EFE6;
    box-shadow: none;
    padding: 4px 12px;
    min-height: 40px;
    gap: 0;
    justify-content: center;
    animation: voice-ribbon-breathe 1.6s ease-in-out infinite;
  }
  .voice-ribbon-transcribing .voice-ribbon-top {
    display: flex; align-items: center; gap: 8px;
    color: var(--c-muted);
    font-size: 13px;
    font-weight: 500;
  }
  .voice-ribbon-spinner {
    display: inline-flex;
    color: var(--c-muted);
    animation: voice-ribbon-spin 0.9s linear infinite;
  }
  .voice-ribbon-spinner svg { stroke: currentColor; }
  @keyframes voice-ribbon-spin {
    to { transform: rotate(360deg); }
  }
  @keyframes voice-ribbon-breathe {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.78; }
  }
  @media (prefers-reduced-motion: reduce) {
    .voice-ribbon.voice-ribbon-transcribing { animation: none; }
    .voice-ribbon-spinner { animation: none; }
    .chat-input-send.submitting svg { animation: none; }
  }

  /* ─── 雾团（移动端录音 UI · 豆包风）──────────────────────────────
     position:fixed 锚到屏幕底部，高度 ~46vh。两层径向渐变叠出"团状"层次：
       cloud（主层）：宽椭圆 amber，半径覆盖整层
       cloud-soft（点睛层）：窄高斯点 偏亮，强化"中心呼吸"
     上滑取消（body.chat-mic-cancel-armed）：amber → 浅红，同样过渡 0.22s。
     底部细波形：21 根 2px 圆角小竖条，高度由 startVolumeMeter 60fps 直写。 */
  .voice-fog {
    position: fixed;
    left: 0; right: 0;
    bottom: 0;
    height: 55vh;
    min-height: 350px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
    z-index: 60;
    pointer-events: auto;
    touch-action: none;
    -webkit-user-select: none; user-select: none;
    overflow: hidden;
    animation: voice-fog-in 0.22s cubic-bezier(.22,.61,.36,1) both;
  }
  /* 雾团层：从底部向上的径向渐变，呼吸动效 */
  .voice-fog-cloud-soft {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 180% 120% at 50% 110%,
      rgba(232, 153, 53, 0.85) 0%,
      rgba(232, 153, 53, 0.50) 30%,
      rgba(232, 153, 53, 0.20) 65%,
      rgba(232, 153, 53, 0) 90%);
    animation: voice-fog-breath 3.6s ease-in-out infinite;
    transition: background 0.22s ease;
  }
  @keyframes voice-fog-breath {
    0%, 100% { transform: scale(1); opacity: 0.75; }
    50%      { transform: scale(1.06); opacity: 1; }
  }
  @keyframes voice-fog-in {
    from { opacity: 0; transform: translateY(8%); }
    to   { opacity: 1; transform: translateY(0); }
  }
  /* startVoiceInput 与 startMediaRecording 各 render 一次 → 第二次 render 时 modalAnim
     给本节点附加 .no-anim，避免 voice-fog-in 入场动画重放（CLAUDE.md §5.1 闪烁兜底）。 */
  .voice-fog.no-anim { animation: none; }
  /* 提示文字：垂直居中靠下，white-on-fog 用阴影确保可读 */
  .voice-fog-hint {
    position: absolute;
    left: 0; right: 0;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 56px);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow: 0 1px 6px rgba(140, 70, 12, 0.55), 0 0 18px rgba(232,153,53,0.35);
    font-family: var(--font-ui);
    pointer-events: none;
    transition: color 0.18s, text-shadow 0.18s;
  }
  .voice-fog-hint-cancel { display: none; }
  /* 底部细波形：21 根，居中铺开 60% 宽。条之间间距小，密集如音浪线 */
  .voice-fog-wave {
    position: absolute;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 70%;
    max-width: 320px;
    height: 22px;
    pointer-events: none;
  }
  .voice-fog-wave .voice-bar {
    flex: 1 1 0;
    min-width: 2px;
    max-width: 4px;
    height: 18%;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    box-shadow: 0 0 6px rgba(255, 220, 170, 0.5);
    transform-origin: center;
    transition: background 0.18s, box-shadow 0.18s;
    will-change: height;
  }

  /* 取消态（上滑 80px+）：amber → 浅红。色相变化 + 文案切换 = 用户唯一需要 register 的信号。 */
  body.chat-mic-cancel-armed .voice-fog-cloud-soft {
    background: radial-gradient(ellipse 180% 120% at 50% 110%,
      rgba(232, 88, 88, 0.85) 0%,
      rgba(232, 88, 88, 0.50) 30%,
      rgba(232, 88, 88, 0.20) 65%,
      rgba(232, 88, 88, 0) 90%);
  }
  body.chat-mic-cancel-armed .voice-fog-hint {
    text-shadow: 0 1px 6px rgba(140, 30, 20, 0.55), 0 0 18px rgba(232, 88, 88, 0.4);
  }
  body.chat-mic-cancel-armed .voice-fog-hint-default { display: none; }
  body.chat-mic-cancel-armed .voice-fog-hint-cancel { display: block; }
  body.chat-mic-cancel-armed .voice-fog-wave .voice-bar {
    background: rgba(255, 220, 220, 0.92);
    box-shadow: 0 0 6px rgba(255, 180, 180, 0.6);
  }

  @media (prefers-reduced-motion: reduce) {
    .voice-fog { animation: none; }
    .voice-fog-cloud-soft { animation: none; }
  }

  .chat-input-send {
    background: var(--brand-amber);
    color: #fff;
    width: 40px; height: 40px;
  }
  .chat-input-send:hover { background: var(--brand-amber-strong); }
  .chat-input-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
  }
  .chat-input-send.submitting svg {
    animation: review-spin 0.9s linear infinite;
  }
  /* 停止生成不是危险操作，用温和的次级控制弱化压迫感。 */
  .chat-input-stop {
    background: rgba(250, 248, 244, 0.92) !important;
    border: 1px solid rgba(120, 113, 108, 0.22) !important;
    color: #6F6257 !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.42);
  }
  .chat-input-stop:hover {
    background: rgba(232, 153, 53, 0.10) !important;
    border-color: rgba(232, 153, 53, 0.30) !important;
    color: var(--brand-amber-strong) !important;
  }
  .chat-input-stop:active { transform: scale(0.96); }
  .chat-input-stop svg { fill: currentColor !important; }

  @media (min-width: 768px) {
    /* 桌面：chat-input-region 固定在主区底部，保持聊聊输入稳定。 */
    .chat-input-region {
      position: fixed;
      bottom: 28px;
      left: 50vw;
      transform: translateX(-50%);
      width: min(760px, calc(100vw - 32px));
      padding: 0;
      z-index: 30;
    }
  }

  @media (max-width: 767px) {
    /* 移动端：与 desktop 同结构（.chat-card 是滚动卡片），只去边距/padding 适配窄屏 */
    .chat-view {
      max-width: 100%;
      margin: 0;
      gap: 0;
    }
    /* tabbar 已在 .app-shell grid 第二行占位 → chat-input-region 不再需要为它让位 padding。
       键盘弹起时 .main-area 的 padding-bottom 自动把整个 chat-view（含 chat-card 滚动区与
       chat-input-region）向上压缩，输入框紧贴键盘上沿，最后几条消息也同步上移、不被键盘遮。 */
    .app-shell[data-view="chat"] .canvas-wrap    { padding-bottom: 0 !important; }
    .app-shell[data-view="chat"] .canvas-columns { padding-bottom: 0; }
    /* 聊聊页 input 区在 canvas-columns 内（左右各 6px padding），mobile-bar 在外（左右 14px）。
       这里补 8px 让两处 shell 外边到屏幕的距离都是 14px，宽度完全一致。 */
    .chat-input-region { padding: 7px 8px 9px; }
    /* 移动端 shell 即录音热区：touch-action:none 让浏览器不要把按下/拖动当作滚动或双击缩放，
       pointermove 才能可靠驱动"上滑取消"判定；input 内部仍允许文本选择/光标移动，单独覆盖。 */
    #chat-input-shell-mobile {
      touch-action: none;
      -webkit-user-select: none;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
    }
    /* input 的所有原生长按反应全部关闭：
       - touch-action: none → 关 scroll-detection（auto 会让手指轻微移动派发 pointercancel）
       - user-select: none + -webkit-touch-callout: none → 关 Android"长按弹出选择/复制/粘贴菜单"，
         它会在 ~400ms 时派发 pointercancel 抢走我们的长按计时器 → 第二次长按按不动。
       - tap-highlight: transparent → 关 Android"灰色高亮闪一下"的视觉残留。
       单行 chat input 用不到拖动选择文本；focus 由 onUp 里 tapInput.focus() 手动补上，键盘正常弹出。 */
    #chat-input-shell-mobile input {
      touch-action: none;
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
      -webkit-tap-highlight-color: transparent;
    }
    /* 按下瞬间反馈：边框/底色轻微变化，让用户知道"在听你按"
       (用 :active；pointerdown 即触发，与 500ms 计时器并行) */
    #chat-input-shell-mobile:active {
      border-color: var(--brand-amber);
      background: #FFFDF7;
    }
  }

  /* ─── 移动常驻 AI 条（聊聊页之外的全部视图）───
     作为 .main-area 最后一个 flex 子节点；键盘弹起时随 main-area padding-bottom 整体上移，
     无需自己 listen --kb-h。padding 与 .chat-input-region(mobile)+.canvas-wrap(14px H) 对齐，
     保证「清单/今天」与「聊聊」两处输入框大小、位置完全一致；不再加 border-top 和背景遮罩，
     与聊聊页一致地透明叠在主区上方。 */
  .mobile-bar {
    flex: 0 0 auto;
    padding: 4px 14px 7px;
    background: transparent;
  }
  @media (min-width: 768px) {
    .mobile-bar { display: none; }
  }

  /* ═══════════════════════════════════════════════════════════════
     我 (me view) — AI 对用户的理解镜像
     ═══════════════════════════════════════════════════════════════ */
  .me-view {
    max-width: 720px;
    margin: 0 auto;
    padding: 18px 8px 40px;
    display: flex; flex-direction: column;
    gap: 28px;
  }

  .me-identity-card {
    position: relative;
    display: flex; align-items: flex-start; gap: 14px;
    background: linear-gradient(135deg, #FAF5EC 0%, #F4ECDA 100%);
    border: 1px solid rgba(232,153,53,0.18);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 1px 0 rgba(15,31,53,0.02), 0 12px 30px -22px rgba(232,153,53,0.30);
    overflow: hidden;
  }
  /* 卡片右上角的极淡 amber 光晕：暗示「AI 生成」，与可编辑的 user input 卡片做视觉区分 */
  .me-identity-card::before {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(232,153,53,0.18) 0%, rgba(232,153,53,0) 65%);
    pointer-events: none;
    z-index: 0;
  }
  .me-identity-card > * { position: relative; z-index: 1; }
  .me-identity-avatar {
    flex: 0 0 44px; height: 44px; width: 44px;
    background: linear-gradient(135deg, #F6B763 0%, #E89935 60%, #D27A1E 100%);
    border: 1px solid rgba(232,153,53,0.55);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #FFF8EC;
    box-shadow: 0 0 0 0 rgba(232,153,53,0.0), 0 4px 12px -4px rgba(232,153,53,0.45);
    animation: meIdentityHalo 4.6s ease-in-out infinite;
  }
  @keyframes meIdentityHalo {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232,153,53,0), 0 4px 10px -4px rgba(232,153,53,0.35); }
    50%      { box-shadow: 0 0 0 5px rgba(232,153,53,0.10), 0 6px 18px -4px rgba(232,153,53,0.55); }
  }
  @media (prefers-reduced-motion: reduce) {
    .me-identity-avatar { animation: none; }
  }
  .me-identity-body { flex: 1; min-width: 0; }
  .me-identity-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--brand-amber-strong);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .me-identity-quote {
    font-family: var(--font-display);
    font-size: 17px;
    line-height: 1.55;
    color: var(--c-text);
    margin: 0;
    font-style: italic;
    position: relative;
    padding-left: 14px;
  }
  .me-identity-quote::before {
    content: """;
    position: absolute; left: -2px; top: -6px;
    font-size: 28px;
    color: var(--brand-amber);
    line-height: 1;
    font-family: Georgia, serif;
  }
  /* 待形成态：弱化装饰 + 降饱和，让用户一眼看出是空态而不是 AI 编造的判断 */
  .me-identity-card.is-empty .me-identity-label {
    color: var(--c-muted);
    opacity: 0.85;
  }
  .me-identity-quote-empty {
    color: var(--c-muted);
    font-size: 15px;
    /* 极慢的"呼吸"——表达 AI 在等待形成判断，不抢戏 */
    animation: meIdentityBreathe 4.5s ease-in-out infinite;
  }
  .me-identity-quote-empty::before { color: var(--c-muted-soft); opacity: 0.7; }
  @keyframes meIdentityBreathe {
    0%, 100% { opacity: 0.78; }
    50%      { opacity: 1; }
  }
  @media (prefers-reduced-motion: reduce) {
    .me-identity-quote-empty { animation: none; opacity: 0.92; }
  }

  /* AI 生成署名：底部小字 + sparkles dot，明确表达「这段文字由 AI 生成、不可编辑」 */
  .me-identity-footnote {
    margin-top: 12px;
    display: flex; align-items: center; gap: 6px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--c-muted-soft);
    letter-spacing: 0.4px;
    opacity: 0.85;
  }
  .me-identity-footnote-dot {
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--brand-amber);
    flex-shrink: 0;
  }

  /* 有画像态：卡片竖排（上：头像+画像+编辑；中：每日印象折叠；下：署名） */
  .me-identity-card.has-persona {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .me-identity-top {
    display: flex; align-items: flex-start; gap: 14px;
  }
  .me-daily-wrap {
    margin-top: 14px;
    border-top: 1px dashed rgba(232,153,53,0.25);
    padding-top: 10px;
  }
  .me-daily-toggle {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--c-muted);
    letter-spacing: 0.4px;
    cursor: pointer;
    list-style: none;
    user-select: none;
  }
  .me-daily-toggle::-webkit-details-marker { display: none; }
  .me-daily-toggle::before { content: "▸ "; color: var(--brand-amber); }
  details[open] > .me-daily-toggle::before { content: "▾ "; }
  .me-daily-list {
    list-style: none; margin: 10px 0 0; padding: 0;
    display: flex; flex-direction: column; gap: 10px;
  }
  .me-daily-row {
    background: rgba(255,255,255,0.45);
    border: 1px solid rgba(232,153,53,0.12);
    border-radius: 10px;
    padding: 8px 10px;
  }
  .me-daily-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 3px;
  }
  .me-daily-date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--c-muted);
  }
  .me-daily-mood {
    font-size: 10.5px;
    color: var(--brand-amber-strong);
    background: rgba(232,153,53,0.12);
    border-radius: 6px;
    padding: 1px 7px;
  }
  .me-daily-del {
    margin-left: auto;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--c-muted-soft);
    background: none; border: none; cursor: pointer;
    padding: 2px; border-radius: 6px;
  }
  .me-daily-del:hover { color: #C0392B; background: rgba(192,57,43,0.08); }
  .me-daily-confirm {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 6px;
  }
  .me-daily-del-cancel, .me-daily-del-yes {
    font-family: var(--font-mono);
    font-size: 11px;
    border-radius: 6px;
    padding: 2px 8px;
    cursor: pointer;
    border: 1px solid transparent;
  }
  .me-daily-del-cancel {
    color: var(--c-muted);
    background: rgba(15,31,53,0.05);
  }
  .me-daily-del-yes {
    color: #fff;
    background: #C0392B;
  }
  .me-daily-summary {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--c-text);
  }

  .me-section {
    display: flex; flex-direction: column; gap: 12px;
  }
  .me-section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 12px;
    padding: 0 4px;
  }
  .me-section-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--c-text);
    margin: 0;
    letter-spacing: 0.2px;
  }
  .me-section-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--c-muted-soft);
    letter-spacing: 0.3px;
    margin-top: 2px;
  }
  .me-add-btn {
    font-family: var(--font-display);
    font-size: 12.5px;
    color: var(--brand-amber-strong);
    background: rgba(232,153,53,0.08);
    border: 1px solid rgba(232,153,53,0.22);
    padding: 4px 12px;
    border-radius: 999px;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: color 0.15s, background 0.15s, border-color 0.15s, transform 0.15s;
  }
  .me-add-btn:hover {
    color: var(--brand-amber);
    background: rgba(232,153,53,0.14);
    border-color: rgba(232,153,53,0.38);
  }
  .me-add-btn:active { transform: scale(0.97); }

  .me-placeholder {
    background: rgba(255,255,255,0.55);
    border: 1px dashed var(--c-border);
    border-radius: 12px;
    padding: 16px 18px;
  }
  .me-placeholder-title {
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--c-text);
    margin-bottom: 4px;
  }
  .me-placeholder-hint {
    font-size: 12.5px;
    color: var(--c-muted);
    line-height: 1.6;
    margin-bottom: 10px;
  }
  .me-placeholder-cta {
    font-size: 12px;
    color: var(--brand-amber-strong);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-weight: 500;
  }
  .me-placeholder-cta:hover { color: var(--brand-amber); }

  .me-rhythm {
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--c-border-soft);
    border-radius: 10px;
    background: rgba(255,255,255,0.58);
  }
  .me-rhythm .me-section-head { padding: 0; }
  .me-rhythm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .me-rhythm-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(120, 113, 108, 0.07);
    color: var(--c-text);
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .me-rhythm-chip svg { flex: 0 0 auto; color: var(--brand-amber-strong); }
  .me-rhythm-line,
  .me-rhythm-empty {
    font-size: 12px;
    line-height: 1.5;
    color: var(--c-muted);
  }
  .me-rhythm-influence {
    display: grid;
    gap: 6px;
    padding: 8px 9px;
    border: 1px solid rgba(37, 99, 235, 0.10);
    border-radius: 9px;
    background: rgba(37, 99, 235, 0.04);
  }
  .me-rhythm-influence-kicker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
  }
  .me-rhythm-influence-text {
    color: var(--c-muted);
    font-size: 11.5px;
    line-height: 1.45;
  }
  .me-rhythm-influence-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }
  .me-rhythm-influence-chips span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.76);
    border: 1px solid rgba(37, 99, 235, 0.10);
    color: #24436f;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .me-rhythm-influence-chips svg,
  .me-rhythm-influence-kicker svg {
    flex: 0 0 auto;
  }
  .me-rhythm-empty {
    padding: 2px 0 1px;
  }
  .me-rhythm-memory,
  .me-rhythm-suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .me-rhythm-memory {
    flex-direction: column;
  }
  .me-rhythm-dismissed {
    margin-top: -2px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .me-rhythm-memory-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 6px 7px;
    border: 1px solid rgba(37, 99, 235, 0.10);
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.045);
  }
  .me-rhythm-memory-row-main {
    min-width: 0;
    display: grid;
    gap: 2px;
  }
  .me-rhythm-memory-row-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #1d4ed8;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.25;
  }
  .me-rhythm-memory-row-title .assistant-card-type {
    flex: 0 0 auto;
  }
  .me-rhythm-memory-row-details {
    min-width: 0;
    display: grid;
    gap: 1px;
  }
  .me-rhythm-memory-row-detail {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-muted);
    font-size: 10.5px;
    line-height: 1.25;
  }
  .me-rhythm-memory-row-detail strong {
    color: #47638f;
    font-weight: 700;
  }
  .me-rhythm-memory-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
  }
  .me-rhythm-memory-row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border: 0;
    border-radius: 7px;
    background: rgba(37,99,235,0.06);
    color: #1d4ed8;
    cursor: pointer;
    line-height: 1;
  }
  .me-rhythm-memory-row button.adjust {
    width: auto;
    padding: 0 7px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(37,99,235,0.12);
    color: #2f5f9f;
    font-size: 11px;
    font-weight: 700;
  }
  .me-rhythm-memory-row button.icon {
    width: 24px;
    padding: 0;
  }
  .me-rhythm-memory-row button:hover {
    background: rgba(37,99,235,0.10);
  }
  .me-rhythm-memory-more {
    min-width: 0;
  }
  .me-rhythm-memory-more summary {
    width: fit-content;
    max-width: 100%;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 7px;
    border-radius: 7px;
    color: var(--c-muted);
    font-size: 11px;
    line-height: 1.2;
    cursor: pointer;
    list-style: none;
  }
  .me-rhythm-memory-more summary::-webkit-details-marker {
    display: none;
  }
  .me-rhythm-memory-more summary:hover {
    background: rgba(37,99,235,0.06);
    color: #1d4ed8;
  }
  .me-rhythm-memory-more-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
  }
  .me-rhythm-dismissed-more {
    flex: 1 0 100%;
  }
  .me-rhythm-dismissed-more-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
  }
  .me-rhythm-memory-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    min-height: 24px;
    padding: 3px 5px 3px 8px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.06);
    color: #1d4ed8;
    font-size: 11px;
    line-height: 1.2;
  }
  .me-rhythm-memory-chip .assistant-card-type {
    margin-left: -3px;
    font-size: 10px;
  }
  .me-rhythm-suggestion .assistant-card-type {
    margin-bottom: 4px;
  }
  .me-rhythm-memory-chip button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: currentColor;
    opacity: 0.62;
  }
  .me-rhythm-memory-chip button:hover {
    background: rgba(29,78,216,0.08);
    opacity: 1;
  }
  .me-rhythm-memory-chip button.restore {
    width: auto;
    min-width: 0;
    height: 18px;
    padding: 0 6px;
    border: 1px solid currentColor;
    font-size: 10px;
    font-weight: 650;
    line-height: 1;
  }
  .me-rhythm-memory-chip-muted {
    border-color: rgba(120,113,108,0.14);
    background: rgba(120,113,108,0.07);
    color: var(--c-muted);
  }
  .me-rhythm-memory-chip-muted button:hover {
    background: rgba(120,113,108,0.10);
  }
  .me-rhythm-suggestion {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 7px 8px;
    border: 1px solid rgba(120,113,108,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.58);
  }
  .me-rhythm-suggestion strong,
  .me-rhythm-suggestion small {
    display: block;
    min-width: 0;
  }
  .me-rhythm-suggestion strong {
    font-size: 12px;
    line-height: 1.3;
    color: var(--c-text);
  }
  .me-rhythm-suggestion small {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--c-muted);
  }
  .me-rhythm-suggestion-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .me-rhythm-suggestion-actions button {
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
  }
  .me-rhythm-suggestion-actions .ghost {
    background: transparent;
    color: var(--c-muted);
  }
  .me-rhythm-suggestion-actions .primary {
    border-color: rgba(232,153,53,0.28);
    background: rgba(232,153,53,0.12);
    color: var(--brand-amber-strong);
  }
  @media (max-width: 430px) {
    .me-rhythm-suggestion {
      grid-template-columns: 1fr;
      align-items: stretch;
    }
    .me-rhythm-suggestion-actions {
      justify-content: flex-end;
    }
  }

  .me-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    padding: 28px 18px;
    border: 1px dashed var(--c-border);
    border-radius: 12px;
    background: rgba(255,255,255,0.4);
  }
  .me-empty-icon {
    color: var(--brand-amber);
    opacity: 0.85;
    margin-bottom: 2px;
  }
  .me-empty-headline {
    font-family: var(--font-display, inherit);
    font-size: 15px;
    color: var(--c-text);
    letter-spacing: 0.2px;
  }
  .me-empty-sub {
    font-size: 12.5px;
    color: var(--c-muted-soft);
    max-width: 280px;
    line-height: 1.55;
  }
  .me-empty-cta {
    margin-top: 6px;
    font-size: 12px;
    color: var(--c-muted);
    background: var(--c-border-soft);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    transition: color 120ms, background 120ms, border-color 120ms;
  }
  .me-empty-cta:hover {
    color: var(--brand-amber);
    border-color: var(--brand-amber);
    background: rgba(232, 153, 53, 0.08);
  }

  /* ─── 当前焦点：已填状态显示一段引用样的文字 ─── */
  .me-focus .me-focus-text {
    display: block;
    width: 100%;
    text-align: left;
    margin-top: 8px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #FAF5EC 0%, #F4ECDA 100%);
    border: 1px solid rgba(232,153,53,0.20);
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--c-text);
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s;
  }
  .me-focus .me-focus-text:hover { border-color: rgba(232,153,53,0.34); box-shadow: var(--shadow-card); }

  /* ─── 我的边界：列表行，带时段 chip ─── */
  .boundary-list { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
  .boundary-row {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    padding: 11px 12px;
    background: rgba(255,255,255,0.6);
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s;
  }
  .boundary-row:hover { border-color: var(--c-border); box-shadow: var(--shadow-card); }
  .boundary-time {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-amber-strong);
    background: rgba(232,153,53,0.12);
    padding: 3px 8px;
    border-radius: 7px;
  }
  .boundary-label { font-size: 14px; color: var(--c-text); }

  /* ─── 锚（goal）卡片：sand 色调，与 identity-card 同源；
         作用域限定 .me-anchors，不影响 goal-detail modal 内部仍在用的 .goal-card */
  .me-anchors .anchor-list {
    display: flex; flex-direction: column;
    gap: 12px;
    padding: 0;
  }
  .me-anchors .anchor-card {
    display: flex; align-items: stretch;
    background: linear-gradient(135deg, #FAF5EC 0%, #F4ECDA 100%);
    border: 1px solid rgba(232,153,53,0.20);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  }
  .me-anchors .anchor-card:hover {
    border-color: rgba(232,153,53,0.34);
    box-shadow: 0 1px 0 rgba(15,31,53,0.02), 0 18px 40px -28px rgba(232,153,53,0.40);
  }
  .me-anchors .anchor-card.is-reached {
    background: linear-gradient(135deg, #F0F6EE 0%, #E4EFE0 100%);
    border-color: rgba(42,122,62,0.24);
  }
  .me-anchors .anchor-card-body {
    flex: 1; min-width: 0;
    display: flex; align-items: flex-start; gap: 12px;
    background: none; border: none;
    text-align: left;
    padding: 14px 8px 14px 14px;
    cursor: pointer;
  }
  .me-anchors .anchor-card-body-static { cursor: default; }
  .me-anchors .anchor-card-icon {
    flex: 0 0 36px; height: 36px; width: 36px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(232,153,53,0.26);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-amber-strong);
    margin-top: 1px;
  }
  .me-anchors .anchor-card.is-reached .anchor-card-icon {
    background: rgba(255,255,255,0.7);
    border-color: rgba(42,122,62,0.28);
    color: #2A7A3E;
  }
  .me-anchors .anchor-card-content {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 9px;
  }
  .me-anchors .anchor-card-head {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
  }
  .me-anchors .anchor-title {
    font-family: var(--font-display);
    font-size: 15.5px;
    font-weight: 500;
    color: var(--c-text);
    margin: 0;
    letter-spacing: 0.1px;
    line-height: 1.45;
    flex: 1; min-width: 0;
    /* 锚的标题往往是用户写下的方向句，长一点也要看得见全文。允许自然换行，
       中文按字断、英文按词断；卡片高度随之自适应。 */
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .me-anchors .anchor-progress-row {
    display: flex; align-items: center; gap: 12px;
  }
  .me-anchors .anchor-progress {
    flex: 1;
    height: 7px;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(232,153,53,0.14);
    border-radius: 999px;
    overflow: hidden;
  }
  .me-anchors .anchor-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-amber), var(--brand-amber-strong));
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .me-anchors .anchor-progress-stats {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--c-text);
    letter-spacing: 0.4px;
    display: flex; align-items: baseline;
    flex-shrink: 0;
  }
  .me-anchors .anchor-stat-num {
    font-weight: 600;
    color: var(--brand-amber-strong);
  }
  .me-anchors .anchor-stat-sep {
    color: var(--c-muted-soft);
    margin: 0 3px;
  }
  .me-anchors .anchor-stat-target { color: var(--c-muted); }
  .me-anchors .anchor-meta {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap;
  }
  .me-anchors .anchor-count-pill {
    font-family: var(--font-display);
    font-size: 12.5px;
    color: var(--brand-amber-strong);
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(232,153,53,0.22);
    border-radius: 999px;
    padding: 2px 10px;
    letter-spacing: 0.3px;
  }
  .me-anchors .anchor-deadline {
    font-family: "STKaiti", "Kaiti SC", "DFKai-SB", "KaiTi", "楷体", "BiauKai", serif;
    font-style: italic;
    font-size: 12.5px;
    color: var(--c-muted);
    letter-spacing: 0.5px;
  }
  .me-anchors .anchor-deadline.is-soon { color: var(--brand-amber-strong); }
  .me-anchors .anchor-deadline.is-overdue { color: #C0392B; }
  .me-anchors .anchor-hint {
    font-size: 11.5px;
    color: var(--c-muted-soft);
    font-style: italic;
  }
  .me-anchors .anchor-card-actions {
    display: flex; align-items: center;
    gap: 6px;
    padding: 0 10px 0 4px;
  }
  .me-anchors .anchor-toggle {
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(232,153,53,0.22);
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 11.5px;
    color: var(--c-muted);
    cursor: pointer;
    font-family: var(--font-display);
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  .me-anchors .anchor-toggle:hover {
    border-color: rgba(232,153,53,0.4);
    color: var(--brand-amber-strong);
  }
  .me-anchors .anchor-toggle[data-on="true"] {
    background: rgba(255,255,255,0.85);
    border-color: rgba(42,122,62,0.32);
    color: #2A7A3E;
  }
  .me-anchors .anchor-edit {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(232,153,53,0.18);
    border-radius: 50%;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    color: var(--c-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
  }
  .me-anchors .anchor-edit:hover {
    color: var(--brand-amber-strong);
    border-color: rgba(232,153,53,0.4);
    background: rgba(255,255,255,0.85);
  }

  /* 锚的空态：sand 渐变虚线框，与卡片同色调 */
  .me-anchors .me-empty-anchors {
    background: linear-gradient(135deg, rgba(250,245,236,0.7) 0%, rgba(244,236,218,0.7) 100%);
    border: 1px dashed rgba(232,153,53,0.32);
    padding: 32px 20px;
  }
  .me-anchors .me-empty-anchors .me-empty-headline {
    font-family: var(--font-display);
    font-size: 16px;
    font-style: italic;
  }
  .me-anchors .me-empty-anchors .me-empty-cta {
    font-family: var(--font-display);
    color: var(--brand-amber-strong);
    background: rgba(255,255,255,0.7);
    border-color: rgba(232,153,53,0.32);
    letter-spacing: 0.3px;
  }
  .me-anchors .me-empty-anchors .me-empty-cta:hover {
    color: var(--brand-amber);
    border-color: rgba(232,153,53,0.5);
    background: #fff;
  }

  @media (max-width: 767px) {
    .me-view { padding: 12px 4px 80px; gap: 22px; }
    .me-identity-card { padding: 16px 18px; gap: 12px; }
    .me-identity-quote { font-size: 16px; }
    .me-section-title { font-size: 17px; }
    .me-anchors .anchor-card-body { padding: 12px 6px 12px 12px; gap: 10px; }
    .me-anchors .anchor-card-icon { flex: 0 0 32px; height: 32px; width: 32px; }
    .me-anchors .anchor-title { font-size: 15px; }
    .me-anchors .anchor-card-actions { padding: 0 8px 0 2px; gap: 4px; }
    .me-anchors .anchor-edit { width: 26px; height: 26px; font-size: 16px; }
    .me-anchors .anchor-toggle { padding: 3px 9px; font-size: 11px; }
  }
