.room {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.rhead {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  padding: 4px 0 0;
}
.rhead svg {
  width: 92px;
  height: 92px;
  margin: 0 -8px;
}
.roomwrap {
  margin: 10px 12px calc(96px + var(--sab));
  border-radius: 24px;
  padding: 4px 10px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--bottom-bars);
  padding: 12px 12px 16px;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 12px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 12px), transparent);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-content: start;
}
/* teclado aberto: some a navegação e o cabeçalho da sala para sobrar espaço para as mensagens */
html.kb .nav,
html.kb .rhead {
  display: none;
}
html.kb .roomwrap {
  margin-bottom: 8px;
}
.msgs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.msg {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  max-width: 84%;
}
.msg svg {
  width: 34px;
  height: 34px;
  flex: none;
}
.msg .bb {
  background: var(--surf2);
  border-radius: 18px 18px 18px 6px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.35;
  word-break: break-word;
}
.msg .who {
  font-size: 12px;
  font-weight: 900;
  color: var(--ink2);
  margin-bottom: 2px;
}
.msg.me {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.msg.me .bb {
  background: var(--accent);
  color: #fff;
  border-radius: 18px 18px 6px 18px;
}
.msg.sys {
  align-self: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink2);
}
.compose {
  display: flex;
  gap: 8px;
  padding: 8px 0 0;
}
.compose input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  background: var(--surf2);
  color: var(--ink);
}
.rowb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.chat_entry_row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 12px 0;
}
.chat_entry {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 0;
  border-radius: 22px;
  color: inherit;
  font-family: inherit;
  text-align: left;
}
.chat_entry:active {
  transform: scale(0.98);
  filter: brightness(1.2);
}
.chat_entry b {
  font-family: var(--f-display);
  font-size: 16px;
  line-height: 1.05;
  min-width: 0;
}
.chat_entry_icon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #2a1e3f;
  color: var(--ink);
}
.chat_entry_icon svg {
  width: 28px;
  height: 28px;
}
.chat_badge {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #e0243a;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.chat_entry_icon .chat_badge {
  position: absolute;
  top: -6px;
  right: -6px;
}
.sheet.full .in:has(.chat_sheet) {
  overflow: hidden;
  padding-bottom: calc(10px + var(--sab));
}
.chat_sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.chat_sheet .shead {
  margin-bottom: 2px;
}
.chat_sheet_status {
  min-height: 18px;
  font-size: 12.5px;
  font-weight: 800;
}
.chat_sheet_older {
  align-self: center;
}
.chat_inbox_list {
  display: grid;
  gap: 8px;
}
.chat_inbox_row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 16px;
  background: var(--surf2);
  color: inherit;
  font-family: inherit;
  text-align: left;
}
.chat_inbox_head {
  flex: none;
  width: 44px;
  height: 44px;
}
.chat_inbox_head svg {
  width: 100%;
  height: 100%;
}
.chat_inbox_who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat_inbox_line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.chat_inbox_line b {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat_inbox_line small {
  flex: none;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink2);
}
.chat_inbox_text {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat_inbox_unread .chat_inbox_text {
  color: var(--ink);
  font-weight: 900;
}
.chat_inbox_row > .chat_badge {
  flex: none;
}
.chat_inbox_empty {
  padding: 12px 0;
  text-align: center;
}
