:root {
  color-scheme: light;
  --rail: #111827;
  --rail-soft: #243044;
  --panel: #f3f5f8;
  --panel-strong: #e7ebf0;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e1e6ee;
  --text: #0f172a;
  --muted: #6b7280;
  --muted-strong: #4b5563;
  --green: #18a058;
  --green-dark: #0f8a48;
  --blue: #2274e8;
  --brand-blue: #0091ea;
  --brand-green: #07c160;
  --brand-gradient: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
  --danger: #dc2626;
  --bubble-peer: #ffffff;
  --bubble-me: #d9fdd3;
  --chat-bg: #edf2f7;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  --app-height: 100dvh;
  --visible-height: 100dvh;
  --keyboard-inset: 0px;
  --viewport-top: 0px;
  --mobile-top-avoid: 0px;
  --mobile-header-height: 58px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  overflow: hidden;
  background: #e9edf3;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:active {
  transform: translateY(1px);
}

body.busy button {
  cursor: wait;
}

.hidden {
  display: none !important;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #111827;
}

.auth-panel {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.brand-mark,
.empty-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-block h1,
.brand-block p,
.pane-header h2,
.pane-header p,
.chat-header h2,
.chat-header p,
.detail-card h2,
.detail-card p,
.empty-state h2,
.empty-state p {
  margin: 0;
}

.brand-block h1 {
  font-size: 24px;
  line-height: 1.2;
}

.brand-block p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border-radius: 8px;
  background: var(--panel);
}

.auth-tab {
  height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-strong);
}

.auth-tab.is-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.auth-hint {
  min-height: 36px;
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.auth-form label,
.field {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 13px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

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

textarea {
  min-height: 54px;
  max-height: 150px;
  padding: 12px;
  resize: none;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 173, 25, 0.16);
}

.primary-button,
.secondary-button,
.icon-text-button,
.send-button {
  height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  transition: background-color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.primary-button,
.send-button {
  background: var(--green);
  color: #fff;
}

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

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.56;
}

.secondary-button,
.icon-text-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.install-app-button {
  border-color: rgba(37, 99, 235, 0.22);
  background: #eff6ff;
  color: #1d4ed8;
}

.demo-accounts {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.demo-accounts span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.demo-account {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eefbf1;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.demo-account:hover {
  border-color: rgba(26, 173, 25, 0.44);
  background: #dcfce7;
}

.app-shell {
  display: grid;
  grid-template-columns: 64px 336px minmax(360px, 1fr) 286px;
  width: min(1500px, 100vw);
  height: min(920px, var(--app-height));
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 16px 10px;
  background: var(--rail);
}

.avatar-button,
.rail-button,
.icon-button,
.back-button {
  display: grid;
  place-items: center;
  border: 0;
}

.avatar-button {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 800;
}

.rail-nav {
  display: grid;
  gap: 12px;
  width: 100%;
}

.rail-button {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  font-weight: 800;
}

.rail-button:hover,
.rail-button.is-active {
  background: var(--rail-soft);
  color: #fff;
}

.logout-button {
  margin-top: auto;
  color: #fca5a5;
}

.conversation-pane,
.detail-pane {
  min-width: 0;
  background: var(--panel);
}

.conversation-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.pane-header,
.chat-header,
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pane-header {
  min-height: 78px;
  padding: 18px 16px 10px;
  border-bottom: 1px solid rgba(225, 230, 238, 0.8);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(14px);
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pane-header h2 {
  margin-top: 2px;
  font-size: 23px;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.connection-pill::before {
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #94a3b8;
  content: "";
}

.connection-pill.is-online {
  background: #ecfdf3;
  color: #166534;
}

.connection-pill.is-online::before {
  background: var(--green);
}

.icon-text-button {
  min-width: 74px;
  padding: 0 10px;
  font-size: 13px;
}

.mobile-logout-button {
  display: none;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.icon-button,
.back-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
}

.search-box {
  padding: 0 14px 14px;
}

.search-box input {
  height: 38px;
  border: 0;
  background: #e9eef5;
}

.mobile-view-tabs {
  display: none;
}

.mobile-tab-bar {
  display: none;
}

.quick-action-menu {
  display: none;
}

.me-panel {
  display: none;
}

.discover-panel {
  display: none;
}

.conversation-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px 8px 12px;
  scrollbar-width: thin;
}

.empty-row {
  display: grid;
  gap: 6px;
  padding: 18px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.empty-row strong {
  color: var(--muted-strong);
  font-size: 14px;
}

.conversation-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 68px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background-color 120ms ease;
}

.conversation-item:hover,
.conversation-item.is-active {
  background: #fff;
}

.conversation-item:active {
  background: #e8eef5;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 800;
  overflow: hidden;
}

.avatar.group {
  background: var(--brand-gradient);
}

.avatar-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 2px;
  align-content: center;
  justify-content: center;
  padding: 3px;
  background: #e5e7eb !important;
  color: #fff;
}

.avatar-grid-1,
.avatar-grid-2,
.avatar-grid-3,
.avatar-grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.avatar-grid-1 {
  grid-template-columns: 1fr;
}

.avatar-grid > span:not(.unread-badge) {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border-radius: 4px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.avatar-grid-1 > span:not(.unread-badge) {
  font-size: 18px;
}

.avatar-grid-2 > span:not(.unread-badge),
.avatar-grid-3 > span:not(.unread-badge),
.avatar-grid-4 > span:not(.unread-badge) {
  font-size: 13px;
}

.status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: #9ca3af;
}

.status-dot.online {
  background: var(--green);
}

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

.conversation-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-weight: 760;
}

.conversation-title span:first-child,
.conversation-preview {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.conversation-preview {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.unread-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.chat-pane {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: var(--chat-bg);
}

.chat-header {
  min-height: 62px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(225, 230, 238, 0.88);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
}

.back-button {
  display: none;
  background: transparent;
  font-size: 30px;
}

.chat-title-wrap {
  min-width: 0;
  flex: 1;
}

.call-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.call-action-button {
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.chat-more-button {
  display: none;
}

.chat-header h2 {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-header p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 0;
  flex: 1;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 28px 28px, rgba(255, 255, 255, 0.78) 0 2px, transparent 2px 22px),
    var(--chat-bg);
}

.empty-state h2 {
  font-size: 22px;
}

.empty-state p {
  max-width: 360px;
  color: var(--muted);
  line-height: 1.6;
}

.message-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px 24px 18px;
  scrollbar-width: thin;
  background:
    linear-gradient(rgba(237, 242, 247, 0.88), rgba(237, 242, 247, 0.88)),
    radial-gradient(circle at 20px 20px, rgba(15, 23, 42, 0.08) 0 1px, transparent 1px 18px);
}

.message-row {
  display: flex;
  gap: 9px;
  margin-bottom: 10px;
}

.message-row.me {
  justify-content: flex-end;
}

.message-row.me .message-avatar {
  order: 2;
}

.message-row.me .message-meta {
  justify-content: flex-end;
}

.message-row.me .bubble {
  background: var(--bubble-me);
  border-color: rgba(24, 160, 88, 0.18);
}

.message-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #64748b, #334155);
  color: #fff;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
}

.message-stack {
  max-width: min(640px, 74%);
}

.message-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.bubble {
  width: fit-content;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  background: var(--bubble-peer);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.bubble-image,
.bubble-file,
.bubble-red_packet {
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
  white-space: normal;
}

.message-image {
  display: block;
  max-width: min(280px, 62vw);
  max-height: 320px;
  border-radius: 8px;
  object-fit: cover;
}

.file-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: min(280px, 72vw);
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  text-decoration: none;
}

.file-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #eef2f7;
  color: #64748b;
  font-size: 22px;
}

.file-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.file-card-body b {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card-body small {
  color: #64748b;
  font-size: 12px;
}

.red-packet-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  width: min(260px, 72vw);
  overflow: hidden;
  border-radius: 8px;
  background: #e46d2b;
  color: #fff7df;
}

.red-packet-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 12px 0 0 12px;
  border-radius: 6px;
  background: #f4c56a;
  color: #b7471a;
  font-size: 24px;
  font-weight: 900;
}

