/* Personal messages: compact list, stable composer and a quiet unread cue. */
#view-pm .pm-row { min-height: 76px; gap: 12px; padding: 14px; }
#view-pm .pm-row.is-unread { border-color: rgba(232, 76, 113, .38); background: linear-gradient(105deg, rgba(116, 28, 57, .25), var(--panel-hard)); }
#view-pm .pm-row.is-unread .pm-last { color: var(--text); }
#view-pm .pm-main { gap: 5px; }
#view-pm .pm-profile-link { display:flex; align-items:center; min-height:44px; color:inherit; text-decoration:underline; text-decoration-color:rgba(244,239,246,.35); text-underline-offset:4px; overflow-wrap:anywhere; letter-spacing:normal; }
#view-pm .pm-profile-link:hover { text-decoration-color:currentColor; }
#view-pm .pm-profile-link:focus-visible { outline:2px solid var(--ember,#ffb36b); outline-offset:3px; border-radius:4px; }
#view-pm .pm-main > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-pm .pm-row-meta { display: flex; align-items: flex-end; flex-direction: column; flex: none; gap: 7px; }
#view-pm .pm-row-meta time { color: var(--muted); font-size: 11px; white-space: nowrap; }
#view-pm .pm-draft-label { color: #f6b9c6; font-style: normal; font-weight: 600; }
#view-pm .pm-thread { position: relative; gap: 8px; }
#view-pm .pm-msgs { overflow-anchor: none; scrollbar-gutter: stable; }
#view-pm .pm-delivery { flex: none; padding: 4px 10px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
#view-pm .pm-delivery.is-error { color: #ffc0cd; padding: 9px 12px; border-left: 2px solid #d35376; background: rgba(102, 31, 58, .24); border-radius: 0 9px 9px 0; }
#view-pm .pm-latest { flex: none; align-self: center; min-height: 36px; padding: 7px 16px; color: #ffe1e8; background: #432133; border: 1px solid #865069; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; }
#view-pm .pm-load-error { margin: auto; max-width: 360px; text-align: center; color: var(--muted); overflow-wrap: anywhere; }
#view-pm #pmInputRow { padding: 6px 8px; align-items: flex-end; }
#view-pm #pmText { font-size: 16px; line-height: 1.45; overscroll-behavior: contain; }
#view-pm #pmSend { flex: none; width: 44px; height: 44px; }
#view-pm #pmSend:disabled { opacity: .55; }
#view-pm .pm-latest[hidden], #view-pm .pm-delivery[hidden] { display: none; }
/* The open dialog is fixed to the visual viewport. Reserve its common footer
   explicitly so it cannot reappear in normal flow behind the translucent header. */
body:has(#view-pm.thread-open.active) { --pm-footer-height: calc(40px + env(safe-area-inset-bottom, 0px)); }
#view-pm.thread-open.active { height: calc(var(--pm-height, 100dvh) - var(--pm-footer-height, 40px)); }
#view-pm.thread-open.active .pm-body { padding-bottom: 8px; }
#view-pm.thread-open.active ~ .community-footer {
  position: fixed; z-index: 51;
  inset: calc(var(--pm-top, 0px) + var(--pm-height, 100dvh) - var(--pm-footer-height, 40px)) 0 auto;
  box-sizing: border-box; height: var(--pm-footer-height, 40px); margin: 0;
  padding: 0 12px env(safe-area-inset-bottom, 0px); gap: 16px; flex-wrap: nowrap;
  border-top: 1px solid rgba(192, 181, 195, .13); background: #140e1b;
  color: #c0b5c3; font-size: 12px; line-height: 1.2;
}
#view-pm.thread-open.active ~ .community-footer a { min-height: 38px; padding: 0 6px; flex: none; }
#view-pm.thread-open.active ~ .community-footer .community-count { min-width: 0; white-space: nowrap; }
@media (max-width: 600px) {
  #view-pm .pm-body { padding-inline: 12px; }
  #view-pm .pm-msg { max-width: 90%; }
  #view-pm .pm-bubble { font-size: 15px; line-height: 1.5; padding: 10px 12px; }
  #view-pm .pm-row { min-height: 76px; padding: 12px; gap: 10px; border-radius: 14px; }
  #view-pm .pm-row-meta time { max-width: 78px; overflow: hidden; text-overflow: ellipsis; }
  #view-pm.thread-open .topbar { margin-bottom: 0; }
  #view-pm.thread-open .pm-body { padding-top: 0; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  #view-pm #pmInputRow { border-radius: 16px; }
  #view-pm .pm-latest { min-height: 40px; }
}
