:root {
  --bg: #0b0d10;
  --panel: #15181f;
  --line: #232833;
  --text: #e8ebf2;
  --sub: #8b93a7;
  --green: #07c160;
  --danger: #ff4d4f;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #05070a;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
}

button,
input,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

input,
textarea {
  outline: none;
}

[v-cloak] {
  display: none !important;
}

.hidden {
  display: none !important;
}

.phone {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #14171d;
  border-right: 1px solid #14171d;
}

@media (min-width: 520px) {
  .phone {
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.65);
  }
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-thumb {
  background: #2b3140;
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- splash ---------- */

.splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--green);
  color: #04210f;
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(7, 193, 96, 0.25);
}

.muted {
  color: var(--sub);
  font-size: 13px;
}

/* ---------- auth ---------- */

.auth {
  flex: 1;
  overflow-y: auto;
  padding: 40px 24px calc(30px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-box {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.auth-logo {
  margin: 0 auto 18px;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.5px;
}

.auth-sub {
  margin: 0 0 26px;
  text-align: center;
  color: var(--sub);
  font-size: 13px;
}

.auth-tabs {
  display: flex;
  background: #10131a;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 22px;
}

.auth-tab {
  flex: 1;
  height: 38px;
  border-radius: 9px;
  color: var(--sub);
  font-size: 14px;
  font-weight: 600;
}

.auth-tab.active {
  background: #1d232e;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.field {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 12px;
  color: var(--sub);
  margin-bottom: 7px;
}

.input {
  width: 100%;
  height: 46px;
  background: #12151c;
  border: 1px solid #252b37;
  border-radius: 10px;
  padding: 0 13px;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.15s ease;
}

.input:focus,
.form-input:focus,
.modal-input:focus {
  border-color: rgba(7, 193, 96, 0.65);
}

.input::placeholder,
.form-input::placeholder,
.modal-input::placeholder,
.input-box::placeholder {
  color: #565e70;
}

.btn {
  height: 44px;
  border-radius: 10px;
  padding: 0 18px;
  background: #202633;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn.primary {
  background: var(--green);
  color: #04210f;
}

.btn.ghost {
  background: #1a1f29;
  border: 1px solid #2a3040;
  color: var(--text);
}

.btn.danger {
  background: rgba(255, 77, 79, 0.13);
  border: 1px solid rgba(255, 77, 79, 0.4);
  color: var(--danger);
}

.btn.block {
  width: 100%;
}

.btn.small {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}

.auth-hint {
  margin: 18px 0 0;
  color: #667087;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

/* ---------- main layout ---------- */

.main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  min-height: 54px;
  background: linear-gradient(180deg, #11141a 0%, #0e1117 100%);
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  flex: 1;
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.topbar-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #1a1f29;
  border: 1px solid #262c39;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:active {
  background: #232a37;
}

.list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: calc(78px + var(--safe-bottom));
  overscroll-behavior: contain;
}

.section-title {
  padding: 16px 16px 8px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.row:active {
  background: #151a23;
}

.row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.row-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-time {
  flex: 0 0 auto;
  color: #667087;
  font-size: 11px;
}

.row-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-summary {
  flex: 1;
  min-width: 0;
  color: var(--sub);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-sub {
  color: var(--sub);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.badge.soft {
  background: rgba(7, 193, 96, 0.16);
  color: var(--green);
}

.empty {
  padding: 60px 30px;
  text-align: center;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.8;
}

.empty-icon {
  font-size: 34px;
  opacity: 0.5;
  margin-bottom: 10px;
}

/* ---------- avatars ---------- */

.avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 700;
  color: #08110b;
  overflow: hidden;
  background: #293040;
  user-select: none;
}

img.avatar {
  display: block;
}

.avatar.sm {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 16px;
}

.avatar.lg {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  font-size: 27px;
}

.online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #555d6d;
  border: 2px solid var(--bg);
  box-sizing: border-box;
}

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

.inline-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #59606f;
  margin-right: 5px;
  vertical-align: 1px;
}

.inline-dot.on {
  background: var(--green);
  box-shadow: 0 0 6px rgba(7, 193, 96, 0.6);
}

/* ---------- tabbar ---------- */

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: flex;
  background: rgba(16, 19, 26, 0.98);
  border-top: 1px solid var(--line);
  padding: 5px 0 calc(5px + var(--safe-bottom));
  backdrop-filter: blur(14px);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 0;
  color: #737c90;
  font-size: 11px;
  position: relative;
}

.tab.active {
  color: var(--green);
}

.tab-icon {
  font-size: 20px;
  line-height: 1;
  filter: grayscale(0.5);
  opacity: 0.8;
}

.tab.active .tab-icon {
  filter: none;
  opacity: 1;
}

.tab-badge {
  position: absolute;
  top: 1px;
  left: 54%;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  line-height: 17px;
  text-align: center;
  font-weight: 600;
}

/* ---------- chat list extras ---------- */

.entry {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(35, 40, 51, 0.5);
}

.entry-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(7, 193, 96, 0.13);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex: 0 0 auto;
}

.entry-arrow {
  color: #4d5566;
  font-size: 18px;
  margin-left: 4px;
}

/* ---------- chat page ---------- */

.chat-page {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.chat-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 56px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  background: #10131a;
  border-bottom: 1px solid var(--line);
}

.back-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.back-btn:active {
  background: #1d222c;
}

.chat-title {
  flex: 1;
  min-width: 0;
  padding: 0 4px;
}

.chat-name {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-sub {
  margin-top: 2px;
  color: var(--sub);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-profile-btn {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: #1a1f29;
  border: 1px solid #262c39;
  color: var(--sub);
  font-size: 12px;
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px 14px;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 20% 0%, rgba(7, 193, 96, 0.035), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(53, 80, 130, 0.05), transparent 50%);
}

.load-more {
  margin: 6px auto 14px;
  width: max-content;
  padding: 7px 14px;
  border-radius: 14px;
  background: #171c25;
  border: 1px solid var(--line);
  color: var(--sub);
  font-size: 12px;
  cursor: pointer;
}

.load-end {
  margin: 4px 0 14px;
  text-align: center;
  color: #4f5768;
  font-size: 11px;
}

.msg-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0;
}

.msg-row.mine {
  flex-direction: row-reverse;
}

.msg-body {
  max-width: 76%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.msg-row.mine .msg-body {
  align-items: flex-end;
}

.msg-sender {
  margin: 0 4px 4px;
  color: #778199;
  font-size: 11px;
}

.bubble {
  max-width: 100%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bubble.other {
  background: #1c212b;
  border: 1px solid #272d3a;
  border-top-left-radius: 4px;
  color: var(--text);
}

.bubble.mine {
  background: var(--green);
  color: #06210f;
  border-top-right-radius: 4px;
}

.msg-text {
  white-space: pre-wrap;
}

.msg-time {
  margin: 4px 4px 0;
  color: #596173;
  font-size: 10px;
}

.msg-row.mine .msg-time {
  text-align: right;
}

.bubble-img {
  padding: 0;
  border: 1px solid #2a3140;
  background: #171b23;
  overflow: hidden;
  line-height: 0;
}

.bubble-img.mine {
  border-color: rgba(7, 193, 96, 0.45);
}

.msg-img {
  display: block;
  max-width: 210px;
  max-height: 260px;
  width: auto;
  height: auto;
  cursor: pointer;
  object-fit: cover;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  max-width: 240px;
  cursor: pointer;
}

.file-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex: 0 0 auto;
}

.bubble.other .file-icon {
  background: #293040;
  color: var(--green);
}

.bubble.mine .file-icon {
  background: rgba(4, 33, 15, 0.16);
  color: #06210f;
}

.file-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.file-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 10px;
  opacity: 0.66;
}

.voice-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 92px;
  cursor: pointer;
  user-select: none;
}

