/* Mobile shell. Uses tokens.css variables; no raw colors/sizes. */
.mobile-shell,
.mobile-shell * {
  box-sizing: border-box;
}

.mobile-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-main);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
}

.mobile-shell__content {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(
    var(--layout-header-height) + env(safe-area-inset-bottom, 0px) + var(--space-2xl)
  );
}

.mobile-tab-bar {
  position: fixed;
  z-index: var(--z-header);
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: var(--layout-header-height);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--color-bg-sidebar);
  border-top: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  box-shadow: var(--shadow-md);
}

.mobile-tab-bar__item {
  appearance: none;
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: var(--layout-header-height);
  padding: var(--space-xs) var(--space-sm);
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-tab-bar__item.is-active {
  color: var(--color-primary-base);
}

.mobile-tab-bar__item:active {
  background: var(--color-primary-light);
}

.mobile-tab-bar__item:focus-visible {
  outline: var(--space-3xs) solid var(--color-focus-ring);
  outline-offset: calc(-1 * var(--space-3xs));
  border-radius: var(--radius-sm);
}

.mobile-tab-bar__icon {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-tight);
}

.mobile-tab-bar__label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-chat-list {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  padding: calc(env(safe-area-inset-top, 0px) + var(--space-lg)) var(--space-lg) var(--space-lg);
}

.mobile-chat-list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-base);
  min-height: var(--layout-header-height);
}

.mobile-chat-list__title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.mobile-chat-list__favorite-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-width: var(--layout-header-height);
  min-height: var(--layout-header-height);
  padding: 0 var(--space-base);
  border: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  border-radius: var(--radius-full);
  background: var(--color-bg-input);
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-base);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-chat-list__favorite-toggle.is-active {
  border-color: var(--color-primary-base);
  background: var(--color-primary-light);
  color: var(--color-primary-base);
}

.mobile-chat-list__favorite-toggle:focus-visible {
  outline: var(--space-3xs) solid var(--color-focus-ring);
  outline-offset: var(--space-3xs);
}

.mobile-chat-list__section {
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
}

.mobile-chat-list__section-title {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.04em;
  line-height: var(--line-height-snug);
  text-transform: uppercase;
}

.mobile-chat-list__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
  width: 100%;
  max-width: 100%;
}

.mobile-chat-card {
  appearance: none;
  display: flex;
  align-items: center;
  gap: var(--space-base);
  width: 100%;
  max-width: 100%;
  min-height: var(--layout-header-height);
  margin: 0;
  padding: var(--space-base);
  border: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-chat-card:hover {
  background: var(--color-bg-card-hover);
}

.mobile-chat-card:active {
  background: var(--color-bg-card-active);
}

.mobile-chat-card.is-focus {
  border-color: var(--color-primary-base);
  background: var(--color-primary-light);
}

.mobile-chat-card:focus-visible {
  outline: var(--space-3xs) solid var(--color-focus-ring);
  outline-offset: var(--space-3xs);
}

.mobile-chat-card__avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: var(--space-3xl);
  height: var(--space-3xl);
  border-radius: var(--radius-full);
  background: var(--color-avatar-user-bg);
  color: var(--color-avatar-user-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

.mobile-chat-card__avatar--agent {
  border-radius: var(--radius-md);
  background: var(--color-avatar-ai-bg);
  color: var(--color-avatar-ai-text);
}

.mobile-chat-card__avatar--hub {
  border-radius: var(--radius-md);
  background: var(--color-avatar-ga-bg);
  color: var(--color-avatar-ga-text);
}

.mobile-chat-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  min-width: 0;
}

.mobile-chat-card__name-row {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  min-width: 0;
}

.mobile-chat-card__name {
  overflow: hidden;
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-chat-card__preview {
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-snug);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-chat-card__favorite,
.mobile-chat-card__pin {
  flex: 0 0 auto;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-tight);
}

.mobile-chat-card__favorite {
  color: var(--color-status-busy);
}

.mobile-chat-card__agent-question {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: var(--space-xl);
  height: var(--space-xl);
  border-radius: var(--radius-full);
  background: var(--color-badge-warning-bg);
  color: var(--color-badge-warning-text);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

.mobile-chat-card__meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2xs);
  min-width: 0;
}

.mobile-chat-card__time {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-tight);
}

.mobile-chat-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--space-xl);
  min-height: var(--space-xl);
  padding: 0 var(--space-2xs);
  border-radius: var(--radius-full);
  background: var(--color-primary-base);
  color: var(--color-bubble-self-text);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

.mobile-chat-card__badge--mention {
  background: var(--color-badge-danger-bg);
  color: var(--color-badge-danger-text);
}

.mobile-chat-list__empty {
  padding: var(--space-xl);
  border: calc(var(--space-3xs) / 2) dashed var(--color-border-subtle);
  border-radius: var(--radius-lg);
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  text-align: center;
}

