.conversation-main {
  width: min(100% - 32px, 1100px);
  margin: 38px auto 70px;
}

.conversation-titlebar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  min-height: 164px;
  padding: 32px 40px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.conversation-titlebar h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 600;
  line-height: .86;
  letter-spacing: -.04em;
  text-transform: uppercase;
}

.conversation-titlebar p,
.conversation-titlebar a,
.conversation-user span,
.conversation-compose label,
.conversation-compose span,
.conversation-message span {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.conversation-titlebar p { margin: 14px 0 0; }
.conversation-titlebar p strong { color: var(--text); font-weight: 500; }
.conversation-titlebar a { padding-bottom: 6px; border-bottom: 1px solid var(--accent); color: var(--text); }

.conversation-shell {
  display: grid;
  grid-template-rows: auto minmax(280px, 1fr) auto;
  min-height: min(720px, calc(100dvh - 150px));
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--surface);
}

.conversation-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
}

.conversation-user h2 { margin: 0 0 5px; font-size: 28px; }

.conversation-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: 52dvh;
  padding: 24px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  scrollbar-color: var(--accent) var(--bg);
  scrollbar-width: thin;
}

.conversation-message {
  width: min(78%, 650px);
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.conversation-message.is-unread { border-color: var(--accent); }

.conversation-message p {
  margin: 8px 0 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.conversation-empty {
  margin: auto;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  text-align: center;
  text-transform: uppercase;
}

.conversation-compose {
  display: grid;
  gap: 8px;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
}

.conversation-compose textarea {
  width: 100%;
  min-height: 84px;
  padding: 12px 14px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  outline: 0;
  background: var(--bg);
  color: var(--text);
  caret-color: var(--accent);
  font: inherit;
}

.conversation-compose textarea:focus { border-color: var(--accent); }

.conversation-compose > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.conversation-compose button {
  min-width: 180px;
  height: 44px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: transparent;
  color: var(--accent-bright, #ff4d5b);
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.conversation-compose button:hover:not(:disabled),
.conversation-compose button:focus-visible { background: var(--accent); color: #fff; outline: 0; }
.conversation-compose button:disabled { cursor: wait; opacity: .55; }

@media (max-width: 640px) {
  .conversation-main { width: 100%; margin-top: 12px; }
  .conversation-titlebar { align-items: flex-start; flex-direction: column; min-height: 190px; padding: 28px 18px; }
  .conversation-titlebar h1 { font-size: 2.65rem; }
  .conversation-titlebar p { max-width: 180px; line-height: 1.45; }
  .conversation-titlebar a { align-self: flex-end; white-space: nowrap; }
  .conversation-shell { border-inline: 0; }
  .conversation-user, .conversation-messages, .conversation-compose { padding-inline: 18px; }
  .conversation-user > span { display: none; }
  .conversation-message { width: 94%; }
  .conversation-compose > div { align-items: stretch; flex-direction: column; }
  .conversation-compose button { width: 100%; }
}
