:root{
  --chat-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --chat-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --chat-text-line: 1.48;
  --chat-meta-line: 1.28;
}

body,
button,
input,
textarea,
select{
  font-family: var(--chat-font-sans);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0;
}

#chatContainer,
#privateChatContainer,
#privateDialogs,
.private-watch-chat-log{
  font-family: var(--chat-font-sans);
}

.msg{
  margin-block: 4px;
  padding: 8px 10px;
  line-height: var(--chat-text-line);
  font-weight: 450;
  word-break: normal;
  overflow-wrap: anywhere;
}

.msg-top{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: var(--chat-meta-line);
  font-weight: 650;
}

.msg-user{
  font-weight: 780;
}

.msg-meta,
.msg-e2e-badge{
  font-size: 0.92em;
  line-height: var(--chat-meta-line);
  font-weight: 650;
}

.msg-body{
  line-height: var(--chat-text-line);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.msg.system{
  line-height: 1.42;
  font-style: normal;
  font-weight: 600;
}

.msg-quote,
.reply-preview-body,
.msg-translation,
#privateChatContainer .msg .msg-translation,
.private-watch-msg .msg-translation{
  line-height: 1.42;
}

.msg-quote-author,
.reply-preview-body strong{
  line-height: var(--chat-meta-line);
  font-weight: 800;
}

.msg-quote-text,
.reply-preview-body span{
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.composer-form textarea,
.composer-form input,
.private-watch-chat-form textarea,
.private-telegram-form textarea{
  font-family: var(--chat-font-sans);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 450;
}

.composer-form textarea::placeholder,
.composer-form input::placeholder,
.private-watch-chat-form textarea::placeholder,
.private-telegram-form textarea::placeholder{
  font-weight: 450;
}

#composer button,
#privateComposer button,
.composer-history-suggestion,
.user-context-menu-btn,
.relations-open-btn{
  line-height: 1.2;
  font-weight: 750;
}

.private-title-main,
.private-dialog-title{
  line-height: 1.25;
  font-weight: 800;
}

.private-dialog-title{
  font-size: 14px;
}

.private-dialog-preview,
.private-dialog-presence{
  line-height: 1.36;
  font-weight: 600;
}

.private-dialog-preview-message{
  overflow-wrap: anywhere;
}

.chat-day-separator{
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0;
}

.public-group-share-card__copy strong,
.birthday-cake-head strong,
.private-birthday-slice-copy strong{
  line-height: 1.25;
  font-weight: 800;
}

.msg code,
.msg pre,
.msg kbd,
.msg samp{
  font-family: var(--chat-font-mono);
  font-size: 0.94em;
}

@media (max-width: 700px){
  .msg{
    max-width: 96%;
    padding: 8px 10px;
    line-height: 1.44;
  }

  .msg-body{
    line-height: 1.44;
  }

  .msg-top{
    font-size: 11.5px;
  }
}
