Ver código fonte

feat(mobile): 移动端 UI 多轮优化——设置页/抽屉/新建会话/底栏/确认弹窗

- 「我的」设置区重排:外观卡片整合(色板四列/字号滑杆/界面档位)、
  令牌值单行省略、退出登录独立区块
- 抽屉 ⋯ 菜单与会话操作:确认文案全量精简(只说动作本身),
  新增 m-confirm / m-action-sheet 业务弹层组件
- 新建会话弹层卡片化(描边行 + 40px 头像 + › 引导 + 空态插画块)
- 底部导航:选中态只靠图标描边→实心 + 主色(去胶囊/按压背景),
  文字降至 10.5px,栏高收窄
- 通知权限弹层:remaining 口径修正(自启动 unknown 不计入,
  「全部就绪」可达)+ 已开启绿色回显;桌面端联动细节同步

Co-Authored-By: Claude Code <noreply@anthropic.com>
Huccct 16 horas atrás
pai
commit
ab0b6273e1

+ 1 - 1
src/app/components/domain/session-tree/session-tree.ts

@@ -77,7 +77,7 @@ export interface NewSessionRequest {
             品牌文字左对齐到下方菜单图标(2026-10-30 用户要求):
             去掉图标后给一个等宽占位,让 "Fmode" 的起点与「新建对话」的图标列对齐。
           -->
-          <span class="brand-word">Fmode</span>
+          <span class="brand-word">飞马SI</span>
         </a>
         <!--
           折叠按钮(2026-10-30 用户要求"隐藏式折叠"):

+ 104 - 4
src/app/core/notification-setup.service.ts

@@ -5,6 +5,24 @@ import { JPushService } from './jpush.service';
 import { JPushLifecycleService } from './jpush.lifecycle';
 
 /** 首次引导与「我的」共用一个入口;系统授权和推送连接分别呈现。 */
+
+/**
+ * 单条权限检查项。
+ *
+ * `state` 三值刻意保留 `unknown`:
+ *   自启动在 Android 上没有标准查询接口(小米/华为/OPPO 各用私有配置),
+ *   系统通知和省电策略则可以确切读取。UI 必须区分「确实没开」和「读不到」,
+ *   否则用户会以为自己开成功了(或没成功)。
+ */
+export interface PermissionCheck {
+  key: 'notifications' | 'push' | 'battery' | 'autostart';
+  label: string;
+  state: 'on' | 'off' | 'error' | 'unknown';
+  detail: string;
+  /** 需要跳转的系统设置页;null = 无需操作 */
+  action: SettingsTarget | null;
+}
+
 @Injectable({ providedIn: 'root' })
 export class NotificationSetupService {
   readonly notifications = inject(AppNotificationService);
@@ -17,11 +35,77 @@ export class NotificationSetupService {
   readonly needsSettings = signal(false);
   readonly granted = this.notifications.grantedState;
   readonly ready = computed(() => this.granted() === true && this.push.binding() === 'bound');
+
+  /**
+   * 每项权限的**实时状态**(2026-11-23)。
+   *
+   * 用户反馈:「打开权限后 UI 上不显示已开启,用户不知道到底开没开」。
+   * 此前只有「系统通知 / 推送服务」两行状态,省电策略和自启动**只有按钮没有结果**,
+   * 用户点完回来还是一脸问号。
+   *
+   * 现在四项全部有状态:
+   *   · 系统通知   —— 原生 areNotificationsEnabled(),确切可读
+   *   · 推送服务   —— JPush phase + binding
+   *   · 省电策略   —— 原生 isIgnoringBatteryOptimizations(),确切可读
+   *   · 自启动     —— **系统不提供查询接口**,返回 unknown,UI 必须如实说「无法读取」
+   */
+  readonly checks = computed<PermissionCheck[]>(() => {
+    const g = this.granted();
+    const st = this.settings.status();
+    const phase = this.push.phase();
+    const binding = this.push.binding();
+    return [
+      {
+        key: 'notifications',
+        label: '系统通知',
+        state: g === true ? 'on' : g === false ? 'off' : 'unknown',
+        detail: g === true ? '已允许' : g === false ? '未允许' : '读取中',
+        action: g === true ? null : 'notifications',
+      },
+      {
+        key: 'push',
+        label: '推送服务',
+        state: phase === 'started' && binding === 'bound' ? 'on'
+          : phase === 'error' || binding === 'error' ? 'error'
+          : 'off',
+        detail: this.pushText(),
+        action: null,
+      },
+      {
+        key: 'battery',
+        label: '省电策略',
+        state: st == null ? 'unknown' : st.batteryOptimizationsIgnored ? 'on' : 'off',
+        detail: st == null ? '读取中'
+          : st.batteryOptimizationsIgnored ? '已加入免优化名单'
+          : '未设为「无限制」',
+        // 已开启就不再给「去设置」—— 右栏改显示「已开启」(2026-11-23)
+        action: st != null && st.batteryOptimizationsIgnored ? null : 'battery',
+      },
+      {
+        key: 'autostart',
+        label: '自启动',
+        // 系统不提供查询接口 —— 永远返回 unknown,绝不假装知道
+        state: 'unknown',
+        detail: '系统不提供查询,请确认已允许',
+        action: 'autostart',
+      },
+    ];
+  });
+
+  /**
+   * 是否还有需要用户手动处理的项目。
+   *
+   * 🔴 只统计「明确没开 / 出错」的项(2026-11-23 修正口径):
+   * 此前 `state !== 'on'` 全计入,自启动永远 unknown → 永远有 1 项「待处理」,
+   * 用户全配好了也等不到「全部就绪」。读不到的项不是用户的待办。
+   */
+  readonly remaining = computed(() => this.checks().filter((c) => c.state === 'off' || c.state === 'error').length);
+
   readonly pushText = computed(() => {
     if (this.push.phase() === 'error' || this.push.binding() === 'error') return '连接未完成,可重试';
     if (this.push.phase() !== 'started') return '尚未启用';
-    if (!this.push.registrationId()) return '正在连接推送服务…';
-    return this.push.binding() === 'bound' ? '设备已注册并绑定账号' : '正在绑定当前账号…';
+    if (!this.push.registrationId()) return '正在连接…';
+    return this.push.binding() === 'bound' ? '已注册并绑定账号' : '正在绑定账号…';
   });
 
   constructor() {
@@ -69,7 +153,23 @@ export class NotificationSetupService {
     this.busy.set(true);
     this.error.set(null);
     try {
-      if (!(await this.settings.open(target))) this.error.set('无法打开系统设置。请长按 Fmode 图标,进入「应用信息」手动设置。');
-    } finally { this.busy.set(false); }
+      if (!(await this.settings.open(target))) this.error.set('无法打开系统设置。请长按 飞马SI 图标,进入「应用信息」手动设置。');
+    } finally {
+      this.busy.set(false);
+      /*
+       * 打开设置页后立刻查一次(2026-11-23):
+       * 用户可能之前就开好了,这一次刷新能让清单先显示真实状态,
+       * 而不是等他改完回来才变。返回前台时 AppNotificationService 的
+       * appStateChange 监听还会再刷一次,两处互补。
+       */
+      void this.settings.refresh();
+      /*
+       * 测试替身不一定实现 refreshGranted(单测里的 notifications 是桩),
+       * 这里做能力检测而不是直接调用 —— 刷新状态是增强行为,不能让它把流程打挂。
+       */
+      if (typeof this.notifications.refreshGranted === 'function') {
+        void this.notifications.refreshGranted();
+      }
+    }
   }
 }

+ 1 - 1
src/app/desktop/pages/mine/mine.ts

@@ -212,7 +212,7 @@ import { SessionService } from '../../../core/session.service';
           </ui-card>
 
           <footer class="about">
-            <span>Fmode</span>
+            <span>飞马SI</span>
           </footer>
         </div>
       </div>

+ 5 - 8
src/app/desktop/shell/dk-nav/dk-nav.ts

@@ -49,9 +49,9 @@ interface NavGroup {
     <nav class="sidebar" [class.collapsed]="collapsed()" aria-label="主导航">
       <!-- 品牌 + 折叠钮 -->
       <div class="brand-row">
-        <span class="brand-mark" aria-hidden="true"><i class="fa-solid fa-cube"></i></span>
+        <img class="brand-mark" src="icons/logo-mark.png" alt="" aria-hidden="true" />
         @if (!collapsed()) {
-          <span class="brand-word">Fmode</span>
+          <span class="brand-word">飞马SI</span>
         }
         <button
           type="button"
@@ -176,16 +176,13 @@ interface NavGroup {
         padding: var(--sp-3) var(--sp-3) var(--sp-2);
         flex-shrink: 0;
       }
+      /* logo 图形自带品牌渐变,不再套底色块(2026-11-23) */
       .brand-mark {
-        display: inline-flex;
-        align-items: center;
-        justify-content: center;
+        display: block;
         width: 32px;
         height: 32px;
         flex-shrink: 0;
-        border-radius: var(--r-md);
-        background: var(--nav-brand);
-        color: var(--nav-on-brand);
+        object-fit: contain;
       }
       .brand-word {
         font-size: var(--fs-20);

+ 5 - 9
src/app/desktop/shell/dk-top-nav/dk-top-nav.ts

@@ -29,8 +29,8 @@ interface NavItem {
   template: `
     <header class="topnav">
       <a class="brand" [routerLink]="link('/chat')" aria-label="Fmode 首页">
-        <span class="brand-mark" aria-hidden="true"><i class="fa-solid fa-cube"></i></span>
-        <span class="brand-word">Fmode</span>
+        <img class="brand-mark" src="icons/logo-mark.png" alt="" aria-hidden="true" />
+        <span class="brand-word">飞马SI</span>
       </a>
 
       <nav class="routes" aria-label="主导航">
@@ -118,15 +118,11 @@ interface NavItem {
         color: var(--nav-ink);
       }
       .brand-mark {
-        display: inline-flex;
-        align-items: center;
-        justify-content: center;
+        display: block;
         width: 28px;
         height: 28px;
-        border-radius: var(--r-sm);
-        background: var(--nav-brand);
-        color: var(--nav-on-brand);
-        font-size: var(--fs-13);
+        flex-shrink: 0;
+        object-fit: contain;
       }
       .brand-word {
         font-size: var(--fs-16);

+ 264 - 0
src/app/mobile/components/m-action-sheet/m-action-sheet.ts

@@ -0,0 +1,264 @@
+import { ChangeDetectionStrategy, Component, input, model, output } from '@angular/core';
+import { LockScrollDirective } from '../../directives/lock-scroll.directive';
+
+/** 操作面板的一项 */
+export interface MActionItem {
+  /** 稳定 key:用于回传、避免同名冲突 */
+  key: string;
+  label: string;
+  /** 危险操作:整行浅红底 + 红字,单独成一张卡 */
+  danger?: boolean;
+  /** 禁用(置灰、不可点) */
+  disabled?: boolean;
+  /** 左侧 FontAwesome 图标类(如 `fa-solid fa-folder`),不传则纯文字 */
+  icon?: string;
+  /** 右侧辅助文案(如条数、当前归属) */
+  hint?: string;
+  /** 右侧打勾:用于「移动到项目」这类单选列表,标记当前所属 */
+  checked?: boolean;
+  /** true = 右侧显示 ›,表示点了会进下一层 */
+  drill?: boolean;
+}
+
+/**
+ * 移动端统一操作面板(2026-11-23)。
+ *
+ * 抽屉「⋯」与会话页「⋯」共用这一个组件 —— 此前两套自建菜单的
+ * 内边距、标题样式、危险色各写各的,同一动作在两处长得不一样。
+ *
+ * ## 2026-11-23 第二次改版(用户:「还不够,不好看」)
+ *
+ * 新版结构:
+ *
+ * ```
+ * ┌─────────────────────────────┐
+ * │          ──                 │
+ * │      【会话标题】            │   上下文标题
+ * ├─────────────────────────────┤
+ * │ [→] 移动到项目           ›  │   每项带 32px 图标块
+ * │ [📦] 归档                   │
+ * └─────────────────────────────┘
+ * ┌─────────────────────────────┐
+ * │ [🗑] 删除会话                │   危险项**单独成卡**、整行浅红底
+ * └─────────────────────────────┘
+ * ┌─────────────────────────────┐
+ * │           取消              │
+ * └─────────────────────────────┘
+ * ```
+ *
+ * 关键点:
+ * - **危险操作单独一张卡**,与普通操作之间有 8px 缝隙 —— 拇指不会误触;
+ * - **每项带图标块**,纯文字菜单像系统原生列表,加图标后更像产品;
+ * - **`checked` 打勾**:移动到项目时能一眼看出现在属于哪个;
+ * - 选中反馈用底色(`--surface-2`),不是整屏跳变。
+ */
+@Component({
+  selector: 'app-m-action-sheet',
+  changeDetection: ChangeDetectionStrategy.OnPush,
+  imports: [LockScrollDirective],
+  template: `
+    @if (open()) {
+      <div class="mas-root" role="dialog" aria-modal="true" [attr.aria-label]="title() || '操作'" [appLockScroll]="open()">
+        <button type="button" class="mas-mask" aria-label="关闭" (click)="dismiss()"></button>
+        <div class="mas-stack">
+          <section class="mas-card">
+            <div class="mas-grabber" aria-hidden="true"></div>
+            @if (title()) {
+              <p class="mas-title">{{ title() }}</p>
+            }
+            @for (item of normalItems(); track item.key) {
+              <button
+                type="button"
+                class="mas-item"
+                [class.has-icon]="item.icon"
+                [disabled]="item.disabled"
+                (click)="select(item)"
+              >
+                @if (item.icon) {
+                  <span class="mas-icon"><i [class]="item.icon" aria-hidden="true"></i></span>
+                }
+                <span class="mas-label">{{ item.label }}</span>
+                @if (item.hint) {
+                  <span class="mas-hint">{{ item.hint }}</span>
+                }
+                @if (item.checked) {
+                  <i class="fa-solid fa-check mas-check" role="img" aria-label="当前"></i>
+                } @else if (item.drill) {
+                  <i class="fa-solid fa-chevron-right mas-chevron" aria-hidden="true"></i>
+                }
+              </button>
+            }
+          </section>
+
+          <!-- 危险组:独立成卡,与常规操作拉开距离 -->
+          @if (dangerItems().length > 0) {
+            <section class="mas-card">
+              @for (item of dangerItems(); track item.key) {
+                <button type="button" class="mas-item is-danger" [disabled]="item.disabled" (click)="select(item)">
+                  @if (item.icon) {
+                    <span class="mas-icon"><i [class]="item.icon" aria-hidden="true"></i></span>
+                  }
+                  <span class="mas-label">{{ item.label }}</span>
+                </button>
+              }
+            </section>
+          }
+
+          <button type="button" class="mas-cancel" (click)="dismiss()">{{ cancelText() }}</button>
+        </div>
+      </div>
+    }
+  `,
+  styles: [
+    `
+      :host { display: contents; }
+      /* 层级:高于抽屉(--z-modal 1100),低于通知层;沿用契约里的右键菜单层级 */
+      .mas-root {
+        position: fixed;
+        inset: 0;
+        z-index: var(--z-context-menu);
+        display: flex;
+        align-items: flex-end;
+      }
+      .mas-mask { position: absolute; inset: 0; border: 0; background: var(--overlay); }
+      .mas-stack {
+        position: relative;
+        display: flex;
+        flex-direction: column;
+        gap: var(--sp-2);
+        width: 100%;
+        padding: var(--sp-2) var(--sp-2) calc(var(--sp-2) + var(--mob-safe-bottom));
+        box-sizing: border-box;
+        animation: mas-in var(--motion-panel) var(--ease-standard);
+      }
+      .mas-card {
+        overflow: hidden;
+        border-radius: var(--r-lg);
+        background: var(--surface);
+        box-shadow: var(--shadow-overlay);
+      }
+      .mas-grabber {
+        width: 36px;
+        height: 4px;
+        margin: var(--sp-2) auto var(--sp-1);
+        border-radius: var(--r-tag);
+        background: var(--edge-strong);
+      }
+      .mas-title {
+        margin: 0;
+        padding: var(--sp-2) var(--sp-4) var(--sp-3);
+        overflow: hidden;
+        color: var(--ink-2);
+        font-size: var(--fs-13);
+        font-weight: 600;
+        text-align: center;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+
+      .mas-item {
+        display: flex;
+        align-items: center;
+        gap: var(--sp-3);
+        width: 100%;
+        min-height: 56px;
+        padding: 0 var(--sp-4);
+        box-sizing: border-box;
+        border: 0;
+        border-top: 1px solid var(--edge);
+        background: var(--surface);
+        color: var(--ink);
+        font: inherit;
+        font-size: var(--fs-15);
+        text-align: left;
+        cursor: pointer;
+        transition: background var(--motion-fast) var(--ease-standard);
+      }
+      /* 第一项不要顶边线(抓杆 / 标题行已负责分隔) */
+      .mas-grabber + .mas-item,
+      .mas-title + .mas-item { border-top: 0; }
+      .mas-item:active { background: var(--surface-2); }
+      .mas-item:disabled { cursor: not-allowed; opacity: .45; }
+
+      /* 图标块:统一 32px,让所有文字左缘对齐 */
+      .mas-icon {
+        display: grid;
+        flex: none;
+        place-items: center;
+        width: 32px;
+        height: 32px;
+        border-radius: var(--r-sm);
+        background: var(--canvas);
+        color: var(--ink-2);
+        font-size: var(--fs-13);
+      }
+      .mas-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+      .mas-hint { flex: none; color: var(--muted); font-size: var(--fs-12); }
+      .mas-check { flex: none; color: var(--primary); font-size: var(--fs-14); }
+      .mas-chevron { flex: none; color: var(--faint); font-size: var(--fs-11); }
+
+      /* 危险项:整行浅红底 + 红字,图标块同步转红 */
+      .mas-item.is-danger {
+        border-top: 0;
+        background: color-mix(in srgb, var(--danger) 7%, var(--surface));
+        color: var(--danger);
+        font-weight: 500;
+      }
+      .mas-item.is-danger:active { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); }
+      .mas-item.is-danger .mas-icon {
+        background: color-mix(in srgb, var(--danger) 12%, transparent);
+        color: var(--danger);
+      }
+
+      .mas-cancel {
+        width: 100%;
+        min-height: 52px;
+        border: 0;
+        border-radius: var(--r-lg);
+        background: var(--surface);
+        box-shadow: var(--shadow-overlay);
+        color: var(--ink-2);
+        font: inherit;
+        font-size: var(--fs-15);
+        font-weight: 600;
+        cursor: pointer;
+      }
+      .mas-cancel:active { background: var(--surface-hover); }
+      @keyframes mas-in {
+        from { transform: translateY(40px); opacity: 0; }
+        to { transform: translateY(0); opacity: 1; }
+      }
+      @media (prefers-reduced-motion: reduce) { .mas-stack { animation: none; } }
+    `,
+  ],
+})
+export class MActionSheetComponent {
+  readonly open = model(false);
+  /** 面板标题:上下文(会话标题 / 项目名),空则不显示 */
+  readonly title = input('');
+  readonly items = input<MActionItem[]>([]);
+  readonly cancelText = input('取消');
+
+  /** 选中某一项(面板会先自动关闭) */
+  readonly pick = output<MActionItem>();
+  readonly dismissed = output<void>();
+
+  /** 普通项与危险项分开渲染,危险组单独成卡 */
+  protected normalItems(): MActionItem[] {
+    return this.items().filter((i) => !i.danger);
+  }
+  protected dangerItems(): MActionItem[] {
+    return this.items().filter((i) => i.danger);
+  }
+
+  protected select(item: MActionItem): void {
+    if (item.disabled) return;
+    this.open.set(false);
+    this.pick.emit(item);
+  }
+
+  protected dismiss(): void {
+    this.open.set(false);
+    this.dismissed.emit();
+  }
+}

+ 230 - 0
src/app/mobile/components/m-confirm/m-confirm.ts

@@ -0,0 +1,230 @@
+import {
+  ChangeDetectionStrategy,
+  Component,
+  ElementRef,
+  HostListener,
+  effect,
+  input,
+  model,
+  output,
+  viewChild,
+} from '@angular/core';
+import { LockScrollDirective } from '../../directives/lock-scroll.directive';
+
+/**
+ * 业务确认弹窗(2026-11-23 新建)。
+ *
+ * ## 为什么不直接用 ui-kit 的 `ui-m-dialog`
+ *
+ * 用户反馈「按钮太瘪了、不太好看」。底座 dialog 的问题是:
+ *   · 按钮 44px + 8px 圆角,与全站 `--r-md`(14px) 体系脱节,看起来扁
+ *   · 卡片带 1px 描边,白底压在遮罩上糊成一片,没有浮起感
+ *   · **危险操作没有视觉区分**:退出登录、删除项目,确认按钮和普通操作一样是主色
+ *
+ * ui-kit 底座按规范不修改,所以在业务层新建这一个专供**确认类**场景的弹窗。
+ *
+ * ## 形态
+ *
+ * ```
+ * ┌──────────────────────────┐
+ * │          ( 图标 )        │  48px 圆底,普通=主色 / 危险=红
+ * │         退出登录          │  18px / 600
+ * │      确定删除该会话?      │  14px 灰,行高 1.65(可空,标题自明时不写)
+ * ├──────────────────────────┤
+ * │  [ 取消 ]   [ 确认退出 ]  │  48px 高、14px 圆角、字重 600
+ * └──────────────────────────┘
+ * ```
+ *
+ * 交互与无障碍与 `ui-m-dialog` 对齐:遮罩点击 / ESC 关闭、焦点陷阱、
+ * 打开时锁定滚动、`role="alertdialog"` + `aria-modal`。
+ */
+@Component({
+  selector: 'app-m-confirm',
+  changeDetection: ChangeDetectionStrategy.OnPush,
+  imports: [LockScrollDirective],
+  template: `
+    @if (open()) {
+      <div class="mc-root" [appLockScroll]="open()">
+        <button type="button" class="mc-mask" aria-label="关闭" (click)="onCancel()"></button>
+        <section
+          #card
+          tabindex="-1"
+          class="mc-card"
+          [class.is-danger]="danger()"
+          role="alertdialog"
+          aria-modal="true"
+          [attr.aria-labelledby]="'mc-title-' + uid"
+          [attr.aria-label]="title() || '确认'"
+          (keydown)="onTrapKeydown($event)"
+        >
+          @if (icon()) {
+            <span class="mc-icon"><i [class]="icon()" aria-hidden="true"></i></span>
+          }
+          <h3 class="mc-title" [id]="'mc-title-' + uid">{{ title() }}</h3>
+          @if (message()) {
+            <p class="mc-message">{{ message() }}</p>
+          }
+          <div class="mc-actions">
+            <button type="button" class="mc-btn mc-btn-ghost" (click)="onCancel()">{{ cancelText() }}</button>
+            <button type="button" class="mc-btn mc-btn-primary" (click)="onConfirm()">{{ confirmText() }}</button>
+          </div>
+        </section>
+      </div>
+    }
+  `,
+  styles: [
+    `
+      :host { display: contents; }
+      .mc-root {
+        position: fixed;
+        inset: 0;
+        z-index: var(--z-modal);
+        display: grid;
+        place-items: center;
+        padding: var(--sp-6);
+        box-sizing: border-box;
+      }
+      .mc-mask { position: absolute; inset: 0; border: 0; background: var(--overlay); }
+      /* 无描边,靠大圆角 + 投影浮起;宽度上限 340,手机不成比例地窄 */
+      .mc-card {
+        position: relative;
+        width: min(340px, 100%);
+        box-sizing: border-box;
+        padding: var(--sp-6) var(--sp-5) var(--sp-5);
+        border-radius: var(--r-sheet);
+        background: var(--surface);
+        box-shadow: var(--shadow-overlay);
+        outline: none;
+        text-align: center;
+        animation: mc-in var(--motion-page) var(--ease-standard);
+      }
+      .mc-icon {
+        display: inline-grid;
+        place-items: center;
+        width: 48px;
+        height: 48px;
+        margin-bottom: var(--sp-3);
+        border-radius: var(--r-tag);
+        background: var(--primary-subtle);
+        color: var(--primary);
+        font-size: var(--fs-20);
+      }
+      .mc-card.is-danger .mc-icon {
+        background: color-mix(in srgb, var(--danger) 12%, transparent);
+        color: var(--danger);
+      }
+      .mc-title {
+        margin: 0;
+        color: var(--ink);
+        font-size: var(--fs-17);
+        font-weight: 600;
+        line-height: 1.35;
+      }
+      .mc-message {
+        margin: var(--sp-2) 0 0;
+        color: var(--muted);
+        font-size: var(--fs-14);
+        line-height: 1.65;
+      }
+      /*
+       * 按钮 48px:用户明确说旧版 44px「太瘪」。
+       * 双按钮等宽并排,主按钮实心、次按钮浅灰,危险操作确认键直接实心红。
+       */
+      .mc-actions {
+        display: flex;
+        gap: var(--sp-3);
+        margin-top: var(--sp-5);
+      }
+      .mc-btn {
+        flex: 1;
+        min-width: 0;
+        min-height: 48px;
+        padding: 0 var(--sp-3);
+        border: 0;
+        border-radius: var(--r-md);
+        font: inherit;
+        font-size: var(--fs-15);
+        font-weight: 600;
+        cursor: pointer;
+        transition: opacity var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
+      }
+      .mc-btn:active { opacity: .85; }
+      .mc-btn:focus-visible { outline: 2px solid var(--primary-ring); outline-offset: 2px; }
+      .mc-btn-ghost { background: var(--surface-2); color: var(--ink-2); }
+      .mc-btn-primary { background: var(--primary); color: var(--primary-content); }
+      .mc-card.is-danger .mc-btn-primary { background: var(--danger); color: var(--primary-content); }
+      @keyframes mc-in {
+        from { transform: scale(.94); opacity: 0; }
+        to { transform: scale(1); opacity: 1; }
+      }
+      @media (prefers-reduced-motion: reduce) { .mc-card { animation: none; } }
+    `,
+  ],
+})
+export class MConfirmComponent {
+  readonly open = model(false);
+  readonly title = input('');
+  readonly message = input('');
+  /** FontAwesome 类名,如 `fa-solid fa-arrow-right-from-bracket`;空则不显示图标块 */
+  readonly icon = input('');
+  /** 危险操作:图标与确认按钮转红 */
+  readonly danger = input(false);
+  readonly confirmText = input('确认');
+  readonly cancelText = input('取消');
+
+  readonly confirm = output<void>();
+  readonly cancel = output<void>();
+
+  /** 用于 aria-labelledby 的唯一后缀(同页可能同时挂多个实例) */
+  protected readonly uid = Math.random().toString(36).slice(2, 8);
+
+  private readonly card = viewChild<ElementRef<HTMLElement>>('card');
+  private lastFocused: HTMLElement | null = null;
+
+  constructor() {
+    effect(() => {
+      if (this.open()) {
+        this.lastFocused = document.activeElement as HTMLElement | null;
+        // 打开后把焦点移进弹窗,键盘/读屏用户不会被留在背后的页面上
+        setTimeout(() => this.card()?.nativeElement.focus(), 0);
+      } else {
+        this.lastFocused?.focus?.();
+        this.lastFocused = null;
+      }
+    });
+  }
+
+  protected onConfirm(): void {
+    this.open.set(false);
+    this.confirm.emit();
+  }
+
+  protected onCancel(): void {
+    this.open.set(false);
+    this.cancel.emit();
+  }
+
+  @HostListener('document:keydown.escape')
+  protected onEscape(): void {
+    if (this.open()) this.onCancel();
+  }
+
+  /** Tab 在弹窗内回环,不允许跑到背后的页面 */
+  protected onTrapKeydown(e: KeyboardEvent): void {
+    if (e.key !== 'Tab') return;
+    const el = this.card()?.nativeElement;
+    if (!el) return;
+    const focusables = Array.from(el.querySelectorAll<HTMLElement>('button:not([disabled])'));
+    if (focusables.length === 0) return;
+    const first = focusables[0];
+    const last = focusables[focusables.length - 1];
+    const active = document.activeElement;
+    if (e.shiftKey && (active === first || active === el)) {
+      e.preventDefault();
+      last.focus();
+    } else if (!e.shiftKey && active === last) {
+      e.preventDefault();
+      first.focus();
+    }
+  }
+}

+ 7 - 1
src/app/mobile/components/m-dock/m-dock.ts

@@ -156,7 +156,13 @@ import { UploadPhase } from '../../../core/upload-state';
         opacity: 0.5;
       }
       .m-dock:focus-within {
-        border-color: var(--primary);
+        /*
+         * 聚焦不改描边(2026-11-23 用户要求「点击输入框不要出现边框」)。
+         * 输入框本身只是光标落点,不是需要确认的表单控件;
+         * 一聚焦就把整块描边染成主色,视觉上像跳出一层框,
+         * 与「实心输入条」的轻量感冲突。焦点可见性由光标 + 发送按钮态承担。
+         */
+        border-color: var(--edge);
       }
       .m-tool:active,
       .m-send:not(:disabled):active {

+ 255 - 208
src/app/mobile/components/m-drawer/m-drawer.ts

@@ -10,13 +10,15 @@ import { mobilePresenceTone } from '../../presentation';
 import { ChatSessionService } from '../../../core/chat-session.service';
 import { LiveService } from '../../../core/live.service';
 import { MobileChatViewService, SessionRow } from '../../../core/mobile-chat-view.service';
+import { UiMToastService } from '../../../ui/mobile/components/toast/toast.service';
 import { WorkspaceService } from '../../../core/workspace.service';
 import { NavMenuService } from '../../../core/nav-menu.service';
 import { MNavCustomComponent } from '../m-nav-custom/m-nav-custom';
-import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
+import { MConfirmComponent } from '../m-confirm/m-confirm';
 import { PromptModalService } from '../../../components/domain/prompt-modal/prompt-modal.service';
 import { canManageCompany } from '../../../core/acl';
 import { SessionService } from '../../../core/session.service';
+import { MActionItem, MActionSheetComponent } from '../m-action-sheet/m-action-sheet';
 import { LockScrollDirective } from '../../directives/lock-scroll.directive';
 
 /** 抽屉布局常量(与 PC 左栏 `SessionTreeComponent.PRIMARY_COUNT` 对齐) */
@@ -24,11 +26,9 @@ class MNavConstants {
   static readonly PRIMARY_COUNT = 4;
 }
 
-/** 底部操作菜单的一项 */
-interface MenuItem {
-  label: string;
+/** 底部操作面板的一项:key/label 交给 m-action-sheet 渲染,闭包留在本地按 key 找回 */
+interface MenuItem extends MActionItem {
   run: () => void;
-  danger?: boolean;
 }
 import { isMatrixReady } from '../../../core/format';
 import { MAvatarComponent } from '../m-avatar/m-avatar';
@@ -56,7 +56,7 @@ interface NavRow {
 @Component({
   selector: 'app-m-drawer',
   changeDetection: ChangeDetectionStrategy.OnPush,
-  imports: [NgTemplateOutlet, MAvatarComponent, MBadgeComponent, MNavCustomComponent, LockScrollDirective, UiMDialog],
+  imports: [NgTemplateOutlet, MAvatarComponent, MBadgeComponent, MNavCustomComponent, LockScrollDirective, MConfirmComponent, MActionSheetComponent],
   template: `
     <div class="m-mask" [class.show]="open()" (click)="close.emit()"></div>
     <aside class="m-drawer" [class.show]="open()" role="dialog" aria-label="导航" aria-modal="true" [appLockScroll]="open()">
@@ -155,22 +155,34 @@ interface NavRow {
       <nav class="m-drawer-body" aria-label="对话">
         <div class="m-drawer-caption">对话</div>
 
-        <!-- ① 项目:完整功能(加载 / 新建 / 重命名 / 删除 / 空项目也显示) -->
-        <div class="m-ws-bar">
-          <span>项目</span>
-          <!-- 新建「项目」:与行内的「新建对话」区分,用图标 + 无障碍标签 -->
-          <button
-            type="button"
-            class="m-ws-create"
-            aria-label="新建项目"
-            title="新建项目"
-            (click)="newWorkspace()"
-          >
-            <i class="fa-solid fa-plus" aria-hidden="true"></i>
-          </button>
-        </div>
+        <!-- ① 项目:可折叠分组,层级与「日常对话」一致(2026-11-23 用户要求) -->
+        <section class="m-group">
+          <div class="m-ws-bar">
+            <!-- 分组头:折叠箭头 + 计数,与「日常对话」同一套行高/字号/缩进 -->
+            <button
+              type="button"
+              class="m-tree-toggle"
+              [attr.aria-expanded]="isOpen('__ws')"
+              aria-controls="tree-ws"
+              (click)="toggle('__ws')"
+            >
+              <i class="fa-solid fa-chevron-down m-arrow" aria-hidden="true"></i>
+              项目<span class="m-tree-count">{{ workspaces().length }}</span>
+            </button>
+            <!-- 新建项目:轻量图标按钮,与行内「+」区分 -->
+            <button
+              type="button"
+              class="m-ws-create"
+              aria-label="新建项目"
+              title="新建项目"
+              (click)="newWorkspace()"
+            >
+              <i class="fa-solid fa-plus" aria-hidden="true"></i>
+            </button>
+          </div>
+          <div id="tree-ws" class="m-group-body" [hidden]="!isOpen('__ws')">
         @for (ws of workspaces(); track ws.id) {
-          <section>
+          <section class="m-ws-item">
             <div class="m-ws-row">
               <button
                 type="button"
@@ -180,7 +192,8 @@ interface NavRow {
                 (click)="toggle(ws.id)"
               >
                 <i class="fa-solid fa-chevron-down m-arrow" aria-hidden="true"></i>
-                {{ ws.name }}<span class="m-tree-count">{{ rowsInWorkspace(ws.id).length }}</span>
+                <i class="fa-regular fa-folder m-ws-icon" aria-hidden="true"></i>
+                <span class="m-ws-name">{{ ws.name }}</span><span class="m-tree-count">{{ rowsInWorkspace(ws.id).length }}</span>
               </button>
               <!-- 在项目中新建对话(2026-11-04 用户要求) -->
               <button
@@ -200,7 +213,7 @@ interface NavRow {
                 <i class="fa-solid fa-ellipsis" aria-hidden="true"></i>
               </button>
             </div>
-            <div [id]="'tree-' + ws.id" [hidden]="!isOpen(ws.id)">
+            <div [id]="'tree-' + ws.id" class="m-group-body is-nested" [hidden]="!isOpen(ws.id)">
               <ng-container *ngTemplateOutlet="tree; context: { $implicit: rowsInWorkspace(ws.id) }" />
               <!-- 归档回到原分组(2026-11-08):该项目的已归档会话留在这里 -->
               <ng-container
@@ -209,8 +222,10 @@ interface NavRow {
             </div>
           </section>
         } @empty {
-          <p class="m-tree-empty">还没有项目,点「新建」把相关对话归在一起</p>
+          <p class="m-tree-empty">还没有项目,点「+」把相关对话归在一起</p>
         }
+          </div>
+        </section>
 
         <!--
           🔒 2026-11-11 用户裁决:群聊入口整体隐藏(PC + 移动端一致)。
@@ -250,7 +265,7 @@ interface NavRow {
             <i class="fa-solid fa-chevron-down m-arrow" aria-hidden="true"></i>
             日常对话<span class="m-tree-count">{{ daily().length }}</span>
           </button>
-          <div id="tree-daily" [hidden]="!isOpen('__daily')">
+          <div id="tree-daily" class="m-group-body is-nested" [hidden]="!isOpen('__daily')">
             <ng-container *ngTemplateOutlet="tree; context: { $implicit: daily() }" />
             <!-- 归档回到原分组(2026-11-08):日常的已归档会话留在日常下面 -->
             <ng-container
@@ -268,59 +283,48 @@ interface NavRow {
       二次确认(2026-11-04,对齐 PC):归档 / 删除 / 删项目 一律走居中 dialog。
       规范 18 §三-13:删除类操作必须二次确认,不用 popconfirm。
     -->
-    <ui-m-dialog
+    <!-- 确认弹窗(业务组件,2026-11-23):删除类转危险红,归档类保持普通 -->
+    <app-m-confirm
       [(open)]="confirmOpen"
       [title]="confirmTitle()"
       [message]="confirmMessage()"
+      [icon]="confirmIcon()"
+      [danger]="confirmDanger()"
       [confirmText]="confirmText()"
       (confirm)="runConfirm()"
+      (cancel)="cancelConfirm()"
     />
 
-    <!-- 底部操作菜单(项目 / 会话共用) -->
-    @if (menu(); as m) {
-      <div class="m-act-root" role="dialog" aria-modal="true" [attr.aria-label]="m.title" [appLockScroll]="true">
-        <div class="m-act-mask" (click)="menu.set(null)"></div>
-        <section class="m-act">
-          <div class="m-grabber" aria-hidden="true"></div>
-          <p class="m-act-title">{{ m.title }}</p>
-          @for (item of m.items; track item.label) {
-            <button
-              type="button"
-              class="m-act-item"
-              [class.danger]="item.danger"
-              (click)="runMenu(item)"
-            >
-              {{ item.label }}
-            </button>
-          }
-        </section>
-        <button type="button" class="m-act-cancel" (click)="menu.set(null)">取消</button>
-      </div>
-    }
+    <!-- 底部操作面板(全局统一组件,2026-11-23):项目 / 会话共用 -->
+    <app-m-action-sheet
+      [open]="!!menu()"
+      [title]="menu()?.title ?? ''"
+      [items]="menu()?.items ?? []"
+      (pick)="onMenuPick($event)"
+      (dismissed)="menu.set(null)"
+    />
+
+    <!-- 二级:选择目标项目(独立实例,避开与一级面板的滚动锁交错) -->
+    <app-m-action-sheet
+      [open]="!!moveMenu()"
+      [title]="moveMenuRowTitle()"
+      [items]="moveMenu()?.items ?? []"
+      (pick)="onMovePick($event)"
+      (dismissed)="moveMenu.set(null)"
+    />
 
     <ng-template #tree let-rows>
       @for (row of rows; track row.session.id) {
-        <div class="m-tree-line">
-          <button type="button" class="m-tree-item" [class.on]="row.session.id === activeSessionId()" (click)="goChat(row)">
+        <div class="m-tree-line" [class.on]="row.session.id === activeSessionId()">
+          <button type="button" class="m-tree-item" (click)="goChat(row)">
             <app-m-avatar [name]="row.agent?.name ?? '?'" size="sm" />
             <span class="m-tree-text">
-              <span class="m-tree-title">
-                @if (row.session.kind === 'group') {
-                  <i class="fa-solid fa-users m-tree-group-icon" aria-label="群聊"></i>
-                }
-                {{ row.session.title }}
-              </span>
-              <!-- 容器名:明确「在跟哪个数字生命对话」(2026-11-04) -->
+              <span class="m-tree-title">{{ row.session.title }}</span>
               <span class="m-tree-agent">
                 @if (row.session.kind === 'group') {
                   {{ row.session.memberIds?.length ?? 0 }} 个容器
                 } @else {
-                  <!-- 容器状态点(2026-11-08):与 PC 左栏、会话列表同一口径 -->
-                  <i
-                    class="m-state-dot"
-                    [attr.data-tone]="stateOf(row).tone"
-                    [attr.aria-label]="stateOf(row).text"
-                  ></i>
+                  <i class="m-state-dot" [attr.data-tone]="stateOf(row).tone" [attr.aria-label]="stateOf(row).text"></i>
                   {{ row.agent?.name ?? '未知容器' }}
                 }
               </span>
@@ -329,13 +333,7 @@ interface NavRow {
               <app-m-badge tone="danger">{{ row.unread }}</app-m-badge>
             }
           </button>
-          <!-- 移动到项目 / 归档 / 删除(长按与「⋯」等价) -->
-          <button
-            type="button"
-            class="m-tree-more"
-            aria-label="会话操作"
-            (click)="openSessionMenu(row)"
-          >
+          <button type="button" class="m-tree-more" aria-label="会话操作" (click)="openSessionMenu(row)">
             <i class="fa-solid fa-ellipsis" aria-hidden="true"></i>
           </button>
         </div>
@@ -537,6 +535,33 @@ interface NavRow {
         color: var(--muted);
         font-size: var(--fs-12);
       }
+      /*
+       * 左侧栏三级层级(2026-11-23 用户要求「要有上下层关系」):
+       *
+       *   ① 分组头(项目 / 日常对话)  12px 粗灰字,无缩进           ← .m-tree-toggle
+       *   ② 项目行                      14px、浅色文件夹图标、缩进 12px ← .m-ws-row
+       *   ③ 会话行                        15px、头像、缩进 28px        ← .m-tree-line
+       *
+       * 缩进逐级递增 + 字号逐级递增,并用左侧竖线把「谁在谁下面」画出来,
+       * 不靠用户去数空格。
+       */
+      .m-group-body { position: relative; }
+      /* 嵌套层(某项目下的会话):左侧一条极淡竖线作为层级轨道 */
+      /* 卡片化后不再用左侧竖线画层级,只留轻微缩进 */
+      .m-group-body.is-nested { padding-left: var(--sp-2); }
+      /* ② 项目行:比分组头重一档,比会话行轻一档 */
+      .m-ws-item + .m-ws-item { margin-top: 1px; }
+      .m-ws-row .m-tree-toggle {
+        min-height: 40px;
+        padding-left: var(--sp-2);
+        color: var(--ink-2);
+        font-size: var(--fs-14);
+        font-weight: 500;
+      }
+      .m-ws-icon { color: var(--faint); font-size: var(--fs-12); }
+      .m-ws-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+      /* ③ 会话行:在 .is-nested 容器内,视觉上属于上一级项目 */
+      .m-group-body.is-nested .m-tree-item { min-height: 56px; }
       .m-tree-toggle {
         display: flex;
         align-items: center;
@@ -587,30 +612,45 @@ interface NavRow {
         margin-left: auto;
         font-weight: 400;
       }
+      /*
+       * 会话行(2026-11-23 重做):
+       * 原先是「文字 + 左侧竖线」的树形缩进,在窄抽屉里显得碎、像系统文件列表。
+       * 改为**卡片化**:整行白底、圆角、悬停与选中用浅底,和会话页列表视觉一致。
+       */
+      .m-tree-line .m-tree-more {
+        flex: none;
+        width: var(--touch-min);
+        height: var(--touch-min);
+        border-radius: var(--r-md);
+      }
+      .m-tree-line {
+        display: flex;
+        align-items: center;
+        gap: 2px;
+        margin-bottom: 2px;
+        border-radius: var(--r-md);
+        background: var(--surface);
+        transition: background var(--motion-fast) var(--ease-standard);
+      }
+      .m-tree-line:active { background: var(--surface-2); }
+      .m-tree-line.on { background: var(--primary-subtle); }
       .m-tree-item {
         display: flex;
         align-items: center;
-        gap: var(--sp-2);
-        width: 100%;
-        min-height: 44px;
-        padding: var(--sp-2);
+        gap: var(--sp-3);
+        flex: 1;
+        min-width: 0;
+        min-height: 56px;
+        padding: var(--sp-2) var(--sp-1) var(--sp-2) var(--sp-3);
         border: 0;
-        border-radius: var(--r-sm);
         background: none;
-        color: var(--ink-2);
+        color: var(--ink);
         font: inherit;
-        font-size: var(--fs-15);
+        font-size: var(--fs-14);
         text-align: left;
         cursor: pointer;
       }
-      .m-tree-item:active {
-        background: var(--surface-hover);
-      }
-      .m-tree-item.on {
-        background: var(--primary-subtle);
-        color: var(--primary);
-        font-weight: 600;
-      }
+      .m-tree-line.on .m-tree-item { color: var(--ink); font-weight: 600; }
       .m-tree-text {
         flex: 1;
         min-width: 0;
@@ -650,10 +690,9 @@ interface NavRow {
       .m-ws-bar {
         display: flex;
         align-items: center;
-        justify-content: space-between;
-        padding: var(--sp-2) var(--sp-2) var(--sp-1);
-        color: var(--muted);
-        font-size: var(--fs-12);
+        gap: var(--sp-1);
+        /* 分组头与「日常对话」完全对齐:左右内边距/行高都来自 .m-tree-toggle */
+        padding: 0;
       }
       /*
        * 🔴 所有按钮一律 white-space:nowrap(2026-11-04)。
@@ -663,6 +702,8 @@ interface NavRow {
        * 现在:文字按钮固定不换行,容器 flex 不压缩按钮。
        */
       .m-ws-bar > span,
+      .m-ws-bar .m-ws-create,
+      .m-ws-bar .m-tree-toggle,
       .m-ws-create,
       .m-ws-add,
       .m-ws-more,
@@ -692,6 +733,11 @@ interface NavRow {
         align-items: center;
         gap: var(--sp-1);
       }
+      /* 分组头的折叠按钮吃掉剩余宽度,计数靠右(与「日常对话」同一视觉) */
+      .m-ws-bar .m-tree-toggle {
+        flex: 1;
+        min-width: 0;
+      }
       .m-ws-row .m-tree-toggle {
         flex: 1;
         min-width: 0;
@@ -722,6 +768,8 @@ interface NavRow {
       }
       .m-ws-more,
       .m-tree-more {
+        /* 会话行的「⋯」是 56px 行里唯一的操作入口,必须给足 44px 触控区 */
+        margin-right: var(--sp-1);
         display: grid;
         place-items: center;
         flex: none;
@@ -742,93 +790,6 @@ interface NavRow {
         flex: 1;
         min-width: 0;
       }
-      /* 底部操作菜单 */
-      .m-act-root {
-        position: fixed;
-        inset: 0;
-        /* 抽屉内弹层:高于抽屉(1100)、低于预览(1300),且盖住底栏 */
-        z-index: var(--z-context-menu);
-      }
-      .m-act-mask {
-        position: absolute;
-        inset: 0;
-        background: var(--overlay);
-      }
-      /*
-       * 操作菜单(2026-11-03 重做样式)。
-       * 原实现用「灰底拼块」分隔各项(gap:1px + --edge 背景),
-       * 在浅色主题下看起来像一堆碎块,标题行也被挤压。
-       * 改为单张白卡 + 细分割线,标题与操作区分层级。
-       */
-      .m-act {
-        position: absolute;
-        left: var(--sp-2);
-        right: var(--sp-2);
-        bottom: calc(var(--mob-safe-bottom) + 52px + var(--sp-3) + var(--sp-2));
-        display: flex;
-        flex-direction: column;
-        overflow: hidden;
-        border-radius: var(--r-lg);
-        background: var(--surface);
-        box-shadow: var(--shadow-overlay);
-      }
-      .m-grabber {
-        width: 36px;
-        height: 4px;
-        margin: var(--sp-2) auto;
-        border-radius: var(--r-tag);
-        background: var(--edge-strong);
-      }
-      .m-act-title {
-        margin: 0;
-        padding: var(--sp-3) var(--sp-4);
-        border-bottom: 1px solid var(--edge);
-        color: var(--muted);
-        font-size: var(--fs-12);
-        text-align: center;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-      }
-      .m-act-item {
-        min-height: 52px;
-        padding: 0 var(--sp-4);
-        border: 0;
-        border-top: 1px solid var(--edge);
-        background: var(--surface);
-        color: var(--ink);
-        font: inherit;
-        font-size: var(--fs-15);
-        cursor: pointer;
-        transition: background var(--motion-fast) var(--ease-standard);
-      }
-      /* 第一项不要顶部分割线(标题行已有下边线) */
-      .m-act-title + .m-act-item {
-        border-top: 0;
-      }
-      .m-act-item:active {
-        background: var(--surface-hover);
-      }
-      .m-act-item.danger {
-        color: var(--danger);
-      }
-      /* 取消独立成一张卡片(iOS 惯例),与危险操作拉开距离 */
-      .m-act-cancel {
-        position: absolute;
-        left: var(--sp-2);
-        right: var(--sp-2);
-        bottom: calc(var(--mob-safe-bottom) + var(--sp-2));
-        min-height: 52px;
-        border: 0;
-        border-radius: var(--r-lg);
-        background: var(--surface);
-        box-shadow: var(--shadow-overlay);
-        color: var(--ink-2);
-        font: inherit;
-        font-size: var(--fs-15);
-        font-weight: 600;
-        cursor: pointer;
-      }
       .m-tree-title,
       .m-tree-agent {
         display: block;
@@ -896,12 +857,13 @@ export class MDrawerComponent {
    * 注意:**可见性不是安全边界** —— 云函数侧另有鉴权,这里只挡入口。
    */
   private readonly canManage = computed(() => canManageCompany(this.session.me()));
+  private readonly toast = inject(UiMToastService);
 
   /** 编辑菜单弹层 */
   protected readonly customOpen = signal(false);
   /** 二次确认对话框 */
   protected readonly confirmOpen = model<boolean>(false);
-  private readonly confirmState = signal<{ title: string; message: string; text: string; run: () => void } | null>(null);
+  private readonly confirmState = signal<{ title: string; message: string; text: string; run: () => void; danger?: boolean; icon?: string } | null>(null);
   protected readonly confirmTitle = computed(() => this.confirmState()?.title ?? '');
   protected readonly confirmMessage = computed(() => this.confirmState()?.message ?? '');
   protected readonly confirmText = computed(() => this.confirmState()?.text ?? '确认');
@@ -1044,7 +1006,7 @@ export class MDrawerComponent {
    * 折叠状态:键为项目 id;`__daily` / `__group` 为固定分组;
    * `arch-*` 前缀为各分组下的「已归档」子块(2026-11-08 新增,默认收起)。
    */
-  private readonly expanded = signal<Record<string, boolean>>({ __daily: true, __group: true });
+  private readonly expanded = signal<Record<string, boolean>>({ __ws: true, __daily: true, __group: true });
 
   protected isOpen(key: string): boolean {
     // 归档子块默认收起:没显式点过就当关闭
@@ -1108,15 +1070,17 @@ export class MDrawerComponent {
   protected openWsMenu(id: string): void {
     const ws = this.workspacesSvc.sorted().find((w) => w.id === id);
     if (!ws) return;
-    const count = this.rowsInWorkspace(id).length;
     this.menu.set({
       title: ws.name,
       items: [
-        { label: '重命名', run: () => this.renameWorkspace(id) },
+        { key: 'rename', label: '重命名', icon: 'fa-solid fa-pen', run: () => this.renameWorkspace(id) },
         {
-          label: `删除项目${count > 0 ? `(${count} 个会话移到日常对话)` : ''}`,
+          key: 'delete',
+          // 会话数放进标题而不是按钮文案:按钮保持「删除项目」四个字,不撑成两行
+          label: '删除项目',
           danger: true,
-          run: () => this.deleteWorkspace(id),
+          icon: 'fa-solid fa-trash-can',
+          run: () => this.deleteWorkspace(id, ws.name),
         },
       ],
     });
@@ -1144,14 +1108,26 @@ export class MDrawerComponent {
   }
 
   /**
-   * 删除项目:先把其下会话退回「日常对话」,再删项目。
+   * 删除项目:先把其下会话退回「日常对话」,再删。
    * 与桌面 `doDeleteWorkspace`(session-tree.ts)同口径 —— 否则会话会失去归属变成孤儿。
+   *
+   * 🔴 2026-11-23 补二次确认:此前点「删除」直接执行,与「删除会话」的
+   * 二次确认不一致(同一抽屉里两种删除一个问一个不问)。
    */
-  private deleteWorkspace(id: string): void {
-    for (const s of this.sessionsSvc.all().filter((x) => x.workspaceId === id)) {
-      this.sessionsSvc.moveTo(s.id, null);
-    }
-    this.workspacesSvc.remove(id);
+  private deleteWorkspace(id: string, name: string): void {
+    this.ask({
+      title: '删除项目',
+      icon: 'fa-solid fa-trash-can',
+      danger: true,
+      message: `确定删除项目「${name}」?`,
+      text: '删除',
+      run: () => {
+        for (const s of this.sessionsSvc.all().filter((x) => x.workspaceId === id)) {
+          this.sessionsSvc.moveTo(s.id, null);
+        }
+        this.workspacesSvc.remove(id);
+      },
+    });
   }
 
   // ---------- 会话操作 ----------
@@ -1159,19 +1135,33 @@ export class MDrawerComponent {
   /** 会话「⋯」:移动到项目 / 归档 / 删除 */
   protected openSessionMenu(row: SessionRow): void {
     const items: MenuItem[] = [
+      row.session.workspaceId
+        ? {
+            key: 'move-out',
+            label: '移出到日常对话',
+            icon: 'fa-solid fa-folder-minus',
+            hint: this.workspacesSvc.byId(row.session.workspaceId)?.name,
+            run: () => this.sessionsSvc.moveTo(row.session.id, null),
+          }
+        : {
+            key: 'move-in',
+            label: '移动到项目',
+            icon: 'fa-solid fa-folder-open',
+            drill: true,
+            run: () => this.openMoveMenu(row),
+          },
       {
-        label: row.session.workspaceId ? '移出到日常对话' : '移动到项目',
-        run: () => this.openMoveMenu(row),
-      },
-      {
+        key: 'archive',
         label: row.session.archived ? '取消归档' : '归档',
+        icon: 'fa-solid fa-box-archive',
         // 归档也要二次确认(与 PC 一致)
         run: () =>
           row.session.archived
             ? this.sessionsSvc.archive(row.session.id, false)
             : this.ask({
                 title: '归档会话',
-                message: `归档后「${row.session.title}」将移到本分组的「已归档」,可随时取消归档。`,
+                icon: 'fa-solid fa-box-archive',
+                message: `确定归档「${row.session.title}」?`,
                 text: '归档',
                 run: () => {
                   this.sessionsSvc.archive(row.session.id, true);
@@ -1184,18 +1174,27 @@ export class MDrawerComponent {
               }),
       },
       {
+        key: 'delete',
         label: '删除会话',
         danger: true,
+        icon: 'fa-solid fa-trash-can',
         // 删除不可恢复,必须二次确认(与 PC 一致)
         run: () =>
           this.ask({
             title: '删除会话',
-            message: `确定删除「${row.session.title}」?删除后该会话不再出现在列表里,消息记录仍在服务器。`,
+            icon: 'fa-solid fa-trash-can',
+            danger: true,
+            message: `确定删除「${row.session.title}」?`,
             text: '删除',
             run: () => this.sessionsSvc.remove(row.session.id),
           }),
       },
     ];
+    /*
+     * 2026-11-23:抽屉**保持打开**,操作面板叠在它上面。
+     * 面板根节点已提到 --z-toast 之下(见 m-action-sheet 的 mas-root),
+     * 高于抽屉的 --z-modal,不依赖关抽屉来保证可见。
+     */
     this.menu.set({ title: row.session.title, items });
   }
 
@@ -1212,23 +1211,56 @@ export class MDrawerComponent {
     this.expanded.update((m) => ({ ...m, [parentKey]: true, [archKey]: true }));
   }
 
-  /** 二级:选择目标项目 */
-  private openMoveMenu(row: SessionRow): void {    if (row.session.workspaceId) {
-      this.sessionsSvc.moveTo(row.session.id, null);
-      return;
-    }
+  /**
+   * 二级:选择目标项目。
+   *
+   * 🔴 2026-11-23 修复「点移动到项目直接卡死」:
+   *
+   *     旧实现是在 `onMenuPick` 里 `menu.set(null)` 之后**同步**再 `menu.set(新面板)`,
+   *     期间同时发生「旧面板被销毁」与「新面板被创建」,两者都拿 body 滚动锁句柄
+   *     (`LockScrollDirective`),先注册的解锁回调可能把后注册的锁一起释放,
+   *     页面滚动状态被污染后整页失去响应。
+   *
+   *     现在改用**独立信号 `moveMenu`**,二层与一层是两个不同实例,
+   *     且用 `setTimeout(0)` 让一层先完成销毁再挂二层,避免同一帧内两把锁交错。
+   */
+  protected readonly moveMenu = signal<{ row: SessionRow; items: MenuItem[] } | null>(null);
+
+  /** 二级面板标题(模板里不直接链式取值,避免严格空值检查报错) */
+  protected moveMenuRowTitle(): string {
+    return this.moveMenu()?.row.session.title ?? '';
+  }
+
+  private openMoveMenu(row: SessionRow): void {
     const ws = this.workspacesSvc.sorted();
     if (ws.length === 0) {
       this.newWorkspace();
       return;
     }
-    this.menu.set({
-      title: '移动到项目',
-      items: ws.map((w) => ({
-        label: w.name,
-        run: () => this.sessionsSvc.moveTo(row.session.id, w.id),
-      })),
-    });
+    const current = row.session.workspaceId ?? null;
+    setTimeout(() => {
+      this.moveMenu.set({
+        row,
+        items: ws.map((w) => ({
+          key: `ws-${w.id}`,
+          label: w.name,
+          icon: 'fa-regular fa-folder',
+          // 当前所属项目打勾,用户不用猜「现在在哪个」
+          checked: w.id === current,
+          run: () => this.sessionsSvc.moveTo(row.session.id, w.id),
+        })),
+      });
+    }, 0);
+  }
+
+  /** 二级面板选中:移动后收起并给一条轻提示 */
+  protected onMovePick(picked: MActionItem): void {
+    const state = this.moveMenu();
+    this.moveMenu.set(null);
+    const item = state?.items.find((i) => i.key === picked.key);
+    if (!item) return;
+    item.run();
+    this.toast.success(`已移动到「${item.label}」`);
   }
 
   /** 在指定项目中新建对话:带上 workspaceId 交给页面处理 */
@@ -1238,11 +1270,23 @@ export class MDrawerComponent {
   }
 
   /** 弹出二次确认 */
-  private ask(opts: { title: string; message: string; text: string; run: () => void }): void {
+  /**
+   * 二次确认。`danger` 为 true 时确认按钮与图标转红(删除类操作)。
+   * 归档不是破坏性操作 —— 随时可取消归档,所以保持普通主色。
+   */
+  private ask(opts: { title: string; message: string; text: string; run: () => void; danger?: boolean; icon?: string }): void {
     this.confirmState.set(opts);
     this.confirmOpen.set(true);
   }
 
+  protected readonly confirmDanger = computed(() => this.confirmState()?.danger === true);
+  protected readonly confirmIcon = computed(() => this.confirmState()?.icon ?? '');
+
+  /** 取消:只关弹窗,不执行动作(此前没有取消回调,状态会残留) */
+  protected cancelConfirm(): void {
+    this.confirmState.set(null);
+  }
+
   protected runConfirm(): void {
     this.confirmOpen.set(false);
     const fn = this.confirmState()?.run;
@@ -1250,11 +1294,14 @@ export class MDrawerComponent {
     fn?.();
   }
 
-  protected runMenu(item: MenuItem): void {
+  /** 从统一操作面板选中一项:按 key 找回闭包并执行 */
+  protected onMenuPick(picked: MActionItem): void {
+    const item = this.menu()?.items.find((i) => i.key === picked.key);
     this.menu.set(null);
-    item.run();
+    item?.run();
   }
 
+  
   /** 抽屉首次打开时预热会话目录(与桌面左栏同一口径) */
   ensureLoaded(): void {
     if (this.view.ready()) return;

+ 10 - 2
src/app/mobile/components/m-nav-custom/m-nav-custom.ts

@@ -112,7 +112,7 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
         flex-direction: column;
         max-height: 80%;
         padding-bottom: var(--mob-safe-bottom);
-        border-radius: var(--r-lg) var(--r-lg) 0 0;
+        border-radius: var(--r-sheet) var(--r-sheet) 0 0;
         background: var(--surface);
         box-shadow: var(--shadow-overlay);
         animation: m-sheet-in var(--motion-panel) var(--ease-standard);
@@ -255,12 +255,20 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
         font-size: var(--fs-15);
         cursor: pointer;
       }
+      /*
+       * 统一的弹层进场(2026-11-23):从底部上浮 40px + 淡入,240ms 标准缓动。
+       * 原来这里是「从屏幕外整个滑入 translateY(100%)」,与选择项目浮卡的
+       * 「浮起 24px」不一致 —— 同样是从底部出来,一个扫过整屏、一个只轻抬一下。
+       * 现在全端统一为「轻抬」:有方向感,又不制造长距离运动。
+       */
       @keyframes m-sheet-in {
         from {
-          transform: translateY(100%);
+          transform: translateY(40px);
+          opacity: 0;
         }
         to {
           transform: translateY(0);
+          opacity: 1;
         }
       }
       @media (prefers-reduced-motion: reduce) {

+ 172 - 113
src/app/mobile/components/m-new-chat/m-new-chat.ts

@@ -35,7 +35,11 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
         <section class="m-sheet">
           <div class="m-grabber" aria-hidden="true"></div>
           <header class="m-sheet-head">
-            <h2>新建对话</h2>
+            <div class="m-sheet-head-copy">
+              <h2>新建对话</h2>
+              <!-- 副标题给实时数字,不再是空标题下直接接列表 -->
+              <p>{{ usable().length }} 个数字生命已接入 · 选择后进入会话</p>
+            </div>
             <button type="button" class="m-sheet-x" aria-label="关闭" (click)="close()">
               <i class="fa-solid fa-xmark" aria-hidden="true"></i>
             </button>
@@ -59,70 +63,55 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
           <div class="m-sheet-body">
             @if (mode() === 'dm') {
               <!--
-                项目归属(2026-11-21 用户裁决,参考豆包):
-                新建时就把会话放进项目,不再要求「先建日常 → 再手动移入」。
-                默认值由调用方推导(在项目里新建 → 沿用该项目;在日常里新建 → 日常对话)。
+                🔴 2026-11-23 用户裁决:**去掉「加入项目」下拉**。
+                新建对话的归属只由**进入入口**决定:
+                  · 顶部「+」/ 抽屉「新建对话」→ 日常会话(不显示任何项目选择)
+                  · 项目行「+」/「在此项目中新建对话」→ 归入该项目
+                弹层里再放一个下拉,既让用户以为「这里能改」,又在选中态上
+                出现文字换行(2026-11-23 实机截图),故整体移除。
               -->
-              <div class="m-proj-row">
-                <span class="m-proj-label">加入项目</span>
-                <label class="m-proj-pick">
-                  <i class="fa-regular fa-folder" aria-hidden="true"></i>
-                  <!--
-                    选中态写在每个 option 的 [selected] 上,而不是 select 的 [value]。
-                    select 的 [value] 是属性绑定,原生 select 打开时不会重新选中,
-                    默认项目就会显示成日常对话(2026-11-21 实机实测)。
-                  -->
-                  <select
-                    aria-label="新对话加入哪个项目"
-                    (change)="onWorkspaceChange($any($event.target).value)"
-                  >
-                    <option value="" [selected]="!workspaceId()">日常对话(不归入项目)</option>
-                    @for (w of workspaces(); track w.id) {
-                      <option [value]="w.id" [selected]="w.id === workspaceId()">{{ w.name }}</option>
-                    }
-                  </select>
-                  <i class="fa-solid fa-chevron-down" aria-hidden="true"></i>
-                </label>
-              </div>
-              <p class="m-section-title">
-                选择数字生命 · <b>{{ usable().length }}</b> 个可用
-              </p>
+              @if (targetWorkspace(); as ws) {
+                <div class="m-proj-row">
+                  <span class="m-proj-label">归入项目</span>
+                  <span class="m-proj-current">
+                    <i class="fa-regular fa-folder" aria-hidden="true"></i>
+                    <span>{{ ws }}</span>
+                  </span>
+                </div>
+              }
               <ul class="m-list">
-                @for (a of agents(); track a.id) {
+                @for (a of usable(); track a.id) {
                   <li>
-                    <button type="button" class="m-row" [disabled]="!canUse(a)" (click)="pick(a)">
-                      <app-m-avatar [name]="a.name" size="sm" />
+                    <button type="button" class="m-row" (click)="pick(a)">
+                      <app-m-avatar [name]="a.name" />
                       <span class="m-row-body">
                         <span class="m-row-t1">{{ a.name }}</span>
-                        <span class="m-row-t2">{{ a.specialty || '数字生命' }}</span>
+                        <span class="m-row-t2">{{ agentSubtitle(a) }}</span>
                       </span>
-                      <!--
-                        🔴 不再显示「正在执行 / 空闲」(2026-11-07 用户裁决)。
-                        新建对话是**新开一条会话**,容器此刻忙不忙不影响能不能开 ——
-                        它忙也是排队。这里只表达「能不能用」:
-                        不可用时给出原因(离线 / 异常),可用时不给状态徽标。
-                      -->
-                      @if (!canUse(a)) {
-                        <app-m-badge [tone]="toneOf(a)" [dot]="true">{{ statusText(a) }}</app-m-badge>
-                      }
+                      <i class="fa-solid fa-chevron-right m-row-chev" aria-hidden="true"></i>
                     </button>
                   </li>
                 } @empty {
-                  <li class="m-row-empty">暂无数字生命</li>
+                  <li class="m-row-empty">
+                    <span class="m-row-empty-icon"><i class="fa-regular fa-circle-user" aria-hidden="true"></i></span>
+                    <span>暂无已接入的数字生命</span>
+                    <small>容器接入后会出现在这里</small>
+                  </li>
                 }
               </ul>
-              <p class="m-hint">离线 / 异常的数字生命暂不可新建对话</p>
+              @if (offlineCount() > 0) {
+                <p class="m-hint">另有 {{ offlineCount() }} 个数字生命未接入,暂不可新建对话</p>
+              }
             } @else {
               <p class="m-section-title">
-                选择群成员 · <b>{{ selected().length }}</b> 个已选(至少 2 个)
+                已选 <b>{{ selected().length }}</b> 个(至少 2 个)
               </p>
               <ul class="m-list">
-                @for (a of agents(); track a.id) {
+                @for (a of usable(); track a.id) {
                   <li>
                     <button
                       type="button"
                       class="m-row"
-                      [disabled]="!canUse(a)"
                       [class.m-row--checked]="isChecked(a)"
                       (click)="toggleMember(a)"
                     >
@@ -134,18 +123,17 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
                       <app-m-avatar [name]="a.name" size="sm" />
                       <span class="m-row-body">
                         <span class="m-row-t1">{{ a.name }}</span>
-                        <span class="m-row-t2">{{ a.specialty || '数字生命' }}</span>
+                        <span class="m-row-t2">{{ agentSubtitle(a) }}</span>
                       </span>
-                      <!-- 与单聊一致:只在不可用时说明原因,不展示运行态 -->
-                      @if (!canUse(a)) {
-                        <app-m-badge [tone]="toneOf(a)" [dot]="true">{{ statusText(a) }}</app-m-badge>
-                      }
                     </button>
                   </li>
                 } @empty {
-                  <li class="m-row-empty">暂无数字生命</li>
+                  <li class="m-row-empty">暂无已接入的数字生命</li>
                 }
               </ul>
+              @if (offlineCount() > 0) {
+                <p class="m-hint">另有 {{ offlineCount() }} 个数字生命未接入,暂不可拉入群聊</p>
+              }
               @if (groupError()) {
                 <p class="m-err" role="alert">{{ groupError() }}</p>
               }
@@ -186,9 +174,9 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
         animation: m-mask-in var(--motion-panel) var(--ease-standard);
       }
       /*
-       * 全屏(2026-11-07 用户裁决恢复):
-       * 上一轮改成 max-height:88dvh 后观感反而不如全屏,用户明确要求恢复。
-       * 滚动仍然只在列表区域(.m-sheet-body),外层不滚。
+       * 高度随内容(2026-11-23 统一,取代 2026-11-07 的「全屏」裁决):
+       * 只有 3 个容器时把整屏撑满,下半部分全是空白,观感像「上个世纪的页面」。
+       * 现在:内容少就矮、贴住底部;超过上限才滚动,且只有列表区滚。
        */
       .m-sheet {
         position: absolute;
@@ -197,13 +185,14 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
         bottom: 0;
         display: flex;
         flex-direction: column;
-        height: 100dvh;
-        max-height: 100dvh;
+        height: auto;
+        min-height: min(40dvh, 340px);
+        max-height: min(80dvh, 700px);
         box-sizing: border-box;
         /* 只有真正有刘海时才让出安全区,普通设备不加额外留白 */
         padding-top: max(0px, calc(var(--mob-safe-top) - var(--sp-2)));
         padding-bottom: var(--mob-safe-bottom);
-        border-radius: var(--r-lg) var(--r-lg) 0 0;
+        border-radius: var(--r-sheet) var(--r-sheet) 0 0;
         background: var(--surface);
         box-shadow: var(--shadow-overlay);
         animation: m-sheet-in var(--motion-panel) var(--ease-standard);
@@ -217,28 +206,44 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
       }
       .m-sheet-head {
         display: flex;
+        flex: none;
         align-items: center;
-        gap: var(--sp-3);
-        padding: var(--sp-1) var(--mob-gutter) var(--sp-2);
+        gap: var(--sp-2);
+        padding: var(--sp-2) var(--sp-3) var(--sp-4) var(--mob-gutter);
       }
+      .m-sheet-head-copy { flex: 1; min-width: 0; }
       .m-sheet-head h2 {
-        flex: 1;
+        overflow: hidden;
         margin: 0;
         color: var(--ink);
         font-size: var(--fs-17);
+        font-weight: 600;
+        letter-spacing: -0.01em;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .m-sheet-head p {
+        overflow: hidden;
+        margin: var(--sp-1) 0 0;
+        color: var(--muted);
+        font-size: var(--fs-12);
+        text-overflow: ellipsis;
+        white-space: nowrap;
       }
       .m-sheet-x {
         display: grid;
+        flex: none;
         place-items: center;
-        width: var(--touch-min);
-        height: var(--touch-min);
+        width: 32px;
+        height: 32px;
         border: 0;
         border-radius: var(--r-tag);
-        background: none;
+        background: var(--surface-2);
         color: var(--muted);
-        font-size: var(--fs-17);
+        font-size: var(--fs-13);
         cursor: pointer;
       }
+      .m-sheet-x:active { background: var(--surface-active); }
       /* 内容区独立滚动(头部固定),-webkit 惯性滚动保证 iOS 手感 */
       .m-sheet-body {
         flex: 1;
@@ -250,45 +255,48 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
         padding: 0 var(--mob-gutter) var(--sp-6);
       }
       .m-section-title {
-        margin: 0 0 var(--sp-3);
+        margin: 0 0 var(--sp-2);
         color: var(--muted);
-        font-size: var(--fs-13);
+        font-size: var(--fs-12);
       }
+      .m-section-title b { color: var(--ink-2); font-weight: 600; }
       .m-gap {
         margin-top: var(--sp-6);
       }
+      /*
+       * 列表(2026-11-23 三次改版):纯文字行看不出「可点的入口」,
+       * 改为**白底卡片行**:描边 + 圆角 + 40px 头像 + 右侧 › 引导,
+       * 与抽屉里的会话卡同一套语言。按下整行变浅、描边加深。
+       */
       .m-list {
         margin: 0;
         padding: 0;
         list-style: none;
-        border: 1px solid var(--edge);
-        border-radius: var(--r-lg);
-        background: var(--surface);
-        overflow: hidden;
-      }
-      .m-list > li + li {
-        border-top: 1px solid var(--edge);
       }
+      .m-list > li + li { margin-top: var(--sp-2); }
       .m-row {
         display: flex;
         align-items: center;
         gap: var(--sp-3);
         width: 100%;
-        min-height: 56px;
-        padding: var(--sp-3) var(--sp-4);
-        border: 0;
+        min-height: 64px;
+        padding: var(--sp-2) var(--sp-3);
+        border: 1px solid var(--edge);
+        border-radius: var(--r-md);
         background: var(--surface);
         color: var(--ink);
         font: inherit;
         text-align: left;
         cursor: pointer;
+        transition: background var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
       }
       .m-row:disabled {
         opacity: 0.55;
         cursor: not-allowed;
       }
       .m-row:active:not(:disabled) {
-        background: var(--surface-hover);
+        border-color: var(--edge-strong);
+        background: var(--surface-2);
       }
       .m-row-body {
         flex: 1;
@@ -302,16 +310,43 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
         white-space: nowrap;
       }
       .m-row-t1 {
+        color: var(--ink);
         font-size: var(--fs-15);
+        font-weight: 600;
       }
       .m-row-t2 {
+        margin-top: 3px;
         color: var(--muted);
-        font-size: var(--fs-13);
+        font-size: var(--fs-12);
+      }
+      .m-row-chev {
+        flex: none;
+        color: var(--faint);
+        font-size: var(--fs-11);
       }
       .m-row-empty {
-        padding: var(--sp-4);
+        display: grid;
+        justify-items: center;
+        gap: var(--sp-1);
+        padding: var(--sp-6) var(--sp-4);
         color: var(--muted);
         font-size: var(--fs-13);
+        text-align: center;
+      }
+      .m-row-empty-icon {
+        display: grid;
+        place-items: center;
+        width: 48px;
+        height: 48px;
+        margin-bottom: var(--sp-1);
+        border-radius: var(--r-tag);
+        background: var(--surface-2);
+        color: var(--faint);
+        font-size: var(--fs-20);
+      }
+      .m-row-empty small {
+        color: var(--faint);
+        font-size: var(--fs-11);
       }
       .m-seg-row {
         flex: none;
@@ -366,57 +401,58 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
         font-size: var(--fs-11);
         text-align: center;
       }
-      /* 项目归属(2026-11-21):一行「加入项目 + 下拉」,与列表同宽 */
+      /*
+       * 项目归属(2026-11-23 改为只读标签):只在「从某个项目里新建」时出现,
+       * 告诉用户这条对话会落到哪里;日常会话不显示这一行。
+       * 单行省略,不再换行(上一版下拉在触屏上会把项目名挤成两行)。
+       */
       .m-proj-row {
         display: flex;
         align-items: center;
-        gap: var(--sp-3);
-        min-height: 52px;
+        gap: var(--sp-2);
+        min-height: 44px;
         margin-bottom: var(--sp-3);
-        padding: 0 var(--sp-4);
-        border: 1px solid var(--edge);
-        border-radius: var(--r-lg);
-        background: var(--canvas);
+        padding: 0 var(--sp-3);
+        border-radius: var(--r-md);
+        background: var(--primary-subtle);
       }
       .m-proj-label {
         flex: none;
         color: var(--muted);
         font-size: var(--fs-13);
       }
-      .m-proj-pick {
+      .m-proj-current {
         display: flex;
         align-items: center;
-        flex: 1;
         gap: var(--sp-2);
+        flex: 1;
         min-width: 0;
         color: var(--primary);
+        font-size: var(--fs-15);
       }
-      .m-proj-pick > i {
+      .m-proj-current > i {
         flex: none;
         font-size: var(--fs-13);
       }
-      /* 原生 select 作为底层实现(弹系统选择器,触屏体验最稳),外观完全由容器承担 */
-      .m-proj-pick select {
-        flex: 1;
-        min-width: 0;
-        min-height: 44px;
-        padding: 0;
-        border: 0;
-        outline: 0;
-        background: transparent;
-        color: var(--ink);
-        font: inherit;
-        font-size: var(--fs-15);
+      .m-proj-current > span {
+        overflow: hidden;
         text-overflow: ellipsis;
-        appearance: none;
-        -webkit-appearance: none;
+        white-space: nowrap;
       }
+      /*
+       * 统一的弹层进场(2026-11-23):从底部上浮 40px + 淡入,240ms 标准缓动。
+       * 原来这里是「从屏幕外整个滑入 translateY(100%)」,与选择项目浮卡的
+       * 「浮起 24px」不一致 —— 同样是从底部出来,一个扫过整屏、一个只轻抬一下。
+       * 现在全端统一为「轻抬」:有方向感,又不制造长距离运动。
+       */
       @keyframes m-sheet-in {
         from {
-          transform: translateY(100%);
+          transform: translateY(40px);
+          opacity: 0;
         }
         to {
           transform: translateY(0);
+          opacity: 1;
         }
       }
       @keyframes m-mask-in {
@@ -449,13 +485,18 @@ export class MNewChatSheetComponent {
   /**
    * 新会话要加入的项目 id(`null` = 日常对话)。
    *
-   * `model()` 让调用方直接传默认值 `[(workspaceId)]="pendingWorkspace"`:
-   * 弹层里改选后,调用方读到的就是最终归属,不需要在弹层与页面间再传一遍事件。
+   * `model()` 让调用方直接传值 `[(workspaceId)]="pendingWorkspace"`:
+   * 弹层里只**读取**最终归属(用于创建后路由到 `/new?ws=`),不再允许弹层内改选。
+   * 归属由打开它的入口决定 —— 顶部「+」= null,项目「+」= 该项目 id。
    */
   readonly workspaceId = model<string | null>(null);
 
-  /** 可选项目(只读,来自 WorkspaceService 的账号维度缓存) */
-  protected readonly workspaces = computed(() => this.workspacesSvc.sorted());
+  /** 归属项目的显示名(null = 日常对话,不显示这一行) */
+  protected readonly targetWorkspace = computed(() => {
+    const id = this.workspaceId();
+    if (!id) return null;
+    return this.workspacesSvc.byId(id)?.name ?? null;
+  });
 
   /** 分组:单聊 / 群聊(默认单聊,Q 裁决) */
   protected readonly mode = signal<'dm' | 'group'>('dm');
@@ -474,6 +515,28 @@ export class MNewChatSheetComponent {
   protected readonly agents = computed(() => this.live.agents());
   protected readonly usable = computed(() => this.agents().filter((a) => this.canUse(a)));
 
+  /**
+   * 未接入的容器数(2026-11-23 用户要求:列表只显示**已接入**的容器)。
+   *
+   * 不再把离线/异常容器摆成一条灰色不可点行 —— 它们占位置、还让用户
+   * 误以为「能点但坏了」。只在底部用一句灰字提示数量,想看详情去通讯录。
+   */
+  protected readonly offlineCount = computed(() => this.agents().length - this.usable().length);
+
+  /**
+   * 行副标题(2026-11-23):不再全都写「数字生命」——
+   * 三个容器三行「数字生命」等于没有信息。
+   *
+   * ⚠️ 只显示**专用领域**(specialty),**不显示运行状态**:
+   *    2026-11-07 用户明确裁决过「新建对话不展示正在执行/空闲」——
+   *    容器忙不忙不影响能不能开新会话(忙也是排队)。
+   *    两者都为空时退回固定文案,不制造假信息。
+   */
+  protected agentSubtitle(a: Agent): string {
+    const specialty = (a.specialty ?? '').trim();
+    return specialty || '数字生命';
+  }
+
   constructor() {
     // 打开时确保容器清单与项目清单已就绪(只读、幂等)
     effect(() => {
@@ -483,10 +546,6 @@ export class MNewChatSheetComponent {
     });
   }
 
-  /** 切换归属项目;`''` 来自下拉的「日常对话」空值 */
-  protected onWorkspaceChange(value: string): void {
-    this.workspaceId.set(value || null);
-  }
 
   /**
    * 状态统一口径(2026-11-07 用户要求)。

+ 600 - 183
src/app/mobile/components/m-project-switcher/m-project-switcher.ts

@@ -1,4 +1,4 @@
-import { ChangeDetectionStrategy, Component, HostListener, computed, inject, input, model, output, signal } from '@angular/core';
+import { ChangeDetectionStrategy, Component, ElementRef, HostListener, computed, inject, input, model, output, signal, viewChild } from '@angular/core';
 import { isMatrixReady } from '../../../core/format';
 import { ChatSessionService } from '../../../core/chat-session.service';
 import { LiveService } from '../../../core/live.service';
@@ -9,193 +9,270 @@ import { MAvatarComponent } from '../m-avatar/m-avatar';
 import { LockScrollDirective } from '../../directives/lock-scroll.directive';
 import { UiMToastService } from '../../../ui/mobile/components/toast/toast.service';
 
-/** 会话页里的项目快捷切换器。项目沿用现有工作区数据,不另建一层项目模型。 */
-/** 「未分类」虚拟分组的 id(承接所属项目已被删除的会话,不落库) */
-const ORPHAN_PROJECT_ID = '__orphan__';
-
+/**
+ * 会话页里的项目快捷切换器。
+ *
+ * ## 形态(2026-11-23 按豆包参考重做)
+ *
+ * ```
+ * ┌──────────────────────────────────┐  ← 输入框上方的胶囊行,可横向滚动
+ * │ [📁 硅胶材质外观产品  ▾]          │      当前项目:浅主色底;未选:虚线框「选择项目」
+ * │ [+]                              │      一个新增按钮,贴在胶囊后面
+ * └──────────────────────────────────┘
+ *            ↓ 点击
+ * ┌──────────────────────────────────┐  ← 底部圆角浮卡(不是全屏抽屉)
+ * │            ──                   ✕ │     抓杆 + 右上圆形关闭
+ * │ 选择项目                          │     标题 17px 400,小标题灰字
+ * │ ┌──────────────────────────────┐ │
+ * │ │ 🔍 搜索项目                   │ │     6 个及以上才有搜索框
+ * │ └──────────────────────────────┘ │
+ * │  +  创建新项目      / 或卡内表单  │     点「创建」→ 同一位置换成输入表单
+ * │ ──────────────────────────────── │
+ * │ [📁] 硅胶材质外观产品    ✓       │     当前项目:整行主色浅底
+ * │      3 条对话 · 10 分钟前         │
+ * │ [📁] 外壳 3D 设计         ›       │
+ * │      12 条对话 · 昨天             │
+ * └──────────────────────────────────┘
+ * ```
+ *
+ * **为什么是一条胶囊而不是「当前项目 · 切换 ›」的细条**:
+ *   细条把「项目名」当成状态标签、把「切换」当成按钮,读起来是两件事;
+ *   胶囊把两者合成一个可点元素 —— 看到的就是可点的,省一次扫描。
+ *
+ * **为什么不再做「项目列表 → 对话列表」两级全屏抽屉**:
+ *   全屏抽屉占满屏幕、与输入区完全断开,切换完还得慢慢滑下来;
+ *   现在是**底部圆角浮卡**,贴住输入区,选中项目后在**同一张卡内**滑到
+ *   对话列表(顶部出现「‹ 返回」),卡片高度不变,视线不跳。
+ */
 @Component({
   selector: 'app-m-project-switcher',
   changeDetection: ChangeDetectionStrategy.OnPush,
   imports: [MAvatarComponent, LockScrollDirective],
   template: `
-    <div class="m-project-entry">
-      <span class="m-project-context">当前项目</span>
+    <!-- ① 入口:胶囊行(与输入区同一条水平带,横向滚动不换行) -->
+    <div class="mps-bar" role="list">
       <button
         type="button"
-        class="m-project-trigger"
+        role="listitem"
+        class="mps-pill"
         [class.is-set]="currentWorkspace()"
+        [class.is-empty]="!currentWorkspace()"
         [attr.aria-expanded]="open()"
         aria-controls="m-project-sheet"
-        aria-label="选择项目并切换对话"
+        [attr.aria-label]="currentWorkspace() ? '切换项目,当前为 ' + currentWorkspace()!.name : '选择项目'"
         (click)="openPicker()"
       >
-        <i class="fa-regular fa-folder-open" aria-hidden="true"></i>
-        <span class="m-project-name">{{ currentWorkspace()?.name ?? '选择项目' }}</span>
-        <span class="m-project-switch">切换</span>
-        <i class="fa-solid fa-chevron-right m-project-chevron" aria-hidden="true"></i>
+        <i class="fa-regular" [class.fa-folder-open]="currentWorkspace()" [class.fa-folder]="!currentWorkspace()" aria-hidden="true"></i>
+        <span class="mps-pill-name">{{ currentWorkspace()?.name ?? '选择项目' }}</span>
+        @if (currentWorkspace()) {
+          <span class="mps-pill-count">{{ currentWorkspaceConversations() }}</span>
+        }
+        <i class="fa-solid fa-chevron-down mps-pill-chevron" aria-hidden="true"></i>
       </button>
     </div>
 
+    <!-- ② 弹层:底部圆角浮卡 -->
     @if (open()) {
-      <div class="m-project-root" role="dialog" aria-modal="true" [attr.aria-label]="step() === 'projects' ? '选择项目' : selectedWorkspace()?.name" [appLockScroll]="true" (keydown.escape)="close()">
-        <button type="button" class="m-project-mask" aria-label="关闭项目选择" (click)="close()"></button>
-        <section class="m-project-sheet" id="m-project-sheet">
-          <div class="m-project-grabber" aria-hidden="true"></div>
-          <header class="m-project-head">
+      <div
+        class="mps-root"
+        role="dialog"
+        aria-modal="true"
+        [attr.aria-label]="step() === 'projects' ? '选择项目' : selectedWorkspace()?.name"
+        [appLockScroll]="true"
+        (keydown.escape)="close()"
+      >
+        <button type="button" class="mps-mask" aria-label="关闭项目选择" (click)="close()"></button>
+        <section class="mps-card" id="m-project-sheet">
+          <div class="mps-grabber" aria-hidden="true"></div>
+          <button type="button" class="mps-close" aria-label="关闭" (click)="close()">
+            <i class="fa-solid fa-xmark" aria-hidden="true"></i>
+          </button>
+
+          <header class="mps-head">
             @if (step() === 'sessions') {
-              <button type="button" class="m-project-back" aria-label="返回项目列表" (click)="showProjects()">
-                <i class="fa-solid fa-arrow-left" aria-hidden="true"></i>
+              <button type="button" class="mps-back" aria-label="返回项目列表" (click)="showProjects()">
+                <i class="fa-solid fa-chevron-left" aria-hidden="true"></i>
               </button>
             }
-            <div class="m-project-head-copy">
+            <div class="mps-head-copy">
               <h2>{{ step() === 'projects' ? '选择项目' : selectedWorkspace()?.name }}</h2>
-              <p>{{ step() === 'projects' ? '按项目查看和继续最近的对话' : '选择一条对话继续,或在此项目中新建' }}</p>
+              <!-- 副标题放**实时有效的数字**,不放「选一个项目继续」这类废话 -->
+              <p>
+                @if (step() === 'projects') {
+                  {{ realProjectCount() }} 个项目 · 当前 {{ currentWorkspace()?.name ?? '无' }}
+                } @else {
+                  {{ selectedWorkspaceRows().length }} 条对话
+                }
+              </p>
             </div>
-            <button type="button" class="m-project-close" aria-label="关闭" (click)="close()">
-              <i class="fa-solid fa-xmark" aria-hidden="true"></i>
-            </button>
           </header>
 
-          <label class="m-project-search">
-            <i class="fa-solid fa-magnifying-glass" aria-hidden="true"></i>
-            <input
-              type="search"
-              [value]="query()"
-              [placeholder]="step() === 'projects' ? '搜索项目' : '搜索此项目的对话'"
-              [attr.aria-label]="step() === 'projects' ? '搜索项目' : '搜索项目内对话'"
-              (input)="query.set($any($event.target).value)"
-            />
-            @if (query()) {
-              <button type="button" aria-label="清除搜索" (click)="query.set('')">
-                <i class="fa-solid fa-xmark" aria-hidden="true"></i>
-              </button>
+          @if (step() === 'projects') {
+            @if (showSearch()) {
+              <label class="mps-search">
+                <i class="fa-solid fa-magnifying-glass" aria-hidden="true"></i>
+                <input
+                  type="search"
+                  [value]="query()"
+                  placeholder="搜索项目"
+                  aria-label="搜索项目"
+                  (input)="query.set($any($event.target).value)"
+                />
+                @if (query()) {
+                  <button type="button" aria-label="清除搜索" (click)="query.set('')">
+                    <i class="fa-solid fa-xmark" aria-hidden="true"></i>
+                  </button>
+                }
+              </label>
             }
-          </label>
-
-          <div class="m-project-list">
-            @if (step() === 'projects') {
-              @if (!creatingProject()) {
-                <button type="button" class="m-project-create" (click)="createProject()">
-                  <span class="m-project-create-icon"><i class="fa-solid fa-plus" aria-hidden="true"></i></span>
-                  <span><b>创建新项目</b><small>将相关对话集中在一起</small></span>
-                  <i class="fa-solid fa-chevron-right" aria-hidden="true"></i>
+
+            <!-- 创建:与项目行同高同节奏,只是图标换成主色圆底加号;展开后原地换成表单 -->
+            @if (!creatingProject()) {
+              <div class="mps-list mps-list-first">
+                <button type="button" class="mps-row mps-create-row" (click)="beginCreate()">
+                  <span class="mps-icon is-create"><i class="fa-solid fa-plus" aria-hidden="true"></i></span>
+                  <span class="mps-row-copy">
+                    <b>创建新项目</b>
+                    <small>把相关对话归在一起</small>
+                  </span>
+                  <i class="fa-solid fa-chevron-right mps-row-chevron" aria-hidden="true"></i>
                 </button>
-              } @else {
-                <div class="m-project-form">
-                  <label for="m-new-project-name">项目名称</label>
+              </div>
+            } @else {
+              <div class="mps-form">
+                <div class="mps-form-field">
+                  <i class="fa-regular fa-folder" aria-hidden="true"></i>
                   <input
+                    #createInput
                     id="m-new-project-name"
                     type="text"
                     maxlength="24"
                     autocomplete="off"
+                    aria-label="项目名称"
                     [value]="newProjectName()"
-                    placeholder="例如:外壳 3D 设计"
+                    placeholder="输入项目名称"
                     (input)="newProjectName.set($any($event.target).value)"
                     (keydown.enter)="confirmProjectCreation()"
                     (keydown.escape)="$event.stopPropagation(); cancelProjectCreation()"
                   />
-                  @if (projectNameTaken()) {
-                    <p role="alert">已有同名项目,请换一个名称</p>
-                  }
-                  <div class="m-project-form-actions">
-                    <button type="button" class="m-project-cancel" (click)="cancelProjectCreation()">取消</button>
-                    <button type="button" class="m-project-confirm" [disabled]="!newProjectName().trim() || projectNameTaken()" (click)="confirmProjectCreation()">创建项目</button>
-                  </div>
                 </div>
-              }
+                @if (projectNameTaken()) {
+                  <p class="mps-form-error" role="alert">已有同名项目,请换一个名称</p>
+                }
+                <div class="mps-form-actions">
+                  <button type="button" class="mps-btn-ghost" (click)="cancelProjectCreation()">取消</button>
+                  <button
+                    type="button"
+                    class="mps-btn-primary"
+                    [disabled]="!newProjectName().trim() || projectNameTaken()"
+                    (click)="confirmProjectCreation()"
+                  >
+                    创建项目
+                  </button>
+                </div>
+              </div>
+            }
+
+            <div class="mps-list">
               @for (project of filteredProjects(); track project.id) {
-                <button type="button" class="m-project-row" [class.is-current]="project.id === currentWorkspaceId()" (click)="selectProject(project.id)">
-                  <span class="m-project-folder"><i class="fa-regular fa-folder" aria-hidden="true"></i></span>
-                  <span class="m-project-row-copy"><b>{{ project.name }}</b><small>{{ project.rows.length }} 条对话</small></span>
+                <button
+                  type="button"
+                  class="mps-row"
+                  [class.is-current]="project.id === currentWorkspaceId()"
+                  [class.is-orphan]="project.orphan"
+                  (click)="selectProject(project.id)"
+                >
+                  <span class="mps-icon">
+                    <i [class]="project.orphan ? 'fa-solid fa-box-archive' : 'fa-regular fa-folder'" aria-hidden="true"></i>
+                  </span>
+                  <span class="mps-row-copy">
+                    <b>{{ project.name }}</b>
+                    <small>{{ projectSubtitle(project) }}</small>
+                  </span>
                   @if (project.id === currentWorkspaceId()) {
-                    <span class="m-project-current">当前</span>
+                    <i class="fa-solid fa-check mps-current" aria-label="当前项目"></i>
+                  } @else {
+                    <i class="fa-solid fa-chevron-right mps-row-chevron" aria-hidden="true"></i>
                   }
-                  <i class="fa-solid fa-chevron-right m-project-row-chevron" aria-hidden="true"></i>
                 </button>
               } @empty {
-                <div class="m-project-empty">
+                <div class="mps-empty">
                   <i class="fa-regular fa-folder-open" aria-hidden="true"></i>
                   <b>{{ query() ? '没有匹配的项目' : '还没有项目' }}</b>
-                  <span>{{ query() ? '换个名称试试' : '创建项目后,把相关对话归在一起' }}</span>
+                  <span>{{ query() ? '换个名称试试' : '点上方「创建新项目」开始' }}</span>
                 </div>
               }
-            } @else if (selectedWorkspace(); as project) {
-              @if (project.orphan) {
-                <!-- 未分类:只能查看/继续对话;不能往里放新会话,也不能"在其中新建" -->
-                <div class="m-project-load-note" role="status">
-                  <i class="fa-solid fa-circle-info" aria-hidden="true"></i>
-                  <span>这些对话所属的项目已被删除。点开可继续对话,也可用左侧「⋯」把它们移到其它项目。</span>
-                </div>
-              } @else {
+            </div>
+          } @else if (selectedWorkspace(); as project) {
+            @if (project.orphan) {
+              <div class="mps-note" role="status">
+                <i class="fa-solid fa-circle-info" aria-hidden="true"></i>
+                <span>这些对话所属的项目已被删除。点开可继续对话,也可用左侧「⋯」把它们移到其它项目。</span>
+              </div>
+            } @else {
+              <div class="mps-actions">
                 @if (currentSessionId() && currentWorkspaceId() !== project.id) {
-                  <button type="button" class="m-project-move" (click)="moveCurrentConversation(project.id)">
+                  <button type="button" class="mps-action" (click)="moveCurrentConversation(project.id)">
                     <i class="fa-solid fa-folder-open" aria-hidden="true"></i>
-                    <span>将当前对话移入此项目</span>
+                    <span>移入此项目</span>
                   </button>
                 }
-                <button type="button" class="m-project-new-chat" (click)="startConversation(project.id)">
+                <button type="button" class="mps-action is-primary" (click)="startConversation(project.id)">
                   <i class="fa-solid fa-plus" aria-hidden="true"></i>
-                  <span>在此项目中新建对话</span>
-                  <i class="fa-solid fa-arrow-up-right-from-square" aria-hidden="true"></i>
+                  <span>新建对话</span>
                 </button>
-              }
-              @if (sessionLoadIssue() === 'partial' || sessionLoadIssue() === 'timeout' || sessionLoadIssue() === 'error') {
-                <div class="m-project-load-note" role="status">
-                  <i class="fa-solid fa-circle-info" aria-hidden="true"></i>
-                  <span>{{ sessionLoadIssue() === 'partial' ? '部分数字生命的对话暂未加载。' : sessionLoadIssue() === 'timeout' ? '同步时间较长,列表可能还不完整。' : '对话同步暂时失败,当前列表可能不完整。' }}</span>
-                  <button type="button" class="m-project-retry" [disabled]="loadingSessions()" (click)="loadSessions()">重试</button>
-                </div>
-              }
+              </div>
+            }
+            @if (sessionLoadIssue() === 'partial' || sessionLoadIssue() === 'timeout' || sessionLoadIssue() === 'error') {
+              <div class="mps-note" role="status">
+                <i class="fa-solid fa-circle-info" aria-hidden="true"></i>
+                <span>{{ sessionLoadIssue() === 'partial' ? '部分数字生命的对话暂未加载。' : sessionLoadIssue() === 'timeout' ? '同步时间较长,列表可能还不完整。' : '对话同步暂时失败,当前列表可能不完整。' }}</span>
+                <button type="button" class="mps-note-retry" [disabled]="loadingSessions()" (click)="loadSessions()">重试</button>
+              </div>
+            }
+            <div class="mps-list">
               @for (row of filteredSessions(); track row.session.id) {
-                <button type="button" class="m-project-session" (click)="pickSession(row)">
+                <button type="button" class="mps-row mps-row-session" (click)="pickSession(row)">
                   <app-m-avatar [name]="row.agent?.name ?? '?'"></app-m-avatar>
-                  <span class="m-project-session-copy">
+                  <span class="mps-row-copy">
                     <b>{{ row.session.title || '新对话' }}</b>
                     <small>{{ row.agent?.name ?? '未知数字生命' }} · {{ row.session.lastPreview || '暂无消息' }}</small>
                   </span>
-                  <span class="m-project-session-side">
+                  <span class="mps-row-side">
                     <small>{{ relTime(row) }}</small>
-                    @if (row.unread > 0) { <span class="m-project-unread">{{ row.unread > 99 ? '99+' : row.unread }}</span> }
+                    @if (row.unread > 0) { <span class="mps-unread">{{ row.unread > 99 ? '99+' : row.unread }}</span> }
                   </span>
                 </button>
               } @empty {
-                <div class="m-project-empty">
+                <div class="mps-empty">
                   @if (loadingSessions()) {
                     <i class="fa-solid fa-spinner fa-spin" aria-hidden="true"></i>
-                    <b>正在查找项目对话</b>
+                    <b>正在查找对话</b>
                     <span>同步完成后会显示所有数字生命的对话</span>
                   } @else if (sessionLoadIssue() === 'error') {
                     <i class="fa-solid fa-triangle-exclamation" aria-hidden="true"></i>
                     <b>对话暂时没能加载</b>
                     <span>网络恢复后可以重试;也可以先在此项目中新建对话</span>
-                    <button type="button" class="m-project-retry" [disabled]="loadingSessions()" (click)="loadSessions()">重试加载</button>
+                    <button type="button" class="mps-note-retry" [disabled]="loadingSessions()" (click)="loadSessions()">重试加载</button>
                   } @else if (sessionLoadIssue() === 'partial') {
                     <i class="fa-solid fa-circle-info" aria-hidden="true"></i>
                     <b>还有一些对话暂未加载</b>
                     <span>当前项目可能仍有未显示的对话</span>
-                    <button type="button" class="m-project-retry" [disabled]="loadingSessions()" (click)="loadSessions()">重试加载</button>
+                    <button type="button" class="mps-note-retry" [disabled]="loadingSessions()" (click)="loadSessions()">重试加载</button>
                   } @else if (sessionLoadIssue() === 'timeout') {
                     <i class="fa-solid fa-clock" aria-hidden="true"></i>
                     <b>同步时间较长</b>
                     <span>可以重试;新建对话会直接归入此项目</span>
-                    <button type="button" class="m-project-retry" [disabled]="loadingSessions()" (click)="loadSessions()">重试加载</button>
+                    <button type="button" class="mps-note-retry" [disabled]="loadingSessions()" (click)="loadSessions()">重试加载</button>
                   } @else {
                     <i class="fa-regular fa-comments" aria-hidden="true"></i>
-                    <b>{{ query() ? '没有匹配的对话' : '这个项目还没有对话' }}</b>
-                    <span>{{ query() ? '换个标题或数字生命名称试试' : '在上方新建对话,新建后会自动归入此项目' }}</span>
+                    <b>这个项目还没有对话</b>
+                    <span>点上方「新建对话」,新建后会自动归入这里</span>
                   }
                 </div>
               }
-            }
-          </div>
-          <footer class="m-project-foot">
-            @if (step() === 'projects') {
-              <span>{{ realProjectCount() }} 个项目</span>
-            } @else {
-              <span>{{ selectedWorkspaceRows().length }} 条对话</span>
-            }
-            <button type="button" class="m-project-done" (click)="close()">完成</button>
-          </footer>
+            </div>
+          }
         </section>
       </div>
     }
@@ -203,98 +280,394 @@ const ORPHAN_PROJECT_ID = '__orphan__';
   styles: [
     `
       :host { display: block; }
-      .m-project-entry {
+
+      /* ---------- 入口胶囊行 ---------- */
+      .mps-bar {
         display: flex;
         align-items: center;
         gap: var(--sp-2);
-        margin: 0 var(--mob-gutter) var(--sp-2);
-        min-width: 0;
+        padding: 0 var(--mob-gutter) var(--sp-2);
+        overflow-x: auto;
+        scrollbar-width: none;
       }
-      .m-project-context { flex: none; color: var(--muted); font-size: var(--fs-12); }
-      .m-project-trigger {
-        display: flex;
-        flex: 1;
+      .mps-bar::-webkit-scrollbar { display: none; }
+      .mps-pill {
+        display: inline-flex;
+        flex: none;
         align-items: center;
-        gap: var(--sp-2);
-        min-width: 0;
-        min-height: 44px;
+        gap: 6px;
+        max-width: 68vw;
+        min-height: 36px;
         padding: 0 var(--sp-3);
+        box-sizing: border-box;
         border: 1px solid var(--edge);
         border-radius: var(--r-tag);
         background: var(--surface);
         color: var(--ink-2);
         font: inherit;
         font-size: var(--fs-13);
+        line-height: 1;
         cursor: pointer;
+        transition: background var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
+        -webkit-tap-highlight-color: transparent;
       }
-      .m-project-trigger.is-set { border-color: color-mix(in srgb, var(--primary) 35%, var(--edge)); color: var(--primary); }
-      .m-project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
-      .m-project-switch { flex: none; color: var(--muted); font-size: var(--fs-11); }
-      .m-project-chevron { color: var(--muted); font-size: var(--fs-10); }
-      .m-project-root { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: flex-end; }
-      .m-project-mask { position: absolute; inset: 0; border: 0; background: var(--overlay); }
-      .m-project-sheet {
+      .mps-pill:active { background: var(--surface-active); }
+      .mps-pill:focus-visible { outline: 2px solid var(--primary-ring); outline-offset: 2px; }
+      .mps-pill.is-set {
+        border-color: transparent;
+        background: var(--primary-subtle);
+        color: var(--primary);
+      }
+      .mps-pill.is-set:active { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
+      .mps-pill.is-empty { border-style: dashed; color: var(--muted); }
+      .mps-pill-name {
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        font-weight: 500;
+      }
+      .mps-pill-count {
+        flex: none;
+        min-width: 18px;
+        padding: 1px 6px;
+        box-sizing: border-box;
+        border-radius: var(--r-tag);
+        background: color-mix(in srgb, var(--primary) 16%, transparent);
+        color: var(--primary);
+        font-size: var(--fs-10);
+        font-variant-numeric: tabular-nums;
+        text-align: center;
+      }
+      .mps-pill-chevron { flex: none; font-size: 9px; opacity: .7; }
+
+      /* ---------- 弹层外壳 ---------- */
+      .mps-root { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: flex-end; }
+      .mps-mask { position: absolute; inset: 0; border: 0; background: var(--overlay); }
+      /*
+       * 高度随内容(2026-11-23 统一):项目少时卡片自然变矮、贴着输入区,
+       * 不再强行撑到 76dvh 留一大片空白;超出 max-height 才滚动,且只有列表滚。
+       *
+       * 高度用 min-height 保底,让「项目 → 对话」两级切换时卡片不会忽高忽低。
+       */
+      .mps-card {
         position: relative;
         display: flex;
         flex-direction: column;
         width: 100%;
-        height: min(calc(88dvh - var(--mob-safe-bottom)), 760px);
-        max-height: 100%;
-        min-height: 0;
-        padding: var(--sp-2) 0 calc(var(--sp-2) + var(--mob-safe-bottom));
+        height: auto;
+        min-height: min(40dvh, 340px);
+        max-height: min(76dvh, 640px);
+        overflow: hidden;
+        padding: var(--sp-2) 0 calc(var(--sp-3) + var(--mob-safe-bottom));
         box-sizing: border-box;
-        border-radius: var(--r-lg) var(--r-lg) 0 0;
+        border-radius: var(--r-sheet) var(--r-sheet) 0 0;
         background: var(--surface);
         box-shadow: var(--shadow-overlay);
-        animation: project-sheet-in var(--motion-panel) var(--ease-standard);
+        animation: mps-card-in var(--motion-panel) var(--ease-standard);
+      }
+      .mps-grabber { flex: none; width: 36px; height: 4px; margin: 0 auto var(--sp-1); border-radius: var(--r-tag); background: var(--edge-strong); }
+      .mps-close {
+        position: absolute;
+        top: var(--sp-4);
+        right: var(--sp-3);
+        display: grid;
+        place-items: center;
+        width: 32px;
+        height: 32px;
+        padding: 0;
+        border: 0;
+        border-radius: var(--r-tag);
+        background: var(--surface-2);
+        color: var(--muted);
+        font-size: var(--fs-13);
+        cursor: pointer;
+      }
+      .mps-close:active { background: var(--surface-active); }
+
+      /* ---------- 标题 ---------- */
+      .mps-head {
+        display: flex;
+        flex: none;
+        align-items: center;
+        gap: var(--sp-2);
+        /* 右侧给关闭按钮留位;底部间距比顶部大,把标题和列表分开 */
+        padding: var(--sp-2) calc(var(--touch-min) + var(--sp-3)) var(--sp-4) var(--mob-gutter);
+      }
+      .mps-head-copy { flex: 1; min-width: 0; }
+      .mps-head h2 {
+        overflow: hidden;
+        margin: 0;
+        color: var(--ink);
+        font-size: var(--fs-17);
+        font-weight: 600;
+        letter-spacing: -0.01em;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .mps-head p {
+        overflow: hidden;
+        margin: var(--sp-1) 0 0;
+        color: var(--muted);
+        font-size: var(--fs-12);
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .mps-back {
+        display: grid;
+        flex: none;
+        place-items: center;
+        width: 32px;
+        height: 32px;
+        margin-left: calc(-1 * var(--sp-2));
+        padding: 0;
+        border: 0;
+        border-radius: var(--r-tag);
+        background: transparent;
+        color: var(--ink-2);
+        font-size: var(--fs-13);
+        cursor: pointer;
+      }
+
+      /* ---------- 搜索 ---------- */
+      .mps-search {
+        display: flex;
+        flex: none;
+        align-items: center;
+        gap: var(--sp-2);
+        min-height: 40px;
+        margin: 0 var(--mob-gutter) var(--sp-2);
+        padding: 0 var(--sp-3);
+        border-radius: var(--r-md);
+        background: var(--canvas);
+        color: var(--faint);
+      }
+      .mps-search input {
+        flex: 1;
+        width: 0;
+        min-height: 40px;
+        padding: 0;
+        border: 0;
+        outline: 0;
+        background: transparent;
+        color: var(--ink);
+        font: inherit;
+        font-size: var(--fs-14);
+      }
+      .mps-search input::placeholder { color: var(--faint); }
+      .mps-search button {
+        display: grid;
+        flex: none;
+        place-items: center;
+        width: 28px;
+        height: 28px;
+        border: 0;
+        border-radius: var(--r-tag);
+        background: transparent;
+        color: var(--muted);
+        cursor: pointer;
+      }
+
+      /* ---------- 创建 ---------- */
+      .mps-form {
+        display: grid;
+        flex: none;
+        gap: var(--sp-2);
+        margin: 0 var(--mob-gutter) var(--sp-2);
+        padding: var(--sp-3);
+        border-radius: var(--r-md);
+        background: var(--canvas);
       }
-      .m-project-grabber { flex: none; width: 36px; height: 4px; margin: 0 auto var(--sp-2); border-radius: var(--r-tag); background: var(--edge-strong); }
-      .m-project-head { display: flex; flex: none; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--mob-gutter) var(--sp-3); }
-      .m-project-head-copy { flex: 1; min-width: 0; }
-      .m-project-head h2 { overflow: hidden; margin: 0; color: var(--ink); font-size: var(--fs-17); text-overflow: ellipsis; white-space: nowrap; }
-      .m-project-head p { overflow: hidden; margin: var(--sp-1) 0 0; color: var(--muted); font-size: var(--fs-12); text-overflow: ellipsis; white-space: nowrap; }
-      .m-project-back, .m-project-close { display: grid; flex: none; place-items: center; width: var(--touch-min); height: var(--touch-min); padding: 0; border: 0; border-radius: var(--r-tag); background: transparent; color: var(--ink-2); font-size: var(--fs-16); cursor: pointer; }
-      .m-project-close { color: var(--muted); }
-      .m-project-search { display: flex; flex: none; align-items: center; gap: var(--sp-2); min-height: 44px; margin: 0 var(--mob-gutter) var(--sp-3); padding: 0 var(--sp-3); border: 1px solid var(--edge); border-radius: var(--r-md); background: var(--canvas); color: var(--muted); }
-      .m-project-search input { flex: 1; width: 0; min-height: 44px; padding: var(--sp-2) 0; box-sizing: border-box; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: var(--fs-14); }
-      .m-project-search input::placeholder { color: var(--muted); }
-      .m-project-search button { display: grid; flex: none; place-items: center; width: var(--touch-min); height: var(--touch-min); border: 0; border-radius: var(--r-tag); background: transparent; color: var(--muted); }
-      .m-project-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--mob-gutter); }
-      .m-project-create, .m-project-row, .m-project-session, .m-project-new-chat { display: flex; align-items: center; width: 100%; box-sizing: border-box; text-align: left; font: inherit; cursor: pointer; }
-      .m-project-create { gap: var(--sp-3); min-height: 68px; padding: var(--sp-2) var(--sp-3); border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--edge)); border-radius: var(--r-md); background: var(--primary-subtle); color: var(--ink); }
-      .m-project-create-icon, .m-project-folder { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--surface); color: var(--primary); font-size: var(--fs-16); }
-      .m-project-form { display: grid; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--edge); border-radius: var(--r-md); background: var(--canvas); }
-      .m-project-form label { color: var(--ink-2); font-size: var(--fs-13); font-weight: 600; }
-      .m-project-form input { width: 100%; min-height: 44px; padding: 0 var(--sp-3); box-sizing: border-box; border: 1px solid var(--edge); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-14); }
-      .m-project-form input:focus { border-color: var(--primary); outline: 2px solid color-mix(in srgb, var(--primary) 18%, transparent); }
-      .m-project-form p { margin: 0; color: var(--danger); font-size: var(--fs-12); }
-      .m-project-form-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); }
-      .m-project-cancel, .m-project-confirm { min-width: 76px; min-height: var(--touch-min); padding: 0 var(--sp-3); border: 0; border-radius: var(--r-sm); font: inherit; font-size: var(--fs-13); cursor: pointer; }
-      .m-project-cancel { background: var(--surface); color: var(--ink-2); }
-      .m-project-confirm { background: var(--primary); color: var(--primary-content); font-weight: 600; }
-      .m-project-confirm:disabled { cursor: not-allowed; opacity: .5; }
-      .m-project-create > span:nth-child(2), .m-project-row-copy { display: grid; flex: 1; min-width: 0; gap: 3px; }
-      .m-project-create b, .m-project-row b, .m-project-session b { overflow: hidden; color: var(--ink); font-size: var(--fs-14); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
-      .m-project-create small, .m-project-row small, .m-project-session small { overflow: hidden; color: var(--muted); font-size: var(--fs-12); text-overflow: ellipsis; white-space: nowrap; }
-      .m-project-create > i, .m-project-row-chevron { flex: none; color: var(--muted); font-size: var(--fs-11); }
-      .m-project-row { gap: var(--sp-3); min-height: 64px; padding: var(--sp-2) var(--sp-1); border: 0; border-bottom: 1px solid var(--edge); background: transparent; }
-      .m-project-row.is-current { background: var(--primary-subtle); }
-      .m-project-row.is-current .m-project-folder { background: var(--surface); }
-      .m-project-current { flex: none; padding: 4px 8px; border-radius: var(--r-tag); background: var(--primary-subtle); color: var(--primary); font-size: var(--fs-11); }
-      .m-project-new-chat { gap: var(--sp-3); min-height: 52px; margin: 0 0 var(--sp-2); padding: 0 var(--sp-3); border: 0; border-radius: var(--r-md); background: var(--primary); color: var(--primary-content); font-size: var(--fs-14); font-weight: 600; }
-      .m-project-new-chat span { flex: 1; }
-      .m-project-session { gap: var(--sp-3); min-height: 68px; padding: var(--sp-2) var(--sp-1); border: 0; border-bottom: 1px solid var(--edge); background: transparent; }
-      .m-project-session-copy { display: grid; flex: 1; min-width: 0; gap: 4px; }
-      .m-project-session-side { display: grid; flex: none; justify-items: end; gap: var(--sp-1); color: var(--muted); }
-      .m-project-unread { min-width: 18px; padding: 2px 5px; border-radius: var(--r-tag); background: var(--danger); color: var(--on-danger); font-size: var(--fs-10); text-align: center; }
-      .m-project-empty { display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-8) var(--sp-3); color: var(--muted); text-align: center; }
-      .m-project-empty > i { color: var(--primary); font-size: var(--fs-26); }
-      .m-project-empty b { color: var(--ink-2); font-size: var(--fs-14); }
-      .m-project-empty span { font-size: var(--fs-12); }
-      .m-project-foot { display: flex; flex: none; align-items: center; justify-content: space-between; min-height: 48px; margin-top: var(--sp-2); padding: var(--sp-2) var(--mob-gutter) 0; border-top: 1px solid var(--edge); color: var(--muted); font-size: var(--fs-12); }
-      .m-project-done { min-width: 72px; min-height: var(--touch-min); border: 0; border-radius: var(--r-sm); background: var(--primary-subtle); color: var(--primary); font: inherit; font-size: var(--fs-13); font-weight: 600; }
-      @keyframes project-sheet-in { from { transform: translateY(24px); opacity: .8; } to { transform: translateY(0); opacity: 1; } }
-      @media (prefers-reduced-motion: reduce) { .m-project-sheet { animation: none; } }
+      .mps-form-field {
+        display: flex;
+        align-items: center;
+        gap: var(--sp-2);
+        min-height: 44px;
+        padding: 0 var(--sp-3);
+        border: 1px solid transparent;
+        border-radius: var(--r-md);
+        background: var(--surface);
+        color: var(--faint);
+      }
+      .mps-form-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
+      .mps-form-field input {
+        flex: 1;
+        width: 0;
+        min-height: 44px;
+        padding: 0;
+        border: 0;
+        outline: 0;
+        background: transparent;
+        color: var(--ink);
+        font: inherit;
+        font-size: var(--fs-14);
+      }
+      .mps-form-field input::placeholder { color: var(--faint); }
+      .mps-form-error { margin: 0; color: var(--danger); font-size: var(--fs-12); }
+      .mps-form-actions { display: flex; gap: var(--sp-2); }
+      .mps-btn-ghost, .mps-btn-primary {
+        flex: 1;
+        min-height: var(--touch-min);
+        border: 0;
+        border-radius: var(--r-md);
+        font: inherit;
+        font-size: var(--fs-14);
+        cursor: pointer;
+      }
+      .mps-btn-ghost { background: var(--surface); color: var(--ink-2); }
+      .mps-btn-primary { background: var(--primary); color: var(--primary-content); font-weight: 500; }
+      .mps-btn-primary:disabled { cursor: not-allowed; opacity: .45; }
+
+      /* ---------- 列表 ---------- */
+      .mps-list {
+        flex: 1;
+        min-height: 0;
+        overflow-y: auto;
+        overscroll-behavior: contain;
+        padding: 0 var(--mob-gutter);
+      }
+      /* 创建行独占一个不滚动的头部区块,下方列表才是滚动区 */
+      .mps-list-first { flex: none; overflow: visible; padding-bottom: var(--sp-1); }
+      /* 创建行:与项目行同尺寸,仅图标改成主色圆底加号,不再是一张灰底「卡中卡」 */
+      .mps-icon.is-create {
+        border-radius: var(--r-tag);
+        background: var(--primary-subtle);
+        color: var(--primary);
+        font-size: var(--fs-13);
+      }
+      .mps-create-row b { font-weight: 500; }
+      .mps-row {
+        display: flex;
+        align-items: center;
+        gap: var(--sp-3);
+        width: 100%;
+        min-height: 56px;
+        padding: var(--sp-2) var(--sp-2);
+        box-sizing: border-box;
+        border: 0;
+        border-radius: var(--r-md);
+        background: transparent;
+        color: var(--ink);
+        font: inherit;
+        text-align: left;
+        cursor: pointer;
+      }
+      .mps-row + .mps-row { margin-top: 1px; }
+      .mps-row:active { background: var(--surface-2); }
+      .mps-row.is-current { background: var(--primary-subtle); }
+      .mps-row.is-orphan .mps-icon { color: var(--muted); }
+      .mps-icon {
+        display: grid;
+        flex: none;
+        place-items: center;
+        width: 36px;
+        height: 36px;
+        border-radius: var(--r-sm);
+        background: var(--canvas);
+        color: var(--ink-2);
+        font-size: var(--fs-14);
+      }
+      .mps-row.is-current .mps-icon { background: var(--surface); }
+      .mps-row-copy { display: grid; flex: 1; min-width: 0; gap: 3px; }
+      .mps-row b {
+        overflow: hidden;
+        color: var(--ink);
+        font-size: var(--fs-14);
+        font-weight: 500;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .mps-row small {
+        overflow: hidden;
+        color: var(--muted);
+        font-size: var(--fs-12);
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .mps-current { flex: none; color: var(--primary); font-size: var(--fs-13); }
+      .mps-row-chevron { flex: none; color: var(--faint); font-size: var(--fs-10); }
+      /* 会话行与项目行同高,保证两级列表节奏一致 */
+      .mps-row-session { min-height: 56px; }
+      .mps-row-side { display: grid; flex: none; justify-items: end; gap: var(--sp-1); color: var(--muted); }
+      .mps-unread {
+        min-width: 18px;
+        padding: 1px 5px;
+        border-radius: var(--r-tag);
+        background: var(--danger);
+        color: var(--primary-content);
+        font-size: var(--fs-10);
+        text-align: center;
+      }
+
+      /* ---------- 项目内操作与提示 ---------- */
+      .mps-actions { display: flex; flex: none; gap: var(--sp-2); padding: 0 var(--mob-gutter) var(--sp-2); }
+      /*
+       * 操作按钮:**不换行**(2026-11-23 实机截图:
+       * 「将当前对话移入此项目」在 44% 宽度里被折成两行,视觉上像两个按钮)。
+       * 文案同时压缩到 6 字以内,配合 nowrap + 省略号兜底。
+       */
+      .mps-action {
+        display: inline-flex;
+        flex: 1;
+        align-items: center;
+        justify-content: center;
+        gap: 6px;
+        min-width: 0;
+        min-height: 40px;
+        padding: 0 var(--sp-3);
+        border: 1px solid var(--edge);
+        border-radius: var(--r-tag);
+        background: var(--surface);
+        color: var(--ink-2);
+        font: inherit;
+        font-size: var(--fs-13);
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        cursor: pointer;
+      }
+      .mps-action > span { overflow: hidden; text-overflow: ellipsis; }
+      .mps-action.is-primary { border-color: transparent; background: var(--primary); color: var(--primary-content); font-weight: 500; }
+      .mps-note {
+        display: flex;
+        flex: none;
+        align-items: center;
+        gap: var(--sp-2);
+        margin: 0 var(--mob-gutter) var(--sp-2);
+        padding: var(--sp-2) var(--sp-3);
+        border-radius: var(--r-md);
+        background: var(--canvas);
+        color: var(--muted);
+        font-size: var(--fs-12);
+      }
+      .mps-note span { flex: 1; min-width: 0; }
+      .mps-note-retry {
+        flex: none;
+        min-height: 32px;
+        padding: 0 var(--sp-3);
+        border: 0;
+        border-radius: var(--r-tag);
+        background: var(--primary-subtle);
+        color: var(--primary);
+        font: inherit;
+        font-size: var(--fs-12);
+        cursor: pointer;
+      }
+
+      /* ---------- 空态 ---------- */
+      .mps-empty {
+        display: grid;
+        justify-items: center;
+        gap: var(--sp-2);
+        padding: var(--sp-8) var(--sp-3);
+        color: var(--muted);
+        text-align: center;
+      }
+      .mps-empty > i { color: var(--faint); font-size: var(--fs-26); }
+      .mps-empty b { color: var(--ink-2); font-size: var(--fs-14); font-weight: 500; }
+      .mps-empty span { font-size: var(--fs-12); }
+
+      @keyframes mps-card-in { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
+      @media (prefers-reduced-motion: reduce) { .mps-card { animation: none; } }
     `,
   ],
 })
@@ -319,10 +692,17 @@ export class MProjectSwitcherComponent {
   protected readonly loadingSessions = signal(false);
   protected readonly sessionLoadIssue = signal<'none' | 'partial' | 'error' | 'timeout'>('none');
   private sessionLoadGeneration = 0;
+
+  private readonly createInput = viewChild<ElementRef<HTMLInputElement>>('createInput');
+
   protected readonly projectNameTaken = computed(() => {
     const name = this.newProjectName().trim();
     return !!name && this.workspacesSvc.hasName(name);
   });
+
+  /** 「未分类」虚拟分组的 id(承接所属项目已被删除的会话,不落库) */
+  private static readonly ORPHAN_PROJECT_ID = '__orphan__';
+
   /** 项目清单;末尾追加「未分类」用于承接孤儿会话(所属项目已被删除)。 */
   protected readonly projects = computed(() => {
     const currentId = this.currentWorkspaceId();
@@ -345,7 +725,7 @@ export class MProjectSwitcherComponent {
       }));
     if (orphans.length > 0) {
       list.push({
-        id: ORPHAN_PROJECT_ID,
+        id: MProjectSwitcherComponent.ORPHAN_PROJECT_ID,
         name: '未分类',
         createdAt: 0,
         orphan: true,
@@ -360,19 +740,34 @@ export class MProjectSwitcherComponent {
       return (b.rows[0]?.session.updatedAt ?? b.createdAt) - (a.rows[0]?.session.updatedAt ?? a.createdAt);
     });
   });
-  /** 底部统计只数真实项目(未分类是虚拟分组,不计入) */
-  protected readonly realProjectCount = computed(() => this.projects().filter((p) => !p.orphan).length);
-  protected readonly currentWorkspace = computed(() => {    const id = this.currentWorkspaceId();
+
+  protected readonly currentWorkspace = computed(() => {
+    const id = this.currentWorkspaceId();
     return id ? this.workspacesSvc.byId(id) : undefined;
   });
+
+  /** 胶囊上的对话数:当前项目下的会话条数(含未归档) */
+  protected readonly currentWorkspaceConversations = computed(() => {
+    const id = this.currentWorkspaceId();
+    return id ? this.view.active().filter((row) => row.session.workspaceId === id).length : 0;
+  });
+
+  /** 底部/标题统计只数真实项目(「未分类」是虚拟分组,不计入) */
+  protected readonly realProjectCount = computed(() => this.projects().filter((p) => !p.orphan).length);
+
   protected readonly selectedWorkspace = computed(
     () => this.projects().find((project) => project.id === this.selectedWorkspaceId()),
   );
   protected readonly selectedWorkspaceRows = computed(() => this.selectedWorkspace()?.rows ?? []);
+
+  /** 项目 ≤5 个时不出搜索框:一屏放得下,搜索框只增加视觉噪音 */
+  protected readonly showSearch = computed(() => this.projects().length >= 6);
+
   protected readonly filteredProjects = computed(() => {
     const q = this.query().trim().toLowerCase();
     return this.projects().filter((project) => !q || project.name.toLowerCase().includes(q));
   });
+
   protected readonly filteredSessions = computed(() => {
     const q = this.query().trim().toLowerCase();
     return this.selectedWorkspaceRows().filter((row) =>
@@ -385,8 +780,10 @@ export class MProjectSwitcherComponent {
     this.workspacesSvc.load();
   }
 
+  /** 打开选择器(入口只有一个,新建项目在卡片内的「创建新项目」里) */
   protected openPicker(): void {
     this.query.set('');
+    this.creatingProject.set(false);
     this.step.set('projects');
     this.selectedWorkspaceId.set(null);
     this.open.set(true);
@@ -417,6 +814,7 @@ export class MProjectSwitcherComponent {
   protected close(): void {
     this.open.set(false);
     this.query.set('');
+    this.creatingProject.set(false);
   }
 
   @HostListener('document:keydown.escape', ['$event'])
@@ -431,15 +829,25 @@ export class MProjectSwitcherComponent {
     this.query.set('');
   }
 
+  /**
+   * 选中项目 → **同一张卡内**滑到该项目的对话列表。
+   *
+   * 不做「点项目直接跳最近一条」:切换项目是带上下文的动作(这个项目里
+   * 可能有几条并行对话),替用户做选择会让他找不到想找的那条。
+   * 滑入列表是一次轻量过渡,左上「‹」一键退回,比两个独立弹层少一次遮挡。
+   */
   protected selectProject(id: string): void {
     this.selectedWorkspaceId.set(id);
     this.query.set('');
     this.step.set('sessions');
   }
 
-  protected createProject(): void {
+  protected beginCreate(): void {
+    this.step.set('projects');
     this.newProjectName.set('');
     this.creatingProject.set(true);
+    // 等表单渲染出来再聚焦,否则 viewChild 还是空的
+    setTimeout(() => this.createInput()?.nativeElement.focus(), 0);
   }
 
   protected cancelProjectCreation(): void {
@@ -459,6 +867,15 @@ export class MProjectSwitcherComponent {
     this.step.set('sessions');
   }
 
+  /** 项目行副标题:「3 条对话 · 10 分钟前」;空项目给引导文案 */
+  protected projectSubtitle(project: { rows: SessionRow[]; orphan: boolean }): string {
+    const count = project.rows.length;
+    if (count === 0) return '暂无对话';
+    const latest = project.rows.reduce((max, row) => Math.max(max, row.session.updatedAt ?? 0), 0);
+    const when = latest ? fmtRelTime(latest) : '';
+    return when ? `${count} 条对话 · ${when}` : `${count} 条对话`;
+  }
+
   protected relTime(row: SessionRow): string {
     return row.session.updatedAt ? fmtRelTime(row.session.updatedAt) : '新建';
   }

+ 175 - 48
src/app/mobile/components/permission-guide/permission-guide.ts

@@ -3,7 +3,33 @@ import { NotificationSetupService } from '../../../core/notification-setup.servi
 import { BackButtonService } from '../../../core/back-button.service';
 import { LockScrollDirective } from '../../directives/lock-scroll.directive';
 
-/** 首次引导与「我的」共用;通知授权和后台建议分开呈现。 */
+/**
+ * 通知与后台权限设置卡。
+ *
+ * ## 重设计(2026-11-23)
+ *
+ * 用户反馈:「打开权限后 UI 上没有任何变化,不知道到底开没开」。
+ *
+ * 旧版的问题:省电策略和自启动**只有说明文字 + 一个按钮**,点完跳系统设置,
+ * 回来既不显示结果也无法判断 —— 用户只能靠猜。
+ *
+ * 新版把四项权限做成**统一状态清单**:
+ *
+ * ```
+ * ┌────────────────────────────────┐
+ * │ ☾  通知与后台接收            ✕ │
+ * │    3 项待处理 / 全部就绪        │
+ * ├────────────────────────────────┤
+ * │ [✓] 系统通知       已允许       │  绿
+ * │ [✓] 推送服务       已注册绑定   │  绿
+ * │ [!] 省电策略       未设为无限制 │  橙 + 「去设置」
+ * │ [?] 自启动         无法读取     │  灰 + 「去设置」
+ * └────────────────────────────────┘
+ * ```
+ *
+ * 「无法读取」必须是灰问号而不是绿勾 —— 系统确实没有这个查询接口,
+ * 假装知道比不显示更糟。
+ */
 @Component({
   selector: 'app-permission-guide',
   changeDetection: ChangeDetectionStrategy.OnPush,
@@ -14,43 +40,95 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
         <button class="pg-mask" type="button" aria-label="关闭通知设置" (click)="setup.close()"></button>
         <section class="pg-card" [attr.aria-busy]="setup.busy()">
           <header class="pg-head">
-            <span class="pg-step">{{ setup.granted() ? '2 / 2 · 后台接收建议' : '1 / 2 · 通知提醒' }}</span>
-            <button type="button" class="pg-close" aria-label="关闭" [disabled]="setup.busy()" (click)="setup.close()"><i class="fa-solid fa-xmark" aria-hidden="true"></i></button>
+            <div class="pg-head-copy">
+              <h2 id="pg-title">{{ setup.granted() ? '通知与后台接收' : '开启消息提醒' }}</h2>
+              <p>
+                @if (!setup.granted()) {
+                  允许后,切到其他应用也能及时看到提醒
+                } @else if (setup.remaining() === 0) {
+                  全部就绪
+                } @else {
+                  还有 {{ setup.remaining() }} 项待处理
+                }
+              </p>
+            </div>
+            <button type="button" class="pg-close" aria-label="关闭" [disabled]="setup.busy()" (click)="setup.close()">
+              <i class="fa-solid fa-xmark" aria-hidden="true"></i>
+            </button>
           </header>
+
           <div class="pg-body">
-            <div class="pg-icon"><i [class]="setup.granted() ? 'fa-regular fa-circle-check' : 'fa-regular fa-bell'" aria-hidden="true"></i></div>
-            <h2 id="pg-title">{{ setup.granted() ? '通知权限已开启' : '不错过新消息' }}</h2>
             @if (!setup.granted()) {
-              <p class="pg-desc">允许 Fmode 发送消息提醒。暂不开启也能正常使用,之后可在「我的 → 通知」中设置。</p>
-              <div class="pg-info"><i class="fa-regular fa-message" aria-hidden="true"></i><span>切到其他应用后,也能及时看到已送达的通知。</span></div>
-              <p class="pg-note">点击开启即同意使用极光推送服务,处理设备标识和通知数据以投递提醒。下一步由系统询问是否允许通知。</p>
-            } @else {
-              <p class="pg-desc">系统权限与推送连接分开检查。后台接收还会受到手机省电策略的影响。</p>
-              <div class="pg-status" aria-live="polite">
-                <div><span>系统通知</span><b>已允许</b></div>
-                <div><span>推送服务</span><b [class.pg-pending]="!setup.ready()">{{ setup.pushText() }}</b></div>
+              <!-- 尚未授权:先说明为什么,再给主按钮 -->
+              <div class="pg-intro">
+                <div class="pg-icon"><i class="fa-regular fa-bell" aria-hidden="true"></i></div>
+                <p>点击开启即同意使用极光推送服务,用于投递设备标识与通知数据。下一步由系统询问是否允许通知。</p>
               </div>
-              @if (setup.push.phase() !== 'started' || setup.push.binding() === 'error') {
-                <button type="button" class="pg-link" [disabled]="setup.busy()" (click)="setup.enable()">{{ setup.push.phase() === 'blocked' ? '同意并启用推送服务' : '重试连接推送服务' }}</button>
-              }
+            } @else {
               <!--
-                国产 ROM 必备的两步(2026-11-21 补):
-                省电策略「无限制」+ 自启动。缺任一步,熄屏/长时间后台都可能收不到。
-                只给入口、只说明实际效果 —— 不承诺「锁屏必达」。
+                状态清单(2026-11-23 核心改动):
+                每项都带实时状态。可读的两项(通知/省电)来自系统 API,
+                自启动明确标「无法读取」,不制造虚假的确定感。
               -->
-              <div class="pg-saver"><i class="fa-solid fa-battery-half" aria-hidden="true"></i><div><h3>省电策略设为「无限制」</h3><p>这是熄屏后能收到提醒的前提。系统默认的「智能」会在熄屏后限制后台,消息可能延后或收不到。</p></div></div>
-              <button type="button" class="pg-settings" [disabled]="setup.busy()" (click)="setup.openSettings('battery')">去设置省电策略<i class="fa-solid fa-arrow-up-right-from-square" aria-hidden="true"></i></button>
-              <div class="pg-saver"><i class="fa-solid fa-power-off" aria-hidden="true"></i><div><h3>允许自启动 / 后台运行</h3><p>小米、华为、OPPO、vivo 等系统会默认拦截后台。开启后才可能在切走较久后仍收到提醒。</p></div></div>
-              <button type="button" class="pg-settings" [disabled]="setup.busy()" (click)="setup.openSettings('autostart')">去设置自启动<i class="fa-solid fa-arrow-up-right-from-square" aria-hidden="true"></i></button>
-              <p class="pg-note">返回后通知权限会自动更新。以上两项能明显提高送达率,但无法保证锁屏必达:彻底关闭 App 后仍需系统级厂商通道支持。部分手机无法读取省电策略,请以系统页面显示为准。</p>
-              <button type="button" class="pg-link" [disabled]="setup.busy()" (click)="setup.openSettings('notifications')">管理系统通知</button>
+              <ul class="pg-checks" aria-live="polite">
+                @for (c of setup.checks(); track c.key) {
+                  <li class="pg-check" [attr.data-state]="c.state">
+                    <span class="pg-check-mark" aria-hidden="true">
+                      @switch (c.state) {
+                        @case ('on') { <i class="fa-solid fa-check"></i> }
+                        @case ('off') { <i class="fa-solid fa-exclamation"></i> }
+                        @case ('error') { <i class="fa-solid fa-xmark"></i> }
+                        @default { <i class="fa-solid fa-question"></i> }
+                      }
+                    </span>
+                    <span class="pg-check-copy">
+                      <b>{{ c.label }}</b>
+                      <small>{{ c.detail }}</small>
+                    </span>
+                    @if (c.action) {
+                      <button
+                        type="button"
+                        class="pg-check-go"
+                        [disabled]="setup.busy()"
+                        [attr.aria-label]="'打开' + c.label + '系统设置'"
+                        (click)="setup.openSettings(c.action)"
+                      >
+                        去设置
+                      </button>
+                    } @else if (c.state === 'on') {
+                      <span class="pg-check-ok">已开启</span>
+                    }
+                  </li>
+                }
+              </ul>
+
+              @if (setup.push.phase() !== 'started' || setup.push.binding() === 'error') {
+                <button type="button" class="pg-link" [disabled]="setup.busy()" (click)="setup.enable()">
+                  {{ setup.push.phase() === 'blocked' ? '同意并启用推送服务' : '重试连接推送服务' }}
+                </button>
+              }
+
+              <p class="pg-note">
+                省电策略与自启动可提高送达率;彻底关闭 App 后能否收到推送取决于厂商通道。
+              </p>
+              <button type="button" class="pg-link" [disabled]="setup.busy()" (click)="setup.openSettings('notifications')">
+                管理系统通知
+              </button>
             }
             @if (setup.error()) { <p class="pg-error" role="alert">{{ setup.error() }}</p> }
           </div>
+
           <footer class="pg-actions">
             @if (!setup.granted()) {
               <button type="button" class="pg-btn" [disabled]="setup.busy()" (click)="setup.close()">暂不开启</button>
-              <button type="button" class="pg-btn pg-primary" [disabled]="setup.busy()" (click)="setup.needsSettings() ? setup.openSettings('notifications') : setup.enable()">{{ setup.busy() ? '正在处理…' : setup.needsSettings() ? '去系统设置' : '开启通知' }}</button>
+              <button
+                type="button"
+                class="pg-btn pg-primary"
+                [disabled]="setup.busy()"
+                (click)="setup.needsSettings() ? setup.openSettings('notifications') : setup.enable()"
+              >
+                {{ setup.busy() ? '正在处理…' : setup.needsSettings() ? '去系统设置' : '开启通知' }}
+              </button>
             } @else {
               <button type="button" class="pg-btn pg-primary" [disabled]="setup.busy()" (click)="setup.close()">完成</button>
             }
@@ -60,30 +138,79 @@ import { LockScrollDirective } from '../../directives/lock-scroll.directive';
     }
   `,
   styles: [`
-    .pg-root { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: max(var(--sp-4), var(--mob-safe-top)) var(--sp-4) max(var(--sp-4), var(--mob-safe-bottom)); box-sizing: border-box; }
+    .pg-root {
+      position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center;
+      padding: max(var(--sp-4), var(--mob-safe-top)) var(--sp-4) max(var(--sp-4), var(--mob-safe-bottom));
+      box-sizing: border-box;
+    }
     .pg-mask { position: absolute; inset: 0; width: 100%; border: 0; background: var(--overlay); }
-    .pg-card { position: relative; display: flex; flex-direction: column; min-width: 0; width: 100%; max-width: 400px; max-height: 100%; overflow: hidden; box-sizing: border-box; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-overlay); }
-    .pg-head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3) 0 var(--sp-5); }
-    .pg-step { color: var(--muted); font-size: var(--fs-12); }
-    .pg-close { display: grid; place-items: center; flex: none; width: var(--touch-min); height: var(--touch-min); padding: 0; border: 0; border-radius: var(--r-tag); background: transparent; color: var(--muted); font-size: var(--fs-17); }
-    .pg-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-2) var(--sp-5) var(--sp-4); }
-    .pg-icon { display: grid; flex: none; place-items: center; width: 48px; height: 48px; margin-bottom: var(--sp-3); border-radius: var(--r-md); background: var(--primary-subtle); color: var(--primary); font-size: var(--fs-20); }
-    h2 { margin: 0 0 var(--sp-2); font-size: calc(20px * var(--ui-scale, 1)); line-height: 1.4; color: var(--ink); }
-    .pg-desc { margin: 0 0 var(--sp-4); color: var(--ink-2); font-size: var(--fs-14); line-height: 1.65; }
-    .pg-info, .pg-saver { display: flex; align-items: flex-start; gap: var(--sp-3); margin: var(--sp-3) 0; padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-13); line-height: 1.6; }
-    .pg-info > i, .pg-saver > i { flex: none; margin-top: 4px; color: var(--primary); }
-    .pg-saver h3 { margin: 0 0 var(--sp-1); color: var(--ink); font-size: var(--fs-14); }
-    .pg-saver p { margin: 0; }
-    .pg-note { margin: var(--sp-3) 0 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.65; overflow-wrap: anywhere; }
-    .pg-status { padding: var(--sp-3); border: 1px solid var(--edge); border-radius: var(--r-md); font-size: var(--fs-13); }
-    .pg-status > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-1) var(--sp-3); }
-    .pg-status > div + div { margin-top: var(--sp-2); }
-    .pg-status span { color: var(--muted); }
-    .pg-status b { color: var(--success); font-weight: 500; overflow-wrap: anywhere; }
-    .pg-status b.pg-pending { color: var(--muted); }
-    .pg-settings { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); width: 100%; min-height: var(--touch-min); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--edge-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-14); text-align: left; }
+    .pg-card {
+      position: relative; display: flex; flex-direction: column; min-width: 0; width: 100%;
+      max-width: 400px; max-height: 100%; overflow: hidden; box-sizing: border-box;
+      border-radius: var(--r-sheet); background: var(--surface); box-shadow: var(--shadow-overlay);
+    }
+
+    /* 头部:标题 + 动态副标题(待处理数量),与弹层族同一套节奏 */
+    .pg-head { display: flex; flex: none; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-4) var(--sp-3) var(--sp-3) var(--sp-5); }
+    .pg-head-copy { flex: 1; min-width: 0; }
+    .pg-head h2 { margin: 0; color: var(--ink); font-size: var(--fs-17); font-weight: 600; letter-spacing: -.01em; }
+    .pg-head p { margin: var(--sp-1) 0 0; color: var(--muted); font-size: var(--fs-12); }
+    .pg-close {
+      display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0;
+      border: 0; border-radius: var(--r-tag); background: var(--surface-2); color: var(--muted); font-size: var(--fs-13);
+    }
+
+    .pg-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sp-5) var(--sp-4); }
+
+    /* 未授权引导 */
+    .pg-intro .pg-icon {
+      display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: var(--sp-3);
+      border-radius: var(--r-md); background: var(--primary-subtle); color: var(--primary); font-size: var(--fs-20);
+    }
+    /* 说明性长文跟随「正文大小」档位,不跟着界面档位放大 */
+    .pg-intro p { margin: 0 0 var(--sp-4); color: var(--ink-2); font-size: var(--chat-read-size, 16px); line-height: 1.6; }
+
+    /* ===== 状态清单 ===== */
+    .pg-checks { margin: 0; padding: 0; list-style: none; }
+    .pg-check {
+      display: flex; align-items: center; gap: var(--sp-3);
+      min-height: 56px; padding: var(--sp-2) var(--sp-3);
+      border-radius: var(--r-md); background: var(--canvas);
+    }
+    .pg-check + .pg-check { margin-top: var(--sp-2); }
+    .pg-check-mark {
+      display: grid; place-items: center; flex: none; width: 24px; height: 24px;
+      border-radius: var(--r-tag); font-size: var(--fs-11);
+    }
+    /* 三态三色:已开=绿 / 未开=琥珀 / 读不到=灰。绝不用绿色表示「未知」 */
+    .pg-check[data-state='on'] .pg-check-mark { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
+    .pg-check[data-state='off'] .pg-check-mark { background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--warning); }
+    .pg-check[data-state='error'] .pg-check-mark { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
+    .pg-check[data-state='unknown'] .pg-check-mark { background: var(--surface-2); color: var(--muted); }
+
+    .pg-check-copy { display: grid; flex: 1; min-width: 0; gap: 2px; }
+    .pg-check-copy b { color: var(--ink); font-size: var(--fs-14); font-weight: 500; }
+    /*
+     * 副标题允许折到两行(2026-11-23 实机):
+     * 「系统不提供查询,请确认已允许」被 nowrap 截成「请确认…」,正好把最关键的信息吃掉。
+     * 改成两行截断,短文案仍是一行。
+     */
+    .pg-check-copy small {
+      display: -webkit-box; overflow: hidden; color: var(--muted); font-size: var(--fs-12);
+      -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.45;
+    }
+
+    .pg-check-go {
+      flex: none; min-height: 32px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-tag);
+      background: var(--primary-subtle); color: var(--primary); font: inherit; font-size: var(--fs-12); font-weight: 500;
+    }
+    /* 已开启项的右栏:绿色小字代替按钮(2026-11-23) */
+    .pg-check-ok { flex: none; color: var(--success); font-size: var(--fs-12); font-weight: 500; }
+
+    .pg-note { margin: var(--sp-4) 0 0; color: var(--muted); font-size: var(--fs-13); line-height: 1.55; overflow-wrap: anywhere; }
     .pg-link { min-height: var(--touch-min); padding: var(--sp-2) 0; border: 0; background: transparent; color: var(--primary); font: inherit; font-size: var(--fs-13); text-align: left; }
-    .pg-error { margin: var(--sp-3) 0 0; padding: var(--sp-3); border-radius: var(--r-sm); background: var(--danger-subtle); color: var(--danger); font-size: var(--fs-13); line-height: 1.6; }
+    .pg-error { margin: var(--sp-3) 0 0; padding: var(--sp-3); border-radius: var(--r-sm); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font-size: var(--fs-13); line-height: 1.6; }
+
     .pg-actions { display: flex; flex: none; gap: var(--sp-2); padding: var(--sp-3) var(--sp-5) var(--sp-4); border-top: 1px solid var(--edge); background: var(--surface); }
     .pg-btn { flex: 1; min-width: 0; min-height: var(--touch-min); padding: var(--sp-2); border: 1px solid var(--edge); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-14); line-height: 1.5; }
     .pg-primary { border-color: var(--primary); background: var(--primary); color: var(--primary-content); font-weight: 600; }

+ 10 - 2
src/app/mobile/pages/chat/chat.ts

@@ -765,7 +765,7 @@ type SheetTab = 'task' | 'file' | 'deliver' | 'state';
         max-height: 100dvh;
         padding-top: var(--mob-safe-top);
         padding-bottom: var(--mob-safe-bottom);
-        border-radius: var(--r-lg) var(--r-lg) 0 0;
+        border-radius: var(--r-sheet) var(--r-sheet) 0 0;
         box-sizing: border-box;
         background: var(--surface);
         box-shadow: var(--shadow-overlay);
@@ -901,12 +901,20 @@ type SheetTab = 'task' | 'file' | 'deliver' | 'state';
         color: var(--ink);
         word-break: break-all;
       }
+      /*
+       * 统一的弹层进场(2026-11-23):从底部上浮 40px + 淡入,240ms 标准缓动。
+       * 原来这里是「从屏幕外整个滑入 translateY(100%)」,与选择项目浮卡的
+       * 「浮起 24px」不一致 —— 同样是从底部出来,一个扫过整屏、一个只轻抬一下。
+       * 现在全端统一为「轻抬」:有方向感,又不制造长距离运动。
+       */
       @keyframes m-sheet-in {
         from {
-          transform: translateY(100%);
+          transform: translateY(40px);
+          opacity: 0;
         }
         to {
           transform: translateY(0);
+          opacity: 1;
         }
       }
       @media (prefers-reduced-motion: reduce) {

+ 41 - 138
src/app/mobile/pages/messages/messages.ts

@@ -10,6 +10,7 @@ import { MAvatarComponent } from '../../components/m-avatar/m-avatar';
 import { BadgeTone, MBadgeComponent } from '../../components/m-badge/m-badge';
 import { MSegmentedComponent } from '../../components/m-segmented/m-segmented';
 import { MDrawerComponent } from '../../components/m-drawer/m-drawer';
+import { MActionItem, MActionSheetComponent } from '../../components/m-action-sheet/m-action-sheet';
 import { MEmptyComponent } from '../../components/m-empty/m-empty';
 import { MNewChatSheetComponent } from '../../components/m-new-chat/m-new-chat';
 import { MSearchComponent } from '../../components/m-search/m-search';
@@ -19,7 +20,7 @@ import { LiveService } from '../../../core/live.service';
 import { MobileChatViewService, SessionRow } from '../../../core/mobile-chat-view.service';
 import { WorkspaceService } from '../../../core/workspace.service';
 import { PromptModalService } from '../../../components/domain/prompt-modal/prompt-modal.service';
-import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
+import { MConfirmComponent } from '../../components/m-confirm/m-confirm';
 import { isMatrixReady } from '../../../core/format';
 import { fmtRelTime } from '../../../core/time';
 
@@ -43,7 +44,8 @@ type MsgFilter = 'all' | 'group' | 'workspace';
     MEmptyComponent,
     MNewChatSheetComponent,
     MSearchComponent,
-    UiMDialog,
+    MConfirmComponent,
+    MActionSheetComponent,
   ],
   template: `
     <div class="m-page m-page--fixed">
@@ -279,31 +281,22 @@ type MsgFilter = 'all' | 'group' | 'workspace';
       (groupCreated)="onGroupCreated($event)"
     />
 
-    <!-- 项目操作菜单(与侧边栏同一套交互:底部弹出 + 删除二次确认) -->
-    @if (wsMenu(); as m) {
-      <div class="m-msgws-act" role="dialog" aria-modal="true" [attr.aria-label]="m.title">
-        <div class="m-msgws-mask" (click)="wsMenu.set(null)"></div>
-        <section class="m-msgws-sheet">
-          <p class="m-msgws-title">{{ m.title }}</p>
-          @for (item of m.items; track item.label) {
-            <button
-              type="button"
-              class="m-msgws-item"
-              [class.danger]="item.danger"
-              (click)="runWsMenu(item)"
-            >
-              {{ item.label }}
-            </button>
-          }
-          <button type="button" class="m-msgws-item cancel" (click)="wsMenu.set(null)">取消</button>
-        </section>
-      </div>
-    }
+    <!-- 项目操作面板(全局统一组件 m-action-sheet,与抽屉同一套) -->
+    <app-m-action-sheet
+      [open]="!!wsMenu()"
+      [title]="wsMenu()?.title ?? ''"
+      [items]="wsMenu()?.items ?? []"
+      (pick)="runWsMenu($event)"
+      (dismissed)="wsMenu.set(null)"
+    />
 
-    <ui-m-dialog
+    <!-- 删除项目确认:危险红(2026-11-23 换业务组件) -->
+    <app-m-confirm
       [(open)]="wsConfirmOpen"
       [title]="wsConfirmTitle()"
       [message]="wsConfirmMessage()"
+      icon="fa-solid fa-trash-can"
+      [danger]="true"
       [confirmText]="wsConfirmText()"
       (confirm)="runWsConfirm()"
     />
@@ -452,74 +445,7 @@ type MsgFilter = 'all' | 'group' | 'workspace';
         color: var(--danger);
         font-size: var(--fs-12);
       }
-
-      /* 项目操作菜单:底部弹出(与抽屉 m-act 同形态) */
-      .m-msgws-act {
-        position: fixed;
-        inset: 0;
-        z-index: var(--z-modal, 1100);
-        display: flex;
-        flex-direction: column;
-        justify-content: flex-end;
-      }
-      .m-msgws-mask {
-        position: absolute;
-        inset: 0;
-        /* 2026-11-14:原为硬编码 rgba(0,0,0,.35),违反 ADR-002「零硬编码色值」→ 改走遮罩令牌 */
-        background: var(--overlay);
-      }
-      .m-msgws-sheet {
-        position: relative;
-        padding: var(--sp-3) var(--sp-3) calc(var(--sp-3) + var(--mob-safe-bottom));
-        border-radius: var(--r-lg) var(--r-lg) 0 0;
-        background: var(--surface);
-        box-shadow: var(--shadow-pop);
-        animation: msgws-up 200ms cubic-bezier(0.2, 0, 0, 1);
-      }
-      @keyframes msgws-up {
-        from {
-          transform: translateY(12px);
-          opacity: 0;
-        }
-        to {
-          transform: translateY(0);
-          opacity: 1;
-        }
-      }
-      @media (prefers-reduced-motion: reduce) {
-        .m-msgws-sheet {
-          animation: none;
-        }
-      }
-      .m-msgws-title {
-        margin: 0 0 var(--sp-2);
-        padding: 0 var(--sp-2);
-        color: var(--muted);
-        font-size: var(--fs-12);
-        text-align: center;
-      }
-      .m-msgws-item {
-        display: block;
-        width: 100%;
-        min-height: 48px;
-        border: 0;
-        border-radius: var(--r-md);
-        background: transparent;
-        color: var(--ink);
-        font-size: var(--fs-16, 16px);
-        text-align: center;
-      }
-      .m-msgws-item:active {
-        background: var(--surface-active);
-      }
-      .m-msgws-item.danger {
-        color: var(--danger);
-      }
-      .m-msgws-item.cancel {
-        margin-top: var(--sp-2);
-        background: var(--surface-2);
-        color: var(--ink-2);
-      }
+      /* 项目分组头里的文件夹图标 */
       .m-ws-head > i {
         color: var(--muted);
         font-size: var(--fs-13);
@@ -742,17 +668,13 @@ export class MbMessagesPage {
   protected readonly filter = signal<MsgFilter>('all');
   protected readonly drawerOpen = signal(false);
   protected readonly sheetOpen = signal(false);
-  /** 新建对话时预选的项目(从项目「+」进入时设置;顶部「+」按 rememberedWorkspace 回填) */
-  protected readonly pendingWorkspace = signal<string | null>(null);
   /**
-   * 「最近一次选择的项目」记忆(豆包口径)。
+   * 新建对话时预选的项目。
    *
-   * 只要用户在新建弹层里**选定过**某个项目(不论最终是否创建成会话),
-   * 下次从顶部「+」进入就沿用 —— 连续在同一个项目里建对话不用每次重选。
+   * 🔴 只有**显式指定项目**的入口才会写它:项目行「+」、抽屉项目「+」、
+   *    `?newIn=<id>` 外部跳转。顶部「+」和抽屉「新建对话」一律置 null(= 日常会话)。
    */
-  private readonly rememberedWorkspace = signal<string | null>(null);
-  /** 记忆归属的账号,用于换号时清空(页面不会被重建) */
-  private rememberedOwner: string | null = null;
+  protected readonly pendingWorkspace = signal<string | null>(null);
 
   /**
    * 标签页。
@@ -867,10 +789,10 @@ export class MbMessagesPage {
 
   // ---------- 项目操作:重命名 / 删除(2026-11-13,与侧边栏同口径) ----------
 
-  /** 底部操作菜单的状态 */
+  /** 底部操作面板的状态(与抽屉共用 m-action-sheet) */
   protected readonly wsMenu = signal<{
     title: string;
-    items: { label: string; danger?: boolean; run: () => void }[];
+    items: (MActionItem & { run: () => void })[];
   } | null>(null);
 
   /** 删除项目的二次确认(规范 18 §三-13:删除类必须居中 dialog 二次确认) */
@@ -883,23 +805,26 @@ export class MbMessagesPage {
   protected openWsMenu(id: string): void {
     const ws = this.workspaces.sorted().find((w) => w.id === id);
     if (!ws) return;
-    const count = this.sessionsSvc.all().filter((x) => x.workspaceId === id).length;
     this.wsMenu.set({
       title: ws.name,
       items: [
-        { label: '重命名', run: () => this.renameWorkspace(id) },
+        { key: 'rename', label: '重命名', icon: 'fa-solid fa-pen', run: () => this.renameWorkspace(id) },
         {
-          label: `删除项目${count > 0 ? `(${count} 个会话移到日常对话)` : ''}`,
+          key: 'delete',
+          label: '删除项目',
           danger: true,
+          icon: 'fa-solid fa-trash-can',
           run: () => this.askDeleteWorkspace(id, ws.name),
         },
       ],
     });
   }
 
-  protected runWsMenu(item: { run: () => void }): void {
+  /** 统一操作面板回传 key:按 key 找回闭包并执行 */
+  protected runWsMenu(picked: MActionItem): void {
+    const item = this.wsMenu()?.items.find((i) => i.key === picked.key);
     this.wsMenu.set(null);
-    item.run();
+    item?.run();
   }
 
   private renameWorkspace(id: string): void {
@@ -926,7 +851,7 @@ export class MbMessagesPage {
   private askDeleteWorkspace(id: string, name: string): void {
     this.pendingDeleteWs = id;
     this.wsConfirmTitle.set('删除项目');
-    this.wsConfirmMessage.set(`确定删除项目「${name}」?其中的会话会移到「日常对话」,不会被删除。`);
+    this.wsConfirmMessage.set(`确定删除项目「${name}」?`);
     this.wsConfirmText.set('删除');
     this.wsConfirmOpen.set(true);
   }
@@ -1022,18 +947,7 @@ export class MbMessagesPage {
       });
     });
 
-    /*
-     * 🔴 「记住的项目」必须跟随账号(2026-11-21 评审修复)。
-     * 本页挂在 /mobile/messages 根路径上,换账号时 Angular 不会重建它,
-     * `rememberedWorkspace` 会保留上一个账号的项目 —— 新账号新建的会话
-     * 会被挂到别人的项目 id 上。账号一变就清空。
-     */
-    effect(() => {
-      const uid = this.session.me()?.id ?? null;
-      if (uid === this.rememberedOwner) return;
-      this.rememberedOwner = uid;
-      untracked(() => this.rememberedWorkspace.set(null));
-    });
+
 
     /*
      * `?newIn=<项目id>`(2026-11-21 修复):
@@ -1097,30 +1011,19 @@ export class MbMessagesPage {
 
   protected onDrawerNewChat(): void {
     this.drawerOpen.set(false);
-    // 抽屉顶部的「新建对话」:与顶栏「+」同口径(预填最近使用的项目)
-    const remembered = this.rememberedWorkspace();
-    this.pendingWorkspace.set(remembered && this.workspaces.byId(remembered) ? remembered : null);
+    // 抽屉顶部的「新建对话」= 日常会话,不沿用任何项目(2026-11-23 用户裁决)
+    this.pendingWorkspace.set(null);
     this.sheetOpen.set(true);
   }
 
-  /** 弹层开合:关闭时清掉预选项目,避免下次新建误落到上一次的项目 */
   /** 弹层开合:关闭时清掉预选项目,避免下次新建误落到上一次的项目 */
   protected onSheetToggle(open: boolean): void {
     this.sheetOpen.set(open);
-    if (open) return;
-    /*
-     * 关闭时把**这次选中的项目**记下来(用户可能只是看了看没建)。
-     * 只有确实存在于项目列表里的才记,防止项目已被删除还留着死 id。
-     */
-    const chosen = this.pendingWorkspace();
-    if (chosen && this.workspaces.byId(chosen)) this.rememberedWorkspace.set(chosen);
-    this.pendingWorkspace.set(null);
+    if (!open) this.pendingWorkspace.set(null);
   }
 
   protected onCreated(agentId: string): void {
     const ws = this.pendingWorkspace();
-    // 记住本次归属,顶部「+」下次直接预填(豆包:连续在同一项目里建对话不断手)
-    if (ws && this.workspaces.byId(ws)) this.rememberedWorkspace.set(ws);
     this.pendingWorkspace.set(null);
     this.sheetOpen.set(false);
     // 新建:`/new` 入口由会话页调用 startBlank() 建会话并换真实地址(与桌面同口径)
@@ -1133,13 +1036,13 @@ export class MbMessagesPage {
   /**
    * 顶部「+」的默认归属。
    *
-   * 与豆包一致:**跟随「上一份新会话被放进哪」**,没有历史就落在日常对话。
-   * 不跟随「当前正在看的项目」——那会让「在项目 A 里看一眼、回全部列表点+」
-   * 意外把新对话塞进 A。
+   * 🔴 2026-11-23 用户裁决:**顶部新建一律是日常会话**,不再沿用「上次放入的项目」。
+   *    想去某个项目里建,走项目行/抽屉里的「+」(那里会显式带上该项目)。
+   *    此前的 rememberedWorkspace 记忆会让顶部新建悄悄落进上一次的项目,
+   *    用户看到「加入项目」被预填,不明白它从哪来。
    */
   protected openNewChatSheet(): void {
-    const remembered = this.rememberedWorkspace();
-    this.pendingWorkspace.set(remembered && this.workspaces.byId(remembered) ? remembered : null);
+    this.pendingWorkspace.set(null);
     this.sheetOpen.set(true);
   }
 

+ 68 - 43
src/app/mobile/pages/mine/mine.ts

@@ -13,7 +13,7 @@ import { ThemeService } from '../../../ui/theme/theme.service';
 import { MAppBarComponent } from '../../components/m-app-bar/m-app-bar';
 import { MAvatarComponent } from '../../components/m-avatar/m-avatar';
 import { MDrawerComponent } from '../../components/m-drawer/m-drawer';
-import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
+import { MConfirmComponent } from '../../components/m-confirm/m-confirm';
 
 /**
  * 我的 / 设置(Demo 16)
@@ -27,7 +27,7 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
 @Component({
   selector: 'app-mb-mine-page',
   changeDetection: ChangeDetectionStrategy.OnPush,
-  imports: [MAppBarComponent, MAvatarComponent, MDrawerComponent, UiMDialog],
+  imports: [MAppBarComponent, MAvatarComponent, MDrawerComponent, MConfirmComponent],
   template: `
     <div class="m-page--scroll">
       <app-m-app-bar title="我的" [menu]="true" (menuTap)="drawerOpen.set(true)" />
@@ -89,7 +89,6 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
           <div class="m-row m-row--plain">
             <span class="m-row-body">
               <span class="m-row-t1">深色模式</span>
-              <span class="m-row-t2">{{ theme.isDark() ? '已开启' : '已关闭' }}</span>
             </span>
             <button
               type="button"
@@ -103,15 +102,13 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
 
           <!--
             字号(2026-11-21 用户裁决):拆成「正文大小」和「界面大小」两项。
-            原来一个滑块同时放大正文、导航标题和图标,用户只想让正文大一点时整页都变大。
+            2026-11-23 重排:说明文字从控件之间挪到底部一句脚注,
+            预览去掉背景框 —— 用户反馈卡片中间松垮、间隔不舒服。
           -->
           <div class="m-font">
-            <p id="global-font-hint" class="m-row-sub">
-              正文大小只影响对话内容;界面大小影响导航、列表与图标。图标单独限幅,不会撑满按钮。
-            </p>
             <div class="m-font-head">
-              <span>正文大小</span>
-              <span>{{ font.size() }}px</span>
+              <span class="m-row-t1">正文大小</span>
+              <span class="m-font-val">{{ font.size() }}px</span>
             </div>
             <input
               class="m-slider"
@@ -124,13 +121,14 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
               aria-describedby="global-font-hint"
               (input)="onFont($event)"
             />
+            <!-- 轻量预览:不加背景框,所见即所得 -->
             <p class="m-font-preview" [style.font-size.px]="font.size()" aria-hidden="true">
-              预览:这段文字的显示大小与你设置的一致。
+              预览:对话正文效果
             </p>
 
             <div class="m-font-head m-font-head--ui">
-              <span>界面大小</span>
-              <span>{{ uiScaleLabel() }}</span>
+              <span class="m-row-t1">界面大小</span>
+              <span class="m-font-val">{{ uiScaleLabel() }}</span>
             </div>
             <div class="m-ui-scale" role="radiogroup" aria-label="界面大小">
               @for (opt of uiScaleOptions; track opt.value) {
@@ -145,6 +143,9 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
                 </button>
               }
             </div>
+            <p id="global-font-hint" class="m-font-hint">
+              正文大小影响对话内容;界面大小影响导航与图标。
+            </p>
           </div>
         </div>
       </section>
@@ -180,27 +181,26 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
               <i [class]="copied() ? 'fa-solid fa-check' : 'fa-solid fa-copy'" aria-hidden="true"></i>
             </button>
           </li>
-          <li>
-            <button type="button" class="m-row" (click)="logoutOpen.set(true)">
-              <span class="m-row-body">
-                <span class="m-row-t1 m-danger">退出登录</span>
-              </span>
-              <i class="fa-solid fa-chevron-right m-chev" aria-hidden="true"></i>
-            </button>
-          </li>
         </ul>
       </section>
+
+      <!-- 退出登录:独立成卡、居中红字(2026-11-23,微信/美团惯例) -->
+      <section class="m-section">
+        <button type="button" class="m-logout" (click)="logoutOpen.set(true)">退出登录</button>
+      </section>
       </div>
     </div>
 
     <app-m-drawer [activeSessionId]="activeSessionId()"
       [open]="drawerOpen()" (close)="drawerOpen.set(false)" (newChat)="newChat()" (newChatWithWs)="onNewChatIn($event)" />
 
-    <ui-m-dialog
+    <!-- 确认弹窗换成业务组件:48px 按钮 + 危险红(2026-11-23) -->
+    <app-m-confirm
       [(open)]="logoutOpen"
       title="退出登录"
-      message="退出后需要重新登录才能继续使用。"
-      confirmText="确认退出"
+      icon="fa-solid fa-arrow-right-from-bracket"
+      [danger]="true"
+      confirmText="退出登录"
       (confirm)="logout()"
     />
   `,
@@ -296,9 +296,9 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
         cursor: pointer;
       }
       .m-row--plain {
-        min-height: 44px;
+        min-height: 56px;
         padding: var(--sp-3) 0;
-        margin-top: var(--sp-3);
+        margin-top: var(--sp-2);
         border-top: 1px solid var(--edge);
         cursor: default;
       }
@@ -335,8 +335,9 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
         background: var(--surface);
       }
       .m-token-value {
-        word-break: break-all;
-        white-space: normal;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
       }
       .m-token-btn {
         display: grid;
@@ -358,8 +359,20 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
         opacity: 0.35;
         cursor: not-allowed;
       }
-      .m-danger {
+      .m-logout {
+        width: 100%;
+        min-height: 52px;
+        border: 1px solid var(--edge);
+        border-radius: var(--r-lg);
+        background: var(--surface);
         color: var(--danger);
+        font: inherit;
+        font-size: var(--fs-15);
+        font-weight: 600;
+        cursor: pointer;
+      }
+      .m-logout:active {
+        background: var(--surface-hover);
       }
       .m-chev {
         color: var(--muted);
@@ -372,7 +385,7 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
       }
       .m-palette-grid {
         display: grid;
-        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
+        grid-template-columns: repeat(4, 1fr);
         gap: var(--sp-2);
       }
       .m-palette {
@@ -381,13 +394,14 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
         flex-direction: column;
         align-items: center;
         gap: var(--sp-1);
-        padding: var(--sp-2);
+        padding: var(--sp-2) var(--sp-1);
         border: 1.5px solid var(--edge);
         border-radius: var(--r-md);
         background: var(--surface);
         color: var(--ink-2);
         font: inherit;
-        font-size: var(--fs-12);
+        font-size: var(--fs-11);
+        white-space: nowrap;
         cursor: pointer;
       }
       .m-palette.on {
@@ -398,7 +412,7 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
       .m-swatch {
         display: flex;
         width: 100%;
-        height: 44px;
+        height: 32px;
         border: 1px solid var(--edge);
         border-radius: var(--r-sm);
         overflow: hidden;
@@ -460,25 +474,33 @@ import { UiMDialog } from '../../../ui/mobile/components/dialog/dialog';
         background: var(--primary-content);
       }
       .m-font {
-        margin-top: var(--sp-3);
+        margin-top: var(--sp-2);
+        padding-top: var(--sp-3);
+        border-top: 1px solid var(--edge);
       }
       .m-font-head {
         display: flex;
+        align-items: baseline;
         justify-content: space-between;
-        color: var(--ink-2);
+      }
+      .m-font-val {
+        color: var(--muted);
         font-size: var(--fs-13);
       }
       .m-font-head--ui {
-        margin-top: var(--sp-4);
+        margin-top: var(--sp-3);
       }
-      /* 正文预览:直接用当前正文档位渲染,所见即所得 */
+      /* 轻量预览:无背景框,直接用当前档位渲染一行样例 */
       .m-font-preview {
-        margin: var(--sp-2) 0 0;
-        padding: var(--sp-3);
-        border-radius: var(--r-sm);
-        background: var(--canvas);
-        color: var(--ink-2);
-        line-height: 1.6;
+        margin: var(--sp-1) 0 0;
+        color: var(--muted);
+        line-height: 1.5;
+      }
+      .m-font-hint {
+        margin: var(--sp-3) 0 0;
+        color: var(--faint);
+        font-size: var(--fs-12);
+        line-height: 1.5;
       }
       /* 界面大小:三档分段(与正文滑块区分开,避免两套控制混在一起) */
       .m-ui-scale {
@@ -600,7 +622,10 @@ export class MbMinePage {
   protected notifyStateText(): string {
     const g = this.notifyGranted();
     if (g === null) return '检查中…';
-    return g ? '系统通知已开启 · 查看接收设置' : '未开启 · 点此设置';
+    if (!g) return '未开启 · 点此设置';
+    // 已开通知时进一步告知还有几项后台设置没配好,用户不用点进去才知道
+    const left = this.notificationSetup.remaining();
+    return left > 0 ? `系统通知已开启 · ${left} 项后台设置待处理` : '系统通知已开启 · 全部就绪';
   }
 
   /**

+ 34 - 12
src/app/mobile/shell/mobile-shell.ts

@@ -16,7 +16,10 @@ import { PromptModalComponent } from '../../components/domain/prompt-modal/promp
 interface TabDef {
   path: string;
   label: string;
+  /** 未选中用的**描边**图标 */
   icon: string;
+  /** 选中用的**实心**图标(用字形粗细表达选中,而不是靠文字加粗) */
+  iconActive: string;
 }
 
 /**
@@ -57,7 +60,7 @@ interface TabDef {
           (click)="go(tab.path)"
         >
           <span class="m-tab-icon">
-            <i [class]="tab.icon" aria-hidden="true"></i>
+            <i [class]="activeIndex() === i ? tab.iconActive : tab.icon" aria-hidden="true"></i>
             @if (tab.path === '/messages' && totalUnread() > 0) {
               <span class="m-tab-badge">{{ totalUnread() > 99 ? '99+' : totalUnread() }}</span>
             }
@@ -67,7 +70,7 @@ interface TabDef {
       }
     </nav>
 
-    <!-- 全局输入弹窗(新建/重命名工作区等):与桌面同一服务,移动端此前未挂载 -->
+    <!-- 全局输入弹窗(新建/重命名项目等):与桌面同一服务,移动端此前未挂载 -->
     <app-prompt-modal />
 
     @if (wideViewport()) {
@@ -152,35 +155,54 @@ interface TabDef {
         backdrop-filter: blur(16px);
         border-top: 1px solid var(--edge);
       }
+      /*
+       * 底栏单项(2026-11-23 重构 + 三次调整):
+       *   · 选中态**只靠图标**表达:描边 → 实心 + 主色,不再有胶囊背景(用户裁决)
+       *   · 文字 10.5px 且选中不改字重 —— 粗细交给图标,避免文字跳动
+       *   · 图标 18px 封顶,不随界面档位继续放大
+       */
       .m-tab {
         flex: 1;
         min-width: 0;
         min-height: var(--touch-min);
-        padding: 2px 0;
-        line-height: 1.25;
+        padding: 0;
+        line-height: 1.2;
         box-sizing: border-box;
         display: flex;
         flex-direction: column;
         align-items: center;
         justify-content: center;
-        gap: var(--sp-1);
+        gap: 2px;
+        padding-top: var(--sp-2);
         border: 0;
         background: none;
         color: var(--muted);
         font: inherit;
-        font-size: var(--fs-12);
+        font-size: var(--fs-9);
+        font-weight: 400;
+        letter-spacing: .01em;
         cursor: pointer;
         transition: color var(--motion-fast) var(--ease-standard);
       }
       .m-tab.on {
         color: var(--primary);
-        font-weight: 600;
       }
+      /*
+       * 图标区(2026-11-23 三次调整):
+       *   ① 与顶部分隔线之间留出呼吸空间(padding-top),图标不再贴着边线
+       *   ② **选中不换背景** —— 由 iconActive 的实心字形 + 主色承担选中表达
+       *   ③ 图标 18px、文字 10.5px,整体比美团那种还轻一档
+       */
       .m-tab-icon {
         position: relative;
         display: inline-grid;
         place-items: center;
-        font-size: var(--fs-icon-lg);
+        min-width: 34px;
+        height: 22px;
+        padding: 0 var(--sp-2);
+        box-sizing: border-box;
+        border-radius: var(--r-tag);
+        font-size: 18px;
         line-height: 1;
       }
       .m-tab-badge {
@@ -297,10 +319,10 @@ export class MobileShellComponent implements OnDestroy {
 
   /** 4 个 Tab(顺序即底栏顺序;与 Demo TAB_PAGES 一致) */
   protected readonly tabs: TabDef[] = [
-    { path: '/messages', label: '会话', icon: 'fa-solid fa-comment' },
-    { path: '/contacts', label: '通讯录', icon: 'fa-solid fa-user-group' },
-    { path: '/workbench', label: '工作台', icon: 'fa-solid fa-table-cells-large' },
-    { path: '/mine', label: '我的', icon: 'fa-solid fa-user' },
+    { path: '/messages', label: '会话', icon: 'fa-regular fa-comment', iconActive: 'fa-solid fa-comment' },
+    { path: '/contacts', label: '通讯录', icon: 'fa-regular fa-address-book', iconActive: 'fa-solid fa-address-book' },
+    { path: '/workbench', label: '工作台', icon: 'fa-regular fa-rectangle-list', iconActive: 'fa-solid fa-rectangle-list' },
+    { path: '/mine', label: '我的', icon: 'fa-regular fa-circle-user', iconActive: 'fa-solid fa-circle-user' },
   ];
 
   /** 底栏会话 Tab 未读总数(UnreadService 唯一来源) */

+ 2 - 1
src/styles.scss

@@ -77,7 +77,8 @@ body:has(.pg-root, .m-project-root) .m-tabbar { display: none; }
   --fs-16: calc(16px * var(--ui-scale, 1)); --fs-17: calc(17px * var(--ui-scale, 1)); --fs-18: calc(18px * var(--ui-scale, 1)); --fs-20: calc(20px * var(--ui-scale, 1));
   --fs-22: calc(22px * var(--ui-scale, 1)); --fs-24: calc(24px * var(--ui-scale, 1)); --fs-26: calc(28px * var(--ui-scale, 1)); --fs-42: calc(36px * var(--ui-scale, 1));
   --mob-navbar-h: clamp(52px, calc(60px * var(--ui-scale, 1)), 68px);
-  --mob-tabbar-h: clamp(56px, calc(64px * var(--ui-scale, 1)), 72px);
+  /* 2026-11-23 底栏瘦身:基准 64→58,上限 72→62,视觉更利落 */
+  --mob-tabbar-h: clamp(52px, calc(58px * var(--ui-scale, 1)), 62px);
 }
 /* 图标专用比例(界面档位派生,上下限收窄)。组件里所有 FontAwesome 字号引用它。 */
 :root { --fs-icon: calc(17px * var(--icon-scale, 1)); --fs-icon-lg: calc(20px * var(--icon-scale, 1)); }