/* ==========================================================================
   足迹社区 · 设计系统
   ========================================================================== */

:root {
  --bg: #efece4;
  --bg-soft: #f6f4ee;
  --surface: #ffffff;
  --surface-2: #faf9f5;
  --surface-3: #f0ede5;
  --ink: #14201c;
  --ink-2: #56655f;
  --ink-3: #93a09a;
  --line: rgba(20, 32, 28, 0.08);
  --line-strong: rgba(20, 32, 28, 0.14);
  --brand: #0f9d76;
  --brand-deep: #0a7a5b;
  --brand-soft: #e3f4ed;
  --amber: #e8a33d;
  --amber-soft: #fdf1de;
  --danger: #df464b;
  --danger-soft: #fdecec;
  --phone-w: 440px;
  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 28, 0.05);
  --shadow-xs: 0 2px 8px rgba(20, 32, 28, 0.05);
  --shadow: 0 16px 40px rgba(20, 32, 28, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 720px at 10% 6%, #dcece4 0%, transparent 56%),
    radial-gradient(900px 640px at 92% 88%, #f4e3c9 0%, transparent 58%),
    linear-gradient(135deg, #f1efe9 0%, #e9e5db 55%, #e3ded2 100%);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--brand-deep);
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.mono {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: -0.1px;
  color: var(--ink-3);
}

.muted {
  color: var(--ink-3);
  font-size: 11px;
}

.ico {
  flex: none;
  display: block;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ==========================================================================
   外壳
   ========================================================================== */

.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 84px;
  padding: 36px;
}

.phone-frame {
  position: relative;
  width: var(--phone-w);
  height: min(900px, calc(100dvh - 64px));
  border-radius: 46px;
  padding: 9px;
  background: linear-gradient(160deg, #2b3633 0%, #111917 55%, #080d0b 100%);
  box-shadow:
    0 60px 100px -35px rgba(18, 30, 26, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 2px 0 rgba(255, 255, 255, 0.12) inset;
  flex: none;
}

.phone-glare {
  position: absolute;
  inset: 0;
  border-radius: 46px;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.2), transparent 28%);
  opacity: 0.5;
  mix-blend-mode: screen;
}

.app {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

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

/* ------------------------------------------------------------------ 桌面介绍 */

.intro {
  width: 370px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--ink);
}

.intro-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #17b98b, #08634a);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(10, 110, 80, 0.28);
}

.intro h1 {
  margin: 4px 0 0;
  font-size: 34px;
  line-height: 1.22;
  letter-spacing: -1.1px;
  font-weight: 750;
}

.intro-lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.intro-points {
  list-style: none;
  margin: 2px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.intro-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.intro-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 7px;
  box-shadow: 0 0 0 4px rgba(15, 157, 118, 0.12);
  flex: none;
}

.intro-points b {
  display: block;
  font-size: 13.5px;
  margin-bottom: 2px;
}

.intro-points small {
  font-size: 11.5px;
  color: var(--ink-3);
}

.intro-demo {
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.intro-demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.intro-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-deep);
  font-weight: 600;
}

.intro-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #21b573;
  box-shadow: 0 0 0 3px rgba(33, 181, 115, 0.15);
}

.intro-demo code {
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.4px;
}

.intro-demo small {
  display: block;
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 4px;
}

.intro-foot {
  margin: 0;
  font-size: 10.5px;
  color: var(--ink-3);
}

/* ==========================================================================
   通用组件
   ========================================================================== */

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  flex: none;
  display: block;
}

.avatar-empty {
  display: grid;
  place-items: center;
  color: var(--ink-3);
  background: linear-gradient(145deg, #e9e6dd, #d6d1c3);
}

.avatar-wrap {
  position: relative;
  display: inline-flex;
  flex: none;
}

.avatar-wrap > .status-dot {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 11px;
  height: 11px;
  border: 2.5px solid var(--bg);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c2cac6;
  display: inline-block;
  flex: none;
}

.status-dot.on {
  background: #21b573;
  box-shadow: 0 0 0 3px rgba(33, 181, 115, 0.14);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #21b573;
  box-shadow: 0 0 0 3px rgba(33, 181, 115, 0.16);
  flex: none;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.2px;
  background: var(--surface-3);
  color: var(--ink-2);
  vertical-align: 1px;
  white-space: nowrap;
}

.role-badge.owner {
  background: linear-gradient(135deg, #f8dfb4, #efbe74);
  color: #7a4c0d;
}

.role-badge.agent {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.role-badge.authorized {
  background: #e7edfd;
  color: #3b5cc4;
}

.role-badge.disabled {
  background: var(--danger-soft);
  color: var(--danger);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  transition: background 0.16s, color 0.16s, transform 0.12s;
  flex: none;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn.accent {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.icon-btn.subtle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--ink-3);
}

.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.avatar-btn .avatar {
  width: 100% !important;
  height: 100% !important;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 650;
  background: var(--brand);
  color: #fff;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.12s;
}

.mini-btn:active {
  transform: scale(0.96);
}

.mini-btn.ghost {
  background: #fff;
  color: var(--ink-2);
  border: 1px solid var(--line);
}

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

.mini-btn.danger {
  color: var(--danger);
}

.mini-btn:disabled {
  opacity: 0.55;
}

.btn {
  height: 46px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 18px;
  transition: transform 0.12s, opacity 0.15s, box-shadow 0.16s;
}

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

.btn:disabled {
  opacity: 0.6;
}

.btn.primary {
  background: linear-gradient(150deg, #13a97f, #0a7a5b);
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(10, 122, 91, 0.55);
}

.btn.ghost {
  background: var(--surface-3);
  color: var(--ink-2);
}

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

.btn.small {
  height: 38px;
  font-size: 12.5px;
  border-radius: 11px;
  padding: 0 14px;
}

.btn.block {
  width: 100%;
}

/* ==========================================================================
   页面骨架
   ========================================================================== */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: screen-in 0.28s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.screen-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px calc(22px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: calc(20px + env(safe-area-inset-top)) 16px 12px;
  flex: none;
}

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

.topbar h1 {
  margin: 0;
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -0.8px;
  line-height: 1.1;
}

.topbar .sub {
  margin: 5px 0 0;
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.unread-text {
  color: var(--brand-deep);
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 4px 8px;
}

.section-head h2 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--ink-2);
  text-transform: none;
}

.section-head span {
  font-size: 10px;
  color: var(--ink-3);
}

.page-foot {
  font-size: 10px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.7;
  margin: 18px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.chats-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 9.5px;
  color: var(--ink-3);
  padding: 18px 0 4px;
}

.dot-sep {
  color: var(--ink-3);
  opacity: 0.6;
  margin: 0 1px;
}

/* ------------------------------------------------------------------ 空状态 */

.empty-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  text-align: center;
}

.empty-card p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
}

.empty-card h3 {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-2);
}

.empty-card.big {
  padding: 46px 20px;
  margin-top: 16px;
  background: transparent;
  border-style: solid;
  border-color: transparent;
}

.empty-inline {
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  padding: 18px 0;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e7e3da, #f2efe8, #e7e3da);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton-line.w120 {
  width: 120px;
}