.voice-play {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex: 0 0 auto;
}

.bubble.other .voice-play {
  background: #293040;
  color: var(--green);
}

.bubble.mine .voice-play {
  background: rgba(4, 33, 15, 0.16);
  color: #06210f;
}

.voice-duration {
  font-size: 12px;
  opacity: 0.8;
}

.voice-bar.playing .voice-play {
  animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.recall-msg,
.system-msg {
  margin: 10px 0;
  text-align: center;
  color: #626b7e;
  font-size: 11px;
  line-height: 1.6;
}

.system-msg {
  padding: 3px 12px;
}

.typing {
  margin: 6px 4px 2px;
  color: #6c7588;
  font-size: 11px;
  min-height: 16px;
}

/* ---------- composer ---------- */

.composer {
  flex: 0 0 auto;
  background: #10131a;
  border-top: 1px solid var(--line);
  padding: 8px 10px calc(8px + var(--safe-bottom));
  position: relative;
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.round-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1b2029;
  border: 1px solid #262c39;
  color: #9aa3b7;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.round-btn:active {
  background: #252c39;
}

.round-btn.plus {
  font-size: 22px;
}

.input-box {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  max-height: 110px;
  resize: none;
  background: #171b23;
  border: 1px solid #252b37;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
}

.send-btn {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  background: var(--green);
  color: #04210f;
  font-size: 13px;
  font-weight: 700;
}

.send-btn:disabled {
  opacity: 0.4;
}

.emoji-panel {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  max-height: 188px;
  overflow-y: auto;
  padding: 10px 2px 2px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.emoji-btn {
  height: 34px;
  border-radius: 7px;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-btn:active {
  background: #232a37;
}

.plus-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 6px 4px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.plus-item {
  background: #171b23;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}

.plus-item:active {
  background: #1e242f;
}

.plus-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #222834;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.muted-bar {
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(255, 77, 79, 0.08);
  border: 1px solid rgba(255, 77, 79, 0.25);
  color: #ff9a9c;
  font-size: 12px;
  text-align: center;
  line-height: 1.5;
}

.recording-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #1b1315;
  border: 1px solid rgba(255, 77, 79, 0.35);
  color: #ffb3b5;
  font-size: 13px;
}

.rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  animation: recBlink 1s ease-in-out infinite;
  flex: 0 0 auto;
}

@keyframes recBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

.recording-time {
  flex: 1;
  font-variant-numeric: tabular-nums;
}

.rec-action {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffd6d7;
  font-size: 12px;
}

.rec-action.primary {
  background: var(--danger);
  color: #fff;
  font-weight: 600;
}

/* ---------- subpages ---------- */

.subpage {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.subpage-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px calc(24px + var(--safe-bottom));
}

.subpage-footer {
  flex: 0 0 auto;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: #10131a;
}

.subpage-title {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  padding-right: 34px;
}

.subpage .topbar {
  min-height: 56px;
}

/* ---------- requests ---------- */

.request-row {
  align-items: flex-start;
  border-bottom: 1px solid rgba(35, 40, 51, 0.5);
}

.row-actions {
  display: flex;
  gap: 7px;
  flex: 0 0 auto;
  align-self: center;
}

/* ---------- search ---------- */

.search-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #10131a;
}

