#messages [hidden] { display: none !important; }
.msg-auth { max-width: 50rem; }
.msg-auth label, .msg-friends label { display: block; font-weight: 700; }
.msg-auth p, .msg-conversation p, .msg-people p { color: var(--muted); }
.msg-auth input:not([type="checkbox"]), .msg-friends input, .msg-auth textarea, .msg-composer textarea {
  width: 100%;
  min-width: 0;
}
.msg-auth textarea, .msg-composer textarea {
  border: 2px solid var(--rule);
  border-radius: .8rem;
  background: var(--recess);
  color: var(--text);
  font: inherit;
  padding: .7rem;
  resize: vertical;
}
.msg-manual textarea, .msg-manual code, #msg-peer-wallet { font-family: var(--numbers); overflow-wrap: anywhere; }
.msg-auth .msg-check { display: flex; gap: .6rem; align-items: center; margin: .8rem 0; }
.msg-check input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
.msg-manual { display: grid; gap: .6rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.msg-manual h3, .msg-manual ol { margin: 0; }
.msg-manual li + li { margin-top: .35rem; }
.msg-manual button { justify-self: start; }
.msg-actions, .msg-person { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.msg-status:empty { margin: 0; }
.msg-status:not(:empty) { padding: .7rem .9rem; border: 1px solid var(--rule); border-radius: .7rem; background: var(--surface); }
.msg-account { justify-content: space-between; }
.msg-layout { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
.msg-friends form, .msg-people { display: grid; gap: .7rem; }
.msg-people { margin-top: 1rem; }
.msg-person button[aria-current] { background: var(--accent); color: var(--ink); border-color: var(--ink); }
.msg-thread-head { padding: 1rem; border-bottom: 1px solid var(--rule); }
.msg-thread-head h2, .msg-thread-head p { margin: 0; }
.msg-thread-head p { font-size: .86rem; }
.msg-older { margin: .65rem 1rem 0; }
.msg-transcript { list-style: none; height: clamp(14rem, 45vh, 32rem); overflow-y: auto; padding: 1rem; margin: 0; }
.msg-transcript li { width: fit-content; max-width: 88%; padding: .6rem .85rem; margin: 0 0 .6rem; border: 1px solid var(--rule); border-radius: .9rem; background: var(--recess); }
.msg-transcript li.msg-own { margin-left: auto; background: var(--accent); color: var(--ink); border-color: var(--ink); }
.msg-transcript li p { margin: 0; color: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-transcript time { display: block; margin-top: .2rem; font-size: .75rem; }
.msg-transcript:empty::before { content: "Start the conversation."; color: var(--muted); }
.msg-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; padding: 1rem; align-items: end; border-top: 1px solid var(--rule); }
@media (max-width: 720px) {
  .msg-layout { grid-template-columns: minmax(0, 1fr); }
  .msg-people { max-height: 14rem; overflow-y: auto; }
  .msg-actions > button { width: 100%; }
  .msg-thread-head { scroll-margin-top: 7rem; }
}

.msg-sidebar { min-width: 0; display: grid; gap: 1rem; }
.msg-sidebar .msg-chat-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  text-align: left;
  padding: .65rem .75rem;
}
.msg-chat-person { min-width: 0; display: grid; gap: .18rem; }
.msg-chat-person strong { overflow-wrap: anywhere; }
.msg-chat-person time, .msg-chat-person small { font-family: var(--body); font-size: .78rem; font-weight: 500; }
.msg-chat-row[aria-current="true"] { color: var(--ink); background: var(--accent); border-color: var(--ink); }
.msg-badge { display: inline-grid; place-items: center; min-width: 1.3rem; min-height: 1.3rem; padding-inline: .27rem; border: 1px solid var(--ink); border-radius: 999px; background: var(--accent); color: var(--ink); font: 800 .75rem/1 var(--body); vertical-align: middle; }
.msg-chat-row[aria-current="true"] .msg-badge { color: var(--accent); background: var(--ink); }
.msg-badge[hidden], .msg-notification[hidden] { display: none; }
#msg-nav-unread { margin-inline-start: .25rem; }
#msg-people:empty { display: none; }
.msg-notification {
  position: fixed;
  z-index: 60;
  inset-block-start: max(1rem, env(safe-area-inset-top));
  inset-inline-end: 1rem;
  width: min(22rem, calc(100% - 2rem));
  padding: 1rem;
  background: var(--surface);
  border-color: var(--ink);
}
.msg-notification p { margin: .25rem 0 .6rem; overflow-wrap: anywhere; }
.msg-notification button { font-size: .8rem; }
.msg-thread-head:focus { outline: none; }
@media (max-width: 720px) {
  .msg-notification .msg-actions > button { width: auto; }
}
.msg-payment-actions { margin-top: .65rem; }
.msg-payment-actions button { font-size: .78rem; }
.msg-transcript li a { color: inherit; font-weight: 750; }

.msg-payment-request details { margin-top: .35rem; }
.msg-payment-request p { margin-block: .35rem; }
#msg-payment-form label { display: block; }
#msg-payment-amount { width: 100%; }