.skeleton-card {
  height: 150px;
  border-radius: 20px;
  background: linear-gradient(90deg, #e7e3da, #f4f1ea, #e7e3da);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  margin-bottom: 12px;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px auto 14px;
  padding: 7px 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 10.5px;
  color: var(--ink-2);
}

/* ==========================================================================
   底部导航
   ========================================================================== */

.tabbar {
  flex: none;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(252, 251, 247, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 10;
}

body.chat-open .tabbar {
  display: none;
}

.tab-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 0 3px;
  border-radius: 12px;
  color: #98a49e;
  font-size: 10.5px;
  font-weight: 550;
  transition: color 0.18s;
}

.tab-item.active {
  color: var(--brand-deep);
}

.tab-ico {
  position: relative;
  display: grid;
  place-items: center;
  height: 25px;
}

.tab-badge {
  position: absolute;
  top: -4px;
  right: -9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid #fcfbf7;
  box-sizing: content-box;
}

.tabbar.five .tab-label {
  font-size: 9.5px;
}

/* ==========================================================================
   会话列表
   ========================================================================== */

.cloud-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 10px;
  padding: 9px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.45;
}

.cloud-note .ico {
  color: var(--brand);
}

.cloud-note span {
  flex: 1;
  min-width: 0;
}

.cloud-note.staff .ico {
  color: var(--ink-2);
}

.guest-onboard {
  margin: 12px 0 6px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(155deg, #ffffff, #f4fbf8);
  border: 1px solid rgba(15, 157, 118, 0.12);
  box-shadow: var(--shadow-sm);
}

.agent-picker {
  margin: 8px 0 10px;
  padding: 18px 14px 14px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 0%, rgba(15, 157, 118, 0.12), transparent 42%),
    linear-gradient(160deg, #ffffff, #f4fbf8);
  border: 1px solid rgba(15, 157, 118, 0.12);
  box-shadow: var(--shadow-sm);
}

.picker-head {
  padding: 0 4px 14px;
}

.picker-kicker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 9px;
  font-weight: 650;
}

.picker-head h2 {
  margin: 8px 0 4px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.4px;
}

.picker-head p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.agent-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 8px;
}

.agent-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 3px;
  border-radius: 16px;
  transition: background 0.16s, transform 0.12s;
}

.agent-choice:hover {
  background: rgba(255, 255, 255, 0.8);
}

.agent-choice:active {
  transform: scale(0.96);
}

.agent-choice-avatar {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(15, 157, 118, 0.18), rgba(15, 157, 118, 0.04));
  box-shadow: 0 0 0 1px rgba(15, 157, 118, 0.1);
}

.agent-choice-avatar .avatar {
  border-radius: 50%;
  border: 3px solid #fff;
}

.agent-choice-avatar > .status-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
}

.agent-choice b {
  max-width: 100%;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-choice small {
  max-width: 100%;
  font-size: 8.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-foot {
  margin: 14px 0 0;
  font-size: 9px;
  color: var(--ink-3);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.guest-onboard-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.onboard-ico {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-deep);
  flex: none;
}

.guest-onboard-head b {
  display: block;
  font-size: 12.5px;
  margin-bottom: 3px;
}

.guest-onboard-head p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.onboard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 11px 0 10px;
}

.onboard-tags span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 9px;
  font-weight: 600;
}

.onboard-link {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--brand-deep);
  padding: 2px 0;
}

.mini-link {
  font-size: 10.5px;
  font-weight: 650;
  color: var(--brand-deep);
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--brand-soft);
  flex: none;
}

.conv-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.conv-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 17px;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}

.conv-row:hover {
  background: rgba(255, 255, 255, 0.55);
}

.conv-row:active {
  background: rgba(255, 255, 255, 0.85);
}

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

.conv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.conv-name {
  font-size: 15px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-top time {
  font-size: 10px;
  color: var(--ink-3);
  flex: none;
}

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

.conv-preview {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.unread-pill {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 2px 6px rgba(223, 70, 75, 0.3);
}

/* ==========================================================================
   聊天页
   ========================================================================== */

.chat-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
  will-change: transform;
}

.chat-screen.show,
.chat-screen.opening {
  transform: none;
}

.chat-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) 8px 8px;
  background: rgba(250, 249, 244, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 3;
}

.chat-top .back {
  margin-right: 0;
}

.chat-peer {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 0;
}

.chat-peer-text {
  min-width: 0;
}

.chat-peer-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-peer-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  color: var(--ink-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
}

.typing-text {
  color: var(--brand-deep);
  font-weight: 550;
}

.chat-tools {
  display: flex;
  align-items: center;
  flex: none;
}

.chat-tools .icon-btn {
  width: 36px;
  height: 36px;
}

.staff-strip {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background: #eaf6f1;
  border-bottom: 1px solid rgba(15, 157, 118, 0.1);
  font-size: 10px;
  color: var(--ink-2);
}

.staff-strip-info {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.warn-text {
  color: #b9740f;
}

.staff-strip-actions {
  display: flex;
  gap: 5px;
  flex: none;
}

.staff-strip .mini-btn {
  padding: 5px 8px;
  font-size: 10px;
}

.staff-strip.is-blocked {
  background: #fdf1f1;
  border-bottom-color: rgba(223, 70, 75, 0.16);
}

.staff-strip.is-blocked .live-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(223, 70, 75, 0.14);
}

.block-chip {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 9px;
  font-weight: 650;
  flex: none;
}

.composer-blocked {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 15px;
  background: var(--danger-soft);
  border: 1px solid rgba(223, 70, 75, 0.16);
  color: #8d2b2f;
}

.composer-blocked-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(223, 70, 75, 0.12);
  flex: none;
}

.composer-blocked-text {
  min-width: 0;
}

.composer-blocked-text b {
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.composer-blocked-text small {
  display: block;
  font-size: 9px;
  color: #a85458;
  margin-top: 3px;
}

.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 18% 0%, rgba(15, 157, 118, 0.045), transparent 42%),
    radial-gradient(circle at 88% 96%, rgba(232, 163, 61, 0.05), transparent 46%),
    var(--bg);
  scroll-behavior: smooth;
}

.chat-list {
  padding: 4px 12px 12px;
}

.chat-loading,
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 55vh;
  color: var(--ink-3);
  font-size: 12px;
}

.chat-empty p {
  margin: 0;
  font-size: 11.5px;
}

.chat-start {
  text-align: center;
  font-size: 9.5px;
  color: var(--ink-3);
  padding: 10px 0 4px;
}

.time-divider {
  display: flex;
  justify-content: center;
  margin: 13px 0 8px;
}

.time-divider span {
  font-size: 9.5px;
  color: var(--ink-3);
  background: rgba(255, 255, 255, 0.62);
  padding: 3px 9px;
  border-radius: 9px;
  letter-spacing: 0.1px;
}

.msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 3px 0;
}

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

.msg-avatar {
  width: 36px;
  flex: none;
}

.msg-avatar .avatar {
  width: 36px !important;
  height: 36px !important;
}

.msg.cont .msg-avatar {
  visibility: hidden;
}

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

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

.msg-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  color: var(--ink-3);
  padding: 0 3px 3px;
}

.msg-bubble-wrap {
  max-width: 100%;
}

.bubble {
  position: relative;
  padding: 9px 12px;
  border-radius: 16px;
  border-top-left-radius: 5px;
  background: #fff;
  font-size: 14px;
  line-height: 1.52;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bubble a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.msg.mine .bubble {
  background: linear-gradient(150deg, #14a980, #09805f);
  color: #fff;
  border-radius: 16px;
  border-top-left-radius: 16px;
  border-top-right-radius: 5px;
  box-shadow: 0 4px 14px -4px rgba(9, 128, 95, 0.4);
}

.msg.mine .bubble a {
  color: #fff;
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: var(--ink-3);
  padding: 3px 3px 0;
  min-height: 13px;
}

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

.read-state {
  color: var(--ink-3);
}

.read-state.read {
  color: var(--brand-deep);
}

.sending {
  color: var(--ink-3);
}

.failed {
  color: var(--danger);
}

/* 媒体消息 */

.media-thumb {
  position: relative;
  display: block;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #ddd9d0;
  box-shadow: var(--shadow-sm);
  max-width: 232px;
}

.media-thumb img {
  display: block;
  width: 100%;
  max-height: 290px;
  object-fit: cover;
}

.media-thumb.video video {
  display: block;
  width: 232px;
  height: 158px;
  object-fit: cover;
  background: #161d1a;
}

.video-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.16);
}