.search-input {
  flex: 1;
  height: 38px;
  background: #171b23;
  border: 1px solid #252b37;
  border-radius: 9px;
  padding: 0 12px;
  color: var(--text);
  font-size: 14px;
}

.result-row {
  border-bottom: 1px solid rgba(35, 40, 51, 0.5);
}

.relation {
  flex: 0 0 auto;
  color: #667087;
  font-size: 12px;
}

/* ---------- profile ---------- */

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 18px;
  margin-bottom: 10px;
  background: linear-gradient(150deg, #171c25, #12161d);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.profile-info {
  min-width: 0;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-username {
  margin-top: 5px;
  color: var(--sub);
  font-size: 12px;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(35, 40, 51, 0.6);
  cursor: pointer;
}

.detail-label {
  flex: 0 0 auto;
  color: var(--sub);
  font-size: 13px;
  width: 64px;
}

.detail-value {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.detail-value.placeholder {
  color: #596173;
}

.detail-arrow {
  color: #4d5566;
  font-size: 16px;
}

/* ---------- me ---------- */

.me-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 18px;
  background: linear-gradient(150deg, #171c25, #12161d);
  border-bottom: 1px solid var(--line);
}

.me-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.me-name {
  font-size: 21px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-username {
  margin-top: 5px;
  color: var(--sub);
  font-size: 12px;
}

.me-bio {
  margin-top: 8px;
  color: #778199;
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.me-avatar-edit {
  position: relative;
  cursor: pointer;
}

.avatar-camera {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #222a37;
  border: 2px solid var(--bg);
  color: var(--green);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- group info ---------- */

.group-card {
  padding: 18px;
  background: #141821;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 14px;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.group-name {
  font-size: 19px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-meta {
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
}

.announcement-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(35, 40, 51, 0.85);
}

.announcement-head {
  display: flex;
  align-items: center;
  margin-bottom: 7px;
}

.announcement-title {
  flex: 1;
  color: var(--sub);
  font-size: 12px;
  font-weight: 600;
}

.mini-link {
  color: var(--green);
  font-size: 12px;
  padding: 3px 4px;
}

.announcement-text {
  color: #b8c0d2;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.announcement-text.empty-text {
  color: #596173;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 6px;
}

.action-tile {
  background: #171b23;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text);
}

.action-tile:active {
  background: #1e242f;
}

.action-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #222834;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(35, 40, 51, 0.5);
  cursor: pointer;
}

.member-row:active {
  background: #141821;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-sub {
  margin-top: 3px;
  color: #667087;
  font-size: 11px;
}

.role-badge {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  vertical-align: 1px;
}

.role-badge.owner {
  background: rgba(255, 176, 32, 0.14);
  color: #ffb020;
}

.role-badge.admin {
  background: rgba(7, 193, 96, 0.13);
  color: var(--green);
}

.mute-tag {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 77, 79, 0.12);
  color: #ff7a7c;
  font-size: 10px;
}

.group-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

/* ---------- forms / pickers ---------- */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 7px;
  color: var(--sub);
  font-size: 12px;
}

.form-input {
  width: 100%;
  height: 44px;
  background: #12151c;
  border: 1px solid #252b37;
  border-radius: 9px;
  padding: 0 12px;
  color: var(--text);
  font-size: 14px;
}

.form-hint {
  margin-top: 7px;
  color: #667087;
  font-size: 11px;
  line-height: 1.6;
}

.pick-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #12161d;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(35, 40, 51, 0.6);
  cursor: pointer;
}

.pick-row:last-child {
  border-bottom: none;
}

.pick-row:active {
  background: #171c25;
}

.pick-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  flex: 0 0 auto;
  cursor: pointer;
}

