:root {
  --bg: #f3f6f5;
  --card: #fff;
  --text: #111827;
  --muted: #566273;
  --soft: #eef7f2;
  --line: #e7ecef;
  --line-strong: #cfd9e5;
  --primary: #08bf62;
  --primary-dark: #05944c;
  --red: #ef4444;
  --blue: #2563eb;
  --orange: #d97706;
  --shadow: 0 5px 14px rgba(17, 32, 52, .08);
}

.hidden {
  display: none !important;
}

.app-entry-icon.yellow {
  background: #ffd60a;
  color: #4a3300;
}

.settings-version {
  color: #9aa3af;
  font-size: 13px;
  margin: 18px 0 calc(24px + env(safe-area-inset-bottom));
  text-align: center;
}

.settings-logout-card {
  margin-top: 0;
}

.main-shell.tab-me .page-main {
  display: flex;
  flex-direction: column;
}

.main-shell.tab-me .settings-version {
  margin-top: auto;
}

.settings-stack {
  display: grid;
  gap: 14px;
}

.setting-group {
  display: grid;
  gap: 8px;
}

.setting-group h2 {
  color: #98a2b3;
  font-size: 13px;
  font-weight: 760;
  margin: 0;
  padding: 0 14px;
}

.setting-card,
.storage-card,
.support-card,
.faq-group {
  background: #fff;
  border-radius: 14px;
  box-shadow: none;
  overflow: hidden;
}

.setting-note-text {
  color: #98a2b3;
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
  padding: 0 14px;
}

.setting-row,
.pref-row,
.pref-field,
.pref-range {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 56px;
  padding: 12px 16px;
  text-align: left;
  width: 100%;
}

.setting-card > :last-child,
.faq-group > :last-child {
  border-bottom: 0;
}

.setting-row {
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: var(--text);
  font: inherit;
}

.setting-row span,
.pref-row span,
.pref-field span,
.pref-range > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.setting-row b,
.pref-row b,
.pref-field b,
.pref-range b {
  color: #111827;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.25;
}

.setting-row em,
.pref-row em,
.pref-field em {
  color: #98a2b3;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.setting-row strong {
  color: #98a2b3;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 650;
}

.setting-row .arrow-icon {
  color: #a5adba;
  flex: 0 0 20px;
  height: 20px;
  width: 20px;
}

.setting-row .danger-title,
.danger-row b {
  color: #e2384a;
}

.danger-row {
  color: #e2384a;
}

.select-field {
  appearance: none;
  background: #f5f7fa;
  border: 0;
  border-radius: 10px;
  color: #667085;
  flex: 0 0 150px;
  font-size: 14px;
  min-height: 38px;
  padding: 0 12px;
}

.switch-input {
  appearance: none;
  background: #d1d5db;
  border: 2px solid #d1d5db;
  border-radius: 999px;
  flex: 0 0 auto;
  height: 32px;
  margin: 0;
  position: relative;
  transition: background .18s ease, border-color .18s ease;
  width: 54px;
}

.switch-input:before {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .22);
  content: "";
  height: 26px;
  left: 1px;
  position: absolute;
  top: 1px;
  transition: transform .18s ease;
  width: 26px;
}

.switch-input:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.switch-input:checked:before {
  transform: translateX(22px);
}

.pref-range {
  align-items: stretch;
  display: grid;
  gap: 10px;
}

.range-control {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr auto;
}

.range-control em {
  color: #667085;
  font-style: normal;
}

.range-control input {
  accent-color: #101827;
  width: 100%;
}

.storage-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.storage-total {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.storage-total span {
  color: #111827;
  font-size: 16px;
  font-weight: 760;
}

.storage-total b {
  font-size: 16px;
}

.storage-bar {
  background: #eff2f5;
  border-radius: 99px;
  height: 10px;
  overflow: hidden;
}

.storage-bar i {
  background: linear-gradient(90deg, var(--primary), #2f9bff);
  display: block;
  height: 100%;
}

.storage-legend {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.storage-legend span {
  color: #667085;
  display: grid;
  font-size: 12px;
  gap: 3px;
}

.storage-legend i {
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.storage-legend b {
  color: #111827;
  font-size: 12px;
}

.account-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .22);
  left: 50%;
  max-width: 320px;
  padding: 20px;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 54px);
  z-index: 61;
}

.account-modal h2,
.choice-sheet h2,
.about-sheet h2 {
  font-size: 18px;
  margin: 0 0 16px;
  text-align: center;
}

.account-form {
  gap: 12px;
}

.modal-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.choice-sheet {
  padding: 18px 0 24px;
}

.sheet-choice {
  align-items: center;
  background: transparent;
  border: 0;
  display: flex;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 18px;
  text-align: left;
  width: 100%;
}

.sheet-choice span {
  display: grid;
  gap: 4px;
}

.sheet-choice b {
  font-size: 16px;
}

.sheet-choice em {
  color: #98a2b3;
  font-size: 12px;
  font-style: normal;
}

.sheet-choice strong {
  color: #101827;
  font-size: 22px;
}

.about-sheet {
  align-items: center;
  display: grid;
  justify-items: center;
  padding: 24px 22px 30px;
}

.about-sheet img {
  border-radius: 18px;
  height: 78px;
  object-fit: contain;
  width: 78px;
}

.about-sheet p,
.about-sheet strong {
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px;
  text-align: center;
}

.about-actions {
  display: grid;
  gap: 34px;
  grid-template-columns: 1fr 1fr;
  margin: 6px 0 20px;
}

.about-actions button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #111827;
  display: grid;
  gap: 6px;
  justify-items: center;
}

.about-actions .ui-icon {
  height: 26px;
  width: 26px;
}

.about-links {
  align-items: center;
  color: #98a2b3;
  display: flex;
  gap: 12px;
}

.about-links button {
  background: transparent;
  border: 0;
  color: #111827;
}

.emoji-strip {
  background: #fff;
  border-radius: 14px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 14px;
}

.emoji-strip .sticker-asset,
.emoji-strip .sticker-emoji {
  height: 44px;
  justify-self: center;
  width: 44px;
}

.sticker-pack {
  align-items: center;
  background: #fff;
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: 54px 1fr auto;
  margin-bottom: 12px;
  padding: 14px;
}

.sticker-asset,
.sticker-emoji {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
  overflow: hidden;
  position: relative;
}

.sticker-asset svg,
.sticker-asset canvas {
  display: block;
  height: 100% !important;
  width: 100% !important;
}

.sticker-fallback,
.sticker-emoji {
  font-size: 28px;
}

.sticker-asset[data-lottie-loaded="1"] .sticker-fallback {
  display: none;
}

.pack-sticker {
  height: 54px;
  width: 54px;
}

.sticker-pack div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sticker-pack b {
  font-size: 16px;
}

.sticker-pack b em {
  background: #eef2f7;
  border-radius: 4px;
  color: #667085;
  font-size: 11px;
  font-style: normal;
  margin-left: 4px;
  padding: 2px 4px;
}

.sticker-pack small {
  color: #98a2b3;
}

.sticker-pack i {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.preview-sticker {
  flex: 0 0 24px;
  height: 24px;
  width: 24px;
}

.sticker-sheet {
  max-height: 78vh;
  overflow-y: auto;
}

.sticker-sheet-head {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 58px 1fr auto;
  padding: 8px 16px 14px;
}

.sheet-sticker {
  height: 58px;
  width: 58px;
}

.sticker-sheet-head h2 {
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 4px;
}

.sticker-sheet-head p {
  color: #98a2b3;
  font-size: 13px;
  margin: 0;
}

.sticker-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 0 16px 18px;
}

.sticker-grid button {
  align-items: center;
  aspect-ratio: 1;
  background: #f5f7fa;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  justify-content: center;
  padding: 6px;
}

.grid-sticker {
  height: 100%;
  max-height: 62px;
  max-width: 62px;
  width: 100%;
}

.faq-search {
  margin: 0;
}

.support-card {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 48px 1fr auto;
  padding: 16px;
}

.support-card > span {
  align-items: center;
  background: #f2f4f7;
  border-radius: 12px;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.support-card b,
.support-card em {
  display: block;
}

.support-card em {
  color: #98a2b3;
  font-size: 13px;
  font-style: normal;
  margin-top: 3px;
}

.faq-group header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 42px 1fr auto;
  padding: 16px;
}

.faq-group header span {
  align-items: center;
  background: #eef7f2;
  border-radius: 12px;
  color: var(--primary-dark);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.faq-group header em {
  color: #98a2b3;
  font-style: normal;
}

.faq-item {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0 8px;
  grid-template-columns: 1fr auto;
  padding: 14px 16px;
  text-align: left;
  width: 100%;
}

.faq-item span {
  font-size: 15px;
}

.faq-item p {
  color: #667085;
  display: none;
  font-size: 13px;
  grid-column: 1 / -1;
  line-height: 1.55;
  margin: 10px 0 0;
}

.faq-item.open p {
  display: block;
}

.faq-item.open .arrow-icon {
  transform: rotate(90deg);
}

.floating-support {
  align-items: center;
  background: #050812;
  border: 0;
  border-radius: 50%;
  bottom: 22px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .24);
  color: #fff;
  display: inline-flex;
  height: 56px;
  justify-content: center;
  position: sticky;
  justify-self: end;
  width: 56px;
}

.blocked-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 44px 1fr auto;
  padding: 12px 14px;
}

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

.blocked-row div {
  display: grid;
  gap: 3px;
}

.blocked-row em {
  color: #98a2b3;
  font-size: 12px;
  font-style: normal;
}

html[data-theme="dark"] {
  --bg: #111827;
  --card: #182231;
  --text: #f8fafc;
  --muted: #b8c0cc;
  --line: #263447;
  --line-strong: #35445a;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .page {
  background: #111827;
  color: #f8fafc;
}

html[data-theme="dark"] .setting-card,
html[data-theme="dark"] .setting-row,
html[data-theme="dark"] .pref-row,
html[data-theme="dark"] .pref-field,
  html[data-theme="dark"] .pref-range,
  html[data-theme="dark"] .message-detail-card,
  html[data-theme="dark"] .storage-card,
html[data-theme="dark"] .support-card,
html[data-theme="dark"] .faq-group,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .emoji-strip,
html[data-theme="dark"] .sticker-pack,
html[data-theme="dark"] .account-modal,
html[data-theme="dark"] .action-sheet {
  background: #182231;
  color: #f8fafc;
}

html[data-theme="dark"] .setting-row b,
html[data-theme="dark"] .pref-row b,
html[data-theme="dark"] .pref-field b,
html[data-theme="dark"] .pref-range b,
html[data-theme="dark"] .storage-total span,
html[data-theme="dark"] .about-links button,
html[data-theme="dark"] .about-actions button {
  color: #f8fafc;
}

html[data-theme="dark"] .select-field {
  background: #101827;
  color: #d5dbe5;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #111827;
    --card: #182231;
    --text: #f8fafc;
    --muted: #b8c0cc;
    --line: #263447;
    --line-strong: #35445a;
  }

  html[data-theme="system"] body,
  html[data-theme="system"] .page {
    background: #111827;
    color: #f8fafc;
  }

  html[data-theme="system"] .setting-card,
  html[data-theme="system"] .setting-row,
  html[data-theme="system"] .pref-row,
  html[data-theme="system"] .pref-field,
  html[data-theme="system"] .pref-range,
  html[data-theme="system"] .storage-card,
  html[data-theme="system"] .support-card,
  html[data-theme="system"] .faq-group,
  html[data-theme="system"] .faq-item,
  html[data-theme="system"] .emoji-strip,
  html[data-theme="system"] .sticker-pack,
  html[data-theme="system"] .account-modal,
  html[data-theme="system"] .action-sheet {
    background: #182231;
    color: #f8fafc;
  }

  html[data-theme="system"] .setting-row b,
  html[data-theme="system"] .pref-row b,
  html[data-theme="system"] .pref-field b,
  html[data-theme="system"] .pref-range b,
  html[data-theme="system"] .storage-total span,
  html[data-theme="system"] .about-links button,
  html[data-theme="system"] .about-actions button {
    color: #f8fafc;
  }

  html[data-theme="system"] .select-field {
    background: #101827;
    color: #d5dbe5;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: #dfe6eb;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

.status-badge {
  background: #eef2ff;
  border-radius: 5px;
  color: #3b4a7a;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-left: 6px;
  padding: 4px 6px;
  vertical-align: middle;
}

.status-badge.vip {
  background: #eef7ff;
  color: #2563eb;
}

.status-badge.svip {
  background: #fff7dc;
  color: #a16207;
}

.status-badge.owner,
.status-badge.admin {
  background: #e9fbf2;
  color: var(--primary-dark);
}

.segmented,
.tabs.two,
.media-tabs {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  display: grid;
  gap: 0;
  grid-auto-flow: column;
  margin: 8px 0 10px;
  overflow: hidden;
}

.segmented button,
.tabs.two button,
.media-tabs button {
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 800;
  min-height: 38px;
}

.segmented button.active,
.tabs.two button.active,
.media-tabs button.active {
  background: #101827;
  color: #fff;
}

.media-tabs {
  grid-auto-flow: initial;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.filter-chip {
  background: #fff;
  border: 1px solid #111827;
  border-radius: 9px;
  color: #111827;
  font-weight: 760;
  min-height: 36px;
  padding: 0 13px;
}

.filter-chip.active {
  background: #111827;
  color: #fff;
}

.add-pane.hidden {
  display: none;
}

.range-row {
  align-items: center;
  display: flex;
  gap: 12px;
  margin: 10px 0;
}

.range-row input {
  flex: 1;
}

.full {
  width: 100%;
}

.result-row {
  align-items: center;
  display: flex;
  gap: 12px;
  padding: 12px;
}

.result-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.mini-action {
  border-radius: 10px;
  min-height: 34px;
  padding: 0 10px;
}

.create-channel-form {
  box-shadow: none;
  padding: 16px;
}

.create-avatar {
  align-items: center;
  background: #eef2f7;
  border-radius: 18px;
  color: #111827;
  display: inline-flex;
  height: 72px;
  justify-content: center;
  margin: 4px 0 14px;
  width: 72px;
}

.choice-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 72px;
  padding: 10px 4px;
}

.choice-row span {
  align-items: center;
  display: grid;
  gap: 2px 12px;
  grid-template-columns: 34px 1fr;
}

.choice-row .ui-icon {
  color: var(--primary);
  grid-row: span 2;
}

.choice-row b {
  font-size: 16px;
}

.choice-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.disabled-composer {
  align-items: center;
  background: #fff;
  border-radius: 16px;
  color: #717987;
  display: flex;
  flex: 0 0 auto;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  margin: 8px;
  min-height: 48px;
}

.channel-composer-wrap {
  flex: 0 0 auto;
}

.pinned-card {
  background: rgba(255, 255, 255, .94);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin: 10px 10px 0;
  padding: 12px 44px 12px 14px;
  position: relative;
}

.pinned-card b {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.pinned-card p {
  color: var(--muted);
  margin: 0;
}

.pinned-card button {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  position: absolute;
  right: 10px;
  top: 8px;
}

.profile-hero {
  align-items: center;
  background: #fff;
  display: flex;
  flex-direction: column;
  margin: -14px -16px 14px;
  padding: 28px 16px 22px;
  text-align: center;
}

.friend-hero {
  background: #e9f1fa;
}

.profile-avatar {
  border: 4px solid #fff;
  box-shadow: 0 8px 20px rgba(17, 32, 52, .12);
  height: 92px;
  width: 92px;
}

.profile-hero h2 {
  font-size: 24px;
  line-height: 1.2;
  margin: 14px 0 5px;
}

.profile-hero p {
  color: var(--muted);
  margin: 0;
}

.profile-actions {
  display: grid;
  gap: 16px;
  grid-auto-flow: column;
  margin-top: 20px;
}

.profile-actions button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 62px;
}

.profile-actions span {
  align-items: center;
  background: #f3f6f9;
  border-radius: 18px;
  display: inline-flex;
  height: 56px;
  justify-content: center;
  width: 56px;
}

.profile-actions em {
  font-style: normal;
  font-weight: 760;
}

.profile-card,
.qr-card,
.members-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
  padding: 16px;
  position: relative;
}

.profile-card div {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
}

.profile-card div:last-of-type {
  border-bottom: 0;
}

.profile-card b {
  font-size: 17px;
}

.profile-card em {
  color: var(--muted);
  font-style: normal;
}

.qr-mini {
  background: transparent;
  border: 0;
  color: var(--muted);
  position: absolute;
  right: 14px;
  top: 54px;
}

.profile-list {
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
}

.members-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.members-head span {
  font-weight: 800;
}

.members-head em {
  color: var(--muted);
  font-style: normal;
  margin-right: auto;
}

.members-head button {
  background: transparent;
  border: 0;
}

.member-mini {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  min-height: 66px;
  padding: 8px 0;
}

.member-mini:last-child {
  border-bottom: 0;
}

.profile-bottom-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.menu-sheet .sheet-command {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 18px;
  min-height: 60px;
  width: 100%;
}

.menu-sheet .sheet-command.cancel {
  border-radius: 12px;
  margin-top: 8px;
}

.danger-line,
.menu-sheet .danger-line {
  color: var(--red);
}

.request-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
}

.request-row .card {
  margin: 0;
}

.inline-toggle {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.date-filter {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr auto;
  margin-bottom: 12px;
}

.qr-card {
  align-items: center;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  text-align: center;
}

.qr-card h2 {
  margin: 14px 0 4px;
}

.qr-card p {
  color: var(--muted);
  margin: 0 0 18px;
}

.qr-img {
  height: 220px;
  image-rendering: pixelated;
  margin: 8px 0 16px;
  width: 220px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.file-hidden {
  display: none;
}

.boot {
  align-items: center;
  background: var(--bg);
  display: grid;
  inset: 0;
  justify-content: center;
  padding: env(safe-area-inset-top) 24px env(safe-area-inset-bottom);
  place-items: center;
  position: absolute;
  z-index: 30;
}

.boot-stage {
  display: grid;
  gap: 20px;
  justify-items: center;
  transform: translateY(-3vh);
}

.boot-mark {
  align-items: center;
  animation: bootFloat 2.4s ease-in-out infinite;
  background: #fff;
  border: 1px solid rgba(8, 191, 98, .12);
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(17, 32, 52, .12);
  display: inline-flex;
  height: 82px;
  justify-content: center;
  position: relative;
  width: 82px;
}

.boot-mark:before {
  animation: bootRing 1.8s ease-out infinite;
  border: 1px solid rgba(8, 191, 98, .28);
  border-radius: 30px;
  content: "";
  inset: -9px;
  position: absolute;
}

.boot-mark img {
  border-radius: 18px;
  display: block;
  height: 64px;
  position: relative;
  width: 64px;
}

.boot-dots {
  align-items: center;
  display: flex;
  gap: 8px;
  height: 12px;
  justify-content: center;
}

.boot-dots i {
  animation: bootDot 1.05s ease-in-out infinite;
  background: var(--primary);
  border-radius: 50%;
  display: block;
  height: 7px;
  opacity: .34;
  width: 7px;
}

.boot-dots i:nth-child(2) {
  animation-delay: .14s;
}

.boot-dots i:nth-child(3) {
  animation-delay: .28s;
}

@keyframes bootFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-6px) scale(1.015);
  }
}