.video-badge em {
  position: absolute;
  left: 8px;
  bottom: 7px;
  font-style: normal;
  font-size: 9px;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

/* 语音 */

.voice-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 16px;
  border-top-left-radius: 5px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  min-width: 112px;
}

.msg.mine .voice-bubble {
  background: linear-gradient(150deg, #14a980, #09805f);
  color: #fff;
  border-radius: 16px;
  border-top-left-radius: 16px;
  border-top-right-radius: 5px;
}

.voice-play {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 32, 28, 0.07);
  flex: none;
}

.msg.mine .voice-play {
  background: rgba(255, 255, 255, 0.18);
}

.voice-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
}

.voice-bars i {
  width: 2.5px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.5;
  transition: height 0.08s;
}

.voice-bubble.playing .voice-bars i {
  animation: voice-pulse 0.85s ease-in-out infinite;
}

.voice-bubble.playing .voice-bars i:nth-child(2n) {
  animation-delay: 0.12s;
}

.voice-bubble.playing .voice-bars i:nth-child(3n) {
  animation-delay: 0.24s;
}

/* 语音转文字 */

.voice-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  max-width: 100%;
}

.voice-wrap.mine {
  align-items: flex-end;
}

.voice-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

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

.voice-transcribe {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-deep);
  font-size: 9px;
  line-height: 1;
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
}

.voice-transcribe:hover,
.voice-transcribe.open {
  background: var(--brand-soft);
  border-color: rgba(15, 157, 118, 0.25);
}

.voice-transcript {
  display: none;
  max-width: min(270px, 88%);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.6;
  box-shadow: var(--shadow-xs);
  word-break: break-word;
}

.voice-transcript.show {
  display: block;
  animation: rise-in 0.16s ease both;
}

.voice-transcript small {
  display: block;
  margin-top: 3px;
  font-size: 8px;
  color: var(--ink-3);
}

.voice-empty {
  color: var(--ink-3);
}

.rec-transcript {
  max-width: 230px;
  max-height: 34px;
  overflow: hidden;
  margin: 2px auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 9.5px;
  line-height: 1.5;
  text-align: center;
  word-break: break-word;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes voice-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.75);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.15);
  }
}

.voice-dur {
  font-size: 10.5px;
  opacity: 0.7;
  margin-left: auto;
  flex: none;
}

/* 系统 / 通话 */

.sys-msg {
  display: flex;
  justify-content: center;
  margin: 9px 0;
}

.sys-msg span {
  max-width: 82%;
  text-align: center;
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--ink-3);
  background: rgba(255, 255, 255, 0.55);
  padding: 4px 10px;
  border-radius: 10px;
}

.call-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 9px 0;
}

.call-msg-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.call-msg-text {
  font-size: 10.5px;
  color: var(--ink-2);
}

.file-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  color: var(--ink);
  text-decoration: none;
}

/* 输入区 */

.composer {
  flex: none;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(250, 249, 244, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

.composer-row.hidden {
  display: none;
}

.input-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 21px;
  padding: 2px 2px 2px 13px;
  min-height: 42px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.input-wrap:focus-within {
  border-color: rgba(15, 157, 118, 0.4);
  box-shadow: 0 0 0 3px rgba(15, 157, 118, 0.09);
}

#msgInput {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  resize: none;
  font-size: 14.5px;
  line-height: 1.45;
  padding: 9px 0 8px;
  max-height: 120px;
  color: var(--ink);
}

#msgInput::placeholder {
  color: var(--ink-3);
}

.input-wrap .attach {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.send-btn {
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--ink-3);
  flex: none;
  transition: background 0.18s, color 0.18s, transform 0.12s, box-shadow 0.18s;
}

.send-btn.active {
  background: linear-gradient(150deg, #13a97f, #0a7a5b);
  color: #fff;
  box-shadow: 0 6px 16px -4px rgba(10, 122, 91, 0.5);
}

.send-btn:active {
  transform: scale(0.93);
}

.voice-row .hold-btn {
  flex: 1;
  height: 44px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 620;
  color: var(--ink);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.voice-row .hold-btn.active {
  background: var(--brand-soft);
  border-color: rgba(15, 157, 118, 0.35);
  color: var(--brand-deep);
}

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

.composer-locked {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border-radius: 13px;
  background: var(--surface-3);
  font-size: 10.5px;
  color: var(--ink-3);
}

.composer-locked span {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

/* 录音浮层 */

.rec-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 22, 19, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}

.rec-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.rec-card {
  width: 214px;
  padding: 24px 20px;
  border-radius: 26px;
  background: rgba(18, 30, 26, 0.92);
  color: #fff;
  text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
  transition: background 0.2s;
}

.rec-overlay.cancel .rec-card {
  background: rgba(122, 32, 36, 0.94);
}

.rec-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  animation: rec-breathe 1.6s ease-in-out infinite;
}

@keyframes rec-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
}

.rec-wave {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-bottom: 8px;
}

.rec-wave i {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: #fff;
  opacity: 0.9;
}

.rec-time {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: 0.6px;
  font-variant-numeric: tabular-nums;
}

.rec-hint {
  font-size: 10.5px;
  opacity: 0.65;
  margin-top: 8px;
}

/* 回到最新 */

.scroll-bottom {
  position: absolute;
  right: 14px;
  bottom: 82px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--ink-2);
  box-shadow: var(--shadow);
  transform: rotate(90deg);
}

/* ==========================================================================
   通讯录
   ========================================================================== */

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--ink-3);
  margin: 2px 0 8px;
}

.search-field.compact {
  height: 38px;
  margin-bottom: 10px;
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
}

.search-field input::placeholder {
  color: var(--ink-3);
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 8px;
  border-radius: 15px;
  text-align: left;
  transition: background 0.15s;
}

.contact-row:hover {
  background: rgba(255, 255, 255, 0.55);
}

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

.contact-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 620;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-sub {
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-action {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-deep);
  flex: none;
}

.list-action {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.9);
  text-align: left;
  color: var(--ink-2);
}

.list-action-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-deep);
  flex: none;
}

.list-action > span:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.list-action b {
  font-size: 12.5px;
  color: var(--ink);
}

.list-action small {
  font-size: 10px;
  color: var(--ink-3);
}

/* ==========================================================================
   广场
   ========================================================================== */

.plaza-body {
  padding-top: 2px;
}

.compose-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  margin: 2px 0 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-size: 12.5px;
  color: var(--ink-3);
}

.compose-card > span:nth-child(2) {
  flex: 1;
}

.compose-ico {
  color: var(--ink-3);
}

.plaza-lock {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  margin: 2px 0 14px;
  border-radius: 16px;
  background: var(--amber-soft);
  border: 1px solid rgba(232, 163, 61, 0.22);
}

.plaza-lock-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(232, 163, 61, 0.18);
  color: #a5680f;
  flex: none;
}

.plaza-lock-text {
  flex: 1;
  min-width: 0;
}

.plaza-lock-text b {
  font-size: 11.5px;
  color: #6f4a12;
}

.plaza-lock-text p {
  margin: 3px 0 0;
  font-size: 10px;
  line-height: 1.55;
  color: #8a6a35;
}

.plaza-lock .mini-btn {
  align-self: center;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.moment {
  background: #fff;
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  animation: moment-in 0.34s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}

@keyframes moment-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.moment-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}

