/* ============================================================
   微光 · 设计系统
   风格：iOS / Apple 原生质感 · 大标题 · 毛玻璃 · 克制的阴影
   ============================================================ */

:root {
  color-scheme: light dark;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --blue: #007AFF;
  --blue-strong: #0A6CFF;
  --green: #30D158;
  --green-bubble: #A8EF7E;
  --red: #FF3B30;
  --orange: #FF9500;

  --bg: #F2F2F7;
  --bg-elevated: #FFFFFF;
  --card: #FFFFFF;
  --card-muted: #F9F9FB;
  --fill: rgba(120, 120, 128, 0.12);
  --fill-strong: rgba(120, 120, 128, 0.2);

  --label: #0B0B0F;
  --label-2: rgba(60, 60, 67, 0.62);
  --label-3: rgba(60, 60, 67, 0.5);
  --separator: rgba(60, 60, 67, 0.14);
  --hairline: rgba(60, 60, 67, 0.16);

  --nav-bg: rgba(242, 242, 247, 0.78);
  --tab-bg: rgba(249, 249, 251, 0.82);
  --sheet-bg: #F7F7FA;
  --chat-bg: #EEEEF3;

  --bubble-in: #FFFFFF;
  --bubble-out: #A8EF7E;
  --bubble-out-2: #8FE96B;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(20, 20, 35, 0.08);
  --shadow-lg: 0 28px 70px rgba(16, 16, 28, 0.22);

  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tabbar-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #1C1C1E;
    --card: #1C1C1E;
    --card-muted: #232326;
    --fill: rgba(120, 120, 128, 0.22);
    --fill-strong: rgba(120, 120, 128, 0.34);

    --label: #F5F5F7;
    --label-2: rgba(235, 235, 245, 0.66);
    --label-3: rgba(235, 235, 245, 0.5);
    --separator: rgba(84, 84, 88, 0.5);
    --hairline: rgba(84, 84, 88, 0.55);

    --nav-bg: rgba(10, 10, 12, 0.74);
    --tab-bg: rgba(22, 22, 24, 0.82);
    --sheet-bg: #1C1C1E;
    --chat-bg: #000000;

    --bubble-in: #26262A;
    --bubble-out: #2E7D45;
    --bubble-out-2: #26683A;

    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--label);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(10, 132, 255, 0.14), transparent 60%),
    radial-gradient(900px 500px at 95% 20%, rgba(48, 209, 88, 0.10), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(191, 90, 242, 0.10), transparent 60%),
    #E8E8EE;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(1000px 600px at 10% -10%, rgba(10, 132, 255, 0.18), transparent 60%),
      radial-gradient(800px 500px at 95% 10%, rgba(48, 209, 88, 0.10), transparent 60%),
      #0A0A0C;
  }
}

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
input, textarea { font-family: inherit; color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 8px;
}

.stage {
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

@media (min-width: 720px) and (min-height: 720px) {
  .app {
    height: min(896px, calc(100dvh - 56px));
    border-radius: 40px;
    box-shadow: 0 40px 90px rgba(12, 12, 24, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  }
}

@media (prefers-color-scheme: dark) {
  .app { box-shadow: 0 40px 90px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08) inset; }
}

/* ============================================================
   登录 / 注册
   ============================================================ */

.auth-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 24px) 22px calc(env(safe-area-inset-bottom) + 24px);
}

.aurora { position: absolute; inset: 0; overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}
.blob.b1 { width: 320px; height: 320px; top: -90px; left: -80px; background: radial-gradient(circle, #8FD8FF, #4A9EFF 60%, transparent 72%); }
.blob.b2 { width: 300px; height: 300px; bottom: -80px; right: -70px; background: radial-gradient(circle, #C9FFB5, #46D97A 55%, transparent 72%); animation-delay: -6s; }
.blob.b3 { width: 240px; height: 240px; top: 34%; right: -110px; background: radial-gradient(circle, #FFD1E8, #C07CF5 58%, transparent 72%); animation-delay: -11s; opacity: 0.4; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -24px, 0) scale(1.06); }
}

.auth-content {
  position: relative;
  width: 100%;
  max-width: 360px;
  max-height: 100%;
  overflow-y: auto;
  padding: 20px 0 18px;
  scrollbar-width: none;
}

.brand { text-align: center; margin-bottom: 24px; }
.brand-mark {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #34C6FF 0%, #0A84FF 46%, #5E5CE6 100%);
  box-shadow: 0 16px 34px rgba(10, 132, 255, 0.35), 0 1px 0 rgba(255, 255, 255, 0.45) inset;
}
.brand h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--label-2);
  letter-spacing: 0.02em;
}

.auth-card {
  background: color-mix(in srgb, var(--card) 80%, transparent);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid color-mix(in srgb, var(--label) 6%, transparent);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--fill);
}
.segmented .seg-thumb {
  position: absolute;
  top: 4px; left: 4px;
  width: calc(50% - 6px);
  height: calc(100% - 8px);
  border-radius: 9px;
  background: var(--card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.32s var(--spring);
}
.segmented[data-mode="register"] .seg-thumb { transform: translateX(calc(100% + 4px)); }
.seg-item {
  position: relative;
  z-index: 1;
  height: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--label-2);
  transition: color 0.2s;
}
.seg-item.is-active { color: var(--label); font-weight: 600; }

.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--label-2);
  letter-spacing: 0.02em;
  margin: 0 4px 7px;
}
.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font-size: 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--fill);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus { border-color: var(--blue); background: var(--card); }

