:root {
  --accent: #2f6bff;
  --accent-dark: #1f52d6;
  --accent-soft: #eaf0ff;
  --bg: #f4f5f8;
  --card: #ffffff;
  --text: #16181d;
  --text-2: #6b7280;
  --text-3: #9aa1ad;
  --line: #eceef2;
  --green: #12b76a;
  --red: #f04438;
  --orange: #f79009;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(18, 24, 40, .05);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; }
input, textarea { outline: none; }

.hide { display: none !important; }

/* ------------------------------- 启动 / 登录 ------------------------------ */

.auth-wrap {
  min-height: 100%;
  padding: calc(var(--safe-t) + 48px) 24px calc(var(--safe-b) + 32px);
  display: flex;
  flex-direction: column;
  background: radial-gradient(120% 60% at 50% 0%, #dfe8ff 0%, #f4f5f8 55%, #f4f5f8 100%);
}

.brand { text-align: center; margin-bottom: 28px; }
.brand-logo {
  width: 74px; height: 74px; margin: 0 auto 14px;
  border-radius: 22px;
  background: linear-gradient(145deg, #4b7dff, #2350d8);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700; letter-spacing: -1px;
  box-shadow: 0 12px 26px rgba(47, 107, 255, .32);
}
.brand h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: .5px; }
.brand p { margin: 0; color: var(--text-2); font-size: 13.5px; }

.auth-card {
  background: var(--card);
  border-radius: 20px;
  padding: 22px 20px 20px;
  box-shadow: 0 10px 40px rgba(18, 24, 40, .08);
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; }
.field .input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: #f6f7f9; border: 1px solid #eef0f4; border-radius: 12px;
  padding: 0 14px; height: 48px;
  transition: border-color .18s, background .18s;
}
.field .input-wrap:focus-within { border-color: var(--accent); background: #fff; }
.field input {
  flex: 1; border: none; background: transparent; font-size: 15.5px; min-width: 0;
  height: 100%;
}
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; border-radius: 12px; font-size: 16px; font-weight: 600;
  background: #eef0f4; color: var(--text);
  transition: transform .12s, opacity .18s;
  width: 100%;
}
.btn:active { transform: scale(.985); opacity: .9; }
.btn-primary { background: linear-gradient(135deg, #4b7dff, #2350d8); color: #fff; box-shadow: 0 8px 18px rgba(47, 107, 255, .28); }
.btn-ghost { background: #fff; border: 1px solid var(--line); }
.btn-danger { background: #fff; color: var(--red); border: 1px solid #ffdcd8; }
.btn-sm { height: 34px; font-size: 13.5px; border-radius: 9px; width: auto; padding: 0 14px; font-weight: 500; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.auth-switch { text-align: center; font-size: 13.5px; color: var(--text-2); margin-top: 16px; }
.auth-switch b { color: var(--accent); font-weight: 600; }

.server-line {
  margin-top: 18px; text-align: center; font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* -------------------------------- 主框架 -------------------------------- */

.shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.topbar {
  padding: calc(var(--safe-t) + 10px) 16px 10px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topbar h2 { font-size: 19px; margin: 0; letter-spacing: .3px; flex: 1; }
.topbar .sub { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 6px; }
.topbar-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); background: transparent;
}
.icon-btn:active { background: #f0f1f4; }

.tab-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }

.tabbar {
  display: flex;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  padding-bottom: var(--safe-b);
  position: relative; z-index: 9;
}
.tabbar button {
  flex: 1; padding: 7px 0 8px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-3); font-size: 11px; position: relative;
}
.tabbar button.active { color: var(--accent); }
.tabbar button .dot {
  position: absolute; top: 4px; left: 50%; margin-left: 6px;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--red); color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  font-weight: 600;
}
.tabbar svg { width: 23px; height: 23px; }

/* --------------------------------- 列表 --------------------------------- */

.search-bar { padding: 10px 16px 4px; }
.search-bar .box {
  display: flex; align-items: center; gap: 8px;
  background: #ebedf1; border-radius: 10px; height: 38px; padding: 0 12px;
  color: var(--text-3);
}
.search-bar input { border: none; background: transparent; flex: 1; font-size: 14.5px; height: 100%; }

.section-title {
  padding: 16px 18px 7px;
  font-size: 12.5px; color: var(--text-3); font-weight: 500; letter-spacing: .4px;
}

.list { background: var(--card); }
.list.inset { margin: 8px 12px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

.cell {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  position: relative;
  transition: background .15s;
}
.cell:active { background: #f7f8fa; }
.cell::after {
  content: ''; position: absolute; left: 68px; right: 0; bottom: 0; height: 1px;
  background: var(--line); transform: scaleY(.6);
}
.cell:last-child::after { display: none; }
.cell-body { flex: 1; min-width: 0; }
.cell-title { display: flex; align-items: center; gap: 6px; }
.cell-title strong { font-size: 15.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-desc {
  font-size: 12.8px; color: var(--text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cell-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.cell-time { font-size: 11.5px; color: var(--text-3); }
.chev { color: #c8ccd4; flex-shrink: 0; }
.cell-value { font-size: 14px; color: var(--text-2); }

.avatar {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  object-fit: cover; background: linear-gradient(135deg, #dfe6f7, #cdd8f2);
  display: flex; align-items: center; justify-content: center;
  color: #5a6b95; font-weight: 600; font-size: 16px; overflow: hidden;
  position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.avatar.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 24px; }
.avatar.xl { width: 84px; height: 84px; border-radius: 22px; font-size: 30px; }
.avatar .online-dot {
  position: absolute; right: -2px; bottom: -2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); border: 2px solid #fff;
}

.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.badge.gray { background: #c9ced8; }

.empty {
  padding: 60px 30px; text-align: center; color: var(--text-3); font-size: 13.5px;
}
.empty svg { margin: 0 auto 12px; opacity: .35; }

/* --------------------------------- 聊天 --------------------------------- */

.chat-screen {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column;
  background: #eef0f4;
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.32, .72, 0, 1);
}
.chat-screen.open { transform: translateX(0); }

.chat-head {
  padding: calc(var(--safe-t) + 8px) 10px 8px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(247, 248, 250, .95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  flex-shrink: 0;
  z-index: 2;
}
.chat-head .title-wrap { flex: 1; text-align: center; min-width: 0; }
.chat-head .title-wrap h3 { margin: 0; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head .title-wrap .st { font-size: 11.5px; color: var(--text-3); margin-top: 1px; height: 14px; }
.chat-head .back-btn {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  color: var(--text); border-radius: 10px;
}
.chat-head .back-btn:active { background: rgba(0, 0, 0, .05); }

.msg-list {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 12px 6px;
  display: flex; flex-direction: column; gap: 12px;
}

.sys-tip { text-align: center; margin: 4px 0; }
.sys-tip span {
  display: inline-block; background: rgba(0, 0, 0, .06); color: #6f7581;
  padding: 4px 10px; border-radius: 8px; font-size: 11.5px; max-width: 84%; line-height: 1.5;
}

.msg-row { display: flex; gap: 9px; align-items: flex-start; }
.msg-row.mine { flex-direction: row-reverse; }
.msg-main { max-width: 74%; display: flex; flex-direction: column; gap: 4px; }
.msg-row.mine .msg-main { align-items: flex-end; }
.msg-author { font-size: 11px; color: var(--text-3); padding: 0 2px; }

.bubble {
  padding: 9px 13px;
  border-radius: 14px;
  background: #fff;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
  position: relative;
  border-top-left-radius: 5px;
}
.msg-row.mine .bubble {
  background: linear-gradient(140deg, #4d80ff, #2a5fe8);
  color: #fff;
  border-top-left-radius: 14px;
  border-top-right-radius: 5px;
  box-shadow: 0 2px 8px rgba(47, 107, 255, .26);
}
.bubble.revoked { background: #e9ebef !important; color: var(--text-3); font-style: italic; font-size: 13px; box-shadow: none; }

.bubble.img-bubble { padding: 3px; background: #fff; overflow: hidden; }
.bubble.img-bubble img { max-width: 100%; border-radius: 11px; max-height: 280px; object-fit: cover; }
.msg-row.mine .bubble.img-bubble { background: #fff; }

.voice-bubble {
  display: flex; align-items: center; gap: 8px; min-width: 74px;
  padding: 9px 14px;
}
.voice-bubble .wave { display: flex; align-items: center; gap: 2px; height: 14px; }
.voice-bubble .wave i { width: 2px; background: currentColor; border-radius: 2px; opacity: .55; }
.voice-bubble .dur { font-size: 12px; opacity: .8; }
.voice-bubble.playing .wave i { animation: wave .9s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }

.transfer-bubble {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; min-width: 190px;
  background: linear-gradient(135deg, #fff6e5, #ffeccd) !important;
  color: #7a4b00 !important;
  border: 1px solid #ffe0a8;
}
.msg-row.mine .transfer-bubble { background: linear-gradient(135deg, #fff6e5, #ffe9c4) !important; color: #7a4b00 !important; }
.transfer-bubble .tf-ico {
  width: 34px; height: 34px; border-radius: 50%; background: #ff9d00; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
}
.transfer-bubble .tf-amt { font-size: 17px; font-weight: 700; }
.transfer-bubble .tf-note { font-size: 11.5px; opacity: .75; margin-top: 2px; }

.call-bubble { display: flex; align-items: center; gap: 8px; font-size: 13.5px; opacity: .85; }

.msg-time { font-size: 10.5px; color: #a3a8b3; padding: 0 3px; }

.composer {
  flex-shrink: 0;
  background: #f7f8fa;
  border-top: 1px solid rgba(0, 0, 0, .06);
  padding: 8px 10px calc(8px + var(--safe-b));
  display: flex; align-items: flex-end; gap: 8px;
}
.composer .tool {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #5c6270;
}
.composer .tool:active { background: #e8eaee; }
.composer .tool.accent { color: var(--accent); }
.composer textarea {
  flex: 1; min-height: 38px; max-height: 108px; resize: none;
  border: none; border-radius: 10px; background: #fff;
  padding: 9px 12px; font-size: 15px; line-height: 1.35;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}
.hold-talk {
  flex: 1; height: 38px; border-radius: 10px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14.5px; color: #4a5060; font-weight: 500;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
  user-select: none; -webkit-user-select: none;
}
.hold-talk.recording { background: #e7ecff; color: var(--accent); }

.emoji-panel {
  background: #f7f8fa; border-top: 1px solid rgba(0, 0, 0, .06);
  padding: 10px 12px calc(10px + var(--safe-b));
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px;
  max-height: 210px; overflow-y: auto;
}
.emoji-panel button { font-size: 22px; padding: 4px 0; border-radius: 8px; }
.emoji-panel button:active { background: #e8eaee; }

/* --------------------------------- 弹层 --------------------------------- */

.mask {
  position: fixed; inset: 0; background: rgba(12, 16, 26, .42);
  z-index: 80; opacity: 0; transition: opacity .2s;
  display: flex; align-items: flex-end; justify-content: center;
}
.mask.show { opacity: 1; }
.sheet {
  background: #fff; width: 100%; max-width: 520px;
  border-radius: 18px 18px 0 0;
  padding: 8px 0 calc(8px + var(--safe-b));
  transform: translateY(100%); transition: transform .26s cubic-bezier(.32, .72, 0, 1);
  max-height: 82vh; overflow-y: auto;
}
.mask.show .sheet { transform: translateY(0); }
.sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: #dfe2e8; margin: 6px auto 10px; }
.sheet h4 { margin: 0 0 4px; padding: 0 20px 10px; font-size: 15px; text-align: center; }
.sheet-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; font-size: 15.5px;
}
.sheet-item:active { background: #f6f7f9; }
.sheet-item.danger { color: var(--red); }
.sheet-item .s-ico { width: 22px; display: flex; justify-content: center; color: var(--text-2); }

.toast {
  position: fixed; left: 50%; bottom: calc(72px + var(--safe-b));
  transform: translateX(-50%) translateY(10px);
  background: rgba(22, 26, 35, .92); color: #fff;
  padding: 10px 16px; border-radius: 10px; font-size: 13.5px;
  z-index: 200; opacity: 0; transition: opacity .2s, transform .2s;
  pointer-events: none; max-width: 82vw; text-align: center; line-height: 1.45;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --------------------------------- 个人 -------------------------------- */

.profile-hero {
  padding: 22px 20px 18px;
  background: linear-gradient(160deg, #e8eeff 0%, #f6f8ff 60%, #f4f5f8 100%);
  display: flex; align-items: center; gap: 16px;
}
.profile-hero .info { flex: 1; min-width: 0; }
.profile-hero h3 { margin: 0 0 4px; font-size: 19px; }
.profile-hero p { margin: 0; font-size: 12.5px; color: var(--text-2); }

.balance-card {
  margin: 12px; padding: 18px 18px 16px; border-radius: 16px;
  background: linear-gradient(135deg, #2f6bff, #1c46b8);
  color: #fff; box-shadow: 0 10px 26px rgba(47, 107, 255, .28);
  position: relative; overflow: hidden;
}
.balance-card::after {
  content: ''; position: absolute; right: -30px; top: -40px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255, 255, 255, .1);
}
.balance-card .lb { font-size: 12.5px; opacity: .8; }
.balance-card .amt { font-size: 34px; font-weight: 700; margin: 6px 0 2px; letter-spacing: -.5px; }
.balance-card .amt small { font-size: 16px; font-weight: 500; margin-right: 3px; }
.balance-card .acts { display: flex; gap: 10px; margin-top: 14px; position: relative; z-index: 1; }
.balance-card .acts button {
  flex: 1; height: 36px; border-radius: 9px; background: rgba(255, 255, 255, .18);
  color: #fff; font-size: 13.5px; font-weight: 500;
  backdrop-filter: blur(4px);
}
.balance-card .acts button.primary { background: #fff; color: var(--accent); font-weight: 600; }

.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 4px 0 6px; }
.amount-grid button {
  height: 52px; border-radius: 12px; background: #f6f7f9; border: 1.5px solid transparent;
  font-size: 16px; font-weight: 600; color: var(--text);
}
.amount-grid button.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.amount-grid button small { font-size: 11px; font-weight: 400; color: var(--text-3); display: block; }

.ledger-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; position: relative; }
.ledger-item::after { content: ''; position: absolute; left: 16px; right: 0; bottom: 0; height: 1px; background: var(--line); }
.ledger-item:last-child::after { display: none; }
.ledger-item .li-ico {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: #eef1f6; color: var(--text-2);
}
.ledger-item .li-ico.in { background: #e7f8ef; color: var(--green); }
.ledger-item .li-ico.out { background: #fdeceb; color: var(--red); }
.ledger-item .li-main { flex: 1; min-width: 0; }
.ledger-item .li-main strong { font-size: 14.5px; font-weight: 500; }
.ledger-item .li-main p { margin: 2px 0 0; font-size: 11.5px; color: var(--text-3); }
.ledger-item .li-amt { font-size: 15.5px; font-weight: 600; }
.li-amt.in { color: var(--green); }
.li-amt.out { color: var(--text); }

/* --------------------------------- 表单页 ------------------------------- */

.page {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .24s cubic-bezier(.32, .72, 0, 1);
}
.page.open { transform: translateX(0); }
.page-head {
  padding: calc(var(--safe-t) + 8px) 10px 8px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.page-head h3 { flex: 1; text-align: center; font-size: 16px; margin: 0; font-weight: 600; }
.page-head .act { font-size: 14.5px; color: var(--accent); font-weight: 500; padding: 8px 10px; }
.page-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(24px + var(--safe-b)); }

.form-group { margin: 12px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.form-row { display: flex; align-items: center; padding: 0 16px; min-height: 52px; position: relative; }
.form-row::after { content: ''; position: absolute; left: 16px; right: 0; bottom: 0; height: 1px; background: var(--line); }
.form-row:last-child::after { display: none; }
.form-row label { width: 92px; font-size: 14.5px; color: var(--text-2); flex-shrink: 0; }
.form-row input, .form-row select {
  flex: 1; border: none; background: transparent; font-size: 15.5px; height: 44px; min-width: 0;
}
.form-row .unit { font-size: 13px; color: var(--text-3); }
.form-note { padding: 0 18px; font-size: 12px; color: var(--text-3); line-height: 1.7; }

.tip-box {
  margin: 12px; padding: 12px 14px; border-radius: 12px;
  background: #fff8e8; color: #8a5a00; font-size: 12.5px; line-height: 1.65;
  border: 1px solid #ffe9bd;
}

.member-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 10px; padding: 16px; }
.member-grid .m-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.member-grid .m-item span { font-size: 11.5px; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-grid .add-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 1.5px dashed #cfd4dd;
  display: flex; align-items: center; justify-content: center; color: #a9afba; font-size: 22px;
}

.check {
  width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid #cfd4dd;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: transparent; font-size: 12px;
}
.check.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --------------------------------- 通话 -------------------------------- */

.call-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: linear-gradient(170deg, #1b2540, #0b1020 65%);
  color: #fff; display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-t) + 54px) 24px calc(var(--safe-b) + 40px);
}
.call-overlay .peer-name { font-size: 22px; font-weight: 600; margin-top: 20px; }
.call-overlay .call-state { font-size: 14px; color: rgba(255, 255, 255, .6); margin-top: 8px; letter-spacing: .5px; }
.call-overlay .call-avatar {
  width: 108px; height: 108px; border-radius: 30px; overflow: hidden;
  background: rgba(255, 255, 255, .12); display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 600; margin-top: 40px; position: relative;
}
.call-overlay .call-avatar::after {
  content: ''; position: absolute; inset: -8px; border-radius: 38px;
  border: 1px solid rgba(255, 255, 255, .14);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.96); opacity: .8; } 100% { transform: scale(1.12); opacity: 0; } }
.call-overlay .spacer { flex: 1; }
.call-controls { display: flex; gap: 34px; align-items: center; justify-content: center; margin-bottom: 14px; }
.call-controls button {
  width: 62px; height: 62px; border-radius: 50%;
  background: rgba(255, 255, 255, .13); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-direction: column; gap: 2px;
}
.call-controls button.hangup { background: #f04438; }
.call-controls button.on { background: #fff; color: #111; }
.call-controls button.accept { background: var(--green); }

/* 图片预览 */
.img-viewer {
  position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, .92);
  display: flex; align-items: center; justify-content: center;
}
.img-viewer img { max-width: 96vw; max-height: 88vh; object-fit: contain; }

@media (min-width: 720px) {
  .shell, .chat-screen, .page { max-width: 480px; margin: 0 auto; left: 50%; transform: translateX(-50%); }
  .chat-screen { transform: translateX(-40%); }
  .chat-screen.open { transform: translateX(-50%); }
  .page { transform: translateX(-40%); }
  .page.open { transform: translateX(-50%); }
  body { background: #e9ebf0; }
}