.red-packet-body {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 12px 10px 0;
}

.red-packet-body b,
.red-packet-body span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.red-packet-body b {
  font-size: 15px;
}

.red-packet-body span {
  color: #ffe6b3;
  font-size: 13px;
}

.red-packet-card small {
  grid-column: 1 / -1;
  padding: 6px 12px;
  background: rgba(255, 246, 220, 0.18);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: end;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(225, 230, 238, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.composer-round-button,
.attachment-panel,
.emoji-panel {
  display: none;
}

.send-button {
  height: 46px;
  border-radius: 999px;
}

.send-button:disabled {
  background: #cbd5e1;
}

.detail-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-left: 1px solid var(--line);
}

.detail-card,
.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.detail-card {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px 16px;
  text-align: center;
}

.detail-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.detail-card h2 {
  max-width: 100%;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-card p {
  max-width: 100%;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

.detail-actions .secondary-button {
  height: 36px;
  font-size: 12px;
}

.detail-section {
  min-height: 120px;
  overflow: hidden;
}

.detail-section h3 {
  margin: 0;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.detail-section h3 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.member-list {
  max-height: 360px;
  overflow: auto;
}

.member-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
}

.member-item .avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 12px;
}

.member-body {
  min-width: 0;
}

.member-name,
.member-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-name {
  color: var(--muted-strong);
  font-size: 13px;
}

.member-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: block;
  padding: 0;
  background: var(--panel);
}

.group-info-screen {
  display: none;
}

.red-packet-screen {
  display: none;
}

.profile-screen,
.moments-screen,
.qr-screen,
.nickname-screen,
.group-edit-screen,
.group-qr-screen,
.group-members-screen,
.group-add-screen,
.group-search-screen {
  display: none;
}

.modal {
  width: 100%;
  height: var(--app-height);
  max-height: var(--app-height);
  overflow: auto;
  padding: 0;
  border-radius: 0;
  background: #f3f5f8;
  box-shadow: none;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  min-height: 64px;
  padding: 10px max(16px, calc((100vw - 640px) / 2)) 10px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  text-align: center;
}

.page-back-button {
  display: grid;
  width: 38px;
  height: 38px;
  background: transparent;
}

.modal .field {
  width: min(640px, calc(100vw - 28px));
  margin: 14px auto;
}

.modal-helper {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 8px;
}

.search-results {
  display: grid;
  gap: 8px;
  width: min(640px, calc(100vw - 28px));
  margin: 0 auto 18px;
}

#create-group-submit {
  display: block;
  width: min(640px, calc(100vw - 28px));
  margin: 0 auto 18px;
}

.result-empty {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.result-empty strong {
  color: var(--muted-strong);
  font-size: 14px;
}

.result-empty.loading {
  border-style: solid;
  background: #f0fdf4;
}

.result-empty.loading strong {
  color: #166534;
}

.result-item,
.selected-members {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.result-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

.result-item .avatar {
  width: 40px;
  height: 40px;
}

.result-title {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-id {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.selected-members {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: min(640px, calc(100vw - 28px));
  min-height: 42px;
  padding: 8px;
  margin: 0 auto 14px;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

.member-chip button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.12);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--keyboard-inset));
  z-index: 40;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 14px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.94);
  color: #fff;
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}

.call-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  height: var(--visible-height);
  padding: calc(28px + env(safe-area-inset-top, 0px)) 28px calc(34px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 68% 46%, rgba(135, 47, 35, 0.44), transparent 31%),
    radial-gradient(circle at 26% 22%, rgba(3, 95, 78, 0.64), transparent 42%),
    linear-gradient(160deg, #06221f, #132421 48%, #171817);
  color: #fff;
}

.call-screen::before {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  content: "";
}

.call-topbar,
.call-stage,
.call-kind,
.incoming-call-actions,
.active-call-actions {
  position: relative;
  z-index: 1;
}

.call-topbar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 48px;
}