.btn-primary {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #3A9BFF, #0077ED);
  box-shadow: 0 8px 20px rgba(10, 110, 255, 0.32);
  transition: transform 0.18s var(--ease-ios), filter 0.2s;
}
.btn-primary:active { transform: scale(0.97); filter: brightness(0.94); }
.btn-primary:disabled { opacity: 0.6; }

.auth-error {
  min-height: 16px;
  margin: 10px 2px 0;
  font-size: 12.5px;
  color: var(--red);
}

.auth-foot {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--label-3);
  text-align: center;
}

/* ============================================================
   主界面 / 导航
   ============================================================ */

.main-screen { position: absolute; inset: 0; display: flex; flex-direction: column; }

.navbar {
  flex: none;
  padding: calc(env(safe-area-inset-top) + 6px) 12px 4px;
  background: var(--nav-bg);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.25s, padding 0.25s var(--ease-ios);
  z-index: 20;
}
.navbar.is-compact { border-bottom-color: var(--separator); padding-top: calc(env(safe-area-inset-top) + 2px); }

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 4px;
}
.nav-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  transform-origin: left center;
  transition: font-size 0.25s var(--ease-ios), transform 0.25s var(--ease-ios);
}
.navbar.is-compact .nav-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--label);
  background: var(--fill);
  transition: transform 0.2s var(--spring), background 0.2s;
}
.nav-btn:active { transform: scale(0.9); background: var(--fill-strong); }
.nav-btn svg { width: 19px; height: 19px; }
.nav-btn[hidden] { display: none; }

.pages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 12px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pages::-webkit-scrollbar { display: none; }

.page { display: none; animation: pageIn 0.32s var(--ease-ios); }
.page.is-active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-search { margin: 2px 0 12px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--fill);
}
.search-field .search-icon { display: inline-flex; color: var(--label-3); }
.search-icon svg { width: 16px; height: 16px; }
.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 15px;
}
.search-field input::placeholder { color: var(--label-3); }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-cancel { color: var(--blue); font-size: 15px; padding-left: 4px; }

/* 底部标签栏 */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px 6px calc(env(safe-area-inset-bottom) + 2px);
  background: var(--tab-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 0.5px solid var(--hairline);
}
.tab-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 0 3px;
  color: var(--label-3);
  transition: color 0.2s;
}
.tab-icon svg { width: 25px; height: 25px; }
.tab-label { font-size: 10px; font-weight: 500; letter-spacing: 0.01em; }
.tab-item.is-active { color: var(--blue); }
.tab-item:active .tab-icon { transform: scale(0.92); }
.tab-icon { display: grid; place-items: center; transition: transform 0.2s var(--spring); }

.tab-badge {
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: 6px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px rgba(255, 59, 48, 0.4);
}
.tab-badge[hidden] { display: none; }

/* ============================================================
   iOS 分组列表
   ============================================================ */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 12px 7px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--label-3);
  text-transform: uppercase;
}
.section-head .section-action { color: var(--blue); font-size: 13px; text-transform: none; letter-spacing: 0; }

