:root {
  color-scheme: light;
  --app-bg: #ededed;
  --rail: #dfe4e7;
  --list: #f6f6f6;
  --panel: #f4f4f4;
  --card: #ffffff;
  --text: #111111;
  --muted: #8c8c8c;
  --line: #dddddd;
  --soft-line: #eeeeee;
  --green: #07c160;
  --green-dark: #05a854;
  --bubble: #ffffff;
  --mine: #95ec69;
  --danger: #d93025;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background: var(--app-bg);
  color: var(--text);
}

.launch-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #ecfbf4;
  transition: opacity 380ms ease, visibility 380ms ease;
}

.launch-splash img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.launch-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #f7f7f7, #e9efec);
}

.auth-panel {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.brand-mark,
.avatar,
.rail-avatar {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0fc96b, #1aa7ff);
  font-weight: 800;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: block;
  border-radius: 12px;
  object-fit: cover;
}

.auth-panel h1 {
  margin: 18px 0 8px;
  font-size: 34px;
}

.auth-panel p,
.empty p,
.hint,
small {
  color: var(--muted);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 24px 0;
}

.tab,
.secondary,
.id-button {
  border: 1px solid var(--line);
  background: #f7f7f7;
  color: var(--text);
  border-radius: 8px;
  min-height: 42px;
}

.tab.active {
  border-color: var(--green);
  background: #ecfbf3;
  color: var(--green-dark);
  font-weight: 700;
}

.auth-form,
.modal-form {
  display: grid;
  gap: 14px;
}

.history-search {
  display: grid;
  gap: 12px;
}

.history-results {
  display: grid;
  gap: 8px;
  max-height: min(420px, 56vh);
  overflow: auto;
}

.history-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.history-result small {
  color: var(--muted);
}

.history-result span {
  grid-column: 1 / -1;
  color: #555;
  line-height: 1.35;
}

.invite-banner {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 18px 0 0;
  padding: 12px;
  border: 1px solid #d7f1e2;
  border-radius: 8px;
  background: #f2fbf6;
}

.invite-banner strong {
  display: block;
  font-weight: 700;
}

.invite-banner small {
  display: block;
  margin-top: 3px;
  line-height: 1.35;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input {
  height: 44px;
  padding: 0 12px;
}

textarea {
  resize: none;
  min-height: 42px;
  max-height: 120px;
  padding: 10px 12px;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.12);
}

.primary {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 18px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.primary:hover {
  background: var(--green-dark);
}

.wide {
  width: 100%;
}

.wechat-app {
  height: 100vh;
  display: grid;
  grid-template-columns: 78px 360px minmax(0, 1fr);
  background: var(--panel);
  overflow: hidden;
}

.desktop-rail {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto auto;
  gap: 24px;
  justify-items: center;
  padding: 26px 0 22px;
  background: var(--rail);
  border-right: 1px solid #cfd4d7;
}

.rail-avatar {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
}

.rail-button,
.ghost-button,
.round-button,
.circle-tool,
.back-button,
.composer-tool {
  border: 0;
  background: transparent;
  color: #555;
}

.rail-button {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  font-size: 25px;
}

.rail-button.active,
.mobile-tab.active {
  color: var(--green);
}

.rail-spacer {
  min-height: 1px;
}

.chat-list-pane {
  min-width: 0;
  background: var(--list);
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
}

.mobile-status {
  display: none;
}

.list-titlebar {
  height: 78px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 18px;
}

.list-titlebar h1,
.me-topbar h1 {
  margin: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
}

.round-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e9e9e9;
  font-size: 28px;
  line-height: 1;
}

.ghost-button {
  width: 42px;
  height: 42px;
  font-size: 30px;
}

.search-box {
  margin: 0 18px 12px;
  height: 44px;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff;
  color: #b4b4b4;
  font-size: 20px;
}

.search-box input {
  height: 100%;
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
  font-size: 17px;
}

.conversation-list {
  overflow: auto;
  padding: 0;
}

.conversation {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  background: transparent;
  padding: 13px 18px;
}

.conversation:hover,
.conversation.active {
  background: #e6e6e6;
}

.conversation-main {
  min-width: 0;
}

.conversation-avatar {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
}

.conversation-avatar .unread-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  box-shadow: 0 0 0 2px #f6f6f6;
}

.conversation strong,
.conversation small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation strong {
  font-size: 18px;
  font-weight: 500;
}

.conversation small {
  margin-top: 5px;
  font-size: 15px;
}