.moment-author {
  flex: 1;
  min-width: 0;
}

.moment-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.moment-time {
  font-size: 9.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

.moment-text {
  font-size: 13.5px;
  line-height: 1.66;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 10px;
}

.moment-media {
  display: grid;
  gap: 3px;
  border-radius: 13px;
  overflow: hidden;
  margin-bottom: 8px;
}

.moment-media.one {
  grid-template-columns: 1fr;
}

.moment-media.two {
  grid-template-columns: 1fr 1fr;
}

.moment-media.three,
.moment-media.many {
  grid-template-columns: repeat(3, 1fr);
}

.media-cell {
  position: relative;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #eae6dd;
  aspect-ratio: 1 / 1;
  display: block;
}

.moment-media.one .media-cell {
  aspect-ratio: 4 / 3;
}

.media-cell img,
.media-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.media-cell:active img {
  transform: scale(1.02);
}

.media-cell .video-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.12);
  color: #fff;
}

.moment-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 2px;
}

.moment-action {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
  font-size: 11px;
  color: var(--ink-3);
  transition: color 0.15s;
}

.moment-action .ico {
  transition: transform 0.16s;
}

.moment-action:active .ico {
  transform: scale(0.82);
}

.moment-action.liked {
  color: #e0557b;
}

.moment-action.liked .ico {
  animation: heart-pop 0.3s;
}

@keyframes heart-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.28);
  }
  100% {
    transform: scale(1);
  }
}

.moment-role {
  margin-left: auto;
  font-size: 9px;
  color: var(--ink-3);
}

.moment-comments {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  line-height: 1.55;
}

.moment-comments p {
  margin: 0;
}

.moment-comments b {
  color: #3c5a9a;
  font-weight: 600;
}

.moment-comments span {
  color: var(--ink-2);
}

.more-comments {
  align-self: flex-start;
  font-size: 9.5px;
  color: var(--ink-3);
  padding: 2px 0;
}

/* 发布框 */

.composer-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.composer-sheet textarea {
  width: 100%;
  min-height: 116px;
  border: 0;
  outline: none;
  resize: vertical;
  background: transparent;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
}

.composer-sheet textarea::placeholder {
  color: var(--ink-3);
}

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

.composer-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface-3);
}

.composer-thumb img,
.composer-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-remove {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}

.composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--surface-3);
  font-size: 11px;
  color: var(--ink-2);
}

/* 评论 */

.overlay-panel.tall {
  max-height: 88dvh;
  height: min(680px, 88dvh);
}

.overlay-panel.tall .sheet-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding-bottom: 0;
}

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

.comment-list {
  flex: 1;
  max-height: 52vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 10px;
}

.comment-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-2);
}

.comment-name span {
  font-size: 9px;
  color: var(--ink-3);
  font-weight: 400;
}

.comment-text {
  font-size: 12.5px;
  line-height: 1.6;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.comment-form {
  display: flex;
  gap: 7px;
  padding: 10px 0 calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.comment-form input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  padding: 0 12px;
  outline: none;
  font-size: 13px;
}

.comment-form input:focus {
  border-color: var(--brand);
}

/* ==========================================================================
   抖音式广场
   ========================================================================== */

.plaza-screen {
  background: #050807;
  overflow: hidden;
}

.reel-feed {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  background: #050807;
  scrollbar-width: none;
}

.reel-feed::-webkit-scrollbar {
  display: none;
}

.reel-slide {
  position: relative;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #0a0f0d;
  color: #fff;
}

.reel-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.reel-photo,
.reel-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-photo.contain {
  position: relative;
  z-index: 1;
  object-fit: contain;
}

.reel-photo-blur {
  position: absolute;
  inset: -36px;
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: blur(26px) brightness(0.52) saturate(1.05);
  transform: scale(1.06);
  pointer-events: none;
}

.reel-carousel-item .reel-photo-blur {
  inset: -24px;
}

.reel-video {
  cursor: pointer;
}

.reel-carousel {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.reel-carousel::-webkit-scrollbar {
  display: none;
}

.reel-carousel-item {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
}

.reel-textbg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 16%, hsl(var(--h, 160) 42% 30%), transparent 55%),
    linear-gradient(155deg, #10251f, #060b09 72%);
}

.reel-quote {
  position: absolute;
  left: 18px;
  top: 24%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 168px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.reel-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.55) 0%,
    transparent 24%,
    transparent 56%,
    rgba(0, 0, 0, 0.82) 100%
  );
}

.reel-video-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  background: rgba(0, 0, 0, 0.1);
  transition: opacity 0.18s;
}

.reel-slide.video-paused .reel-video-state {
  opacity: 1;
}

.reel-video-state .ico {
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.55));
}

.reel-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: calc(14px + env(safe-area-inset-top)) 12px 32px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.64), transparent);
  pointer-events: none;
}

.reel-topbar > * {
  pointer-events: auto;
}

.reel-title {
  min-width: 0;
  padding-left: 4px;
}

.reel-title h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.7px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.reel-title p {
  margin: 4px 0 0;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.68);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.reel-top-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: none;
}

.reel-glass {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.reel-glass:hover {
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
}

.reel-glass.accent,
.reel-glass.accent:hover {
  background: linear-gradient(145deg, #14a980, #0a7a5b);
  border-color: transparent;
  color: #fff;
}

.reel-counter {
  position: absolute;
  top: calc(84px + env(safe-area-inset-top));
  right: 14px;
  z-index: 6;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.reel-lock-tip {
  position: absolute;
  top: calc(84px + env(safe-area-inset-top));
  left: 14px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  backdrop-filter: blur(8px);
}

.reel-dots {
  position: absolute;
  top: calc(88px + env(safe-area-inset-top));
  left: 50%;
  z-index: 6;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.reel-dot {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.38);
  transition: width 0.18s, background 0.18s;
}

.reel-dot.active {
  width: 14px;
  background: #fff;
}

.reel-hint {
  position: absolute;
  top: calc(84px + env(safe-area-inset-top));
  left: 50%;
  z-index: 6;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  pointer-events: none;
  transition: opacity 0.25s;
}

.reel-hint .ico {
  transform: rotate(180deg);
}

.reel-info {
  position: absolute;
  left: 14px;
  right: 78px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 4;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.reel-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.reel-author .avatar {
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.reel-avatar-btn {
  display: block;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
}

.reel-author-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.reel-author-text b {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.reel-author-text small {
  width: 100%;
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.6);
}

.reel-caption {
  font-size: 13px;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.94);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.reel-caption a {
  color: #9fe8d4;
}

.reel-comment,
.reel-comment-empty {
  display: flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  margin-top: 8px;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  line-height: 1.4;
  text-align: left;
}

.reel-comment b {
  flex: none;
  color: #fff;
  font-weight: 600;
}

.reel-comment span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reel-comment em {
  flex: none;
  margin-left: auto;
  padding-left: 5px;
  font-style: normal;
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.55);
}

.reel-comment-empty {
  color: rgba(255, 255, 255, 0.62);
}

.reel-actions {
  position: absolute;
  right: 10px;
  bottom: calc(30px + env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.reel-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #fff;
  font-size: 9.5px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.reel-action-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.18s, transform 0.12s;
}

.reel-action:active .reel-action-ico {
  transform: scale(0.92);
}

.reel-action.liked {
  color: #ff5d7a;
}

.reel-action.liked .reel-action-ico {
  background: rgba(255, 93, 122, 0.18);
  border-color: rgba(255, 93, 122, 0.3);
}

.reel-action.more .reel-action-ico {
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, 0.22);
}

.reel-heart-burst {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #ff5d7a;
  animation: reel-burst 0.68s ease-out both;
  filter: drop-shadow(0 6px 24px rgba(255, 93, 122, 0.45));
}

@keyframes reel-burst {
  0% {
    opacity: 0;
    transform: scale(0.35);
  }
  30% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

.reel-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(15, 157, 118, 0.18), transparent 55%),
    #07100d;
  color: #fff;
}

.reel-empty-ico {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.reel-empty h3 {
  margin: 4px 0 0;
  font-size: 16px;
}

.reel-empty p {
  margin: 0;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.55);
}

.reel-empty .btn.ghost {
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.reel-more-slide {
  height: 100%;
  display: grid;
  place-items: center;
  background: #07100d;
}

.reel-skeleton {
  display: flex;
  align-items: flex-start;
  padding: 110px 20px;
  background: linear-gradient(180deg, #10201b, #050807);
}

/* ==========================================================================
   用户主页
   ========================================================================== */

body.profile-open .tabbar {
  display: none;
}

.profile-screen {
  position: absolute;
  inset: 0;
  z-index: 28;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
  overflow: hidden;
}

.profile-screen.show {
  transform: none;
}

.profile-topbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  background: rgba(250, 249, 244, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  z-index: 4;
}

.profile-topbar > span:nth-child(2) {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 650;
}

.profile-topbar-space {
  width: 40px;
  flex: none;
}

.profile-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
}

.profile-cover {
  position: relative;
  height: 226px;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 20%, rgba(15, 157, 118, 0.5), transparent 55%),
    linear-gradient(150deg, #1b3b32, #0a1713 75%);
}

.profile-cover.has-image {
  background: #10221c;
}

.profile-cover.has-image::before {
  content: "";
  position: absolute;
  inset: -24px;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.62) saturate(1.05);
  transform: scale(1.12);
}

.profile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 20, 16, 0.18) 0%, rgba(244, 242, 236, 0.9) 78%, var(--bg) 100%);
}

