#mobile-menu {
  display: none;
}
.chat-workspace .conversation {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-workspace .compose {
  flex: 0 0 auto;
}
.chat-workspace .messages {
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
.chat-workspace .compose textarea {
  overflow-y: auto;
  max-height: min(140px, 25dvh);
}
.workspace-header,
.chat-toolbar,
.room-banner,
.conversation-tabs {
  flex-shrink: 0;
}
.compact-chat-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.compact-chat-menu button {
  min-height: 48px;
  white-space: normal;
  margin: 0 !important;
}
@media (max-width: 1100px) {
  .chat-workspace .workspace-header {
    min-height: 52px;
    padding: 4px 10px;
    gap: 8px;
  }
  .workspace-header .brand {
    display: none;
  }
  .chat-workspace .room-picker {
    min-width: 0;
    flex: 1;
    max-width: 50%;
    min-height: 44px;
    padding: 6px 10px;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .chat-workspace .account-menu {
    max-width: 30%;
    min-height: 44px;
    padding: 6px 10px;
    font-size: 14px;
  }
  #mobile-menu {
    display: block;
    min-height: 44px;
    padding: 6px 12px;
  }
  .chat-workspace .chat-toolbar {
    display: flex;
    padding: 0 10px 4px;
    gap: 8px;
    min-height: 0;
  }
  .chat-toolbar > button:not(#people-toggle):not(#whisper-list-button) {
    display: none;
  }
  .chat-workspace .chat-toolbar button {
    flex: 1;
    min-height: 40px;
    padding: 5px 10px;
    font-size: 14px;
  }
  .chat-workspace .room-banner {
    display: flex;
    padding: 2px 12px;
    min-height: 20px;
    justify-content: flex-end;
  }
  .room-banner > div {
    display: none;
  }
  .chat-workspace #connection {
    max-width: none;
    font-size: 11px;
    white-space: nowrap;
  }
  .chat-workspace .conversation-context {
    display: none;
  }
  .conversation-tabs:has(> button:only-child) {
    display: none;
  }
  .chat-workspace .conversation-tabs {
    min-height: 0;
    padding: 3px 8px;
    gap: 5px;
    overflow-x: auto;
  }
  .chat-workspace .conversation-tabs button {
    min-height: 36px;
    padding: 5px 10px;
    font-size: 14px;
  }
  .chat-workspace .messages {
    padding: 6px 10px;
  }
  .chat-workspace .compose {
    padding: 5px 6px max(5px, env(safe-area-inset-bottom));
  }
  .chat-workspace .compose-row {
    padding: 2px;
    gap: 3px;
  }
  .chat-workspace .compose textarea {
    min-height: 44px;
    font-size: 16px;
    line-height: 22px;
    padding: 10px 6px;
    resize: none;
  }
  .chat-workspace .compose-row > button {
    min-height: 44px;
    height: 44px;
    min-width: 40px;
  }
  .chat-workspace .send-button {
    min-width: 64px !important;
    height: 44px;
  }
  .chat-workspace .composer-tools {
    display: none;
  }
  .chat-workspace .jump-latest {
    bottom: 75px;
  }
  .chat-workspace .participants {
    top: 52px;
    bottom: 0;
    max-height: none;
  }
}
@media (max-width: 1100px), (pointer: coarse) {
  .chat-composing .chat-workspace .chat-toolbar,
  .chat-composing .chat-workspace .room-banner {
    display: none;
  }
  .chat-composing .chat-workspace .composer-tools {
    display: none;
  }
  .chat-composing .chat-workspace .workspace-header {
    min-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
  }
  .chat-composing .chat-workspace .compose {
    padding-bottom: 4px;
  }
}

@media (max-width: 1100px), (pointer: coarse) {
  #modal {
    position: fixed;
    top: var(--chat-top, 0px);
    bottom: auto;
    margin: 12px auto;
    max-height: calc(var(--chat-height, 100dvh) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