.conversation-time {
  align-self: start;
  padding-top: 4px;
  color: #b5b5b5;
  font-size: 13px;
  white-space: nowrap;
}

.unread-badge,
.has-unread::after {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fa5151;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 0 5px;
}

.has-unread {
  position: relative;
}

.has-unread::after {
  content: attr(data-unread);
  position: absolute;
  top: 6px;
  right: 8px;
}
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
}

.avatar.small {
  width: 52px;
  height: 52px;
  border-radius: 7px;
  font-size: 18px;
}

.avatar.xl {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  font-size: 30px;
}

.avatar img,
.rail-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.avatar .avatar-image,
.rail-avatar .avatar-image {
  grid-area: 1 / 1;
}

.avatar .avatar-fallback,
.rail-avatar .avatar-fallback {
  grid-area: 1 / 1;
}

.avatar:not(.avatar-broken) .avatar-image + .avatar-fallback,
.rail-avatar:not(.avatar-broken) .avatar-image + .avatar-fallback {
  display: none;
}

.avatar.avatar-broken .avatar-image,
.rail-avatar.avatar-broken .avatar-image {
  display: none;
}

.editable-avatar {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.editable-avatar input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.editable-avatar::after {
  content: "＋";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(7, 193, 96, 0.94);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.empty-list {
  padding: 30px 24px;
  color: var(--muted);
  line-height: 1.6;
}

.chat-panel {
  min-width: 0;
  overflow: hidden;
  background: #f3f3f3;
}

.chat-panel.swipe-ready,
.chat-panel.swiping,
.chat-panel.swipe-returning {
  will-change: transform;
}

.chat-panel.swiping,
.chat-panel.swipe-returning {
  transform: translateX(var(--swipe-x, 0));
}

.chat-panel.swipe-returning {
  transition: transform 180ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

.empty {
  height: 100%;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 24px;
}

.chat-view {
  height: 100%;
  display: grid;
  grid-template-rows: 78px 1fr auto;
  min-height: 0;
}

.chat-header {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #f6f6f6;
}

.chat-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
}

.chat-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-header-actions {
  display: flex;
  gap: 8px;
}

.circle-tool,
.back-button,
.composer-tool {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
}

.circle-tool:hover,
.back-button:hover,
.composer-tool:hover,
.round-button:hover {
  background: #e9e9e9;
}

.messages {
  padding: 22px 24px;
  overflow: auto;
  background: #ededed;
}

.message {
  max-width: min(720px, 88%);
  margin: 0 0 18px;
}

.message.message-found .bubble,
.message.message-found .voice-message {
  outline: 2px solid rgba(7, 193, 96, 0.55);
  outline-offset: 3px;
}

.message.mine {
  margin-left: auto;
}

.message-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.message.mine .message-line {
  justify-content: flex-end;
}

.message-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 6px;
  font-size: 15px;
  padding: 0;
  overflow: hidden;
}

.message-content {
  min-width: 0;
  max-width: calc(100% - 48px);
}

.bubble-meta {
  color: #9a9a9a;
  font-size: 13px;
  margin: 0 0 6px 2px;
}

.mine .bubble-meta {
  text-align: right;
}

.bubble {
  width: fit-content;
  max-width: 100%;
  padding: 10px 13px;
  border-radius: 6px;
  background: var(--bubble);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.45;
}

.bubble-row {
  display: flex;
  align-items: end;
  gap: 6px;
}

.mine .bubble-row {
  justify-content: flex-end;
}

.mine .bubble {
  margin-left: auto;
  background: var(--mine);
}

.bubble.recalled {
  color: #8c8c8c;
  background: #e3e3e3;
  font-style: italic;
}

.message.pending .bubble {
  opacity: 0.72;
}

.message-menu {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #999;
  font-size: 20px;
  line-height: 1;
}

.message-menu:hover {
  background: #dedede;
  color: #555;
}

.translation {
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: #555;
  font-size: 14px;
  line-height: 1.45;
}

.mine .translation {
  margin-left: auto;
  background: rgba(149, 236, 105, 0.36);
}

.translation strong {
  display: block;
  margin-bottom: 3px;
  color: #777;
  font-size: 12px;
}

.audio-bubble {
  min-width: 0;
  padding: 0;
  background: transparent;
}

.voice-message {
  width: min(var(--voice-width, 112px), 46vw);
  min-width: 96px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  padding: 10px 13px;
  background: var(--bubble);
  color: #222;
  font: inherit;
  font-size: 17px;
  line-height: 1.45;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}

.mine .voice-message {
  background: var(--mine);
}

.voice-message audio {
  display: none;
}

.voice-icon {
  font-size: 12px;
  line-height: 1;
}

.voice-waves {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.voice-waves i {
  position: absolute;
  top: 50%;
  left: 0;
  border: 2px solid currentColor;
  border-left: 0;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 0 999px 999px 0;
  transform: translateY(-50%);
  opacity: 0.35;
}

.mine .voice-waves i {
  left: auto;
  right: 0;
  border-right: 0;
  border-left: 2px solid currentColor;
  border-radius: 999px 0 0 999px;
}

.voice-waves i:nth-child(1) {
  width: 6px;
  height: 8px;
  opacity: 0.9;
}

.voice-waves i:nth-child(2) {
  width: 11px;
  height: 13px;
  opacity: 0.62;
}

.voice-waves i:nth-child(3) {
  width: 16px;
  height: 18px;
}

.voice-message.playing .voice-waves i {
  animation: voicePulse 1s infinite;
}

.voice-message.playing .voice-waves i:nth-child(2) {
  animation-delay: 0.12s;
}

.voice-message.playing .voice-waves i:nth-child(3) {
  animation-delay: 0.24s;
}

.voice-duration {
  margin-left: auto;
  color: rgba(0, 0, 0, 0.62);
  font-size: 17px;
  white-space: nowrap;
}

.mine .voice-duration {
  margin-left: 0;
  margin-right: auto;
}

.voice-transcript-modal {
  max-width: min(260px, 66vw);
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: #555;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@keyframes voicePulse {
  0%, 100% {
    opacity: 0.25;
  }

  45% {
    opacity: 1;
  }
}

.composer {
  position: relative;
  padding: 10px 18px 18px;
  border-top: 1px solid var(--line);
  background: #f7f7f7;
}

.recording-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #e7f7ef;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
}

.recording-bar small {
  color: #6f8f7c;
  font-size: 12px;
  font-weight: 600;
}

.composer-tool.active {
  background: #e8f6ee;
  color: var(--green-dark);
}

.compose-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 76px;
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.composer-tool.recording {
  background: #ffeded;
  color: #e03131;
}

.voice-hold-button {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  min-height: 42px;
  min-width: 0;
  background: #fff;
  color: #222;
  font-size: 16px;
  font-weight: 700;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.voice-hold-button[hidden] {
  display: none;
}

.composer.voice-mode .voice-hold-button {
  grid-column: 2 / span 2;
}

.composer.voice-mode textarea,
.composer.voice-mode .send-button {
  display: none;
}

.voice-hold-button.recording {
  transform: scale(0.96);
  background: #e8f6ee;
  color: var(--green-dark);
}

.voice-hold-button.canceling {
  background: #f2f2f2;
  color: #777;
}

.compose-row textarea {
  border: 0;
  border-radius: 6px;
  min-height: 42px;
  min-width: 0;
}

.send-button {
  display: inline-grid;
  place-items: center;
  white-space: nowrap;
  min-width: 0;
  padding: 0 12px;
}

.me-panel {
  min-width: 0;
  overflow: auto;
  background: #ededed;
  padding: 0 0 28px;
}

.wechat-app.show-me {
  grid-template-columns: 78px minmax(360px, 560px) 1fr;
}

.me-topbar {
  height: 78px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 0 18px;
  background: #f6f6f6;
  border-bottom: 1px solid var(--line);
}

.me-profile,
.me-card {
  background: #fff;
  margin: 16px;
  border-radius: 8px;
}

.me-profile {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px;
}

.me-profile h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.me-profile p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.id-button {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  min-height: 30px;
  color: var(--muted);
  font-size: 13px;
}

.me-card {
  padding: 14px;
}

.profile-form {
  display: grid;
  gap: 14px;
}

.profile-form-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
}

.profile-form h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.profile-form p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.profile-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-form textarea {
  resize: vertical;
  min-height: 66px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 10px;
}

.menu-card {
  padding: 0;
  overflow: hidden;
}

.menu-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  background: #fff;
  padding: 12px 16px;
}