.profile-head {
  position: relative;
  z-index: 2;
  margin: -58px 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar {
  width: 92px;
  height: 92px;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #e8e3d6);
  box-shadow: 0 10px 28px rgba(20, 32, 28, 0.16);
}

.profile-avatar .avatar {
  width: 84px !important;
  height: 84px !important;
  border-radius: 50%;
}

.profile-name {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.4px;
}

.profile-title {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--ink-2);
}

.profile-meta {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}

.profile-stats {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-top: 14px;
  padding: 12px 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.profile-stats > div {
  flex: 1;
  text-align: center;
  border-right: 1px solid var(--line);
}

.profile-stats > div:last-child {
  border-right: 0;
}

.profile-stats b {
  display: block;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.15;
}

.profile-stats span {
  font-size: 9px;
  color: var(--ink-3);
}

.profile-actions {
  width: 100%;
  margin-top: 12px;
}

.profile-actions .btn {
  height: 42px;
  border-radius: 13px;
}

.profile-works-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 20px 16px 8px;
}

.profile-works-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.profile-works-head h3 span {
  color: var(--ink-3);
  font-weight: 500;
}

.profile-works-head small {
  font-size: 8.5px;
  color: var(--ink-3);
}

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

.work-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #121a17;
  padding: 0;
  border: 0;
}

.work-tile img,
.work-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-tile video {
  pointer-events: none;
}

.work-text {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 25% 18%, rgba(15, 157, 118, 0.55), transparent 58%),
    linear-gradient(150deg, #1d4137, #0b1713);
  overflow: hidden;
}

.work-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.work-stats {
  position: absolute;
  left: 5px;
  bottom: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
  color: #fff;
  font-size: 8.5px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.work-count {
  position: absolute;
  right: 5px;
  top: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 7.5px;
}

.profile-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 40px 0;
  color: var(--ink-3);
  font-size: 11px;
}

.profile-empty p {
  margin: 0;
}

.profile-foot {
  margin: 22px 0 0;
  text-align: center;
  font-size: 8.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* 作品详情 */

.overlay-panel.work-detail-panel {
  width: min(440px, 100%);
  max-height: 90dvh;
  background: #0c1311;
  color: #fff;
}

.work-detail {
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.work-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.work-detail-head > span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.work-detail-head .role-badge {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.work-detail-head .icon-btn {
  color: #fff;
}

.work-detail-media {
  max-height: 56vh;
  overflow-y: auto;
  background: #000;
}

.work-detail-media img,
.work-detail-media video {
  display: block;
  width: 100%;
  max-height: 56vh;
  object-fit: contain;
  background: #000;
}

.work-detail-textbg {
  height: 260px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 25% 18%, rgba(15, 157, 118, 0.55), transparent 58%),
    linear-gradient(150deg, #1d4137, #0b1713);
}

.work-detail-textbg span {
  font-family: Georgia, serif;
  font-size: 130px;
  color: rgba(255, 255, 255, 0.12);
}

.work-detail-body {
  padding: 13px 14px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
}

.work-detail-body p {
  margin: 0 0 9px;
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  white-space: normal;
}

.work-detail-meta {
  display: flex;
  gap: 14px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
}

.work-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ==========================================================================
   工作台
   ========================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0 14px;
}

.stat-card {
  position: relative;
  padding: 11px 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.stat-ico {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-deep);
  margin-bottom: 6px;
}

.stat-card.warn .stat-ico {
  background: var(--amber-soft);
  color: #b7741a;
}

.stat-value {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.8px;
  line-height: 1.1;
}

.stat-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-top: 1px;
}

.stat-hint {
  font-size: 9px;
  color: var(--ink-3);
  margin-top: 2px;
}

.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 13px;
  background: var(--surface-3);
  margin-bottom: 12px;
  overflow-x: auto;
}

.segmented button {
  flex: 1;
  padding: 8px 5px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.16s, color 0.16s;
}

.segmented button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.segmented i {
  font-style: normal;
  font-size: 9px;
  color: var(--ink-3);
}

.console-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chip-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.chip {
  padding: 6px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
}

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 11px;
}

.select-wrap select {
  border: 0;
  outline: none;
  background: transparent;
  font-size: 11px;
  color: var(--ink);
  max-width: 110px;
}

.filter-hint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: var(--ink-3);
}

.admin-conv-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-conv {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.admin-conv-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-conv-top {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
}

.admin-conv-top b {
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-conv-top time {
  margin-left: auto;
  font-size: 9px;
  color: var(--ink-3);
  flex: none;
}

.admin-conv-preview {
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-conv-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--ink-3);
}

.assign-chip {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 600;
}

.assign-chip.waiting {
  background: var(--amber-soft);
  color: #a5680f;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 4px;
}

.panel-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.panel-head p {
  margin: 3px 0 0;
  font-size: 10px;
  line-height: 1.5;
  color: var(--ink-3);
}

.count-chip {
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

.agent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-card {
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.agent-card.owner-card {
  background: linear-gradient(150deg, #fffdf7, #fdf4e4);
  border: 1px solid rgba(232, 163, 61, 0.2);
}

.agent-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.agent-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 650;
  flex-wrap: wrap;
}

.agent-sub {
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 2px;
}

.agent-count {
  font-size: 9.5px;
  color: var(--ink-3);
  flex: none;
}

.agent-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}

.perm {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--ink-3);
  font-size: 8.5px;
}

.perm.on {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.agent-actions {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.agent-actions .mini-btn {
  flex: 1;
  padding: 6px 4px;
  font-size: 10px;
}

.customer-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.customer-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 6px;
  border-radius: 13px;
}

.customer-row:hover {
  background: rgba(255, 255, 255, 0.5);
}

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

.customer-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 620;
}

.customer-sub {
  font-size: 9.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch i {
  position: absolute;
  inset: 0;
  background: #d9d6cc;
  border-radius: 12px;
  transition: background 0.2s;
  cursor: pointer;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

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

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

.log-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border-radius: 16px;
  padding: 6px 12px;
  box-shadow: var(--shadow-sm);
}

.log-row {
  display: flex;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

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

.log-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 5px;
  flex: none;
  box-shadow: 0 0 0 3px rgba(15, 157, 118, 0.1);
}

.log-main p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink);
}