@keyframes bootRing {
  0% {
    opacity: .72;
    transform: scale(.92);
  }

  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes bootDot {
  0%,
  100% {
    opacity: .28;
    transform: translateY(0);
  }

  45% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-mark,
  .boot-mark:before,
  .boot-dots i {
    animation: none;
  }

  .boot-dots i {
    opacity: .72;
  }
}

.app-shell {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  height: 100svh;
  margin: 0 auto;
  max-width: 430px;
  min-height: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

@supports (height: 100svh) {
  .app-shell {
    height: 100svh;
  }
}

.topbar {
  align-items: flex-end;
  background: #fff;
  color: var(--text);
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  min-height: 118px;
  padding: calc(env(safe-area-inset-top) + 34px) 18px 22px;
}

.topbar h1 {
  flex: 1;
  font-size: 31px;
  font-weight: 760;
  line-height: 1.12;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subpage-shell .topbar {
  min-height: 110px;
  padding-bottom: 22px;
}

.subpage-shell .topbar h1 {
  font-size: 30px;
}

.topbar-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 14px;
  height: 44px;
}

.icon-btn {
  align-items: center;
  background: transparent;
  border: 0;
  color: #4b5563;
  display: inline-flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 44px;
}

.icon-btn:active,
.app-row:active,
.card:active,
.primary:active,
.secondary:active,
.danger:active,
.moment-tab:active,
.download-link:active {
  opacity: .82;
  transform: scale(.985);
}

.icon-btn.back {
  color: var(--text);
  font-size: 44px;
  font-weight: 420;
  line-height: 1;
  margin-left: -8px;
}

.icon-btn.add:before,
.icon-btn.add:after {
  background: currentColor;
  border-radius: 99px;
  content: "";
  position: absolute;
}

.icon-btn.add:before {
  height: 4px;
  width: 31px;
}

.icon-btn.add:after {
  height: 31px;
  width: 4px;
}

.icon-btn.search:before {
  border: 4px solid currentColor;
  border-radius: 50%;
  content: "";
  height: 20px;
  left: 6px;
  position: absolute;
  top: 6px;
  width: 20px;
}

.icon-btn.search:after,
.search-mark:after {
  background: currentColor;
  border-radius: 99px;
  content: "";
  height: 14px;
  position: absolute;
  transform: rotate(-45deg);
  width: 4px;
}

.icon-btn.search:after {
  left: 30px;
  top: 30px;
}

.page {
  background: var(--bg);
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 16px 22px;
  -webkit-overflow-scrolling: touch;
}

.page::-webkit-scrollbar {
  display: none;
}

.page-main {
  padding-bottom: 106px;
}

.search-box,
.sub-search {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: #596474;
  display: flex;
  gap: 16px;
  min-height: 64px;
  margin: 10px 0 18px;
  padding: 0 18px;
}

.search-box span:last-child {
  font-size: 17px;
  font-weight: 520;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-mark {
  color: #4b5563;
  display: inline-block;
  flex: 0 0 auto;
  height: 28px;
  position: relative;
  width: 28px;
}

.search-mark:before {
  border: 4px solid currentColor;
  border-radius: 50%;
  content: "";
  height: 17px;
  left: 0;
  position: absolute;
  top: 0;
  width: 17px;
}

.search-mark:after {
  left: 20px;
  top: 20px;
}

.sub-search {
  margin-top: 0;
}

.sub-search input {
  background: transparent;
  border: 0;
  min-width: 0;
  padding: 0;
}

.card,
.app-section,
.form,
.moment-publisher,
.feed-card {
  background: var(--card);
  border: 1px solid rgba(17, 32, 52, .04);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.card {
  margin-bottom: 12px;
}

.row,
.app-row {
  align-items: center;
  color: var(--text);
  display: flex;
  gap: 14px;
  min-height: 78px;
  padding: 14px 16px;
  position: relative;
  text-align: left;
  width: 100%;
}

.app-row {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-height: 82px;
}

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

.avatar {
  background: #d9f8e8;
  border-radius: 50%;
  color: #067947;
  flex: 0 0 auto;
  height: 56px;
  object-fit: cover;
  width: 56px;
}

.avatar.big {
  height: 66px;
  width: 66px;
}

.avatar-fallback {
  align-items: center;
  display: inline-flex;
  font-size: 22px;
  font-weight: 850;
  justify-content: center;
}

.quick-icon,
.app-entry-icon {
  align-items: center;
  background: #e9fbf2;
  border-radius: 15px;
  color: var(--primary);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 19px;
  font-weight: 850;
  height: 56px;
  justify-content: center;
  position: relative;
  width: 56px;
}

.quick-icon {
  border-radius: 50%;
}

.app-entry-icon.blue {
  background: #edf5ff;
  color: var(--blue);
}

.app-entry-icon.orange {
  background: #fff7e8;
  color: var(--orange);
}

.app-entry-icon.red {
  background: #fff0f2;
  color: var(--red);
}

.app-entry-icon b {
  display: inline-block;
}

.app-entry-icon[class*="entry-"] b {
  opacity: 0;
}

.app-entry-icon[class*="entry-"]:before,
.app-entry-icon[class*="entry-"]:after {
  content: "";
  position: absolute;
}

.entry-moment:before {
  background: currentColor;
  border-radius: 50%;
  height: 28px;
  left: 14px;
  top: 14px;
  width: 28px;
}

.entry-moment:after {
  background: #fff;
  clip-path: polygon(50% 0, 70% 38%, 100% 50%, 62% 70%, 50% 100%, 30% 62%, 0 50%, 38% 30%);
  height: 16px;
  left: 20px;
  top: 20px;
  width: 16px;
}

.entry-scan:before {
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 8px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 0 0 / 4px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 8px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 4px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 8px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 4px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 8px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 4px 8px no-repeat;
  height: 28px;
  left: 14px;
  top: 14px;
  width: 28px;
}

.entry-scan:after {
  background: currentColor;
  box-shadow: 9px 0 0 currentColor, 0 9px 0 currentColor, 9px 9px 0 currentColor, 18px 9px 0 currentColor, 9px 18px 0 currentColor;
  height: 4px;
  left: 18px;
  top: 18px;
  width: 4px;
}

.entry-near:before {
  background: currentColor;
  border-radius: 50% 50% 50% 6px;
  height: 28px;
  left: 14px;
  top: 10px;
  transform: rotate(-45deg);
  width: 28px;
}

.entry-near:after {
  background: #fff;
  border-radius: 50%;
  height: 9px;
  left: 24px;
  top: 19px;
  width: 9px;
}

.entry-favorite:before {
  background: currentColor;
  border-radius: 4px 4px 2px 2px;
  height: 30px;
  left: 18px;
  top: 13px;
  width: 20px;
}

.entry-favorite:after {
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 8px solid #e9fbf2;
  left: 18px;
  top: 35px;
}

.entry-miniapp:before {
  background: currentColor;
  box-shadow: 10px 0 0 currentColor, 20px 0 0 currentColor, 0 10px 0 currentColor, 10px 10px 0 currentColor, 20px 10px 0 currentColor, 0 20px 0 currentColor, 10px 20px 0 currentColor, 20px 20px 0 currentColor;
  height: 6px;
  left: 15px;
  top: 15px;
  width: 6px;
}

.entry-edit:before {
  border: 3px solid currentColor;
  border-radius: 5px;
  height: 23px;
  left: 14px;
  top: 16px;
  width: 24px;
}

.entry-edit:after {
  background: currentColor;
  border-radius: 99px;
  height: 4px;
  left: 27px;
  top: 13px;
  transform: rotate(-45deg);
  width: 17px;
}

.entry-settings:before {
  border: 5px solid currentColor;
  border-radius: 50%;
  height: 22px;
  left: 17px;
  top: 17px;
  width: 22px;
}

.entry-settings:after {
  background: currentColor;
  box-shadow: 0 -18px 0 currentColor, 0 18px 0 currentColor, 18px 0 0 currentColor, -18px 0 0 currentColor;
  height: 7px;
  left: 24px;
  top: 24px;
  width: 7px;
}

.entry-client:before {
  border: 3px solid currentColor;
  border-radius: 5px;
  height: 25px;
  left: 18px;
  top: 11px;
  width: 20px;
}

.entry-client:after {
  background: currentColor;
  border-radius: 99px;
  height: 3px;
  left: 24px;
  top: 39px;
  width: 8px;
}

.entry-logout:before {
  border: 4px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
  height: 27px;
  left: 14px;
  top: 15px;
  width: 27px;
}

.entry-logout:after {
  background: currentColor;
  border-radius: 99px;
  height: 18px;
  left: 27px;
  top: 9px;
  width: 4px;
}

.row-main,
.main {
  flex: 1;
  min-width: 0;
}

.row-title,
.title {
  color: var(--text);
  font-size: 19px;
  font-weight: 740;
  line-height: 1.28;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-title.logout {
  color: var(--red);
}

.row-desc,
.desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-time,
.time {
  align-self: flex-start;
  color: #566273;
  flex: 0 0 auto;
  font-size: 15px;
  line-height: 1.2;
  padding-top: 2px;
  white-space: nowrap;
}

.badge {
  align-items: center;
  background: var(--red);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  justify-content: center;
  line-height: 18px;
  min-width: 18px;
  padding: 0 5px;
}

.row .badge {
  position: absolute;
  right: 16px;
  top: 42px;
}

.arrow {
  border-right: 4px solid #4b5563;
  border-top: 4px solid #4b5563;
  flex: 0 0 auto;
  height: 16px;
  margin-left: auto;
  opacity: .95;
  transform: rotate(45deg);
  width: 16px;
}

.section-title {
  color: #4f5b68;
  font-size: 22px;
  font-weight: 780;
  line-height: 1.2;
  margin: 24px 4px 14px;
}

.message-detail-shell .topbar {
  justify-content: flex-start;
}

.message-detail-shell .topbar h1,
.message-detail-shell.subpage-shell .topbar h1 {
  flex: 0 1 auto;
  font-size: 20px;
  left: auto;
  line-height: 44px;
  pointer-events: auto;
  position: static;
  right: auto;
  text-align: left;
}

.message-detail-page {
  display: grid;
  gap: 14px;
}

.message-detail-preview {
  background: #fff;
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.message-detail-sender {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.message-detail-sender .avatar {
  height: 42px;
  width: 42px;
}

.message-detail-sender span {
  display: grid;
  min-width: 0;
}

.message-detail-sender b {
  color: #111827;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-detail-sender em {
  color: #8b95a1;
  font-size: 12px;
  font-style: normal;
}

.message-detail-bubble {
  justify-self: start;
  max-width: min(100%, 420px);
}

.message-detail-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.message-detail-row {
  align-items: center;
  color: #1f2937;
  display: grid;
  font-size: 15px;
  gap: 18px;
  grid-template-columns: minmax(88px, 1fr) minmax(0, 2fr);
  min-height: 52px;
  padding: 0 14px;
}

.message-detail-row span {
  min-width: 0;
}

.message-detail-row b {
  color: #1f2937;
  font-weight: 520;
  min-width: 0;
  text-align: right;
  word-break: break-word;
}

.app-section {
  margin-bottom: 16px;
  overflow: hidden;
}

.empty,
.empty-state {
  color: var(--muted);
  padding: 42px 14px;
  text-align: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.empty-visual {
  align-items: center;
  background: #d9f8e8;
  border-radius: 50%;
  color: var(--primary);
  display: flex;
  height: 76px;
  justify-content: center;
  margin-bottom: 20px;
  width: 76px;
}

.empty-visual i {
  height: 30px;
  position: relative;
  width: 30px;
}

.empty-state h3 {
  color: var(--text);
  font-size: 23px;
  font-weight: 780;
  line-height: 1.25;
  margin: 0 0 12px;
}

.empty-state p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  margin: 0;
}

.conversation-empty {
  min-height: 300px;
  padding: 54px 18px;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
  width: 100%;
}

.empty-actions .primary,
.empty-actions .secondary {
  min-height: 40px;
  min-width: 104px;
  padding: 0 16px;
}

.tabbar {
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid #edf0f2;
  bottom: 0;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(4, 1fr);
  height: calc(92px + env(safe-area-inset-bottom));
  left: 0;
  padding-bottom: env(safe-area-inset-bottom);
  position: absolute;
  right: 0;
  z-index: 5;
}

.im-bottom:before {
  background: var(--primary);
  border-radius: 99px;
  content: "";
  height: 4px;
  left: 12.5%;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  transition: left .2s ease;
  width: 28px;
}

.im-bottom[data-active="contacts"]:before {
  left: 37.5%;
}

.im-bottom[data-active="discover"]:before {
  left: 62.5%;
}

.im-bottom[data-active="me"]:before {
  left: 87.5%;
}

.im-tab {
  align-items: center;
  background: transparent;
  border: 0;
  color: #4b5563;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  font-weight: 660;
  gap: 7px;
  justify-content: center;
  padding: 10px 0 8px;
  position: relative;
}

.im-tab.active {
  color: var(--primary);
  font-weight: 780;
}

.im-tab i {
  display: block;
  height: 28px;
  position: relative;
  width: 28px;
}

.im-tab .badge {
  position: absolute;
  right: 24px;
  top: 12px;
}

.ico-chat:before,
.ico-chat:after {
  border: 3px solid currentColor;
  border-radius: 2px;
  content: "";
  position: absolute;
}

.ico-chat:before {
  height: 18px;
  left: 2px;
  top: 4px;
  width: 22px;
}

.ico-chat:after {
  border-left-color: transparent;
  border-top-color: transparent;
  height: 7px;
  left: 7px;
  top: 17px;
  transform: rotate(45deg);
  width: 7px;
}

.ico-book:before,
.ico-book:after,
.ico-discover:before,
.ico-discover:after,
.ico-user:before,
.ico-user:after {
  content: "";
  position: absolute;
}

.ico-book:before {
  border: 3px solid currentColor;
  border-radius: 3px;
  height: 22px;
  left: 5px;
  top: 3px;
  width: 18px;
}

.ico-book:after {
  background: currentColor;
  box-shadow: 0 7px 0 currentColor;
  height: 3px;
  left: 10px;
  top: 10px;
  width: 8px;
}

.ico-discover:before {
  border: 3px solid currentColor;
  border-radius: 50%;
  height: 24px;
  left: 2px;
  top: 2px;
  width: 24px;
}

.ico-discover:after {
  background: currentColor;
  border-radius: 99px;
  height: 10px;
  left: 13px;
  top: 7px;
  transform: rotate(35deg);
  width: 3px;
  box-shadow: 0 12px 0 currentColor;
}

.ico-user:before {
  background: currentColor;
  border-radius: 50%;
  height: 10px;
  left: 9px;
  top: 3px;
  width: 10px;
}

.ico-user:after {
  background: currentColor;
  border-radius: 15px 15px 4px 4px;
  height: 11px;
  left: 5px;
  top: 17px;
  width: 18px;
}

.form {
  display: grid;
  gap: 13px;
  margin: 0 auto 16px;
  max-width: 380px;
  padding: 18px;
}

.auth-shell {
  background:
    radial-gradient(circle at 50% -80px, rgba(8, 191, 98, .18), transparent 220px),
    #f3f6f5;
}

.auth-page {
  background: transparent;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: calc(env(safe-area-inset-top) + 58px) 22px calc(env(safe-area-inset-bottom) + 26px);
}

.auth-hero {
  padding: 18px 0 34px;
}

.auth-logo-img {
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(8, 191, 98, .28);
  display: block;
  height: 88px;
  margin-bottom: 22px;
  object-fit: cover;
  width: 88px;
}

.auth-name {
  color: var(--text);
  font-size: 42px;
  font-weight: 820;
  line-height: 1.05;
}

.auth-sub {
  color: #4b5563;
  font-size: 22px;
  font-weight: 700;
  margin-top: 12px;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: clamp(58px, 11vh, 110px);
  padding-bottom: 10px;
}

.auth-field {
  align-items: center;
  background: #fff;
  border: 1px solid #e4eaef;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(17, 32, 52, .05);
  display: flex;
  gap: 14px;
  min-height: 64px;
  padding: 0 16px;
}

.auth-field span {
  color: var(--text);
  flex: 0 0 42px;
  font-size: 17px;
  font-weight: 760;
}

.auth-field input {
  background: transparent;
  border: 0;
  color: var(--text);
  flex: 1;
  font-size: 17px;
  min-width: 0;
  outline: 0;
}

.auth-field input::placeholder {
  color: #9aa5b1;
}

.auth-submit {
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(8, 191, 98, .22);
  font-size: 20px;
  height: 58px;
  margin-top: 8px;
}

.auth-links {
  align-items: center;
  display: flex;
  justify-content: center;
  gap: 0;
  min-height: 42px;
}

.auth-links button {
  background: transparent;
  border: 0;
  color: #5b6674;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 0 14px;
  position: relative;
  white-space: nowrap;
}

.auth-links button + button:before {
  background: #d7dee5;
  content: "";
  height: 16px;
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
}

.auth-links button.active {
  color: var(--primary-dark);
}

.form h2 {
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 8px;
}

.field {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  min-height: 46px;
  padding: 0 13px;
  width: 100%;
}

textarea.field {
  line-height: 1.55;
  min-height: 112px;
  padding-top: 12px;
  resize: vertical;
}

.primary,
.secondary,
.danger,
.mini,
.moment-tab,
.download-link {
  border: 0;
  border-radius: 12px;
  font-weight: 780;
  min-height: 42px;
  padding: 0 14px;
  transition: opacity .15s ease, transform .15s ease;
}

.primary {
  background: var(--primary);
  color: #fff;
}

.secondary {
  background: #eef2f7;
  color: #334155;
}

.danger {
  background: #fff0f2;
  color: var(--red);
}

.mini {
  background: #e8fbf1;
  color: var(--primary-dark);
  font-size: 13px;
  min-height: 34px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions > button {
  flex: 1;
}

.input-section {
  padding: 10px;
}

.input-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.input-row .field {
  flex: 1;
  min-width: 0;
}

.me-hero {
  align-items: center;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  min-height: 104px;
  padding: 18px;
}

.me-hero-meta {
  flex: 1;
  min-width: 0;
}

.me-hero-name {
  color: var(--text);
  font-size: 24px;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-hero-id {
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.chat .messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 0 12px;
}

.bubble-line {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.bubble-line.mine {
  flex-direction: row-reverse;
}

.bubble {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  line-height: 1.55;
  max-width: 76%;
  padding: 10px 12px;
  word-break: break-word;
}

.mine .bubble {
  background: #c9f7d8;
}

.bubble-name {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.bubble img {
  border-radius: 10px;
  display: block;
  max-width: 190px;
}

.composer {
  align-items: center;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 -3px 14px rgba(17, 32, 52, .06);
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  padding: 10px;
}

.composer .field {
  background: #f6f8fa;
  flex: 1;
  min-width: 0;
}

.moment-publisher {
  margin-bottom: 24px;
  padding: 16px;
}

.moment-publisher textarea {
  font-size: 20px;
  min-height: 128px;
  margin-top: 16px;
}

.moment-compose-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 14px;
}

.image-pick {
  background: #d9f8e8;
  border: 0;
  border-radius: 50%;
  color: var(--primary);
  height: 56px;
  position: relative;
  width: 56px;
}

.image-pick:before {
  border: 4px solid currentColor;
  border-radius: 4px;
  content: "";
  height: 22px;
  left: 15px;
  position: absolute;
  top: 17px;
  width: 26px;
}

.image-pick:after {
  border-bottom: 10px solid currentColor;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  content: "";
  left: 20px;
  position: absolute;
  top: 28px;
}

.moment-publish {
  background: var(--primary);
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 780;
  height: 54px;
  min-width: 96px;
}

.moment-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
}

.moment-tab {
  background: #fff;
  border: 1px solid var(--line-strong);
  color: #566273;
  font-size: 17px;
  min-height: 42px;
}

.moment-tab.active {
  background: #c9f7ee;
  border-color: #c9f7ee;
  color: #006d60;
}

.feed-card {
  margin-bottom: 16px;
  padding: 16px;
}

.feed-head {
  align-items: center;
  display: flex;
  gap: 12px;
}

.feed-user {
  flex: 1;
  min-width: 0;
}

.feed-name {
  color: var(--text);
  font-size: 20px;
  font-weight: 780;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-content {
  color: var(--text);
  font-size: 20px;
  line-height: 1.55;
  margin: 26px 0 20px;
  white-space: pre-wrap;
  word-break: break-word;
}

.feed-images {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, 1fr);
  margin: 12px 0 18px;
}

.feed-images.single {
  grid-template-columns: minmax(96px, 160px);
}

.feed-images img {
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  width: 100%;
}

.feed-time {
  align-items: center;
  color: var(--primary);
  display: flex;
  font-size: 16px;
  font-weight: 780;
  justify-content: flex-end;
}

.feed-time .moment-tab {
  border-color: transparent;
  color: var(--primary);
  padding: 0 10px;
}

.icon-btn.delete {
  color: var(--text);
  margin-left: auto;
}

.icon-btn.delete:before {
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
  content: "";
  height: 22px;
  left: 13px;
  position: absolute;
  top: 16px;
  width: 18px;
}

.icon-btn.delete:after {
  background: currentColor;
  border-radius: 2px;
  box-shadow: 5px -4px 0 -2px currentColor, -5px -4px 0 -2px currentColor;
  content: "";
  height: 4px;
  left: 10px;
  position: absolute;
  top: 10px;
  width: 24px;
}

.load-more,
.download-link {
  background: #fff;
  border: 1px solid var(--line-strong);
  color: #2f5c9a;
  display: block;
  margin: 16px auto;
}

.download-card {
  margin-bottom: 16px;
  overflow: hidden;
}

.download-link {
  align-items: center;
  border-left: 0;
  border-radius: 0;
  border-right: 0;
  border-bottom: 0;
  display: flex;
  justify-content: center;
  margin: 0;
  min-height: 52px;
}

.toast {
  background: rgba(15, 23, 42, .88);
  border-radius: 12px;
  bottom: calc(112px + env(safe-area-inset-bottom));
  color: #fff;
  font-size: 14px;
  left: 50%;
  max-width: 82%;
  padding: 10px 14px;
  position: absolute;
  text-align: center;
  transform: translateX(-50%);
  z-index: 20;
}

.update-modal-host {
  inset: 0;
  position: fixed;
  z-index: 1000;
}

.update-modal-mask {
  background: rgba(12, 18, 26, .42);
  inset: 0;
  position: absolute;
}

.update-modal {
  background: var(--card);
  border: 1px solid rgba(17, 32, 52, .08);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
  color: var(--text);
  display: grid;
  gap: 12px;
  left: 50%;
  max-width: 340px;
  padding: 24px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100vw - 48px);
}

.update-modal-mark {
  align-items: center;
  background: rgba(8, 191, 98, .14);
  border-radius: 16px;
  color: var(--primary-dark);
  display: inline-flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.update-modal h2 {
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}

.update-modal p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.update-modal-version {
  color: #98a2b3;
  font-size: 12px;
}

.hide {
  display: none !important;
}

@media (min-width: 780px) and (hover: hover) and (pointer: fine) {
  body {
    align-items: center;
    display: flex;
    justify-content: center;
  }

  .app-shell {
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(17, 32, 52, .18);
    height: min(100vh, 900px);
    min-height: 0;
  }
}

@media (max-width: 360px) {
  .topbar {
    min-height: 104px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar h1,
  .subpage-shell .topbar h1 {
    font-size: 27px;
  }

  .page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .row-title,
  .title,
  .feed-name {
    font-size: 17px;
  }

  .row-desc,
  .desc {
    font-size: 14px;
  }

  .im-tab {
    font-size: 14px;
  }
}

/* Product UI refresh inspired by mature IM H5 patterns, using NowChat branding. */
:root {
  --bg: #f5f6f8;
  --surface: #fff;
  --muted: #7b8490;
  --line: #eceff2;
  --line-strong: #e2e6ea;
  --primary: #07c160;
  --primary-dark: #049a4d;
  --shadow: 0 10px 28px rgba(18, 30, 46, .08);
}

.main-shell .topbar,
.subpage-shell .topbar {
  align-items: center;
  background: var(--surface);
  min-height: calc(62px + env(safe-area-inset-top));
  padding: calc(env(safe-area-inset-top) + 8px) 16px 10px;
  position: relative;
}

.main-shell .topbar h1,
.subpage-shell .topbar h1 {
  color: #050812;
  font-size: 20px;
  font-weight: 820;
  line-height: 44px;
  margin: 0;
  text-align: center;
}

.main-shell.tab-chat .topbar h1,
.main-shell.tab-discover .topbar h1,
.subpage-shell .topbar h1 {
  left: 82px;
  pointer-events: none;
  position: absolute;
  right: 82px;
}

.main-shell.tab-contacts .topbar h1 {
  flex: 1;
  font-size: 28px;
  text-align: left;
}

.main-shell.tab-contacts .top-spacer {
  display: none;
}

.main-shell.tab-me .topbar {
  display: none;
}

.main-shell.tab-me .page-main {
  padding-top: 0;
}

.topbar-actions {
  gap: 9px;
  height: 44px;
  margin-left: auto;
}

.top-spacer {
  flex: 0 0 44px;
  height: 44px;
}

.top-pill {
  align-items: center;
  background: #f0f1f3;
  border: 0;
  border-radius: 22px;
  color: #171b22;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 760;
  height: 38px;
  justify-content: center;
  min-width: 72px;
  padding: 0 18px;
}

.top-pill.light {
  background: rgba(255, 255, 255, .92);
}

.round-action {
  align-items: center;
  background: #f0f1f3;
  border: 0;
  border-radius: 16px;
  color: #0d1117;
  display: inline-flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 42px;
}

.round-action.dark {
  background: #050812;
  color: #fff;
}

.round-action.add:before,
.round-action.add:after,
.composer-tool.plus-tool:before,
.composer-tool.plus-tool:after {
  background: currentColor;
  border-radius: 99px;
  content: "";
  position: absolute;
}

.round-action.add:before,
.composer-tool.plus-tool:before {
  height: 3px;
  width: 18px;
}

.round-action.add:after,
.composer-tool.plus-tool:after {
  height: 18px;
  width: 3px;
}

.round-action.search:before {
  border: 3px solid currentColor;
  border-radius: 50%;
  content: "";
  height: 14px;
  left: 11px;
  position: absolute;
  top: 10px;
  width: 14px;
}

.round-action.search:after {
  background: currentColor;
  border-radius: 99px;
  content: "";
  height: 9px;
  left: 25px;
  position: absolute;
  top: 25px;
  transform: rotate(-45deg);
  width: 3px;
}

.round-action.bell:before {
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  content: "";
  height: 16px;
  left: 13px;
  position: absolute;
  top: 11px;
  width: 14px;
}

.round-action.bell:after {
  background: currentColor;
  border-radius: 99px;
  box-shadow: 4px 5px 0 -2px currentColor;
  content: "";
  height: 3px;
  left: 12px;
  position: absolute;
  top: 28px;
  width: 18px;
}

.round-action.more:before {
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 8px 0 currentColor, 0 16px 0 currentColor;
  content: "";
  height: 4px;
  width: 4px;
}

.round-action.user-add:before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 9px;
  left: 12px;
  position: absolute;
  top: 10px;
  width: 9px;
}

.round-action.user-add:after {
  border: 3px solid currentColor;
  border-bottom-width: 4px;
  border-radius: 14px 14px 5px 5px;
  content: "";
  height: 12px;
  left: 8px;
  position: absolute;
  top: 22px;
  width: 17px;
}

.round-action.user-add {
  background:
    linear-gradient(currentColor, currentColor) 30px 14px / 3px 14px no-repeat,
    linear-gradient(currentColor, currentColor) 24px 20px / 14px 3px no-repeat,
    #f0f1f3;
}

.round-action.qr-action,
.round-action.qr-white {
  background:
    linear-gradient(currentColor, currentColor) 12px 12px / 7px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 12px 12px / 3px 7px no-repeat,
    linear-gradient(currentColor, currentColor) 25px 12px / 7px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 29px 12px / 3px 7px no-repeat,
    linear-gradient(currentColor, currentColor) 12px 25px / 7px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 12px 25px / 3px 7px no-repeat,
    rgba(255, 255, 255, .92);
}

.round-action.qr-action {
  background-color: #f0f1f3;
}

.icon-btn.back {
  color: #0d1117;
  font-size: 38px;
  height: 44px;
  margin-left: -7px;
  width: 44px;
}

.page {
  background: var(--bg);
  padding: 8px 16px 22px;
}

.page-main {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.search-box,
.sub-search {
  background: #eff0f2;
  border: 0;
  border-radius: 9px;
  box-shadow: none;
  color: #8b929c;
  gap: 9px;
  min-height: 48px;
  margin: 0 0 18px;
  padding: 0 16px;
}

.search-box span:last-child {
  color: #9aa1aa;
  font-size: 16px;
  font-weight: 560;
}

.search-mark {
  color: #8c949e;
  height: 20px;
  width: 20px;
}

.search-mark:before {
  border-width: 2px;
  height: 11px;
  width: 11px;
}

.search-mark:after {
  height: 7px;
  left: 14px;
  top: 14px;
  width: 2px;
}

.list-panel {
  background: #fff;
  border-radius: 0;
  margin: 0 -16px;
  overflow: hidden;
}

.card.row,
.row.im-row {
  background: #fff;
  border: 0;
  border-bottom: 1px solid #eff1f3;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  min-height: 72px;
  padding: 10px 16px;
}

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

.avatar {
  border-radius: 13px;
  height: 52px;
  width: 52px;
}

.avatar-fallback {
  background: linear-gradient(135deg, #93e77e, #06b67b);
  color: #fff;
  font-size: 20px;
}

.row-title,
.title {
  align-items: center;
  display: flex;
  font-size: 17px;
  font-weight: 820;
  gap: 5px;
}

.row-desc,
.desc {
  color: #8b929c;
  font-size: 14px;
  margin-top: 4px;
}

.row-tag {
  background: #e9f4ff;
  border-radius: 4px;
  color: #2386d1;
  font-size: 11px;
  font-weight: 820;
  line-height: 17px;
  padding: 0 4px;
}

.verified-badge {
  background: #2da7ff;
  border-radius: 50%;
  display: inline-flex;
  height: 14px;
  position: relative;
  width: 14px;
}

.verified-badge:after {
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  content: "";
  height: 6px;
  left: 5px;
  position: absolute;
  top: 2px;
  transform: rotate(45deg);
  width: 3px;
}

.tabbar {
  background: #fff;
  border: 0;
  border-radius: 31px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 12px 30px rgba(18, 30, 46, .1);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 66px;
  left: 22px;
  padding: 0 8px;
  right: 22px;
}

.im-bottom:before {
  display: none;
}

.im-tab {
  border-radius: 27px;
  color: #050812;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
  height: 54px;
  margin: 6px 0;
  padding: 4px 0;
}

.im-tab.active {
  background: #eef0f2;
  color: #050812;
}

.im-tab i {
  height: 23px;
  width: 23px;
}

.im-tab.active i {
  color: var(--primary-dark);
}

.auth-shell {
  background: #fff;
}

.auth-page {
  background: #fff;
  padding: calc(env(safe-area-inset-top) + 18px) 40px calc(env(safe-area-inset-bottom) + 28px);
}

.auth-nav {
  align-items: center;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  margin: 0 -24px 34px;
  min-height: 42px;
}

.auth-nav h1 {
  color: #050812;
  font-size: 20px;
  font-weight: 850;
  margin: 0;
  text-align: center;
}

.auth-hero {
  align-items: center;
  display: flex;
  flex-direction: column;
  padding: 44px 0 42px;
  text-align: center;
}

.auth-mode-register .auth-hero,
.auth-mode-reset .auth-hero {
  padding-top: 18px;
}

.auth-logo-img {
  border-radius: 24px;
  box-shadow: 0 18px 34px rgba(7, 193, 96, .25);
  height: 92px;
  margin: 0 0 28px;
  width: 92px;
}

.auth-name {
  color: #050812;
  font-size: 28px;
  font-weight: 880;
  line-height: 1.12;
}

.auth-mode-login .auth-name {
  font-size: 30px;
}

.auth-sub {
  color: #7d8490;
  font-size: 15px;
  font-weight: 500;
  margin-top: 10px;
}

.auth-steps {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: -20px 0 42px;
}

.auth-steps span {
  align-items: center;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 50%;
  color: #a5adb6;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.auth-steps span.active {
  background: #050812;
  border-color: #050812;
  color: #fff;
}

.auth-steps i {
  background: #e6e8eb;
  height: 2px;
  width: 66px;
}

.auth-egg {
  background:
    radial-gradient(circle at 56% 14%, #ffd23c 0 30%, transparent 31%),
    radial-gradient(circle at 58% 62%, #e7eaee 0 50%, transparent 51%);
  height: 76px;
  margin-bottom: 28px;
  position: relative;
  width: 96px;
}

.auth-egg:before {
  background: #ffd23c;
  border-radius: 80px 80px 18px 18px;
  content: "";
  height: 42px;
  left: 27px;
  position: absolute;
  top: 10px;
  width: 56px;
}

.auth-egg:after {
  background: #f0f1f3;
  border-radius: 0 0 80px 80px;
  box-shadow: inset 0 0 0 6px #fff;
  content: "";
  height: 42px;
  left: 16px;
  position: absolute;
  top: 31px;
  width: 74px;
}

.auth-reset-mark {
  border: 7px solid #0b0d13;
  border-left-color: transparent;
  border-radius: 50%;
  height: 62px;
  margin-bottom: 28px;
  position: relative;
  transform: rotate(-30deg);
  width: 62px;
}

.auth-reset-mark:before {
  background: #0b0d13;
  border-radius: 4px;
  content: "";
  height: 23px;
  left: 18px;
  position: absolute;
  top: 23px;
  width: 22px;
}

.auth-reset-mark:after {
  border: 5px solid #0b0d13;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  content: "";
  height: 17px;
  left: 20px;
  position: absolute;
  top: 7px;
  width: 18px;
}

.auth-form {
  gap: 14px;
  margin-top: 0;
}

.auth-field {
  background: #f0f1f3;
  border: 0;
  border-radius: 9px;
  box-shadow: none;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
}

.auth-field span {
  color: #737b86;
  flex-basis: 68px;
  font-size: 16px;
  font-weight: 650;
}

.auth-mode-reset .auth-field span {
  flex-basis: 92px;
}

.auth-field input {
  color: #050812;
  font-size: 16px;
}

.auth-field input::placeholder {
  color: #969da7;
}

.auth-icon {
  color: #7d8490;
  flex: 0 0 auto;
  height: 20px;
  position: relative;
  width: 20px;
}

.auth-user:before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 7px;
  left: 7px;
  position: absolute;
  top: 3px;
  width: 7px;
}

.auth-user:after {
  border: 2px solid currentColor;
  border-radius: 10px 10px 4px 4px;
  content: "";
  height: 8px;
  left: 3px;
  position: absolute;
  top: 12px;
  width: 14px;
}

.auth-lock:before {
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
  height: 8px;
  left: 5px;
  position: absolute;
  top: 1px;
  width: 10px;
}

.auth-lock:after {
  background: currentColor;
  border-radius: 3px;
  content: "";
  height: 11px;
  left: 3px;
  position: absolute;
  top: 8px;
  width: 14px;
}

.auth-id:before {
  border: 2px solid currentColor;
  border-radius: 5px;
  content: "";
  height: 14px;
  left: 2px;
  position: absolute;
  top: 3px;
  width: 16px;
}

.auth-id:after {
  background: currentColor;
  box-shadow: 6px 0 0 currentColor;
  content: "";
  height: 2px;
  left: 6px;
  position: absolute;
  top: 10px;
  width: 2px;
}

.auth-meta {
  align-items: center;
  color: #8b929c;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  margin: -2px 2px 14px;
}

.auth-meta span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.auth-meta button {
  background: transparent;
  border: 0;
  color: #050812;
  font-size: 14px;
  font-weight: 820;
  padding: 0;
}

.auth-shield {
  border: 2px solid #9aa1aa;
  border-radius: 8px 8px 10px 10px;
  display: inline-flex;
  height: 14px;
  width: 12px;
}

.auth-submit {
  background: var(--primary);
  border-radius: 11px;
  box-shadow: 0 14px 26px rgba(7, 193, 96, .22);
  color: #fff;
  font-size: 17px;
  height: 51px;
  margin-top: 8px;
}

.auth-links {
  color: #8b929c;
  font-size: 15px;
  font-weight: 500;
  margin-top: 46px;
}

.auth-links button {
  color: #050812;
  font-size: 15px;
  font-weight: 850;
  padding: 0 0 0 10px;
}

.auth-links button:before {
  display: none;
}

.auth-agree {
  align-items: center;
  color: #7d8490;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 3px;
  justify-content: center;
  line-height: 1.4;
  margin-top: 14px;
}

.auth-agree-check {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  position: relative;
}

.auth-agree-input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.auth-checkbox {
  background: #fff;
  border: 1px solid #d8dde3;
  border-radius: 4px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 16px;
  position: relative;
  width: 16px;
}

.auth-agree-input:checked + .auth-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.auth-agree-input:checked + .auth-checkbox:after {
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  height: 8px;
  left: 5px;
  position: absolute;
  top: 1px;
  transform: rotate(45deg);
  width: 4px;
}

.auth-agree-input:focus-visible + .auth-checkbox {
  box-shadow: 0 0 0 3px rgba(7, 193, 96, .18);
}

.auth-policy-link {
  background: transparent;
  border: 0;
  color: #050812;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
  padding: 0;
}

.policy-page {
  padding-top: calc(env(safe-area-inset-top) + 18px);
}

.policy-card {
  background: #fff;
  color: #111827;
  display: grid;
  gap: 14px;
  padding: 8px 0 24px;
}

.policy-card h2 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 6px;
}

.policy-card p {
  color: #4b5563;
  font-size: 15px;
  line-height: 1.75;
  margin: 0;
}

.contact-shortcuts {
  background: #fff;
  margin: 0 -16px 0;
}

.contact-shortcut {
  align-items: center;
  background: #fff;
  border: 0;
  color: #050812;
  display: grid;
  font-size: 18px;
  font-weight: 520;
  gap: 16px;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 64px;
  padding: 0 16px;
  position: relative;
  text-align: left;
  width: 100%;
}

.contact-shortcut:after {
  background: #eff1f3;
  bottom: 0;
  content: "";
  height: 1px;
  left: 96px;
  position: absolute;
  right: 0;
}

.contact-shortcut:last-child:after {
  display: none;
}

.contact-shortcut i {
  color: #0b0d13;
  flex: 0 0 auto;
  height: 28px;
  justify-self: center;
  position: relative;
  width: 28px;
}

.contact-shortcut span {
  min-width: 0;
}

.contact-shortcut i.new-friend:before,
.contact-shortcut i.group-chat:before,
.contact-shortcut i.channel:before {
  content: "";
  position: absolute;
}

.contact-shortcut i.new-friend:before {
  background: currentColor;
  border-radius: 50%;
  box-shadow: 10px 10px 0 -1px currentColor;
  height: 7px;
  left: 2px;
  top: 5px;
  width: 7px;
}

.contact-shortcut i.new-friend:after {
  background:
    linear-gradient(currentColor, currentColor) 18px 3px / 2px 10px no-repeat,
    linear-gradient(currentColor, currentColor) 14px 7px / 10px 2px no-repeat;
  content: "";
  inset: 0;
  position: absolute;
}

.contact-shortcut i.group-chat:before {
  background: currentColor;
  border-radius: 50%;
  box-shadow: 9px 1px 0 currentColor, 18px 0 0 currentColor;
  height: 6px;
  left: 0;
  top: 7px;
  width: 6px;
}

.contact-shortcut i.group-chat:after {
  border: 3px solid currentColor;
  border-radius: 12px;
  content: "";
  height: 8px;
  left: 2px;
  position: absolute;
  top: 15px;
  width: 19px;
}

.contact-shortcut i.channel:before {
  border-bottom: 7px solid transparent;
  border-left: 18px solid currentColor;
  border-top: 7px solid transparent;
  height: 0;
  left: 2px;
  top: 5px;
  width: 0;
}

.contact-shortcut i.channel:after {
  background: currentColor;
  border-radius: 2px;
  content: "";
  height: 15px;
  left: 18px;
  position: absolute;
  top: 5px;
  transform: rotate(-14deg);
  width: 3px;
}

.alpha-title {
  background: #f0f1f3;
  color: #777f89;
  font-size: 12px;
  line-height: 31px;
  margin: 0 -16px;
  padding-left: 16px;
}

.contact-index {
  color: #8b929c;
  display: grid;
  font-size: 10px;
  gap: 2px;
  position: absolute;
  right: 4px;
  text-align: center;
  top: 48%;
  z-index: 4;
}

.discover-list {
  background: #fff;
  margin: -8px -16px 0;
}

.app-section,
.settings-card {
  background: #fff;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
}

.app-row {
  min-height: 58px;
  padding: 11px 18px;
}

.app-entry-icon {
  border-radius: 10px;
  height: 34px;
  width: 34px;
}

.app-entry-icon.red {
  background: #ff3f43;
  color: #fff;
}

.app-entry-icon.orange {
  background: #ff9f0a;
  color: #fff;
}

.app-entry-icon.purple {
  background: #6266f1;
  color: #fff;
}

.app-entry-icon.gray {
  background: #9aa1aa;
  color: #fff;
}

.app-entry-icon.green {
  background: #30d158;
  color: #fff;
}

.app-entry-icon.dark {
  background: #050812;
  color: #fff;
}

.arrow {
  border-color: #9ca3af;
  border-width: 2px;
  height: 9px;
  width: 9px;
}

.settings-hero {
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, .3) 0 9px, transparent 10px),
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, .22) 0 16px, transparent 17px),
    linear-gradient(145deg, #38d98b 0%, #17b8d6 52%, #2d86e6 100%);
  color: #fff;
  margin: -8px -16px 0;
  min-height: 300px;
  overflow: hidden;
  padding: 20px 16px 56px;
  position: relative;
  text-align: center;
}

.settings-hero:after {
  background-image:
    linear-gradient(120deg, rgba(255,255,255,.16) 10px, transparent 11px),
    radial-gradient(circle, rgba(255,255,255,.12) 2px, transparent 3px);
  background-size: 78px 78px, 34px 34px;
  content: "";
  inset: 0;
  opacity: .55;
  position: absolute;
}

.profile-actions,
.settings-name,
.settings-id,
.settings-hero .avatar {
  position: relative;
  z-index: 1;
}

.profile-actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.avatar.profile {
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
  font-size: 48px;
  height: 104px;
  margin: 0 auto 14px;
  width: 104px;
}

.settings-name {
  font-size: 24px;
  font-weight: 880;
  margin-bottom: 8px;
}

.settings-id {
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
}

.settings-card {
  margin: -18px 0 18px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.main-shell.tab-me .page-main {
  padding-bottom: calc(126px + env(safe-area-inset-bottom));
}

.settings-card.compact {
  margin-top: 0;
}

.entry-warning:before {
  border-bottom: 24px solid currentColor;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  content: "";
  left: 3px;
  position: absolute;
  top: 5px;
}

.entry-warning:after {
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 10px 0 #fff;
  content: "";
  height: 9px;
  left: 16px;
  position: absolute;
  top: 13px;
  width: 3px;
}

.entry-wallet:before,
.entry-chat-setting:before {
  border: 3px solid currentColor;
  border-radius: 5px;
  content: "";
  height: 19px;
  left: 6px;
  position: absolute;
  top: 8px;
  width: 22px;
}

.entry-wallet:after {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 4px;
  left: 21px;
  position: absolute;
  top: 17px;
  width: 4px;
}

.entry-vip:before {
  border: 3px solid currentColor;
  border-radius: 50%;
  content: "";
  height: 20px;
  left: 7px;
  position: absolute;
  top: 6px;
  width: 20px;
}

.entry-vip:after {
  border-bottom: 7px solid currentColor;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  content: "";
  left: 12px;
  position: absolute;
  top: 14px;
}

.entry-bell:before {
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  content: "";
  height: 15px;
  left: 9px;
  position: absolute;
  top: 7px;
  width: 14px;
}

.entry-bell:after {
  background: currentColor;
  border-radius: 99px;
  content: "";
  height: 3px;
  left: 8px;
  position: absolute;
  top: 24px;
  width: 18px;
}

.entry-lock:before {
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  content: "";
  height: 11px;
  left: 10px;
  position: absolute;
  top: 4px;
  width: 13px;
}

.entry-lock:after {
  background: currentColor;
  border-radius: 4px;
  content: "";
  height: 16px;
  left: 8px;
  position: absolute;
  top: 15px;
  width: 18px;
}

.entry-cloud:before {
  background: currentColor;
  border-radius: 16px;
  content: "";
  height: 15px;
  left: 6px;
  position: absolute;
  top: 15px;
  width: 23px;
}

.entry-cloud:after {
  background: currentColor;
  border-radius: 50%;
  box-shadow: 11px -2px 0 1px currentColor;
  content: "";
  height: 13px;
  left: 10px;
  position: absolute;
  top: 8px;
  width: 13px;
}

.entry-chat-setting:after {
  border-left: 6px solid transparent;
  border-top: 7px solid currentColor;
  content: "";
  left: 11px;
  position: absolute;
  top: 25px;
}

.sheet-mask {
  background: rgba(0, 0, 0, .52);
  inset: 0;
  position: absolute;
  z-index: 10;
}

.action-sheet {
  background: #fff;
  border-radius: 14px 14px 0 0;
  bottom: 0;
  left: 0;
  padding: 10px 16px calc(86px + env(safe-area-inset-bottom));
  position: absolute;
  right: 0;
  z-index: 11;
}

.sheet-handle {
  background: #dfe3e7;
  border-radius: 99px;
  height: 4px;
  margin: 0 auto 16px;
  width: 36px;
}

.sheet-item {
  align-items: center;
  background: #fff;
  border: 0;
  display: flex;
  gap: 12px;
  min-height: 72px;
  padding: 4px 0;
  text-align: left;
  width: 100%;
}

.sheet-item i {
  border-radius: 12px;
  flex: 0 0 auto;
  height: 44px;
  position: relative;
  width: 44px;
}

.sheet-item span {
  display: grid;
  gap: 4px;
}

.sheet-item b {
  color: #050812;
  font-size: 16px;
  font-weight: 780;
}

.sheet-item em {
  color: #8b929c;
  font-size: 13px;
  font-style: normal;
}

.sheet-search {
  background: #edf0f3;
  color: #0b0d13;
}

.sheet-group {
  background: #e8fbf1;
  color: var(--primary-dark);
}

.sheet-channel {
  background: #fff6df;
  color: #e69a00;
}

.sheet-scan {
  background: #f4e7fb;
  color: #a040c7;
}

.sheet-search:before,
.sheet-group:before,
.sheet-channel:before,
.sheet-scan:before {
  content: "";
  position: absolute;
}

.sheet-search:before {
  border: 3px solid currentColor;
  border-radius: 50%;
  height: 15px;
  left: 12px;
  top: 11px;
  width: 15px;
}

.sheet-search:after {
  background: currentColor;
  border-radius: 99px;
  content: "";
  height: 9px;
  left: 27px;
  position: absolute;
  top: 27px;
  transform: rotate(-45deg);
  width: 3px;
}

.sheet-group:before {
  background: currentColor;
  border-radius: 50%;
  box-shadow: 12px 0 0 currentColor, 24px 0 0 currentColor;
  height: 8px;
  left: 6px;
  top: 13px;
  width: 8px;
}

.sheet-group:after {
  border: 3px solid currentColor;
  border-radius: 13px;
  content: "";
  height: 9px;
  left: 8px;
  position: absolute;
  top: 25px;
  width: 25px;
}

.sheet-channel:before {
  border-bottom: 9px solid transparent;
  border-left: 24px solid currentColor;
  border-top: 9px solid transparent;
  height: 0;
  left: 9px;
  top: 12px;
  width: 0;
}

.sheet-channel:after {
  background: currentColor;
  border-radius: 2px;
  content: "";
  height: 20px;
  left: 32px;
  position: absolute;
  top: 12px;
  transform: rotate(-14deg);
  width: 3px;
}

.sheet-scan:before {
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 8px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 0 0 / 3px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 8px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 3px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 8px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 3px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 8px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 3px 8px no-repeat;
  height: 24px;
  left: 10px;
  top: 10px;
  width: 24px;
}

.im-chat {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, .55) 0 1px, transparent 2px),
    linear-gradient(135deg, #eff4f8 0%, #e7eef2 100%);
  margin: -8px -16px 0;
  padding: 10px 8px 0;
}

.chat .messages {
  padding: 8px 8px 12px;
}

.bubble-line {
  margin-bottom: 14px;
}

.bubble {
  border-radius: 15px;
  box-shadow: none;
  font-size: 15px;
  line-height: 1.5;
  padding: 10px 12px;
}

.mine .bubble {
  background: #bff4c9;
}

.bubble-name {
  color: #8b929c;
  font-size: 11px;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.composer {
  background: #fff;
  border-radius: 0;
  box-shadow: 0 -6px 20px rgba(18, 30, 46, .05);
  gap: 7px;
  margin: 0 -8px;
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
}

.composer .field {
  background: #f1f2f4;
  border: 0;
  border-radius: 18px;
  min-height: 38px;
}

.composer .primary {
  border-radius: 18px;
  min-height: 38px;
  padding: 0 13px;
}

.composer[data-sending="1"] .primary,
.composer button:disabled {
  opacity: .55;
  pointer-events: none;
}

.composer-tool {
  background: #f1f2f4;
  border: 0;
  border-radius: 50%;
  color: #111827;
  flex: 0 0 auto;
  height: 38px;
  position: relative;
  width: 38px;
}

.image-tool:before {
  border: 3px solid currentColor;
  border-radius: 5px;
  content: "";
  height: 17px;
  left: 9px;
  position: absolute;
  top: 10px;
  width: 20px;
}

.image-tool:after {
  border-bottom: 8px solid currentColor;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  content: "";
  left: 12px;
  position: absolute;
  top: 19px;
}

.square-toolbar {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.square-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.square-grid .feed-card {
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  margin: 0;
  overflow: hidden;
  padding: 0;
}

.demo-thumb,
.square-grid .feed-images img {
  aspect-ratio: 1.12;
  border-radius: 0;
  display: block;
  object-fit: cover;
  width: 100%;
}

.demo-thumb-1 {
  background:
    radial-gradient(circle at 68% 30%, rgba(255,255,255,.72) 0 20px, transparent 21px),
    linear-gradient(135deg, #95d5ff, #1aa76c);
}

.demo-thumb-2 {
  background:
    linear-gradient(90deg, rgba(255,255,255,.55) 10px, transparent 11px) 0 0 / 28px 100%,
    linear-gradient(135deg, #f7d06f, #38bdf8);
}

.demo-thumb-3 {
  background:
    radial-gradient(circle at 40% 44%, rgba(255,255,255,.76) 0 34px, transparent 35px),
    linear-gradient(135deg, #d1d5db, #14b8a6);
}

.demo-thumb-4 {
  background:
    linear-gradient(135deg, rgba(255,255,255,.62) 25%, transparent 26%),
    linear-gradient(135deg, #93c5fd, #22c55e);
}

.square-title {
  color: #111827;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  padding: 9px 10px 8px;
}

.square-meta {
  align-items: center;
  color: #7d8490;
  display: flex;
  font-size: 12px;
  gap: 5px;
  padding: 0 10px 10px;
}

.mini-avatar {
  align-items: center;
  background: #8ee47a;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 820;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.heart {
  background: transparent;
  border: 0;
  height: 26px;
  margin-left: auto;
  position: relative;
  width: 26px;
}

.heart:before,
.heart:after {
  border: 2px solid #a8b0ba;
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  content: "";
  height: 12px;
  position: absolute;
  top: 6px;
  width: 8px;
}

.heart:before {
  left: 7px;
  transform: rotate(-45deg);
}

.heart:after {
  left: 12px;
  transform: rotate(45deg);
}

.form {
  border: 0;
  border-radius: 14px;
  box-shadow: none;
}

@media (max-width: 360px) {
  .auth-page {
    padding-left: 24px;
    padding-right: 24px;
  }

  .auth-field span {
    flex-basis: 58px;
    font-size: 14px;
  }

  .auth-mode-reset .auth-field span {
    flex-basis: 78px;
  }

  .tabbar {
    left: 16px;
    right: 16px;
  }
}

.ui-icon {
  display: block;
  fill: none;
  flex: 0 0 auto;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
  width: 22px;
}

.icon-btn .ui-icon,
.round-action .ui-icon,
.composer-tool .ui-icon {
  height: 22px;
  width: 22px;
}

.icon-btn.back {
  font-size: 0;
}

.icon-btn.back .ui-icon {
  height: 30px;
  stroke-width: 2.6;
  width: 30px;
}

.im-tab > .ui-icon {
  height: 24px;
  width: 24px;
}

.auth-icon.ui-icon,
.auth-meta-icon {
  color: #77808b;
  height: 20px;
  width: 20px;
}

.auth-meta-icon {
  height: 15px;
  width: 15px;
}

.search-mark-icon {
  color: #8c949e;
  height: 20px;
  width: 20px;
}

.shortcut-icon {
  color: #0b0d13;
  height: 24px;
  width: 24px;
}

.app-entry-icon .entry-svg {
  height: 20px;
  stroke-width: 2.3;
  width: 20px;
}

.app-entry-icon b {
  display: none;
}

.arrow-icon {
  color: #a3abb5;
  height: 18px;
  margin-left: auto;
  stroke-width: 2.4;
  width: 18px;
}

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

.sheet-item i {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.sheet-item i .ui-icon {
  height: 23px;
  width: 23px;
}

.round-action.light {
  background: rgba(255, 255, 255, .92);
}

.round-action.add:before,
.round-action.add:after,
.round-action.search:before,
.round-action.search:after,
.round-action.bell:before,
.round-action.bell:after,
.round-action.more:before,
.round-action.user-add:before,
.round-action.user-add:after,
.composer-tool.plus-tool:before,
.composer-tool.plus-tool:after,
.image-tool:before,
.image-tool:after,
.auth-user:before,
.auth-user:after,
.auth-lock:before,
.auth-lock:after,
.auth-id:before,
.auth-id:after,
.auth-shield,
.contact-shortcut i:before,
.contact-shortcut i:after,
.sheet-item i:before,
.sheet-item i:after,
.app-entry-icon[class*="entry-"]:before,
.app-entry-icon[class*="entry-"]:after,
.entry-warning:before,
.entry-warning:after,
.entry-wallet:before,
.entry-wallet:after,
.entry-vip:before,
.entry-vip:after,
.entry-bell:before,
.entry-bell:after,
.entry-lock:before,
.entry-lock:after,
.entry-cloud:before,
.entry-cloud:after,
.entry-chat-setting:before,
.entry-chat-setting:after,
.ico-chat:before,
.ico-chat:after,
.ico-book:before,
.ico-book:after,
.ico-discover:before,
.ico-discover:after,
.ico-user:before,
.ico-user:after {
  content: none !important;
  display: none !important;
}

.auth-agree-input {
  accent-color: var(--primary);
  cursor: pointer;
  flex: 0 0 auto;
  height: 16px;
  opacity: 1;
  position: static;
  width: 16px;
}

.auth-checkbox {
  display: none;
}

.auth-agree-input:focus-visible {
  outline: 2px solid rgba(7, 193, 96, .36);
  outline-offset: 2px;
}

.heart {
  align-items: center;
  color: #9aa3ad;
  display: inline-flex;
  justify-content: center;
}

.heart .ui-icon {
  height: 18px;
  stroke-width: 2.35;
  width: 18px;
}

.heart:before,
.heart:after,
.icon-btn.delete:before,
.icon-btn.delete:after,
.image-pick:before,
.image-pick:after {
  content: none !important;
  display: none !important;
}

.image-pick {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.image-pick .ui-icon {
  height: 22px;
  width: 22px;
}

.settings-hero {
  background: linear-gradient(145deg, #18c77c 0%, #16a6d6 100%);
}

.settings-hero:after {
  background-image: linear-gradient(135deg, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 28px 28px;
}

.settings-inline-profile {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
}

.settings-inline-profile strong,
.settings-inline-profile span {
  display: block;
}

.settings-inline-profile strong {
  font-size: 18px;
  line-height: 1.25;
}

.settings-inline-profile span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.settings-detail {
  display: grid;
  gap: 14px;
}

.settings-note {
  background: #f4f7f6;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #667085;
  font-size: 14px;
  line-height: 1.6;
  padding: 12px 14px;
}

.wallet-balance {
  background: linear-gradient(135deg, #101820, #253142);
  border-radius: 12px;
  color: #fff;
  display: grid;
  gap: 4px;
  padding: 20px;
}

.wallet-balance span,
.wallet-balance em {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-style: normal;
}

.wallet-balance strong {
  font-size: 38px;
  letter-spacing: 0;
  line-height: 1.05;
}

.vip-panel {
  background: linear-gradient(135deg, #121826, #2b3650);
  border-radius: 12px;
  color: #fff;
  display: grid;
  gap: 8px;
  padding: 20px;
}

.vip-mark {
  align-items: center;
  background: rgba(255, 255, 255, .12);
  border-radius: 10px;
  color: #ffd66b;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.vip-panel strong {
  font-size: 20px;
}

.vip-panel span {
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  line-height: 1.55;
}

.vip-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vip-grid div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 12px;
}

.vip-grid b {
  font-size: 14px;
}

.vip-grid span {
  color: var(--muted);
  font-size: 12px;
}

.wallet-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wallet-actions .primary,
.wallet-actions .secondary {
  min-height: 44px;
  min-width: 0;
  padding: 0 8px;
}

.wallet-form {
  gap: 12px;
}

.redpacket-cover,
.redpacket-detail {
  background: linear-gradient(135deg, #f04f3e, #cf2f24);
  border-radius: 12px;
  color: #fff;
  display: grid;
  gap: 8px;
  padding: 18px;
}

.redpacket-cover span {
  align-items: center;
  background: rgba(255, 255, 255, .16);
  border-radius: 12px;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.redpacket-cover b,
.redpacket-detail b {
  font-size: 20px;
  line-height: 1.2;
}

.redpacket-cover em,
.redpacket-detail span {
  color: rgba(255, 255, 255, .76);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.redpacket-detail {
  align-items: center;
  text-align: center;
}

.redpacket-detail > strong {
  font-size: 34px;
  line-height: 1.05;
}

.redpacket-sender {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.redpacket-card {
  align-items: center;
  background: linear-gradient(135deg, #f25a3f, #d73528);
  border: 0;
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  text-align: left;
  width: min(250px, 100%);
}

.redpacket-icon {
  align-items: center;
  background: rgba(255, 255, 255, .16);
  border-radius: 10px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.redpacket-card span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.redpacket-card b {
  font-size: 15px;
  line-height: 1.25;
}

.redpacket-card em {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-style: normal;
}

.reaction-strip {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.bubble-line.mine .reaction-strip {
  align-self: flex-end;
}

.reaction-strip span {
  align-items: center;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 999px;
  box-shadow: 0 5px 12px rgba(15, 23, 42, .13);
  color: #111827;
  display: inline-flex;
  font-size: 17px;
  font-weight: 720;
  justify-content: center;
  line-height: 1;
  min-height: 30px;
  min-width: 30px;
  padding: 0 8px;
}

.reaction-strip.reaction-pulse span {
  animation: reactionPop .34s cubic-bezier(.2, 1.3, .3, 1);
}

@keyframes reactionPop {
  0% {
    opacity: .2;
    transform: translateY(5px) scale(.72);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.device-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-right: 12px;
}

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

.device-row .im-row {
  border-bottom: 0;
}

.device-current {
  background: #e8fbf1;
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 760;
  padding: 6px 10px;
  white-space: nowrap;
}

.vip-plan-list {
  display: grid;
  gap: 10px;
}

.vip-plan {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.vip-plan div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.vip-plan b {
  font-size: 16px;
}

.vip-plan span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: #eef7f2;
  border: 1px solid #d9f0e3;
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 13px;
  font-weight: 760;
  line-height: 30px;
  padding: 0 12px;
}

.media-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-tile {
  aspect-ratio: 1;
  background: #eef1f4;
  border: 0;
  border-radius: 8px;
  display: block;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.media-tile img,
.media-tile video {
  aspect-ratio: 1;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.video-tile span {
  align-items: center;
  background: rgba(17, 24, 39, .72);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
}

.message-video {
  border-radius: 10px;
  display: block;
  max-height: 320px;
  max-width: min(260px, 70vw);
  object-fit: cover;
}

.media-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #eef1f4;
  display: grid;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  min-height: 72px;
  padding: 10px 14px;
}

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

.media-row-icon {
  align-items: center;
  background: #f3f5f7;
  border-radius: 12px;
  color: #4b5563;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.media-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.media-row-main > em,
.media-row-copy em {
  color: #8b95a1;
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-row-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.media-row-copy b {
  color: #111827;
  font-size: 15px;
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-voice-mini {
  max-width: 260px;
  min-width: 210px;
  transform-origin: left center;
}

.media-file-mini {
  max-width: 100%;
}

.settings-form {
  gap: 0;
  padding: 0;
}

.settings-form > label:not(.pref-row):not(.pref-field) {
  color: #111827;
  display: block;
  font-size: 14px;
  font-weight: 760;
  padding: 14px 16px 6px;
}

.settings-form > .field {
  margin: 0 16px 12px;
  width: calc(100% - 32px);
}

.pref-row,
.pref-field {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 66px;
  padding: 12px 16px;
}

.pref-row span,
.pref-field span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pref-row b {
  color: #111827;
  font-size: 16px;
  line-height: 1.25;
}

.pref-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.pref-row input[type="checkbox"] {
  accent-color: var(--primary);
  height: 20px;
  width: 20px;
}

.pref-field .field {
  flex: 0 0 150px;
  min-height: 40px;
}

.desktop-rail,
.desktop-sidebar,
.desktop-pane {
  display: none;
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  body {
    align-items: stretch;
    background: #eef2f4;
    display: block;
    justify-content: normal;
  }

  .app-shell:not(.auth-shell) {
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: 68px minmax(320px, 360px) minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
    height: 100vh;
    max-width: none;
    min-height: 0;
    width: 100vw;
  }

  .app-shell:not(.auth-shell) .desktop-rail {
    align-items: center;
    background: #eff1f3;
    border-right: 1px solid #dde3e8;
    display: flex;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1 / 3;
    padding: 16px 8px;
    z-index: 3;
  }

  .desktop-avatar {
    align-items: center;
    background: #293142;
    border: 0;
    border-radius: 9px;
    color: #fff;
    display: inline-flex;
    font-size: 16px;
    font-weight: 820;
    height: 36px;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    width: 36px;
  }

  .desktop-avatar img {
    height: 100%;
    object-fit: cover;
    width: 100%;
  }

  .desktop-rail nav {
    display: grid;
    gap: 12px;
    margin-top: 34px;
  }

  .desktop-tab {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 12px;
    color: #5d6672;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    padding: 0;
    position: relative;
    width: 42px;
  }

  .desktop-tab.active {
    background: #dfe3e7;
    color: #101820;
  }

  .desktop-tab span {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .desktop-rail-bottom {
    align-items: center;
    display: grid;
    gap: 14px;
    margin-top: auto;
    place-items: center;
  }

  .desktop-latency {
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 760;
  }

  .app-shell:not(.auth-shell) .topbar {
    border-bottom: 1px solid var(--line);
    grid-column: 2;
    grid-row: 1;
    min-height: 64px;
    padding: 10px 16px;
  }

  .app-shell:not(.auth-shell) .topbar h1,
  .main-shell.tab-chat .topbar h1,
  .main-shell.tab-discover .topbar h1,
  .subpage-shell .topbar h1 {
    flex: 1;
    font-size: 18px;
    left: auto;
    line-height: 44px;
    position: static;
    right: auto;
    text-align: center;
  }

  .main-shell.tab-contacts .topbar h1 {
    font-size: 18px;
    text-align: center;
  }

  .main-shell.tab-me .topbar {
    display: flex;
  }

  .main-shell.tab-me .page-main {
    padding-top: 16px;
  }

  .main-shell.tab-me .page-main {
    display: block;
    overflow-y: auto;
    padding-bottom: 18px;
  }

  .main-shell.tab-me .settings-hero {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    display: grid;
    gap: 12px 14px;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    margin: 0 0 12px;
    min-height: 0;
    padding: 14px;
    text-align: left;
  }

  .main-shell.tab-me .settings-hero:after {
    display: none;
  }

  .main-shell.tab-me .settings-hero .profile-actions {
    display: flex;
    gap: 8px;
    grid-column: 3;
    grid-row: 1 / 3;
    margin: 0;
  }

  .main-shell.tab-me .settings-hero .round-action.light,
  .main-shell.tab-me .settings-hero .top-pill.light {
    background: #f2f4f6;
    color: #111827;
    height: 38px;
    min-width: 48px;
  }

  .main-shell.tab-me .settings-hero .top-pill.light {
    padding: 0 16px;
  }

  .main-shell.tab-me .settings-hero .avatar.profile {
    border: 0;
    border-radius: 14px;
    box-shadow: none;
    font-size: 24px;
    grid-column: 1;
    grid-row: 1 / 3;
    height: 56px;
    margin: 0;
    width: 56px;
  }

  .main-shell.tab-me .settings-name {
    color: var(--text);
    font-size: 18px;
    line-height: 1.2;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-shell.tab-me .settings-id {
    color: var(--muted);
    font-size: 12px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-shell.tab-me .settings-card {
    border: 1px solid var(--line);
    margin: 0 0 12px;
  }

  .main-shell.tab-me .settings-card .app-row {
    min-height: 58px;
    padding: 11px 14px;
  }

  .main-shell.tab-me .settings-version {
    margin: 14px 0 4px;
  }

  .app-shell:not(.auth-shell) .page {
    grid-column: 2;
    grid-row: 2;
    padding: 16px;
  }

  .app-shell:not(.auth-shell) .page-main {
    padding-bottom: 16px;
  }

  .app-shell:not(.auth-shell) .tabbar {
    display: none;
  }

  .app-shell:not(.auth-shell) .desktop-pane {
    align-items: center;
    background: #f6f7f9;
    border-left: 1px solid var(--line);
    display: flex;
    grid-column: 3;
    grid-row: 1 / 3;
    justify-content: center;
    min-width: 0;
    padding: 24px;
  }

  .desktop-empty {
    color: #8a929d;
    display: grid;
    gap: 12px;
    max-width: 440px;
    place-items: center;
    text-align: center;
  }

  .desktop-empty-icon {
    align-items: center;
    background: #e9fbf2;
    border-radius: 22px;
    color: var(--primary-dark);
    display: inline-flex;
    height: 86px;
    justify-content: center;
    width: 86px;
  }

  .desktop-empty-icon .ui-icon {
    height: 42px;
    width: 42px;
  }

  .desktop-empty h2 {
    color: #1f2937;
    font-size: 20px;
    line-height: 1.3;
    margin: 0;
  }

  .desktop-empty p {
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
  }

  .desktop-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
  }

  .desktop-empty-actions .primary,
  .desktop-empty-actions .secondary {
    min-height: 40px;
    min-width: 108px;
    padding: 0 18px;
  }

  .subpage-shell .desktop-sidebar {
    background: #fff;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    grid-column: 2;
    grid-row: 1 / 3;
    min-width: 0;
    overflow: hidden;
  }

  .desktop-side-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex: 0 0 64px;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 16px;
  }

  .desktop-side-head strong {
    color: #111827;
    font-size: 18px;
  }

  .desktop-side-head > div {
    display: flex;
    gap: 8px;
  }

  .desktop-side-body {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px;
  }

  .app-shell.subpage-shell:not(.auth-shell) .topbar {
    grid-column: 3;
    grid-row: 1;
  }

  .app-shell.subpage-shell:not(.auth-shell) .page-sub {
    background: #f6f7f9;
    grid-column: 3;
    grid-row: 2;
    padding: 24px;
  }

  .app-shell.subpage-shell:not(.auth-shell) .page-sub > .settings-stack,
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > .settings-detail,
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > .form,
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > #walletInfo,
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > #vipInfo,
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > #deviceList,
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > #blockedList,
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > #downloadInfo {
    margin: 0 auto;
    max-width: 760px;
    width: min(100%, 760px);
  }

  .app-shell.subpage-shell:not(.auth-shell) .page-sub > #walletInfo > .settings-detail,
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > #vipInfo > .settings-detail,
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > #deviceList > .settings-detail,
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > #blockedList > .settings-stack {
    margin: 0 auto;
    max-width: 760px;
  }

  .app-shell.subpage-shell:not(.auth-shell) .topbar {
    background: #fff;
  }

  .app-shell.subpage-shell:not(.auth-shell) .topbar .back {
    opacity: 0;
    pointer-events: none;
  }

  .app-shell.subpage-shell.message-detail-shell:not(.auth-shell) .topbar .back {
    opacity: 1;
    pointer-events: auto;
  }

  .app-shell.subpage-shell.message-detail-shell:not(.auth-shell) .topbar h1 {
    flex: 0 1 auto;
    left: auto;
    position: static;
    right: auto;
    text-align: left;
  }

  .app-shell.subpage-shell.message-detail-shell:not(.auth-shell) .page-sub > #messageDetail {
    margin: 0;
    max-width: none;
    width: 100%;
  }

  .subpage-shell .desktop-side-body .settings-card {
    margin-left: 0;
    margin-right: 0;
  }

  .app-shell.subpage-shell:not(.auth-shell) .im-chat {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    margin: -16px;
    padding: 16px;
  }

  .app-shell.subpage-shell:not(.auth-shell) .chat .messages {
    min-height: 0;
    overflow-y: auto;
  }

  .composer {
    border-radius: 18px;
    margin: 0;
  }

  .toast {
    bottom: 32px;
    left: calc(68px + 360px + (100vw - 68px - 360px) / 2);
  }
}

.pref-row input.switch-input[type="checkbox"] {
  appearance: none;
  background: #d1d5db;
  border: 2px solid #d1d5db;
  border-radius: 999px;
  flex: 0 0 auto;
  height: 32px;
  margin: 0;
  position: relative;
  width: 54px;
}

.pref-row input.switch-input[type="checkbox"]:before {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .22);
  content: "";
  height: 26px;
  left: 1px;
  position: absolute;
  top: 1px;
  transition: transform .18s ease;
  width: 26px;
}

.pref-row input.switch-input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.pref-row input.switch-input[type="checkbox"]:checked:before {
  transform: translateX(22px);
}

/* IM detail alignment: chat, group profile and channel profile. */
.topbar h1.has-chat-title {
  align-items: center;
  cursor: pointer;
  display: flex;
  overflow: visible;
}

.chat-title {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  display: grid;
  gap: 12px;
  grid-template-columns: 54px minmax(0, 1fr);
  min-width: 0;
  padding: 0;
  text-align: left;
  width: 100%;
}

.chat-title-avatar {
  border-radius: 15px;
  height: 54px;
  width: 54px;
}

.chat-title-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-title-copy strong {
  align-items: center;
  display: flex;
  font-size: 24px;
  font-weight: 850;
  gap: 6px;
  line-height: 1.1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-title-copy em {
  color: #657184;
  font-size: 16px;
  font-style: normal;
  font-weight: 520;
  line-height: 1.35;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-chat,
.channel-chat,
.im-chat {
  background-color: #dbe2e8;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .55) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, .38) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 68%, rgba(255, 255, 255, .32) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(255, 255, 255, .18) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255, 255, 255, .14) 25%, transparent 25%),
    linear-gradient(135deg, #d8e0e7 0%, #cfd8e1 100%);
  background-position: 0 0, 120px 20px, 48px 160px, 0 0, 26px 26px, 0 0;
  background-size: 180px 180px, 210px 210px, 240px 240px, 52px 52px, 52px 52px, auto;
}

.chat .messages {
  padding: 10px 8px 18px;
}

.pinned-card {
  align-items: stretch;
  background: rgba(255, 255, 255, .96);
  border: 0;
  border-radius: 22px;
  box-shadow: none;
  display: grid;
  gap: 12px;
  grid-template-columns: 5px minmax(0, 1fr) 34px;
  margin: 10px 12px 8px;
  min-height: 72px;
  padding: 14px 12px 14px 18px;
}

.pinned-card > i {
  background: #0f172a;
  border-radius: 999px;
  display: block;
  margin: 4px 0;
}

.pinned-card b {
  color: #111827;
  font-size: 18px;
  font-weight: 850;
  margin: 0 0 5px;
}

.pinned-card p {
  color: #596579;
  display: -webkit-box;
  font-size: 17px;
  line-height: 1.35;
  margin: 0;
  max-height: 48px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pinned-card button {
  align-self: center;
  color: #667085;
  font-size: 30px;
  height: 34px;
  line-height: 1;
  position: static;
  width: 34px;
}

.date-chip,
.system-chip {
  align-items: center;
  background: rgba(95, 105, 118, .52);
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 15px;
  justify-content: center;
  line-height: 1.2;
  margin: 18px auto;
  max-width: min(72%, 320px);
  min-height: 34px;
  padding: 7px 14px;
  text-align: center;
  width: max-content;
}

.system-chip {
  background: rgba(96, 108, 124, .58);
  font-size: 14px;
  min-height: 30px;
}

.bubble-line {
  align-items: flex-end;
  gap: 10px;
  margin: 12px 0 18px;
}

.bubble-line .avatar {
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 13px;
  height: 42px;
  width: 42px;
}

.bubble-stack {
  display: flex;
  flex-direction: column;
  max-width: min(76%, 560px);
  min-width: 0;
}

.bubble-line.mine .bubble-stack {
  align-items: flex-end;
}

.sender-line {
  align-items: center;
  color: var(--primary);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 820;
  gap: 6px;
  margin: 0 0 5px 8px;
}

.bubble {
  border-radius: 7px 18px 18px 18px;
  color: #050812;
  font-size: 18px;
  line-height: 1.55;
  max-width: none;
  padding: 12px 14px 8px;
}

.bubble-line.mine .bubble {
  background: #c9f6d7;
  border-radius: 18px 7px 18px 18px;
}

.bubble img {
  border-radius: 12px;
  max-width: min(240px, 62vw);
}

.image-error {
  align-items: center;
  color: #667085;
  display: inline-flex;
  font-size: 14px;
  gap: 8px;
  min-height: 42px;
  min-width: 132px;
}

.image-error .ui-icon {
  color: #98a2b3;
  height: 22px;
  width: 22px;
}

.bubble-time {
  color: #8a8f98;
  font-size: 13px;
  line-height: 1.2;
  margin-top: 6px;
  text-align: right;
}

.message-actions {
  display: none;
  gap: 6px;
  margin-top: 8px;
}

.bubble-line:hover .message-actions,
.bubble-line:focus-within .message-actions {
  display: flex;
  flex-wrap: wrap;
}

.todo-card {
  align-items: center;
  background: #f7fbff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: min(260px, 60vw);
  padding: 12px;
}

.todo-card b {
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
}

.todo-card p {
  color: #344054;
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 8px;
}

.todo-card em {
  color: #667085;
  font-size: 12px;
  font-style: normal;
}

.disabled-composer {
  background: rgba(255, 255, 255, .86);
  border-radius: 999px;
  color: #7a808a;
  font-size: 18px;
  margin: 10px 8px 2px;
  min-height: 58px;
}

.disabled-composer .ui-icon {
  color: #7a808a;
}

.chat-action-sheet {
  border-radius: 22px 22px 0 0;
  padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
}

.compact-sheet-item {
  gap: 22px;
  min-height: 76px;
}

.compact-sheet-item i {
  background: transparent;
  color: #111827;
  height: 38px;
  width: 38px;
}

.compact-sheet-item span {
  display: flex;
  justify-content: center;
}

.compact-sheet-item b {
  font-size: 24px;
  font-weight: 520;
}

.compact-sheet-item.danger-line i,
.compact-sheet-item.danger-line b {
  color: var(--red);
}

#groupInfo,
#channelInfo,
#fdInfo {
  margin: -14px -16px -22px;
  min-height: calc(100dvh - 96px);
  padding: 0 16px calc(env(safe-area-inset-bottom) + 24px);
}

#groupInfo,
#channelInfo {
  background: #f1f3f6;
}

.profile-hero {
  border-radius: 0;
  box-shadow: none;
  margin: 0 -16px 0;
  padding: 22px 16px 36px;
}

.profile-avatar {
  border: 0;
  border-radius: 32px;
  box-shadow: none;
  height: 104px;
  width: 104px;
}

.profile-hero h2 {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 31px;
  font-weight: 850;
  gap: 8px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1.18;
  margin: 24px 0 8px;
  max-width: 100%;
  text-align: center;
}

.profile-hero p {
  color: #7b8492;
  font-size: 20px;
  line-height: 1.25;
}

.profile-actions {
  gap: clamp(28px, 13vw, 64px);
  justify-content: center;
  margin-top: 28px;
}

.profile-actions button {
  min-width: 82px;
}

.profile-actions span {
  background: #eceff3;
  border-radius: 20px;
  height: 64px;
  width: 64px;
}

.profile-actions span .ui-icon {
  height: 34px;
  width: 34px;
}

.profile-actions em {
  color: #111827;
  font-size: 18px;
  font-weight: 820;
}

.profile-card,
.profile-list,
.members-card {
  border-radius: 14px;
  box-shadow: none;
  margin: 16px 0 0;
}

.profile-card {
  padding: 0;
}

.profile-card div {
  padding: 18px 18px 16px;
}

.profile-card b {
  color: #111827;
  font-size: 21px;
  font-weight: 520;
  line-height: 1.45;
}

.profile-card em {
  color: #98a2b3;
  font-size: 17px;
}

.profile-list .app-row {
  min-height: 76px;
  padding: 12px 18px;
}

.profile-list .app-entry-icon {
  background: #f8fafc;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(17, 32, 52, .05);
  color: #111827;
  height: 48px;
  width: 48px;
}

.profile-list .app-entry-icon .entry-svg {
  display: block;
}

.profile-list .app-entry-icon b {
  display: none;
}

.profile-list .row-title {
  font-size: 22px;
  font-weight: 560;
}

.profile-list .row-desc {
  color: #98a2b3;
  font-size: 16px;
}

.profile-danger-list .app-row .row-title,
.profile-danger-list .danger-line,
.profile-danger-list .app-entry-icon.red {
  color: var(--red);
}

.members-card {
  padding: 0;
}

.members-head {
  color: #798292;
  font-size: 18px;
  margin: 0;
  min-height: 60px;
  padding: 0 18px;
}

.members-head span {
  font-weight: 520;
}

.members-head em {
  color: #667085;
  font-size: 18px;
}

.members-head button {
  align-items: center;
  color: #111827;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.member-mini {
  min-height: 74px;
  padding: 10px 18px;
}

.member-mini .avatar {
  border-radius: 13px;
  height: 54px;
  width: 54px;
}

.member-mini .row-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: normal;
}

.member-mini .row-desc {
  margin-top: 3px;
}

.profile-primary-action {
  margin-top: 16px;
}

.profile-primary-action .primary {
  min-height: 52px;
}

.top-more-sheet {
  padding: 12px 18px calc(22px + env(safe-area-inset-bottom));
}

.top-more-sheet .compact-sheet-item {
  border-bottom: 1px solid #edf0f2;
  gap: 14px;
  min-height: 66px;
  padding: 8px 0;
}

.top-more-sheet .compact-sheet-item:last-child {
  border-bottom: 0;
}

.top-more-sheet .compact-sheet-item b {
  font-size: 17px;
  font-weight: 680;
}

.top-more-sheet .compact-sheet-item span {
  display: grid;
  gap: 3px;
  justify-content: stretch;
  min-width: 0;
}

.top-more-sheet .compact-sheet-item em {
  color: #8b929c;
  display: block;
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-profile-drawer {
  background: #f1f3f6;
  bottom: 0;
  box-shadow: -24px 0 46px rgba(15, 23, 42, .18);
  display: grid;
  grid-template-rows: 74px minmax(0, 1fr);
  max-width: 430px;
  position: absolute;
  right: 0;
  top: 0;
  width: min(100%, 430px);
  z-index: 22;
}

.profile-drawer-mask {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 21;
}

.drawer-topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e7ecef;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  padding: 10px 12px;
}

.drawer-topbar strong {
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.group-profile-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px calc(22px + env(safe-area-inset-bottom));
}

.group-profile-scroll .group-profile-content {
  margin: 0 -16px;
}

.member-menu-mask {
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,.16) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 31%, rgba(255,255,255,.14) 0 1px, transparent 2px),
    linear-gradient(135deg, rgba(17, 24, 39, .68), rgba(17, 24, 39, .58));
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  inset: 0;
  position: absolute;
  z-index: 30;
}

.member-menu-mask:before {
  background:
    linear-gradient(135deg, transparent 47%, rgba(255,255,255,.08) 48% 52%, transparent 53%) 0 0 / 112px 112px,
    radial-gradient(circle at 50% 50%, transparent 0 32px, rgba(255,255,255,.07) 33px 34px, transparent 35px) 18px 10px / 146px 146px;
  content: "";
  inset: 0;
  opacity: .8;
  position: absolute;
}

.member-action-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  inset: 0;
  justify-content: flex-end;
  padding: 0 16px calc(12px + env(safe-area-inset-bottom));
  position: absolute;
  z-index: 31;
}

.member-action-list,
.member-action-cancel {
  margin: 0 auto;
  max-width: 1120px;
  width: 100%;
}

.member-action-list {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 22px 64px rgba(15, 23, 42, .22);
  max-height: calc(100dvh - 104px - env(safe-area-inset-bottom));
  overflow: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.member-action-title,
.member-action-row,
.member-action-cancel {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf0f2;
  color: #20242a;
  display: flex;
  font-size: 21px;
  font-weight: 520;
  justify-content: center;
  min-height: 68px;
  text-align: center;
  width: 100%;
}

.member-action-title {
  color: #9aa3af;
  font-size: 16px;
  font-weight: 760;
  min-height: 54px;
}

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

.member-action-row.danger-line {
  color: #ff453a;
}

.member-action-cancel {
  border-bottom: 0;
  border-radius: 18px;
  box-shadow: 0 18px 52px rgba(15, 23, 42, .18);
  color: #111827;
  font-weight: 820;
}

.member-mini {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf0f2;
  color: #111827;
  display: flex;
  gap: 14px;
  min-height: 74px;
  padding: 10px 18px;
  text-align: left;
  width: 100%;
}

.member-mini:last-child {
  border-bottom: 0;
}

.group-member-list {
  overflow: hidden;
}

.group-member-list > .empty {
  padding: 24px 16px;
}

.member-add-icon {
  align-items: center;
  background: #f7f8fa;
  border-radius: 14px;
  color: #101827;
  display: inline-flex;
  flex: 0 0 44px;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.member-candidate-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #edf0f2;
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 10px 14px;
}

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

.profile-danger-list .app-entry-icon.red .entry-svg {
  display: block;
}

.device-page {
  background: #f1f3f6;
  margin: -14px -16px -22px;
  min-height: calc(100dvh - 96px);
  padding: 18px 16px calc(28px + env(safe-area-inset-bottom));
}

.device-section-title {
  align-items: center;
  color: #7b8492;
  display: flex;
  font-size: 14px;
  font-weight: 760;
  justify-content: space-between;
  margin: 18px 4px 8px;
}

.device-section-title:first-child {
  margin-top: 0;
}

.device-section-title em {
  background: #e8edf2;
  border-radius: 999px;
  color: #697386;
  font-style: normal;
  min-width: 28px;
  padding: 3px 8px;
  text-align: center;
}

.device-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.device-list-row {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf0f2;
  color: #111827;
  display: grid;
  gap: 14px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  min-height: 74px;
  padding: 12px 16px;
  text-align: left;
  width: 100%;
}

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

.device-list-row > span:not(.device-row-icon) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.device-list-row b {
  color: #111827;
  font-size: 17px;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-list-row em {
  color: #98a2b3;
  font-size: 13px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-list-row strong {
  background: rgba(8, 191, 98, .12);
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 820;
  padding: 6px 12px;
}

.device-row-icon {
  align-items: center;
  background: #f3f6f8;
  border-radius: 13px;
  color: #111827;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.device-row-icon.secure {
  background: #eaf8f1;
  color: var(--primary-dark);
}

.device-note {
  color: #98a2b3;
  font-size: 12px;
  line-height: 1.55;
  margin: 8px 4px 0;
}

.device-empty-panel {
  align-items: center;
  color: #98a2b3;
  display: grid;
  justify-items: center;
  min-height: 156px;
  padding: 24px 18px;
  text-align: center;
}

.device-empty-panel .ui-icon {
  background: #f3f6f8;
  border-radius: 18px;
  color: #b0b8c3;
  height: 62px;
  margin-bottom: 12px;
  padding: 16px;
  width: 62px;
}

.device-empty-panel b {
  color: #4b5563;
  font-size: 16px;
  margin-bottom: 6px;
}

.device-empty-panel p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.device-logout-card {
  background: #fff;
  border: 0;
  border-radius: 14px;
  color: #ff453a;
  display: grid;
  font-size: 17px;
  font-weight: 780;
  gap: 6px;
  margin-top: 18px;
  min-height: 72px;
  padding: 14px 16px;
  text-align: center;
  width: 100%;
}

.device-logout-card span {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 500;
}

.qr-showcase {
  align-items: center;
  background: #35a476;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: -14px -16px -22px;
  min-height: calc(100dvh - 96px);
  overflow: hidden;
  padding: 58px 18px calc(24px + env(safe-area-inset-bottom));
  position: relative;
}

.qr-pattern {
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.16) 0 3px, transparent 4px),
    radial-gradient(circle at 75% 28%, rgba(255,255,255,.14) 0 2px, transparent 3px),
    linear-gradient(135deg, transparent 46%, rgba(255,255,255,.1) 47% 52%, transparent 53%) 0 0 / 96px 96px,
    radial-gradient(circle at 50% 50%, transparent 0 30px, rgba(255,255,255,.12) 31px 32px, transparent 33px) 24px 16px / 140px 140px;
  inset: 0;
  opacity: .74;
  position: absolute;
}

.qr-hero-card {
  align-items: center;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 66px rgba(15, 23, 42, .18);
  display: flex;
  flex-direction: column;
  margin-top: 22px;
  max-width: 330px;
  padding: 54px 24px 22px;
  position: relative;
  width: min(100%, 330px);
  z-index: 1;
}

.qr-avatar-ring {
  align-items: center;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
  display: inline-flex;
  height: 88px;
  justify-content: center;
  left: 50%;
  padding: 6px;
  position: absolute;
  top: -44px;
  transform: translateX(-50%);
  width: 88px;
}

.qr-avatar {
  border-radius: 20px;
  height: 76px;
  width: 76px;
}

.qr-kicker {
  color: #7b8492;
  font-size: 13px;
  margin-bottom: 4px;
}

.qr-hero-card h2 {
  color: #111827;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.2;
  margin: 0 0 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.qr-account {
  color: #98a2b3;
  font-size: 14px;
  margin-bottom: 16px;
}

.qr-img {
  border-radius: 12px;
  height: 236px;
  image-rendering: crisp-edges;
  object-fit: contain;
  width: 236px;
}

.qr-code-label {
  color: #111827;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: 0;
  margin-top: 10px;
  overflow-wrap: anywhere;
}

.qr-hero-card p {
  align-items: center;
  color: #7b8492;
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
  margin: 10px 0 0;
}

.qr-hero-card p .ui-icon {
  color: var(--primary-dark);
  height: 18px;
  width: 18px;
}

.qr-theme-panel {
  background: rgba(255, 255, 255, .96);
  border-radius: 18px;
  max-width: 360px;
  padding: 14px;
  position: relative;
  width: min(100%, 360px);
  z-index: 1;
}

.qr-section-title {
  color: #111827;
  font-size: 15px;
  font-weight: 820;
  margin-bottom: 10px;
}

.qr-theme-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.qr-theme-choice {
  align-items: center;
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 14px;
  color: #fff;
  display: grid;
  justify-items: center;
  padding: 8px;
}

.qr-theme-choice span {
  font-size: 20px;
  line-height: 1;
}

.qr-theme-choice .ui-icon {
  height: 18px;
  opacity: .85;
  width: 18px;
}

.qr-theme-choice.active {
  border-color: #111827;
}

.qr-theme-home {
  background: linear-gradient(135deg, #2f9f72, #8ccf55);
}

.qr-theme-sun {
  background: linear-gradient(135deg, #51b75a, #ffd166);
}

.qr-theme-snow {
  background: linear-gradient(135deg, #4da3f7, #dff4ff);
}

.qr-theme-gem {
  background: linear-gradient(135deg, #a76cf5, #39d3bd);
}

.qr-theme-wave {
  background: linear-gradient(135deg, #23a7c8, #08bf62);
}

.qr-showcase.qr-theme-sun {
  background: #62b85f;
}

.qr-showcase.qr-theme-snow {
  background: #4da3f7;
}

.qr-showcase.qr-theme-gem {
  background: #8b65dc;
}

.qr-showcase.qr-theme-wave {
  background: #28a6c8;
}

.qr-share-button {
  background: rgba(255, 255, 255, .96);
  border: 0;
  border-radius: 999px;
  color: #111827;
  font-size: 17px;
  font-weight: 820;
  min-height: 52px;
  max-width: 360px;
  position: relative;
  width: min(100%, 360px);
  z-index: 1;
}

.visually-hidden {
  height: 1px !important;
  left: -9999px !important;
  overflow: hidden !important;
  position: absolute !important;
  top: auto !important;
  width: 1px !important;
}

.moments-cover {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .04), rgba(0, 0, 0, .18)),
    linear-gradient(135deg, #08bf62 0%, #2fd881 52%, #f8d45a 100%);
  height: 246px;
  margin: -14px -16px 0;
  overflow: hidden;
  position: relative;
}

.moments-cover-pattern {
  background:
    radial-gradient(circle at 16% 22%, rgba(255,255,255,.22) 0 2px, transparent 3px),
    linear-gradient(135deg, transparent 46%, rgba(255,255,255,.12) 47% 52%, transparent 53%) 0 0 / 104px 104px;
  inset: 0;
  opacity: .6;
  position: absolute;
}

.moments-cover-profile {
  align-items: center;
  bottom: -36px;
  display: flex;
  gap: 12px;
  position: absolute;
  right: 18px;
  z-index: 1;
}

.moments-cover-profile strong {
  color: #fff;
  font-size: 20px;
  font-weight: 850;
  text-shadow: 0 2px 12px rgba(15, 23, 42, .22);
}

.moments-me {
  border: 4px solid #fff;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .2);
  height: 76px;
  width: 76px;
}

.moments-camera {
  align-items: center;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 44px;
  z-index: 1;
}

.moments-feed {
  background: #fff;
  margin: 0 -16px;
  padding: 48px 16px 0;
}

.moment-item {
  background: #fff;
  border-bottom: 1px solid #e9edf2;
  display: grid;
  gap: 12px;
  grid-template-columns: 46px minmax(0, 1fr);
  padding: 16px 0;
}

.moment-avatar .avatar {
  border-radius: 8px;
  height: 46px;
  width: 46px;
}

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

.moment-author {
  color: #38649a;
  font-size: 16px;
  font-weight: 820;
  line-height: 1.25;
  margin-bottom: 6px;
}

.moment-text {
  color: #111827;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.moment-images {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 10px;
  max-width: 238px;
}

.moment-images.single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 210px;
}

.moment-images.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 210px;
}

.moment-photo {
  aspect-ratio: 1;
  background: #eef2f5;
  border: 0;
  overflow: hidden;
  padding: 0;
}

.moment-images.single .moment-photo {
  aspect-ratio: 4 / 3;
}

.moment-photo img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.moment-meta {
  align-items: center;
  color: #98a2b3;
  display: flex;
  font-size: 13px;
  gap: 10px;
  min-height: 28px;
  position: relative;
}

.moment-delete {
  background: transparent;
  border: 0;
  color: #38649a;
  font-size: 13px;
  padding: 0;
}

.moment-more {
  align-items: center;
  background: #eef1f4;
  border: 0;
  border-radius: 4px;
  color: #4b5563;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  margin-left: auto;
  width: 34px;
}

.moment-more .ui-icon {
  height: 18px;
  width: 18px;
}

.moment-action-menu {
  background: #4b5563;
  border-radius: 4px;
  display: grid;
  grid-template-columns: repeat(2, 74px);
  overflow: hidden;
  position: absolute;
  right: 42px;
  top: -4px;
  z-index: 3;
}

.moment-action-menu[hidden] {
  display: none;
}

.moment-action-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #fff;
  display: inline-flex;
  font-size: 14px;
  gap: 6px;
  height: 36px;
  justify-content: center;
}

.moment-action-menu button + button {
  border-left: 1px solid rgba(255,255,255,.16);
}

.moment-action-menu .ui-icon {
  height: 17px;
  width: 17px;
}

.moment-social {
  background: #f4f5f7;
  border-radius: 4px;
  color: #485464;
  display: grid;
  font-size: 14px;
  gap: 0;
  margin-top: 8px;
  position: relative;
}

.moment-social:before {
  border-bottom: 7px solid #f4f5f7;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  content: "";
  left: 14px;
  position: absolute;
  top: -7px;
}

.moment-likes,
.moment-comment {
  padding: 7px 9px;
}

.moment-likes {
  align-items: center;
  color: #38649a;
  display: flex;
  gap: 5px;
}

.moment-likes .ui-icon {
  height: 16px;
  width: 16px;
}

.moment-comments {
  border-top: 1px solid #e3e7ec;
}

.moment-comment {
  display: flex;
  gap: 5px;
  line-height: 1.42;
}

.moment-comment b {
  color: #38649a;
  flex: 0 0 auto;
  font-weight: 780;
}

.moment-comment-form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 72px;
  margin-top: 8px;
}

.moment-comment-form .field {
  min-height: 40px;
}

.moment-compose-sheet {
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
}

.moment-compose-sheet .moment-publisher {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.moment-image-preview {
  align-items: center;
  background: #f4f7f6;
  border-radius: 10px;
  color: #697386;
  display: flex;
  font-size: 13px;
  gap: 10px;
  padding: 8px;
}

.moment-image-preview img {
  border-radius: 8px;
  height: 54px;
  object-fit: cover;
  width: 54px;
}

.moments-load-more {
  margin: 14px auto calc(18px + env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > #groupInfo,
  .app-shell.subpage-shell:not(.auth-shell) .page-sub > #channelInfo {
    max-width: 760px;
    width: min(100%, 760px);
  }

  .app-shell.subpage-shell:not(.auth-shell) .topbar h1.has-chat-title {
    justify-content: flex-start;
  }

  .app-shell.subpage-shell:not(.auth-shell) .im-chat {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .member-action-modal {
    left: 68px;
    padding: 0 clamp(28px, 5vw, 96px) 26px;
    right: 0;
  }

  .member-action-modal.from-drawer {
    right: min(430px, 34vw);
  }

  .qr-showcase,
  .moments-cover,
  .moments-feed,
  .device-page {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 380px) {
  .chat-title {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .chat-title-avatar {
    height: 46px;
    width: 46px;
  }

  .chat-title-copy strong {
    font-size: 20px;
  }

  .chat-title-copy em {
    font-size: 14px;
  }

  .profile-hero h2 {
    font-size: 26px;
  }

  .profile-actions {
    gap: 18px;
  }
}

/* Message operation menu: no hover expansion inside bubbles. */
.message-actions,
.bubble-line:hover .message-actions,
.bubble-line:focus-within .message-actions {
  display: none !important;
}

.bubble-line .bubble {
  cursor: default;
}

.message-menu-mask,
.conversation-menu-mask {
  inset: 0;
  position: absolute;
  z-index: 20;
}

.message-menu-mask {
  background: rgba(73, 80, 90, .36);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.conversation-menu-mask {
  background: transparent;
}

.message-context-menu {
  background: transparent;
  display: grid;
  gap: 7px;
  position: absolute;
  width: min(260px, calc(100vw - 24px));
  z-index: 21;
}

.message-reaction-bar {
  align-items: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .2);
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 42px;
  overflow: hidden;
  padding: 4px 6px;
}

.message-reaction-bar.expanded {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.message-reaction-bar button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  font-size: 22px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.message-reaction-bar button:hover,
.message-menu-item:hover {
  background: #f1f2f4;
}

.message-reaction-bar .more-reaction {
  background: #f4f5f6;
  color: #6b7280;
  font-size: 24px;
  font-weight: 420;
}

.message-menu-list {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
  max-height: calc(100dvh - 112px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.conversation-context-menu {
  width: min(224px, calc(100vw - 24px));
}

.message-menu-item {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf0f2;
  color: #20242a;
  display: grid;
  font-size: 15px;
  gap: 12px;
  grid-template-columns: 22px minmax(0, 1fr);
  min-height: 44px;
  padding: 0 14px;
  text-align: left;
  width: 100%;
}

.conversation-menu-item {
  min-height: 42px;
}

.message-menu-divider {
  background: #edf0f2;
  height: 1px;
  margin: 4px 0;
}

.message-menu-item:last-child {
  border-bottom: 0;
}

.message-menu-item .ui-icon {
  color: #20242a;
  height: 20px;
  stroke-width: 2.4;
  width: 20px;
}

.message-menu-item.danger-line,
.message-menu-item.danger-line .ui-icon {
  color: #dc2626;
}

.message-action-sheet {
  display: grid;
  gap: 8px;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  max-height: min(620px, calc(72dvh - env(safe-area-inset-bottom)));
  overflow: hidden;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
}

.message-action-sheet .message-reaction-bar,
.message-action-sheet .message-menu-list {
  box-shadow: none;
}

.message-action-sheet .message-menu-list {
  max-height: none;
}

.message-action-sheet .message-menu-item {
  font-size: 16px;
  min-height: 46px;
}

.message-sheet-cancel {
  background: #f5f6f7;
  border: 0;
  border-radius: 10px;
  color: #111827;
  font-size: 16px;
  font-weight: 780;
  min-height: 44px;
  width: 100%;
}

.reply-preview {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #dce3e8;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 34px;
  margin: 0 -8px;
  min-height: 52px;
  padding: 8px 12px;
}

.reply-preview span {
  border-left: 3px solid var(--primary);
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-left: 10px;
}

.reply-preview b {
  color: var(--primary-dark);
  font-size: 13px;
}

.reply-preview em {
  color: #596579;
  font-size: 14px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-preview button {
  background: #edf0f3;
  border: 0;
  border-radius: 50%;
  color: #687282;
  font-size: 22px;
  height: 34px;
  line-height: 1;
  width: 34px;
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .message-menu-mask {
    background: rgba(73, 80, 90, .38);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .message-action-sheet {
    display: none;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: #0f141b;
}

html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .desktop-sidebar,
html[data-theme="dark"] .desktop-pane,
html[data-theme="dark"] .page {
  background: #111821;
}

html[data-theme="dark"] .desktop-rail {
  background: #0b1017;
  border-color: #1f2937;
}

html[data-theme="dark"] .desktop-tab {
  color: #a6afbd;
}

html[data-theme="dark"] .desktop-tab.active,
html[data-theme="dark"] .desktop-avatar {
  background: #243041;
  color: #f8fafc;
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .desktop-side-head {
  background: #151d28;
  border-color: #253244;
  color: #f8fafc;
}

html[data-theme="dark"] .settings-hero {
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, .12) 0 9px, transparent 10px),
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, .08) 0 16px, transparent 17px),
    linear-gradient(145deg, #12261d 0%, #123143 52%, #182a48 100%);
}

html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .list-panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .im-row,
html[data-theme="dark"] .app-row,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .members-card,
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .sub-search,
html[data-theme="dark"] .setting-card,
html[data-theme="dark"] .setting-row,
html[data-theme="dark"] .pref-row,
html[data-theme="dark"] .pref-field,
html[data-theme="dark"] .pref-range,
html[data-theme="dark"] .storage-card,
html[data-theme="dark"] .support-card,
html[data-theme="dark"] .faq-group,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .emoji-strip,
html[data-theme="dark"] .sticker-pack,
  html[data-theme="dark"] .account-modal,
  html[data-theme="dark"] .action-sheet,
  html[data-theme="dark"] .conversation-context-menu,
  html[data-theme="dark"] .conversation-menu-list,
  html[data-theme="dark"] .message-menu-list,
  html[data-theme="dark"] .message-reaction-bar {
  background: #182231;
  border-color: #283548;
  color: #f8fafc;
}

html[data-theme="dark"] .row-title,
html[data-theme="dark"] .app-row .row-title,
html[data-theme="dark"] .setting-row b,
html[data-theme="dark"] .pref-row b,
html[data-theme="dark"] .pref-field b,
html[data-theme="dark"] .pref-range b,
html[data-theme="dark"] .storage-total span,
html[data-theme="dark"] .about-links button,
html[data-theme="dark"] .about-actions button,
html[data-theme="dark"] .message-menu-item,
html[data-theme="dark"] .message-menu-item .ui-icon {
  color: #f8fafc;
}

html[data-theme="dark"] .row-desc,
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .sub-search,
html[data-theme="dark"] .settings-id,
html[data-theme="dark"] .chat-title-copy em,
html[data-theme="dark"] .profile-about-card em,
html[data-theme="dark"] .message-sheet-cancel,
html[data-theme="dark"] .reply-preview em {
  color: #aab4c2;
}

html[data-theme="dark"] .field,
html[data-theme="dark"] .select-field,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input {
  background: #101827;
  border-color: #2b394d;
  color: #f8fafc;
}

html[data-theme="dark"] .field::placeholder,
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #738094;
}

html[data-theme="dark"] .group-chat,
html[data-theme="dark"] .channel-chat,
html[data-theme="dark"] .im-chat {
  background-color: #141c26;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .08) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, .06) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 68%, rgba(255, 255, 255, .05) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(255, 255, 255, .04) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255, 255, 255, .035) 25%, transparent 25%),
    linear-gradient(135deg, #141c26 0%, #101720 100%);
}

html[data-theme="dark"] .bubble {
  background: #253244;
  color: #f8fafc;
}

html[data-theme="dark"] .bubble-line.mine .bubble,
html[data-theme="dark"] .mine .bubble {
  background: #166f45;
  color: #f8fafc;
}

html[data-theme="dark"] .bubble-time,
html[data-theme="dark"] .image-error {
  color: #a8b2c0;
}

html[data-theme="dark"] .composer,
html[data-theme="dark"] .reply-preview {
  background: #151d28;
  border-color: #263447;
}

html[data-theme="dark"] .composer .field,
html[data-theme="dark"] .composer-tool,
html[data-theme="dark"] .message-sheet-cancel,
html[data-theme="dark"] .reply-preview button,
html[data-theme="dark"] .message-reaction-bar .more-reaction {
  background: #232e3d;
  color: #f8fafc;
}

html[data-theme="dark"] .sheet-choice,
html[data-theme="dark"] .sheet-item,
html[data-theme="dark"] .message-menu-item {
  background: #182231;
  border-color: #283548;
}

html[data-theme="dark"] .message-reaction-bar button:hover,
html[data-theme="dark"] .message-menu-item:hover {
  background: #243041;
}

html[data-theme="dark"] .sheet-mask {
  background: rgba(0, 0, 0, .62);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    color-scheme: dark;
  }

  html[data-theme="system"] body {
    background: #0f141b;
  }

  html[data-theme="system"] .app-shell,
  html[data-theme="system"] .desktop-sidebar,
  html[data-theme="system"] .desktop-pane,
  html[data-theme="system"] .page {
    background: #111821;
  }

  html[data-theme="system"] .topbar,
  html[data-theme="system"] .desktop-side-head {
    background: #151d28;
    border-color: #253244;
    color: #f8fafc;
  }

  html[data-theme="system"] .group-chat,
  html[data-theme="system"] .channel-chat,
  html[data-theme="system"] .im-chat {
    background-color: #141c26;
    background-image:
      radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .08) 0 2px, transparent 3px),
      radial-gradient(circle at 78% 24%, rgba(255, 255, 255, .06) 0 1px, transparent 2px),
      radial-gradient(circle at 38% 68%, rgba(255, 255, 255, .05) 0 2px, transparent 3px),
      linear-gradient(135deg, rgba(255, 255, 255, .04) 25%, transparent 25%),
      linear-gradient(45deg, rgba(255, 255, 255, .035) 25%, transparent 25%),
      linear-gradient(135deg, #141c26 0%, #101720 100%);
  }

  html[data-theme="system"] .bubble {
    background: #253244;
    color: #f8fafc;
  }

  html[data-theme="system"] .bubble-line.mine .bubble,
  html[data-theme="system"] .mine .bubble {
    background: #166f45;
    color: #f8fafc;
  }
}

/* Production dark theme: neutral IM layers with NowChat green accents. */
html[data-effective-theme="dark"],
html[data-theme="dark"] {
  --bg: #111315;
  --card: #1b1d21;
  --text: #eef1f4;
  --muted: #969da7;
  --soft: rgba(8, 191, 98, .13);
  --line: #2a2d33;
  --line-strong: #363b43;
  --primary-dark: #2fd881;
  --shadow: none;
  color-scheme: dark;
}

html[data-effective-theme="dark"] body,
html[data-theme="dark"] body {
  background: #0d0f12;
  color: var(--text);
}

html[data-effective-theme="dark"] .app-shell,
html[data-effective-theme="dark"] .page,
html[data-effective-theme="dark"] .page-main,
html[data-effective-theme="dark"] .page-sub,
html[data-effective-theme="dark"] .boot,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .page,
html[data-theme="dark"] .page-main,
html[data-theme="dark"] .page-sub,
html[data-theme="dark"] .boot {
  background: var(--bg);
  color: var(--text);
}

html[data-effective-theme="dark"] .boot-mark,
html[data-theme="dark"] .boot-mark {
  background: #1b1d21;
  border-color: #2a2f36;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .36);
}

html[data-effective-theme="dark"] .boot-mark:before,
html[data-theme="dark"] .boot-mark:before {
  border-color: rgba(8, 191, 98, .32);
}

html[data-effective-theme="dark"] .topbar,
html[data-effective-theme="dark"] .desktop-side-head,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .desktop-side-head {
  background: #16191d;
  border-color: var(--line);
  color: var(--text);
}

html[data-effective-theme="dark"] .topbar h1,
html[data-effective-theme="dark"] .icon-btn,
html[data-effective-theme="dark"] .chat-title,
html[data-effective-theme="dark"] .chat-title-copy strong,
html[data-theme="dark"] .topbar h1,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .chat-title,
html[data-theme="dark"] .chat-title-copy strong {
  color: var(--text);
}

html[data-effective-theme="dark"] .round-action,
html[data-effective-theme="dark"] .top-pill,
html[data-theme="dark"] .round-action,
html[data-theme="dark"] .top-pill {
  background: #22262c;
  color: var(--text);
}

html[data-effective-theme="dark"] .settings-hero,
html[data-theme="dark"] .settings-hero {
  background:
    linear-gradient(180deg, rgba(8, 191, 98, .16) 0%, rgba(8, 191, 98, 0) 68%),
    #171a1f;
  border-bottom: 1px solid #252a30;
  box-shadow: none;
}

html[data-effective-theme="dark"] .settings-hero:after,
html[data-theme="dark"] .settings-hero:after {
  display: none;
}

html[data-effective-theme="dark"] .round-action.light,
html[data-effective-theme="dark"] .top-pill.light,
html[data-theme="dark"] .round-action.light,
html[data-theme="dark"] .top-pill.light {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
}

html[data-effective-theme="dark"] .settings-id,
html[data-theme="dark"] .settings-id {
  color: rgba(238, 241, 244, .68);
}

html[data-effective-theme="dark"] .settings-card,
html[data-effective-theme="dark"] .setting-card,
html[data-effective-theme="dark"] .storage-card,
html[data-effective-theme="dark"] .support-card,
html[data-effective-theme="dark"] .faq-group,
html[data-effective-theme="dark"] .discover-list,
html[data-effective-theme="dark"] .list-panel,
html[data-effective-theme="dark"] .card,
html[data-effective-theme="dark"] .profile-card,
html[data-effective-theme="dark"] .members-card,
html[data-effective-theme="dark"] .emoji-strip,
html[data-effective-theme="dark"] .sticker-pack,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .setting-card,
html[data-theme="dark"] .storage-card,
html[data-theme="dark"] .support-card,
html[data-theme="dark"] .faq-group,
html[data-theme="dark"] .discover-list,
html[data-theme="dark"] .list-panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .members-card,
html[data-theme="dark"] .emoji-strip,
html[data-theme="dark"] .sticker-pack {
  background: var(--card);
  border-color: #262a30;
  box-shadow: none;
  color: var(--text);
}

html[data-effective-theme="dark"] .settings-card,
html[data-theme="dark"] .settings-card {
  border: 1px solid #252930;
}

html[data-effective-theme="dark"] .app-row,
html[data-effective-theme="dark"] .setting-row,
html[data-effective-theme="dark"] .pref-row,
html[data-effective-theme="dark"] .pref-field,
html[data-effective-theme="dark"] .pref-range,
html[data-effective-theme="dark"] .faq-item,
html[data-theme="dark"] .app-row,
html[data-theme="dark"] .setting-row,
html[data-theme="dark"] .pref-row,
html[data-theme="dark"] .pref-field,
html[data-theme="dark"] .pref-range,
html[data-theme="dark"] .faq-item {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

html[data-effective-theme="dark"] .row-title,
html[data-effective-theme="dark"] .app-row .row-title,
html[data-effective-theme="dark"] .setting-row b,
html[data-effective-theme="dark"] .pref-row b,
html[data-effective-theme="dark"] .pref-field b,
html[data-effective-theme="dark"] .pref-range b,
html[data-effective-theme="dark"] .storage-total span,
html[data-effective-theme="dark"] .sticker-pack b,
html[data-effective-theme="dark"] .faq-item span,
html[data-theme="dark"] .row-title,
html[data-theme="dark"] .app-row .row-title,
html[data-theme="dark"] .setting-row b,
html[data-theme="dark"] .pref-row b,
html[data-theme="dark"] .pref-field b,
html[data-theme="dark"] .pref-range b,
html[data-theme="dark"] .storage-total span,
html[data-theme="dark"] .sticker-pack b,
html[data-theme="dark"] .faq-item span {
  color: var(--text);
}

html[data-effective-theme="dark"] .row-desc,
html[data-effective-theme="dark"] .setting-row em,
html[data-effective-theme="dark"] .setting-row strong,
html[data-effective-theme="dark"] .pref-row em,
html[data-effective-theme="dark"] .pref-field em,
html[data-effective-theme="dark"] .settings-version,
html[data-effective-theme="dark"] .setting-note-text,
html[data-effective-theme="dark"] .sticker-pack small,
html[data-effective-theme="dark"] .faq-item p,
html[data-effective-theme="dark"] .chat-title-copy em,
html[data-theme="dark"] .row-desc,
html[data-theme="dark"] .setting-row em,
html[data-theme="dark"] .setting-row strong,
html[data-theme="dark"] .pref-row em,
html[data-theme="dark"] .pref-field em,
html[data-theme="dark"] .settings-version,
html[data-theme="dark"] .setting-note-text,
html[data-theme="dark"] .sticker-pack small,
html[data-theme="dark"] .faq-item p,
html[data-theme="dark"] .chat-title-copy em {
  color: var(--muted);
}

html[data-effective-theme="dark"] .arrow-icon,
html[data-theme="dark"] .arrow-icon {
  color: #656d78;
}

html[data-effective-theme="dark"] .app-entry-icon,
html[data-theme="dark"] .app-entry-icon {
  background: rgba(8, 191, 98, .15);
  color: #38d887;
}

html[data-effective-theme="dark"] .app-entry-icon.blue,
html[data-theme="dark"] .app-entry-icon.blue {
  background: rgba(45, 109, 246, .16);
  color: #79a4ff;
}

html[data-effective-theme="dark"] .app-entry-icon.orange,
html[data-theme="dark"] .app-entry-icon.orange {
  background: rgba(255, 159, 10, .18);
  color: #ffbd55;
}

html[data-effective-theme="dark"] .app-entry-icon.red,
html[data-theme="dark"] .app-entry-icon.red {
  background: rgba(239, 68, 68, .18);
  color: #ff8585;
}

html[data-effective-theme="dark"] .app-entry-icon.purple,
html[data-theme="dark"] .app-entry-icon.purple {
  background: rgba(132, 108, 255, .18);
  color: #aaa0ff;
}

html[data-effective-theme="dark"] .app-entry-icon.gray,
html[data-effective-theme="dark"] .app-entry-icon.dark,
html[data-theme="dark"] .app-entry-icon.gray,
html[data-theme="dark"] .app-entry-icon.dark {
  background: #2b3037;
  color: #cdd3db;
}

html[data-effective-theme="dark"] .app-entry-icon.green,
html[data-theme="dark"] .app-entry-icon.green {
  background: rgba(48, 209, 88, .17);
  color: #59dd7b;
}

html[data-effective-theme="dark"] .app-entry-icon.yellow,
html[data-theme="dark"] .app-entry-icon.yellow {
  background: rgba(255, 214, 10, .18);
  color: #ffdf5f;
}

html[data-effective-theme="dark"] .search-box,
html[data-effective-theme="dark"] .sub-search,
html[data-effective-theme="dark"] .field,
html[data-effective-theme="dark"] .select-field,
html[data-effective-theme="dark"] textarea,
html[data-effective-theme="dark"] input,
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .sub-search,
html[data-theme="dark"] .field,
html[data-theme="dark"] .select-field,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input {
  background: #171a1f;
  border-color: var(--line-strong);
  color: var(--text);
}

html[data-effective-theme="dark"] .sub-search input,
html[data-theme="dark"] .sub-search input {
  background: transparent;
  border-color: transparent;
}

html[data-effective-theme="dark"] .field::placeholder,
html[data-effective-theme="dark"] input::placeholder,
html[data-effective-theme="dark"] textarea::placeholder,
html[data-theme="dark"] .field::placeholder,
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #69727e;
}

html[data-effective-theme="dark"] .secondary,
html[data-effective-theme="dark"] .mini,
html[data-theme="dark"] .secondary,
html[data-theme="dark"] .mini {
  background: #252a31;
  color: #d8dde4;
}

html[data-effective-theme="dark"] .danger,
html[data-theme="dark"] .danger {
  background: rgba(239, 68, 68, .14);
  color: #ff8585;
}

html[data-effective-theme="dark"] .switch-input,
html[data-effective-theme="dark"] .pref-row input.switch-input[type="checkbox"],
html[data-theme="dark"] .switch-input,
html[data-theme="dark"] .pref-row input.switch-input[type="checkbox"] {
  background: #343942;
  border-color: #343942;
}

html[data-effective-theme="dark"] .switch-input:before,
html[data-effective-theme="dark"] .pref-row input.switch-input[type="checkbox"]:before,
html[data-theme="dark"] .switch-input:before,
html[data-theme="dark"] .pref-row input.switch-input[type="checkbox"]:before {
  background: #d8dde4;
  box-shadow: none;
}

html[data-effective-theme="dark"] .switch-input:checked,
html[data-effective-theme="dark"] .pref-row input.switch-input[type="checkbox"]:checked,
html[data-theme="dark"] .switch-input:checked,
html[data-theme="dark"] .pref-row input.switch-input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

html[data-effective-theme="dark"] input[type="radio"],
html[data-effective-theme="dark"] input[type="checkbox"]:not(.switch-input),
html[data-theme="dark"] input[type="radio"],
html[data-theme="dark"] input[type="checkbox"]:not(.switch-input) {
  accent-color: var(--primary);
  background: transparent;
}

html[data-effective-theme="dark"] .tabbar,
html[data-theme="dark"] .tabbar {
  background: rgba(27, 29, 33, .96);
  border: 1px solid #2b3037;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .32);
}

html[data-effective-theme="dark"] .im-tab,
html[data-theme="dark"] .im-tab {
  color: #a4abb5;
}

html[data-effective-theme="dark"] .im-tab.active,
html[data-theme="dark"] .im-tab.active {
  background: #252a31;
  color: var(--text);
}

html[data-effective-theme="dark"] .im-tab.active .ui-icon,
html[data-effective-theme="dark"] .im-tab.active i,
html[data-theme="dark"] .im-tab.active .ui-icon,
html[data-theme="dark"] .im-tab.active i {
  color: var(--primary);
}

html[data-effective-theme="dark"] .action-sheet,
html[data-effective-theme="dark"] .account-modal,
html[data-theme="dark"] .action-sheet,
html[data-theme="dark"] .account-modal {
  background: var(--card);
  border: 1px solid #2a2f36;
  border-bottom: 0;
  box-shadow: 0 -18px 46px rgba(0, 0, 0, .36);
  color: var(--text);
}

html[data-effective-theme="dark"] .sheet-mask,
html[data-theme="dark"] .sheet-mask {
  background: rgba(0, 0, 0, .66);
}

html[data-effective-theme="dark"] .sheet-handle,
html[data-theme="dark"] .sheet-handle {
  background: #454b54;
}

html[data-effective-theme="dark"] .sheet-choice,
html[data-effective-theme="dark"] .sheet-item,
html[data-effective-theme="dark"] .sheet-command,
html[data-theme="dark"] .sheet-choice,
html[data-theme="dark"] .sheet-item,
html[data-theme="dark"] .sheet-command {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

html[data-effective-theme="dark"] .sheet-choice.active,
html[data-theme="dark"] .sheet-choice.active {
  background: rgba(8, 191, 98, .08);
}

html[data-effective-theme="dark"] .sheet-choice b,
html[data-effective-theme="dark"] .sheet-item b,
html[data-theme="dark"] .sheet-choice b,
html[data-theme="dark"] .sheet-item b {
  color: var(--text);
}

html[data-effective-theme="dark"] .sheet-choice em,
html[data-effective-theme="dark"] .sheet-item em,
html[data-theme="dark"] .sheet-choice em,
html[data-theme="dark"] .sheet-item em {
  color: var(--muted);
}

html[data-effective-theme="dark"] .sheet-choice strong,
html[data-theme="dark"] .sheet-choice strong {
  color: var(--primary);
}

html[data-effective-theme="dark"] .sheet-search,
html[data-theme="dark"] .sheet-search {
  background: #272c34;
  color: #d8dde4;
}

html[data-effective-theme="dark"] .sheet-group,
html[data-theme="dark"] .sheet-group {
  background: rgba(8, 191, 98, .16);
  color: #38d887;
}

html[data-effective-theme="dark"] .sheet-channel,
html[data-theme="dark"] .sheet-channel {
  background: rgba(255, 159, 10, .18);
  color: #ffbd55;
}

html[data-effective-theme="dark"] .sheet-scan,
html[data-theme="dark"] .sheet-scan {
  background: rgba(132, 108, 255, .18);
  color: #aaa0ff;
}

html[data-effective-theme="dark"] .group-chat,
html[data-effective-theme="dark"] .channel-chat,
html[data-effective-theme="dark"] .im-chat,
html[data-theme="dark"] .group-chat,
html[data-theme="dark"] .channel-chat,
html[data-theme="dark"] .im-chat {
  background-color: #111315;
  background-image: none;
}

html[data-effective-theme="dark"] .bubble,
html[data-theme="dark"] .bubble {
  background: #24282f;
  color: var(--text);
}

html[data-effective-theme="dark"] .bubble-line.mine .bubble,
html[data-effective-theme="dark"] .mine .bubble,
html[data-theme="dark"] .bubble-line.mine .bubble,
html[data-theme="dark"] .mine .bubble {
  background: #0f8f51;
  color: #fff;
}

html[data-effective-theme="dark"] .bubble-time,
html[data-effective-theme="dark"] .image-error,
html[data-theme="dark"] .bubble-time,
html[data-theme="dark"] .image-error {
  color: #7b8490;
}

html[data-effective-theme="dark"] .composer,
html[data-effective-theme="dark"] .reply-preview,
html[data-theme="dark"] .composer,
html[data-theme="dark"] .reply-preview {
  background: #171a1f;
  border-color: var(--line);
}

html[data-effective-theme="dark"] .composer .field,
html[data-effective-theme="dark"] .composer-tool,
html[data-effective-theme="dark"] .reply-preview button,
html[data-effective-theme="dark"] .message-sheet-cancel,
html[data-theme="dark"] .composer .field,
html[data-theme="dark"] .composer-tool,
html[data-theme="dark"] .reply-preview button,
html[data-theme="dark"] .message-sheet-cancel {
  background: #24282f;
  color: var(--text);
}

html[data-effective-theme="dark"] .message-context-menu,
html[data-effective-theme="dark"] .conversation-context-menu,
html[data-effective-theme="dark"] .message-menu-list,
html[data-effective-theme="dark"] .conversation-menu-list,
html[data-effective-theme="dark"] .message-reaction-bar,
html[data-effective-theme="dark"] .message-action-sheet,
html[data-theme="dark"] .message-context-menu,
html[data-theme="dark"] .conversation-context-menu,
html[data-theme="dark"] .message-menu-list,
html[data-theme="dark"] .conversation-menu-list,
html[data-theme="dark"] .message-reaction-bar,
html[data-theme="dark"] .message-action-sheet {
  background: #1d2025;
  border-color: #2d333b;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .42);
  color: var(--text);
}

html[data-effective-theme="dark"] .message-menu-item,
html[data-effective-theme="dark"] .conversation-menu-item,
html[data-effective-theme="dark"] .message-reaction-bar button,
html[data-effective-theme="dark"] .message-reaction-bar .more-reaction,
html[data-theme="dark"] .message-menu-item,
html[data-theme="dark"] .conversation-menu-item,
html[data-theme="dark"] .message-reaction-bar button,
html[data-theme="dark"] .message-reaction-bar .more-reaction {
  background: transparent;
  color: var(--text);
}

html[data-effective-theme="dark"] .message-menu-item:hover,
html[data-effective-theme="dark"] .conversation-menu-item:hover,
html[data-effective-theme="dark"] .message-reaction-bar button:hover,
html[data-theme="dark"] .message-menu-item:hover,
html[data-theme="dark"] .conversation-menu-item:hover,
html[data-theme="dark"] .message-reaction-bar button:hover {
  background: #292e36;
}

html[data-effective-theme="dark"] .reaction-strip span,
html[data-theme="dark"] .reaction-strip span {
  background: rgba(36, 40, 47, .92);
  border-color: rgba(58, 64, 74, .95);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .28);
  color: var(--text);
}

html[data-effective-theme="dark"] .message-menu-divider,
html[data-theme="dark"] .message-menu-divider {
  background: #2d333b;
}

html[data-effective-theme="dark"] .empty,
html[data-effective-theme="dark"] .empty-state p,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .empty-state p {
  color: var(--muted);
}

html[data-effective-theme="dark"] .empty-visual,
html[data-theme="dark"] .empty-visual {
  background: #23272e;
  color: #7b8490;
}

html[data-effective-theme="dark"] .message-detail-card,
html[data-effective-theme="dark"] .message-detail-preview,
html[data-theme="dark"] .message-detail-card,
html[data-theme="dark"] .message-detail-preview {
  background: #1b1d21;
  color: var(--text);
}

html[data-effective-theme="dark"] .message-detail-sender b,
html[data-theme="dark"] .message-detail-sender b {
  color: var(--text);
}

html[data-effective-theme="dark"] .message-detail-row,
html[data-effective-theme="dark"] .message-detail-row b,
html[data-theme="dark"] .message-detail-row,
html[data-theme="dark"] .message-detail-row b {
  color: var(--text);
}

html[data-effective-theme="dark"] .media-row,
html[data-theme="dark"] .media-row {
  background: #1b1d21;
  border-color: #2b3038;
}

html[data-effective-theme="dark"] .media-row-icon,
html[data-theme="dark"] .media-row-icon {
  background: #242830;
  color: #c7cdd7;
}

html[data-effective-theme="dark"] .media-row-copy b,
html[data-theme="dark"] .media-row-copy b {
  color: var(--text);
}

html[data-effective-theme="dark"] .toast,
html[data-theme="dark"] .toast {
  background: rgba(236, 239, 244, .92);
  color: #101316;
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  html[data-effective-theme="dark"] .desktop-rail,
  html[data-theme="dark"] .desktop-rail {
    background: #101215;
    border-color: #262a30;
  }

  html[data-effective-theme="dark"] .desktop-sidebar,
  html[data-theme="dark"] .desktop-sidebar {
    background: #15181c;
    border-color: #262a30;
  }

  html[data-effective-theme="dark"] .desktop-pane,
  html[data-theme="dark"] .desktop-pane {
    background: #111315;
    border-color: #262a30;
  }

  html[data-effective-theme="dark"] .desktop-tab,
  html[data-theme="dark"] .desktop-tab {
    color: #8f98a4;
  }

  html[data-effective-theme="dark"] .desktop-tab.active,
  html[data-effective-theme="dark"] .desktop-avatar,
  html[data-theme="dark"] .desktop-tab.active,
  html[data-theme="dark"] .desktop-avatar {
    background: #252a31;
    color: var(--text);
  }

  html[data-effective-theme="dark"] .app-row:hover,
  html[data-effective-theme="dark"] .im-row:hover,
  html[data-effective-theme="dark"] .sheet-choice:hover,
  html[data-effective-theme="dark"] .sheet-item:hover,
  html[data-theme="dark"] .app-row:hover,
  html[data-theme="dark"] .im-row:hover,
  html[data-theme="dark"] .sheet-choice:hover,
  html[data-theme="dark"] .sheet-item:hover {
    background: #20242a;
  }

  html[data-effective-theme="dark"] .app-shell.subpage-shell:not(.auth-shell) .page-sub,
  html[data-theme="dark"] .app-shell.subpage-shell:not(.auth-shell) .page-sub {
    background: #111315;
  }
}

html[data-effective-theme="dark"] #groupInfo,
html[data-effective-theme="dark"] #channelInfo,
html[data-effective-theme="dark"] .group-profile-drawer,
html[data-effective-theme="dark"] .device-page,
html[data-theme="dark"] #groupInfo,
html[data-theme="dark"] #channelInfo,
html[data-theme="dark"] .group-profile-drawer,
html[data-theme="dark"] .device-page {
  background: #111315;
}

html[data-effective-theme="dark"] .drawer-topbar,
html[data-effective-theme="dark"] .device-card,
html[data-effective-theme="dark"] .device-list-row,
html[data-effective-theme="dark"] .device-logout-card,
html[data-effective-theme="dark"] .member-mini,
html[data-effective-theme="dark"] .member-candidate-row,
html[data-effective-theme="dark"] .member-action-list,
html[data-effective-theme="dark"] .member-action-title,
html[data-effective-theme="dark"] .member-action-row,
html[data-effective-theme="dark"] .member-action-cancel,
html[data-effective-theme="dark"] .moments-feed,
html[data-effective-theme="dark"] .moment-item,
html[data-theme="dark"] .drawer-topbar,
html[data-theme="dark"] .device-card,
html[data-theme="dark"] .device-list-row,
html[data-theme="dark"] .device-logout-card,
html[data-theme="dark"] .member-mini,
html[data-theme="dark"] .member-candidate-row,
html[data-theme="dark"] .member-action-list,
html[data-theme="dark"] .member-action-title,
html[data-theme="dark"] .member-action-row,
html[data-theme="dark"] .member-action-cancel,
html[data-theme="dark"] .moments-feed,
html[data-theme="dark"] .moment-item {
  background: #1b1d21;
  border-color: #2a2f36;
  color: var(--text);
}

html[data-effective-theme="dark"] .drawer-topbar strong,
html[data-effective-theme="dark"] .profile-hero h2,
html[data-effective-theme="dark"] .profile-actions em,
html[data-effective-theme="dark"] .profile-card b,
html[data-effective-theme="dark"] .profile-list .row-title,
html[data-effective-theme="dark"] .members-head button,
html[data-effective-theme="dark"] .member-mini,
html[data-effective-theme="dark"] .member-candidate-row,
html[data-effective-theme="dark"] .member-action-row,
html[data-effective-theme="dark"] .member-action-cancel,
html[data-effective-theme="dark"] .device-list-row b,
html[data-effective-theme="dark"] .qr-hero-card h2,
html[data-effective-theme="dark"] .qr-code-label,
html[data-effective-theme="dark"] .qr-section-title,
html[data-effective-theme="dark"] .moment-text,
html[data-theme="dark"] .drawer-topbar strong,
html[data-theme="dark"] .profile-hero h2,
html[data-theme="dark"] .profile-actions em,
html[data-theme="dark"] .profile-card b,
html[data-theme="dark"] .profile-list .row-title,
html[data-theme="dark"] .members-head button,
html[data-theme="dark"] .member-mini,
html[data-theme="dark"] .member-candidate-row,
html[data-theme="dark"] .member-action-row,
html[data-theme="dark"] .member-action-cancel,
html[data-theme="dark"] .device-list-row b,
html[data-theme="dark"] .qr-hero-card h2,
html[data-theme="dark"] .qr-code-label,
html[data-theme="dark"] .qr-section-title,
html[data-theme="dark"] .moment-text {
  color: var(--text);
}

html[data-effective-theme="dark"] .profile-hero,
html[data-theme="dark"] .profile-hero {
  background: #111315;
}

html[data-effective-theme="dark"] .profile-actions span,
html[data-effective-theme="dark"] .member-add-icon,
html[data-effective-theme="dark"] .device-row-icon,
html[data-effective-theme="dark"] .device-empty-panel .ui-icon,
html[data-theme="dark"] .profile-actions span,
html[data-theme="dark"] .member-add-icon,
html[data-theme="dark"] .device-row-icon,
html[data-theme="dark"] .device-empty-panel .ui-icon {
  background: #252a31;
  color: #d8dde4;
}

html[data-effective-theme="dark"] .member-action-title,
html[data-effective-theme="dark"] .device-section-title,
html[data-effective-theme="dark"] .device-list-row em,
html[data-effective-theme="dark"] .device-note,
html[data-effective-theme="dark"] .device-empty-panel,
html[data-effective-theme="dark"] .qr-kicker,
html[data-effective-theme="dark"] .qr-account,
html[data-effective-theme="dark"] .qr-hero-card p,
html[data-effective-theme="dark"] .moment-meta,
html[data-theme="dark"] .member-action-title,
html[data-theme="dark"] .device-section-title,
html[data-theme="dark"] .device-list-row em,
html[data-theme="dark"] .device-note,
html[data-theme="dark"] .device-empty-panel,
html[data-theme="dark"] .qr-kicker,
html[data-theme="dark"] .qr-account,
html[data-theme="dark"] .qr-hero-card p,
html[data-theme="dark"] .moment-meta {
  color: var(--muted);
}

html[data-effective-theme="dark"] .profile-danger-list .app-row .row-title,
html[data-effective-theme="dark"] .member-action-row.danger-line,
html[data-effective-theme="dark"] .device-logout-card,
html[data-theme="dark"] .profile-danger-list .app-row .row-title,
html[data-theme="dark"] .member-action-row.danger-line,
html[data-theme="dark"] .device-logout-card {
  color: #ff8585;
}

html[data-effective-theme="dark"] .qr-hero-card,
html[data-effective-theme="dark"] .qr-theme-panel,
html[data-theme="dark"] .qr-hero-card,
html[data-theme="dark"] .qr-theme-panel {
  background: #1b1d21;
  box-shadow: 0 24px 66px rgba(0, 0, 0, .34);
}

html[data-effective-theme="dark"] .moment-social,
html[data-theme="dark"] .moment-social {
  background: #252a31;
  color: #cbd3dc;
}

html[data-effective-theme="dark"] .moment-social:before,
html[data-theme="dark"] .moment-social:before {
  border-bottom-color: #252a31;
}

html[data-effective-theme="dark"] .moment-comments,
html[data-theme="dark"] .moment-comments {
  border-top-color: #303641;
}

html[data-effective-theme="dark"] .moment-more,
html[data-theme="dark"] .moment-more {
  background: #252a31;
  color: #aeb6c2;
}

.text-action {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--primary-dark);
  display: inline-flex;
  font: inherit;
  font-size: 15px;
  font-weight: 780;
  height: 38px;
  justify-content: center;
  padding: 0 4px;
}

.settings-desktop {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding-bottom: 12px;
}

.settings-desktop-profile {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  padding: 14px;
}

.settings-desktop-avatar {
  border-radius: 12px;
  height: 52px;
  width: 52px;
}

.settings-desktop-user {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.settings-desktop-user strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 820;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-desktop-user span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.settings-desktop-groups {
  display: grid;
  gap: 12px;
}

.profile-avatar-button {
  background: transparent;
  border: 0;
  display: inline-flex;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
}

.group-manage-page {
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: 760px;
  padding-bottom: 24px;
  width: 100%;
}

.group-edit-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.group-edit-block h2 {
  color: var(--text);
  font-size: 17px;
  font-weight: 820;
  line-height: 1.25;
  margin: 0;
}

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

.group-edit-about {
  background: #f5f7fa;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  min-height: 104px;
  outline: none;
  padding: 12px;
  resize: vertical;
}

.field-counter {
  color: var(--muted);
  display: flex;
  font-size: 12px;
  justify-content: flex-end;
}

.group-choice-panel,
.group-switch-card {
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.group-type-choice,
.group-manage-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 64px;
  padding: 12px 14px;
}

.group-type-choice:last-child,
.group-manage-row:last-child {
  border-bottom: 0;
}

.group-type-choice span,
.group-manage-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.group-type-choice b,
.group-manage-copy b {
  color: var(--text);
  font-size: 15px;
  font-weight: 780;
  line-height: 1.25;
}

.group-type-choice em,
.group-manage-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.group-type-choice input[type="radio"] {
  accent-color: var(--primary);
  grid-column: 2;
  grid-row: 1;
  height: 20px;
  width: 20px;
}

.group-manage-row {
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

.group-manage-icon {
  align-items: center;
  background: #e7f8ef;
  border-radius: 10px;
  color: var(--primary-dark);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.group-handle-field {
  align-items: center;
  background: #f5f7fa;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 48px;
  padding: 0 12px;
}

.group-handle-field span {
  color: var(--muted);
  font-weight: 820;
}

.group-handle-field input {
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  height: 46px;
  min-width: 0;
  outline: none;
}

.group-save-button {
  border-radius: 12px;
  min-height: 48px;
}

.group-delete-panel {
  display: grid;
}

.group-delete-panel .setting-row {
  border-radius: 12px;
}

.group-avatar-panel {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(228, 233, 240, .9);
  border-radius: 18px 18px 0 0;
  bottom: 0;
  box-shadow: 0 -18px 44px rgba(15, 23, 42, .18);
  color: var(--text);
  display: grid;
  gap: 12px;
  left: 0;
  padding: 18px 18px 26px;
  position: fixed;
  right: 0;
  text-align: center;
  z-index: 44;
}

.group-avatar-mask {
  backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, .18);
}

.group-avatar-close {
  align-items: center;
  background: #f1f5f9;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  justify-self: start;
  width: 36px;
}

.group-avatar-large {
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  font-size: 42px;
  height: 112px;
  justify-self: center;
  width: 112px;
}

.group-avatar-panel h2 {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-size: 22px;
  font-weight: 860;
  gap: 6px;
  justify-content: center;
  margin: 0;
}

.group-avatar-panel p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.group-avatar-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  margin-top: 4px;
}

.group-avatar-actions button {
  align-items: center;
  background: #f5f7fa;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 78px;
  padding: 12px 8px;
}

.group-avatar-actions span {
  font-size: 13px;
  font-weight: 720;
}

.moments-state {
  margin: 0;
  min-height: 170px;
}

.moments-load-more:disabled {
  opacity: .62;
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .main-shell.tab-me .page-main {
    background: #f4f6f8;
    padding: 14px;
  }

  .main-shell.tab-me .settings-desktop .settings-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    margin: 0;
  }

  .group-manage-page {
    max-width: 900px;
  }

  .group-avatar-panel {
    border-radius: 18px;
    bottom: 26px;
    left: 50%;
    max-width: 420px;
    right: auto;
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 44px));
  }
}

html[data-effective-theme="dark"] .settings-desktop-profile,
html[data-effective-theme="dark"] .settings-desktop .settings-card,
html[data-effective-theme="dark"] .group-edit-block,
html[data-effective-theme="dark"] .group-type-choice,
html[data-effective-theme="dark"] .group-manage-row,
html[data-effective-theme="dark"] .group-avatar-panel,
html[data-effective-theme="dark"] .group-avatar-actions button,
html[data-theme="dark"] .settings-desktop-profile,
html[data-theme="dark"] .settings-desktop .settings-card,
html[data-theme="dark"] .group-edit-block,
html[data-theme="dark"] .group-type-choice,
html[data-theme="dark"] .group-manage-row,
html[data-theme="dark"] .group-avatar-panel,
html[data-theme="dark"] .group-avatar-actions button {
  background: #1b1d21;
  border-color: #2a2f36;
  color: var(--text);
}

html[data-effective-theme="dark"] .main-shell.tab-me .page-main,
html[data-effective-theme="dark"] .group-choice-panel,
html[data-effective-theme="dark"] .group-switch-card,
html[data-effective-theme="dark"] .group-edit-about,
html[data-effective-theme="dark"] .group-handle-field,
html[data-effective-theme="dark"] .group-avatar-close,
html[data-theme="dark"] .main-shell.tab-me .page-main,
html[data-theme="dark"] .group-choice-panel,
html[data-theme="dark"] .group-switch-card,
html[data-theme="dark"] .group-edit-about,
html[data-theme="dark"] .group-handle-field,
html[data-theme="dark"] .group-avatar-close {
  background: #111315;
  border-color: #2a2f36;
}

html[data-effective-theme="dark"] .settings-desktop-user strong,
html[data-effective-theme="dark"] .group-edit-block h2,
html[data-effective-theme="dark"] .group-type-choice b,
html[data-effective-theme="dark"] .group-manage-copy b,
html[data-effective-theme="dark"] .group-handle-field input,
html[data-effective-theme="dark"] .group-avatar-panel h2,
html[data-theme="dark"] .settings-desktop-user strong,
html[data-theme="dark"] .group-edit-block h2,
html[data-theme="dark"] .group-type-choice b,
html[data-theme="dark"] .group-manage-copy b,
html[data-theme="dark"] .group-handle-field input,
html[data-theme="dark"] .group-avatar-panel h2 {
  color: var(--text);
}

.conversation-row.edit-mode {
  cursor: default;
}

.conversation-check {
  border: 2px solid #b8c1cc;
  border-radius: 50%;
  flex: 0 0 24px;
  height: 24px;
  position: relative;
  width: 24px;
}

.conversation-row.selected .conversation-check {
  background: var(--primary);
  border-color: var(--primary);
}

.conversation-row.selected .conversation-check:after {
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  content: "";
  height: 10px;
  left: 7px;
  position: absolute;
  top: 3px;
  transform: rotate(45deg);
  width: 6px;
}

.chat-edit-bar {
  align-items: center;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 18px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  box-shadow: 0 12px 34px rgba(15, 23, 42, .16);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  left: 14px;
  padding: 10px;
  position: absolute;
  right: 14px;
  z-index: 12;
}

.chat-edit-bar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  min-width: 0;
}

.chat-edit-bar button {
  background: #edf2f7;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
  min-height: 38px;
  padding: 0 10px;
}

.chat-edit-bar .danger-text {
  color: #ef4444;
}

/* Dark-mode hardening pass: cover shell, list shortcuts and commerce pages. */
html[data-effective-theme="dark"] body,
html[data-theme="dark"] body {
  background: #0b0d10;
}

html[data-effective-theme="dark"] .topbar,
html[data-theme="dark"] .topbar {
  background: #111418;
  border-color: #242930;
  color: #f2f5f8;
}

html[data-effective-theme="dark"] .main-shell.tab-me .settings-card,
html[data-theme="dark"] .main-shell.tab-me .settings-card {
  margin: 16px 0 18px;
}

html[data-effective-theme="dark"] .settings-hero,
html[data-theme="dark"] .settings-hero {
  border-bottom: 1px solid #252a30;
  padding-bottom: 38px;
}

html[data-effective-theme="dark"] .main-shell.tab-me .page-main,
html[data-theme="dark"] .main-shell.tab-me .page-main {
  display: block;
  overflow-y: auto;
  padding-bottom: calc(130px + env(safe-area-inset-bottom));
}

html[data-effective-theme="dark"] .contact-shortcuts,
html[data-effective-theme="dark"] .contact-shortcut,
html[data-theme="dark"] .contact-shortcuts,
html[data-theme="dark"] .contact-shortcut {
  background: #1b1d21;
  color: #eef1f4;
}

html[data-effective-theme="dark"] .contact-shortcut:after,
html[data-theme="dark"] .contact-shortcut:after {
  background: #2a2f36;
}

html[data-effective-theme="dark"] .contact-shortcut i,
html[data-theme="dark"] .contact-shortcut i {
  color: #eef1f4;
}

html[data-effective-theme="dark"] .alpha-title,
html[data-theme="dark"] .alpha-title {
  background: #111315;
  color: #969da7;
}

html[data-effective-theme="dark"] .vip-plan,
html[data-effective-theme="dark"] .wallet-balance,
html[data-effective-theme="dark"] .redpacket-detail,
html[data-effective-theme="dark"] .redpacket-cover,
html[data-theme="dark"] .vip-plan,
html[data-theme="dark"] .wallet-balance,
html[data-theme="dark"] .redpacket-detail,
html[data-theme="dark"] .redpacket-cover {
  background: #1b1d21;
  border-color: #2a2f36;
  color: #eef1f4;
}

html[data-effective-theme="dark"] .section,
html[data-effective-theme="dark"] .form,
html[data-effective-theme="dark"] .app-section,
html[data-effective-theme="dark"] .settings-detail,
html[data-effective-theme="dark"] .vip-grid div,
html[data-effective-theme="dark"] .download-card,
html[data-effective-theme="dark"] .tabs,
html[data-effective-theme="dark"] .filter-chip,
html[data-effective-theme="dark"] .choice-row,
html[data-effective-theme="dark"] .range-row,
html[data-effective-theme="dark"] .blocked-row,
html[data-effective-theme="dark"] .media-tabs button,
html[data-theme="dark"] .section,
html[data-theme="dark"] .form,
html[data-theme="dark"] .app-section,
html[data-theme="dark"] .settings-detail,
html[data-theme="dark"] .vip-grid div,
html[data-theme="dark"] .download-card,
html[data-theme="dark"] .tabs,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .choice-row,
html[data-theme="dark"] .range-row,
html[data-theme="dark"] .blocked-row,
html[data-theme="dark"] .media-tabs button {
  background: #1b1d21;
  border-color: #2a2f36;
  color: #eef1f4;
}

html[data-effective-theme="dark"] .filter-chip.active,
html[data-effective-theme="dark"] .media-tabs button.active,
html[data-theme="dark"] .filter-chip.active,
html[data-theme="dark"] .media-tabs button.active {
  background: rgba(8, 191, 98, .18);
  border-color: rgba(8, 191, 98, .38);
  color: #46de91;
}

html[data-effective-theme="dark"] .vip-plan b,
html[data-effective-theme="dark"] .vip-panel strong,
html[data-effective-theme="dark"] .section-title,
html[data-theme="dark"] .vip-plan b,
html[data-theme="dark"] .vip-panel strong,
html[data-theme="dark"] .section-title {
  color: #eef1f4;
}

html[data-effective-theme="dark"] .vip-plan span,
html[data-theme="dark"] .vip-plan span {
  color: #aab2bd;
}

html[data-effective-theme="dark"] .chat-edit-bar,
html[data-theme="dark"] .chat-edit-bar {
  background: rgba(27, 29, 33, .96);
  border-color: #2a2f36;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .32);
}

html[data-effective-theme="dark"] .chat-edit-bar button,
html[data-theme="dark"] .chat-edit-bar button {
  background: #252a31;
  color: #eef1f4;
}

html[data-effective-theme="dark"] .segmented,
html[data-effective-theme="dark"] .tabs.two,
html[data-theme="dark"] .segmented,
html[data-theme="dark"] .tabs.two {
  background: #171a1f;
  border-color: #2a2f36;
}

html[data-effective-theme="dark"] .segmented button,
html[data-effective-theme="dark"] .tabs.two button,
html[data-theme="dark"] .segmented button,
html[data-theme="dark"] .tabs.two button {
  color: #eef1f4;
}

html[data-effective-theme="dark"] .segmented button.active,
html[data-effective-theme="dark"] .tabs.two button.active,
html[data-theme="dark"] .segmented button.active,
html[data-theme="dark"] .tabs.two button.active {
  background: rgba(8, 191, 98, .2);
  color: #48df94;
}

html[data-effective-theme="dark"] .create-avatar,
html[data-effective-theme="dark"] .support-card > span,
html[data-effective-theme="dark"] .faq-group header span,
html[data-theme="dark"] .create-avatar,
html[data-theme="dark"] .support-card > span,
html[data-theme="dark"] .faq-group header span {
  background: rgba(8, 191, 98, .14);
  color: #48df94;
}

html[data-effective-theme="dark"] .qr-theme-panel,
html[data-theme="dark"] .qr-theme-panel {
  background: rgba(17, 19, 21, .9);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #eef1f4;
}

html[data-effective-theme="dark"] .qr-section-title,
html[data-theme="dark"] .qr-section-title {
  color: #eef1f4;
}

html[data-effective-theme="dark"] .qr-theme-choice.active,
html[data-theme="dark"] .qr-theme-choice.active {
  border-color: #eef1f4;
}

html[data-effective-theme="dark"] .qr-share-button,
html[data-theme="dark"] .qr-share-button {
  background: rgba(17, 19, 21, .9);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #eef1f4;
}

.main-shell.tab-me .page-main {
  display: block;
  overflow-y: auto;
  padding-bottom: calc(130px + env(safe-area-inset-bottom));
}

.main-shell.tab-me .settings-card,
.main-shell.tab-me .settings-hero,
.main-shell.tab-me .settings-version {
  flex: 0 0 auto;
}

.main-shell.tab-me .settings-version {
  margin-top: 18px;
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  html[data-effective-theme="dark"] .app-shell:not(.auth-shell),
  html[data-theme="dark"] .app-shell:not(.auth-shell) {
    background: #111315;
  }

  html[data-effective-theme="dark"] .app-shell:not(.auth-shell) .desktop-rail,
  html[data-theme="dark"] .app-shell:not(.auth-shell) .desktop-rail {
    background: #111418;
    border-color: #242930;
  }

  html[data-effective-theme="dark"] .subpage-shell .desktop-sidebar,
  html[data-effective-theme="dark"] .app-shell:not(.auth-shell) .desktop-pane,
  html[data-theme="dark"] .subpage-shell .desktop-sidebar,
  html[data-theme="dark"] .app-shell:not(.auth-shell) .desktop-pane {
    background: #111315;
    border-color: #242930;
  }

  html[data-effective-theme="dark"] .desktop-side-body,
  html[data-effective-theme="dark"] .app-shell.subpage-shell:not(.auth-shell) .page-sub,
  html[data-theme="dark"] .desktop-side-body,
  html[data-theme="dark"] .app-shell.subpage-shell:not(.auth-shell) .page-sub {
    background: #111315;
  }

  html[data-effective-theme="dark"] .app-shell.subpage-shell:not(.auth-shell) .topbar,
  html[data-theme="dark"] .app-shell.subpage-shell:not(.auth-shell) .topbar {
    background: #111418;
  }

  html[data-effective-theme="dark"] .desktop-empty h2,
  html[data-effective-theme="dark"] .desktop-side-head strong,
  html[data-theme="dark"] .desktop-empty h2,
  html[data-theme="dark"] .desktop-side-head strong {
    color: #eef1f4;
  }

  html[data-effective-theme="dark"] .desktop-empty p,
  html[data-theme="dark"] .desktop-empty p {
    color: #969da7;
  }
}

.icon-btn.back {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--text) !important;
  display: inline-flex !important;
  flex: 0 0 44px !important;
  font-size: 0 !important;
  height: 44px !important;
  justify-content: center !important;
  line-height: 0 !important;
  margin-left: -8px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: relative !important;
  width: 44px !important;
  z-index: 2 !important;
}

.subpage-shell .topbar > .icon-btn.back,
.app-shell.subpage-shell:not(.auth-shell) .topbar > .icon-btn.back {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.icon-btn.back::before,
.icon-btn.back::after {
  content: none !important;
  display: none !important;
}

.icon-btn.back .ui-icon,
.icon-btn.back .back-icon {
  display: block !important;
  fill: none !important;
  flex: 0 0 30px !important;
  height: 30px !important;
  max-height: 30px !important;
  max-width: 30px !important;
  min-height: 30px !important;
  min-width: 30px !important;
  stroke: currentColor !important;
  stroke-width: 2.8 !important;
  transform: none !important;
  width: 30px !important;
}

.icon-btn.back .ui-icon path,
.icon-btn.back .back-icon path {
  fill: none !important;
  stroke: currentColor !important;
}

.subpage-shell .topbar > .icon-btn.back {
  margin-left: -4px !important;
}

.subpage-shell .topbar > .icon-btn.back *:not(.back-arrow):not(svg):not(path) {
  display: none !important;
}

.composer-dock {
  background: rgba(255, 255, 255, .98);
  flex: 0 0 auto;
  margin: 0 -8px;
}

.composer-dock .composer {
  align-items: center;
  box-shadow: none;
  display: grid;
  gap: 8px;
  grid-template-columns: 52px minmax(0, 1fr) 52px auto;
  margin: 0;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
}

.composer-dock .composer .field {
  min-height: 56px;
}

.composer-dock .composer .primary {
  border-radius: 28px;
  font-size: 17px;
  min-height: 56px;
  padding: 0 20px;
}

.composer-dock .composer-tool {
  background: #f1f2f4;
  border: 0;
  border-radius: 50%;
  color: #101828;
  height: 52px;
  width: 52px;
}

.composer-dock .composer-tool .ui-icon {
  height: 28px;
  stroke-width: 2.35;
  width: 28px;
}

.composer-dock .composer [hidden] {
  display: none !important;
}

.composer-input-wrap {
  align-items: center;
  background: #f1f2f4;
  border-radius: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  min-height: 56px;
  min-width: 0;
}

.composer-input-wrap .field {
  background: transparent;
  border: 0;
  border-radius: 28px;
  font-size: 17px;
  min-height: 56px;
  padding: 0 4px 0 24px;
}

.composer-inline-tool {
  align-items: center;
  background: transparent;
  border: 0;
  color: #111827;
  display: inline-flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.composer-inline-tool .ui-icon {
  height: 30px;
  stroke-width: 2.35;
  width: 30px;
}

.composer-panel[hidden] {
  display: none !important;
}

.composer-panel {
  border-top: 1px solid rgba(15, 23, 42, .08);
  max-height: min(43vh, 340px);
  overflow-y: auto;
  padding: 12px 20px 16px;
}

.composer-more-grid {
  display: grid;
  gap: 18px 28px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px 12px 2px;
}

.composer-more-item {
  align-items: center;
  background: transparent;
  border: 0;
  color: #666f7d;
  display: grid;
  font-size: 14px;
  gap: 8px;
  justify-items: center;
}

.composer-more-item i {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
  color: #4a4f58;
  display: inline-flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.composer-more-item .ui-icon {
  height: 30px;
  stroke-width: 2.3;
  width: 30px;
}

.chat-emoji-tabs {
  align-items: center;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 2px 10px;
  scrollbar-width: none;
}

.chat-emoji-tabs::-webkit-scrollbar {
  display: none;
}

.chat-emoji-tabs button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: #687082;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  min-width: 42px;
}

.chat-emoji-tabs button.active {
  background: #eef0f3;
  color: #101828;
}

.tab-sticker {
  height: 28px;
  width: 28px;
}

.chat-emoji-search {
  align-items: center;
  background: #f1f2f4;
  border-radius: 14px;
  color: #697386;
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto;
  margin-bottom: 12px;
  min-height: 40px;
  padding: 0 12px;
}

.chat-emoji-search input {
  background: transparent;
  border: 0;
  color: inherit;
  min-width: 0;
  outline: 0;
}

.chat-emoji-search b {
  color: #101828;
  white-space: nowrap;
}

.plain-emoji-grid,
.chat-sticker-grid {
  display: grid;
  gap: 14px 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 8px 0 2px;
}

.plain-emoji-grid button,
.chat-sticker-grid button {
  align-items: center;
  aspect-ratio: 1;
  background: transparent;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  font-size: 48px;
  justify-content: center;
  padding: 0;
}

.chat-sticker-grid .grid-sticker {
  height: 66px;
  width: 66px;
}

.bubble-sticker {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.sticker-message {
  align-items: center;
  display: grid;
  justify-items: center;
}

.message-sticker {
  height: 138px;
  width: 138px;
}

.sticker-message > .sticker-title {
  display: none !important;
}

.voice-message {
  align-items: center;
  background: #d9d8e1;
  border: 0;
  border-radius: 22px;
  color: #0b0f1a;
  display: grid;
  gap: 12px;
  grid-template-columns: 52px 1fr auto;
  min-width: 230px;
  padding: 10px 16px 10px 10px;
}

.voice-play {
  align-items: center;
  background: #070b13;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.voice-wave,
.voice-live-bars {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  justify-content: center;
}

.voice-wave i,
.voice-live-bars i {
  background: currentColor;
  border-radius: 999px;
  display: inline-block;
  height: 24px;
  opacity: .72;
  width: 4px;
}

.voice-wave i:nth-child(2),
.voice-live-bars i:nth-child(2) { height: 32px; }
.voice-wave i:nth-child(3),
.voice-live-bars i:nth-child(3) { height: 40px; }
.voice-wave i:nth-child(4),
.voice-live-bars i:nth-child(4) { height: 36px; }
.voice-wave i:nth-child(5),
.voice-live-bars i:nth-child(5) { height: 30px; }

.voice-message.playing .voice-wave i,
.voice-live-bars i {
  animation: voicePulse .7s ease-in-out infinite alternate;
}

.voice-message em {
  color: #4f9d54;
  font-style: normal;
  font-weight: 800;
}

.voice-record-panel {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 52px minmax(0, 1fr) 56px;
  min-height: 92px;
}

.voice-back,
.voice-send {
  align-items: center;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.voice-back {
  background: #f1f2f4;
  color: #7b8492;
}

.voice-record-main {
  align-items: center;
  background: #f1f2f4;
  border-radius: 26px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(76px, auto) auto 1fr;
  min-height: 56px;
  min-width: 0;
  padding: 0 18px;
}

.voice-cancel-hint {
  color: #a0a7b3;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-record-panel strong {
  align-items: center;
  background: rgba(239, 68, 68, .14);
  border-radius: 999px;
  color: #0b0f1a;
  display: inline-flex;
  font-size: 18px;
  gap: 10px;
  padding: 7px 12px;
  white-space: nowrap;
}

.voice-record-panel strong i {
  background: #ef4444;
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.voice-live-bars {
  color: #080d17;
  justify-content: flex-start;
  min-width: 0;
}

.voice-send {
  background: #070b13;
  box-shadow: 0 8px 20px rgba(7, 11, 19, .22);
  color: #fff;
}

.file-message {
  align-items: center;
  color: inherit;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px 1fr;
  min-width: 180px;
  text-decoration: none;
}

.file-message span {
  align-items: center;
  background: rgba(15, 23, 42, .08);
  border-radius: 10px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.file-message b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bubble-location {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.location-message {
  align-items: center;
  background: #e7f7ea;
  border: 1px solid rgba(79, 157, 84, .18);
  border-radius: 22px;
  color: #0b0f1a;
  display: grid;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-width: 260px;
  padding: 12px 14px 12px 12px;
  text-decoration: none;
}

.location-message-icon {
  align-items: center;
  background: #4f9d54;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.location-message-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.location-message-main b,
.location-message-main em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-message-main b {
  font-size: 16px;
  font-weight: 800;
}

.location-message-main em {
  color: #5f6d66;
  font-style: normal;
  font-weight: 600;
}

.location-message-open {
  color: #8d9aa1;
  display: inline-flex;
}

@keyframes voicePulse {
  from { transform: scaleY(.72); }
  to { transform: scaleY(1.14); }
}

html[data-effective-theme="dark"] .composer-dock,
html[data-theme="dark"] .composer-dock {
  background: #171a1f;
}

html[data-effective-theme="dark"] .composer-panel,
html[data-theme="dark"] .composer-panel {
  border-color: #283548;
}

html[data-effective-theme="dark"] .composer-input-wrap,
html[data-theme="dark"] .composer-input-wrap {
  background: #24282f;
}

html[data-effective-theme="dark"] .composer-inline-tool,
html[data-theme="dark"] .composer-inline-tool {
  color: #f8fafc;
}

html[data-effective-theme="dark"] .composer-more-item i,
html[data-theme="dark"] .composer-more-item i,
html[data-effective-theme="dark"] .chat-emoji-tabs button.active,
html[data-theme="dark"] .chat-emoji-tabs button.active,
html[data-effective-theme="dark"] .chat-emoji-search,
html[data-theme="dark"] .chat-emoji-search,
html[data-effective-theme="dark"] .voice-record-main,
html[data-theme="dark"] .voice-record-main,
html[data-effective-theme="dark"] .voice-back,
html[data-theme="dark"] .voice-back {
  background: #24282f;
  border-color: #303846;
  color: #f8fafc;
}

html[data-effective-theme="dark"] .chat-emoji-search b,
html[data-theme="dark"] .chat-emoji-search b {
  color: #f8fafc;
}

html[data-effective-theme="dark"] .bubble-location,
html[data-theme="dark"] .bubble-location {
  background: transparent !important;
  box-shadow: none !important;
}

html[data-effective-theme="dark"] .location-message,
html[data-theme="dark"] .location-message {
  background: #16281d;
  border-color: rgba(94, 174, 103, .22);
  color: #eef7f0;
}

html[data-effective-theme="dark"] .location-message-icon,
html[data-theme="dark"] .location-message-icon {
  background: #4a8f59;
}

html[data-effective-theme="dark"] .location-message-main em,
html[data-theme="dark"] .location-message-main em {
  color: #9db0a7;
}

html[data-effective-theme="dark"] .location-message-open,
html[data-theme="dark"] .location-message-open {
  color: #8aa192;
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .app-shell.chat-detail-shell:not(.auth-shell) {
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    grid-template-rows: none;
    height: 100vh;
    margin: 0 auto;
    max-width: min(760px, 100vw);
    width: min(760px, 100vw);
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .desktop-rail,
  .app-shell.chat-detail-shell:not(.auth-shell) .desktop-sidebar,
  .app-shell.chat-detail-shell:not(.auth-shell) .desktop-pane {
    display: none !important;
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .topbar {
    flex: 0 0 auto;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .topbar .back {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .topbar h1,
  .app-shell.chat-detail-shell:not(.auth-shell) .topbar h1.has-chat-title {
    flex: 1;
    left: auto;
    line-height: normal;
    min-width: 0;
    pointer-events: auto;
    position: static;
    right: auto;
    text-align: left;
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .page-sub {
    background: #f6f7f9;
    flex: 1 1 auto;
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
    padding: 0;
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .im-chat {
    height: 100%;
    margin: 0;
    padding: 0;
  }
}

/* Final back-button hard reset: one CSS chevron only, no icon glyph/SVG leakage. */
.icon-btn.back {
  all: unset !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  align-items: center !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  color: #0b1020 !important;
  display: inline-flex !important;
  flex: 0 0 44px !important;
  font-size: 0 !important;
  height: 44px !important;
  justify-content: center !important;
  line-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: relative !important;
  width: 44px !important;
}

.icon-btn.back > *:not(.back-arrow) {
  display: none !important;
}

.icon-btn.back::before,
.icon-btn.back::after {
  content: none !important;
  display: none !important;
}

.icon-btn.back .back-arrow {
  border-bottom: 4px solid currentColor;
  border-left: 4px solid currentColor;
  display: block !important;
  height: 18px;
  transform: rotate(45deg);
  width: 18px;
}

.subpage-shell .topbar > .icon-btn.back .back-arrow,
.app-shell.subpage-shell .topbar > .icon-btn.back .back-arrow {
  display: block !important;
}

/* Final chat control polish: remove bulky legacy circles and malformed mixed icons. */
.icon-btn.back {
  all: unset !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  color: #111827 !important;
  display: inline-flex !important;
  flex: 0 0 40px !important;
  height: 40px !important;
  justify-content: center !important;
  margin: 0 2px 0 -6px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: relative !important;
  width: 40px !important;
}

.icon-btn.back > *:not(.back-arrow),
.icon-btn.back > svg,
.icon-btn.back > .ui-icon,
.icon-btn.back::before,
.icon-btn.back::after {
  content: none !important;
  display: none !important;
}

.icon-btn.back .back-arrow {
  border-bottom: 2.6px solid currentColor !important;
  border-left: 2.6px solid currentColor !important;
  display: block !important;
  height: 14px !important;
  transform: rotate(45deg) translate(1px, -1px) !important;
  width: 14px !important;
}

.composer-dock .composer {
  align-items: center !important;
  gap: 6px !important;
  grid-template-columns: 44px minmax(0, 1fr) 44px auto !important;
  padding: 8px 10px max(8px, env(safe-area-inset-bottom)) !important;
}

.composer-dock .composer-tool,
.composer-dock .voice-entry {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  color: #111827 !important;
  display: inline-flex !important;
  height: 44px !important;
  justify-content: center !important;
  min-height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  width: 44px !important;
}

.composer-dock .composer-tool:active,
.composer-dock .voice-entry:active,
.composer-inline-tool:active,
.chat-emoji-tabs .keyboard-close:active {
  background: #eef0f3 !important;
}

.composer-dock .composer-tool .ui-icon,
.composer-dock .voice-entry .ui-icon {
  height: 28px !important;
  stroke-width: 2.25 !important;
  width: 28px !important;
}

.composer-input-wrap {
  border-radius: 23px !important;
  grid-template-columns: minmax(0, 1fr) 44px !important;
  min-height: 46px !important;
}

.composer-input-wrap .field,
.composer-dock .composer .field {
  font-size: 16px !important;
  min-height: 46px !important;
}

.composer-inline-tool {
  height: 44px !important;
  width: 44px !important;
}

.composer-inline-tool .ui-icon {
  height: 26px !important;
  stroke-width: 2.2 !important;
  width: 26px !important;
}

.chat-emoji-tabs .keyboard-close {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 12px !important;
  color: #111827 !important;
  display: inline-flex !important;
  height: 42px !important;
  justify-content: center !important;
  min-width: 42px !important;
  padding: 0 !important;
}

.chat-emoji-tabs .keyboard-close .ui-icon {
  height: 24px !important;
  stroke-width: 2.1 !important;
  width: 24px !important;
}

html[data-effective-theme="dark"] .icon-btn.back,
html[data-theme="dark"] .icon-btn.back,
html[data-effective-theme="dark"] .composer-dock .composer-tool,
html[data-theme="dark"] .composer-dock .composer-tool,
html[data-effective-theme="dark"] .composer-dock .voice-entry,
html[data-theme="dark"] .composer-dock .voice-entry,
html[data-effective-theme="dark"] .chat-emoji-tabs .keyboard-close,
html[data-theme="dark"] .chat-emoji-tabs .keyboard-close {
  color: #f8fafc !important;
}

/* Guard against contact shortcut pseudo-icons leaking onto chat page containers. */
.chat.group-chat::before,
.chat.group-chat::after,
.im-chat.group-chat::before,
.im-chat.group-chat::after {
  content: none !important;
  display: none !important;
}

/* Final chat header fit: title must never overlap search/more buttons. */
.app-shell.chat-detail-shell:not(.auth-shell) .topbar {
  align-items: center !important;
  gap: 8px !important;
  min-height: 74px !important;
  padding: calc(env(safe-area-inset-top) + 8px) 10px 8px !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .topbar h1.has-chat-title {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  pointer-events: auto !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .chat-title {
  gap: 10px !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .chat-title-avatar {
  border-radius: 14px !important;
  height: 46px !important;
  width: 46px !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .chat-title-copy {
  min-width: 0 !important;
  overflow: hidden !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .chat-title-copy strong,
.app-shell.chat-detail-shell:not(.auth-shell) .chat-title-copy em {
  display: block !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .chat-title-copy strong {
  font-size: 21px !important;
  line-height: 1.15 !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .chat-title-copy em {
  font-size: 14px !important;
  line-height: 1.25 !important;
  margin-top: 3px !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .topbar-actions {
  flex: 0 0 auto !important;
  gap: 8px !important;
  height: 42px !important;
  margin-left: 0 !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .topbar-actions .round-action {
  border-radius: 16px !important;
  height: 42px !important;
  width: 42px !important;
}

@media (max-width: 420px) {
  .app-shell.chat-detail-shell:not(.auth-shell) .topbar {
    gap: 6px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .chat-title {
    grid-template-columns: 40px minmax(0, 1fr) !important;
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .chat-title-avatar {
    border-radius: 12px !important;
    height: 40px !important;
    width: 40px !important;
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .chat-title-copy strong {
    font-size: 18px !important;
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .chat-title-copy em {
    font-size: 13px !important;
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .topbar-actions {
    gap: 6px !important;
  }

  .app-shell.chat-detail-shell:not(.auth-shell) .topbar-actions .round-action {
    height: 40px !important;
    width: 40px !important;
  }
}

/* Final chat header grid: cancel old absolute title positioning completely. */
.app-shell.chat-detail-shell:not(.auth-shell) .topbar {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) max-content !important;
  grid-template-rows: 1fr !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .topbar > .icon-btn.back {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: center !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .topbar > h1.has-chat-title {
  bottom: auto !important;
  box-sizing: border-box !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: stretch !important;
  left: auto !important;
  line-height: normal !important;
  margin: 0 !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  pointer-events: auto !important;
  position: static !important;
  right: auto !important;
  text-align: left !important;
  top: auto !important;
  width: auto !important;
  z-index: 1 !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .topbar > .topbar-actions {
  align-self: center !important;
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  position: static !important;
  z-index: 2 !important;
}

/* Final chat bottom fit: remove the unused white strip below the composer. */
.app-shell.chat-detail-shell:not(.auth-shell) .page-sub {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .im-chat {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  height: 100% !important;
  margin: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .chat .messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding-bottom: 12px !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .composer-dock {
  flex: 0 0 auto !important;
  margin: 0 !important;
}

.outbox-chip {
  align-items: center;
  background: rgba(255, 255, 255, .92);
  border-top: 1px solid rgba(15, 23, 42, .08);
  color: #667085;
  display: flex;
  font-size: 13px;
  gap: 10px;
  justify-content: center;
  padding: 7px 12px;
}

.outbox-chip button {
  background: #e8f8ef;
  border: 0;
  border-radius: 999px;
  color: #159947;
  font-weight: 700;
  padding: 5px 10px;
}

.admin-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.admin-stat {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  padding: 12px;
}

.admin-stat span,
.admin-stat b {
  display: block;
}

.admin-stat span {
  color: #667085;
  font-size: 12px;
}

.admin-stat b {
  color: #101828;
  font-size: 22px;
  margin-top: 4px;
}

.admin-tabs {
  background: #eef1f4;
  border-radius: 14px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 8px 0 14px;
  padding: 4px;
}

.admin-tabs button {
  background: transparent;
  border: 0;
  border-radius: 11px;
  color: #667085;
  font-weight: 700;
  min-height: 38px;
}

.admin-tabs button.active {
  background: #fff;
  color: #101828;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}

@media (max-width: 420px) {
  .admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.app-shell.chat-detail-shell:not(.auth-shell) .composer-dock .composer {
  padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
  padding-top: 7px !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .im-chat.chat-loading {
  position: relative !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .im-chat.chat-loading::after {
  animation: chatLoadPulse 1s ease-in-out infinite;
  background:
    radial-gradient(circle, #2fd06e 0 5px, transparent 6px) 50% 28% / 100% 100% no-repeat,
    rgba(255, 255, 255, .76);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
  color: #667085;
  content: "";
  font-size: 14px;
  height: 42px;
  left: 50%;
  padding: 0;
  position: absolute;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 42px;
  z-index: 3;
}

.app-shell.chat-detail-shell:not(.auth-shell) .messages.messages-pending {
  opacity: 0 !important;
  pointer-events: none !important;
}

.app-shell.chat-detail-shell:not(.auth-shell) .messages.messages-ready {
  opacity: 1 !important;
  transition: opacity .12s ease !important;
}

@keyframes chatLoadPulse {
  0%, 100% {
    opacity: .72;
  }
  50% {
    opacity: 1;
  }
}

html[data-effective-theme="dark"] .app-shell.chat-detail-shell:not(.auth-shell) .im-chat.chat-loading::after,
html[data-theme="dark"] .app-shell.chat-detail-shell:not(.auth-shell) .im-chat.chat-loading::after {
  background:
    radial-gradient(circle, #2fd06e 0 5px, transparent 6px) 50% 28% / 100% 100% no-repeat,
    rgba(17, 24, 39, .78);
  color: #d6dde8;
}

.wallet-context-card,
.transfer-card {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  display: flex;
  gap: 12px;
  padding: 14px;
}

.wallet-context-card > span,
.transfer-icon {
  align-items: center;
  background: #2fd06e;
  border-radius: 14px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 46px;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.wallet-context-card .ui-icon,
.transfer-icon .ui-icon {
  height: 24px;
  width: 24px;
}

.wallet-context-card b,
.transfer-card b,
.transfer-card strong,
.wallet-context-card em,
.transfer-card em {
  display: block;
}

.wallet-context-card b,
.transfer-card b {
  color: #101828;
  font-size: 16px;
}

.wallet-context-card em,
.transfer-card em {
  color: #8a93a3;
  font-size: 13px;
  font-style: normal;
  margin-top: 3px;
}

.transfer-card strong {
  color: #101828;
  font-size: 22px;
  line-height: 1.2;
  margin-top: 4px;
}

html[data-effective-theme="dark"] .wallet-context-card,
html[data-effective-theme="dark"] .transfer-card,
html[data-theme="dark"] .wallet-context-card,
html[data-theme="dark"] .transfer-card {
  background: #151a23;
  border-color: rgba(148, 163, 184, .18);
}

html[data-effective-theme="dark"] .wallet-context-card b,
html[data-effective-theme="dark"] .transfer-card b,
html[data-effective-theme="dark"] .transfer-card strong,
html[data-theme="dark"] .wallet-context-card b,
html[data-theme="dark"] .transfer-card b,
html[data-theme="dark"] .transfer-card strong {
  color: #f8fafc;
}

html[data-effective-theme="dark"] .outbox-chip,
html[data-theme="dark"] .outbox-chip {
  background: rgba(17, 24, 39, .92);
  border-color: rgba(148, 163, 184, .18);
  color: #cbd5e1;
}

html[data-effective-theme="dark"] .outbox-chip button,
html[data-theme="dark"] .outbox-chip button {
  background: rgba(47, 208, 110, .18);
  color: #86efac;
}

html[data-effective-theme="dark"] .admin-stat,
html[data-theme="dark"] .admin-stat,
html[data-effective-theme="dark"] .admin-tabs button.active,
html[data-theme="dark"] .admin-tabs button.active {
  background: #151a23;
  border-color: rgba(148, 163, 184, .18);
}

html[data-effective-theme="dark"] .admin-tabs,
html[data-theme="dark"] .admin-tabs {
  background: #0f141d;
}

html[data-effective-theme="dark"] .admin-stat b,
html[data-theme="dark"] .admin-stat b,
html[data-effective-theme="dark"] .admin-tabs button.active,
html[data-theme="dark"] .admin-tabs button.active {
  color: #f8fafc;
}
