:root {
  --green: #12796e;
  --dark-green: #0b6259;
  --mint: #e9f5ef;
  --line: #eaf0ed;
  --muted: #607368;
  --text: #273b34;
  --paper: #fff;
  --canvas: #f7f9f7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-size: 13px;
  color: var(--text);
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button,
a,
input,
textarea {
  outline-offset: 4px;
}
button {
  border: 0;
  background: none;
}
svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex-shrink: 0;
}
button:hover {
  filter: brightness(0.95);
}
[hidden] {
  display: none !important;
}
.app {
  display: grid;
  grid-template-columns: 84px 337px minmax(380px, 1fr) 294px;
  height: 100dvh;
  min-height: 590px;
  max-width: 1920px;
  margin: auto;
  background: var(--paper);
}
.rail {
  background: #f0f5f1;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 32px 0 21px;
  gap: 42px;
}
.brand {
  font-size: 31px;
  letter-spacing: -4px;
  text-decoration: none;
  font-weight: 750;
  color: var(--green);
  padding-right: 5px;
}
.brand b {
  color: #75a888;
}
.rail-links,
.rail-bottom {
  display: flex;
  flex-direction: column;
  gap: 17px;
  align-items: center;
}
.rail-bottom {
  margin-top: auto;
  gap: 13px;
}
.rail-button {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #7e9186;
  border-radius: 14px;
}
.rail-button.active {
  background: var(--green);
  color: white;
  box-shadow: 0 5px 14px #147a6c20;
}
.notification-dot {
  position: absolute;
  right: 10px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c8ed88;
  border: 1px solid var(--green);
}
.avatar {
  height: 45px;
  width: 45px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  font-weight: 600;
  font-size: 14px;
  background: #e9e2d7;
  color: #71614c;
}
.avatar img,
.profile-avatar img {
  position: absolute;
  inset: 0;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.me {
  width: 40px;
  height: 40px;
  background: #dfd2bc;
  border: 3px solid white;
}
.online {
  width: 11px;
  height: 11px;
  background: #52ad80;
  position: absolute;
  right: 0;
  bottom: 0;
  border: 2px solid white;
  border-radius: 50%;
}
.inbox {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  min-height: 0;
  padding: 31px 18px 0;
}
.inbox-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #93a097;
  font-weight: 600;
}
h1 {
  font-size: 25px;
  margin: 10px 0 23px;
  font-weight: 650;
  letter-spacing: -0.8px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.count {
  font-size: 11px;
  padding: 4px 7px;
  background: #edf3ef;
  color: var(--green);
  border-radius: 7px;
  letter-spacing: 0;
}
.icon-button {
  width: 35px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #86968e;
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--mint);
  color: var(--green);
}
.mint {
  background: var(--mint);
  color: var(--green);
}
.search {
  height: 43px;
  background: #f4f7f4;
  display: flex;
  gap: 8px;
  align-items: center;
  border-radius: 9px;
  padding: 0 11px;
  color: #91a097;
}
.search svg {
  width: 17px;
}
.search input {
  border: none;
  background: none;
  min-width: 0;
  width: 100%;
  font-size: 11px;
  outline: none;
  color: var(--text);
}
input::placeholder,
textarea::placeholder {
  color: #9aa69f;
}
kbd {
  font-size: 9px;
  white-space: nowrap;
  border: 1px solid #e0e7e1;
  border-radius: 4px;
  padding: 2px 4px;
}
.tabs {
  display: flex;
  gap: 3px;
  padding: 19px 0 17px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 7px;
  color: #86958e;
  white-space: nowrap;
}
.tabs .selected {
  background: var(--mint);
  color: var(--green);
  font-weight: 600;
}
.tabs button span {
  font-size: 9px;
  padding: 2px 4px;
  background: #f0f3ef;
  border-radius: 4px;
  margin-left: 4px;
}
.list-label {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #9ba69e;
  display: flex;
  justify-content: space-between;
  padding: 20px 9px 10px;
}
.list-label svg {
  width: 13px;
  height: 13px;
}
.conversation-list {
  overflow: auto;
  margin: 0 -4px;
  flex: 1;
}
.conversation {
  width: 100%;
  padding: 15px 11px;
  display: flex;
  gap: 11px;
  align-items: center;
  text-align: left;
  border-radius: 10px;
  margin-bottom: 3px;
}
.conversation:hover {
  background: #f6f8f5;
}
.conversation.active {
  background: #ebf5ee;
}
.conversation-body {
  min-width: 0;
  flex: 1;
}
.conversation-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.conversation-name {
  font-size: 12px;
  font-weight: 550;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation time {
  font-size: 9px;
  white-space: nowrap;
  color: #9aa69e;
}
.conversation.active time {
  color: var(--green);
}
.conversation-preview {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  align-items: center;
}
.preview-text {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  color: #95a097;
}
.conversation.active .preview-text {
  color: #65887b;
}
.unread-badge {
  border-radius: 50%;
  min-width: 17px;
  height: 17px;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  font-size: 9px;
}
.inbox-footer {
  border-top: 1px solid var(--line);
  padding: 20px 5px 23px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.small-logo {
  color: #75a58c;
}
.small-logo svg {
  width: 26px;
  height: 26px;
}
.inbox-footer strong {
  font-size: 9px;
  font-weight: 500;
}
.inbox-footer p {
  font-size: 8px;
  color: #9ba79f;
  margin: 5px 0 0;
}
.chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #fcfdfb;
}
.chat-header {
  height: 94px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.large {
  width: 43px;
  height: 43px;
}
.chat-person h2 {
  font-size: 14px;
  margin: 0 0 7px;
  font-weight: 600;
}
.chat-person p {
  margin: 0;
  color: #89a492;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.chat-person i {
  width: 6px;
  height: 6px;
  background: #65af83;
  border-radius: 50%;
}
.header-actions {
  display: flex;
  gap: 7px;
  margin-left: auto;
  align-items: center;
}
.header-actions .icon-button {
  color: #6f8c7e;
}
.separator {
  display: inline-block;
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 6px;
}
.selected-icon {
  background: #edf5ef !important;
  color: var(--green) !important;
}
.messages {
  flex: 1;
  overflow: auto;
  padding: 20px 30px 16px;
  scroll-behavior: smooth;
}
.day-divider {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #9ba69c;
  font-size: 9px;
  margin: 6px 0 24px;
}
.day-divider:before,
.day-divider:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.message-row {
  display: flex;
  gap: 9px;
  margin-bottom: 19px;
  align-items: flex-end;
}
.message-row.own {
  justify-content: flex-end;
}
.message-row .avatar {
  height: 28px;
  width: 28px;
  font-size: 10px;
  margin-bottom: 20px;
}
.message-stack {
  max-width: 81%;
}
.bubble {
  padding: 12px 15px;
  background: white;
  border: 1px solid #e7eee8;
  border-radius: 14px 14px 14px 3px;
  font-size: 11px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  position: relative;
}
.own .bubble {
  background: #e6f3ea;
  border-color: #e0efe4;
  border-radius: 14px 14px 3px 14px;
}
.message-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 8px;
  color: #a1aca3;
}
.message-meta svg {
  width: 13px;
  height: 13px;
  color: #58a080;
}
.own .message-meta {
  justify-content: flex-end;
}
.message-image {
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.image-bubble {
  padding: 5px;
  overflow: hidden;
}
.image-caption {
  padding: 8px 8px 4px;
}
.message-actions {
  opacity: 0;
  display: flex;
  transition: opacity 0.15s;
  margin-bottom: 20px;
  gap: 2px;
}
.message-row:hover .message-actions,
.message-row:focus-within .message-actions {
  opacity: 1;
}
.message-actions button {
  height: 25px;
  width: 25px;
}
.message-actions svg {
  width: 14px;
}
.message-row.own .message-actions {
  order: -1;
}
.reaction {
  border: 1px solid #e4ebe4;
  background: white;
  border-radius: 15px;
  padding: 1px 7px;
  font-size: 10px;
  position: absolute;
  bottom: -13px;
  right: 10px;
}
.quote {
  border-left: 2px solid var(--green);
  background: #ffffff80;
  padding: 5px 8px;
  font-size: 10px;
  color: #7a9083;
  margin-bottom: 8px;
  white-space: normal;
}
.composer-wrap {
  padding: 9px 28px 18px;
  position: relative;
}
.composer {
  border: 1px solid #e1eae2;
  border-radius: 12px;
  background: var(--paper);
  padding: 15px 14px 10px;
  box-shadow: 0 3px 12px #234b2a03;
}
.composer textarea {
  display: block;
  width: 100%;
  resize: none;
  min-height: 41px;
  max-height: 130px;
  border: 0;
  outline: none;
  background: none;
  color: var(--text);
  font-size: 11px;
  line-height: 1.8;
}
.composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tools-left {
  display: flex;
  align-items: center;
  gap: 2px;
}
.tools-left .icon-button {
  width: 29px;
  height: 30px;
}
.tools-left svg {
  width: 18px;
  height: 18px;
}
.send-button {
  display: flex;
  gap: 9px;
  align-items: center;
  background: var(--green);
  color: white;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 10px;
}
.send-button svg {
  width: 15px;
  height: 15px;
}
.composer-note {
  display: flex;
  justify-content: space-between;
  margin-top: 11px;
  font-size: 8px;
  color: #a6afa6;
  gap: 10px;
}
.composer-note span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.composer-note svg {
  width: 10px;
  height: 10px;
}
.details {
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 0 22px;
  overflow: auto;
  background: var(--paper);
}
.details-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
}
.details-heading h3 {
  font-size: 12px;
  font-weight: 550;
}
.details-heading .icon-button {
  width: 24px;
  height: 24px;
}
.details-heading svg {
  width: 16px;
}
.contact-profile {
  text-align: center;
  padding: 26px 0 20px;
}
.profile-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  margin: auto;
  display: grid;
  place-items: center;
  font-size: 25px;
  font-weight: 600;
  position: relative;
  background: #ebdfd1;
}
.profile-avatar.is-online:after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 4px;
  width: 12px;
  height: 12px;
  background: #57ab7d;
  border: 3px solid white;
  border-radius: 50%;
}
.contact-profile h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 15px 0 7px;
}
.contact-profile p {
  font-size: 9px;
  color: #94a096;
  margin: 0 0 12px;
}
.status-pill {
  font-size: 8px;
  color: #589378;
  background: #eff7f0;
  border-radius: 20px;
  padding: 5px 9px;
}
.profile-actions {
  display: flex;
  justify-content: space-around;
  padding: 0 0 24px;
  gap: 4px;
}
.profile-actions button {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
  font-size: 8px;
  color: #8d9b91;
  min-width: 55px;
}
.profile-actions button > span:first-child {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  background: #f3f6f2;
  border-radius: 50%;
  color: #6d8978;
}
.profile-actions svg {
  width: 17px;
  height: 17px;
}
.detail-section {
  border-top: 1px solid var(--line);
  padding: 18px 0 12px;
}
.section-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  font-size: 10px;
  font-weight: 550;
  text-align: left;
  padding: 0 0 17px;
  gap: 8px;
}
.section-toggle > svg {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: #9aa69c;
}
.detail-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 0;
  font-size: 10px;
  color: #89988d;
}
.detail-row > svg {
  width: 16px;
  height: 16px;
}
.detail-row > svg:last-child {
  margin-left: auto;
  width: 12px;
}
.color-dot {
  width: 16px;
  height: 16px;
  background: var(--green);
  border: 4px solid var(--mint);
  border-radius: 50%;
}
.color-value {
  margin-left: auto;
  font-size: 8px;
  color: #a6afa6;
}
.item-count {
  font-size: 8px;
  border-radius: 4px;
  padding: 2px 5px;
  color: #929e93;
  background: #f1f5ef;
  font-weight: 400;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.media-grid button {
  padding: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 7px;
  background: #edf1e9;
}
.media-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.media-grid button:hover img {
  transform: scale(1.08);
}
.text-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 16px 0 2px;
  font-size: 9px;
  color: #71927e;
}
.text-button svg {
  width: 12px;
}
.shared-file {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 0;
  text-align: left;
}
.file-symbol {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff1ed;
  color: #d5917d;
  width: 33px;
  height: 37px;
  font-size: 8px;
  font-weight: 600;
  flex-shrink: 0;
}
.fig {
  background: #f0edf8;
  color: #9a84ba;
}
.shared-file strong {
  display: block;
  font-size: 9px;
  font-weight: 450;
  max-width: 155px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shared-file small {
  display: block;
  font-size: 8px;
  color: #a7b0a6;
  margin-top: 6px;
}
.shared-file > svg {
  margin-left: auto;
  width: 14px;
  color: #a4afa6;
}
.detail-bottom {
  font-size: 8px;
  color: #a7b1a6;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  margin-top: auto;
}
.detail-bottom svg {
  width: 12px;
}
.mobile-back {
  display: none;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 15px);
  padding: 13px 22px;
  background: #234c3e;
  color: white;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  transition:
    opacity 0.2s,
    transform 0.2s;
  font-size: 12px;
  max-width: 90vw;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  color: var(--text);
  background: var(--paper);
  box-shadow: 0 25px 100px #16372620;
}
dialog::backdrop {
  background: #15332955;
  backdrop-filter: blur(4px);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-header h2 {
  font-size: 18px;
  margin: 0;
}
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
  font-size: 12px;
}
.modal-field input {
  width: 100%;
  border: 1px solid #dce6df;
  padding: 12px;
  border-radius: 8px;
  background: var(--canvas);
  color: var(--text);
}
.modal-copy {
  font-size: 12px;
  line-height: 1.9;
  color: #85968b;
}
.modal-image {
  max-width: 100%;
  border-radius: 10px;
  display: block;
  margin: auto;
  max-height: 70vh;
}
.emoji-picker {
  position: absolute;
  left: 28px;
  bottom: 145px;
  padding: 12px;
  background: var(--paper);
  box-shadow: 0 5px 40px #143e241a;
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 245px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  z-index: 4;
}
.emoji-picker button {
  font-size: 22px;
  padding: 6px;
}
.attachment-preview,
.reply-preview {
  margin: 0 28px;
  padding: 10px 15px;
  background: var(--mint);
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 8px;
  font-size: 11px;
}
.attachment-preview button,
.reply-preview button {
  margin-left: auto;
}
.message-search-bar {
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.message-search-bar input {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  min-width: 0;
  flex: 1;
}
.message-search-bar span {
  font-size: 10px;
}
.bubble.match {
  outline: 2px solid #d6b973;
}
.empty {
  padding: 40px 18px;
  color: #95a097;
  font-size: 12px;
  text-align: center;
  line-height: 1.8;
}
.app.details-closed {
  grid-template-columns: 84px 337px minmax(380px, 1fr);
}
.app.details-closed .details {
  display: none;
}
.call-view {
  text-align: center;
  padding: 15px 0;
}
.call-view .profile-avatar {
  margin-bottom: 20px;
}
.end-call {
  margin: 20px auto 0;
  background: #d76868;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  color: white;
  display: grid;
  place-items: center;
}
.dark {
  --paper: #1c2b25;
  --canvas: #15231d;
  --line: #2b3c31;
  --text: #d9e6dd;
}
.dark .rail,
.dark .search,
.dark .chat,
.dark .bubble {
  background: #19271f;
}
.dark .conversation.active,
.dark .own .bubble {
  background: #284536;
}
.dark .bubble {
  border-color: var(--line);
}
.dark .conversation:hover {
  background: #263b2e;
}
.dark .selected-icon,
.dark .profile-actions button > span:first-child {
  background: #284536 !important;
}
.dark .composer textarea {
  color: var(--text);
}
.dark .color-value {
  color: #b7c5bb;
}
@media (min-width: 1600px) {
  .app {
    grid-template-columns: 92px 370px minmax(500px, 1fr) 320px;
  }
  .messages {
    padding: 30px 55px;
  }
  .composer-wrap {
    padding: 15px 45px 24px;
  }
  .bubble {
    font-size: 13px;
  }
  .conversation-name {
    font-size: 13px;
  }
  .preview-text {
    font-size: 11px;
  }
  .conversation {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}
@media (max-width: 1230px) {
  .app {
    grid-template-columns: 72px 295px minmax(360px, 1fr);
  }
  .details {
    display: none;
  }
  .app.details-open .details {
    display: flex;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 294px;
    z-index: 10;
    box-shadow: -15px 0 60px #183a2220;
  }
  .app.details-closed {
    grid-template-columns: 72px 295px minmax(360px, 1fr);
  }
  .chat-header {
    padding: 0 20px;
  }
  .messages {
    padding: 20px;
  }
  .composer-wrap {
    padding: 10px 20px 16px;
  }
  .composer-note > span:last-child {
    display: none;
  }
  .inbox {
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (max-width: 800px) {
  .app,
  .app.details-closed {
    grid-template-columns: 64px 260px minmax(300px, 1fr);
  }
  .header-actions {
    gap: 0;
  }
  .header-actions .separator {
    display: none;
  }
  .chat-header {
    padding: 0 14px;
    gap: 8px;
  }
  .header-actions .icon-button {
    width: 29px;
  }
  .bubble {
    font-size: 11px;
  }
  .send-button {
    font-size: 0;
    padding: 9px 12px;
  }
  .send-button svg {
    width: 18px;
  }
  .messages {
    padding: 18px 14px;
  }
  .composer-wrap {
    padding: 8px 14px 15px;
  }
  .composer-note {
    font-size: 7px;
  }
}

/* Phone: a dedicated one-screen navigation and conversation layout. */
.mobile-title {
  display: none;
}
@media (max-width: 760px) {
  .app,
  .app.details-closed {
    display: block;
    width: 100%;
    height: 100dvh;
    min-height: 0;
  }
  .rail {
    position: fixed;
    inset: auto 0 0;
    z-index: 5;
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    height: calc(74px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .rail .brand,
  .rail-bottom #theme-button,
  .rail-bottom #settings-button {
    display: none;
  }
  .rail-links {
    flex: 4;
    flex-direction: row;
    gap: 0;
    justify-content: space-around;
  }
  .rail-bottom {
    flex: 1;
    flex-direction: row;
    margin: 0;
    justify-content: center;
    padding-bottom: 13px;
  }
  .rail-button {
    height: 52px;
    width: 62px;
    border-radius: 0;
    gap: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 9px;
    font-weight: 500;
  }
  .rail-button:after {
    content: attr(data-mobile-label);
  }
  .rail-button.active {
    box-shadow: none;
    background: none;
    color: var(--green);
  }
  .rail-button.active svg {
    background: var(--mint);
    border-radius: 10px;
    box-sizing: content-box;
    padding: 5px 15px;
    margin: -5px -15px;
  }
  .rail-button svg {
    height: 22px;
    width: 22px;
  }
  .rail .me {
    width: 32px;
    height: 32px;
    font-size: 10px;
    border: 0;
  }
  .rail-bottom {
    position: relative;
  }
  .rail-bottom:before {
    content: "Cá nhân";
    position: absolute;
    bottom: 0;
    font-size: 9px;
    color: var(--muted);
  }
  .inbox {
    height: 100%;
    padding: calc(22px + env(safe-area-inset-top)) 19px
      calc(82px + env(safe-area-inset-bottom));
    border: 0;
    background: var(--paper);
  }
  .inbox-heading {
    padding: 0 1px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--green);
  }
  .desktop-title {
    display: none;
  }
  .mobile-title {
    display: inline;
  }
  h1 {
    font-size: 29px;
    margin: 8px 0 20px;
    gap: 10px;
  }
  .inbox-heading #new-chat {
    height: 44px;
    width: 44px;
    border-radius: 15px;
    background: var(--green);
    color: white;
  }
  .search {
    height: 47px;
    border-radius: 14px;
    padding: 0 14px;
    gap: 10px;
    flex-shrink: 0;
  }
  .search input {
    font-size: 13px;
  }
  .search svg {
    width: 20px;
  }
  .search kbd {
    display: none;
  }
  .tabs {
    padding: 18px 0 12px;
    gap: 8px;
    border: 0;
    flex-shrink: 0;
  }
  .tabs button {
    font-size: 12px;
    padding: 10px 16px;
    border-radius: 20px;
  }
  .list-label {
    font-size: 9px;
    padding: 14px 5px 9px;
    flex-shrink: 0;
  }
  .conversation-list {
    margin: 0 -7px;
  }
  .conversation {
    padding: 17px 9px;
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    gap: 13px;
    min-height: 86px;
  }
  .conversation.active {
    background: transparent;
  }
  .conversation .avatar {
    height: 52px;
    width: 52px;
    font-size: 16px;
  }
  .conversation-name {
    font-size: 14px;
    font-weight: 550;
  }
  .conversation time {
    font-size: 10px;
  }
  .conversation-preview {
    margin-top: 8px;
  }
  .preview-text {
    font-size: 12px;
  }
  .conversation-preview > svg {
    height: 13px;
    width: 13px;
  }
  .unread-badge {
    height: 20px;
    min-width: 20px;
    font-size: 10px;
  }
  .inbox-footer {
    display: none;
  }
  .chat-header {
    height: calc(76px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 10px 0;
    gap: 8px;
  }
  .chat-header .large {
    width: 39px;
    height: 39px;
  }
  .chat-person {
    min-width: 0;
  }
  .chat-person h2 {
    font-size: 13px;
    max-width: 135px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-back {
    height: 44px;
    width: 30px;
    color: var(--green);
  }
  .header-actions .icon-button {
    height: 44px;
    width: 34px;
  }
  .header-actions {
    gap: 1px;
  }
  .messages {
    padding: 18px 12px;
    background: var(--canvas);
  }
  .message-row {
    gap: 6px;
    margin-bottom: 22px;
  }
  .message-row > .avatar {
    height: 25px;
    width: 25px;
  }
  .message-stack {
    max-width: 80%;
  }
  .bubble {
    font-size: 13px;
    line-height: 1.7;
    padding: 11px 13px;
    border-radius: 17px 17px 17px 4px;
  }
  .own .bubble {
    border-radius: 17px 17px 4px 17px;
  }
  .image-bubble {
    padding: 4px;
  }
  .message-actions {
    flex-direction: column;
    gap: 3px;
    margin-bottom: 15px;
  }
  .message-actions button {
    width: 24px;
    height: 25px;
  }
  .message-actions svg {
    width: 15px;
    height: 15px;
  }
  .message-meta {
    font-size: 9px;
    margin-top: 7px;
  }
  .composer-wrap {
    border-top: 1px solid var(--line);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--paper);
  }
  .composer {
    padding: 10px 10px 5px;
    border-radius: 20px;
    background: var(--canvas);
    box-shadow: none;
  }
  .composer textarea {
    font-size: 14px;
    min-height: 35px;
    line-height: 1.6;
    padding: 2px 4px;
  }
  .composer-tools {
    padding-top: 3px;
  }
  .tools-left {
    gap: 7px;
  }
  .tools-left .icon-button {
    height: 40px;
    width: 34px;
  }
  .tools-left svg {
    height: 21px;
    width: 21px;
  }
  .tools-left .separator {
    display: none;
  }
  .send-button {
    border-radius: 50%;
    height: 43px;
    width: 43px;
    justify-content: center;
    padding: 0;
    font-size: 0;
    gap: 0;
    flex-shrink: 0;
  }
  .send-button svg {
    height: 20px;
    width: 20px;
  }
  .composer-note {
    display: none;
  }
  .emoji-picker {
    bottom: 135px;
    left: 14px;
  }
  .reply-preview,
  .attachment-preview {
    margin: 8px 12px;
    border-radius: 12px;
    min-height: 44px;
  }
  .app.chat-open.details-open .details {
    position: fixed;
    inset: 0;
    z-index: 15;
    width: 100% !important;
    max-width: none;
    padding: env(safe-area-inset-top) 24px env(safe-area-inset-bottom);
    box-shadow: none;
  }
  .details-heading {
    padding-top: 20px;
  }
  .details-heading h3 {
    font-size: 16px;
  }
  .details-heading .icon-button {
    width: 44px;
    height: 44px;
  }
  .contact-profile {
    padding: 18px 0 24px;
  }
  .profile-actions button {
    font-size: 11px;
  }
  .profile-actions button > span:first-child {
    width: 44px;
    height: 44px;
  }
  .section-toggle,
  .detail-row {
    font-size: 13px;
    min-height: 44px;
  }
  .color-value {
    font-size: 10px;
  }
  .shared-file {
    min-height: 60px;
  }
  .shared-file strong {
    font-size: 12px;
    max-width: 230px;
  }
  .shared-file small {
    font-size: 10px;
  }
  dialog {
    padding: 20px;
    border-radius: 22px;
  }
  .modal-field input {
    font-size: 16px;
    min-height: 46px;
  }
  .modal-field ~ .send-button,
  .modal-field + .send-button {
    font-size: 12px;
    width: auto;
    height: 44px;
    border-radius: 12px;
    padding: 0 17px;
  }
  .modal-copy {
    font-size: 13px;
  }
  .toast {
    bottom: calc(88px + env(safe-area-inset-bottom));
    font-size: 12px;
  }
}
@media (max-width: 360px) {
  .inbox {
    padding-left: 13px;
    padding-right: 13px;
  }
  .header-actions .icon-button {
    width: 29px;
  }
  .chat-person h2 {
    max-width: 100px;
  }
  .chat-header {
    gap: 5px;
  }
  .tools-left {
    gap: 2px;
  }
  .message-stack {
    max-width: 76%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Review refinements: readable content, explicit focus and reliable touch targets. */
html {
  color-scheme: light;
}
body {
  -webkit-tap-highlight-color: #12796e20;
}
button,
a {
  touch-action: manipulation;
}
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.search:focus-within,
.composer:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--green);
}
.search input:focus-visible,
.composer textarea:focus-visible {
  outline: 0;
}
.skip-link {
  position: fixed;
  left: 14px;
  top: -80px;
  padding: 12px 18px;
  background: var(--green);
  color: white;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.avatar,
.profile-avatar {
  aspect-ratio: 1;
  min-height: 0;
}
.avatar img,
.profile-avatar img {
  border-radius: 50%;
}
.conversation-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-text {
  display: block;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.conversation time,
.conversation.active time,
.message-meta,
.list-label,
.tabs button,
.detail-row,
.modal-copy,
.contact-profile p,
.profile-actions button,
.text-button,
.shared-file small,
.composer-note {
  color: var(--muted);
}
.conversation-preview svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
}
.list-label {
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 550;
  padding: 18px 10px 9px;
}
.conversation time,
.message-meta {
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}
.tabs button {
  font-size: 12px;
}
.inbox-heading {
  min-height: 64px;
}
h1 {
  margin-top: 0;
}
.bubble {
  font-size: 13px;
  line-height: 1.75;
}
.composer textarea {
  font-size: 13px;
}
.detail-section {
  padding-top: 16px;
}
.section-toggle,
.details-heading h3 {
  font-size: 12px;
}
.detail-row,
.contact-profile p,
.shared-file strong {
  font-size: 11px;
}
.profile-actions button,
.shared-file small,
.color-value {
  font-size: 10px;
}
.detail-row {
  min-height: 38px;
}
.message-stack {
  min-width: 0;
}
.message-image {
  aspect-ratio: 3/2;
  height: auto;
  object-fit: cover;
}
.image-open {
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
}
.message-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--green);
}
.bubble audio {
  display: block;
  max-width: 100%;
  width: 240px;
}
.message-actions,
.mobile-message-menu {
  flex-shrink: 0;
}
.mobile-message-menu {
  display: none;
}
.draft-label {
  color: var(--green);
  font-weight: 600;
}
.media-grid .empty {
  grid-column: 1 / -1;
  padding: 14px 0;
  text-align: left;
  margin: 0;
}
.media-grid button {
  aspect-ratio: 1;
}
.media-grid img {
  display: block;
  min-height: 0;
}
.modal-image {
  width: auto;
  height: auto;
  object-fit: contain;
}
.shared-file {
  color: inherit;
  text-decoration: none;
}
.shared-file > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.shared-file strong {
  max-width: 100%;
}
.modal-copy,
.saved-item {
  overflow-wrap: anywhere;
}
.primary-button,
.secondary-button,
.danger-button {
  border-radius: 10px;
  padding: 12px 18px;
  min-height: 44px;
  font-weight: 500;
  font-size: 13px;
}
.primary-button {
  background: var(--green);
  color: white;
}
.secondary-button {
  background: var(--mint);
  color: var(--text);
}
.danger-button {
  background: #b54444;
  color: white;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 13px;
  margin-bottom: 15px;
  cursor: pointer;
}
.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.field-error {
  color: #b54444;
  font-size: 12px;
}
.saved-item {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.saved-item h3 {
  font-size: 13px;
}
.saved-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.saved-actions .text-button {
  justify-content: flex-start;
  padding: 10px 0;
  font-size: 12px;
}
.message-menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.message-menu button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 10px;
  border-radius: 8px;
  text-align: left;
  min-height: 48px;
}
.message-menu button:hover {
  background: var(--mint);
}
.toast {
  display: flex;
  align-items: center;
  gap: 20px;
}
.toast button {
  font-weight: 600;
  color: #d3ffe4;
  text-decoration: underline;
  white-space: nowrap;
  min-height: 32px;
}
.storage-warning {
  background: #fff1cf;
  color: #715600;
  padding: 12px 20px;
  margin: 0;
  font-size: 12px;
}
.recording {
  color: #b54444 !important;
  background: #fbe9e5 !important;
}
.messages,
.conversation-list,
.details,
dialog {
  overscroll-behavior: contain;
}
dialog {
  max-height: calc(100dvh - 36px);
  overflow: auto;
}
.dark {
  --muted: #acbfb2;
}
.dark .send-button,
.dark .primary-button,
.dark .inbox-heading #new-chat {
  color: #14291d;
}
.dark .rail-button.active {
  color: #14291d;
}
.dark .status-pill {
  background: #284b3c;
  color: #b4debf;
}
.dark .chat-person p {
  color: #acbfb2;
}
@media (pointer: fine) {
  html {
    overscroll-behavior: none;
  }
}
@media (max-width: 1230px) and (min-width: 761px) {
  .composer-note > span:last-child {
    display: inline-flex;
  }
}
@media (max-width: 760px) {
  .chat {
    display: none;
  }
  .app.chat-open {
    display: block;
  }
  .app.chat-open .rail,
  .app.chat-open .inbox {
    display: none;
  }
  .app.chat-open .chat {
    display: flex;
    height: 100dvh;
  }
  .mobile-back {
    display: inline-flex;
  }
  .mobile-title {
    display: inline;
  }
  .desktop-title {
    display: none;
  }
  .app.chat-open .details {
    display: none;
  }
  .app.chat-open.details-open .details {
    display: flex;
  }
  .chat-person {
    flex: 1;
  }
  .chat-person h2 {
    max-width: 100%;
  }
  .header-actions #search-message {
    display: none;
  }
  .header-actions .icon-button {
    height: 44px;
    width: 36px;
  }
  .header-actions .separator {
    display: none;
  }
  .chat-header {
    flex-shrink: 0;
  }
  .inbox {
    min-width: 0;
  }
  .inbox-heading {
    min-height: 67px;
    flex-shrink: 0;
  }
  .conversation {
    min-height: 85px;
  }
  .conversation .avatar {
    width: 50px;
    height: 50px;
  }
  .conversation-name {
    font-size: 14px;
  }
  .preview-text {
    font-size: 12px;
  }
  .conversation.active .preview-text {
    color: var(--muted);
  }
  .list-label {
    padding: 15px 8px 8px;
  }
  .conversation-list {
    min-height: 0;
  }
  .search input,
  .composer textarea,
  .message-search-bar input,
  .modal-field input {
    font-size: 16px;
  }
  .search input {
    width: 100%;
  }
  .message-actions {
    display: none;
  }
  .mobile-message-menu {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-self: flex-end;
    margin-bottom: 17px;
    color: var(--muted);
  }
  .own .mobile-message-menu {
    order: -1;
  }
  .message-row {
    align-items: flex-end;
  }
  .message-stack {
    max-width: calc(100% - 82px);
  }
  .own .message-stack {
    max-width: calc(100% - 50px);
  }
  .bubble {
    font-size: 14px;
  }
  .tools-left .icon-button {
    width: 40px;
    height: 44px;
  }
  .tools-left {
    gap: 1px;
  }
  .composer-wrap {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .composer textarea {
    min-height: 37px;
  }
  .composer-note {
    display: none;
  }
  .composer-tools .send-button {
    width: 44px;
    height: 44px;
  }
  .icon-button {
    min-width: 32px;
  }
  .profile-actions button {
    font-size: 11px;
  }
  .profile-actions button > span:first-child {
    height: 44px;
    width: 44px;
  }
  .details-heading .icon-button {
    width: 44px;
    height: 44px;
  }
  .detail-row,
  .section-toggle,
  .text-button {
    min-height: 44px;
    font-size: 13px;
  }
  .profile-avatar {
    width: 84px;
    height: 84px;
  }
  .contact-profile p {
    font-size: 12px;
  }
  .message-search-bar {
    padding: 8px 12px;
    flex-wrap: wrap;
  }
  .message-search-bar .icon-button {
    height: 44px;
    width: 44px;
  }
  .message-search-bar #search-result {
    flex-basis: 100%;
    font-size: 12px;
  }
  .reply-preview,
  .attachment-preview {
    overflow-wrap: anywhere;
  }
  .reply-preview > span,
  .attachment-preview > span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .reply-preview .icon-button,
  .attachment-preview .icon-button {
    height: 44px;
    width: 44px;
  }
  .emoji-picker {
    width: min(280px, calc(100vw - 28px));
  }
  .emoji-picker button {
    min-height: 44px;
  }
  .rail-button.active {
    color: var(--green);
  }
  .dark .rail-button.active {
    color: var(--green);
  }
  .modal-actions {
    flex-wrap: wrap;
  }
}

.image-bubble {
  overflow: visible;
}
.mobile-message-menu svg {
  stroke-width: 3;
}
@media (max-width: 360px) {
  .chat-header {
    gap: 4px;
    padding-left: 7px;
    padding-right: 7px;
  }
  .header-actions .icon-button {
    width: 32px;
  }
  .chat-header .large {
    width: 34px;
    height: 34px;
  }
  .mobile-back {
    min-width: 28px;
    width: 28px;
  }
  .chat-person h2 {
    font-size: 12px;
  }
}

.dark .composer {
  border-color: var(--line);
}
.dark .inbox-heading #new-chat {
  background: var(--green);
  color: #14291d;
}
.dark .unread-badge,
.dark .count {
  background: var(--green);
  color: #14291d;
}
.dark .tabs button span,
.dark .item-count {
  background: #314a3c;
  color: #c3d7c9;
}
.dark .reaction {
  background: var(--paper);
  border-color: var(--line);
  color: var(--text);
}
.dark .search,
.dark .icon-button,
.dark .header-actions .icon-button,
.dark .profile-actions button > span:first-child {
  color: var(--muted);
}
.status-pill {
  font-size: 10px;
}
.day-divider {
  font-size: 11px;
  color: var(--muted);
}
/* lén: account, QR, notifications, files and private calls. */
.brand {
  letter-spacing: -1.7px;
  font-size: 29px;
}
.brand > span,
.gate-brand > span {
  color: #c4a879;
}
.locked .app {
  visibility: hidden;
}
.account-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: var(--canvas);
  padding: 25px;
  overflow: auto;
}
.gate-card {
  width: min(430px, 100%);
  text-align: center;
}
.gate-icon {
  border-radius: 22px;
  display: block;
  margin: 0 auto 18px;
}
.gate-brand {
  font-size: 42px;
  font-weight: 750;
  letter-spacing: -3px;
  color: var(--green);
}
.gate-card h1 {
  display: block;
  margin: 28px 0 15px;
  font-size: 32px;
  letter-spacing: -1px;
}
.gate-card p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}
.gate-card small {
  display: block;
  color: var(--muted);
  margin-top: 35px;
  font-size: 11px;
}
.gate-card .primary-button {
  width: 100%;
  margin: 12px 0;
}
.gate-card .checkbox-field {
  text-align: left;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.7;
  margin-top: 22px;
}
.gate-card .checkbox-field input {
  flex-shrink: 0;
  margin-top: 3px;
}
.gate-card .modal-field {
  text-align: left;
}
.qr-code {
  width: 250px;
  max-width: 100%;
  height: auto;
  margin: 14px auto;
  display: block;
  border-radius: 12px;
  background: white;
}
.qr-timer {
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}
.qr-tools {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.camera-preview {
  width: 100%;
  border-radius: 12px;
  background: #172d24;
  max-height: 50vh;
  object-fit: cover;
}
.friend-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 12px 0;
}
.friend-item h3 {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.safety-code {
  font:
    11px ui-monospace,
    monospace;
  word-break: break-all;
  background: var(--mint);
  padding: 13px;
  border-radius: 10px;
  line-height: 1.8;
  user-select: all;
}
.status-pill {
  color: var(--green);
}
.empty-chat {
  height: 100%;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 10px;
  padding: 30px;
  color: var(--muted);
}
.empty-chat h2 {
  font-size: 24px;
  letter-spacing: -0.7px;
  color: var(--text);
}
.empty-chat svg {
  width: 48px;
  height: 48px;
  margin: auto;
  color: var(--green);
}
.empty-chat p {
  font-size: 13px;
  line-height: 1.8;
}
.send-status {
  font-size: 10px;
  color: var(--muted);
}
.message-file {
  padding: 7px 0;
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}
.message-video {
  display: block;
  max-width: 100%;
  width: 320px;
  max-height: 320px;
  border-radius: 12px;
}
.message-audio {
  width: 260px;
  max-width: 100%;
}
.location-card {
  min-width: min(220px, 100%);
  max-width: 100%;
  padding: 0;
  text-align: left;
  color: var(--text);
  white-space: normal;
  display: block;
  text-decoration: none;
}
.location-map {
  height: 130px;
  border-radius: 12px;
  background-color: #e7eee0;
  background-image:
    linear-gradient(
      35deg,
      transparent 40%,
      #fff 40%,
      #fff 44%,
      transparent 44%
    ),
    linear-gradient(
      110deg,
      transparent 55%,
      #fff 55%,
      #fff 59%,
      transparent 59%
    ),
    linear-gradient(
      0deg,
      transparent 48%,
      #d2e1cf 48%,
      #d2e1cf 53%,
      transparent 53%
    );
  display: grid;
  place-items: center;
  color: #12675b;
}
.location-map svg {
  height: 37px;
  width: 37px;
  stroke-width: 2;
}
.location-card strong {
  display: block;
  font-size: 13px;
  margin-top: 10px;
}
.location-card small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin: 6px 0;
}
.danger-text {
  color: #b54444;
}
.call-panel {
  position: fixed;
  inset: 7vh max(24px, calc((100vw - 750px) / 2)) auto;
  z-index: 35;
  border: 1px solid #426657;
  border-radius: 22px;
  background: #152a22;
  color: white;
  padding: 22px;
  box-shadow: 0 25px 100px #0005;
}
.call-top {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 10px;
  padding: 12px;
}
.call-top > span:first-child {
  font-size: 20px;
  font-weight: 600;
}
.call-top > span:last-child {
  color: #b9dacf;
  font-size: 13px;
}
.call-video {
  position: relative;
  min-height: 180px;
  background: #203d31;
  border-radius: 15px;
  overflow: hidden;
}
.call-video #remote-video {
  width: 100%;
  max-height: 55vh;
  display: block;
  object-fit: cover;
  min-height: 180px;
}
.call-video #local-video {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 100px;
  max-height: 130px;
  object-fit: cover;
  border-radius: 8px;
  background: #152a22;
}
.call-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  align-items: center;
  padding-top: 15px;
}
.call-controls .icon-button {
  width: 44px;
  height: 44px;
  background: #2d493b;
  color: white;
}
.call-controls .end-call {
  margin: 0;
  height: 48px;
  width: 48px;
}
.call-controls [aria-pressed="true"] {
  background: #b54444;
}
.recording-indicator {
  color: #bc4e4e;
  font-weight: 600;
}
.pending-banner {
  padding: 12px 20px;
  background: var(--mint);
  font-size: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.pending-banner button {
  color: var(--green);
  font-weight: 600;
}
.notification-setting {
  padding: 14px 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.profile-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--canvas);
  color: var(--text);
  border-radius: 10px;
  resize: vertical;
  min-height: 90px;
}
.file-progress {
  padding: 8px;
  font-size: 12px;
  color: var(--green);
}
.version-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.online {
  display: none;
}
.chat-person i {
  background: var(--green);
}
.dark .location-map {
  filter: brightness(0.75);
}
@media (max-width: 760px) {
  .call-panel {
    inset: 0;
    border-radius: 0;
    height: 100dvh;
    padding: calc(22px + env(safe-area-inset-top)) 18px
      calc(20px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
  }
  .call-video {
    flex: 1;
  }
  .call-video #remote-video {
    height: 100%;
    max-height: none;
  }
  .call-controls {
    padding-top: 22px;
  }
  .gate-card h1 {
    font-size: 30px;
  }
  .tools-left .icon-button {
    width: 37px;
    min-width: 35px;
  }
  .tools-left svg {
    width: 19px;
  }
  .composer-tools {
    gap: 3px;
  }
  .brand {
    font-size: 27px;
  }
  .qr-tools .primary-button,
  .qr-tools .secondary-button {
    flex: 1;
  }
  .toast {
    bottom: calc(85px + env(safe-area-inset-bottom));
    font-size: 12px;
  }
  .modal-field textarea {
    font-size: 16px;
  }
}

.message-more {
  opacity: 0;
  align-self: flex-end;
  margin-bottom: 20px;
}
.message-row:hover .message-more,
.message-row:focus-within .message-more {
  opacity: 1;
}
.own .message-more {
  order: -1;
}
.file-bubble {
  white-space: normal;
}
.purple {
  --green: #79619a;
  --mint: #f1ecf6;
}
.dark.purple {
  --green: #c3a3ed;
  --mint: #3c304c;
}
@media (max-width: 760px) {
  .message-more {
    display: inline-flex;
    opacity: 1;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  .message-stack {
    max-width: calc(100% - 82px);
  }
  .own .message-stack {
    max-width: calc(100% - 50px);
  }
}