.log-main small {
  font-size: 9px;
  color: var(--ink-3);
}

.moderation-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.moderation-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.mod-type {
  display: inline-grid;
  place-items: center;
  flex: none;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 9px;
  font-weight: 650;
}

.mod-type.unblock {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.mod-type.intercept {
  background: var(--amber-soft);
  color: #a5680f;
}

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

.mod-main p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink);
}

.mod-main small {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  color: var(--ink-3);
  word-break: break-all;
}

.mod-main em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 9.5px;
  color: var(--ink-2);
}

.mod-detail {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--ink-3);
}

/* 访问数据 */

.visit-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  margin: 0 0 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #12a97f, #0a6e52);
  color: #fff;
  text-align: left;
  box-shadow: 0 12px 24px -14px rgba(10, 110, 82, 0.65);
}

.visit-strip-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  flex: none;
}

.visit-strip-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.visit-strip-text b {
  font-size: 12px;
}

.visit-strip-text small {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visit-strip > .ico {
  opacity: 0.7;
}

.visit-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.visit-metric {
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.visit-metric span {
  display: block;
  font-size: 9.5px;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.visit-metric b {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.visit-metric small {
  font-size: 9px;
  color: var(--ink-3);
  margin-left: 3px;
}

.visit-chart-card {
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

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

.visit-chart-head b {
  font-size: 11.5px;
}

.visit-chart-head span {
  font-size: 8.5px;
  color: var(--ink-3);
}

.visit-bars {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 124px;
}

.visit-bar {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.visit-bar-value {
  font-size: 8.5px;
  color: var(--ink-3);
  line-height: 1;
}

.visit-bar-track {
  flex: 1;
  width: 100%;
  max-width: 22px;
  border-radius: 6px;
  background: var(--surface-2);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.visit-bar-track i {
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: 6px;
  background: linear-gradient(180deg, #17b98b, #0a7a5b);
  transition: height 0.3s;
}

.visit-bar-label {
  font-size: 8px;
  color: var(--ink-3);
  white-space: nowrap;
}

.visitor-list {
  display: flex;
  flex-direction: column;
  padding: 4px 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.visitor-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

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

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

.visitor-main b {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visitor-main small {
  font-size: 9px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visitor-count {
  flex: none;
  text-align: right;
}

.visitor-count b {
  font-size: 13px;
}

.visitor-count small {
  font-size: 8px;
  color: var(--ink-3);
  margin-left: 1px;
}

/* ==========================================================================
   我的
   ========================================================================== */

.me-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 16px;
  margin: 4px 0 12px;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #17614e 0%, #0d3d31 62%, #0a2e26 100%);
  box-shadow: 0 16px 36px -16px rgba(10, 61, 49, 0.7);
}

.me-glow {
  position: absolute;
  right: -50px;
  top: -70px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72, 220, 170, 0.38), transparent 68%);
  pointer-events: none;
}

.me-avatar {
  position: relative;
  z-index: 1;
  padding: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.45);
  flex: none;
}

.me-avatar .avatar {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50%;
}

.me-info {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.me-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  flex-wrap: wrap;
}

.me-name .role-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.me-sub {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 3px;
}

.me-id {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
}

.me-edit-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  color: #fff;
  backdrop-filter: blur(6px);
}

.me-perm-card {
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}

.me-perm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.me-perm-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink-2);
}

.me-perm-head .state {
  font-size: 9.5px;
  font-weight: 650;
  padding: 3px 7px;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--ink-3);
}

.me-perm-head .state.on {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.me-perm-desc {
  margin: 8px 0 10px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.perm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}

.me-workbench {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 13px;
  margin-bottom: 10px;
  border-radius: 17px;
  background: linear-gradient(140deg, #ffffff, #f4fbf8);
  border: 1px solid rgba(15, 157, 118, 0.14);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.me-workbench-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-deep);
  flex: none;
}

.me-workbench-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.me-workbench-text b {
  font-size: 13px;
}

.me-workbench-text small {
  font-size: 9.5px;
  color: var(--ink-3);
}

.menu-card {
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

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

.menu-row:active {
  background: var(--surface-2);
}

.menu-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--ink-2);
  flex: none;
}

.menu-row > span:nth-child(2) {
  flex: 1;
}

.menu-value {
  font-size: 9.5px;
  color: var(--ink-3);
}

.menu-row > .ico:last-child {
  color: var(--ink-3);
}

.menu-row.danger {
  color: var(--danger);
}

/* ==========================================================================
   弹层 / 表单
   ========================================================================== */

#overlay-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: auto;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 17, 0.46);
  opacity: 0;
  transition: opacity 0.22s;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.overlay.show .overlay-backdrop {
  opacity: 1;
}

.overlay-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  max-height: 88dvh;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform: translateY(16px) scale(0.985);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.2s;
}

.overlay.show .overlay-panel {
  transform: none;
  opacity: 1;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
  margin: 8px auto 0;
  flex: none;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px 10px;
  flex: none;
}

.sheet-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sheet-head p {
  margin: 3px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--ink-3);
}

.sheet-body {
  padding: 4px 20px 18px;
  overflow-y: auto;
  min-height: 0;
}

.sheet-footer {
  padding: 10px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  flex: none;
  background: var(--surface);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  font-size: 10.5px;
  font-weight: 650;
  color: var(--ink-2);
}

.field input,
.field textarea {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  padding: 0 12px;
  outline: none;
  font-size: 14px;
  width: 100%;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 157, 118, 0.1);
}

.field input:disabled {
  opacity: 0.6;
}

.field textarea {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.55;
  font-size: 13px;
}

.form-hint {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 2px 0 0;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.form-hint code {
  font-family: var(--mono);
  background: var(--surface-3);
  padding: 1px 4px;
  border-radius: 4px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 12px;
}

.check-row + .check-row {
  margin-top: 6px;
}

.check-row input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--brand);
  flex: none;
}

.check-row b {
  display: block;
  font-size: 11.5px;
  font-weight: 620;
}

.check-row small {
  display: block;
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--ink-3);
  margin-top: 2px;
}

/* 对话框 */

.overlay-panel.dialog-panel {
  width: min(340px, 90vw);
  max-height: none;
  margin: auto;
}

.dialog {
  padding: 22px 20px 16px;
}

.dialog h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.dialog p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-2);
}

.dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.dialog-actions .btn {
  flex: 1;
  height: 42px;
  border-radius: 12px;
  font-size: 13px;
}

/* 菜单列表 */

.menu-list {
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
}

.menu-list .menu-row {
  padding: 12px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}

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

.menu-list .menu-row.danger {
  color: var(--danger);
}

/* 资料 */

.info-list {
  border-radius: 14px;
  background: var(--surface-2);
  padding: 2px 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}

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

.info-row span {
  color: var(--ink-3);
  flex: none;
}

.info-row b {
  font-weight: 550;
  text-align: right;
  word-break: break-all;
}

.info-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 12px;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0 16px;
}

.profile-head h3 {
  margin: 0 0 3px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-head p {
  margin: 2px 0;
  font-size: 10.5px;
  color: var(--ink-3);
}

.profile-head p.mono {
  font-family: var(--mono);
}

.pick-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border-radius: 12px;
  background: var(--surface-2);
  text-align: left;
}

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