/* Биометрический экран блокировки PWA */
.biometric-gate {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-overlay) + 1);
  display: grid;
  place-items: center;
  padding: var(--space-lg);
  background: var(--color-bg-backdrop);
}

.biometric-gate__panel {
  width: min(100%, 360px);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin: 0;
  padding: var(--space-xl);
  border: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  background: var(--color-bg-card);
  box-shadow: var(--shadow-lg);
}

.biometric-gate__title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  text-align: center;
}

.biometric-gate__subtitle,
.biometric-gate__message {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  text-align: center;
}

.biometric-gate__message {
  min-height: var(--layout-input-min-height);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.biometric-gate__button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--layout-input-min-height);
  padding: 0 var(--space-base);
  border: var(--space-3xs) solid var(--color-border-default);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.biometric-gate__button:focus-visible {
  outline: var(--space-3xs) solid var(--color-focus-ring);
  outline-offset: var(--space-2xs);
  box-shadow: var(--shadow-focus);
}

.biometric-gate__button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.biometric-gate__button--primary {
  border-color: var(--color-primary-base);
  background: var(--color-primary-base);
  color: var(--color-bubble-self-text);
}

.biometric-gate__button--primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.biometric-gate__button--primary:active:not(:disabled) {
  background: var(--color-primary-active);
}

.biometric-gate__button--secondary {
  border-color: var(--color-border-default);
  background: var(--color-bg-card);
  color: var(--color-text-primary);
}

.biometric-gate__button--secondary:hover {
  background: var(--color-bg-card-hover);
}

.biometric-gate__button--secondary:active {
  background: var(--color-bg-card-active);
}

/* Мобильный экран чата */
.mobile-chat-screen,
.mobile-chat-screen *,
.mobile-thread-overlay,
.mobile-thread-overlay * {
  box-sizing: border-box;
}

.mobile-chat-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0 0 calc(var(--layout-header-height) + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  background: var(--color-bg-main);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--transition-normal);
}

.mobile-chat-screen__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-base);
  min-height: var(--layout-header-height);
  padding: calc(env(safe-area-inset-top, 0px) + var(--space-sm)) var(--space-base) var(--space-sm);
  border-bottom: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  background: var(--color-bg-main);
}

.mobile-chat-screen__back {
  appearance: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--layout-input-min-height);
  height: var(--layout-input-min-height);
  padding: 0;
  border: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: var(--font-size-xl);
  line-height: var(--line-height-tight);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-chat-screen__back:hover {
  background: var(--color-bg-card-hover);
  color: var(--color-text-primary);
}

.mobile-chat-screen__back:active {
  background: var(--color-bg-card-active);
}

.mobile-chat-screen__header-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}

.mobile-chat-screen__title {
  margin: 0;
  overflow: hidden;
  color: var(--color-text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-chat-screen__subtitle {
  margin: 0;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-snug);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-chat-screen__messages {
  flex: 1;
  min-height: 0;
  padding: var(--space-base);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-bg-main);
}

.mobile-chat-screen__message-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  width: 100%;
  max-width: 100%;
}

.mobile-chat-screen__empty,
.mobile-thread-overlay__empty {
  margin: var(--space-xl) auto;
  padding: var(--space-2xl);
  border: calc(var(--space-3xs) / 2) dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
  line-height: var(--line-height-base);
  text-align: center;
}

.mobile-chat-message {
  display: flex;
  align-items: flex-start;
  gap: var(--space-base);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.mobile-chat-message--mine {
  flex-direction: row-reverse;
}

.mobile-chat-message--system {
  display: flex;
  justify-content: center;
  padding: var(--space-sm) 0;
}

.mobile-chat-message__avatar {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: var(--space-3xl);
  height: var(--space-3xl);
  border-radius: var(--radius-full);
  background: var(--color-avatar-ik-bg);
  color: var(--color-avatar-ik-text);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  user-select: none;
}

.mobile-chat-message--agent .mobile-chat-message__avatar {
  border-radius: var(--radius-md);
  background: var(--color-avatar-ai-bg);
  color: var(--color-avatar-ai-text);
}

.mobile-chat-message--mine .mobile-chat-message__avatar {
  background: var(--color-avatar-user-bg);
  color: var(--color-avatar-user-text);
}

.mobile-chat-message__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  min-width: 0;
  max-width: 100%;
}

.mobile-chat-message--mine .mobile-chat-message__body {
  align-items: flex-end;
}

.mobile-chat-message__meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-sm);
  min-width: 0;
  max-width: 100%;
}

.mobile-chat-message--mine .mobile-chat-message__meta {
  justify-content: flex-end;
}

.mobile-chat-message__author {
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

.mobile-chat-message__role {
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-full);
  background: var(--color-badge-subtle-bg);
  color: var(--color-badge-subtle-text);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-tight);
}

.mobile-chat-message--agent .mobile-chat-message__role {
  background: var(--color-badge-info-bg);
  color: var(--color-badge-info-text);
}

