/* 自适应: loaded last. Labels never break into vertical columns or get cut off at any window
   width; rows that would not fit scroll sideways instead, and the smallest text stays readable. */

/* Top bar: view tabs shrink and scroll; actions keep their words on one line. */
.workspace .topbar { min-width: 0; }
.workspace .topbar .product-views { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.workspace .topbar .product-views::-webkit-scrollbar { display: none; }
.workspace .topbar .product-views button { flex: 1 0 auto; white-space: nowrap; }
.workspace .top-actions { flex-shrink: 0; min-width: 0; }
.workspace .top-actions > *, .workspace .top-actions button, .workspace .topbar .sidebar-toggle { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 1100px) {
  /* Icon buttons drop their caption; the caption stays as the accessible name. */
  .workspace .top-actions button:has(> svg) > span, .workspace .topbar .sidebar-toggle > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .workspace .top-actions { gap: 6px; }
  .workspace .topbar .brand small { display: none; }
}

/* Assistant column: tabs scroll instead of cutting the last one; header buttons stay inside. */
.assistant-tabs { overflow-x: auto; scrollbar-width: none; }
.assistant-tabs::-webkit-scrollbar { display: none; }
.assistant-tabs button { flex-shrink: 0; white-space: nowrap; }
.assistant-heading { min-width: 0; }
.assistant-heading > * { flex-shrink: 0; }
.assistant-heading .assistant-title { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-key-hint { padding-right: 96px; }  /* Clear of the floating 终端 button. */

/* Sidebar rows: left-aligned, long names end in an ellipsis instead of being cut mid-letter. */
.project-row-name, .thread-row { display: block; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Buttons with a long caption wrap inside the button rather than spill out of it. */
button { max-width: 100%; min-width: 0; }
button:not(.product-views button):not(.assistant-tabs button):not(.top-actions button):not(.project-row-name):not(.thread-row) { overflow-wrap: anywhere; }

/* Nothing smaller than 11px. */
.eyebrow, .count, .nav-label, .gateway-chip, .guardian-badge, .chat-key-hint, .mentor-eyebrow { font-size: 11px; }