.pick-main b {
  font-size: 12.5px;
}

.pick-main small {
  font-size: 9.5px;
  color: var(--ink-3);
}

/* 搜索 */

.search-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.search-group-title {
  font-size: 9.5px;
  font-weight: 650;
  color: var(--ink-3);
  padding: 8px 2px 4px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 12px;
  text-align: left;
}

.search-row:hover {
  background: var(--surface-2);
}

.search-row > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  font-weight: 550;
  min-width: 0;
}

.search-row small {
  font-size: 9.5px;
  color: var(--ink-3);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 登录演示 */

.demo-accounts {
  border-radius: 13px;
  background: var(--surface-2);
  padding: 10px 12px;
}

.demo-accounts > p {
  margin: 0 0 7px;
  font-size: 9.5px;
  color: var(--ink-3);
}

.demo-accounts > p b {
  color: var(--ink-2);
}

.demo-account {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 10px;
  color: var(--ink-3);
}

.demo-account:last-child {
  border-bottom: 0;
}

.demo-account span {
  width: 42px;
  flex: none;
}

.demo-account b {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink);
}

.demo-account small {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 9px;
}

.avatar-edit {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 4px;
}

.avatar-preview-box {
  position: relative;
  width: 72px;
  height: 72px;
  flex: none;
}

.avatar-preview-box img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
}

.avatar-preview-box .avatar {
  width: 72px !important;
  height: 72px !important;
}

.avatar-edit-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: 14px;
  background: var(--surface-2);
  margin-bottom: 12px;
}

.setting-text {
  flex: 1;
  min-width: 0;
}

.setting-text b {
  font-size: 12.5px;
}

.setting-text p {
  margin: 3px 0 0;
  font-size: 10px;
  line-height: 1.55;
  color: var(--ink-3);
}

.avatar-edit img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
}

.avatar-edit .hidden {
  display: none !important;
}

/* 关于 */

.about-hero {
  text-align: center;
  padding: 4px 0 18px;
}

.about-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #17b98b, #08634a);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 12px 26px -8px rgba(10, 110, 80, 0.55);
}

.about-hero p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-2);
}

.about-hero small {
  font-size: 9.5px;
  color: var(--ink-3);
}

.about-list {
  border-radius: 14px;
  background: var(--surface-2);
  padding: 4px 12px;
}

.about-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

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

.about-row b {
  font-size: 11.5px;
}

.about-row span {
  font-size: 10px;
  color: var(--ink-3);
  line-height: 1.5;
}

/* 灯箱 */

.overlay-panel.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  background: rgba(6, 10, 9, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transform: none;
  opacity: 1;
}

.overlay-panel.lightbox .overlay-backdrop {
  display: none;
}

.lightbox-media {
  max-width: 94vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.lightbox-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(22px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}

/* Toast */

#toast-root {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 96px;
  z-index: 300;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 16px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 82vw;
  padding: 10px 16px;
  border-radius: 13px;
  background: rgba(18, 30, 26, 0.94);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast.error {
  background: rgba(146, 36, 41, 0.96);
}

.toast.success {
  background: rgba(9, 108, 79, 0.96);
}

/* ==========================================================================
   通话
   ========================================================================== */

.overlay-panel.call-panel {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  padding: 0;
  background: #080d0b;
  transform: none;
  opacity: 1;
}

.call-ui {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 50% 12%, rgba(35, 74, 62, 0.6), transparent 55%),
    linear-gradient(170deg, #10201b 0%, #07100d 100%);
}

.call-remote {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: none;
  z-index: 1;
}

.call-ui.remote-video .call-remote {
  display: block;
}

.call-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 32%, transparent 62%, rgba(0, 0, 0, 0.78));
}

.call-bg {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  transition: opacity 0.25s;
}

.call-ui.remote-video .call-bg {
  opacity: 0;
  pointer-events: none;
}

.call-avatar {
  position: relative;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  padding: 3px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}

.call-avatar .avatar {
  width: 100px !important;
  height: 100px !important;
  border-radius: 50%;
}

.pulse-ring {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.32);
  animation: call-pulse 2s ease-out infinite;
}

@keyframes call-pulse {
  0% {
    transform: scale(0.96);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}

.call-ui.connected .pulse-ring {
  display: none;
}

.call-kicker {
  font-size: 10.5px;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 10px;
}

.call-name {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.call-status {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.62);
}

.call-timer {
  height: 18px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
}

.call-local {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 4;
  width: 96px;
  height: 128px;
  border-radius: 14px;
  object-fit: cover;
  background: #101613;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.call-topbar {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.capture-safe {
  color: #bdf4e0;
}

.call-capture-alert {
  position: absolute;
  top: calc(92px + env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  z-index: 8;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(176, 42, 54, 0.94);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s;
}

.call-capture-alert.show {
  display: flex;
  opacity: 1;
  transform: none;
}

.call-capture-alert b {
  display: block;
  font-size: 11px;
  font-weight: 700;
}

.call-capture-alert span {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.82);
}

.call-head {
  position: absolute;
  top: calc(48px + env(safe-area-inset-top));
  left: 16px;
  z-index: 4;
  display: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.call-ui.remote-video .call-head {
  display: block;
}

.call-head-name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.2px;
}

.call-head-sub {
  margin-top: 2px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
}

#callHeadTimer:not(:empty)::before {
  content: " · ";
}

.call-safe {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
  backdrop-filter: blur(8px);
}

.call-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(34px + env(safe-area-inset-bottom));
  z-index: 4;
  display: flex;
  justify-content: center;
}

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

.call-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.78);
}

.call-tool-ico {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  transition: background 0.18s, transform 0.12s, color 0.18s;
}

.call-tool:active .call-tool-ico {
  transform: scale(0.94);
}

.call-tool.active .call-tool-ico {
  background: #fff;
  color: #14201c;
}

.call-tool.hangup .call-tool-ico {
  background: #e5484d;
  color: #fff;
}

.call-tool.accept .call-tool-ico {
  background: #21b573;
  color: #fff;
  animation: accept-breathe 1.8s ease-in-out infinite;
}

@keyframes accept-breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(33, 181, 115, 0.45);
  }
  55% {
    box-shadow: 0 0 0 14px rgba(33, 181, 115, 0);
  }
}

/* ==========================================================================
   启动
   ========================================================================== */

.boot-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg);
  text-align: center;
  padding: 24px;
}

.boot-logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #17b98b, #08634a);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  box-shadow: 0 18px 40px -12px rgba(8, 99, 74, 0.65);
  margin-bottom: 6px;
  animation: boot-in 0.5s cubic-bezier(0.22, 0.8, 0.3, 1);
}

@keyframes boot-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
}

.boot-tagline {
  font-size: 11.5px;
  letter-spacing: 1.6px;
  color: var(--ink-3);
}

