.inbox-screen,
.chat-screen {
  --chat-ink: #293630;
  --chat-muted: #65756d;
  --chat-green: #278951;
  --chat-mint: #bbeb99;
  --chat-paper: #f6f8f2;
  background: var(--chat-paper);
  color: var(--chat-ink);
}

.inbox-screen .app-nav,
.chat-screen .app-nav {
  background: #f5f8f2;
  border-color: #dfe9df;
}

.inbox-screen .app-nav h2,
.chat-screen .app-nav h2 {
  color: #233b2f;
  letter-spacing: .035em;
}

.inbox-content {
  background: #fffefb;
}

.inbox-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px 6px;
  padding: 0 10px;
  min-height: 34px;
  border: 1px solid #e5eae1;
  border-radius: 9px;
  background: #f0f4ed;
  color: #698272;
  font-size: 14px;
}

.inbox-search input {
  width: 100%;
  padding-block: 7px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--chat-ink);
  font: inherit;
  font-size: 13px;
}

.inbox-search:focus-within {
  border-color: #86a98e;
}

.inbox-search input::placeholder,
.compose-input::placeholder {
  color: var(--chat-muted);
}

.thread-list {
  background: transparent;
}

.thread-row {
  padding: 11px 13px;
  min-height: 64px;
  border-color: #edf1ea;
}

.thread-row:hover {
  background: #f0f6ed;
}

.thread-label {
  gap: 3px;
}

.thread-label strong {
  font-weight: 650;
}

.thread-label span {
  color: var(--chat-muted);
}

.thread-metadata {
  margin-inline-start: auto;
  color: #708075;
  font-size: 10px;
  white-space: nowrap;
}

.thread-avatar .badge {
  width: 11px;
  height: 11px;
  border-color: #fffefb;
  background: #db5c5d;
}

.thread-avatar .group-portrait,
.voice-call-content .group-portrait {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: #e3e9e1;
}

.group-portrait .avatar,
.thread-avatar .group-portrait .avatar,
.voice-call-content .group-portrait .avatar {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 3px;
  font-size: 7px;
}

.inbox-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--chat-muted);
}

.inbox-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #dee8de;
  background: #f8faf5;
}

.inbox-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 48px;
  color: #596c61;
  font-size: 10px;
}

.inbox-tabs svg {
  width: 19px;
  height: 19px;
}

.inbox-tabs button[aria-current="page"] {
  color: var(--chat-green);
  font-weight: 700;
}

.wechat-discover,
.wechat-me {
  padding-block: 12px;
  background: #edf3eb;
}

.wechat-setting {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) 15px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 51px;
  margin-bottom: 1px;
  padding: 9px 14px;
  background: #fffefb;
  color: #314b3b;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}

.wechat-setting:hover {
  background: #f6faf2;
}

.wechat-setting svg {
  width: 19px;
  height: 19px;
  color: #4d8364;
}

.wechat-setting svg:last-child {
  width: 14px;
  height: 14px;
  color: #769184;
}

.wechat-me-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  min-height: 79px;
  background: #fffefb;
  color: #293d31;
  font-size: 17px;
}

.wechat-me-profile .avatar {
  width: 50px;
  height: 50px;
  border-radius: 10px;
}

