/* Only the Host's negotiated shared topbar enables this layout. The tools
 * stay in its measured free rectangle; the complete title uses the body row. */
.shared-thread-heading:empty { display: none; }
html.native-shared-thread-header .shared-thread-heading { min-width: 0; }
html.native-shared-thread-header .shared-thread-heading #detail-title {
  display: block;
  min-width: 0;
  max-width: 100%;
  padding-block: 6px;
  font-size: calc(var(--font-size-base) + 1px);
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}
html.native-shared-thread-header .shared-thread-heading #detail-title.has-role-menu {
  min-height: 44px;
  padding-inline-end: 20px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%238b9491' stroke-width='1.5'/%3E%3C/svg%3E") right center / 14px no-repeat;
}
html.native-shared-thread-header .thread-context-row { min-height: 0; }
html.native-shared-thread-header .thread-context { display: none; }
/* The original menu consumes the same complete Thread title. A continuous
 * word must not expand its grid track and push actions outside the panel. */
html.native-shared-thread-header .thread-action-sheet {
  padding-top: max(16px, var(--safe-top));
}
html.native-shared-thread-header .thread-action-panel {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  max-height: calc(var(--app-height, 100dvh) - max(16px, var(--safe-top)) - max(16px, var(--safe-bottom)));
}
html.native-shared-thread-header #thread-action-title { overflow-wrap: anywhere; }
html.native-shared-thread-header .topbar-actions {
  gap: 4px;
  border-radius: 24px;
  background: var(--surface-hover);
}
html.native-shared-thread-header .topbar-action {
  width: auto;
  min-width: 44px;
  flex-basis: auto;
  padding-inline: 10px;
  border-radius: 24px;
}
html.native-shared-thread-header .topbar-action > .count-badge {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 21px;
  width: auto;
  height: auto;
  min-height: 21px;
}
/* The original new-attention marker stays distinct from the numeric count. */
html.native-shared-thread-header .topbar-action.has-need-me-new > .need-me-new:not([hidden]) {
  display: block;
  top: 3px;
  right: 3px;
  min-width: 0;
  width: 7px;
  height: 7px;
  padding: 0;
  overflow: hidden;
  color: transparent;
}
