    :root {
      color-scheme: light dark;
      --bg: #f8fafc;
      --surface: #ffffff;
      --surface-2: #f8fafc;
      --subtle: #f1f5f9;
      --subtle-hover: #e2e8f0;
      --border: #e2e8f0;
      --hairline: #f1f5f9;
      --text: #0f172a;
      --text-secondary: #475569;
      --muted: #64748b;
      --primary: #2563eb;
      --primary-hover: #1d4ed8;
      --primary-soft: #eff6ff;
      --green: #10b981;
      --green-soft: #ecfdf5;
      --amber: #f59e0b;
      --amber-soft: #fffbeb;
      --red: #ef4444;
      --red-soft: #fef2f2;
      --code-bg: #0f172a;
      --mono: "SF Mono", Menlo, Monaco, Consolas, monospace;
      --safe-top: env(safe-area-inset-top, 0px);
      --safe-bottom: env(safe-area-inset-bottom, 0px);
    }

    :root[data-theme="dark"] {
      --bg: #0b1120;
      --surface: #0f172a;
      --surface-2: #1e293b;
      --subtle: #1e293b;
      --subtle-hover: #334155;
      --border: #334155;
      --hairline: #1e293b;
      --text: #f1f5f9;
      --text-secondary: #cbd5e1;
      --muted: #94a3b8;
      --primary: #3b82f6;
      --primary-hover: #60a5fa;
      --primary-soft: rgba(59, 130, 246, 0.16);
      --green: #10b981;
      --green-soft: rgba(16, 185, 129, 0.16);
      --amber: #f59e0b;
      --amber-soft: rgba(245, 158, 11, 0.16);
      --red: #f87171;
      --red-soft: rgba(239, 68, 68, 0.16);
      --code-bg: #020617;
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) {
        --bg: #0b1120;
        --surface: #0f172a;
        --surface-2: #1e293b;
        --subtle: #1e293b;
        --subtle-hover: #334155;
        --border: #334155;
        --hairline: #1e293b;
        --text: #f1f5f9;
        --text-secondary: #cbd5e1;
        --muted: #94a3b8;
        --primary: #3b82f6;
        --primary-hover: #60a5fa;
        --primary-soft: rgba(59, 130, 246, 0.16);
        --green: #10b981;
        --green-soft: rgba(16, 185, 129, 0.16);
        --amber: #f59e0b;
        --amber-soft: rgba(245, 158, 11, 0.16);
        --red: #f87171;
        --red-soft: rgba(239, 68, 68, 0.16);
        --code-bg: #020617;
      }
    }

    * {
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
    }

    html,
    body {
      margin: 0;
      padding: 0;
      width: 100%;
      max-width: 100vw;
      height: 100%;
      overflow: hidden;
      background: #cbd5e1;
      color: var(--text);
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
      -webkit-font-smoothing: antialiased;
    }

    /* 顶部预览/布局切换器（电脑端可在「📱 iPhone 手机视图」与「🖥️ 电脑双栏同屏视图」间一键切换；真机手机端自动隐藏） */
    .preview-toolbar {
      position: fixed;
      top: 14px;
      right: 18px;
      z-index: 9999;
      display: flex;
      align-items: center;
      gap: 6px;
      background: rgba(15, 23, 42, 0.9);
      backdrop-filter: blur(12px);
      color: #fff;
      padding: 5px 8px 5px 14px;
      border-radius: 999px;
      font-size: 12px;
      box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
    }

    .preview-toolbar button {
      border: none;
      background: transparent;
      color: #cbd5e1;
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s;
    }

    .preview-toolbar button.active {
      background: #ffffff;
      color: #0f172a;
    }

    @media (max-width: 768px) {
      .preview-toolbar {
        display: none;
      }

      html,
      body {
        background: var(--surface);
      }
    }

    /* ==================== 整体容器：支持「iPhone 单栏」与「桌面双栏」无缝切换 ==================== */
    .app-shell {
      width: 100%;
      max-width: 100vw;
      height: 100dvh;
      background: var(--surface);
      display: flex;
      position: relative;
      overflow: hidden;
      margin: 0 auto;
    }

    @media (min-width: 769px) {
      body.PhoneFrameMode .app-shell {
        max-width: 402px;
        height: 856px;
        margin: calc((100dvh - 856px) / 2) auto;
        border-radius: 46px;
        border: 11px solid #0f172a;
        box-shadow: 0 30px 80px -15px rgba(15, 23, 42, 0.45);
      }
    }

    .primary-pane {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      background: var(--surface);
      min-width: 0;
      overflow: hidden;
      position: relative;
      z-index: 10;
    }

    @media (min-width: 769px) {
      body.DesktopSplitMode .primary-pane {
        width: 390px;
        flex-shrink: 0;
        border-right: 1px solid var(--border);
      }
    }

    .chat-fullscreen {
      position: absolute;
      inset: 0;
      background: var(--surface);
      z-index: 45;
      display: flex;
      flex-direction: column;
      transform: translateX(100%);
      transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
      min-width: 0;
      pointer-events: none;
    }

    .chat-fullscreen.open {
      transform: translateX(0);
      pointer-events: auto;
    }

    @media (min-width: 769px) {
      body.DesktopSplitMode .chat-fullscreen {
        position: relative;
        inset: auto;
        flex: 1;
        transform: none !important;
        transition: none;
        z-index: 10;
        pointer-events: auto;
      }

      body.DesktopSplitMode .back-btn {
        display: none !important;
      }
    }

    .desktop-stage-tabs {
      display: none;
      background: var(--subtle);
      padding: 3px;
      border-radius: 10px;
      gap: 2px;
    }

    @media (min-width: 769px) {
      body.DesktopSplitMode .desktop-stage-tabs {
        display: inline-flex;
      }

      body.DesktopSplitMode .mobile-only-file-btn {
        display: none !important;
      }
    }

    .stage-seg-btn {
      border: none;
      background: transparent;
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 600;
      padding: 5px 11px;
      border-radius: 8px;
      cursor: pointer;
    }

    .stage-seg-btn.active {
      background: var(--surface);
      color: var(--primary);
      box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    }

    /* ==================== 1. 唯一极简顶栏 ==================== */
    .top-bar {
      height: 54px;
      padding: 0 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      background: rgba(255, 255, 255, 0.94);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--hairline);
      flex-shrink: 0;
      overflow: hidden;
    }

    .top-bar-left {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      flex: 1;
      overflow: hidden;
    }

    .host-switcher-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--subtle);
      border: 1px solid transparent;
      padding: 6px 11px;
      border-radius: 999px;
      font-size: 13.5px;
      font-weight: 700;
      color: var(--text);
      cursor: pointer;
      transition: all 0.15s;
      min-width: 0;
      flex: 0 1 auto;
      max-width: 100%;
      overflow: hidden;
    }

    .host-switcher-btn:hover {
      background: var(--subtle-hover);
    }

    .host-switcher-btn:active {
      transform: scale(0.97);
    }

    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--green);
      box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
      flex-shrink: 0;
    }

    .status-dot.offline {
      background: #94a3b8;
      box-shadow: none;
    }

    .host-switcher-name {
      min-width: 0;
      flex: 1 1 auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .host-switcher-caret {
      font-size: 11px;
      color: var(--text-secondary);
      flex-shrink: 0;
    }

    .new-chat-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: var(--primary);
      color: #fff;
      border: none;
      padding: 7px 12px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
      transition: all 0.15s;
      flex-shrink: 0;
      white-space: nowrap;
    }

    .new-chat-btn:hover {
      background: var(--primary-hover);
    }

    .new-chat-btn:active {
      transform: scale(0.96);
    }

    /* ==================== 2. 搜索栏 + 智能筛选胶囊条（严格锁死宽度） ==================== */
    .search-and-filter {
      background: var(--surface);
      border-bottom: 1px solid var(--hairline);
      flex-shrink: 0;
      width: 100%;
      max-width: 100%;
      overflow: hidden;
    }

    .search-box-wrap {
      padding: 8px 14px 4px;
    }

    .search-box {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--subtle);
      border-radius: 11px;
      padding: 7px 11px;
      border: 1px solid transparent;
      transition: all 0.15s;
    }

    .search-box:focus-within {
      background: var(--surface);
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

    .search-box input {
      border: none;
      background: transparent;
      outline: none;
      width: 100%;
      font-size: 15px;
      color: var(--text);
    }

    .search-clear {
      border: none;
      background: #cbd5e1;
      color: #fff;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      font-size: 10px;
      display: none;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      padding: 0;
      flex-shrink: 0;
    }

    .filter-strip {
      width: 100%;
      max-width: 100%;
      overflow-x: auto;
      overflow-y: hidden;
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 8px 14px 10px;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }

    .filter-strip::-webkit-scrollbar {
      display: none;
    }

    .filter-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 5px 11px;
      border-radius: 999px;
      font-size: 12.5px;
      font-weight: 500;
      color: var(--text-secondary);
      background: var(--subtle);
      border: none;
      white-space: nowrap;
      flex-shrink: 0;
      cursor: pointer;
      transition: all 0.15s;
    }

    .filter-pill.active {
      background: var(--text);
      color: var(--surface);
      font-weight: 600;
    }

    .filter-pill.smart-pill {
      background: #eff6ff;
      color: #1d4ed8;
    }

    .filter-pill.smart-pill.active {
      background: var(--primary);
      color: #fff;
    }

    .filter-pill .count {
      font-size: 11px;
      opacity: 0.75;
    }

    /* ==================== 3. 跨设备实时动态置顶条 ==================== */
    .live-activity-bar {
      margin: 10px 14px 4px;
      padding: 11px 13px;
      border-radius: 14px;
      background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
      border: 1px solid #fde68a;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
    }

    .live-activity-left {
      min-width: 0;
      flex: 1;
      cursor: pointer;
    }

    .live-activity-title {
      font-size: 13px;
      font-weight: 700;
      color: #92400e;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .live-activity-desc {
      font-size: 12px;
      color: #b45309;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-top: 2px;
    }

    .live-activity-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .mini-approve-btn {
      border: none;
      background: #d97706;
      color: #fff;
      font-size: 12px;
      font-weight: 600;
      padding: 6px 11px;
      border-radius: 8px;
      cursor: pointer;
    }

    .mini-approve-btn.ghost {
      background: rgba(255, 255, 255, 0.75);
      color: #92400e;
      border: 1px solid #fcd34d;
    }

    /* ==================== 4. 微信 / Claude 风格极简通栏列表 ==================== */
    .pull-refresh-slot {
      height: 0;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--subtle);
      border-bottom: 0 solid var(--border);
      flex-shrink: 0;
      user-select: none;
      -webkit-user-select: none;
    }

    .pull-refresh-slot.active {
      border-bottom-width: 1px;
    }

    .pull-refresh-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 14px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      color: var(--text-secondary);
      background: var(--surface);
      border: 1px solid var(--border);
      box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
      transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
      white-space: nowrap;
      max-width: 92%;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .pull-refresh-pill.stage-1 {
      color: var(--primary);
      border-color: rgba(37, 99, 235, 0.35);
      background: var(--primary-soft);
    }

    .pull-refresh-pill.stage-2 {
      color: #ffffff;
      background: linear-gradient(135deg, #2563eb, #4f46e5);
      border-color: #2563eb;
      box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
      transform: scale(1.03);
    }

    .main-viewport {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      background: var(--surface);
      overscroll-behavior-y: contain;
    }

    .file-loading-dot {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: 2.5px solid #cbd5e1;
      border-top-color: var(--primary);
      animation: fileSpin 0.8s linear infinite;
    }

    @keyframes fileSpin {
      to {
        transform: rotate(360deg);
      }
    }

    .session-list {
      display: flex;
      flex-direction: column;
      width: 100%;
    }

    .session-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 14px 12px 14px 16px;
      border-bottom: 1px solid var(--hairline);
      border-left: 4px solid transparent;
      background: var(--surface);
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
      width: 100%;
      min-width: 0;
    }

    .session-row.pinned-row {
      background: var(--surface-2);
    }

    .session-row:hover {
      background: var(--subtle);
    }

    /* 整行状态高亮：绿=运行中，蓝=已出结论(未读)，黄=待授权，橙=异常中断 */
    .session-row.row-state-running {
      background: linear-gradient(90deg, #ecfdf5 0%, #f0fdf4 100%);
      border-left-color: #10b981;
      border-bottom-color: #bbf7d0;
    }

    .session-row.row-state-running:hover {
      background: #dcfce7;
    }

    .session-row.row-state-running .session-title {
      color: #065f46;
      font-weight: 700;
    }

    .session-row.row-state-running .session-preview-text {
      color: #047857;
      font-weight: 500;
    }

    .session-row.row-state-conclusion {
      background: linear-gradient(90deg, #eff6ff 0%, #dbeafe 100%);
      border-left-color: #2563eb;
      border-bottom-color: #bfdbfe;
    }

    .session-row.row-state-conclusion:hover {
      background: #dbeafe;
    }

    .session-row.row-state-conclusion .session-title {
      color: #1e3a8a;
      font-weight: 700;
    }

    .session-row.row-state-conclusion .session-preview-text {
      color: #1d4ed8;
      font-weight: 500;
    }

    .session-row.row-state-approval {
      background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
      border-left-color: #f59e0b;
      border-bottom-color: #fde68a;
    }

    .session-row.row-state-approval:hover {
      background: #fef3c7;
    }

    .session-row.row-state-approval .session-title {
      color: #92400e;
      font-weight: 700;
    }

    .session-row.row-state-approval .session-preview-text {
      color: #b45309;
      font-weight: 500;
    }

    .session-row.row-state-interrupted {
      background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
      border-left-color: #ea580c;
      border-bottom-color: #fed7aa;
    }

    @media (min-width: 769px) {
      body.DesktopSplitMode .session-row.selected-desktop {
        box-shadow: inset 0 0 0 1.5px var(--primary);
      }
    }

    .session-main {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

    .session-top-line {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-width: 0;
    }

    .session-title-wrap {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      flex: 1;
    }

    .unread-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--primary);
      flex-shrink: 0;
    }

    .session-group-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 16px 6px;
      font-size: 11.5px;
      font-weight: 700;
      letter-spacing: 0.02em;
      color: var(--muted);
      background: var(--bg);
      border-bottom: 1px solid var(--hairline);
      user-select: none;
    }

    .session-group-header.pinned-group-header {
      color: var(--primary);
      background: var(--primary-soft);
    }

    .session-group-count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      background: rgba(37, 99, 235, 0.14);
      color: var(--primary);
    }

    .pin-tag {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      padding: 1px 6px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.4;
      background: rgba(37, 99, 235, 0.12);
      color: var(--primary);
      flex-shrink: 0;
    }

    .session-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .session-right-meta {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .session-time {
      font-size: 12px;
      color: var(--muted);
    }

    .badge-running {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      font-weight: 700;
      color: #ffffff;
      background: #10b981;
      padding: 2px 8px;
      border-radius: 999px;
      box-shadow: 0 1px 4px rgba(16, 185, 129, 0.25);
    }

    .badge-conclusion {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      font-weight: 700;
      color: #ffffff;
      background: #2563eb;
      padding: 2px 8px;
      border-radius: 999px;
      box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25);
    }

    .badge-approval {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      font-weight: 700;
      color: #ffffff;
      background: #d97706;
      padding: 2px 8px;
      border-radius: 999px;
      box-shadow: 0 1px 4px rgba(217, 119, 6, 0.25);
    }

    .badge-interrupted {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      font-weight: 700;
      color: #c2410c;
      background: #ffedd5;
      border: 1px solid #fdba74;
      padding: 2px 8px;
      border-radius: 999px;
    }

    .session-sub-line {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 13px;
      color: #64748b;
      min-width: 0;
    }

    .harness-icon-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      line-height: 1;
    }

    .harness-icon-badge svg {
      display: block;
      width: 100%;
      height: 100%;
    }

    .harness-icon-badge.row {
      width: 17px;
      height: 17px;
    }

    .harness-icon-badge.pill {
      width: 14px;
      height: 14px;
    }

    .harness-icon-badge.chip {
      width: 15px;
      height: 15px;
    }

    .harness-icon-badge.inline {
      width: 13px;
      height: 13px;
      vertical-align: -2px;
    }

    .host-mini-tag {
      display: inline-block;
      font-size: 11px;
      font-weight: 600;
      color: var(--primary);
      background: var(--primary-soft);
      padding: 1px 6px;
      border-radius: 5px;
      flex-shrink: 0;
      max-width: 96px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .project-mini-tag {
      display: inline-block;
      font-size: 11.5px;
      font-weight: 500;
      color: var(--text-secondary);
      background: var(--subtle);
      padding: 1.5px 6px;
      border-radius: 5px;
      flex-shrink: 0;
      max-width: 112px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }

    .harness-mini-tag {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      font-size: 11px;
      font-weight: 600;
      padding: 1.5px 5.5px;
      border-radius: 5px;
      flex-shrink: 0;
      white-space: nowrap;
      color: #4338ca;
      background: #e0e7ff;
    }

    .harness-mini-tag.agy {
      color: #4338ca;
      background: #e0e7ff;
    }

    .session-preview-text {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex: 1;
      min-width: 0;
    }

    .row-more-btn {
      width: 34px;
      height: 34px;
      border-radius: 8px;
      border: none;
      background: transparent;
      color: var(--muted);
      font-size: 17px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
    }

    .row-more-btn:hover {
      background: var(--subtle);
      color: var(--text);
    }

    /* ==================== 5. 底部 3-Tab 导航栏 ==================== */
    .bottom-tabs {
      height: calc(56px + var(--safe-bottom));
      padding-bottom: var(--safe-bottom);
      background: rgba(255, 255, 255, 0.96);
      backdrop-filter: blur(16px);
      border-top: 1px solid var(--border);
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      flex-shrink: 0;
    }

    .tab-btn {
      border: none;
      background: transparent;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      transition: color 0.15s;
    }

    .tab-btn .icon {
      font-size: 18px;
      line-height: 1;
    }

    .tab-btn.active {
      color: var(--primary);
    }

    /* ==================== 6. 聊天视图 ==================== */
    .chat-navbar {
      height: 54px;
      padding: 0 12px;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-shrink: 0;
    }

    .back-btn {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      border: none;
      background: transparent;
      color: var(--primary);
      font-size: 15px;
      font-weight: 600;
      padding: 8px 6px;
      cursor: pointer;
      flex-shrink: 0;
    }

    .chat-nav-center {
      flex: 1;
      min-width: 0;
    }

    .chat-nav-title {
      font-size: 14.5px;
      font-weight: 700;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .chat-nav-sub {
      font-size: 11.5px;
      color: var(--text-secondary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .chat-nav-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .icon-pill-btn {
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text-secondary);
      border-radius: 999px;
      padding: 5px 10px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
      -webkit-touch-callout: none;
    }

    .icon-pill-btn:hover {
      background: var(--subtle);
    }

    .chat-switch-alert {
      background: #fffbeb;
      border-bottom: 1px solid #fde68a;
      padding: 6px 12px;
      font-size: 12px;
      color: #92400e;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-shrink: 0;
    }

    .chat-messages {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 18px 16px;
      display: flex;
      flex-direction: column;
      gap: 18px;
      touch-action: pan-y;
      overscroll-behavior-y: contain;
      transform: translateZ(0);
      position: relative;
    }

    .chat-messages>* {
      flex-shrink: 0;
    }

    .chat-messages pre,
    .chat-messages table {
      touch-action: pan-x pan-y;
    }

    /* 往上翻旧消息时不强行拉回底部，只浮出「最新消息」提示 */
    #scrollBottomBtn {
      position: absolute;
      right: 16px;
      bottom: calc(96px + var(--safe-bottom));
      z-index: 50;
      align-items: center;
      gap: 4px;
      padding: 8px 14px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.97);
      backdrop-filter: blur(12px);
      box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
      font-size: 12.5px;
      font-weight: 700;
      color: var(--primary);
      cursor: pointer;
      transition: opacity 0.16s ease, transform 0.16s ease;
    }

    #scrollBottomBtn:active {
      transform: scale(0.96);
    }

    .bubble {
      max-width: 85%;
      padding: 11px 16px;
      border-radius: 20px;
      font-size: 15px;
      line-height: 1.65;
      word-break: break-word;
    }

    .bubble.user {
      align-self: flex-end;
      background: var(--primary);
      color: #fff;
      border-bottom-right-radius: 6px;
      white-space: normal;
      display: flex;
      flex-direction: column;
      gap: 8px;
      box-shadow: 0 2px 8px rgba(37, 99, 235, 0.14);
    }

    .user-bubble-text {
      white-space: pre-wrap;
    }

    .user-msg-media-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 2px;
    }

    .user-msg-img-card {
      width: 122px;
      height: 162px;
      border-radius: 12px;
      overflow: hidden;
      position: relative;
      background: rgba(15, 23, 42, 0.28);
      border: 1px solid rgba(255, 255, 255, 0.28);
      cursor: pointer;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.12s ease, opacity 0.12s ease;
    }

    .user-msg-media-grid .user-msg-img-card:only-child {
      width: 164px;
      height: 214px;
    }

    .user-msg-img-card:active {
      transform: scale(0.97);
    }

    .user-msg-thumb {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      -webkit-user-select: none;
      user-select: none;
    }

    .user-msg-img-placeholder {
      font-size: 11.5px;
      color: rgba(255, 255, 255, 0.85);
      text-align: center;
      padding: 8px;
      line-height: 1.4;
    }

    .user-msg-img-badge {
      position: absolute;
      right: 6px;
      bottom: 6px;
      max-width: calc(100% - 12px);
      padding: 2px 7px;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.68);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      color: #ffffff;
      font-size: 10.5px;
      font-weight: 600;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      pointer-events: none;
    }

    .bubble.assistant {
      align-self: stretch;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      padding: 2px 0;
      background: transparent;
      color: var(--text);
      border: none;
      border-radius: 0;
      box-shadow: none;
      font-size: 15px;
      line-height: 1.72;
    }

    /* AI 回复里的简单 Markdown 排版（标题/列表/引用/代码/链接） */
    .md-body {
      white-space: normal;
    }

    .md-body p {
      margin: 0 0 9px;
    }

    .md-body p:last-child {
      margin-bottom: 0;
    }

    .md-body .md-h1 {
      font-size: 16.5px;
      font-weight: 700;
      margin: 14px 0 7px;
      line-height: 1.4;
    }

    .md-body .md-h2 {
      font-size: 15.5px;
      font-weight: 700;
      margin: 13px 0 6px;
      line-height: 1.4;
    }

    .md-body .md-h3 {
      font-size: 15px;
      font-weight: 700;
      margin: 12px 0 5px;
      line-height: 1.4;
    }

    .md-body .md-h4,
    .md-body .md-h5,
    .md-body .md-h6 {
      font-size: 14.5px;
      font-weight: 700;
      margin: 10px 0 4px;
    }

    .md-body ul,
    .md-body ol {
      margin: 4px 0 10px;
      padding-left: 22px;
    }

    .md-body li {
      margin: 3px 0;
    }

    .md-body blockquote {
      margin: 10px 0;
      padding: 4px 10px;
      border-left: 3px solid #bfdbfe;
      background: var(--subtle);
      color: var(--text-secondary);
      border-radius: 0 8px 8px 0;
    }

    .md-body hr {
      border: none;
      border-top: 1px solid var(--border);
      margin: 14px 0;
    }

    .md-body a {
      color: var(--primary);
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .md-body code {
      background: var(--subtle);
      padding: 1.5px 5px;
      border-radius: 4px;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 12.5px;
      color: var(--text);
      border: 1px solid var(--border);
    }

    .md-body pre code {
      background: none;
      padding: 0;
      color: inherit;
      font-size: inherit;
      border: none;
    }

    .md-file-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      box-sizing: border-box;
      background: var(--primary-soft);
      color: var(--primary);
      border: 1px solid rgba(59, 130, 246, 0.32);
      border-radius: 6px;
      padding: 2px 8px;
      margin: 1px 2px;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      vertical-align: middle;
      line-height: 1.4;
      max-width: 100%;
      min-width: 0;
      transition: all 0.15s ease;
    }

    .md-file-chip-icon {
      flex-shrink: 0;
      line-height: 1;
    }

    .md-file-chip-label {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .md-file-chip:hover {
      background: rgba(59, 130, 246, 0.22);
    }

    .md-file-chip:active {
      transform: scale(0.97);
    }

    .md-inline-img-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      margin: 10px 0;
      padding: 8px;
      background: var(--subtle);
      border: 1px solid var(--border);
      border-radius: 12px;
      cursor: pointer;
      overflow: hidden;
    }

    .md-inline-img,
    .saveable-preview-img {
      max-width: 100%;
      max-height: 360px;
      border-radius: 8px;
      object-fit: contain;
      display: block;
      -webkit-touch-callout: default !important;
      -webkit-user-select: none;
      user-select: none;
    }

    .file-preview-meta-bar,
    .media-toolbar-pill,
    .sheet-header,
    .back-btn {
      user-select: none;
      -webkit-user-select: none;
      -webkit-touch-callout: none;
    }

    .md-inline-img-cap {
      font-size: 12px;
      color: var(--text-secondary);
      text-align: center;
      line-height: 1.4;
    }

    .md-local-img-loader {
      font-size: 12.5px;
      font-weight: 600;
      color: var(--primary);
      padding: 10px 12px;
      text-align: center;
    }

    .md-body .code-card {
      margin: 10px 0;
    }

    .md-body .md-table-wrap {
      overflow-x: auto;
      margin: 10px 0;
      -webkit-overflow-scrolling: touch;
    }

    .md-body table {
      border-collapse: collapse;
      width: 100%;
      font-size: 13px;
    }

    .md-body th,
    .md-body td {
      border: 1px solid var(--border);
      padding: 6px 9px;
      text-align: left;
      vertical-align: top;
    }

    .md-body th {
      background: var(--subtle);
      font-weight: 600;
      white-space: nowrap;
    }

    .md-body>*:first-child {
      margin-top: 0;
    }

    .assistant-copy-footer {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      margin-top: 8px;
      padding-top: 2px;
      border-top: none;
    }

    .assistant-char-meta {
      font-size: 11.5px;
      color: var(--muted);
      user-select: none;
    }

    .assistant-copy-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text-secondary);
      font-size: 11.5px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
      user-select: none;
      -webkit-user-select: none;
    }

    .assistant-copy-btn:hover {
      border-color: #93c5fd;
      background: var(--primary-soft);
      color: var(--primary);
    }

    .assistant-copy-btn:active {
      transform: scale(0.96);
    }

    .assistant-copy-btn.copied {
      border-color: #86efac;
      background: var(--green-soft);
      color: var(--green);
    }

    .assistant-speak-btn.speaking {
      border-color: #60a5fa;
      background: var(--primary-soft);
      color: var(--primary);
    }

    .assistant-speak-sub-btn {
      padding: 3px 8px;
      font-size: 11px;
      border-style: dashed;
    }

    .thought-box {
      margin-bottom: 9px;
      background: var(--subtle);
      border-radius: 10px;
      padding: 7px 11px;
      font-size: 12.5px;
      color: var(--text-secondary);
    }

    .thought-box summary {
      cursor: pointer;
      font-weight: 600;
      user-select: none;
    }

    .tool-chips {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: 9px;
    }

    .tool-chip-details {
      background: var(--subtle);
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 11.5px;
    }

    .tool-chip-details summary {
      padding: 5px 10px;
      cursor: pointer;
      color: var(--text-secondary);
      font-weight: 600;
      user-select: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .tool-chip-output {
      padding: 8px 10px;
      background: #0f172a;
      color: #cbd5e1;
      border-top: 1px solid var(--border);
      white-space: pre-wrap;
      font-size: 11px;
      line-height: 1.45;
    }

    .quick-followups {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-top: 2px;
      padding-left: 2px;
    }

    .followup-pill {
      border: 1px solid #bfdbfe;
      background: #eff6ff;
      color: #1d4ed8;
      border-radius: 999px;
      padding: 6px 12px;
      font-size: 12.5px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.14s;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .followup-pill:hover {
      background: #dbeafe;
    }

    .followup-pill:active {
      transform: scale(0.96);
    }

    .code-card {
      margin-top: 10px;
      background: #0f172a;
      color: #f8fafc;
      border-radius: 10px;
      overflow: hidden;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 12.5px;
    }

    .code-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 12px;
      background: #1e293b;
      color: #94a3b8;
      font-size: 11.5px;
    }

    .code-copy-btn {
      border: none;
      background: rgba(255, 255, 255, 0.12);
      color: #f8fafc;
      border-radius: 5px;
      padding: 3px 8px;
      font-size: 11px;
      cursor: pointer;
    }

    .code-card pre {
      margin: 0;
      padding: 10px 12px;
      overflow-x: auto;
      line-height: 1.5;
    }

    .inline-approval-card {
      align-self: stretch;
      background: #fffbeb;
      border: 1.5px solid #fcd34d;
      border-radius: 16px;
      padding: 14px;
      box-shadow: 0 4px 14px rgba(245, 158, 11, 0.1);
    }

    .inline-approval-title {
      font-size: 13.5px;
      font-weight: 700;
      color: #92400e;
      margin-bottom: 6px;
    }

    .inline-approval-cmd {
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 12.5px;
      background: rgba(255, 255, 255, 0.8);
      padding: 8px 10px;
      border-radius: 8px;
      color: #78350f;
      margin-bottom: 10px;
    }

    .inline-approval-btns {
      display: flex;
      gap: 8px;
    }

    .inline-approval-btns button {
      flex: 1;
      padding: 9px 12px;
      border-radius: 10px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: none;
    }

    /* ==================== Antigravity IDE 变更文件与交付文档卡片（自适应浅色/深色主题） ==================== */
    .agy-files-changed-card {
      align-self: stretch;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow: hidden;
      color: var(--text);
      font-size: 13px;
      box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 14px rgba(15, 23, 42, 0.04);
    }

    .agy-file-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 9px 12px;
      border-bottom: 1px solid var(--hairline);
      font-family: inherit;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      transition: background 0.12s ease;
    }

    .agy-file-row:active {
      background: var(--subtle);
    }

    .agy-file-dot {
      color: var(--amber);
      font-size: 9px;
      flex-shrink: 0;
    }

    .agy-file-diff {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-family: var(--mono);
      font-variant-numeric: tabular-nums;
      font-size: 11.5px;
      font-weight: 600;
      flex-shrink: 0;
      min-width: 52px;
    }

    .agy-file-diff .add {
      color: #16a34a;
    }

    .agy-file-diff .del {
      color: #dc2626;
    }

    .agy-file-name {
      color: var(--text);
      font-weight: 600;
      font-size: 12.5px;
      flex: 0 1 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .agy-file-path {
      color: var(--muted);
      font-size: 11.5px;
      flex: 1 1 0;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .agy-files-changed-card.is-collapsed .agy-files-rows {
      display: none;
    }

    .agy-files-changed-card.is-collapsed .agy-files-footer {
      border-top: none;
    }

    .agy-files-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px 12px;
      background: var(--surface-2);
      border-top: 1px solid var(--hairline);
      font-size: 12px;
      font-weight: 500;
      color: var(--text-secondary);
    }

    .agy-files-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 28px;
      padding: 3px 6px;
      margin: -3px 0 -3px -6px;
      border: none;
      border-radius: 7px;
      background: transparent;
      color: var(--text-secondary);
      font: inherit;
      font-weight: 600;
      cursor: pointer;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: background 0.12s ease;
    }

    .agy-files-toggle:active {
      background: var(--subtle);
    }

    .agy-files-chevron {
      font-size: 13px;
      color: var(--muted);
      flex-shrink: 0;
      line-height: 1;
    }

    .agy-files-summary-diff {
      min-width: auto;
      font-size: 11px;
    }

    .agy-files-footer-btns {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }

    .agy-files-reject {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 7px;
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      padding: 4px 10px;
    }

    .agy-files-reject:active {
      background: var(--subtle);
    }

    .agy-files-accept {
      background: var(--primary);
      color: #fff;
      border: 1px solid transparent;
      border-radius: 7px;
      padding: 4px 11px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
    }

    .agy-files-accept:active {
      background: var(--primary-hover);
    }

    .agy-files-accept.is-reviewed {
      background: var(--green-soft);
      color: #15803d;
      border-color: rgba(16, 185, 129, 0.32);
    }

    .agy-files-accept.is-reviewed:active {
      background: var(--green-soft);
      opacity: 0.85;
    }

    .agy-approval-card {
      align-self: stretch;
      background: #18181b;
      border: 1px solid #2e2e34;
      border-radius: 12px;
      padding: 14px;
      color: #f4f4f5;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    }

    .agy-approval-header {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      font-weight: 700;
      color: #fafafa;
      margin-bottom: 4px;
    }

    .agy-approval-term-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      border-radius: 4px;
      background: #27272a;
      color: #60a5fa;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 11px;
      font-weight: 700;
      flex-shrink: 0;
    }

    .agy-approval-subtitle {
      font-size: 12px;
      color: #a1a1aa;
      margin-bottom: 10px;
    }

    .agy-approval-cmd {
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 12px;
      line-height: 1.5;
      background: #09090b;
      border: 1px solid #27272a;
      color: #e4e4e7;
      padding: 10px 12px;
      border-radius: 8px;
      margin-bottom: 10px;
      word-break: break-all;
      white-space: pre-wrap;
      max-height: 210px;
      overflow-y: auto;
    }

    .agy-approval-options {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 10px;
    }

    .agy-approval-opt {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      padding: 8px 10px;
      border-radius: 8px;
      border: 1px solid transparent;
      background: rgba(255, 255, 255, 0.02);
      color: #d4d4d8;
      font-size: 12.5px;
      line-height: 1.4;
      cursor: pointer;
      text-align: left;
      transition: all 0.12s;
    }

    .agy-approval-opt.selected {
      background: #27272a;
      border-color: #3f3f46;
      color: #ffffff;
    }

    .agy-opt-num {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 19px;
      height: 19px;
      border-radius: 5px;
      background: #27272a;
      border: 1px solid #3f3f46;
      color: #a1a1aa;
      font-size: 11px;
      font-weight: 600;
      flex-shrink: 0;
      margin-top: 1px;
    }

    .agy-approval-opt.selected .agy-opt-num {
      background: #3f3f46;
      color: #fafafa;
    }

    .agy-approval-footer {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      padding-top: 4px;
    }

    .agy-btn-skip {
      background: transparent;
      border: none;
      color: #a1a1aa;
      font-size: 13px;
      font-weight: 500;
      padding: 6px 10px;
      cursor: pointer;
    }

    .agy-btn-submit {
      background: #2563eb;
      color: #ffffff;
      border: none;
      border-radius: 7px;
      padding: 7px 14px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .running-control-bar {
      padding: 7px 14px;
      background: var(--green-soft);
      border-top: 1px solid #a7f3d0;
      display: none;
      align-items: center;
      justify-content: space-between;
      font-size: 12.5px;
      color: #065f46;
      font-weight: 600;
    }

    .running-control-bar.show {
      display: flex;
    }

    .stop-task-btn {
      border: 1px solid #fca5a5;
      background: var(--red-soft);
      color: var(--red);
      border-radius: 999px;
      padding: 4px 11px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
    }

    .chat-composer {
      padding: 6px 10px calc(6px + var(--safe-bottom));
      background: var(--surface);
      border-top: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
    }

    .composer-unified-card {
      width: 100%;
      box-sizing: border-box;
      border: 1px solid var(--border);
      background: var(--subtle);
      border-radius: 18px;
      padding: 7px 10px 6px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      transition: border-color 0.15s ease, background 0.15s ease;
    }

    .composer-unified-card:focus-within {
      background: var(--surface);
      border-color: var(--primary);
      box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
    }

    .composer-toolbar-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      min-width: 0;
    }

    .composer-tools-left {
      display: flex;
      align-items: center;
      gap: 5px;
      min-width: 0;
      flex: 1;
    }

    .composer-attachments-strip {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 12px;
      background: var(--surface);
      border-top: 1px solid var(--border);
      overflow-x: auto;
      flex-shrink: 0;
    }

    .attachment-thumb-item {
      position: relative;
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      width: 64px;
      flex-shrink: 0;
    }

    .attachment-thumb-img {
      width: 60px;
      height: 60px;
      border-radius: 10px;
      object-fit: cover;
      border: 1px solid var(--border);
      background: var(--subtle);
      box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    }

    .attachment-thumb-meta {
      font-size: 10px;
      color: var(--muted);
      margin-top: 3px;
      max-width: 62px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .attachment-thumb-remove {
      position: absolute;
      top: -5px;
      right: -3px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 1.5px solid var(--surface);
      background: #0f172a;
      color: #ffffff;
      font-size: 11px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      padding: 0;
    }

    .chat-input {
      width: 100%;
      box-sizing: border-box;
      border: none;
      background: transparent;
      border-radius: 8px;
      padding: 2px 2px;
      font-size: 16px !important;
      color: var(--text);
      outline: none;
      resize: none;
      min-width: 0;
      line-height: 1.4;
      max-height: 116px;
      overflow-y: hidden;
      font-family: inherit;
    }

    .chat-input:focus {
      background: transparent;
    }

    .send-btn {
      background: var(--primary);
      color: #fff;
      border: none;
      border-radius: 999px;
      padding: 6px 14px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      flex-shrink: 0;
    }

    .composer-send-btn {
      height: 28px;
      padding: 0 13px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12.5px;
    }

    .voice-btn {
      width: 32px;
      height: 32px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      font-size: 15px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      touch-action: manipulation;
      user-select: none;
      -webkit-user-select: none;
      transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    }

    .composer-mini-btn {
      width: 30px;
      height: 30px;
      font-size: 14px;
    }

    @media (max-width: 768px) {
      .composer-mini-btn {
        width: 32px;
        height: 32px;
        font-size: 15px;
      }
    }

    .voice-btn:active,
    .voice-pill-btn:active {
      transform: scale(0.92);
    }

    .voice-hint-bar {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      border-radius: 10px;
      font-size: 12px;
      font-weight: 600;
      line-height: 1.4;
      cursor: pointer;
    }

    .voice-hint-bar.recording {
      background: #fef2f2;
      color: #dc2626;
      border: 1px solid rgba(220, 38, 38, 0.35);
    }

    .voice-hint-bar.fallback {
      background: #eff6ff;
      color: #1d4ed8;
      border: 1px solid rgba(37, 99, 235, 0.32);
    }

    :root[data-theme="dark"] .voice-hint-bar.recording {
      background: rgba(239, 68, 68, 0.2);
      color: #fca5a5;
    }

    :root[data-theme="dark"] .voice-hint-bar.fallback {
      background: rgba(59, 130, 246, 0.22);
      color: #93c5fd;
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) .voice-hint-bar.recording {
        background: rgba(239, 68, 68, 0.2);
        color: #fca5a5;
      }

      :root:not([data-theme="light"]) .voice-hint-bar.fallback {
        background: rgba(59, 130, 246, 0.22);
        color: #93c5fd;
      }
    }

    .composer-voice-flash {
      border-color: var(--primary) !important;
      box-shadow: 0 0 0 3px rgba(37, 99, 246, 0.24) !important;
    }

    .composer-model-pill {
      height: 28px;
      max-width: 190px;
      padding: 0 9px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text-secondary);
      font-size: 11.5px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 2px;
      cursor: pointer;
      min-width: 0;
      overflow: hidden;
      white-space: nowrap;
      user-select: none;
      -webkit-user-select: none;
      transition: all 0.15s ease;
    }

    .composer-model-pill #chatModelBtnLabel {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .composer-model-pill.active-override {
      border-color: #93c5fd;
      background: var(--primary-soft);
      color: var(--primary);
    }

    .voice-btn:hover,
    .composer-model-pill:hover {
      background: var(--surface-2);
    }

    .voice-btn.recording {
      background: #dc2626;
      border-color: #b91c1c;
      color: #ffffff;
      animation: voicePulse 1.2s infinite ease-in-out;
    }

    .voice-pill-btn {
      border: 1px solid #bfdbfe;
      background: var(--primary-soft);
      color: var(--primary);
      border-radius: 999px;
      padding: 4px 11px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      touch-action: manipulation;
      user-select: none;
      -webkit-user-select: none;
      transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    }

    .voice-pill-btn.recording {
      background: #dc2626;
      border-color: #b91c1c;
      color: #ffffff;
      animation: voicePulse 1.2s infinite ease-in-out;
    }

    @keyframes voicePulse {

      0%,
      100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45);
      }

      50% {
        box-shadow: 0 0 0 7px rgba(220, 38, 38, 0);
      }
    }

    body.mobile-chat-open .install-hint {
      display: none !important;
    }

    /* ---- 微信同款「按住 说话」底部大按钮 + 全屏滑动手势浮层 ---- */
    .voice-btn.mode-toggle-btn {
      width: auto;
      height: 28px;
      padding: 0 10px;
      font-size: 12px;
      font-weight: 600;
      gap: 3px;
      white-space: nowrap;
    }

    @media (max-width: 768px) {
      .voice-btn.mode-toggle-btn {
        height: 30px;
        padding: 0 11px;
        font-size: 12.5px;
      }
    }

    .wechat-hold-talk-btn {
      display: none;
      width: 100%;
      height: 44px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      font-size: 15.5px;
      font-weight: 700;
      letter-spacing: 0.4px;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
      -webkit-touch-callout: none;
      -webkit-tap-highlight-color: transparent;
      transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.1s ease;
    }

    .composer-unified-card.wechat-voice-mode .chat-input {
      display: none;
    }

    .composer-unified-card.wechat-voice-mode .wechat-hold-talk-btn {
      display: flex;
    }

    .composer-unified-card.wechat-voice-mode:not(.has-attachments) #chatSendBtn {
      display: none !important;
    }

    .wechat-hold-talk-btn.holding {
      background: #dcfce7;
      border-color: #10b981;
      color: #047857;
      transform: scale(0.99);
    }

    .wechat-hold-talk-btn.is-disabled {
      opacity: 0.56;
      cursor: not-allowed;
      font-size: 13.5px;
      font-weight: 600;
      color: var(--muted);
    }

    :root[data-theme="dark"] .wechat-hold-talk-btn.holding {
      background: rgba(16, 185, 129, 0.24);
      border-color: #34d399;
      color: #a7f3d0;
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) .wechat-hold-talk-btn.holding {
        background: rgba(16, 185, 129, 0.24);
        border-color: #34d399;
        color: #a7f3d0;
      }
    }

    .wechat-voice-overlay {
      position: fixed;
      inset: 0;
      z-index: 9999;
      pointer-events: none;
      background: rgba(15, 23, 42, 0.76);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-end;
      overflow: hidden;
      user-select: none;
      -webkit-user-select: none;
    }

    .wechat-voice-bubble-wrap {
      margin-top: max(18vh, 96px);
      margin-bottom: auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      width: min(86vw, 336px);
    }

    .wechat-voice-bubble {
      width: 100%;
      min-height: 92px;
      max-height: 220px;
      box-sizing: border-box;
      padding: 16px 18px 14px;
      border-radius: 18px;
      background: #07c160;
      color: #ffffff;
      box-shadow: 0 12px 32px rgba(7, 193, 96, 0.34);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 10px;
      transition: background 0.08s ease, box-shadow 0.08s ease, transform 0.08s ease;
    }

    .wechat-voice-bubble-tail {
      width: 0;
      height: 0;
      border-left: 10px solid transparent;
      border-right: 10px solid transparent;
      border-top: 10px solid #07c160;
      transition: border-top-color 0.08s ease;
    }

    .wechat-voice-overlay.zone-cancel .wechat-voice-bubble {
      background: #ef4444;
      box-shadow: 0 12px 32px rgba(239, 68, 68, 0.38);
    }

    .wechat-voice-overlay.zone-cancel .wechat-voice-bubble-tail {
      border-top-color: #ef4444;
    }

    .wechat-voice-overlay.zone-edit .wechat-voice-bubble {
      background: #2563eb;
      box-shadow: 0 12px 32px rgba(37, 99, 235, 0.38);
    }

    .wechat-voice-overlay.zone-edit .wechat-voice-bubble-tail {
      border-top-color: #2563eb;
    }

    .wechat-voice-transcript {
      font-size: 17px;
      font-weight: 600;
      line-height: 1.5;
      word-break: break-word;
      max-height: 156px;
      overflow-y: auto;
      color: #ffffff;
    }

    .wechat-voice-transcript.is-placeholder {
      opacity: 0.88;
      font-size: 16px;
      text-align: center;
      margin-top: 6px;
    }

    .wechat-voice-wave {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      height: 18px;
      opacity: 0.92;
    }

    .wechat-voice-wave span {
      display: inline-block;
      width: 4px;
      height: 8px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.92);
      animation: wechatWaveBounce 0.9s infinite ease-in-out;
    }

    .wechat-voice-wave span:nth-child(2) {
      animation-delay: 0.14s;
    }

    .wechat-voice-wave span:nth-child(3) {
      animation-delay: 0.28s;
    }

    .wechat-voice-wave span:nth-child(4) {
      animation-delay: 0.18s;
    }

    .wechat-voice-wave span:nth-child(5) {
      animation-delay: 0.06s;
    }

    @keyframes wechatWaveBounce {

      0%,
      100% {
        height: 6px;
        opacity: 0.65;
      }

      50% {
        height: 18px;
        opacity: 1;
      }
    }

    .wechat-voice-actions {
      width: min(82vw, 320px);
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 22px;
    }

    .wechat-voice-action-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }

    .wechat-voice-action-circle {
      width: 62px;
      height: 62px;
      border-radius: 50%;
      background: rgba(30, 41, 59, 0.88);
      border: 1.5px solid rgba(255, 255, 255, 0.22);
      color: rgba(255, 255, 255, 0.9);
      font-size: 20px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.08s ease, background 0.08s ease, border-color 0.08s ease, box-shadow 0.08s ease;
    }

    .wechat-voice-action-tip {
      font-size: 12.5px;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.76);
      transition: color 0.15s ease;
    }

    .wechat-voice-action-item.cancel-zone.active .wechat-voice-action-circle {
      background: #ef4444;
      border-color: #fecaca;
      color: #ffffff;
      transform: scale(1.18);
      box-shadow: 0 0 24px rgba(239, 68, 68, 0.55);
    }

    .wechat-voice-action-item.cancel-zone.active .wechat-voice-action-tip {
      color: #fca5a5;
    }

    .wechat-voice-action-item.edit-zone.active .wechat-voice-action-circle {
      background: #2563eb;
      border-color: #bfdbfe;
      color: #ffffff;
      transform: scale(1.18);
      box-shadow: 0 0 24px rgba(37, 99, 235, 0.55);
    }

    .wechat-voice-action-item.edit-zone.active .wechat-voice-action-tip {
      color: #93c5fd;
    }

    .wechat-voice-bottom-dock {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .wechat-voice-status-text {
      font-size: 14px;
      font-weight: 700;
      color: rgba(255, 255, 255, 0.92);
      margin-bottom: 12px;
      letter-spacing: 0.3px;
    }

    .wechat-voice-bottom-arc {
      width: 132%;
      height: calc(82px + var(--safe-bottom));
      padding-bottom: var(--safe-bottom);
      border-radius: 50% 50% 0 0 / 100% 100% 0 0;
      background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
      border-top: 3px solid #07c160;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 26px;
      box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.35);
      transition: background 0.16s ease, border-top-color 0.16s ease;
    }

    .wechat-voice-overlay.zone-cancel .wechat-voice-bottom-arc {
      background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
      border-top-color: #ef4444;
    }

    .wechat-voice-overlay.zone-edit .wechat-voice-bottom-arc {
      background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
      border-top-color: #3b82f6;
    }

    /* ==================== 7. 文件浏览器 ==================== */
    .breadcrumbs-bar {
      padding: 10px 16px;
      background: var(--subtle);
      border-bottom: 1px solid var(--border);
      font-size: 12.5px;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 5px;
      flex-wrap: wrap;
      user-select: none;
      -webkit-user-select: none;
      -webkit-touch-callout: none;
    }

    .crumb-link {
      color: var(--primary);
      font-weight: 600;
      cursor: pointer;
    }

    .file-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 13px 16px;
      border-bottom: 1px solid var(--hairline);
      cursor: pointer;
      font-size: 14.5px;
      background: var(--surface);
    }

    .file-row:hover {
      background: var(--bg);
    }

    .file-row-left {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    /* ==================== 8. 底部半屏抽屉 ==================== */
    .sheet-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.44);
      z-index: 95;
      display: none;
      align-items: flex-end;
      justify-content: center;
    }

    .sheet-backdrop.open {
      display: flex;
    }

    .sheet-panel {
      width: 100%;
      max-width: 520px;
      background: var(--surface);
      border-radius: 22px 22px 0 0;
      padding: 12px 16px calc(20px + var(--safe-bottom));
      box-shadow: 0 -10px 35px rgba(15, 23, 42, 0.18);
      max-height: 86%;
      overflow-y: auto;
    }

    .sheet-handle {
      width: 36px;
      height: 4px;
      border-radius: 999px;
      background: #cbd5e1;
      margin: 0 auto 14px;
    }

    .sheet-drag-zone {
      padding: 10px 0 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: grab;
      touch-action: none;
      flex-shrink: 0;
      user-select: none;
      -webkit-user-select: none;
    }

    .sheet-drag-zone .sheet-handle {
      margin: 0;
      width: 40px;
      height: 4.5px;
      transition: width 0.18s ease, background 0.18s ease, opacity 0.18s ease;
    }

    #inChatFileSheet .sheet-panel {
      padding: 0;
      height: 80dvh;
      max-height: calc(100dvh - var(--safe-top, 0px));
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transition: height 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.24s ease;
    }

    #inChatFileSheet .sheet-panel.sheet-expanded {
      height: calc(97dvh - var(--safe-top, 0px));
      border-radius: 16px 16px 0 0;
    }

    #inChatFileSheet .sheet-panel.sheet-expanded .sheet-drag-zone .sheet-handle {
      width: 48px;
      background: var(--primary);
      opacity: 0.55;
    }

    .sheet-title-actions {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }

    .sheet-icon-btn {
      border: none;
      background: var(--subtle);
      color: var(--text-secondary);
      width: 30px;
      height: 30px;
      border-radius: 999px;
      font-size: 14px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      transition: background 0.14s ease, transform 0.12s ease;
    }

    .sheet-icon-btn:active {
      background: var(--subtle-hover);
      transform: scale(0.94);
    }

    .drawer-preview-img {
      max-width: 100%;
      max-height: 54dvh;
      object-fit: contain;
      border-radius: 8px;
      transition: max-height 0.22s ease;
    }

    #inChatFileSheet .sheet-panel.sheet-expanded .drawer-preview-img {
      max-height: 76dvh;
    }

    .drawer-preview-iframe {
      width: 100%;
      height: 62dvh;
      min-height: 420px;
      border: none;
      background: #ffffff;
      display: block;
      transition: height 0.22s ease;
    }

    #inChatFileSheet .sheet-panel.sheet-expanded .drawer-preview-iframe {
      height: 82dvh;
    }

    .sheet-title {
      font-size: 15px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .host-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid var(--border);
      margin-bottom: 8px;
      cursor: pointer;
    }

    .host-option.selected {
      border-color: var(--primary);
      background: var(--primary-soft);
    }

    .form-label {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
      margin: 12px 0 6px;
    }

    .chip-selector {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
    }

    .choice-chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      border: 1px solid var(--border);
      background: var(--subtle);
      color: var(--text-secondary);
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 12.5px;
      font-weight: 500;
      cursor: pointer;
    }

    .choice-chip.selected {
      background: var(--primary-soft);
      color: var(--primary);
      border-color: var(--primary);
      font-weight: 600;
    }

    /* ==================== 新建任务弹窗 (New Task Sheet) 现代重构 ==================== */
    .new-task-sheet-panel {
      max-height: 88vh;
      display: flex;
      flex-direction: column;
    }

    /* 1. 结构化执行目标卡片（合并电脑与引擎） */
    .new-task-context-card {
      background: var(--subtle);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 10px 12px;
      margin-bottom: 12px;
      display: flex;
      flex-direction: column;
      gap: 9px;
    }

    .new-task-context-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .context-row-label {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
      flex-shrink: 0;
    }

    .context-row-chips {
      display: flex;
      align-items: center;
      gap: 5px;
      overflow-x: auto;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
      min-width: 0;
    }

    .context-row-chips::-webkit-scrollbar {
      display: none;
    }

    .context-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 9px;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 550;
      color: var(--text-secondary);
      background: var(--surface);
      border: 1px solid var(--border);
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      transition: all 0.15s ease;
    }

    .context-chip:hover {
      border-color: var(--primary);
      color: var(--text);
    }

    .context-chip.selected {
      background: var(--primary-soft);
      border-color: var(--primary);
      color: var(--primary);
      font-weight: 700;
    }

    /* 2. 项目文件夹单行横滑，绝不平铺 */
    .new-task-proj-section {
      margin-bottom: 12px;
    }

    .new-task-proj-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 6px;
    }

    .proj-header-title {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
    }

    .proj-header-more-btn {
      border: none;
      background: transparent;
      color: var(--primary);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      padding: 2px 4px;
    }

    .new-task-proj-scroll {
      display: flex;
      gap: 6px;
      overflow-x: auto;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
      padding: 1px 0 3px;
    }

    .new-task-proj-scroll::-webkit-scrollbar {
      display: none;
    }

    .new-task-proj-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 5px 10px;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 500;
      color: var(--text-secondary);
      background: var(--subtle);
      border: 1px solid var(--border);
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      transition: all 0.15s ease;
    }

    .new-task-proj-pill:hover {
      background: var(--surface-2);
      color: var(--text);
    }

    .new-task-proj-pill.selected {
      background: var(--primary-soft);
      border-color: var(--primary);
      color: var(--primary);
      font-weight: 700;
    }

    /* 3. 核心视觉主角：宽敞输入卡片 + 内置工具栏 */
    .new-task-card-wrap {
      border: 1.5px solid var(--border);
      border-radius: 14px;
      background: var(--surface);
      padding: 10px 12px 8px;
      margin-bottom: 10px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .new-task-card-wrap:focus-within {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px var(--primary-soft);
    }

    .new-task-textarea {
      width: 100%;
      height: 125px;
      min-height: 90px;
      max-height: 240px;
      border: none;
      outline: none;
      background: transparent;
      color: var(--text);
      font-size: 16px !important;
      line-height: 1.5;
      resize: vertical;
      font-family: inherit;
      padding: 0;
      margin-top: 0;
    }

    .new-task-textarea::placeholder {
      color: var(--muted);
    }

    .new-task-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      border-top: 1px solid var(--hairline);
      padding-top: 8px;
    }

    .new-task-tool-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 5px 9px;
      border-radius: 7px;
      border: 1px solid var(--border);
      background: var(--subtle);
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      touch-action: manipulation;
      user-select: none;
      -webkit-user-select: none;
      transition: all 0.15s;
    }

    .new-task-tool-btn:hover {
      background: var(--surface-2);
      color: var(--text);
    }

    .new-task-tool-btn.recording {
      background: #dc2626;
      border-color: #b91c1c;
      color: #ffffff;
      animation: voicePulse 1.2s infinite ease-in-out;
    }

    .new-task-tool-btn.model-btn {
      min-width: 0;
      max-width: 210px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .new-task-tool-btn.model-btn #newTaskModelBtnLabel {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .new-task-toolbar-actions {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      flex-shrink: 0;
    }

    /* 4. 快捷提示词微横条 */
    .new-task-quick-strip {
      display: flex;
      gap: 6px;
      overflow-x: auto;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
      margin-bottom: 12px;
      padding: 1px 0;
    }

    .new-task-quick-strip::-webkit-scrollbar {
      display: none;
    }

    .quick-prompt-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11.5px;
      font-weight: 500;
      color: var(--muted);
      background: var(--subtle);
      border: 1px solid transparent;
      padding: 4px 9px;
      border-radius: 999px;
      white-space: nowrap;
      cursor: pointer;
      flex-shrink: 0;
      transition: all 0.15s;
    }

    .quick-prompt-pill:hover {
      background: var(--surface-2);
      color: var(--text);
      border-color: var(--border);
    }

    /* 5. 立即启动大按钮 */
    .new-task-submit-btn {
      width: 100%;
      margin-top: 0;
      padding: 12px 16px;
      font-size: 15px;
      font-weight: 700;
      border-radius: 12px;
      box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
    }

    .primary-block-btn {
      width: 100%;
      margin-top: 14px;
      background: var(--primary);
      color: #fff;
      border: none;
      padding: 12px;
      border-radius: 12px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
    }

    .action-item {
      width: 100%;
      text-align: left;
      padding: 13px 14px;
      border: none;
      background: var(--subtle);
      border-radius: 12px;
      margin-bottom: 8px;
      font-size: 14.5px;
      font-weight: 500;
      color: var(--text);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .action-item.danger {
      color: var(--red);
      background: var(--red-soft);
    }

    /* 轻量 Toast 提示 */
    /* 首次用 Safari 打开时提示「添加到主屏幕」，否则锁屏推送收不到 */
    .install-hint {
      position: fixed;
      left: 12px;
      right: 12px;
      bottom: calc(66px + var(--safe-bottom));
      z-index: 70;
      display: none;
      align-items: center;
      gap: 10px;
      padding: 11px 13px;
      border-radius: 14px;
      background: rgba(15, 23, 42, 0.95);
      color: #fff;
      font-size: 12.5px;
      line-height: 1.45;
      box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
      opacity: 0;
      transform: translateY(10px);
      transition: opacity 0.22s ease, transform 0.22s ease;
    }

    .install-hint.show {
      opacity: 1;
      transform: translateY(0);
    }

    .install-hint-text {
      flex: 1;
    }

    .install-hint-text strong {
      color: #93c5fd;
    }

    .install-hint-close {
      border: none;
      background: rgba(255, 255, 255, 0.14);
      color: #fff;
      border-radius: 999px;
      padding: 6px 11px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      flex-shrink: 0;
    }

    .toast-pill {
      position: fixed;
      top: calc(var(--safe-top, 0px) + 16px);
      left: 50%;
      transform: translateX(-50%) translateY(-20px);
      max-width: calc(100vw - 28px);
      width: max-content;
      text-align: center;
      line-height: 1.4;
      word-break: break-word;
      background: rgba(15, 23, 42, 0.94);
      color: #fff;
      padding: 9px 16px;
      border-radius: 18px;
      font-size: 13px;
      font-weight: 600;
      z-index: 10000;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease, transform 0.2s ease;
      box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28);
    }

    .toast-pill.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    /* 设置页样式 */
    .settings-wrap {
      padding: 16px;
      background: var(--bg);
      min-height: 100%;
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .settings-group-title {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
      margin: 0 0 8px 4px;
    }

    .host-visual-grid {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .host-visual-card {
      background: var(--surface);
      border: 1.5px solid var(--border);
      border-radius: 16px;
      padding: 14px;
    }

    .host-visual-card.active-feishu {
      border-color: #93c5fd;
      background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    }

    .host-visual-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
      gap: 8px;
    }

    .host-metrics-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      background: var(--subtle);
      padding: 8px 10px;
      border-radius: 10px;
      margin-bottom: 10px;
      font-size: 11.5px;
    }

    .metric-cell {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .metric-label {
      color: var(--muted);
    }

    .metric-val {
      font-weight: 700;
      color: var(--text);
    }

    .settings-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow: hidden;
    }

    .settings-item {
      padding: 13px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-bottom: 1px solid var(--hairline);
    }

    .settings-item:last-child {
      border-bottom: none;
    }

    .settings-item-title {
      font-size: 14.5px;
      font-weight: 600;
    }

    .settings-item-desc {
      font-size: 12px;
      color: var(--text-secondary);
      margin-top: 2px;
    }

    .pill-action-btn {
      border: 1px solid var(--border);
      background: var(--subtle);
      color: var(--text);
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 12.5px;
      font-weight: 600;
      cursor: pointer;
      flex-shrink: 0;
    }

    .pill-action-btn.primary {
      background: var(--primary-soft);
      color: var(--primary);
      border-color: #bfdbfe;
    }

    /* ==================== 9. 密码锁屏保护罩 (Auth Lock Overlay) ==================== */
    .auth-overlay {
      position: fixed;
      inset: 0;
      background: rgba(248, 250, 252, 0.96);
      backdrop-filter: blur(20px);
      z-index: 200;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .auth-overlay.show {
      display: flex;
    }

    .auth-card {
      width: 100%;
      max-width: 380px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 24px;
      padding: 28px 24px;
      box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
      text-align: center;
    }

    .auth-input {
      width: 100%;
      padding: 12px 15px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: var(--subtle);
      color: var(--text);
      font-size: 16px !important;
      margin-top: 14px;
      outline: none;
      text-align: center;
    }

    .auth-input:focus {
      background: var(--surface);
      border-color: var(--primary);
    }

    /* 断线重连提示细条 (#11) */
    .connection-status-banner {
      background: var(--amber-soft);
      color: #b45309;
      border-bottom: 1px solid rgba(245, 158, 11, 0.35);
      padding: 6px 14px;
      font-size: 12px;
      font-weight: 600;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
    }

    /* 离线排队消息胶囊与取消按钮 (#1) */
    .queued-cmd-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 6px;
      padding: 3px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 600;
      background: rgba(255, 255, 255, 0.18);
      color: #fff;
    }

    .cancel-queued-btn {
      border: 1px solid rgba(255, 255, 255, 0.45);
      background: rgba(15, 23, 42, 0.25);
      color: #fff;
      border-radius: 999px;
      padding: 1px 7px;
      font-size: 10.5px;
      font-weight: 700;
      cursor: pointer;
    }

    /* 外观主题三档分段开关 (#14) */
    .theme-seg-group {
      display: inline-flex;
      background: var(--subtle);
      border: 1px solid var(--border);
      border-radius: 999px;
      padding: 2px;
      gap: 2px;
      flex-shrink: 0;
      white-space: nowrap;
    }

    .theme-seg-btn {
      border: none;
      background: transparent;
      color: var(--text-secondary);
      padding: 5px 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      flex-shrink: 0;
      white-space: nowrap;
    }

    .theme-seg-btn.active {
      background: var(--surface);
      color: var(--primary);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }

    /* 深色模式组件级精细覆盖 (#14) */
    :root[data-theme="dark"] .host-visual-card.active-feishu {
      border-color: #3b82f6;
      background: linear-gradient(180deg, rgba(59, 130, 246, 0.14) 0%, var(--surface) 100%);
    }

    :root[data-theme="dark"] .auth-overlay {
      background: rgba(11, 17, 32, 0.94);
    }

    :root[data-theme="dark"] .connection-status-banner {
      color: #fbbf24;
    }

    :root[data-theme="dark"] .msg-assistant .msg-bubble {
      background: var(--surface-2);
      border-color: var(--border);
      color: var(--text);
    }

    :root[data-theme="dark"] .sheet-panel,
    :root[data-theme="dark"] .chat-fullscreen,
    :root[data-theme="dark"] .chat-navbar,
    :root[data-theme="dark"] #scrollBottomBtn,
    :root[data-theme="dark"] .composer-bar,
    :root[data-theme="dark"] .bottom-tabs,
    :root[data-theme="dark"] .top-bar,
    :root[data-theme="dark"] .search-and-filter {
      background: var(--surface);
      border-color: var(--border);
      color: var(--text);
    }

    :root[data-theme="dark"] input,
    :root[data-theme="dark"] textarea,
    :root[data-theme="dark"] select {
      color: var(--text);
    }

    :root[data-theme="dark"] .session-row.row-state-running {
      background: linear-gradient(90deg, rgba(16, 185, 129, 0.16) 0%, rgba(16, 185, 129, 0.08) 100%);
      border-left-color: #10b981;
      border-bottom-color: rgba(16, 185, 129, 0.25);
    }

    :root[data-theme="dark"] .session-row.row-state-running:hover {
      background: rgba(16, 185, 129, 0.22);
    }

    :root[data-theme="dark"] .session-row.row-state-running .session-title {
      color: #6ee7b7;
    }

    :root[data-theme="dark"] .session-row.row-state-running .session-preview-text {
      color: #a7f3d0;
    }

    :root[data-theme="dark"] .session-row.row-state-conclusion {
      background: linear-gradient(90deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.08) 100%);
      border-left-color: #3b82f6;
      border-bottom-color: rgba(59, 130, 246, 0.28);
    }

    :root[data-theme="dark"] .session-row.row-state-conclusion:hover {
      background: rgba(59, 130, 246, 0.24);
    }

    :root[data-theme="dark"] .session-row.row-state-conclusion .session-title {
      color: #93c5fd;
    }

    :root[data-theme="dark"] .session-row.row-state-conclusion .session-preview-text {
      color: #bfdbfe;
    }

    :root[data-theme="dark"] .session-row.row-state-approval {
      background: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.08) 100%);
      border-left-color: #f59e0b;
      border-bottom-color: rgba(245, 158, 11, 0.28);
    }

    :root[data-theme="dark"] .session-row.row-state-approval:hover {
      background: rgba(245, 158, 11, 0.24);
    }

    :root[data-theme="dark"] .session-row.row-state-approval .session-title {
      color: #fcd34d;
    }

    :root[data-theme="dark"] .session-row.row-state-approval .session-preview-text {
      color: #fde68a;
    }

    :root[data-theme="dark"] .session-row.row-state-interrupted {
      background: linear-gradient(90deg, rgba(234, 88, 12, 0.18) 0%, rgba(234, 88, 12, 0.08) 100%);
      border-left-color: #ea580c;
      border-bottom-color: rgba(234, 88, 12, 0.28);
    }

    :root[data-theme="dark"] .md-body code {
      background: rgba(148, 163, 184, 0.18);
      color: #f8fafc;
      border-color: rgba(148, 163, 184, 0.3);
    }

    :root[data-theme="dark"] .followup-pill,
    :root[data-theme="dark"] .filter-pill.smart-pill {
      background: rgba(59, 130, 246, 0.16);
      color: #93c5fd;
      border-color: rgba(59, 130, 246, 0.35);
    }

    :root[data-theme="dark"] .harness-mini-tag,
    :root[data-theme="dark"] .harness-mini-tag.agy {
      background: rgba(99, 102, 241, 0.22);
      color: #c7d2fe;
    }

    :root[data-theme="dark"] .running-control-bar {
      color: #6ee7b7;
      border-top-color: rgba(16, 185, 129, 0.3);
    }

    :root[data-theme="dark"] .agy-files-changed-card {
      background: var(--surface);
      border-color: var(--border);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    }

    :root[data-theme="dark"] .agy-file-diff .add {
      color: #4ade80;
    }

    :root[data-theme="dark"] .agy-file-diff .del {
      color: #f87171;
    }

    :root[data-theme="dark"] .agy-session-artifacts-card {
      border-color: rgba(59, 130, 246, 0.42);
    }

    :root[data-theme="dark"] .agy-session-artifacts-header {
      background: rgba(59, 130, 246, 0.14);
      border-bottom-color: rgba(148, 163, 184, 0.18);
      color: #93c5fd;
    }

    :root[data-theme="dark"] .agy-artifacts-toggle-pill {
      background: rgba(15, 23, 42, 0.65);
      border-color: rgba(59, 130, 246, 0.35);
      color: #93c5fd;
    }

    :root[data-theme="dark"] .agy-artifact-kind-badge {
      background: rgba(59, 130, 246, 0.22);
      border-color: rgba(59, 130, 246, 0.35);
      color: #93c5fd;
    }

    :root[data-theme="dark"] .agy-artifact-open-tag {
      color: #60a5fa;
    }

    :root[data-theme="dark"] .agy-files-accept.is-reviewed {
      color: #6ee7b7;
      border-color: rgba(16, 185, 129, 0.42);
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) .host-visual-card.active-feishu {
        border-color: #3b82f6;
        background: linear-gradient(180deg, rgba(59, 130, 246, 0.14) 0%, var(--surface) 100%);
      }

      :root:not([data-theme="light"]) .auth-overlay {
        background: rgba(11, 17, 32, 0.94);
      }

      :root:not([data-theme="light"]) .connection-status-banner {
        color: #fbbf24;
      }

      :root:not([data-theme="light"]) .msg-assistant .msg-bubble {
        background: var(--surface-2);
        border-color: var(--border);
        color: var(--text);
      }

      :root:not([data-theme="light"]) .sheet-panel,
      :root:not([data-theme="light"]) .chat-fullscreen,
      :root:not([data-theme="light"]) .chat-navbar,
      :root:not([data-theme="light"]) #scrollBottomBtn,
      :root:not([data-theme="light"]) .composer-bar,
      :root:not([data-theme="light"]) .bottom-tabs,
      :root:not([data-theme="light"]) .top-bar,
      :root:not([data-theme="light"]) .search-and-filter {
        background: var(--surface);
        border-color: var(--border);
        color: var(--text);
      }

      :root:not([data-theme="light"]) input,
      :root:not([data-theme="light"]) textarea,
      :root:not([data-theme="light"]) select {
        color: var(--text);
      }

      :root:not([data-theme="light"]) .session-row.row-state-running {
        background: linear-gradient(90deg, rgba(16, 185, 129, 0.16) 0%, rgba(16, 185, 129, 0.08) 100%);
        border-left-color: #10b981;
        border-bottom-color: rgba(16, 185, 129, 0.25);
      }

      :root:not([data-theme="light"]) .session-row.row-state-running:hover {
        background: rgba(16, 185, 129, 0.22);
      }

      :root:not([data-theme="light"]) .session-row.row-state-running .session-title {
        color: #6ee7b7;
      }

      :root:not([data-theme="light"]) .session-row.row-state-running .session-preview-text {
        color: #a7f3d0;
      }

      :root:not([data-theme="light"]) .session-row.row-state-conclusion {
        background: linear-gradient(90deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.08) 100%);
        border-left-color: #3b82f6;
        border-bottom-color: rgba(59, 130, 246, 0.28);
      }

      :root:not([data-theme="light"]) .session-row.row-state-conclusion:hover {
        background: rgba(59, 130, 246, 0.24);
      }

      :root:not([data-theme="light"]) .session-row.row-state-conclusion .session-title {
        color: #93c5fd;
      }

      :root:not([data-theme="light"]) .session-row.row-state-conclusion .session-preview-text {
        color: #bfdbfe;
      }

      :root:not([data-theme="light"]) .session-row.row-state-approval {
        background: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.08) 100%);
        border-left-color: #f59e0b;
        border-bottom-color: rgba(245, 158, 11, 0.28);
      }

      :root:not([data-theme="light"]) .session-row.row-state-approval:hover {
        background: rgba(245, 158, 11, 0.24);
      }

      :root:not([data-theme="light"]) .session-row.row-state-approval .session-title {
        color: #fcd34d;
      }

      :root:not([data-theme="light"]) .session-row.row-state-approval .session-preview-text {
        color: #fde68a;
      }

      :root:not([data-theme="light"]) .session-row.row-state-interrupted {
        background: linear-gradient(90deg, rgba(234, 88, 12, 0.18) 0%, rgba(234, 88, 12, 0.08) 100%);
        border-left-color: #ea580c;
        border-bottom-color: rgba(234, 88, 12, 0.28);
      }

      :root:not([data-theme="light"]) .md-body code {
        background: rgba(148, 163, 184, 0.18);
        color: #f8fafc;
        border-color: rgba(148, 163, 184, 0.3);
      }

      :root:not([data-theme="light"]) .followup-pill,
      :root:not([data-theme="light"]) .filter-pill.smart-pill {
        background: rgba(59, 130, 246, 0.16);
        color: #93c5fd;
        border-color: rgba(59, 130, 246, 0.35);
      }

      :root:not([data-theme="light"]) .harness-mini-tag,
      :root:not([data-theme="light"]) .harness-mini-tag.agy {
        background: rgba(99, 102, 241, 0.22);
        color: #c7d2fe;
      }

      :root:not([data-theme="light"]) .running-control-bar {
        color: #6ee7b7;
        border-top-color: rgba(16, 185, 129, 0.3);
      }

      :root:not([data-theme="light"]) .agy-files-changed-card {
        background: var(--surface);
        border-color: var(--border);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
      }

      :root:not([data-theme="light"]) .agy-file-diff .add {
        color: #4ade80;
      }

      :root:not([data-theme="light"]) .agy-file-diff .del {
        color: #f87171;
      }

      :root:not([data-theme="light"]) .agy-session-artifacts-card {
        border-color: rgba(59, 130, 246, 0.42);
      }

      :root:not([data-theme="light"]) .agy-session-artifacts-header {
        background: rgba(59, 130, 246, 0.14);
        border-bottom-color: rgba(148, 163, 184, 0.18);
        color: #93c5fd;
      }

      :root:not([data-theme="light"]) .agy-artifacts-toggle-pill {
        background: rgba(15, 23, 42, 0.65);
        border-color: rgba(59, 130, 246, 0.35);
        color: #93c5fd;
      }

      :root:not([data-theme="light"]) .agy-artifact-kind-badge {
        background: rgba(59, 130, 246, 0.22);
        border-color: rgba(59, 130, 246, 0.35);
        color: #93c5fd;
      }

      :root:not([data-theme="light"]) .agy-artifact-open-tag {
        color: #60a5fa;
      }

      :root:not([data-theme="light"]) .agy-files-accept.is-reviewed {
        color: #6ee7b7;
        border-color: rgba(16, 185, 129, 0.42);
      }
    }

    /* DSH 交互选择弹窗卡片 (ask_user_question & exit_plan_mode) */
    .dsh-question-card {
      background: var(--surface);
      border: 1.5px solid #f59e0b;
      border-radius: 14px;
      padding: 14px;
      margin: 10px 0;
      box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
    }

    .dsh-question-card-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--hairline);
    }

    .dsh-question-badge-icon {
      font-size: 16px;
      flex-shrink: 0;
    }

    .dsh-question-card-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      line-height: 1.35;
    }

    .dsh-question-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .dsh-question-block {
      background: var(--subtle);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px 12px;
    }

    .dsh-question-prompt-line {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 8px;
    }

    .dsh-question-header-pill {
      display: inline-flex;
      align-items: center;
      padding: 2px 7px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      background: var(--amber-soft);
      color: #b45309;
    }

    .dsh-question-prompt-text {
      font-size: 13.5px;
      font-weight: 600;
      color: var(--text);
      line-height: 1.4;
    }

    .dsh-question-multi-tag {
      font-size: 11px;
      font-weight: 600;
      color: var(--primary);
      background: rgba(37, 99, 235, 0.1);
      padding: 1px 6px;
      border-radius: 999px;
    }

    .dsh-question-options {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .dsh-question-opt {
      width: 100%;
      text-align: left;
      background: var(--surface);
      border: 1.5px solid var(--border);
      border-radius: 10px;
      padding: 9px 12px;
      cursor: pointer;
      transition: all 0.15s ease;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .dsh-question-opt.selected {
      border-color: var(--primary);
      background: rgba(37, 99, 235, 0.08);
    }

    .dsh-question-opt-top {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .dsh-question-opt-check {
      font-size: 14px;
      font-weight: 700;
      color: var(--primary);
      flex-shrink: 0;
    }

    .dsh-question-opt-label {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
    }

    .dsh-question-opt-desc {
      font-size: 11.5px;
      color: var(--text-secondary);
      padding-left: 22px;
      line-height: 1.35;
    }

    .dsh-question-custom-wrap {
      margin-top: 8px;
    }

    .dsh-question-custom-input {
      width: 100%;
      box-sizing: border-box;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 7px 10px;
      font-size: 12.5px;
      background: var(--surface);
      color: var(--text);
    }

    .dsh-question-custom-input:focus {
      outline: none;
      border-color: var(--primary);
    }

    .dsh-question-footer {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 12px;
      padding-top: 10px;
      border-top: 1px solid var(--hairline);
    }

    .dsh-question-btn-skip {
      border: 1px solid var(--border);
      background: var(--subtle);
      color: var(--text-secondary);
      border-radius: 999px;
      padding: 7px 14px;
      font-size: 12.5px;
      font-weight: 600;
      cursor: pointer;
    }

    .dsh-question-btn-submit {
      border: none;
      background: var(--primary);
      color: #fff;
      border-radius: 999px;
      padding: 7px 16px;
      font-size: 12.5px;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    }

    /* Antigravity Walkthrough & Artifact Cards */
    .agy-artifact-card-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 10px;
    }

    .agy-artifact-card {
      background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
      border: 1.5px solid rgba(59, 130, 246, 0.35);
      border-radius: 12px;
      padding: 10px 12px;
      cursor: pointer;
      transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
    }

    .agy-artifact-card:active {
      transform: scale(0.99);
    }

    .agy-artifact-card-head {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .agy-artifact-icon {
      font-size: 20px;
      flex-shrink: 0;
    }

    .agy-artifact-titles {
      flex: 1;
      min-width: 0;
    }

    .agy-artifact-title-row {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .agy-artifact-kind-pill {
      display: inline-flex;
      align-items: center;
      padding: 2px 7px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      background: #2563eb;
      color: #ffffff;
    }

    .agy-artifact-name {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .agy-artifact-summary {
      font-size: 11.5px;
      color: var(--text-secondary);
      margin-top: 3px;
      line-height: 1.35;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .agy-artifact-open-btn {
      border: 1px solid rgba(37, 99, 235, 0.35);
      background: var(--surface);
      color: var(--primary);
      border-radius: 999px;
      padding: 5px 11px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      flex-shrink: 0;
    }

    .agy-session-artifacts-card {
      border-color: rgba(37, 99, 235, 0.24);
    }

    .agy-session-artifacts-card.is-collapsed .agy-artifact-rows {
      display: none;
    }

    .agy-session-artifacts-card.is-collapsed .agy-session-artifacts-header {
      border-bottom: none;
    }

    .agy-session-artifacts-header {
      width: 100%;
      border: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px 12px;
      background: var(--primary-soft);
      border-bottom: 1px solid rgba(37, 99, 235, 0.14);
      font-family: inherit;
      font-size: 12px;
      font-weight: 700;
      color: var(--primary);
      cursor: pointer;
      text-align: left;
      transition: background 0.14s ease;
    }

    .agy-session-artifacts-header:active {
      opacity: 0.86;
    }

    .agy-session-artifacts-title {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .agy-artifacts-toggle-pill {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 2px 8px;
      border-radius: 999px;
      background: var(--surface);
      border: 1px solid rgba(37, 99, 235, 0.22);
      color: var(--primary);
      font-size: 11px;
      font-weight: 600;
      flex-shrink: 0;
    }

    .agy-artifact-row {
      gap: 7px;
    }

    .agy-artifact-row:last-child {
      border-bottom: none;
    }

    .agy-artifact-row .agy-file-name {
      flex: 1 1 0;
      color: var(--text);
      font-weight: 600;
    }

    .agy-artifact-row.has-summary .agy-file-name {
      flex: 0 1 auto;
      max-width: 56%;
    }

    .agy-artifact-row-icon {
      font-size: 14px;
      flex-shrink: 0;
    }

    .agy-artifact-kind-badge {
      display: inline-flex;
      align-items: center;
      padding: 2px 7px;
      border-radius: 6px;
      font-size: 10.5px;
      font-weight: 600;
      background: var(--primary-soft);
      border: 1px solid rgba(37, 99, 235, 0.18);
      color: var(--primary);
      flex-shrink: 0;
    }

    .agy-artifact-open-tag {
      font-size: 11.5px;
      font-weight: 600;
      color: var(--primary);
      flex-shrink: 0;
      margin-left: auto;
    }

    .md-file-chip.md-artifact-chip {
      border-color: #3b82f6;
      background: rgba(37, 99, 235, 0.12);
      color: var(--primary);
      font-weight: 700;
    }

    .walkthrough-md-preview {
      font-size: 14px;
      line-height: 1.65;
    }

    .md-inline-video-card {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin: 8px 0;
      padding: 8px;
      border-radius: 12px;
      background: #0f172a;
      border: 1px solid rgba(148, 163, 184, 0.24);
      max-width: 100%;
    }

    .md-inline-video {
      width: 100%;
      max-height: 44vh;
      border-radius: 8px;
      background: #020617;
      display: block;
    }

    .file-preview-video {
      width: 100%;
      max-width: 100%;
      max-height: 54dvh;
      border-radius: 10px;
      background: #020617;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
      transition: max-height 0.22s ease;
    }

    #inChatFileSheet .sheet-panel.sheet-expanded .file-preview-video {
      max-height: 74dvh;
    }

    .media-toolbar-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 6px 12px;
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.35);
      background: rgba(30, 41, 59, 0.85);
      color: #e2e8f0;
      font-size: 12px;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
    }

    .media-toolbar-pill:active {
      transform: scale(0.97);
    }/* ==================== DSH 滑卡批阅模式 (Triage Swipe Deck) — 独立命名空间样式 ==================== */

/* 列表筛选栏最左侧：低调正方形 4 格小方块入口按钮 */
.triage-grid-entry-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--subtle);
  color: var(--muted);
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.16s ease;
}

.triage-grid-entry-btn:hover {
  color: var(--text);
  border-color: #cbd5e1;
}

.triage-grid-entry-btn:active {
  transform: scale(0.93);
}

.triage-grid-entry-btn .triage-grid-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f97316;
  border: 1.5px solid var(--surface);
  pointer-events: none;
}

/* 滑卡全屏覆盖层（挂载于 .primary-pane 内，z-index 低于 ChatStage(45) 与文件抽屉，完美衔接） */
.dsh-triage-overlay {
  position: absolute;
  inset: 0;
  z-index: 36;
  display: none;
  flex-direction: column;
  background: #eef2f8;
  color: #0f172a;
  padding: max(12px, var(--safe-top, 12px)) 18px calc(16px + var(--safe-bottom, 0px));
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.dsh-triage-overlay.open {
  display: flex;
}

/* 极简顶栏 */
.dsh-triage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  flex-shrink: 0;
  z-index: 30;
  gap: 8px;
}

.dsh-triage-top-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  height: 34px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: opacity 0.15s, transform 0.1s, border-color 0.15s;
  white-space: nowrap;
}