.wechat-background-file {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.wechat-background-file:focus-visible + .wechat-background-picker {
  outline: 2px solid #3a8a5b;
  outline-offset: -3px;
}

.wechat-background-file:disabled + .wechat-background-picker {
  opacity: .65;
}

.wechat-background-preview {
  margin: 10px 14px 0;
  height: 108px;
  overflow: hidden;
  border-radius: 8px;
}

.wechat-background-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wechat-background-clear,
.wechat-background-status {
  display: block;
  margin: 10px 14px;
  color: #467458;
  font-size: 12px;
}

.wechat-background-status:empty {
  display: none;
}

.chat-feed {
  padding: 2px 11px 10px;
  background:
    linear-gradient(#eff4e9a6, #eff4e9b9),
    var(--chat-wallpaper, none) center / cover,
    #edf2e9;
}

.chat-feed > :first-child {
  margin-top: 0;
}

.chat-feed > :last-child {
  margin-bottom: 0;
}

.chat-time {
  padding-block: 12px 10px;
  color: #5f7266;
  font-size: 11px;
}

.message {
  width: fit-content;
  max-width: 100%;
  gap: 9px;
  margin-bottom: 10px;
}

.message .avatar {
  width: 33px;
  height: 33px;
  border-radius: 7px;
}

.message-content {
  min-width: 0;
  max-width: min(245px, 67cqw);
}

.message-sender {
  display: block;
  margin-bottom: 3px;
  color: #627568;
  font-size: 10px;
  line-height: 1.15;
}

.message .bubble {
  position: relative;
  padding: 7px 9px;
  border: 1px solid #e6ebe0;
  border-radius: 3px 9px 9px;
  background: #fffefb;
  color: #28362e;
  font-size: 13px;
  line-height: 1.56;
}

.message.mine .bubble {
  border-color: #a9d98b;
  border-radius: 9px 3px 9px 9px;
  background: var(--chat-mint);
}

.message .bubble::before {
  position: absolute;
  inset: 9px auto auto -4px;
  width: 7px;
  height: 7px;
  border: solid #e6ebe0;
  border-width: 0 0 1px 1px;
  background: inherit;
  content: "";
  transform: rotate(45deg);
}

.message.mine .bubble::before {
  inset: 9px -4px auto auto;
  border-color: #a9d98b;
  border-width: 1px 1px 0 0;
}

.message-text:empty {
  display: none;
}

.message-call {
  min-height: 28px;
  color: #276347;
}

.chat-picture {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 7px;
  overflow: hidden;
  background: #e6efde;
}

.chat-picture img {
  display: block;
  max-width: min(180px, 53cqw);
  max-height: 135px;
  object-fit: cover;
}

.picture-bubble:not(.image-only) .chat-picture {
  margin-top: 6px;
}

.message .bubble.image-only {
  padding: 0;
  border: none;
  background: transparent;
}

.message .bubble.image-only::before {
  content: none;
}

.chat-image-content {
  display: grid;
  align-content: center;
  overflow: auto;
  padding: 9px;
}

.chat-image-content img {
  display: block;
  width: 100%;
  object-fit: contain;
}

.message-call {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  padding: 4px 8px;
  border: 1px solid #cde4d1;
  border-radius: 6px;
  background: #e3f0e2;
  font-size: 12px;
}

.chat-compose {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 47px;
  height: auto;
  padding: 5px 7px;
  border-color: #dce7dc;
  background: #f7faf4;
}

.compose-input {
  flex: 1;
  width: 0;
  min-width: 0;
  height: 35px;
  padding: 4px 7px;
  border: 1px solid #dce8da;
  border-radius: 6px;
  outline: none;
  background: #fffefb;
  color: var(--chat-ink);
  font: inherit;
  font-size: 16px;
}

.compose-input:focus {
  border-color: #8db39a;
}

.compose-tool {
  display: grid;
  flex: 0 0 30px;
  place-content: center;
  align-self: stretch;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #416350;
}

.compose-tool:hover {
  background: #e7f1e5;
}

.compose-tool:disabled {
  opacity: .4;
}

.compose-tool svg {
  width: 20px;
  height: 20px;
}

.message-send {
  flex: none;
  min-height: 31px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #277455;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
}

.chat-tools {
  display: grid;
  align-items: center;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 8px;
  border-top: 1px solid #e1ede0;
  background: #eff5eb;
}

.emoji-pick {
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 17px;
}

.emoji-pick:hover,
.chat-tool-action:hover {
  background: #e1eddf;
}

.chat-tool-action {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #365542;
  font-size: 11px;
}

.chat-tool-action svg {
  width: 19px;
  height: 19px;
}

.choices {
  background: #eaf1e8;
}

.choices button {
  border-color: #bed6c0;
  background: #f8fcf5;
  color: #315943;
}

.thread-links {
  background: #edf4e9;
}

.thread-link {
  background: #dfecdd;
  color: #3b6049;
}

.chat-members {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-height: 135px;
  overflow: auto;
  margin: 12px 0;
}

.chat-member {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--chat-muted);
  text-align: center;
  font-size: 10px;
}

.voice-call {
  position: absolute;
  z-index: 4;
  inset: var(--status-height, 42px) 0 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 20px;
  overflow: hidden;
  padding: 25px 18px calc(35px + env(safe-area-inset-bottom, 0px));
  isolation: isolate;
  background: radial-gradient(ellipse at 25% 10%, #f9f8d9, #d5eadc 70%, #c9e1d6);
  color: #243d31;
}

.voice-call-background {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.8);
}

.voice-call::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, #f5faeedb 8%, #e6f4e9c9 62%, #d8edcfe8);
  content: "";
}

.voice-call-content {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding: 5px 8px;
  text-align: center;
}

.voice-call-content > .avatar {
  width: 60px;
  height: 60px;
  border: 2px solid #f9fff2;
  border-radius: 14px;
  box-shadow: 0 6px 14px #3d654c29;
  font-size: 25px;
}

.voice-call-content h3 {
  margin: 2px 0;
  font-size: 22px;
  line-height: 1.2;
}

.voice-call-content p {
  margin: 0;
}

.voice-call-status,
.voice-call-duration {
  color: #41624e;
  font-size: 12px;
}

.voice-call-transcript {
  margin-block-start: 9px !important;
  padding: 8px 11px;
  border: 1px solid #bbdcc1;
  border-radius: 8px;
  background: #fbfff5b5;
  color: #2f4f3b;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.voice-call-actions {
  display: flex;
  justify-content: center;
  gap: 35px;
}

.voice-call-actions button {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: #304d3d;
  font-size: 12px;
}

.voice-call-actions svg {
  box-sizing: content-box;
  width: 23px;
  height: 23px;
  padding: 12px;
  border-radius: 50%;
  background: #3a875b;
  color: white;
}

.voice-call-actions .voice-call-dismiss svg {
  background: #b64a49;
  transform: rotate(130deg);
}
