/* 手机：顶栏只留菜单、居中的助手名/主题与设置入口，对话操作在右侧抽屉内成组呈现。 */
.panel-mobile-shortcuts,
.panel-chat-action-icon { display: none; }

@media (max-width: 1023px) {
  /* 顶栏三栏:菜单 | 名字/主题居中 | 设置。两侧等分剩余空间,名字短时严格居中,长时省略不压按钮 */
  #chat-view .topbar { display: grid; grid-template-columns: 1fr auto 1fr; }
  #chat-view .topbar-left { display: contents; }
  #chat-view #btn-chat-drawer { grid-column: 1; justify-self: start; }
  /* 名字/主题贴顶留 8px(名字位置由系统顶部区决定,不随顶栏高度浮动),主题下方只留 4px,顶栏更紧凑 */
  #chat-view .topbar-identity { grid-column: 2; min-width: 0; max-width: none; justify-content: center; align-self: start; margin-top: 8px; }
  #chat-view .topbar-right { grid-column: 3; justify-self: end; }
  #chat-view .topbar-agent-avatar { display: none; }
  #chat-view .topbar-identity-text { align-items: center; text-align: center; }
  #chat-view .topbar-agent-name { max-width: 100%; font-size: 15px; font-weight: 500; color: var(--text-main); letter-spacing: 0.04em; line-height: 1.3; }
  #chat-view .topbar-title-wrap { max-width: 100%; margin: 1px 0 0; }
  #chat-view .topbar-title-wrap .ts-topic-name { font-size: 12px; }

  .panel-mobile-shortcuts {
    display: block;
    padding-bottom: var(--space-5);
    margin-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-glass);
  }
  .panel-mobile-shortcuts h2 {
    margin: 0 0 var(--space-3);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
  }
  .panel-chat-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
  }
  #panel-mobile-actions .icon-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 52px;
    padding: var(--space-3) var(--space-1);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
    white-space: nowrap;
  }
  #panel-mobile-actions .icon-btn:hover,
  #panel-mobile-actions .icon-btn:active { background: var(--bg-surface-hover); }
  #panel-mobile-actions .icon-btn:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
  }
  #panel-mobile-actions .icon-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-muted);
  }
  #panel-mobile-actions .panel-chat-action-icon { display: block; }
  #panel-mobile-actions .voice-action-label { display: none; }
}