.boot-spinner {
  width: 18px;
  height: 18px;
  margin-top: 18px;
  border-radius: 50%;
  border: 2px solid rgba(15, 157, 118, 0.2);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.boot-screen p {
  margin: 0;
  font-size: 11px;
  color: var(--ink-3);
}

.boot-screen.error {
  gap: 10px;
}

.boot-screen.error p {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
}

.boot-screen.error small {
  font-size: 10.5px;
  color: var(--ink-3);
  max-width: 280px;
  line-height: 1.6;
}

.boot-screen .btn {
  margin-top: 10px;
  height: 40px;
  padding: 0 22px;
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1240px) {
  .intro {
    display: none;
  }

  .stage {
    gap: 0;
    padding: 24px;
  }
}

@media (max-width: 720px) {
  body {
    background: var(--bg);
  }

  .stage {
    display: block;
    padding: 0;
    height: 100vh;
    height: 100dvh;
  }

  .phone-frame {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .phone-glare {
    display: none;
  }

  .app {
    border-radius: 0;
  }

  .overlay {
    align-items: flex-end;
    padding: 0;
  }

  .overlay-panel {
    width: 100%;
    max-height: 90dvh;
    border-radius: 26px 26px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .overlay-panel.dialog-panel {
    width: calc(100% - 32px);
    margin: auto auto 20px;
    border-radius: 22px;
  }

  .overlay-panel.tall {
    height: 86dvh;
  }

  .overlay-panel.call-panel,
  .overlay-panel.lightbox {
    border-radius: 0;
    padding-bottom: 0;
  }

  .sheet-handle {
    display: block;
  }

  .toast {
    font-size: 11.5px;
  }

  #toast-root {
    bottom: 88px;
  }
}

@media (min-width: 721px) {
  .sheet-handle {
    display: none;
  }

  .overlay-panel.sheet {
    width: min(460px, 90vw);
  }

  .overlay-panel.sheet.tall {
    height: min(680px, 84vh);
  }
}

@media (max-height: 640px) {
  .topbar {
    padding-top: calc(14px + env(safe-area-inset-top));
  }

  .topbar h1 {
    font-size: 25px;
  }

  .stat-grid {
    gap: 6px;
  }

  .stat-card {
    padding: 9px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   视觉焕新 2.0：更柔和的纸张质感 + 薄荷绿强调
   ========================================================================== */

:root {
  --bg: #f7f5ef;
  --surface: #fffdf9;
  --surface-2: #f2efe6;
  --surface-3: #ebe7dc;
  --ink: #11201a;
  --ink-2: #53645c;
  --ink-3: #8e9b94;
  --line: rgba(17, 32, 26, 0.075);
  --line-strong: rgba(17, 32, 26, 0.13);
  --brand: #0b9b74;
  --brand-deep: #08765a;
  --brand-soft: #e1f5ed;
  --amber: #df9a32;
  --amber-soft: #fbf0dc;
  --danger: #d9454f;
  --danger-soft: #fdecee;
  --shadow-sm: 0 2px 8px rgba(20, 34, 28, 0.045);
  --shadow-xs: 0 1px 3px rgba(20, 34, 28, 0.06);
  --shadow: 0 24px 60px -18px rgba(20, 34, 28, 0.25);
}

body {
  background:
    radial-gradient(1000px 680px at 8% 2%, #e3f0e8 0%, transparent 55%),
    radial-gradient(860px 620px at 96% 96%, #f6e7ce 0%, transparent 58%),
    linear-gradient(135deg, #f4f1e9 0%, #ece8dd 52%, #e6e1d4 100%);
}

::selection {
  background: rgba(11, 155, 116, 0.22);
  color: var(--ink);
}

.phone-frame {
  box-shadow:
    0 70px 120px -42px rgba(15, 28, 23, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 2px 0 rgba(255, 255, 255, 0.14) inset;
}

.app {
  background:
    radial-gradient(520px 300px at 100% 0%, rgba(11, 155, 116, 0.065), transparent 62%),
    var(--bg);
}

.topbar {
  background: linear-gradient(180deg, rgba(250, 248, 242, 0.92), rgba(250, 248, 242, 0.68));
  border-bottom: 1px solid rgba(17, 32, 26, 0.05);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.topbar h1 {
  font-size: 29px;
  letter-spacing: -1.1px;
  font-weight: 760;
}

.topbar .sub {
  letter-spacing: 0.05px;
}

.icon-btn {
  border-radius: 12px;
  transition: background 0.18s, transform 0.12s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.75);
}

.icon-btn:active {
  transform: scale(0.94);
}

.btn.primary {
  background: linear-gradient(140deg, #13b084 0%, #087a5d 78%);
  box-shadow: 0 12px 24px -10px rgba(8, 122, 93, 0.55);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -12px rgba(8, 122, 93, 0.6);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.tab-item:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(11, 155, 116, 0.55);
  outline-offset: 2px;
}

.section-head h2 {
  font-size: 12px;
  letter-spacing: 0.2px;
}

.conv-list {
  gap: 8px;
  padding: 4px 0 10px;
}

.conv-row {
  padding: 11px 12px;
  border: 1px solid rgba(17, 32, 26, 0.055);
  background: rgba(255, 253, 249, 0.68);
  box-shadow: 0 5px 18px -12px rgba(17, 32, 26, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.conv-row:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(11, 155, 116, 0.16);
  box-shadow: 0 10px 24px -16px rgba(17, 32, 26, 0.3);
}

.conv-name {
  font-size: 14.5px;
  font-weight: 680;
}

.contact-row {
  border-radius: 16px;
  transition: background 0.16s, transform 0.12s;
}

.contact-row:hover {
  background: rgba(255, 255, 255, 0.7);
}

.card-list {
  gap: 7px;
}

.tabbar {
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  background: rgba(253, 251, 246, 0.88);
  border-top: 1px solid rgba(17, 32, 26, 0.06);
  box-shadow: 0 -14px 32px -22px rgba(17, 32, 26, 0.35);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
}

.tab-item {
  gap: 2px;
  border-radius: 14px;
  color: #94a19a;
  transition: color 0.18s, background 0.18s;
}

.tab-item.active {
  color: var(--brand-deep);
}

.tab-item.active .tab-ico {
  padding: 0 10px;
  height: 27px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(11, 155, 116, 0.14), rgba(11, 155, 116, 0.07));
}

.tab-badge {
  border-color: #fbf9f4;
}

.chat-screen {
  background:
    radial-gradient(440px 260px at 100% 0%, rgba(11, 155, 116, 0.055), transparent 60%),
    var(--bg);
}

.chat-top {
  background: rgba(251, 249, 243, 0.88);
  border-bottom: 1px solid rgba(17, 32, 26, 0.055);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.bubble {
  border: 1px solid rgba(17, 32, 26, 0.045);
  box-shadow: 0 3px 12px -8px rgba(17, 32, 26, 0.28);
}

.msg.mine .bubble {
  background: linear-gradient(150deg, #17ad83 0%, #0a805f 100%);
  border-color: transparent;
  box-shadow: 0 8px 18px -12px rgba(8, 122, 93, 0.65);
}

.voice-bubble {
  border: 1px solid rgba(17, 32, 26, 0.045);
}

.msg.mine .voice-bubble {
  border-color: transparent;
  box-shadow: 0 8px 18px -12px rgba(8, 122, 93, 0.65);
}

.composer {
  background: rgba(251, 249, 243, 0.9);
  border-top: 1px solid rgba(17, 32, 26, 0.055);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
}

.input-wrap {
  border-color: rgba(17, 32, 26, 0.07);
  box-shadow: 0 2px 10px -6px rgba(17, 32, 26, 0.16);
}

.input-wrap:focus-within {
  border-color: rgba(11, 155, 116, 0.4);
  box-shadow: 0 0 0 3px rgba(11, 155, 116, 0.09);
}

.stat-card {
  border: 1px solid rgba(17, 32, 26, 0.055);
  background: linear-gradient(150deg, #fffefb, #f8f6ee);
  box-shadow: 0 10px 26px -20px rgba(17, 32, 26, 0.32);
}

.overlay-panel {
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 30px 80px -28px rgba(15, 28, 23, 0.45);
}

.panel,
.visit-strip,
.sheet-card {
  border: 1px solid rgba(17, 32, 26, 0.05);
}

.screen {
  animation-duration: 0.28s;
}

