/* 会话操作始终可见，触屏也不依赖悬停或长按。 */
.sidebar-tabs { display: grid; grid-template-columns: 1fr 1fr; flex-shrink: 0; border-top: 1px solid var(--border); background: var(--panel); padding-bottom: env(safe-area-inset-bottom, 0px); }
.sidebar-tab { display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 8px; border: 0; border-radius: 0; background: transparent; color: var(--text-dim); font: inherit; font-size: 13px; cursor: pointer; }
.sidebar-tab + .sidebar-tab { border-left: 1px solid var(--border); }
.sidebar-tab.active { color: var(--primary); background: var(--primary-soft); }
.sidebar-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }
.sidebar-tab .badge { min-width: 17px; height: 17px; padding: 0 5px; box-shadow: none; animation: none; }
.sidebar-tab [hidden] { display: none !important; }
.ci-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; flex-shrink: 0; }
.ci-time { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.conv-list-error { padding: 18px 14px; font-size: 13px; color: var(--text-dim); }
.conv-list-error button { margin-top: 8px; }
.avatar { position: relative; overflow: hidden; }
.avatar-image { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar-image + .avatar-fallback { display: none; }
.avatar-edit { border: 0; padding: 0; cursor: pointer; font: inherit; color: #fff; overflow: visible; }
.avatar-edit .avatar-image { overflow: hidden; }
.avatar-edit::after { content: '✎'; position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; color: #2563eb; border: 1px solid #cbd5e1; font: 12px/17px system-ui; }
.avatar-edit:focus-visible { outline: 2px solid #2563eb; outline-offset: 4px; }
.avatar-edit:disabled { opacity: .65; cursor: wait; }
.conv-more {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 44px; padding: 0;
  border: 0; border-radius: 12px; color: #64748b; background: transparent;
  font: 700 26px/1 system-ui, sans-serif; cursor: pointer;
}
.conv-more:hover { background: #e8edf5; color: #1e293b; }
.conv-more:focus-visible, .conv-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.conv-item .conv-more { margin-right: -6px; }
.chat-header h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-header .header-actions { align-items: center; }
.end-conv-btn { color: #b91c1c; border-color: #fecaca; background: #fff; min-height: 44px; white-space: nowrap; }
.end-conv-btn:hover { color: #991b1b; background: #fef2f2; border-color: #fca5a5; }
#deleteConvDialog { width: calc(100vw - 32px); max-width: 400px; padding: 24px; }
.conv-sheet-handle { display: none; }
.conv-sheet-label { margin: 0 0 8px; font-size: 12px; color: var(--text-dim); }
#deleteConvDialog h3 { margin: 0 0 10px; font-size: 20px; }
.delete-conv-name { display: inline-block; max-width: 100%; padding: 6px 10px; margin: 0 0 16px; background: #f1f5f9; color: #334155; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; }
.delete-conv-desc { margin: 0 0 10px; font-size: 14px; line-height: 1.7; color: var(--text); }
.delete-conv-note { margin: 0; font-size: 12px; line-height: 1.8; color: var(--text-dim); }
.delete-conv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.delete-conv-actions .btn { min-height: 46px; }
.delete-conv-error { margin-top: 12px; color: #b91c1c; font-size: 13px; line-height: 1.6; }
@media (max-width: 768px) {
  #deleteConvDialog {
    inset: auto 0 0; margin: 0 auto; width: 100%; max-width: 520px;
    max-height: calc(var(--visible-height, 100dvh) - 16px);
    border: 0; border-radius: 24px 24px 0 0;
    padding: 12px 24px max(24px, env(safe-area-inset-bottom));
  }
  .conv-sheet-handle { display: block; width: 36px; height: 4px; margin: 0 auto 18px; background: #cbd5e1; border-radius: 4px; }
  .conv-item .conv-more { margin-right: -8px; }
}