.mobile-chat-message__time {
  flex-shrink: 0;
  margin-inline-start: auto;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-tight);
}

.mobile-chat-message__text {
  min-width: 0;
  max-width: 100%;
  padding: var(--space-base) var(--space-lg);
  border: calc(var(--space-3xs) / 2) solid var(--color-bubble-other-border);
  border-radius: var(--radius-lg);
  background: var(--color-bubble-other-bg);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mobile-chat-message__text p {
  margin: 0;
}

.mobile-chat-message--mine .mobile-chat-message__text {
  border: 0;
  background: var(--color-bubble-self-bg);
  color: var(--color-bubble-self-text);
}

.mobile-chat-message__system-text {
  padding: var(--space-2xs) var(--space-base);
  border: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  border-radius: var(--radius-full);
  background: var(--color-bg-card);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-snug);
  text-align: center;
}

.mobile-chat-code-card {
  margin-top: var(--space-sm);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-code);
}

.mobile-chat-code-card__header {
  padding: var(--space-xs) var(--space-base);
  border-bottom: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
}

.mobile-chat-code-card__filename {
  display: block;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-chat-code-card pre {
  margin: 0;
  padding: var(--space-base);
  overflow-x: auto;
  background: var(--color-bg-code);
}

.mobile-chat-code-card pre code {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.mobile-chat-composer {
  flex-shrink: 0;
  padding: var(--space-base);
  border-top: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  background: var(--color-bg-main);
}

.mobile-chat-composer__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: 0;
}

.mobile-chat-composer__row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  min-width: 0;
  padding: var(--space-sm);
  border: calc(var(--space-3xs) / 2) solid var(--color-border-default);
  border-radius: var(--radius-lg);
  background: var(--color-bg-input);
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.mobile-chat-composer__row:hover {
  border-color: var(--color-border-strong);
}

.mobile-chat-composer__row:focus-within {
  border-color: var(--color-border-focus);
  background: var(--color-bg-input-focus);
  box-shadow: var(--shadow-focus);
}

.mobile-chat-composer__textarea {
  flex: 1;
  min-height: var(--layout-input-min-height);
  max-height: calc(var(--layout-input-min-height) * 3);
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: none;
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  resize: none;
  overflow-y: auto;
}

.mobile-chat-composer__textarea::placeholder {
  color: var(--color-text-muted);
}

.mobile-chat-composer__textarea:focus-visible {
  outline: none;
  box-shadow: none;
}

.mobile-chat-composer__attach,
.mobile-chat-composer__send {
  appearance: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--layout-input-min-height);
  height: var(--layout-input-min-height);
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--font-size-lg);
  line-height: var(--line-height-tight);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-chat-composer__attach {
  background: transparent;
  color: var(--color-text-secondary);
}

.mobile-chat-composer__attach:hover {
  background: var(--color-bg-card-hover);
  color: var(--color-text-primary);
}

.mobile-chat-composer__send {
  background: var(--color-primary-base);
  color: var(--color-bubble-self-text);
}

.mobile-chat-composer__send:hover {
  background: var(--color-primary-hover);
}

.mobile-chat-composer__send:active {
  background: var(--color-primary-active);
}

.mobile-chat-composer__send:disabled {
  background: var(--color-bg-card);
  color: var(--color-text-dimmed);
  cursor: not-allowed;
  box-shadow: none;
}

.mobile-chat-composer__hint {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-snug);
  text-align: center;
}

.mobile-chat-screen__back:focus-visible,
.mobile-thread-overlay__close:focus-visible,
.mobile-chat-composer__attach:focus-visible,
.mobile-chat-composer__send:focus-visible {
  outline: var(--space-3xs) solid var(--color-focus-ring);
  outline-offset: var(--space-2xs);
  box-shadow: var(--shadow-focus);
}

/* Тред поверх мобильного чата */
.mobile-thread-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  background: var(--color-bg-main);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--transition-normal);
}

.mobile-thread-overlay__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-base);
  min-height: var(--layout-header-height);
  padding: calc(env(safe-area-inset-top, 0px) + var(--space-sm)) var(--space-base) var(--space-sm);
  border-bottom: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  background: var(--color-bg-sidebar);
}

.mobile-thread-overlay__close {
  appearance: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--layout-input-min-height);
  height: var(--layout-input-min-height);
  padding: 0;
  border: calc(var(--space-3xs) / 2) solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: var(--font-size-lg);
  line-height: var(--line-height-tight);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-thread-overlay__close:hover {
  background: var(--color-bg-card-hover);
  color: var(--color-text-primary);
}

.mobile-thread-overlay__close:active {
  background: var(--color-bg-card-active);
}

.mobile-thread-overlay__title {
  margin: 0;
  overflow: hidden;
  color: var(--color-text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-thread-overlay__messages {
  flex: 1;
  min-height: 0;
  padding: var(--space-base);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-bg-main);
}

.mobile-thread-overlay__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  width: 100%;
  max-width: 100%;
}
