/* 出海聊 —— 版式照微信：浅灰底、常规字重、细线小图标、小圆角方头像；品牌色取自图标的亮蓝 */
:root {
  --brand: #1677ff;
  --brand-d: #0b5ad9;
  --brand-l: #eaf2ff;
  --bg: #f5f5f5;
  --rail: #e9e9e9;
  --side: #f7f7f7;
  --panel: #ffffff;
  --line: #e5e5e5;
  --hover: #ebebeb;
  --sel: #dedede;
  --text: #191919;
  --text-2: #6b6b6b;
  --muted: #a3a3a3;
  --out: #a9d3ff;
  --in: #ffffff;
  --danger: #fa5151;
  --ok: #07c160;
  --radius: 8px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Segoe UI", Roboto, "Noto Sans", "Microsoft YaHei", sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; }
body { font-size: 14px; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.boot { height: 100%; display: flex; align-items: center; justify-content: center; }
.boot img { width: 72px; height: 72px; border-radius: 16px; }
#app { height: 100%; }

/* ── 登录注册 ── */
.auth { height: 100%; overflow-y: auto; display: flex; justify-content: center; padding: calc(48px + var(--safe-t)) 16px 40px; background: var(--bg); }
.auth-box { width: 100%; max-width: 380px; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 24px; }
.auth-logo img { width: 68px; height: 68px; border-radius: 15px; }
.auth-logo h1 { margin: 4px 0 0; font-size: 20px; font-weight: 500; }
.auth-logo p { margin: 0; color: var(--text-2); font-size: 13px; text-align: center; }
.invite-banner { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; font-size: 13px; }
.invite-banner b { font-weight: 500; }
.card { background: var(--panel); border-radius: 10px; padding: 18px; }
.seg { display: flex; background: #f0f0f0; border-radius: 8px; padding: 3px; margin-bottom: 16px; }
.seg button { flex: 1; padding: 7px 0; border-radius: 6px; color: var(--text-2); font-size: 14px; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.inp { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 0 11px; background: #fff; outline: none; font-size: 14px; }
.inp:focus { border-color: var(--brand); }
.row { display: flex; gap: 8px; }
.row .cc { width: 120px; flex: none; }
.radio { display: flex; gap: 8px; }
.radio button { flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-2); font-size: 13px; }
.radio button.on { border-color: var(--brand); color: var(--brand); background: var(--brand-l); }
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 36px; padding: 0 16px; border-radius: 6px; font-size: 14px; }
.btn svg.i { width: 17px; height: 17px; }
.btn-p { background: var(--brand); color: #fff; }
.btn-p:active { background: var(--brand-d); }
.btn-o { border: 1px solid var(--line); background: #fff; }
.btn-d { color: var(--danger); border: 1px solid #fcd3d3; background: #fff; }
.btn-w { width: 100%; height: 42px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.err { color: var(--danger); font-size: 12px; min-height: 16px; margin: 4px 0 8px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.5; }

/* ── 主框架：电脑三栏 / 手机单页 ── */
.shell { display: flex; height: 100%; }
.rail { width: 60px; flex: none; background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: calc(16px + var(--safe-t)) 0 14px; gap: 6px; }
.rail .logo { width: 36px; height: 36px; border-radius: 6px; margin-bottom: 18px; }
.rail .nav { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #8c8c8c; position: relative; }
.rail .nav svg.i { width: 24px; height: 24px; stroke-width: 1.4; }
.rail .nav.on { color: var(--brand); }
.rail .nav:not(.on):hover { color: #555; }
.rail .grow { flex: 1; }
.badge { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.side { width: 280px; flex: none; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.empty-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); gap: 10px; font-size: 13px; }
.empty-main img { width: 64px; height: 64px; border-radius: 14px; opacity: .3; filter: grayscale(1); }

.side-head { padding: calc(20px + var(--safe-t)) 12px 12px; display: flex; align-items: center; gap: 8px; min-height: 60px; }
.side-head h2 { margin: 0; font-size: 15px; font-weight: 500; flex: 1; }
.side-head:has(.search) h2 { display: none; }
.side-head .search { flex: 1; margin: 0; }
.side-head .acts { display: flex; }
.sq-btn { width: 26px; height: 26px; border-radius: 4px; background: #e2e2e2; color: #555; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sq-btn:hover { background: #d4d4d4; }
.sq-btn svg.i { width: 15px; height: 15px; stroke-width: 1.6; }
.icon-btn { width: 32px; height: 32px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #555; flex: none; }
.icon-btn:hover { background: rgba(0,0,0,.05); }
.tabs { display: flex; gap: 16px; padding: 0 14px 8px; }
.tabs button { padding: 2px 0 3px; color: var(--muted); font-size: 12px; border-bottom: 1.5px solid transparent; }
.tabs button.on { color: var(--text); border-bottom-color: var(--brand); }
.search { position: relative; margin: 0 12px 10px; }
.search input { width: 100%; height: 26px; border-radius: 4px; border: 0; background: #e2e2e2; padding: 0 8px 0 26px; outline: none; font-size: 12px; }
.search input:focus { background: #fff; box-shadow: 0 0 0 1px var(--line); }
.search input::placeholder { color: var(--muted); }
.search svg.i { position: absolute; left: 8px; top: 6px; width: 14px; height: 14px; color: var(--muted); }
.list { flex: 1; overflow-y: auto; }
.item { display: flex; gap: 10px; padding: 12px; cursor: pointer; align-items: center; }
.item:hover { background: var(--hover); }
.item.on { background: var(--sel); }
.item .body { flex: 1; min-width: 0; }
.item .l1 { display: flex; align-items: baseline; gap: 6px; }
.item .name { font-size: 14px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.item .time { font-size: 11px; color: var(--muted); flex: none; }
.item .l2 { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.item .pre { flex: 1; color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.item .l3 { font-size: 11px; color: #b5b5b5; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.item .chip { font-size: 10px; line-height: 15px; vertical-align: 1px; }
.cnt { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center; flex: none; }
.list-empty { padding: 40px 24px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.list-empty .btn { margin-top: 14px; }
.sec-title { padding: 14px 12px 6px; font-size: 12px; color: var(--muted); }
.action-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.action-row:hover { background: var(--hover); }
.action-row .ic { width: 38px; height: 38px; border-radius: 5px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.action-row .ic svg.i { width: 20px; height: 20px; }
.action-row .t { font-size: 14px; }
.action-row .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

.av { width: 40px; height: 40px; border-radius: 5px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; position: relative; }
.av.sm { width: 36px; height: 36px; font-size: 14px; }
.av.xs { width: 34px; height: 34px; font-size: 13px; border-radius: 4px; }
.av.lg { width: 60px; height: 60px; font-size: 22px; border-radius: 7px; }
.av .dot { position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--side); }
.av svg.i { width: 22px; height: 22px; }
.c0 { background: #46a6c4; } .c1 { background: #e2728f; } .c2 { background: #3dae80; } .c3 { background: #8390a8; }
.c4 { background: #e3ac3b; } .c5 { background: #5590f0; } .c6 { background: #8b72d8; } .c7 { background: #a06a42; }

/* 「+」弹出的小菜单 */
.pop { position: fixed; z-index: 55; background: #fff; border-radius: 6px; padding: 4px; box-shadow: 0 4px 20px rgba(0,0,0,.14); min-width: 140px; }
.pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 4px; font-size: 13px; text-align: left; white-space: nowrap; }
.pop button:hover { background: #f2f2f2; }
.pop svg.i { width: 17px; height: 17px; color: #555; }

/* ── 聊天窗 ── */
.chat-head { display: flex; align-items: center; gap: 8px; padding: calc(12px + var(--safe-t)) 12px 10px 24px; border-bottom: 1px solid var(--line); min-height: 60px; background: var(--bg); }
.chat-head .who { flex: 1; min-width: 0; }
.chat-head .nm { font-size: 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.chat-head .sub { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip { display: inline-block; padding: 0 5px; border-radius: 3px; background: #e8e8e8; color: var(--text-2); font-size: 11px; line-height: 17px; }
.chip.on { background: transparent; color: var(--ok); padding: 0; }
.chip.tr { background: var(--brand-l); color: var(--brand-d); }
.chat-head .nm .chip { font-size: 11px; }
.back { display: none; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 24px 8px; overscroll-behavior: contain; }
.more-btn { display: block; margin: 0 auto 10px; font-size: 12px; color: var(--brand); padding: 6px 12px; }
.day { text-align: center; margin: 18px 0 12px; }
.day span { font-size: 12px; color: var(--muted); }
.sys { text-align: center; margin: 12px 0; }
.sys span { display: inline-block; font-size: 12px; color: var(--muted); padding: 2px 10px; max-width: 86%; line-height: 1.6; }
.m { display: flex; gap: 10px; margin: 0 0 14px; align-items: flex-start; }
.m.me { flex-direction: row-reverse; }
.m .col { max-width: min(66%, 520px); display: flex; flex-direction: column; min-width: 0; }
.m.me .col { align-items: flex-end; }
.m .from { font-size: 12px; color: var(--muted); margin: 0 2px 4px; }
.bub { background: var(--in); border-radius: 4px; padding: 9px 12px; line-height: 1.6; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14px; position: relative; }
.m.me .bub { background: var(--out); }
/* 气泡小尖角（照微信） */
.bub::before { content: ''; position: absolute; top: 13px; left: -5px; border: 5px solid transparent; border-left: 0; border-right-color: var(--in); }
.m.me .bub::before { left: auto; right: -5px; border-right: 0; border-left: 5px solid var(--out); }
.bub.img::before { display: none; }
.m .from + .bub::before { top: 13px; }
.bub .orig { font-size: 12px; color: var(--muted); border-top: 1px solid #eee; margin-top: 6px; padding-top: 5px; line-height: 1.5; }
.m.me .bub .orig { color: #46699a; border-top-color: rgba(30,80,150,.14); }
.bub .pending { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.bub .pending a { color: var(--brand); cursor: pointer; }
.meta { font-size: 10px; color: #b5b5b5; margin: 3px 2px 0; display: flex; gap: 3px; align-items: center; }
.tick { display: inline-flex; color: #bdbdbd; }
.tick.read { color: var(--brand); }
.tick svg.i { width: 13px; height: 13px; stroke-width: 1.8; }
.voice { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 110px; user-select: none; }
.voice .pl { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.m.me .voice .pl { background: #fff; color: var(--brand); }
.voice .pl svg.i { width: 11px; height: 11px; }
.voice .wave { display: flex; gap: 2px; align-items: center; height: 16px; }
.voice .wave i { display: block; width: 2px; border-radius: 1px; background: #a3bfe4; }
.m.me .voice .wave i { background: #5b8bcb; }
.voice.playing .wave i { animation: wv .9s ease-in-out infinite; background: var(--brand); }
.voice .wave i:nth-child(2n) { animation-delay: .15s; } .voice .wave i:nth-child(3n) { animation-delay: .3s; }
@keyframes wv { 50% { transform: scaleY(.35); } }
.voice .len { font-size: 12px; color: var(--text-2); }
.voice-tag { font-size: 10px; color: var(--brand-d); background: var(--brand-l); padding: 0 5px; border-radius: 3px; line-height: 16px; }
.m.me .voice-tag { background: rgba(255,255,255,.55); }
.vtext { margin-top: 5px; }
.orig-play { font-size: 11px; color: var(--brand); cursor: pointer; display: inline-flex; align-items: center; gap: 3px; }
.orig-play svg.i { width: 13px; height: 13px; }
.bub.img { padding: 0; background: transparent !important; }
.bub.img img { display: block; max-width: 220px; max-height: 280px; border-radius: 4px; cursor: zoom-in; background: #e5e5e5; }
.file { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; min-width: 200px; }
.file .fi { width: 34px; height: 34px; border-radius: 4px; background: var(--brand-l); color: var(--brand); display: flex; align-items: center; justify-content: center; flex: none; }
.file .fn { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.file .fs { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* 输入区：电脑照微信（上面一排小图标、下面输入框、右下角「发送」）；手机照微信手机版（一行） */
.composer { border-top: 1px solid var(--line); background: var(--bg); }
.composer .cb { width: 30px; height: 30px; border-radius: 5px; display: flex; align-items: center; justify-content: center; color: #555; flex: none; }
.composer .cb:hover { background: rgba(0,0,0,.05); }
.composer .cb.on { color: var(--brand); }
.composer textarea::placeholder { color: #b8b8b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer.pc { display: flex; flex-direction: column; height: 160px; padding: 6px 20px 12px 18px; }
.composer.pc .tools { display: flex; gap: 4px; align-items: center; height: 34px; }
.composer.pc .tr-note { margin-left: auto; }
.composer.pc textarea { flex: 1; resize: none; border: 0; background: transparent; outline: none; font-size: 14px; line-height: 1.6; padding: 4px 6px; min-height: 0; }
.composer.pc .foot { display: flex; justify-content: flex-end; }
.composer.pc .send-btn { height: 30px; padding: 0 22px; border-radius: 4px; background: #e9e9e9; color: #9a9a9a; font-size: 13px; }
.composer.pc .send-btn.ready { background: var(--brand); color: #fff; }
.composer.pc .hold { flex: 1; margin: 6px 6px 0; border: 1px dashed #d2d2d2; border-radius: 6px; background: transparent; color: var(--text-2); font-size: 13px; }
.composer.pc .hold:hover { background: rgba(0,0,0,.02); }
.composer.mb { display: flex; align-items: flex-end; gap: 6px; padding: 7px 8px calc(7px + var(--safe-b)); background: #f7f7f7; }
.composer.mb .cb { width: 38px; height: 38px; }
.composer.mb .cb svg.i { width: 27px; height: 27px; stroke-width: 1.3; }
.composer.mb textarea { flex: 1; resize: none; border: 0; background: #fff; border-radius: 4px; padding: 8px 10px; height: 38px; min-height: 38px; max-height: 120px; line-height: 22px; outline: none; font-size: 16px; }
.composer.mb .send-btn { height: 32px; padding: 0 12px; border-radius: 4px; background: var(--brand); color: #fff; font-size: 14px; margin-bottom: 3px; flex: none; }
.composer.mb .send-btn[hidden], .composer .cb[hidden] { display: none; }
.hold { flex: 1; height: 38px; border-radius: 4px; background: #fff; font-size: 15px; color: #333; user-select: none; -webkit-user-select: none; touch-action: none; }
.hold.rec { background: #dcdcdc !important; color: var(--text); }
.tr-note { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tr-note svg.i { width: 12px; height: 12px; }
.tr-note-mb { text-align: center; padding: 3px 12px 0; background: #f7f7f7; border-top: 1px solid var(--line); }
.tr-note-mb + .composer.mb { border-top: 0; }

.rec-overlay { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 160px; padding: 20px 14px; border-radius: 10px; background: rgba(40,40,40,.82); color: #fff; text-align: center; z-index: 60; pointer-events: none; font-size: 12px; }
.rec-overlay.cancel { background: rgba(210,50,50,.88); }
.rec-overlay .sec { font-size: 24px; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.rec-overlay .lv { height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; margin: 10px 8px; }
.rec-overlay .lv i { display: block; height: 100%; background: #7fb2ff; width: 0; transition: width .08s; }

/* ── 我 / 详情 ── */
.page { flex: 1; overflow-y: auto; padding-bottom: 30px; }
.profile { display: flex; gap: 14px; align-items: center; padding: 22px 16px; background: #fff; }
.profile .nm { font-size: 17px; font-weight: 500; }
.profile .ph { color: var(--muted); margin-top: 4px; font-size: 12px; }
.group { background: #fff; margin: 8px 0; }
.cell { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #f0f0f0; cursor: pointer; font-size: 14px; }
.cell:last-child { border-bottom: 0; }
.cell svg.i { color: #666; width: 18px; height: 18px; }
.cell .k { flex: 1; }
.cell .v { color: var(--muted); font-size: 13px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell select { border: 0; background: transparent; color: var(--text-2); font-size: 13px; text-align: right; outline: none; max-width: 60%; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0; }
.qr-box img { width: 180px; height: 180px; border-radius: 6px; background: #fff; border: 1px solid #f0f0f0; }
.linkbox { width: 100%; font-size: 12px; color: var(--text-2); background: #f5f5f5; border-radius: 6px; padding: 9px 11px; word-break: break-all; line-height: 1.6; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wa { background: #25d366; color: #fff; }

/* ── 弹窗 ── */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dlg { background: #fff; border-radius: 10px; width: 100%; max-width: 400px; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.15); }
.dlg-h { display: flex; align-items: center; padding: 14px 12px 8px 18px; }
.dlg-h h3 { margin: 0; font-size: 15px; flex: 1; font-weight: 500; }
.dlg-b { padding: 4px 18px 16px; overflow-y: auto; }
.dlg-f { padding: 10px 18px calc(14px + var(--safe-b)); border-top: 1px solid #f0f0f0; display: flex; gap: 10px; }
.dlg-f .btn { flex: 1; }
.pick { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; }
.pick .nm { flex: 1; font-size: 14px; }
.pick .s { font-size: 11px; color: var(--muted); margin-top: 1px; }
.ck { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #c8c8c8; display: flex; align-items: center; justify-content: center; flex: none; }
.ck.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ck svg.i { width: 11px; height: 11px; stroke-width: 2.6; }
.found { display: flex; align-items: center; gap: 10px; padding: 12px; background: #f7f7f7; border-radius: 8px; margin-top: 6px; }
.found .nm { flex: 1; font-size: 14px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 70; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 96vw; max-height: 92vh; }
#toast { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); background: rgba(40,40,40,.85); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; z-index: 80; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 80vw; text-align: center; }
#toast.show { opacity: 1; }
.tabbar { display: none; }
.conn-bar { background: #fff3e0; color: #a05a00; font-size: 12px; text-align: center; padding: 5px; }

/* 输入区那排图标（照微信）：截图带个小下拉箭头，右边是语音电话、视频通话 */
.composer.pc .tools .grow { flex: 1; }
.composer.pc .tools .cb svg.i { width: 21px; height: 21px; stroke-width: 1.45; }
.composer.pc .tr-note { margin-left: 6px; }
.cb-pair { display: inline-flex; align-items: center; }
.composer .cb.dd { width: 14px; margin-left: -4px; }
.composer.pc .cb.dd svg.i { width: 13px; height: 13px; stroke-width: 1.8; }
.pop small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.pop.emoji { padding: 8px; }
.emoji-grid { display: grid; grid-template-columns: repeat(10, 32px); gap: 2px; }
.emoji-grid button { width: 32px; height: 32px; font-size: 20px; padding: 0; justify-content: center; border-radius: 4px; }
.pop.phrases { width: 320px; padding: 6px; }
.phr { max-height: 300px; overflow-y: auto; }
.phr-i { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 4px; cursor: pointer; font-size: 13px; line-height: 1.5; }
.phr-i:hover { background: #f2f2f2; }
.phr-i span { flex: 1; }
.phr-i button { width: 20px; height: 20px; padding: 0; justify-content: center; opacity: 0; }
.phr-i:hover button { opacity: .6; }
.phr-i button svg.i { width: 12px; height: 12px; }
.phr-empty { padding: 14px 8px; color: var(--muted); font-size: 12px; text-align: center; }
.pop .phr-add { color: var(--brand); border-top: 1px solid #f0f0f0; border-radius: 0; margin-top: 4px; }
.pop .phr-add svg.i { color: var(--brand); }

/* 截图选区 */
.shot { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.82); display: flex; flex-direction: column; }
.shot-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; cursor: crosshair; padding: 16px; touch-action: none; }
.shot-stage img { max-width: 100%; max-height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.shot-sel { position: fixed; border: 1.5px solid var(--brand); box-shadow: 0 0 0 9999px rgba(0,0,0,.45); pointer-events: none; }
.shot-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px calc(10px + var(--safe-b)); background: #222; color: #bbb; font-size: 12px; }
.shot-bar span { flex: 1; }

/* 聊天里的通话卡片 */
.bub.call { cursor: pointer; padding: 10px 14px; }
.callcard { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.callcard .cic { width: 34px; height: 34px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.callcard .cic svg.i { width: 18px; height: 18px; }
.callcard .ct { display: block; font-size: 14px; }
.callcard .cs { display: block; font-size: 12px; color: var(--text-2); margin-top: 1px; }
.callcard.dead .cic { background: #b5b5b5; }
.bub.call:has(.dead) { cursor: default; }

/* 来电弹框（电脑上靠右上角，手机上铺满） */
.ring { position: fixed; top: 20px; right: 20px; z-index: 85; width: 260px; padding: 24px 18px 18px; border-radius: 12px;
  background: rgba(38,38,38,.94); color: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.3);
  animation: ringIn .25s ease; }
@keyframes ringIn { from { transform: translateY(-12px); opacity: 0; } }
.ring .rn { font-size: 17px; margin-top: 6px; }
.ring .rs { font-size: 13px; color: #cfcfcf; }
.ring .rm { font-size: 11px; color: #9a9a9a; }
.ring .rb { display: flex; gap: 46px; margin-top: 16px; }
.ring .rb button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: #ddd; }
.ring .rb span { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.ring .rb svg.i { width: 24px; height: 24px; }
.ring .r-no span { background: #fa5151; }
.ring .r-ok span { background: var(--ok); animation: ringPulse 1.2s ease-in-out infinite; }
@keyframes ringPulse { 50% { box-shadow: 0 0 0 8px rgba(7,193,96,.25); } }

/* 语音电话面板（照微信：深色小窗，头像、计时、静音、挂断；中间滚动显示双方的话和译文） */
.vcall { position: fixed; top: 20px; right: 20px; z-index: 84; width: 320px; height: 520px; border-radius: 12px; overflow: hidden;
  background: #2b2b2b; color: #fff; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.35); animation: ringIn .25s ease; }
.vcall.closing { opacity: .92; }
.vc-top { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 16px 10px; }
.vc-nm { font-size: 18px; margin-top: 6px; }
.vc-st { font-size: 13px; color: #c8c8c8; font-variant-numeric: tabular-nums; }
.vc-tr { font-size: 11px; color: #8d8d8d; }
.vc-caps { flex: 1; overflow-y: auto; padding: 6px 16px; display: flex; flex-direction: column; gap: 8px; }
.vc-cap { max-width: 88%; align-self: flex-start; background: rgba(255,255,255,.09); border-radius: 8px; padding: 6px 10px; }
.vc-cap.me { align-self: flex-end; background: rgba(22,119,255,.35); }
.vc-cap.live { opacity: .7; }
.vc-cap .m1 { font-size: 14px; line-height: 1.5; }
.vc-cap .m2 { font-size: 11px; color: #bdbdbd; margin-top: 2px; line-height: 1.4; }
.vc-tap { text-align: center; font-size: 14px; color: #fff; padding: 10px; background: rgba(7,193,96,.25); }
.vc-bar { display: flex; justify-content: space-around; padding: 14px 20px calc(22px + var(--safe-b)); }
.vc-bar button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: #ddd; }
.vc-bar span { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; color: #fff; }
.vc-bar button.on span { background: #fff; color: #2b2b2b; }
.vc-bar .hang span { background: #fa5151; }
.vc-bar svg.i { width: 24px; height: 24px; }
/* 嵌入的通话页平时缩成看不见的一点；浏览器要求「点一下才能出声」时铺满面板（几乎透明），让这一下点进它里面 */
/* 嵌着的语音系统页面：铺满面板但完全透明（缩成小点会被浏览器当成看不见的框降速）；
   需要点一下解锁声音时才接住点击 —— 你点面板，其实点在它上面 */
.vc-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; pointer-events: none; z-index: -1; }
.vcall.need-tap .vc-frame { opacity: .01; pointer-events: auto; z-index: 5; }

/* 手机「+」面板 */
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; padding: 18px 2px 8px; }
.more-grid button { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11px; color: var(--text-2); line-height: 1.3; }
.more-grid span { width: 56px; height: 56px; border-radius: 12px; background: #f5f5f5; display: flex; align-items: center; justify-content: center; color: #333; }
.more-grid svg.i { width: 26px; height: 26px; stroke-width: 1.4; }

/* ── 手机：照微信手机版 ── */
@media (max-width: 860px) {
  .rail { display: none; }
  .side { width: 100%; border-right: 0; background: #ededed; }
  .side-head { flex-wrap: wrap; position: relative; padding: calc(12px + var(--safe-t)) 8px 8px; min-height: 0; }
  .side-head h2, .side-head:has(.search) h2 { display: block; flex: 1 1 100%; text-align: center; font-size: 16px; line-height: 26px; }
  .side-head .search { flex: 1 1 100%; margin-top: 8px; }
  .side-head .acts { position: absolute; right: 8px; top: calc(10px + var(--safe-t)); }
  .side-head .sq-btn { background: transparent; width: 32px; height: 32px; color: #181818; }
  .side-head .sq-btn svg.i { width: 21px; height: 21px; stroke-width: 1.4; border: 1.4px solid currentColor; border-radius: 50%; padding: 2px; }
  .tabs { padding: 2px 16px 8px; }
  .search { margin: 0 8px 8px; }
  .search input { height: 34px; border-radius: 6px; background: #fff; font-size: 15px; padding-left: 32px; }
  .search svg.i { top: 10px; left: 10px; width: 15px; height: 15px; }
  .list { background: #fff; }
  .item { padding: 0 0 0 16px; gap: 12px; }
  .item:hover { background: #fff; }
  .item:active, .item.on { background: #ececec; }
  .item .body { border-bottom: 1px solid #f0f0f0; padding: 12px 16px 12px 0; }
  .item:last-child .body { border-bottom: 0; }
  .item .av { width: 46px; height: 46px; border-radius: 5px; font-size: 17px; }
  .item .av.sm { width: 42px; height: 42px; }
  .item .name { font-size: 16px; }
  .item .pre { font-size: 13px; }
  .item .time { font-size: 11px; }
  .av .dot { border-color: #fff; }
  .action-row { background: #fff; padding: 10px 16px; }
  .sec-title { background: #ededed; padding: 10px 16px 6px; }
  .main { position: fixed; inset: 0; z-index: 20; transform: translateX(100%); transition: transform .22s ease; background: #ededed; }
  .shell.in-chat .main { transform: none; }
  .back { display: inline-flex; }
  .back svg.i { width: 22px; height: 22px; }
  .chat-head { background: #ededed; padding: calc(6px + var(--safe-t)) 6px 6px; min-height: 48px; gap: 2px; border-bottom-color: #e0e0e0; }
  .chat-head .who { text-align: center; }
  .chat-head .nm { justify-content: center; font-size: 16px; }
  .chat-head .sub { justify-content: center; margin-top: 1px; }
  .chat-head .icon-btn svg.i { width: 22px; height: 22px; }
  .msgs { padding: 10px 12px 6px; }
  .m { gap: 8px; }
  .m .col { max-width: 74%; }
  .bub { font-size: 16px; padding: 9px 11px; line-height: 1.5; }
  .bub::before { top: 14px; }
  .bub .orig { font-size: 13px; }
  .av.xs { width: 40px; height: 40px; border-radius: 5px; }
  .bub.img img { max-width: 180px; }
  .tabbar { display: flex; background: #f7f7f7; border-top: 1px solid #e3e3e3; padding-bottom: var(--safe-b); }
  .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; font-size: 10px; color: #181818; position: relative; }
  .tabbar button svg.i { width: 25px; height: 25px; stroke-width: 1.35; }
  .tabbar button.on { color: var(--brand); }
  .tabbar .badge { top: 1px; right: calc(50% - 20px); }
  .vcall { inset: 0; width: auto; height: auto; border-radius: 0; }
  .vc-top { padding-top: calc(60px + var(--safe-t)); }
  .vc-bar { padding-bottom: calc(40px + var(--safe-b)); }
  .ring { inset: 0; width: auto; border-radius: 0; justify-content: center; background: rgba(30,30,30,.97); padding-bottom: calc(60px + var(--safe-b)); }
  .ring .av.lg { width: 84px; height: 84px; font-size: 30px; }
  .ring .rb { gap: 90px; margin-top: 60px; }
  .ring .rb span { width: 64px; height: 64px; }
  .pop.phrases { width: calc(100vw - 16px); }
  .emoji-grid { grid-template-columns: repeat(8, 1fr); }
  .emoji-grid button { width: auto; height: 38px; font-size: 24px; }
  .mask { align-items: flex-end; padding: 0; }
  .dlg { border-radius: 12px 12px 0 0; max-width: none; max-height: 92vh; }
  .empty-main { display: none; }
  .page { background: #ededed; }
}
