#privateChatLauncher {
  margin: 12px 0;
}

#privateChatDialog {
  width: min(920px, 96vw);
  max-height: 90dvh;
  padding: 18px;
  border: 1px solid #b9ac99;
  border-radius: 16px;
  background: #fff9f0;
  color: #29241c;
}

#privateChatDialog::backdrop {
  background: rgba(0, 0, 0, .55);
}

.private-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.private-chat-header h2 {
  margin: 0;
}

.private-chat-layout {
  display: grid;
  grid-template-columns: minmax(180px, 250px) 1fr;
  gap: 18px;
}

.private-chat-layout aside {
  min-width: 0;
  overflow: auto;
}

.private-chat-contact {
  display: block;
  width: 100%;
  margin: 6px 0;
  text-align: left;
}

.private-chat-thread {
  min-width: 0;
}

#privateChatMessages {
  height: min(43vh, 420px);
  overflow-y: auto;
  padding: 12px;
  background: white;
  border-radius: 12px;
}

.private-chat-bubble {
  padding: 10px;
  margin: 8px 0;
  background: #e3eddd;
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.private-chat-bubble p {
  white-space: pre-wrap;
}

.private-chat-report {
  display: block;
  margin-top: 6px;
  padding: 4px 8px;
  font-size: 12px;
  background: #755b46;
}

#privateChatForm {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
}

#privateChatForm input {
  min-width: 0;
}

@media (max-width: 680px) {
  #privateChatDialog {
    padding: 10px;
  }

  .private-chat-layout {
    grid-template-columns: 1fr;
  }

  #privateChatMessages {
    height: 30vh;
  }
}
