/* One person list, then one conversation, at every screen size. */
.rv-conversations.card,
.rv-web.rv-member.rv-member-app #chatPanel.rv-conversations {
  display:block;
  min-width:0;
  margin:0;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  color:#171514;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:16px;
}
.rv-conversations.hidden { display:none; }
.rv-conversation-list,.rv-conversation-thread { min-width:0; }
.rv-conversation-open .rv-conversation-list,
.rv-conversations:not(.rv-conversation-open) .rv-conversation-thread,
.rv-chat-start { display:none!important; }
.rv-chat-list-heading { padding:4px 0 18px; }
.rv-chat-list-heading h2 { margin:0 0 8px;font-size:22px;line-height:1.25; }
.rv-chat-list-heading p { margin:0;color:#74716b;font-size:15px;line-height:1.5; }
.rv-conversation-row {
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  margin:0 0 12px;
  padding:16px;
  border:1px solid transparent;
  border-radius:24px;
  background:#fff;
  color:#171514;
  text-align:left;
  font:inherit;
  cursor:pointer;
  box-shadow:0 3px 14px #30251407;
}
.rv-conversation-row:hover,.rv-conversation-row.is-active { border-color:#ddd6cb;background:#fffdfa; }
.rv-conversation-row:focus-visible,.rv-chat-round:focus-visible,
.rv-chat-composer button:focus-visible { outline:3px solid #a8444b;outline-offset:3px; }
.rv-conversation-copy { display:flex;flex:1;flex-direction:column;gap:3px;min-width:0; }
.rv-conversation-copy strong { font-size:17px;line-height:1.3; }
.rv-conversation-copy .small { font-size:13px;color:#74716b; }
.rv-conversation-preview { color:#74716b;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.rv-chat-avatar {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:52px;
  height:52px;
  overflow:hidden;
  border-radius:20px;
  background:#bcdee1;
  color:#171514;
  font-size:23px;
  font-weight:600;
}
.rv-chat-avatar img { display:block;width:100%;height:100%;object-fit:cover; }

/* The frame supplies the header/navigation inset; the composer never scrolls
   away with the messages or turns into a separate desktop pane. */
.rv-member-app #chat:has(.rv-conversation-open) {
  height:calc(100dvh - var(--rv-chat-frame-offset, 88px));
  min-height:0;
}
.rv-member-app #chatPanel.rv-conversation-open,
.rv-member-app #chatPanel.rv-conversation-open .rv-conversation-thread {
  height:100%;
  min-height:0;
}
.rv-member-app #chatPanel.rv-conversation-open .rv-conversation-thread {
  display:flex;
  flex-direction:column;
}
.rv-chat-header {
  display:flex;
  align-items:center;
  flex-shrink:0;
  gap:8px;
  min-width:0;
  margin:2px 0 20px;
}
.rv-chat-round {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:44px;
  height:44px;
  padding:0;
  border:0;
  border-radius:50%;
  background:#fff;
  color:#171514;
  font-size:27px;
  font-weight:400;
  line-height:1;
  cursor:pointer;
  list-style:none;
  box-shadow:0 3px 12px #3025140b;
}
.rv-chat-round::-webkit-details-marker { display:none; }
.rv-chat-person-pill {
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  max-width:calc(100% - 104px);
  margin:auto;
  padding:5px 15px 5px 5px;
  border:1px solid #fff;
  border-radius:999px;
  background:linear-gradient(145deg,#fff,#fbfaf8);
  box-shadow:0 4px 13px #30251409,0 0 0 5px #ffffff54;
}
.rv-chat-person-pill .rv-chat-avatar { width:48px;height:48px;border-radius:19px; }
.rv-chat-person-pill>div { min-width:0; }
.rv-chat-person-pill strong { display:block;overflow:hidden;font-size:16px;line-height:1.35;font-weight:650;white-space:nowrap;text-overflow:ellipsis; }
.rv-chat-person-pill .small { display:block;margin-top:3px;overflow:hidden;color:#171514;font-size:14px;line-height:1.3;white-space:nowrap;text-overflow:ellipsis; }
.rv-chat-safety { position:relative;flex:0 0 auto; }
.rv-chat-safety>div { position:absolute;right:0;top:52px;z-index:5;min-width:180px;padding:8px;border:1px solid #e4dfd7;border-radius:18px;background:#fff;box-shadow:0 8px 30px #211a1520; }
.rv-chat-safety button { display:block;width:100%;padding:12px;border:0;background:none;text-align:left;font:inherit;cursor:pointer; }
.rv-chat-safety button:hover { border-radius:12px;background:#f5f1ea; }
.rv-connection-moment {
  position:relative;
  display:flex;
  align-items:center;
  flex-direction:column;
  flex-shrink:0;
  gap:6px;
  padding:18px 16px 19px;
  border:0;
  border-radius:25px;
  background:#eee8de;
  text-align:center;
}
.rv-connection-moment::before,.rv-connection-moment::after {
  content:"";
  position:absolute;
  top:-21px;
  width:34px;
  height:40px;
  pointer-events:none;
  clip-path:polygon(50% 0,64% 32%,100% 50%,64% 64%,50% 100%,36% 64%,0 50%,36% 32%);
}
.rv-connection-moment::before { left:12%;background:linear-gradient(135deg,#b6e8c2,#63c7a3);transform:rotate(5deg); }
.rv-connection-moment::after { right:11%;background:linear-gradient(145deg,#ffbf83,#f4a4d2);transform:rotate(-7deg); }
.rv-chat-avatar-pair { display:flex;align-items:center;justify-content:center;margin:0 0 5px;padding:0 5px; }
.rv-chat-avatar-large,
.rv-member-app .rv-chat-avatar-pair .rv-chat-own.member-own-avatar {
  width:62px;
  height:62px;
  border:3px solid #fff;
  border-radius:24px;
  font-size:27px;
}
.rv-chat-avatar-pair .rv-chat-avatar+.rv-chat-avatar { margin-left:-11px;transform:rotate(-8deg); }
.rv-chat-own { z-index:1;background:#f2a7cc;transform:rotate(8deg); }
.rv-connection-moment>strong { font-size:16px;line-height:1.35;font-weight:600; }
.rv-connection-moment>.small { color:#74716b;font-size:13px;line-height:1.4; }
.rv-member-app .rv-chat-messages.chatbox {
  display:flex;
  flex:1 1 100px;
  flex-direction:column;
  gap:10px;
  height:auto!important;
  min-height:60px;
  margin:0;
  padding:18px 0;
  overflow:auto;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  scrollbar-width:thin;
  overscroll-behavior:contain;
}
.rv-chat-messages .bubble {
  align-self:flex-start;
  flex-shrink:0;
  max-width:86%;
  margin:0;
  padding:12px 16px;
  overflow-wrap:anywhere;
  border:0!important;
  border-radius:22px 22px 22px 6px;
  background:#fff;
  color:#171514;
  box-shadow:none!important;
}
.rv-chat-messages .bubble.mine { align-self:flex-end;border-radius:22px 22px 6px 22px;background:#f2a7cc; }
.rv-chat-message-body { white-space:pre-wrap;font-size:16px;line-height:1.45; }
.rv-chat-messages time { display:block;margin-top:5px;color:#74716b;font-size:11px;line-height:1.3; }
.rv-chat-messages .mine time { text-align:right; }
.rv-chat-empty { align-self:center;flex-shrink:0;max-width:100%;margin:0 auto;padding:12px 17px;border-radius:999px;background:#fff;color:#74716b;font-size:14px;line-height:1.4;text-align:center;box-shadow:0 3px 12px #30251409; }
.rv-chat-composer {
  display:flex;
  align-items:center;
  flex-shrink:0;
  gap:10px;
  min-height:54px;
  margin:0;
  padding:7px 8px 7px 17px;
  border:1px solid #fff;
  border-radius:999px;
  background:linear-gradient(150deg,#fff,#fbfaf8);
  box-shadow:0 3px 15px #3025140b;
}
.rv-chat-composer textarea {
  flex:1;
  width:100%;
  min-width:0;
  min-height:32px;
  max-height:100px;
  margin:0;
  padding:5px 0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#171514;
  font:inherit;
  font-size:16px!important;
  line-height:1.4;
  resize:none;
}
.rv-chat-composer textarea::placeholder { color:#908c86;opacity:1; }
.rv-chat-composer textarea:focus { outline:none; }
.rv-chat-composer:focus-within { outline:2px solid #b7afa3;outline-offset:2px; }
.rv-chat-composer button { display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:38px;height:38px;padding:0;border:0;border-radius:50%;background:#171514;color:#fff;font-size:27px;line-height:1;cursor:pointer; }
.rv-chat-composer button:disabled { background:#cfcdc8;cursor:default; }
.rv-chat-notice:empty { display:none; }
.rv-chat-notice { flex-shrink:0;margin:0 0 8px;padding:0 6px;color:#625c55;font-size:13px;line-height:1.35; }
.rv-visually-hidden { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

/* Compact landscape/keyboard layouts keep the composer and safety actions usable. */
@media(max-height:600px) {
  .rv-chat-header { margin:0 0 12px; }
  .rv-chat-person-pill .rv-chat-avatar { width:38px;height:38px;border-radius:15px; }
  .rv-connection-moment { padding:10px 14px;gap:3px; }
  .rv-chat-avatar-large,.rv-member-app .rv-chat-avatar-pair .rv-chat-own.member-own-avatar { width:40px;height:40px;border-width:2px;border-radius:15px;font-size:20px; }
  .rv-chat-avatar-pair { margin-bottom:0; }
  .rv-connection-moment::before,.rv-connection-moment::after { width:24px;height:28px;top:-13px; }
  .rv-connection-moment>strong { font-size:14px; }
  .rv-connection-moment>.small { font-size:12px; }
  .rv-member-app .rv-chat-messages.chatbox { padding:12px 0; }
}
@media(max-width:360px) {
  .rv-chat-header { gap:6px; }
  .rv-chat-person-pill { max-width:calc(100% - 100px);gap:7px;padding-right:10px; }
  .rv-chat-person-pill .rv-chat-avatar { width:40px;height:40px;border-radius:16px; }
  .rv-chat-person-pill strong { font-size:15px; }
  .rv-chat-person-pill .small { font-size:12px; }
  .rv-chat-messages .bubble { max-width:92%; }
}

/* Existing date and account-history controls. */
.rv-date-age{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:18px 0;margin-top:12px;border-top:1px solid #eee9e2}.rv-date-age p{margin:4px 0 0}.rv-date-age .btn{font-size:14px}
.rv-refund-history{margin-top:26px;border-top:1px solid #e7e1d7;padding-top:18px}.rv-refund-history>summary{font-weight:600;cursor:pointer}.rv-refund-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 0}.rv-refund-row p{margin:4px 0 0}
.rv-lifecycle-dialog{border:0;border-radius:28px;padding:0;max-width:540px;width:calc(100% - 32px);background:#f8f5ef;color:#171514}.rv-lifecycle-dialog::backdrop{background:#19171566}.rv-lifecycle-dialog form{padding:28px;max-height:85vh;overflow:auto}.rv-lifecycle-dialog h2{margin-top:24px}.rv-age-inputs{display:grid;grid-template-columns:1fr 1fr;gap:18px}.rv-age-inputs input{max-width:100%}
@media(max-width:500px){.rv-lifecycle-dialog form{padding:24px}}