.call-top-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 32px;
  font-weight: 300;
}

.call-timer {
  justify-self: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.call-stage {
  display: grid;
  grid-template-rows: auto auto auto;
  place-items: center;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 42px;
  background: transparent;
}

.remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #172033;
}

.local-video {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: min(34vw, 160px);
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  object-fit: cover;
  background: #0f172a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.call-avatar {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-top: 18px;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.call-stage h2,
.call-stage p {
  margin: 0;
  text-align: center;
}

.call-stage h2 {
  margin-top: 20px;
  color: #fff;
  font-size: 24px;
  font-weight: 560;
}

.call-stage p,
.call-kind {
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
}

.call-stage p {
  align-self: end;
  margin-top: 180px;
}

.call-kind {
  display: none;
}

.incoming-call-actions,
.active-call-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(28px, 12vw, 76px);
  min-height: 126px;
}

.call-circle-button {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 92px;
  min-height: 118px;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 900;
}

.call-circle-button b {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
}

.call-circle-button small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.call-circle-button.is-danger {
  background: transparent;
}

.call-circle-button.is-danger b {
  background: #ff4f57;
}

.call-circle-button.is-accept {
  background: transparent;
}

.call-circle-button.is-accept b {
  background: #10c965;
}

.call-circle-button.is-active {
  background: transparent;
}

.call-circle-button.is-active b {
  background: rgba(255, 255, 255, 0.92);
  color: #111;
}