.dsh-triage-top-pill:active:not(:disabled) {
  transform: scale(0.96);
}

.dsh-triage-top-pill:disabled {
  opacity: 0.36;
  cursor: default;
}

.dsh-triage-top-pill.grace-active {
  background: #fff7ed;
  border-color: #fb923c;
  color: #ea580c;
}

.dsh-triage-center-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.dsh-triage-count-chip {
  background: #0f172a;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

/* 微倾 ±1.2° + 呼吸流光折射边缘叠卡舞台 */
@keyframes dshTriageFlowGlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes dshTriageShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.dsh-triage-shake {
  animation: dshTriageShake 0.24s ease-in-out 2;
}

.dsh-triage-stack {
  position: relative;
  flex: 1;
  margin: 12px 4px 4px;
  min-height: 0;
  perspective: 1000px;
}

.dsh-triage-back-card {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  padding: 2.2px;
  pointer-events: none;
  will-change: transform, opacity;
  transform-origin: 50% 92%;
  background-size: 300% 300%;
  animation: dshTriageFlowGlow 4.2s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s, box-shadow 0.25s;
}

.dsh-triage-back-inner {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  padding: 15px;
  overflow: hidden;
}

/* 右侧微倾 +1.25deg / 5px 下一张卡 */
.dsh-triage-back-card.layer-right {
  z-index: 5;
  background-image: linear-gradient(125deg, #38bdf8, #34d399, #818cf8, #fb7185, #38bdf8);
  box-shadow: 4px 3px 16px -2px rgba(56, 189, 248, 0.28), 0 8px 20px -8px rgba(99, 102, 241, 0.16);
  transform: translate3d(5px, 2px, 0) scale(0.984) rotate(1.25deg);
}

.dsh-triage-back-card.layer-right.following {
  transition: none !important;
}

/* 左侧微倾 -1.2deg / -5px 第 3 张卡 */
.dsh-triage-back-card.layer-left {
  z-index: 3;
  animation-delay: -2s;
  background-image: linear-gradient(125deg, #a78bfa, #fb923c, #38bdf8, #34d399, #a78bfa);
  box-shadow: -4px 4px 16px -2px rgba(167, 139, 250, 0.26), 0 8px 20px -8px rgba(251, 146, 60, 0.14);
  transform: translate3d(-5px, 3.5px, 0) scale(0.974) rotate(-1.2deg);
}

/* 深层第 4 张 +2.0deg */
.dsh-triage-back-card.layer-deep {
  z-index: 1;
  animation-delay: -1s;
  background-image: linear-gradient(125deg, #34d399, #38bdf8, #f472b6, #34d399);
  opacity: 0.68;
  transform: translate3d(7.5px, 5px, 0) scale(0.964) rotate(2.0deg);
}

.dsh-triage-stack.dragging-right .dsh-triage-back-card.layer-right {
  box-shadow: 7px 4px 24px rgba(16, 185, 129, 0.44), 0 10px 26px rgba(56, 189, 248, 0.25);
}

.dsh-triage-stack.dragging-left .dsh-triage-back-card.layer-left {
  box-shadow: -7px 4px 24px rgba(99, 102, 241, 0.38), 0 10px 26px rgba(251, 146, 60, 0.22);
}

/* 当前顶层主卡 */
.dsh-triage-fg-card {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 28px;
  box-shadow: 0 14px 34px -8px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  touch-action: pan-y;
  transform-origin: 50% 92%;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.dsh-triage-fg-card.dragging {
  transition: none !important;
}

.dsh-triage-fg-card.is-high {
  border-color: #fda4af;
  border-width: 1.5px;
}

@keyframes dshTriageSnoozeArc {
  0%   { transform: translate3d(-110px, 0, 0) rotate(-9deg); opacity: 1; z-index: 10; }
  55%  { transform: translate3d(-150px, 5px, 0) scale(0.95) rotate(-12deg); opacity: 0.72; z-index: 1; }
  100% { transform: translate3d(-5px, 3.5px, 0) scale(0.974) rotate(-1.2deg); opacity: 0; z-index: 1; }
}

.dsh-triage-fg-card.tucking {
  animation: dshTriageSnoozeArc 0.33s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
  pointer-events: none;
}

/* 顶部拖拽实时状态提示胶囊 */
.dsh-triage-drag-pill {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%) scale(0.92);
  z-index: 80;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s, transform 0.12s;
  white-space: nowrap;
}

.dsh-triage-drag-pill.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* 卡片内部结构（中部自适应，仅当超多选项溢出时局部允许内部滚动，卡片整体 Y 轴严禁位移） */
.dsh-triage-body {
  flex: 1;
  min-height: 0;
  padding: 15px 15px 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.dsh-triage-body::-webkit-scrollbar {
  display: none;
}

.dsh-triage-hdr {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.dsh-triage-hdr-info {
  flex: 1;
  min-width: 0;
}

.dsh-triage-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.dsh-triage-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dsh-triage-open-chat {
  border: none;
  background: #f1f5f9;
  color: #475569;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.dsh-triage-sub {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dsh-triage-snooze-tag {
  background: #e2e8f0;
  color: #334155;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
}

/* 我问的内容 + 缩略图角标 */
.dsh-triage-my-ask {
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 13px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  flex-shrink: 0;
}

.dsh-triage-my-ask-body {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #334155;
  line-height: 1.44;
}

.dsh-triage-clamp2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.dsh-triage-clamp3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.dsh-triage-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  color: #475569;
}

.dsh-triage-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dsh-triage-thumb-count {
  position: absolute;
  right: 2px;
  bottom: 2px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 4px;
}

/* AI 结论 / 意图核心标题 */
.dsh-triage-headline {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.38;
  color: #0f172a;
  margin: 0;
  flex-shrink: 0;
}

/* 命令框 / 结论预览框 */
.dsh-triage-cmd-box {
  background: #f8fafc;
  border: 1.2px solid #cbd5e1;
  border-radius: 14px;
  padding: 8px 11px;
  flex-shrink: 0;
}

.dsh-triage-cmd-box.high {
  background: #fffafb;
  border-color: #fecdd3;
}

.dsh-triage-cmd-reason {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  padding-bottom: 5px;
  margin-bottom: 5px;
  border-bottom: 1px solid #e2e8f0;
}

.dsh-triage-cmd-box.high .dsh-triage-cmd-reason {
  color: #e11d48;
  border-bottom-color: #ffe4e6;
}

.dsh-triage-cmd-mono {
  font-family: var(--mono, "SF Mono", Menlo, monospace);
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.46;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dsh-triage-hl-danger {
  background: #fee2e2;
  color: #dc2626;
  padding: 1px 4px;
  border-radius: 4px;
}

.dsh-triage-reply-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #334155;
  cursor: pointer;
  flex-shrink: 0;
}

.dsh-triage-reply-card.interrupted {
  background: #fffbeb;
  border-color: #fde68a;
}

/* 代码改动单行折叠条 */
.dsh-triage-diff-bar {
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 11px;
  padding: 7px 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  flex-shrink: 0;
}

/* Harness 原生选项列表 */
.dsh-triage-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.dsh-triage-opt {
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 13px;
  padding: 9px 11px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
}

.dsh-triage-opt.sel-green {
  border-color: #10b981;
  background: #ecfdf5;
}

.dsh-triage-opt.sel-blue {
  border-color: #3b8226;
  border-color: #3b82f6;
  background: #eff6ff;
}

.dsh-triage-dot {
  width: 17px;
  height: 17px;
  border-radius: 9px;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  color: #ffffff;
  font-weight: 800;
}

.dsh-triage-dot.sq {
  border-radius: 5px;
}

.dsh-triage-opt.sel-green .dsh-triage-dot {
  border-color: #10b981;
  background: #10b981;
}

.dsh-triage-opt.sel-blue .dsh-triage-dot {
  border-color: #2563eb;
  background: #2563eb;
}

/* 自定义行：短按打字 · 长按说话 */
.dsh-triage-custom {
  border: 1.5px solid #fed7aa;
  background: #fffaf5;
  border-radius: 14px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
  -webkit-touch-callout: none;
}

.dsh-triage-custom.sel {
  border-color: #f97316;
  background: #fff7ed;
  border-width: 2px;
}

.dsh-triage-custom.sel .dsh-triage-dot {
  border-color: #f97316;
  background: #f97316;
}

.dsh-triage-custom.rec {
  border-color: #ea580c;
  background: #ffedd5;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.dsh-triage-mic-chip {
  background: #ffedd5;
  color: #c2410c;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.dsh-triage-custom.rec .dsh-triage-mic-chip {
  background: #ea580c;
  color: #ffffff;
}

.dsh-triage-ta {
  width: 100%;
  border-radius: 9px;
  border: 1px solid #fdba74;
  background: #ffffff;
  padding: 7px 9px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  color: #0f172a;
  resize: none;
  line-height: 1.42;
  user-select: text;
  -webkit-user-select: text;
}

/* 卡片底部一体化双按钮栏（左搁置 + 右确认） */
.dsh-triage-dock {
  flex-shrink: 0;
  padding: 11px 14px 14px;
  background: #f8fafc;
  border-top: 1px solid #eef2f6;
  display: flex;
  align-items: center;
  gap: 10px;
  touch-action: pan-y;
}

.dsh-triage-btn-snooze {
  height: 50px;
  padding: 0 15px;
  border-radius: 25px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 0.1s;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.dsh-triage-btn-snooze:active {
  transform: scale(0.96);
}

.dsh-triage-btn-confirm {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 50px;
  border-radius: 25px;
  border: none;
  overflow: hidden;
  background: linear-gradient(90deg, #10b981, #059669);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(5, 150, 105, 0.24);
  transition: all 0.16s;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.dsh-triage-btn-confirm:active {
  transform: scale(0.98);
}

.dsh-triage-btn-confirm.blue {
  background: linear-gradient(90deg, #2563eb, #4f46e5);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.24);
}

.dsh-triage-btn-confirm.orange {
  background: linear-gradient(90deg, #f97316, #ea580c);
  box-shadow: 0 6px 14px rgba(234, 88, 12, 0.25);
}

.dsh-triage-btn-confirm.crimson {
  background: linear-gradient(90deg, #e11d48, #be123c);
  box-shadow: 0 6px 14px rgba(225, 29, 72, 0.25);
}

.dsh-triage-btn-confirm.locked {
  background: #e2e8f0;
  color: #64748b;
  box-shadow: none;
}

.dsh-triage-btn-prog {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.34);
  pointer-events: none;
}

.dsh-triage-btn-t1 {
  position: relative;
  z-index: 2;
  font-size: 14px;
  font-weight: 800;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dsh-triage-btn-t2 {
  position: relative;
  z-index: 2;
  font-size: 10px;
  opacity: 0.9;
  font-weight: 600;
}

/* 滑卡内部弹出层（完整提问+原图 / 代码改动文件列表 / 完整回复：支持上拉放大至 94% 全屏 + 丝滑原生滚动） */
.dsh-triage-modal {
  position: absolute;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.dsh-triage-modal.open {
  display: flex;
}

.dsh-triage-modal-sheet {
  width: 100%;
  height: 68%;
  max-height: 94%;
  min-height: 44%;
  background: #ffffff;
  color: #0f172a;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 34px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: height 0.25s cubic-bezier(0.22, 1, 0.36, 1), transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.2s;
}

.dsh-triage-modal-sheet.expanded {
  height: 94%;
  border-radius: 18px 18px 0 0;
}

.dsh-triage-modal-sheet.sheet-dragging {
  transition: none !important;
}

.dsh-triage-modal-hdr {
  flex-shrink: 0;
  padding: 9px 16px 10px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  cursor: ns-resize;
  touch-action: none;
}

.dsh-triage-sheet-grabber {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 0 auto 9px;
}

.dsh-triage-modal-hdr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dsh-triage-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dsh-triage-modal-body {
  flex: 1;
  min-height: 0;
  padding: 12px 16px calc(28px + var(--safe-bottom, 0px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  user-select: text;
  -webkit-user-select: text;
}

.dsh-triage-file-row {
  padding: 10px 12px;
  border-radius: 11px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--mono, "SF Mono", Menlo, monospace);
  font-size: 12px;
  color: #0f172a;
  cursor: pointer;
}