.pick-note {
  color: var(--sub);
  font-size: 11px;
}

/* ---------- overlays ---------- */

.modal-mask {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  width: 100%;
  max-width: 360px;
  background: #161a22;
  border: 1px solid #2a3140;
  border-radius: 15px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.modal-text {
  margin: 0 0 14px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.6;
}

.modal-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  background: #10141b;
  border: 1px solid #2a3140;
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 16px;
}

.sheet-mask {
  position: absolute;
  inset: 0;
  z-index: 75;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
}

.sheet {
  width: 100%;
  background: #15181f;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  padding: 8px 10px calc(10px + var(--safe-bottom));
  border-top: 1px solid #2a3140;
  max-height: 80%;
  overflow-y: auto;
}

.sheet-title {
  padding: 11px 12px;
  color: var(--sub);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-item {
  width: 100%;
  padding: 15px 12px;
  border-radius: 10px;
  text-align: center;
  color: var(--text);
  font-size: 15px;
}

.sheet-item:active {
  background: #222834;
}

.sheet-item.danger {
  color: var(--danger);
}

.sheet-item.cancel {
  margin-top: 6px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  color: var(--sub);
  font-size: 14px;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 100;
  max-width: 82%;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(32, 37, 48, 0.97);
  border: 1px solid #343c4d;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.lightbox {
  position: absolute;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uploading-pill {
  position: absolute;
  left: 50%;
  top: 70px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 7px 14px;
  border-radius: 14px;
  background: rgba(21, 24, 31, 0.95);
  border: 1px solid var(--line);
  color: var(--sub);
  font-size: 12px;
}

/* ---------- 语音/视频通话 ---------- */
.chat-call-btns {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.chat-call-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1a1f29;
  border: 1px solid #262c39;
  color: var(--sub);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.chat-call-btn:active {
  background: #232a37;
  color: var(--text);
}

.chat-call-btn:disabled {
  opacity: 0.45;
}

.call-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #05070a;
  color: #fff;
  display: flex;
  flex-direction: column;
  overscroll-behavior: none;
}

.incoming-mask {
  z-index: 90;
  align-items: center;
  justify-content: center;
  background: rgba(3, 5, 8, 0.92);
  backdrop-filter: blur(8px);
}

.incoming-card {
  width: min(320px, 86vw);
  padding: 28px 24px 24px;
  border-radius: 22px;
  background: #10141b;
  border: 1px solid #232a36;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.incoming-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 600;
  color: #0b0f14;
}

.incoming-name {
  font-size: 20px;
  font-weight: 600;
}

.incoming-type {
  margin-top: 6px;
  color: #9aa6b8;
  font-size: 13px;
}

.incoming-actions {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-top: 28px;
}

.call-active {
  padding: calc(14px + env(safe-area-inset-top, 0px)) 0 calc(14px + env(safe-area-inset-bottom, 0px));
}

.call-top {
  text-align: center;
  padding: 4px 20px 10px;
  flex: 0 0 auto;
}

.call-top-name {
  font-size: 17px;
  font-weight: 600;
}

.call-top-status {
  margin-top: 4px;
  color: #9aa6b8;
  font-size: 12px;
}

.call-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.call-audio-stage {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.call-avatar-big {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 600;
  color: #0b0f14;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.03);
}

.call-audio-name {
  margin-top: 18px;
  font-size: 20px;
  font-weight: 600;
}

.call-audio-tip {
  margin-top: 8px;
  color: #9aa6b8;
  font-size: 13px;
}

.call-audio-people {
  margin-top: 6px;
  color: #6f7b8d;
  font-size: 12px;
  max-width: 80vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-video-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  padding: 6px;
  align-content: center;
}

.call-video-tile {
  position: relative;
  min-height: 130px;
  background: #0d1117;
  border-radius: 12px;
  overflow: hidden;
}

.call-remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.call-video-name {
  position: absolute;
  left: 8px;
  bottom: 6px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 11px;
  color: #e8eef8;
}

.call-local-video {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 96px;
  height: 132px;
  border-radius: 12px;
  overflow: hidden;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 2;
}

.call-local-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.call-camera-off {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 96px;
  height: 132px;
  border-radius: 12px;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6f7b8d;
  font-size: 11px;
  text-align: center;
}

.call-audio-box {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.call-bottom {
  flex: 0 0 auto;
  padding: 10px 16px 4px;
}

.call-timer {
  text-align: center;
  color: #9aa6b8;
  font-size: 12px;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.call-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.call-round {
  min-width: 64px;
  height: 58px;
  padding: 0 14px;
  border-radius: 18px;
  background: #1a202b;
  border: 1px solid #2a3342;
  color: #e8eef8;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.call-round:active {
  background: #242c39;
}

.call-round.off {
  color: #9aa6b8;
  background: #141922;
}

.call-round.accept {
  background: #07c160;
  border-color: #07c160;
  color: #04130a;
  font-weight: 600;
  min-width: 88px;
  height: 64px;
  border-radius: 22px;
}

.call-round.hangup {
  background: #e5484d;
  border-color: #e5484d;
  color: #fff;
  font-weight: 600;
  min-width: 88px;
  height: 64px;
  border-radius: 22px;
}

.call-round.endall {
  background: #2b3442;
  border-color: #39465a;
  color: #cfe0ff;
}

.apk-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  color: #7fdc9b;
  font-size: 12px;
  text-decoration: none;
}

.call-hint {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(10px + env(safe-area-inset-top, 0px));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0f1a14;
  border: 1px solid #1f6b42;
  color: #ccebd9;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.call-hint-text {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-hint-join {
  height: 30px;
  padding: 0 14px;
  border-radius: 8px;
  background: #07c160;
  color: #04130a;
  font-size: 12px;
  font-weight: 600;
}

.call-hint-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1a2520;
  color: #9fb3a8;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