.menu-row:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.menu-row span {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef8f2;
  color: var(--green);
  font-size: 20px;
}

.menu-row strong {
  font-weight: 500;
}

.menu-row small {
  margin-top: 3px;
}

.danger-row span {
  background: #fff1ee;
  color: var(--danger);
}

dialog {
  width: min(400px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f2;
}

dialog h3 {
  margin: 0 0 18px;
}

.profile-modal {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.profile-modal h3 {
  margin: 6px 0 0;
  font-size: 22px;
}

.profile-modal p {
  width: 100%;
  margin: 6px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #f6f6f6;
  color: #555;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 4px auto 14px;
  border: 8px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.modal-copy {
  text-align: center;
  color: var(--muted);
}

.invite-link {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f4f4f4;
  color: #555;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.check-list,
.quick-menu,
.install-guide,
.language-options {
  display: grid;
  gap: 10px;
}

.scanner {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
}

.scanner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-frame {
  position: absolute;
  inset: 15%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18);
}

.scanner-manual {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.scanner-manual .search-row {
  grid-template-columns: 1fr 76px;
}

.check-list {
  max-height: 300px;
  overflow: auto;
}

.check-list label {
  grid-template-columns: 20px 1fr;
  align-items: center;
  color: var(--text);
}

.check-list input {
  width: auto;
  height: auto;
}

.error {
  color: var(--danger);
  min-height: 18px;
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 10;
}

a {
  color: #2563eb;
}

.mobile-only,
.mobile-tabs {
  display: none;
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  body {
    background: #ededed;
  }

  .wechat-app {
    height: 100dvh;
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 74px;
  }

  .wechat-app.show-me,
  .wechat-app.show-chats {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 74px;
  }

  .wechat-app.chatting {
    grid-template-rows: 1fr;
  }

  .desktop-rail {
    display: none;
  }

  .mobile-status {
    display: none;
  }

  .chat-list-pane,
  .chat-panel,
  .me-panel {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    border: 0;
  }

  .list-titlebar {
    height: 62px;
    padding: 8px 18px 10px;
  }

  .list-titlebar h1,
  .me-topbar h1 {
    font-size: 22px;
  }

  .search-box {
    height: 44px;
    margin: 0 18px 12px;
  }

  .conversation {
    min-height: 88px;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    padding: 13px 18px;
    background: #f6f6f6;
  }

  .conversation strong {
    font-size: 20px;
  }

  .chat-panel {
    display: none;
  }

  .chat-panel.swiping,
  .chat-panel.swipe-returning {
    box-shadow: -18px 0 30px rgba(0, 0, 0, 0.12);
  }

  .wechat-app.show-me .me-panel {
    display: block;
  }

  .wechat-app.chatting .chat-list-pane,
  .wechat-app.show-me .chat-list-pane {
    display: none;
  }

  .wechat-app.chatting .chat-panel {
    display: block;
  }

  .wechat-app.chatting .mobile-tabs {
    display: none;
  }

  .wechat-app.show-me .chat-panel {
    display: none;
  }

  .chat-view {
    grid-template-rows: 58px 1fr auto;
  }

  .chat-header {
    height: 58px;
    padding: 0 10px;
  }

  .chat-header h2 {
    font-size: 18px;
    text-align: center;
  }

  .messages {
    padding: 16px 12px;
  }

  .message {
    max-width: 94%;
  }

  .message-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 14px;
  }

  .composer {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }

  .composer.voice-mode {
    padding-bottom: calc(36px + env(safe-area-inset-bottom));
  }

  @supports (padding-bottom: max(1px, 2px)) {
    .composer.voice-mode {
      padding-bottom: calc(22px + max(env(safe-area-inset-bottom), 18px));
    }
  }

  .compose-row {
    grid-template-columns: 38px minmax(0, 1fr) 56px;
    gap: 7px;
  }

  .composer-tool {
    width: 38px;
    height: 38px;
  }

  .send-button {
    width: 56px;
    min-height: 38px;
    padding: 0;
    border-radius: 19px;
    font-size: 15px;
    touch-action: manipulation;
    position: relative;
    z-index: 2;
  }

  .voice-hold-button {
    min-height: 38px;
    font-size: 15px;
  }

  .mobile-tabs {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(247, 247, 247, 0.96);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-tab {
    border: 0;
    background: transparent;
    color: #222;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    font-size: 13px;
    position: relative;
  }

  .mobile-tab span {
    font-size: 24px;
    line-height: 1;
  }

  .mobile-only {
    display: inline-grid;
  }

  .me-topbar {
    height: calc(58px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }

  .me-profile,
  .me-card {
    margin: 12px;
  }

  .profile-form-head {
    grid-template-columns: 1fr;
  }

}

@media (min-width: 761px) {
  .back-button {
    visibility: hidden;
  }

  .wechat-app.show-me .me-panel {
    grid-column: 2 / 4;
  }
}
