#composer {
  position: relative;
}
.mention-picker {
  position: absolute;
  bottom: calc(100% - 4px);
  left: 20px;
  right: 20px;
  z-index: 20;
  max-height: min(340px, 45dvh);
  overflow: auto;
  background: var(--theme-surface);
  border: 1px solid var(--theme-line);
  border-radius: 12px;
  box-shadow: 0 10px 30px var(--theme-shade);
  padding: 5px;
}
.mention-picker-title {
  color: var(--theme-quiet);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
}
.mention-picker p {
  padding: 8px 10px;
  font-size: 13px;
  color: var(--theme-quiet);
}
.mention-picker button,
.dm-person {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  padding: 8px;
  min-height: 44px;
}
.mention-picker button[aria-selected='true'] {
  background: var(--theme-selected);
}
.mention-picker .avatar,
.dm-person .avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.mention-picker button > span:not(.avatar),
.dm-person > span:not(.avatar) {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.mention-picker small,
.dm-person small {
  color: var(--theme-quiet);
  font-size: 11px;
}
.reply-context {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--theme-soft);
  border-left: 3px solid var(--theme-accent);
  border-radius: 7px;
  margin-bottom: 6px;
  padding: 3px 7px 3px 10px;
  min-width: 0;
}
.reply-context span {
  font-size: 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reply-context button {
  padding: 3px;
  min-height: 30px;
  width: 30px;
}
.message-reply {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--theme-quiet);
  text-decoration: none;
  font-size: 12px;
  max-width: 100%;
  margin-bottom: 4px;
  min-height: var(--message-reply-height, 24px);
}
.message-reply .ui-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.message-reply span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message-reply strong {
  flex-shrink: 0;
  min-width: 0;
  max-width: 35%;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.message-reply:hover {
  color: var(--theme-link);
  text-decoration: underline;
}
.msg {
  --message-action-size: 28px;
  --message-reply-height: 24px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 12px;
  margin-inline: -8px;
  padding: 8px 8px 6px;
  border-radius: 8px;
  line-height: 1.55;
}
.msg + .msg {
  margin-top: 8px;
}
.msg.grouped {
  margin-top: 0;
  padding-block: 3px;
}
.msg:is(:hover, :focus-within) {
  background: color-mix(in srgb, var(--theme-soft) 55%, transparent);
}
.msg .avatar {
  margin-top: 2px;
}
.msg.has-reply .avatar {
  margin-top: calc(var(--message-reply-height) + 6px);
}
.msg .message-content {
  display: flow-root;
  min-width: 0;
}
.grouped .message-content {
  grid-column: 2;
}
.message-actions {
  float: right;
  display: flex;
  gap: 4px;
  margin: -2px 0 0 8px;
  opacity: 0;
}
.msg .message-actions .compact-icon {
  width: var(--message-action-size);
  min-width: var(--message-action-size);
  height: var(--message-action-size);
  min-height: var(--message-action-size);
  padding: 0;
}
.msg:is(:hover, :focus-within) .message-actions {
  opacity: 1;
}
.meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
  min-height: 20px;
}
.meta b {
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
}
.message-author {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.msg time {
  flex-shrink: 0;
  color: var(--theme-quiet);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.grouped-time {
  grid-column: 1;
  grid-row: 1;
  text-align: center;
  align-self: start;
  padding-top: 4px;
  opacity: 0;
}
.msg .grouped-time {
  font-size: 10px;
}
.grouped:is(:hover, :focus-within) .grouped-time {
  opacity: 1;
}
.messageBody {
  max-width: 76ch;
  font-size: 15px;
  color: var(--theme-ink);
  overflow-wrap: anywhere;
}
.meta + .messageBody {
  clear: both;
}
.messageBody > :is(pre, table, blockquote, ul, ol, hr),
.message-content > :is(.message-media, .link-previews) {
  clear: both;
}
.day-divider {
  font-size: 11px;
  font-weight: 500;
  margin: 20px 0 10px;
  color: var(--theme-quiet);
}
@media (max-width: 700px), (hover: none), (pointer: coarse) {
  .msg {
    --message-action-size: 44px;
    --message-reply-height: 44px;
    grid-template-columns: 32px minmax(0, 1fr);
    column-gap: 10px;
  }
  .message-actions {
    margin-top: 0;
    opacity: 1;
  }
  .meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 4px;
  }
  .meta b {
    width: 100%;
  }
  .grouped-time {
    opacity: 1;
  }
}
.messageBody .message-mention {
  display: inline;
  min-height: 0;
  padding: 1px 4px;
  border: 0;
  border-radius: 4px;
  background: var(--theme-selected);
  color: var(--theme-link);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.messageBody .mention-self {
  color: var(--theme-on-accent);
  background: var(--theme-accent);
}
.msg.mentions-you {
  box-shadow: inset 3px 0 var(--theme-accent);
  background: var(--theme-card);
}
.msg.message-jump {
  outline: 2px solid var(--theme-accent);
  background: var(--theme-selected);
  border-radius: 8px;
}
.unread-badge.mention-badge {
  background: var(--theme-accent);
  color: var(--theme-on-accent);
}
.channel .dm-avatar {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.dm-channel-row {
  position: relative;
  min-width: 0;
}
#sidebar .dm-channel-row > .channel {
  padding-right: calc(var(--sidebar-action-inset) + var(--sidebar-action-size) + 8px);
}
.dm-close.compact-icon {
  position: absolute;
  right: var(--sidebar-action-inset);
  top: 50%;
  transform: translateY(-50%);
  width: var(--sidebar-action-size);
  min-width: var(--sidebar-action-size);
  height: var(--sidebar-action-size);
  min-height: var(--sidebar-action-size);
  padding: 0;
  color: var(--theme-quiet);
  opacity: 0;
}
.dm-channel-row:hover .dm-close,
.dm-channel-row:focus-within .dm-close,
.dm-channel-row.active .dm-close {
  opacity: 1;
}
@media (max-width: 700px), (hover: none), (pointer: coarse) {
  #sidebar .dm-channel-row > .channel {
    min-height: 44px;
  }
  .dm-close.compact-icon {
    opacity: 1;
  }
}
.person-dm.compact-icon {
  width: 28px;
  min-width: 28px;
  height: 30px;
  min-height: 30px;
  padding: 5px;
  opacity: 0.7;
}
.person-row:hover .person-dm,
.person-dm:focus-visible {
  opacity: 1;
}
#directMessageSearch {
  width: 100%;
  margin: 8px 0 12px;
}
.dm-picker {
  max-height: 50dvh;
  overflow: auto;
}
#directMessageDialog,
#peopleDialog {
  height: min(640px, calc(100dvh - 48px));
}
#directMessageDialog[open],
#peopleDialog[open] {
  display: flex;
  flex-direction: column;
}
:is(#directMessageDialog, #peopleDialog) > .dialog-heading {
  flex-shrink: 0;
}
#directMessageDialog .dm-picker,
#peopleDialog #onlineSection {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
#directMessageFeedback {
  flex-shrink: 0;
}
#onlineSection .person-row {
  height: 48px;
  min-height: 48px;
}
.person-copy :is(strong, small) {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.person-row .media-indicators {
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.preview-option {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--theme-quiet);
}
.preview-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--theme-accent);
}
.link-previews {
  display: grid;
  gap: 6px;
  max-width: 480px;
}
.link-previews:empty {
  min-height: 1px;
}
.link-preview-card {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--theme-ink);
  background: var(--theme-surface);
  margin-top: 7px;
}
.link-preview-card:hover {
  border-color: var(--theme-accent);
}
.link-preview-card > img {
  width: 125px;
  max-height: 155px;
  object-fit: cover;
  flex-shrink: 0;
}
.link-preview-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 5px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}
.link-preview-copy small {
  color: var(--theme-link);
  font-size: 10px;
  font-weight: 700;
}
.link-preview-copy strong {
  font-size: 13px;
  line-height: 1.4;
}
.link-preview-copy > span {
  font-size: 11px;
  line-height: 1.5;
  color: var(--theme-quiet);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.link-preview-copy .preview-play {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--theme-link);
}
.preview-play .ui-icon {
  width: 13px;
  height: 13px;
}
.preview-remove {
  font-size: 10px;
  padding: 2px;
  min-height: 24px;
  justify-self: start;
}
@media (max-width: 700px) {
  .mention-picker {
    left: 10px;
    right: 10px;
  }
  .link-preview-card {
    flex-direction: column;
  }
  .link-preview-card > img {
    width: 100%;
    height: 145px;
  }
}
/* Feedback occupies bounded space above retained dialog controls. */
.panel-feedback {
  height: 48px;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.panel-feedback > p {
  margin: 6px 0 0;
}
#accountDialog {
  height: min(760px, calc(100dvh - 48px));
  overflow: hidden;
}
#accountDialog[open] {
  display: flex;
  flex-direction: column;
}
#accountDialog > .dialog-heading,
.account-dialog-footer {
  flex-shrink: 0;
}
.account-dialog-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.account-dialog-footer > button {
  width: 100%;
}
.account-link-result {
  height: 64px;
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.account-dialog-footer {
  padding-top: 12px;
  border-top: 1px solid var(--theme-line);
}
#inviteDialog {
  height: min(540px, calc(100dvh - 48px));
  overflow: hidden;
}
#inviteDialog[open] {
  display: flex;
  flex-direction: column;
}
#inviteDialog > .dialog-heading {
  flex-shrink: 0;
}
#inviteDialog > p {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.invite-action-area {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 190px;
  flex-shrink: 0;
}
.invite-action-area > button {
  width: 100%;
}
.invite-expiry {
  height: 40px;
  overflow-y: auto;
}
.invite-expiry > p {
  margin: 6px 0;
}
.invite-reset {
  height: 36px;
  flex-shrink: 0;
}
#voiceDialog {
  height: min(540px, calc(100dvh - 48px));
  overflow: hidden;
}
#voiceDialog[open] {
  display: flex;
  flex-direction: column;
}
#voiceDialog > :not(#voiceForm) {
  flex-shrink: 0;
}
#voiceForm {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
#voiceForm > :not(#voiceFormFeedback) {
  flex-shrink: 0;
}
#voiceFormFeedback {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
#voiceForm > .channel-form-actions {
  margin-top: auto;
}
#deleteMessageDialog {
  height: min(440px, calc(100dvh - 48px));
  overflow: hidden;
}
#deleteMessageDialog[open] {
  display: flex;
  flex-direction: column;
}
#deleteMessagePreview {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}
#deleteMessageFeedback {
  max-height: 80px;
  overflow-y: auto;
  overflow-wrap: anywhere;
}
#deleteMessageDialog > .dialog-actions {
  flex-shrink: 0;
}

#userProfile {
  width: min(360px, calc(100vw - 32px));
  padding: 20px;
}
.profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
}
#profileAvatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
}
.profile-copy {
  min-width: 0;
  flex: 1;
}
#profileName,
#profileActualName {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}
#profileName {
  font-size: 20px;
}
#profileActualName {
  color: var(--theme-quiet);
  margin-top: 4px;
}
#nicknameForm:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 4px;
}
#profileNickname {
  min-width: 0;
  width: 100%;
}
.profile-footer,
.profile-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.profile-footer {
  height: 44px;
  margin-top: 12px;
}
#profileFeedback {
  flex: 1;
  min-width: 0;
  max-height: 44px;
  overflow: auto;
  margin: 0;
  font-size: 12px;
}
.profile-actions {
  flex: 0 0 auto;
}
.profile-link {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  text-align: inherit;
  min-width: 0;
  border-radius: 4px;
}
.profile-link:hover {
  background: var(--theme-hover);
}
.person-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.profile-avatar {
  padding: 0;
  border: 0;
}