.call-screen.is-earpiece-mode .call-stage::after {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: min(280px, calc(100vw - 72px));
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.36);
  color: rgba(255, 255, 255, 0.78);
  content: "听筒模式：把手机贴近耳朵使用";
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  transform: translateX(-50%);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 64px 310px minmax(340px, 1fr);
  }

  .detail-pane {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --mobile-top-avoid: 8px;
  }

  html,
  body {
    height: var(--visible-height);
    overflow: hidden;
    overscroll-behavior: none;
    background: #101010;
  }

  body.secondary-page-open .app-shell {
    visibility: hidden;
  }

  .auth-screen {
    align-items: start;
    top: var(--viewport-top);
    bottom: auto;
    height: var(--visible-height);
    padding: calc(18px + env(safe-area-inset-top, 0px) + var(--mobile-top-avoid)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .auth-panel {
    padding: 20px 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  }

  .brand-block {
    margin-bottom: 18px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .app-shell {
    display: block;
    width: 100vw;
    height: var(--visible-height);
    max-height: var(--visible-height);
    margin: 0;
    box-shadow: none;
  }

  .rail {
    display: none;
  }

  .conversation-pane {
    width: 100vw;
    height: var(--visible-height);
    border-right: 0;
    background: #101010;
    color: #f4f4f5;
  }

  .pane-header {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    min-height: calc(70px + var(--mobile-top-avoid));
    padding: calc(14px + env(safe-area-inset-top, 0px) + var(--mobile-top-avoid)) 14px 8px;
    border-bottom: 0;
    background: #101010;
  }

  .pane-header > div:first-child {
    grid-column: 2;
    min-width: 0;
  }

  .pane-header h2 {
    position: static;
    overflow: hidden;
    color: #d7d7dc;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .eyebrow {
    display: none;
  }

  .header-actions {
    grid-column: 3;
    justify-self: end;
    gap: 5px;
    margin-left: 0;
  }

  .connection-pill {
    display: none;
  }

  .icon-text-button {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
  }

  .install-app-button {
    display: none !important;
  }

  #new-chat-button {
    position: relative;
    width: 34px;
    min-width: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: transparent;
    overflow: hidden;
  }

  #new-chat-button::before {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #e8e8ec;
    content: "+";
    font-size: 29px;
    font-weight: 300;
    line-height: 1;
  }

  #new-group-button,
  .mobile-logout-button {
    display: none;
  }

  .quick-action-menu {
    position: absolute;
    top: calc(54px + env(safe-area-inset-top, 0px) + var(--mobile-top-avoid));
    right: 10px;
    z-index: 20;
    display: grid;
    width: 158px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #252525;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  }

  .quick-action-menu.hidden {
    display: none;
  }

  .quick-action-menu::before {
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: #252525;
    content: "";
    transform: rotate(45deg);
  }

  .quick-action-menu button {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #f4f4f5;
    text-align: left;
  }

  .quick-action-menu button:active {
    background: rgba(255, 255, 255, 0.08);
  }

  .quick-action-menu span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: #d7d7dc;
    font-size: 18px;
    font-weight: 600;
  }

  .quick-action-menu b {
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .search-box {
    padding: 0 10px 9px;
    background: #101010;
  }

  .search-box input {
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: #181818;
    color: #e4e4e7;
    font-size: 16px;
    text-align: center;
  }

  .search-box input::placeholder {
    color: #69696f;
  }

  .app-shell.is-me-view .pane-header,
  .app-shell.is-me-view .search-box {
    display: none;
  }

  .app-shell.is-discover-view .search-box {
    display: none;
  }

  .mobile-view-tabs {
    display: none;
  }

  .mobile-view-tab {
    height: auto;
    border: 0;
    background: transparent;
    color: inherit;
  }

  .mobile-view-tab.is-active {
    background: transparent;
    color: var(--brand-green);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  }

  .conversation-list {
    padding: 2px 10px calc(68px + env(safe-area-inset-bottom, 0px));
    background: #101010;
  }

  .conversation-item {
    position: relative;
    width: 100%;
    grid-template-columns: 58px minmax(0, 1fr) 64px;
    min-height: 73px;
    padding: 9px 0 9px 12px;
    border-radius: 0;
    background: #101010;
    color: #f4f4f5;
  }

  .avatar {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: visible;
  }

  .avatar-grid {
    gap: 2px;
    padding: 3px;
    overflow: visible;
    background: #2b2b2b !important;
  }

  .avatar-grid > span:not(.unread-badge) {
    border-radius: 3px;
    background: var(--brand-gradient);
    color: #fff;
  }

  .conversation-item:hover,
  .conversation-item.is-active {
    background: transparent;
  }

  .conversation-main {
    align-self: stretch;
    min-width: 0;
    padding: 5px 10px 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  }

  .conversation-item > span:last-child:not(.unread-badge) {
    display: none;
  }

  .avatar .unread-badge {
    position: absolute;
    top: -7px;
    right: -8px;
    z-index: 1;
  }

  .conversation-title {
    color: #ececef;
    font-size: 16px;
    font-weight: 520;
  }

  .conversation-time {
    display: block;
    color: #3f3f46;
    font-size: 12px;
    font-weight: 400;
    text-align: right;
    white-space: nowrap;
  }

  .conversation-meta {
    align-self: stretch;
    padding: 8px 10px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  }

  .conversation-preview {
    margin-top: 5px;
    color: #686871;
    font-size: 14px;
    line-height: 1.35;
  }

  .status-dot {
    border-color: #101010;
  }

  .empty-row {
    padding: 28px 24px;
    color: #66666e;
  }

  .empty-row strong {
    color: #a1a1aa;
  }

  .me-panel {
    display: block;
    height: var(--visible-height);
    padding: calc(58px + env(safe-area-inset-top, 0px)) 0 calc(74px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    background: #101010;
    color: #d7d7dc;
    -webkit-overflow-scrolling: touch;
  }

  .me-panel.hidden {
    display: none;
  }

  .discover-panel {
    display: block;
    height: calc(var(--visible-height) - 70px - env(safe-area-inset-top, 0px) - var(--mobile-top-avoid));
    padding: 8px 0 calc(74px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    background: #101010;
    color: #d7d7dc;
    -webkit-overflow-scrolling: touch;
  }

  .discover-panel.hidden {
    display: none;
  }

  .discover-menu-group {
    margin-top: 8px;
    border-top: 8px solid #0b0b0b;
    border-bottom: 8px solid #0b0b0b;
    background: #181818;
  }

  .discover-menu-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 18px;
    gap: 16px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 0 20px;
    border: 0;
    background: transparent;
    color: #d7d7dc;
    text-align: left;
  }

  .discover-menu-row::after {
    grid-column: 3;
    color: #56565f;
    content: "›";
    font-size: 28px;
    font-weight: 300;
  }

  .discover-menu-row span:nth-child(2) {
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .discover-menu-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: #3b82f6;
    font-size: 23px;
    line-height: 1;
  }

  .me-profile-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 26px 18px;
    gap: 14px;
    align-items: center;
    width: 100%;
    min-height: 128px;
    padding: 16px 20px 22px;
    border: 0;
    border-bottom: 8px solid #0b0b0b;
    background: #181818;
    color: #d7d7dc;
    text-align: left;
  }

  .me-avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 7px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
  }

  .me-profile-main {
    min-width: 0;
  }

  .me-profile-main h2 {
    overflow: hidden;
    margin: 0 0 8px;
    color: #ededf0;
    font-size: 22px;
    font-weight: 650;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .me-profile-main p {
    overflow: hidden;
    margin: 0;
    color: #8a8a93;
    font-size: 16px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .me-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
  }

  .me-status-row span {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #7a7a83;
    font-size: 13px;
  }

  .me-status-row span + span {
    width: 24px;
    justify-content: center;
    padding: 0;
  }

  .me-qr {
    color: #8c93a3;
    font-size: 21px;
  }

  .me-chevron {
    color: #5a5a62;
    font-size: 30px;
    font-weight: 300;
  }

  .me-menu-group {
    border-bottom: 8px solid #0b0b0b;
    background: #181818;
  }

  .me-menu-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto 18px;
    gap: 16px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 0 20px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    background: transparent;
    color: #d7d7dc;
    text-align: left;
  }

  .me-menu-row::after {
    grid-column: 4;
    color: #56565f;
    content: "›";
    font-size: 28px;
    font-weight: 300;
  }

  .me-menu-row span:nth-child(2) {
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .me-menu-row em {
    overflow: hidden;
    max-width: 118px;
    color: #777780;
    font-size: 13px;
    font-style: normal;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .me-menu-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    font-size: 23px;
    line-height: 1;
  }

  .me-menu-icon.is-green {
    color: #12b981;
  }

  .me-menu-icon.is-orange {
    color: #e38b20;
  }

  .me-menu-icon.is-rainbow {
    color: #3b82f6;
  }

  .me-menu-icon.is-yellow {
    color: #d4a51e;
  }

  .me-menu-icon.is-blue {
    color: #1687d9;
  }

  .mobile-tab-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #171717;
  }

  .mobile-tab-button {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #b8b8be;
    font-size: 11px;
    line-height: 1.15;
  }

  .mobile-tab-button.is-active {
    color: var(--brand-green);
  }

  .mobile-tab-icon {
    display: grid;
    place-items: center;
    height: 25px;
    font-size: 20px;
    line-height: 1;
  }

  .mobile-tab-badge {
    position: absolute;
    top: 4px;
    left: calc(50% + 11px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #fa5151;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
  }

  .chat-pane {
    position: fixed;
    top: var(--viewport-top);
    right: 0;
    bottom: auto;
    left: 0;
    z-index: 10;
    width: 100vw;
    height: var(--visible-height);
    max-height: var(--visible-height);
    transform: translateX(100%);
    transition: transform 180ms ease;
    background: #101010;
  }

  .app-shell.chat-open .chat-pane {
    transform: translateX(0);
  }

  .back-button {
    display: grid;
  }

  .chat-header {
    min-height: calc(58px + var(--mobile-top-avoid));
    padding: calc(7px + env(safe-area-inset-top, 0px) + var(--mobile-top-avoid)) 10px 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(16, 16, 16, 0.96);
    color: #e8e8ec;
  }

  .chat-header .back-button {
    width: 38px;
    height: 38px;
    margin-right: 2px;
    color: #d7d7dc;
    font-size: 34px;
  }

  .chat-header h2 {
    color: #e8e8ec;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
  }

  .chat-header p {
    display: none;
  }

  .call-actions {
    display: none;
  }

  .chat-more-button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #d7d7dc;
    font-size: 20px;
    letter-spacing: 2px;
  }

  .empty-state {
    padding: 24px;
    background: #101010;
    color: #e8e8ec;
  }

  .message-list {
    flex: 1 1 auto;
    padding: 14px 10px 16px;
    background: #101010;
    -webkit-overflow-scrolling: touch;
  }

  .message-row {
    gap: 0;
    margin-bottom: 7px;
  }

  .message-avatar {
    display: none;
  }

  .message-stack {
    max-width: 84%;
  }

  .message-meta {
    margin: 0 4px 5px;
    color: #5d5d65;
    font-size: 11px;
  }

  .bubble {
    border: 0;
    border-radius: 6px;
    box-shadow: none;
    font-size: 15px;
    line-height: 1.5;
    padding: 8px 10px;
    background: #242424;
    color: #eeeeef;
  }

  .message-row.me .bubble {
    background: #1f7f3b;
    border-color: transparent;
    color: #f7fff8;
  }

  .bubble-image,
  .bubble-file,
  .bubble-red_packet,
  .message-row.me .bubble-image,
  .message-row.me .bubble-file,
  .message-row.me .bubble-red_packet {
    padding: 0;
    background: transparent;
    color: inherit;
  }

  .message-image {
    max-width: 72vw;
    max-height: 300px;
    border-radius: 6px;
  }

  .file-card {
    background: #242424;
    color: #eeeeef;
  }

  .file-card-icon {
    background: #333333;
    color: #c8c8cd;
  }

  .file-card-body small {
    color: #85858d;
  }

  .composer {
    grid-template-columns: 40px minmax(0, 1fr) 36px 36px 58px;
    gap: 7px;
    flex: 0 0 auto;
    align-items: center;
    padding: 8px 12px calc(8px + var(--safe-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #202020;
    backdrop-filter: none;
  }

  .composer textarea {
    min-height: 38px;
    max-height: 82px;
    padding: 8px 12px;
    border: 0;
    border-radius: 4px;
    background: #2b2b2b;
    color: #eeeeef;
    font-size: 16px;
    line-height: 1.35;
  }

  .composer textarea::placeholder {
    color: #6f6f76;
  }

  .composer-round-button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #d6d6da;
    border-radius: 50%;
    background: transparent;
    color: #e4e4e7;
    font-size: 22px;
    line-height: 1;
  }

  .composer-voice-toggle {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .composer-more-button {
    font-size: 27px;
    font-weight: 300;
  }

  .composer-emoji-button {
    font-size: 24px;
  }

  .send-button {
    height: 38px;
    border-radius: 5px;
    background: #2f7d3b;
    font-size: 13px;
  }

  .send-button:disabled {
    background: #2b2b2b;
    color: #69696f;
    opacity: 1;
  }

  .attachment-panel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 12px;
    flex: 0 0 auto;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    background: #191919;
  }

  .attachment-panel.hidden {
    display: none !important;
  }

  .attachment-action {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #7c7c84;
  }

  .attachment-action span {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #2b2b2b;
    color: #d8d8dc;
    font-size: 28px;
    line-height: 1;
  }

  .attachment-action b {
    font-size: 13px;
    font-weight: 500;
  }

  .emoji-panel {
    position: relative;
    display: grid;
    grid-template-rows: 45px 18px 34px minmax(0, 1fr);
    flex: 0 0 315px;
    min-height: 300px;
    max-height: 42vh;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    background: #171717;
    color: #d7d7dc;
  }

  .emoji-panel.hidden {
    display: none !important;
  }

  .emoji-tabs {
    display: grid;
    grid-template-columns: repeat(4, 54px) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.035);
    background: #1e1e1e;
  }

  .emoji-tab {
    display: grid;
    place-items: center;
    width: 44px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #c7c7cc;
    font-size: 25px;
    line-height: 1;
  }

  .emoji-tab.is-active {
    background: #2b2b2b;
  }

  .emoji-panel-handle {
    align-self: center;
    justify-self: center;
    width: 58px;
    height: 5px;
    border-radius: 999px;
    background: #272727;
  }

  .emoji-section-title {
    align-self: center;
    padding: 0 20px;
    color: #8a8a93;
    font-size: 14px;
  }

  .emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-auto-rows: 43px;
    gap: 3px 7px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 12px 72px;
    -webkit-overflow-scrolling: touch;
  }

  .emoji-button {
    display: grid;
    place-items: center;
    min-width: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 31px;
    line-height: 1;
  }

  .emoji-button:active {
    background: rgba(255, 255, 255, 0.08);
  }

  .emoji-actions {
    position: absolute;
    right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: 74px 78px;
    gap: 10px;
  }

  .emoji-tool-button,
  .emoji-send-button {
    height: 48px;
    border: 0;
    border-radius: 6px;
    background: #2a2a2a;
    color: #8a8a93;
    font-size: 15px;
    font-weight: 650;
  }

  .emoji-tool-button {
    font-size: 24px;
  }

  .emoji-send-button:not(:disabled) {
    background: #198c43;
    color: #fff;
  }

  .emoji-send-button:disabled {
    opacity: 1;
  }

  .group-info-screen {
    position: fixed;
    inset: 0;
    top: var(--viewport-top);
    bottom: auto;
    left: 0;
    right: 0;
    z-index: 28;
    display: flex;
    flex-direction: column;
    width: 100vw;
    max-width: 100vw;
    height: var(--visible-height);
    max-height: var(--visible-height);
    overflow: hidden;
    background: #101010;
    color: #d7d7dc;
    touch-action: pan-y;
  }

  .group-info-screen.hidden {
    display: none !important;
  }

  .group-info-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    min-height: calc(58px + var(--mobile-top-avoid));
    padding: calc(7px + env(safe-area-inset-top, 0px) + var(--mobile-top-avoid)) 10px 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #101010;
  }

  .group-info-header h2 {
    margin: 0;
    overflow: hidden;
    color: #d7d7dc;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .group-info-back,
  .group-info-search {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #d7d7dc;
    font-size: 33px;
  }

  .group-info-search {
    justify-self: end;
    font-size: 25px;
  }

  .group-info-content {
    flex: 1;
    width: 100%;
    max-width: 100vw;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    background: #101010;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .red-packet-screen {
    position: fixed;
    inset: 0;
    top: var(--viewport-top);
    bottom: auto;
    z-index: 29;
    display: flex;
    flex-direction: column;
    width: 100vw;
    max-width: 100vw;
    height: var(--visible-height);
    max-height: var(--visible-height);
    overflow: hidden;
    background: #101010;
    color: #d7d7dc;
  }

  .red-packet-screen.hidden {
    display: none !important;
  }

  .red-packet-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    min-height: calc(58px + var(--mobile-top-avoid));
    padding: calc(7px + env(safe-area-inset-top, 0px) + var(--mobile-top-avoid)) 10px 8px 6px;
    background: #101010;
  }

  .red-packet-header h2 {
    margin: 0;
    color: #d7d7dc;
    font-size: 18px;
    font-weight: 650;
    text-align: center;
  }

  .red-packet-back,
  .red-packet-more {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #d7d7dc;
  }

  .red-packet-back {
    font-size: 33px;
  }

  .red-packet-more {
    justify-self: end;
    font-size: 20px;
    letter-spacing: 2px;
  }

  .red-packet-content {
    flex: 1;
    min-height: 0;
    padding: 8px 14px calc(28px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .profile-screen,
  .moments-screen,
  .qr-screen,
  .nickname-screen,
  .group-edit-screen,
  .group-qr-screen,
  .group-members-screen,
  .group-add-screen,
  .group-search-screen {
    position: fixed;
    inset: 0;
    top: var(--viewport-top);
    bottom: auto;
    z-index: 29;
    display: flex;
    flex-direction: column;
    width: 100vw;
    max-width: 100vw;
    height: var(--visible-height);
    max-height: var(--visible-height);
    overflow: hidden;
    background: #101010;
    color: #d7d7dc;
  }

  .profile-screen.hidden,
  .moments-screen.hidden,
  .qr-screen.hidden,
  .nickname-screen.hidden,
  .group-edit-screen.hidden,
  .group-qr-screen.hidden,
  .group-members-screen.hidden,
  .group-add-screen.hidden,
  .group-search-screen.hidden {
    display: none !important;
  }

  .profile-header,
  .moments-header,
  .qr-header,
  .nickname-header,
  .group-edit-header,
  .group-qr-header,
  .group-members-header,
  .group-add-header,
  .group-search-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 54px;
    align-items: center;
    min-height: calc(58px + var(--mobile-top-avoid));
    padding: calc(7px + env(safe-area-inset-top, 0px) + var(--mobile-top-avoid)) 10px 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #101010;
  }

  .profile-header h2,
  .moments-header h2,
  .qr-header h2,
  .nickname-header h2,
  .group-edit-header h2,
  .group-qr-header h2,
  .group-members-header h2,
  .group-add-header h2,
  .group-search-header h2 {
    margin: 0;
    overflow: hidden;
    color: #d7d7dc;
    font-size: 18px;
    font-weight: 650;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-back,
  .moments-back,
  .qr-back,
  .nickname-back,
  .group-edit-back,
  .group-qr-back,
  .group-members-back,
  .group-add-back,
  .group-search-back {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #d7d7dc;
    font-size: 33px;
  }

  .moments-publish {
    justify-self: end;
    border: 0;
    background: transparent;
    color: var(--brand-green);
    font-size: 15px;
    font-weight: 650;
  }

  .nickname-save,
  .group-edit-save,
  .group-members-add {
    justify-self: end;
    border: 0;
    background: transparent;
    color: var(--brand-green);
    font-size: 15px;
    font-weight: 650;
  }

  .profile-content,
  .moments-content,
  .qr-content,
  .nickname-content,
  .group-edit-content,
  .group-qr-content,
  .group-members-list,
  .group-add-content,
  .group-search-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #101010;
    -webkit-overflow-scrolling: touch;
  }

  .profile-hero-card {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 24px 20px 22px;
    border-bottom: 8px solid #0b0b0b;
    background: #181818;
  }

  .profile-avatar-large,
  .qr-avatar,
  .group-qr-avatar,
  .moments-owner-avatar,
  .moment-avatar {
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--brand-gradient);
    color: #fff;
    font-weight: 850;
  }

  .profile-avatar-large {
    width: 66px;
    height: 66px;
    font-size: 24px;
  }

  .profile-hero-card h2 {
    margin: 0 0 6px;
    overflow: hidden;
    color: #f2f2f4;
    font-size: 22px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-hero-card p {
    margin: 0;
    overflow: hidden;
    color: #9a9aa2;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-row-group {
    margin: 0;
    border-bottom: 8px solid #0b0b0b;
    background: #181818;
  }

  .profile-row {
    display: grid;
    grid-template-columns: minmax(96px, auto) minmax(0, 1fr) 18px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 0 20px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: #d7d7dc;
    text-align: left;
  }

  .profile-row:last-child {
    border-bottom: 0;
  }

  .profile-row::after {
    color: #555;
    content: "›";
    font-size: 27px;
    justify-self: end;
  }

  .profile-row span {
    font-size: 17px;
  }

  .profile-row em {
    min-width: 0;
    overflow: hidden;
    color: #8e8e96;
    font-size: 15px;
    font-style: normal;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .qr-content {
    padding: 34px 12px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .qr-card {
    display: grid;
    gap: 18px;
    width: min(396px, calc(100vw - 44px));
    margin: 0 auto;
    padding: 26px 22px 24px;
    border-radius: 8px;
    background: #f7f7f7;
    color: #151515;
  }

  .qr-card-user {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }

  .qr-avatar {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .qr-card-user h2 {
    margin: 0 0 3px;
    overflow: hidden;
    color: #1c1c1e;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .qr-card-user p,
  .qr-card > p {
    margin: 0;
    color: #9a9aa1;
    font-size: 14px;
  }

  .qr-image {
    width: min(280px, calc(100vw - 96px));
    height: min(280px, calc(100vw - 96px));
    margin: 2px auto 0;
    background: #fff;
    object-fit: contain;
  }

  .qr-card > p {
    text-align: center;
  }

  .nickname-content {
    padding: 18px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .nickname-field {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    min-height: 58px;
    padding: 0 14px;
    border-radius: 4px;
    background: #181818;
    color: #d7d7dc;
  }

  .nickname-field span {
    font-size: 16px;
  }

  .nickname-field input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f2f2f4;
    font: inherit;
    font-size: 16px;
    text-align: right;
  }

  .nickname-field input::placeholder {
    color: #6d6d75;
  }

  .nickname-content p {
    margin: 12px 14px 0;
    color: #777780;
    font-size: 13px;
    line-height: 1.45;
  }

  .group-edit-content,
  .group-add-content,
  .group-search-content {
    padding: 14px;
  }

  .group-edit-content textarea,
  .group-search-content input,
  .group-add-search input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 4px;
    background: #181818;
    color: #f2f2f4;
    font: inherit;
    font-size: 16px;
  }

  .group-edit-content textarea {
    min-height: 128px;
    padding: 14px;
    resize: none;
    line-height: 1.45;
  }

  .group-edit-content textarea::placeholder,
  .group-search-content input::placeholder,
  .group-add-search input::placeholder {
    color: #6d6d75;
  }

  .group-edit-content p {
    margin: 12px 4px 0;
    color: #777780;
    font-size: 13px;
    line-height: 1.45;
  }

  .group-qr-content {
    padding: 34px 12px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .group-qr-card {
    display: grid;
    justify-items: center;
    gap: 14px;
    width: min(396px, calc(100vw - 44px));
    margin: 0 auto;
    padding: 26px 22px 24px;
    border-radius: 8px;
    background: #f7f7f7;
    color: #151515;
  }

  .group-qr-avatar {
    width: 54px;
    height: 54px;
    font-size: 20px;
  }

  .group-qr-card h2 {
    width: 100%;
    margin: 0;
    overflow: hidden;
    color: #1c1c1e;
    font-size: 18px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .group-qr-image {
    width: min(280px, calc(100vw - 96px));
    height: min(280px, calc(100vw - 96px));
    background: #fff;
    object-fit: contain;
  }

  .group-qr-card p {
    margin: 0;
    color: #9a9aa1;
    font-size: 14px;
  }

  .group-members-list {
    padding: 0 0 calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .group-member-row,
  .group-add-result,
  .group-search-result {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 66px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #181818;
  }

  .group-member-row-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
  }

  .group-member-row-body {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .group-member-row-body strong,
  .group-search-result strong {
    overflow: hidden;
    color: #f2f2f4;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .group-member-row-body span,
  .group-search-result span {
    overflow: hidden;
    color: #8e8e96;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .group-add-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 10px;
    margin-bottom: 12px;
  }

  .group-add-search input,
  .group-search-content input {
    height: 44px;
    padding: 0 12px;
  }

  .group-add-search button,
  .group-add-result button {
    border: 0;
    border-radius: 4px;
    background: var(--brand-green);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
  }

  .group-add-results,
  .group-message-search-results {
    overflow: hidden;
    border-radius: 4px;
    color: #777780;
    font-size: 14px;
  }

  .group-search-content input {
    margin-bottom: 12px;
  }

  .group-search-result {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .moments-cover {
    position: relative;
    height: 220px;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.68)),
      linear-gradient(135deg, #223024, #2f2a3d 45%, #111);
  }

  .moments-cover-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.12), transparent 30%);
  }

  .moments-owner {
    position: absolute;
    right: 16px;
    bottom: -28px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .moments-owner span {
    max-width: 210px;
    overflow: hidden;
    color: #fff;
    font-size: 18px;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .moments-owner-avatar {
    width: 62px;
    height: 62px;
    border: 2px solid #101010;
    font-size: 22px;
  }

  .moments-composer {
    margin-top: 36px;
    padding: 12px 14px;
    border-bottom: 8px solid #0b0b0b;
    background: #181818;
  }

  .moments-composer textarea {
    width: 100%;
    min-height: 82px;
    padding: 10px 0;
    border: 0;
    outline: 0;
    resize: none;
    background: transparent;
    color: #f2f2f4;
    font: inherit;
    font-size: 16px;
    line-height: 1.45;
  }

  .moments-composer textarea::placeholder {
    color: #6d6d75;
  }

  .moments-list {
    background: #101010;
  }

  .moments-empty {
    display: grid;
    gap: 8px;
    padding: 44px 22px;
    color: #777780;
    text-align: center;
  }

  .moments-empty strong {
    color: #d7d7dc;
    font-size: 17px;
  }

  .moments-empty span {
    font-size: 14px;
    line-height: 1.45;
  }

  .moment-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: #101010;
  }

  .moment-avatar {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }

  .moment-body {
    min-width: 0;
  }

  .moment-name {
    overflow: hidden;
    color: #7987b4;
    font-size: 16px;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .moment-text {
    margin: 7px 0 9px;
    color: #e6e6e9;
    font-size: 16px;
    line-height: 1.48;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .moment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #74747c;
    font-size: 13px;
  }

  .moment-meta button {
    border: 0;
    border-radius: 4px;
    background: #202020;
    color: #8d8d96;
    font-size: 12px;
    padding: 5px 8px;
  }

  .red-packet-type {
    margin: 2px 0 14px 20px;
    color: #d0a45f;
    font-size: 15px;
    font-weight: 560;
  }

  .red-packet-member-note {
    margin: -4px 0 14px 20px;
    color: #8a8a93;
    font-size: 14px;
  }

  .red-packet-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: center;
    min-height: 58px;
    margin-bottom: 12px;
    padding: 0 16px;
    border: 0;
    border-radius: 4px;
    background: #181818;
    color: #d7d7dc;
    text-align: left;
  }

  .red-packet-row span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
  }

  .red-packet-row span:first-child i {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    background: #bf8a3a;
    color: #fff8dd;
    font-size: 12px;
    font-style: normal;
    font-weight: 750;
  }

  .red-packet-count-row span:first-child i {
    background: #eb5148;
    color: #ffd8b8;
    font-size: 11px;
  }

  .red-packet-count-row.hidden,
  .red-packet-member-note.hidden {
    display: none !important;
  }

  .red-packet-row input {
    width: 100%;
    min-width: 0;
    height: 44px;
    border: 0;
    background: transparent;
    color: #d7d7dc;
    font-size: 18px;
    text-align: right;
  }

  .red-packet-row input::placeholder {
    color: #55555d;
  }

  .red-packet-greeting-row {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .red-packet-greeting-row input {
    text-align: left;
    font-size: 16px;
  }

  .red-packet-greeting-row span {
    justify-self: end;
    color: #777780;
    font-size: 20px;
  }

  .red-packet-total {
    margin: 92px 0 22px;
    color: #dedee2;
    font-size: 52px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
  }

  .red-packet-submit {
    display: block;
    width: 196px;
    height: 52px;
    margin: 0 auto;
    border: 0;
    border-radius: 6px;
    background: #fa5b47;
    color: #fff3eb;
    font-size: 18px;
    font-weight: 650;
  }

  .red-packet-submit:disabled {
    background: #7d312b;
    color: rgba(255, 255, 255, 0.48);
  }

  .red-packet-note {
    position: absolute;
    right: 0;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    left: 0;
    margin: 0;
    color: #8a8a93;
    font-size: 14px;
    text-align: center;
  }

  .group-member-panel,
  .group-settings-panel {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    overflow-x: hidden;
    border-bottom: 8px solid #0b0b0b;
    background: #181818;
  }

  .group-member-panel {
    padding: 18px 22px 16px;
  }

  .group-member-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px 14px;
  }

  .group-member-tile {
    display: grid;
    gap: 6px;
    justify-items: center;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #888891;
    font-size: 12px;
  }

  .group-member-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
  }

  .group-member-tile span {
    width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .group-member-add .group-member-avatar {
    border: 1px dashed #585861;
    background: transparent;
    color: #7d7d86;
    font-size: 34px;
    font-weight: 300;
  }

  .group-member-more {
    display: block;
    width: 100%;
    height: 42px;
    margin-top: 16px;
    border: 0;
    background: transparent;
    color: #8a8a93;
    font-size: 15px;
  }

  .settings-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 20px;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 0 22px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    background: #181818;
    color: #d7d7dc;
    text-align: left;
  }

  .settings-row::after {
    grid-column: 3;
    justify-self: end;
    color: #56565f;
    content: "›";
    font-size: 28px;
    font-weight: 300;
  }

  .settings-row span {
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-row em,
  .settings-row small {
    grid-column: 2;
    min-width: 0;
    color: #8a8a93;
    font-size: 16px;
    font-style: normal;
  }

  .settings-row em {
    max-width: 180px;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-row-tall {
    grid-template-columns: minmax(0, 1fr) 20px;
    min-height: 92px;
    align-content: center;
  }

  .settings-row-tall small,
  .settings-row-sub small {
    grid-column: 1 / 3;
    display: block;
    max-width: 280px;
    margin-top: -10px;
    line-height: 1.45;
    white-space: normal;
  }

  .settings-row-sub {
    min-height: 70px;
  }

  .switch-row {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .switch-row::after {
    content: none;
  }

  .switch-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .switch-row i {
    position: relative;
    width: 51px;
    height: 31px;
    border-radius: 999px;
    background: #3a3a42;
    transition: background-color 140ms ease;
  }

  .switch-row i::after {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #fff;
    content: "";
    transition: transform 140ms ease;
  }

  .switch-row input:checked + i {
    background: var(--brand-green);
  }

  .switch-row input:checked + i::after {
    transform: translateX(20px);
  }

  .qr-mark {
    font-size: 22px !important;
  }

  .leave-group-button {
    width: 100%;
    height: 62px;
    border: 0;
    border-bottom: 8px solid #0b0b0b;
    background: #181818;
    color: #fa5151;
    font-size: 17px;
  }

  .group-admin-note {
    padding: 10px 22px 14px;
    color: #75757e;
    font-size: 13px;
    line-height: 1.45;
  }

  .group-admin-title {
    padding: 12px 22px 8px;
    color: #8a8a93;
    font-size: 14px;
  }

  .settings-row.is-disabled {
    opacity: 0.55;
  }

  .admin-member-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 72px;
    padding: 10px 12px 10px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
    background: #181818;
  }

  .admin-member-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 6px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
  }

  .admin-member-body {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .admin-member-body strong,
  .admin-member-body span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-member-body strong {
    color: #d7d7dc;
    font-size: 15px;
  }

  .admin-member-body span {
    color: #777780;
    font-size: 12px;
  }

  .admin-member-actions {
    display: flex;
    gap: 6px;
  }

  .admin-member-actions button {
    height: 30px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: #242424;
    color: #d7d7dc;
    font-size: 12px;
  }

  .admin-member-actions button:disabled {
    color: #5f5f68;
    opacity: 1;
  }

  .composer.is-muted textarea {
    color: #777780;
  }

  .modal-backdrop {
    top: var(--viewport-top);
    bottom: auto;
    height: var(--visible-height);
    max-height: var(--visible-height);
    overflow: hidden;
  }

  .modal {
    height: var(--visible-height);
    max-height: var(--visible-height);
    background: #f3f5f8;
  }

  .modal-header {
    min-height: calc(58px + var(--mobile-top-avoid));
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    padding: calc(6px + env(safe-area-inset-top, 0px) + var(--mobile-top-avoid)) 10px 8px;
  }

  .modal-header h2 {
    font-size: 17px;
  }

  .modal .field,
  .search-results,
  .selected-members,
  #create-group-submit {
    width: calc(100vw - 24px);
  }

  .modal .field {
    margin: 12px auto;
  }

  .search-row {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .result-item {
    padding: 12px;
    background: #fff;
  }
}