.inset-list {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.inset-list + .inset-list { margin-top: 4px; }

.list-row {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  text-align: left;
  transition: background 0.16s;
}
.list-row:active { background: var(--fill); }
.list-row + .list-row::before {
  content: "";
  position: absolute;
  top: 0; left: 68px; right: 0;
  height: 0.5px;
  background: var(--separator);
}
.list-row.no-indent + .list-row::before { left: 12px; }
.list-row + .list-row.no-indent::before { left: 12px; }
.list-row .row-chevron { color: var(--label-3); display: flex; margin-left: auto; }
.row-chevron svg { width: 16px; height: 16px; }

.avatar {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  user-select: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}
.avatar.sm { width: 38px; height: 38px; border-radius: 11px; font-size: 16px; }
.avatar.lg { width: 66px; height: 66px; border-radius: 18px; font-size: 26px; }
.avatar.xs { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.avatar[data-av="0"] { background: linear-gradient(145deg, #FFC45B, #FF9500); }
.avatar[data-av="1"] { background: linear-gradient(145deg, #FF8FA6, #FF375F); }
.avatar[data-av="2"] { background: linear-gradient(145deg, #DE8BFF, #BF5AF2); }
.avatar[data-av="3"] { background: linear-gradient(145deg, #9A9CFF, #5E5CE6); }
.avatar[data-av="4"] { background: linear-gradient(145deg, #6FD6FF, #0A84FF); }
.avatar[data-av="5"] { background: linear-gradient(145deg, #72DDFF, #32ADE6); }
.avatar[data-av="6"] { background: linear-gradient(145deg, #B7F79A, #30D158); }
.avatar[data-av="7"] { background: linear-gradient(145deg, #CDCDD3, #8E8E93); }
.avatar.group { color: rgba(255, 255, 255, 0.96); background: linear-gradient(145deg, #8F97A8, #5B6474); }
.avatar svg { width: 21px; height: 21px; opacity: 0.95; }
.avatar.sm svg { width: 17px; height: 17px; }
.avatar.lg svg { width: 30px; height: 30px; }
.avatar.has-photo {
  padding: 0;
  overflow: hidden;
  background: #E5E5EA;
}
.avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-edit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 4px 0 18px;
}
.avatar-edit-actions { display: flex; gap: 8px; }
.avatar-edit-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--blue);
  background: var(--fill);
  transition: transform 0.2s var(--spring), background 0.2s;
}
.avatar-edit-btn:active { transform: scale(0.94); background: var(--fill-strong); }

.row-body { flex: 1; min-width: 0; }
.row-top { display: flex; align-items: baseline; gap: 8px; }
.row-name {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-time {
  margin-left: auto;
  flex: none;
  font-size: 11.5px;
  color: var(--label-3);
  font-variant-numeric: tabular-nums;
}
.row-bottom { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.row-preview {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--label-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge {
  flex: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.badge.muted { background: var(--fill-strong); color: var(--label-2); }
.badge[hidden] { display: none; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  background: rgba(0, 122, 255, 0.1);
}
.tag.gray { color: var(--label-2); background: var(--fill); }

.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }

/* 联系人入口图标 */
.icon-tile {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: #fff;
}
.icon-tile svg { width: 18px; height: 18px; }
.icon-tile.blue { background: linear-gradient(145deg, #4EB5FF, #007AFF); }
.icon-tile.green { background: linear-gradient(145deg, #6FE58C, #30D158); }
.icon-tile.purple { background: linear-gradient(145deg, #CB8CFF, #AF52DE); }
.icon-tile.orange { background: linear-gradient(145deg, #FFC15B, #FF9500); }
.icon-tile.gray { background: linear-gradient(145deg, #B9B9C0, #8E8E93); }
.icon-tile.red { background: linear-gradient(145deg, #FF8E88, #FF3B30); }
.icon-tile.teal { background: linear-gradient(145deg, #65D8E8, #0E9FAE); }

/* 空状态 */
.empty-state {
  padding: 60px 24px 20px;
  text-align: center;
  color: var(--label-2);
}
.empty-state[hidden] { display: none; }
.empty-glyph {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 24px;
  color: var(--blue);
  background: rgba(0, 122, 255, 0.1);
}
.empty-state h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--label); }
.empty-state p { margin: 0; font-size: 13px; line-height: 1.5; }

/* ============================================================
   发现 / 我
   ============================================================ */

.notice-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  transition: transform 0.2s var(--ease-ios);
}
.notice-card:active { transform: scale(0.985); }
.notice-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.notice-meta .tag { background: rgba(255, 149, 0, 0.12); color: #B26A00; }
@media (prefers-color-scheme: dark) { .notice-meta .tag { color: #FFB340; } }
.notice-title { margin: 0 0 5px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.notice-text { margin: 0; font-size: 13px; line-height: 1.55; color: var(--label-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notice-time { margin-left: auto; font-size: 11.5px; color: var(--label-3); }

.me-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  width: 100%;
  text-align: left;
  transition: transform 0.2s var(--ease-ios);
}
.me-card:active { transform: scale(0.985); }
.me-card .row-name { font-size: 19px; font-weight: 600; }
.me-sub { margin-top: 4px; font-size: 12.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card .row-chevron { margin-left: auto; }

.list-value { margin-left: auto; font-size: 13.5px; color: var(--label-3); max-width: 55%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row-sub { font-size: 12px; color: var(--label-3); margin-top: 2px; }

.app-info {
  margin: 22px 8px 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--label-3);
  line-height: 1.6;
}

/* ============================================================
   聊天页
   ============================================================ */

.chat-screen { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--chat-bg); }
.chat-screen[hidden] { display: none; }

.chat-nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: calc(env(safe-area-inset-top) + 5px) 8px 7px;
  background: var(--nav-bg);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 0.5px solid var(--hairline);
  z-index: 10;
}
.chat-back, .chat-more {
  flex: none;
  width: 40px; height: 38px;
  display: grid; place-items: center;
  color: var(--blue);
}
.chat-more { color: var(--label); }
.chat-back svg, .chat-more svg { width: 22px; height: 22px; }
.chat-back:active, .chat-more:active { opacity: 0.55; }
.chat-heading { flex: 1; min-width: 0; text-align: center; padding: 0 2px; }
.chat-title {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-status {
  height: 13px;
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--label-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-status[hidden] { display: none; }

.messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px 10px;
  scrollbar-width: none;
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(10, 132, 255, 0.06), transparent 70%),
    var(--chat-bg);
}
.messages::-webkit-scrollbar { display: none; }

.day-divider { text-align: center; margin: 14px 0 10px; font-size: 10.5px; color: var(--label-3); letter-spacing: 0.02em; }

.sys-msg { display: flex; justify-content: center; margin: 8px 0; }
.sys-msg span {
  max-width: 78%;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--label-2);
  background: rgba(120, 120, 128, 0.14);
  text-align: center;
}

.msg-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; animation: msgIn 0.28s var(--ease-ios); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.msg-row.out { flex-direction: row-reverse; }
.msg-avatar { flex: none; }
.msg-main { max-width: 74%; min-width: 0; }
.msg-row.out .msg-main { text-align: right; }
.bubble { text-align: left; }
.msg-sender { font-size: 10.5px; color: var(--label-3); margin: 0 4px 3px; }
.msg-row.out .msg-avatar { margin-left: 0; }

.bubble {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 17px;
  background: var(--bubble-in);
  font-size: 15.5px;
  line-height: 1.42;
  letter-spacing: -0.005em;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  border-bottom-left-radius: 6px;
}
.msg-row.out .bubble {
  background: linear-gradient(180deg, var(--bubble-out), var(--bubble-out-2));
  color: #0C2A12;
  border-bottom-left-radius: 17px;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(60, 160, 90, 0.18);
}
@media (prefers-color-scheme: dark) {
  .msg-row.out .bubble { color: #EAFBEA; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
  .msg-row.out .bubble { color: #F2FFF2; }
}
.bubble.is-deleted { color: var(--label-3); font-style: italic; background: var(--fill); box-shadow: none; }
.bubble .msg-time { display: block; margin-top: 4px; font-size: 9.5px; color: var(--label-3); text-align: right; }
.msg-row.out .bubble .msg-time { color: rgba(12, 42, 18, 0.55); }
@media (prefers-color-scheme: dark) {
  .msg-row.out .bubble .msg-time { color: rgba(242, 255, 242, 0.6); }
}

.typing-bubble { display: inline-flex; align-items: center; gap: 4px; padding: 10px 13px; }
.typing-bubble i { width: 5px; height: 5px; border-radius: 50%; background: var(--label-3); animation: blink 1.2s infinite; }
.typing-bubble i:nth-child(2) { animation-delay: 0.16s; }
.typing-bubble i:nth-child(3) { animation-delay: 0.32s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-empty { padding: 40px 20px; text-align: center; font-size: 12px; color: var(--label-3); }

.composer {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px);
  background: var(--nav-bg);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-top: 0.5px solid var(--hairline);
}
.composer-plus {
  flex: none;
  width: 32px; height: 32px;
  margin-bottom: 2px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--label-2);
  background: var(--fill);
  transition: transform 0.2s var(--spring);
}
.composer-plus svg { width: 18px; height: 18px; }
.composer-plus:active { transform: rotate(90deg) scale(0.94); }

.composer-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  padding: 7px 12px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--separator);
}
.composer-field textarea {
  width: 100%;
  max-height: 104px;
  min-height: 22px;
  border: 0;
  background: none;
  outline: none;
  resize: none;
  font-size: 16px;
  line-height: 1.4;
  padding: 0;
}
.composer-field textarea::placeholder { color: var(--label-3); }

.send-btn {
  flex: none;
  width: 34px; height: 34px;
  margin-bottom: 1px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #3A9BFF, #0077ED);
  box-shadow: 0 4px 12px rgba(0, 119, 237, 0.32);
  transform: scale(0.5);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s var(--spring), opacity 0.2s;
}
.send-btn.is-visible { transform: scale(1); opacity: 1; pointer-events: auto; }
.send-btn:active { transform: scale(0.9); }
.send-btn svg { width: 20px; height: 20px; }

/* ============================================================
   弹层 / 面板
   ============================================================ */

.sheet-layer { position: absolute; inset: 0; z-index: 60; }
.sheet-layer[hidden] { display: none; }
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.3s var(--ease-ios);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 88%;
  display: flex;
  flex-direction: column;
  background: var(--sheet-bg);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
  animation: sheetUp 0.4s var(--ease-ios);
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet.is-closing { animation: sheetDown 0.26s var(--ease-ios) forwards; }
@keyframes sheetDown { to { transform: translateY(100%); } }

.sheet-grabber { width: 36px; height: 5px; border-radius: 999px; background: var(--fill-strong); margin: 7px auto 0; flex: none; }
.sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
}
.sheet-head h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.sheet-head button { font-size: 15px; color: var(--blue); padding: 4px; }
.sheet-head .sheet-title-standalone { margin: 0 auto; }
.sheet-body { overflow-y: auto; padding: 4px 16px 20px; -webkit-overflow-scrolling: touch; }
.sheet-foot { flex: none; padding: 8px 16px calc(env(safe-area-inset-bottom) + 14px); }
.sheet-foot .btn-primary { margin-top: 0; }
.sheet-foot .btn-secondary + .btn-primary { margin-top: 8px; }

.btn-secondary {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--blue);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.btn-danger {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--red);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.btn-primary.is-danger { background: linear-gradient(180deg, #FF6A60, #FF3B30); box-shadow: 0 8px 20px rgba(255, 59, 48, 0.3); }
.sheet-foot > button + button { margin-top: 8px; }

.mini-btn {
  flex: none;
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--blue);
}
.mini-btn:active { opacity: 0.82; }
.mini-btn[disabled] { background: var(--fill); color: var(--label-3); }

.form-field { margin-bottom: 14px; }
.form-field > label {
  display: block;
  margin: 0 4px 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--label-2);
}
.form-field input, .form-field textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 15.5px;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: var(--card);
  outline: none;
  resize: none;
  transition: border-color 0.2s;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--blue); }
.form-field textarea { min-height: 76px; line-height: 1.5; }

.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 2px 6px; }
.swatch {
  width: 34px; height: 34px;
  border-radius: 11px;
  border: 2px solid transparent;
  transition: transform 0.2s var(--spring);
}
.swatch[data-av="0"] { background: linear-gradient(145deg, #FFC45B, #FF9500); }
.swatch[data-av="1"] { background: linear-gradient(145deg, #FF8FA6, #FF375F); }
.swatch[data-av="2"] { background: linear-gradient(145deg, #DE8BFF, #BF5AF2); }
.swatch[data-av="3"] { background: linear-gradient(145deg, #9A9CFF, #5E5CE6); }
.swatch[data-av="4"] { background: linear-gradient(145deg, #6FD6FF, #0A84FF); }
.swatch[data-av="5"] { background: linear-gradient(145deg, #72DDFF, #32ADE6); }
.swatch[data-av="6"] { background: linear-gradient(145deg, #B7F79A, #30D158); }
.swatch[data-av="7"] { background: linear-gradient(145deg, #CDCDD3, #8E8E93); }
.swatch.is-active { border-color: var(--label); transform: scale(0.92); }

.select-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 6px;
  text-align: left;
  border-radius: 12px;
  transition: background 0.16s;
}
.select-row:active { background: var(--fill); }
.select-row .select-check,
.list-row .select-check {
  flex: none;
  margin-left: auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--label-3);
  display: grid;
  place-items: center;
  color: #fff;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--spring);
}
.is-selected .select-check { border-color: var(--blue); background: var(--blue); }
.is-selected .select-check svg { opacity: 1; }
.select-check svg { width: 13px; height: 13px; opacity: 0; }
.select-row .row-name { font-size: 15px; }

.member-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 8px;
  padding: 8px 0 4px;
}
.member-cell { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.member-cell span { font-size: 11px; color: var(--label-2); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-cell .owner-tag { font-size: 9.5px; color: var(--orange); }
.member-add {
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 1.5px dashed var(--label-3);
  color: var(--label-3);
  display: grid; place-items: center;
  background: transparent;
}
.member-add svg { width: 20px; height: 20px; }

.action-sheet { padding-bottom: calc(env(safe-area-inset-bottom) + 8px); }
.action-group { margin: 0 8px; background: var(--card); border-radius: 14px; overflow: hidden; }
.action-group button {
  display: block;
  width: 100%;
  padding: 15px;
  font-size: 16.5px;
  color: var(--blue);
  text-align: center;
}
.action-group button + button { border-top: 0.5px solid var(--separator); }
.action-group button.danger { color: var(--red); }
.action-cancel { margin: 8px; }
.action-cancel button { width: 100%; padding: 15px; border-radius: 14px; background: var(--card); font-size: 16.5px; font-weight: 600; color: var(--blue); }
.action-title { padding: 14px 8px 8px; font-size: 12.5px; color: var(--label-3); text-align: center; }

.request-row { padding: 10px 4px 12px; }
.request-row + .request-row { border-top: 0.5px solid var(--separator); }
.request-head { display: flex; align-items: center; gap: 10px; }
.request-text {
  margin: 8px 0 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--fill);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--label-2);
}
.request-actions { display: flex; gap: 8px; }
.request-actions button {
  flex: 1;
  height: 33px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  background: var(--fill);
  color: var(--label-2);
}
.request-actions .accept { background: var(--blue); color: #fff; }
.request-actions .reject { background: rgba(255, 59, 48, 0.1); color: var(--red); }
.request-actions button:disabled { opacity: 0.45; }

.pending-note { font-size: 11.5px; color: var(--label-3); }

/* Toast */
.toast {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 64px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 86%;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(28, 28, 30, 0.9);
  backdrop-filter: blur(16px);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transition: opacity 0.24s, transform 0.3s var(--spring);
  pointer-events: none;
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 15px; height: 15px; flex: none; }
.toast.is-error { background: rgba(160, 24, 18, 0.92); }
.toast span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 滚动渐隐（顶部搜索时） */
.scroll-fade-top { mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 100%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   OKX · 交易终端视觉
   纯黑底 / 1px 描边 / 小圆角 / 白色主操作 / 等宽数字
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #000000;
  --bg-elevated: #0A0A0A;
  --card: #0D0D0D;
  --card-muted: #101010;
  --fill: #141414;
  --fill-strong: #1D1D1D;

  --label: #F2F2F2;
  --label-2: #9C9CA3;
  --label-3: #616168;
  --separator: #1E1E1E;
  --hairline: #242424;

  --nav-bg: #000000;
  --tab-bg: #000000;
  --sheet-bg: #0D0D0D;
  --chat-bg: #000000;

  --bubble-in: #141414;
  --bubble-out: #FFFFFF;
  --bubble-out-2: #FFFFFF;

  --blue: #FFFFFF;
  --green: #0ECB81;
  --red: #F6465D;
  --orange: #F0A03C;

  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  --radius-xl: 12px;
  --radius-lg: 8px;
  --radius-md: 6px;
  --radius-sm: 4px;
  --tabbar-h: 56px;
}

body { background: #000; }
button, input, textarea { font-variant-numeric: tabular-nums; }

.app { background: #000; }
@media (min-width: 720px) and (min-height: 720px) {
  .app { border-radius: 12px; box-shadow: 0 0 0 1px #1E1E1E; }
}

/* ---------- 登录 ---------- */
.aurora { display: none; }
.auth-screen { background: #000; }
.brand { margin-bottom: 22px; }
.brand-logo { display: block; width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 10px; }
.brand h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; color: var(--label); }
.brand-en { margin: 8px 0 0; font-size: 10px; font-weight: 600; letter-spacing: 0.34em; color: var(--label-3); }
.brand-tagline { margin: 10px 0 0; font-size: 12px; letter-spacing: 0.02em; color: var(--label-2); }

.auth-card {
  background: #0D0D0D;
  border: 1px solid #1E1E1E;
  border-radius: 12px;
  padding: 18px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.segmented { background: #0A0A0A; border: 1px solid #1E1E1E; border-radius: 6px; padding: 3px; margin-bottom: 18px; }
.segmented .seg-thumb {
  top: 3px; left: 3px;
  width: calc(50% - 4px);
  height: calc(100% - 6px);
  border-radius: 4px;
  background: #F2F2F2;
  box-shadow: none;
}
.segmented[data-mode="register"] .seg-thumb { transform: translateX(calc(100% + 2px)); }
.seg-item { height: 34px; font-size: 14px; color: var(--label-3); }
.seg-item.is-active { color: #000; font-weight: 600; }

.field > span { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--label-3); }
.field input { background: #111; border: 1px solid #262626; border-radius: 4px; }
.field input:focus { border-color: #F2F2F2; background: #141414; }

.btn-primary {
  height: 46px;
  border-radius: 4px;
  background: #F2F2F2;
  color: #000;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
}
.btn-primary:active { transform: none; background: #D8D8D8; filter: none; }
.btn-primary:disabled { opacity: 0.45; }
.btn-primary.is-danger { background: var(--red); color: #fff; box-shadow: none; }
.auth-error { font-size: 12px; }
.auth-foot { font-size: 10.5px; color: var(--label-3); }

/* ---------- 顶栏 / 标签栏 ---------- */
.navbar {
  background: #000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid #161616;
}
.navbar.is-compact { border-bottom-color: #1E1E1E; padding-top: calc(env(safe-area-inset-top) + 4px); }
.nav-title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.navbar.is-compact .nav-title { font-size: 16px; letter-spacing: 0; }
.nav-btn { width: 32px; height: 32px; border-radius: 4px; background: #101010; border: 1px solid #242424; color: #E6E6E6; }
.nav-btn:active { transform: none; background: #1C1C1C; }

.tabbar {
  background: #000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: 1px solid #1A1A1A;
  padding: 6px 6px calc(env(safe-area-inset-bottom) + 4px);
}
.tab-item { color: #5E5E66; gap: 3px; padding: 4px 0 2px; }
.tab-item.is-active { color: #F2F2F2; }
.tab-label { font-size: 10px; font-weight: 500; letter-spacing: 0.02em; }
.tab-icon svg { width: 23px; height: 23px; }
.tab-badge { border-radius: 4px; background: var(--red); box-shadow: none; font-size: 10px; height: 16px; min-width: 16px; }

/* ---------- 搜索 / 分组 ---------- */
.search-field { background: #101010; border: 1px solid #242424; border-radius: 4px; height: 38px; }
.search-field input { font-size: 14px; }
.search-cancel { color: #F2F2F2; }
.section-head { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: #6A6A72; margin: 18px 12px 8px; }
.section-head .section-action { color: #F2F2F2; font-size: 12px; letter-spacing: 0; text-transform: none; }

/* ---------- 列表 ---------- */
.inset-list { background: #0D0D0D; border: 1px solid #1C1C1C; border-radius: 8px; box-shadow: none; }
.inset-list + .inset-list { margin-top: 8px; }
.list-row { padding: 10px 12px; }
.list-row:active { background: #141414; }
.list-row + .list-row::before { height: 1px; left: 66px; background: #171717; }
.list-row .row-chevron { color: #4A4A52; }
.row-name { font-size: 15px; font-weight: 500; letter-spacing: 0; }
.row-time { font-size: 11px; color: #5E5E66; }
.row-preview { font-size: 12.5px; color: #8C8C93; }
.row-sub { font-size: 11.5px; color: #6E6E76; }

.avatar {
  border-radius: 6px;
  background: #181818;
  border: 1px solid #262626;
  color: #E8E8E8;
  box-shadow: none;
  font-weight: 600;
}
.avatar.sm { border-radius: 5px; }
.avatar.lg { border-radius: 8px; }
.avatar.xs { border-radius: 4px; }
.avatar[data-av="0"], .avatar[data-av="1"], .avatar[data-av="2"], .avatar[data-av="3"],
.avatar[data-av="4"], .avatar[data-av="5"], .avatar[data-av="6"], .avatar[data-av="7"],
.avatar.group { background: #181818; color: #E8E8E8; }
.avatar.has-photo { background: #141414; border-color: #262626; }

.icon-tile {
  background: #121212;
  border: 1px solid #262626;
  border-radius: 5px;
  color: #EDEDED;
  box-shadow: none;
}
.icon-tile.blue, .icon-tile.green, .icon-tile.purple, .icon-tile.orange,
.icon-tile.gray, .icon-tile.red, .icon-tile.teal {
  background: #121212;
  color: #EDEDED;
}

.empty-glyph { background: #121212; border: 1px solid #242424; color: #7A7A82; box-shadow: none; }
.empty-state h3 { color: #D8D8DC; }
.empty-state p { color: #68686F; }

.notice-card, .me-card {
  background: #0D0D0D;
  border: 1px solid #1C1C1C;
  border-radius: 8px;
  box-shadow: none;
}
.notice-title { color: var(--label); }
.notice-text { color: var(--label-2); }
.list-value { color: #8C8C93; }

/* ---------- 聊天 ---------- */
.chat-nav {
  background: #000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid #161616;
}
.chat-back { color: #F2F2F2; }
.chat-title { font-size: 15px; font-weight: 600; }
.messages { background: #000; }
.day-divider { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #5E5E66; }
.sys-msg span { background: #101010; border: 1px solid #1E1E1E; border-radius: 4px; color: #8C8C93; }

.bubble {
  background: #141414;
  border: 1px solid #222;
  border-radius: 6px;
  border-bottom-left-radius: 2px;
  color: #EDEDED;
  font-size: 15px;
  box-shadow: none;
}
.msg-row.out .bubble {
  background: #F2F2F2;
  border-color: #F2F2F2;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 2px;
  color: #0A0A0A;
  box-shadow: none;
}
.bubble .msg-time { color: #6E6E75; }
.msg-row.out .bubble .msg-time { color: #6A6A6A; }
.bubble.is-deleted { background: #101010; border-color: #1E1E1E; }
.msg-sender { font-size: 10px; letter-spacing: 0.04em;}

.composer {
  background: #000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: 1px solid #161616;
}
.composer-plus { background: #111; border: 1px solid #262626; border-radius: 5px; color: #B8B8BE; }
.composer-plus:active { transform: scale(0.94); }
.composer-field { background: #111; border: 1px solid #262626; border-radius: 6px; }
.composer-field textarea { font-size: 15px; }
.send-btn { width: 34px; height: 34px; border-radius: 5px; background: #F2F2F2; color: #000; box-shadow: none; }
.send-btn:active { transform: scale(0.94); }

/* ---------- 弹层 ---------- */
.sheet-backdrop { background: rgba(0, 0, 0, 0.68); backdrop-filter: none; }
.sheet {
  background: #0D0D0D;
  border-top: 1px solid #242424;
  border-radius: 14px 14px 0 0;
  box-shadow: none;
}
.sheet-grabber { width: 32px; height: 4px; background: #2A2A2A; }
.sheet-head h3 { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.sheet-head button { font-size: 14px; color: #F2F2F2; }
.sheet-body { padding: 4px 16px 18px; }
.btn-secondary {
  height: 44px;
  border-radius: 4px;
  background: #141414;
  border: 1px solid #262626;
  color: #EDEDED;
  font-size: 15px;
  font-weight: 500;
  box-shadow: none;
}
.btn-danger { height: 44px; border-radius: 4px; background: transparent; border: 1px solid #3A2226; color: var(--red); font-size: 15px; box-shadow: none; }
.mini-btn { background: #F2F2F2; color: #000; border-radius: 4px; }

.form-field > label { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #6E6E76; margin-left: 0; }
.form-field input, .form-field textarea { background: #111; border: 1px solid #262626; border-radius: 4px; }
.form-field input:focus, .form-field textarea:focus { border-color: #F2F2F2; }
.swatch { border-radius: 4px; border-color: #222; }
.swatch[data-av="0"], .swatch[data-av="1"], .swatch[data-av="2"], .swatch[data-av="3"],
.swatch[data-av="4"], .swatch[data-av="5"], .swatch[data-av="6"], .swatch[data-av="7"] { background: #1C1C1C; }
.swatch.is-active { border-color: #F2F2F2; }
.select-check { border-radius: 3px; }
.is-selected .select-check { background: #F2F2F2; border-color: #F2F2F2; color: #000; }

.action-group { background: #0D0D0D; border: 1px solid #1C1C1C; border-radius: 8px; }
.action-group button { color: #EDEDED; }
.action-group button.danger { color: var(--red); }
.action-cancel button { background: #0D0D0D; border: 1px solid #1C1C1C; border-radius: 8px; color: #8C8C93; }
.request-row { border-color: #171717; }
.request-actions .accept { background: #F2F2F2; color: #000; }
.request-actions .reject { background: #141414; color: #8C8C93; }

.toast {
  background: #161616;
  border: 1px solid #2A2A2A;
  border-radius: 6px;
  color: #EDEDED;
  box-shadow: none;
  backdrop-filter: none;
}
.toast.is-error { background: #2A1214; border-color: #4A2024; color: #FF8A95; }

/* ---------- 二维码 / 扫一扫 ---------- */
.qr-card { display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; }
.qr-name { margin-top: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.qr-sub { margin-top: 4px; font-size: 11.5px; color: var(--label-3); letter-spacing: 0.04em; }
.qr-box {
  margin: 16px 0 10px;
  padding: 10px;
  background: #fff;
  border-radius: 4px;
  display: grid;
  place-items: center;
}
.qr-box svg { display: block; width: 208px; height: 208px; }
.qr-hint { margin: 0; font-size: 11px; line-height: 1.55; color: #6E6E76; text-align: center; }
.qr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.qr-actions .btn-secondary { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 14px; }
.qr-actions .btn-secondary svg { width: 16px; height: 16px; }

.scan-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  text-align: left;
  background: #0D0D0D;
  border: 1px solid #1C1C1C;
  border-radius: 8px;
}
.scan-entry:active { background: #141414; }
.scan-entry .row-body { flex: 1; min-width: 0; }
.scan-entry .row-chevron { margin-left: 0; color: #4A4A52; }

.scan-stage {
  position: relative;
  margin: 6px auto 12px;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  background: #0A0A0A;
  border: 1px solid #1C1C1C;
  border-radius: 6px;
  overflow: hidden;
}
.scan-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame {
  position: absolute;
  inset: 16%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.45);
}
.scan-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  color: #8C8C93;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.scan-fallback svg { width: 30px; height: 30px; color: #5E5E66; }

/* 头像编辑 */
.avatar-edit-btn { background: #141414; border: 1px solid #262626; border-radius: 4px; color: #EDEDED; }
