/* 微信（复刻版）移动端 UI —— 尺寸、配色、层级按微信 8.x 视觉规范还原 */
:root{
  --green:#07c160; --green-d:#06ad56; --red:#fa5151; --orange:#fa9d3b;
  --bg:#ededed; --white:#fff; --line:#d9d9d9; --line2:#e5e5e5;
  --t1:#191919; --t2:#7d7d7d; --t3:#b2b2b2; --blue:#576b95;
  --nav-h:44px; --status-h:0px; --tab-h:52px;
  --safe-b:env(safe-area-inset-bottom,0px);
  --bubble-me:#95ec69; --bubble-other:#fff;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;height:100%;width:100%;overflow:hidden;background:#ededed}
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue","Microsoft YaHei",sans-serif;font-size:16px;color:var(--t1);-webkit-font-smoothing:antialiased;user-select:none;-webkit-user-select:none}
input,textarea{font-family:inherit;user-select:text;-webkit-user-select:text}
button{border:0;background:none;font-family:inherit;color:inherit;cursor:pointer}
a{color:var(--blue);text-decoration:none}
.hidden{display:none!important}
.ic{width:24px;height:24px;display:inline-block;fill:none;vertical-align:middle;flex:none}
.wx-ava{width:44px;height:44px;border-radius:4px;object-fit:cover;background:#ddd;flex:none}
.flex{display:flex;align-items:center}
.sp{flex:1}
.ell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scroll{overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}

/* ============ 登录页 ============ */
.login-screen{position:fixed;inset:0;background:#fff;padding:calc(env(safe-area-inset-top,0px) + 76px) 28px 30px;display:flex;flex-direction:column;align-items:center;z-index:9999}
.login-logo svg,.login-logo img{width:88px;height:88px;border-radius:20px;box-shadow:0 10px 26px rgba(76,175,80,.32)}
.login-title{font-size:22px;font-weight:500;margin:16px 0 44px;letter-spacing:4px;color:var(--t1)}
.login-form{width:100%;max-width:340px}
.login-row{display:flex;align-items:center;border-bottom:1px solid var(--line2);height:52px;font-size:16px}
.login-row label{flex:none;white-space:nowrap;width:auto;margin-right:16px;color:var(--t1);font-weight:500;letter-spacing:1px}
.login-row input{flex:1;border:0;outline:0;font-size:16px;background:transparent;color:var(--t1);min-width:0}
.login-row input::placeholder{color:var(--t3)}
.btn-green{background:var(--green);color:#fff;border-radius:5px;font-size:17px;height:44px;width:100%;display:flex;align-items:center;justify-content:center}
.btn-green:active{background:var(--green-d)}
.btn-green[disabled]{opacity:.55}
.login-btn{max-width:340px;margin-top:34px}
.login-links{display:flex;justify-content:center;max-width:340px;width:100%;margin-top:20px;color:var(--blue);font-size:14px}
.login-err{max-width:340px;width:100%;margin-top:14px;padding:10px 12px;border-radius:8px;background:#fef0f0;color:#fa5151;font-size:13px;line-height:1.5;text-align:center}
.login-tip{position:absolute;bottom:calc(24px + var(--safe-b));left:20px;right:20px;text-align:center;color:var(--t3);font-size:11px;line-height:1.6}

/* ============ 应用骨架 ============ */
.app{position:fixed;inset:0;background:var(--bg);overflow:hidden}
.statusbar{height:var(--status-h);background:#ededed;display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-size:12px;font-weight:600;color:#000;position:relative;z-index:2;letter-spacing:.2px}
.statusbar .sb-r{display:flex;align-items:center;gap:5px;font-size:11px}
.statusbar.sb-invert{color:#fff}
.statusbar.sb-invert .sb-signal i,.statusbar.sb-invert .sb-bat::before,.statusbar.sb-invert .sb-bat::after{background:#fff}
.statusbar.sb-invert .sb-bat,.statusbar.sb-invert .sb-wifi{border-color:#fff}
.sb-bat{width:22px;height:11px;border:1px solid #000;border-radius:2px;position:relative;display:inline-block}
.sb-bat::before{content:"";position:absolute;left:1px;top:1px;bottom:1px;width:15px;background:#000;border-radius:1px}
.sb-bat::after{content:"";position:absolute;right:-3px;top:3px;height:5px;width:2px;background:#000}
.sb-wifi{width:14px;height:10px;border:2px solid #000;border-bottom:0;border-radius:12px 12px 0 0;position:relative;opacity:.9}
.sb-signal{display:inline-flex;gap:1px;align-items:flex-end;height:10px}
.sb-signal i{display:block;width:2.5px;background:#000;border-radius:1px}
#tabViews{position:absolute;left:0;right:0;top:var(--status-h);bottom:calc(var(--tab-h) + var(--safe-b))}
.tabview{position:absolute;inset:0;display:none;background:var(--bg);flex-direction:column;overflow:hidden}
.tabview.active{display:flex}
.tabview .scroll{flex:1}
.tabbar{position:absolute;left:0;right:0;bottom:0;height:calc(var(--tab-h) + var(--safe-b));padding-bottom:var(--safe-b);background:#f7f7f7;border-top:1px solid #d6d6d6;display:flex;z-index:30}
.tabbar .tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#999;position:relative;font-size:10px}
.tabbar .tab .ic{width:27px;height:27px}
.tabbar .tab.active{color:var(--green)}
.tabbar .badge{position:absolute;top:3px;left:calc(50% + 8px);min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--red);color:#fff;font-size:11px;line-height:17px;text-align:center;font-style:normal}
.tabbar .dot{position:absolute;top:6px;left:calc(50% + 10px);width:8px;height:8px;border-radius:50%;background:var(--red)}

/* ============ 顶部导航栏 ============ */
.navbar{height:var(--nav-h);flex:none;background:#ededed;display:flex;align-items:center;justify-content:center;position:relative;border-bottom:1px solid rgba(0,0,0,.06);z-index:5}
.navbar .nav-title{font-size:17px;font-weight:500;max-width:58%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.navbar .nav-l,.navbar .nav-r{position:absolute;top:0;height:var(--nav-h);display:flex;align-items:center;gap:16px;padding:0 12px;color:#181818}
.navbar .nav-l{left:0}.navbar .nav-r{right:0}
.navbar .nav-l .ic,.navbar .nav-r .ic{width:25px;height:25px}
.navbar .nav-l:active,.navbar .nav-r:active{opacity:.5}
.navbar.dark{background:#191919;color:#fff;border-bottom-color:#222}
.navbar.dark .nav-l,.navbar.dark .nav-r{color:#fff}
.navbar.white{background:#fff}
.nav-title-sub{font-size:12px;color:var(--t2);font-weight:400;margin-top:1px}

/* ============ 子页面栈 ============ */
#pageStack{position:absolute;inset:0;pointer-events:none;z-index:40}
.page{position:absolute;inset:0;background:var(--bg);display:flex;flex-direction:column;pointer-events:auto;transform:translateX(100%);transition:transform .26s cubic-bezier(.32,.72,.35,1);box-shadow:-6px 0 18px rgba(0,0,0,.08)}
.page.in{transform:translateX(0)}
.page.overlay{background:var(--bg)}
.page .page-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.page-head-fake{display:none}

/* ============ 列表通用 ============ */
.cell{background:#fff;display:flex;align-items:center;min-height:54px;padding:0 15px;position:relative}
.cell:active{background:#f2f2f2}
.cell::after{content:"";position:absolute;left:15px;right:0;bottom:0;height:1px;background:var(--line2);transform:scaleY(.6)}
.cell:last-child::after{display:none}
.cell .cell-ic{width:26px;height:26px;margin-right:12px;color:var(--green);flex:none}
.cell .cell-ic img{width:100%;height:100%;border-radius:4px}
.cell .cell-txt{flex:1;font-size:16px;min-width:0}
.cell .cell-sub{font-size:12px;color:var(--t2);margin-top:2px}
.cell .cell-right{color:var(--t2);font-size:14px;display:flex;align-items:center;gap:6px;max-width:55%}
.cell .cell-right .ic{width:16px;height:16px;color:#c8c8c8}
.cell .chev,.chev{color:#c8c8c8;font-size:18px;margin-left:2px;flex:none}
.cell .cell-avatar{width:42px;height:42px;border-radius:4px;margin-right:12px;flex:none;object-fit:cover;background:#ddd}
.cell .badge-mini{min-width:18px;height:18px;border-radius:9px;background:var(--red);color:#fff;font-size:11px;line-height:18px;text-align:center;padding:0 5px;font-style:normal}
.group-gap{height:9px;background:transparent}
.group-title{padding:7px 15px;font-size:13px;color:var(--t2)}
.list-letter{position:sticky;top:0;z-index:2;background:#ededed;padding:4px 15px;font-size:13px;color:#888}
.section-title{padding:22px 16px 8px;font-size:13px;color:var(--t2)}
.btn-block{margin:22px 15px;height:46px;border-radius:6px;background:var(--green);color:#fff;font-size:17px;display:flex;align-items:center;justify-content:center}
.btn-block:active{background:var(--green-d)}
.btn-block.gray{background:#fff;color:var(--t1);border:1px solid #e2e2e2}
.btn-block.red{background:#fff;color:var(--red)}
.switch{width:50px;height:30px;border-radius:15px;background:#e5e5e5;position:relative;transition:background .2s;flex:none}
.switch::after{content:"";position:absolute;left:2px;top:2px;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s}
.switch.on{background:var(--green)}
.switch.on::after{transform:translateX(20px)}
.searchbar{margin:8px 10px;height:34px;background:#fff;border-radius:5px;display:flex;align-items:center;justify-content:center;gap:5px;color:var(--t2);font-size:14px}
.searchbar .ic{width:16px;height:16px}
.search-input{margin:8px 10px;height:36px;background:#fff;border-radius:6px;display:flex;align-items:center;padding:0 10px;gap:6px}
.search-input input{flex:1;border:0;outline:0;background:transparent;font-size:15px}
.search-input .ic{width:18px;height:18px;color:#999}

/* ===== 搜索页（微信样式） ===== */
.search-nav{background:#fff;padding:0 12px 0 8px}
.search-nav .sn-field{flex:1;min-width:0;height:34px;background:#ededed;border-radius:6px;display:flex;align-items:center;padding:0 10px;gap:6px;margin:6px 0}
.search-nav .sn-field .ic{width:18px;height:18px;color:#999}
.search-nav .sn-field input{flex:1;width:0;min-width:0;border:0;outline:0;background:transparent;font-size:15px}
.search-nav .sn-cancel{flex:none;white-space:nowrap;font-size:15px;color:#181818;padding-left:12px}
.search-page{background:#fff;min-height:100%}
.sn-empty{padding:26px 0}
.sn-empty-label{font-size:13px;color:#888;text-align:center;margin-bottom:18px}
.sn-cats{display:flex}
.sn-cat{flex:1;text-align:center}
.sn-cat-ic{width:44px;height:44px;border-radius:10px;display:flex;align-items:center;justify-content:center;margin:0 auto;font-size:22px;color:#fff}
.sn-cat-t{font-size:12px;color:#333;margin-top:8px}

/* ============ 会话列表 ============ */
.conv-item{display:flex;align-items:center;height:70px;background:#fff;padding:0 15px;position:relative}
.conv-item:active{background:#ececec}
.conv-item.top{background:#f4f4f4}
.conv-item::after{content:"";position:absolute;left:76px;right:0;bottom:0;height:1px;background:var(--line2);transform:scaleY(.6)}
.conv-item .ava{width:48px;height:48px;border-radius:5px;flex:none;margin-right:12px;position:relative;background:#ddd;object-fit:cover}
.conv-item .ava-badge{position:absolute;right:-6px;top:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--red);color:#fff;font-size:11px;text-align:center;line-height:18px;font-style:normal}
.conv-item .mid{flex:1;min-width:0}
.conv-item .row1{display:flex;align-items:center}
.conv-item .name{font-size:16px;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conv-item .time{font-size:11px;color:#b5b5b5;margin-left:8px;flex:none}
.conv-item .row2{margin-top:5px;display:flex;align-items:center}
.conv-item .brief{font-size:13px;color:#9a9a9a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.conv-item .brief .draft{color:var(--red)}
.conv-item .mute-ic{width:14px;height:14px;color:#bbb;margin-left:5px}
.empty-tip{padding:60px 20px;text-align:center;color:var(--t3);font-size:14px}

/* ============ 聊天页 ============ */
.chat-page{background:#ededed}
.chat-bg{background:#ededed;background-size:cover;background-position:center}
.chat-scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 12px 18px;overscroll-behavior:contain}
.chat-time{text-align:center;margin:14px 0 12px;font-size:12px;color:#a8a8a8}
/* 搜索结果定位高亮：绿框 + 浅绿底渐隐 */
.msg-row.msg-hl .bubble{background-color:#d9f7e3 !important;box-shadow:0 0 0 2px rgba(7,193,96,.55);transition:background-color .5s ease,box-shadow .5s ease}
/* 引用消息：输入条上方引用条 + 气泡内引用块（微信式区分） */
.quote-bar{display:flex;align-items:center;gap:10px;background:#f2f2f2;padding:7px 14px;border-top:1px solid #e5e5e5}
.quote-bar .qb-txt{flex:1;min-width:0;font-size:13px;color:#999;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quote-bar .qb-txt b{color:#333;margin-right:6px;font-weight:500}
.quote-bar .qb-x{flex:none;color:#999;padding:4px}
.quote-bar .qb-x svg{width:16px;height:16px}
.msg-quote{background:rgba(0,0,0,.06);border-left:3px solid #07c160;border-radius:4px;padding:5px 8px;margin-bottom:6px;max-width:100%}
.msg-quote .mq-name{font-size:11px;color:#576b95;margin-bottom:2px}
.msg-quote .mq-txt{font-size:12px;color:#888;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:230px}
.msg-row{display:flex;align-items:flex-start;margin-bottom:16px;position:relative}
.msg-row.me{flex-direction:row-reverse}
.msg-ava{width:40px;height:40px;border-radius:4px;flex:none;background:#ddd;object-fit:cover}
.msg-body{max-width:calc(100% - 108px);display:flex;flex-direction:column;min-width:0}
.msg-row.me .msg-body{align-items:flex-end}
.msg-row.other .msg-body{align-items:flex-start}
.msg-name{font-size:12px;color:#9a9a9a;margin:0 0 4px 2px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bubble{position:relative;background:var(--bubble-other);border-radius:5px;padding:9px 12px;font-size:16px;line-height:1.42;word-break:break-word;white-space:pre-wrap;min-height:36px;max-width:100%}
.bubble::after{content:"";position:absolute;top:12px;left:-6px;width:0;height:0;border:6px solid transparent;border-right-color:var(--bubble-other);border-left:0}
.msg-row.me .bubble{background:var(--bubble-me)}
.msg-row.me .bubble::after{left:auto;right:-6px;border:6px solid transparent;border-left-color:var(--bubble-me);border-right:0}
.bubble:active{filter:brightness(.96)}
.bubble.no-tail::after{display:none}
.bubble .msg-status{font-size:11px;color:#b2b2b2;margin-left:6px}
.bubble img.msg-img{max-width:190px;max-height:250px;border-radius:4px;display:block;object-fit:cover}
.bubble.voice-b{min-width:80px;display:flex;align-items:center;gap:8px;cursor:pointer}
.bubble.voice-b .wave{display:inline-block;width:16px;height:16px;position:relative}
.bubble.voice-b .wave::before{content:"";position:absolute;inset:0;border:2px solid #444;border-left:0;border-top:0;border-radius:0 14px 14px 0;transform:rotate(-40deg)}
.bubble.voice-b .dur{font-size:14px;color:#333}
.bubble.voice-b.playing .wave{animation:voicepulse .8s infinite}
@keyframes voicepulse{50%{opacity:.35}}
.bubble.file-b{display:flex;align-items:center;gap:10px;min-width:190px}
.bubble.enc-b{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:130px;background:#fff;color:#333;cursor:pointer;padding:12px}
.bubble.enc-b .lock-ic{font-size:22px}
.bubble.enc-b .enc-sub{font-size:11px;color:#999}
.enc-tag{font-size:10px;color:#9aa0a6;margin-top:4px;text-align:center;width:100%}
.ci-btn.ci-on{color:#07c160}
.file-icon{width:38px;height:44px;background:#fff;border:1px solid #e0e0e0;border-radius:3px;display:flex;align-items:center;justify-content:center;font-size:12px;color:#5b8ff9}
.bubble.loc-b{padding:0;overflow:hidden;width:210px;white-space:normal}
.loc-map{height:96px;background:linear-gradient(135deg,#dbead3,#c9dfc6);position:relative;overflow:hidden}
.loc-map::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(45deg,transparent 0 22px,rgba(255,255,255,.35) 22px 24px),repeating-linear-gradient(-45deg,transparent 0 34px,rgba(255,255,255,.25) 34px 36px)}
.loc-pin{position:absolute;left:50%;top:50%;transform:translate(-50%,-70%);font-size:26px;filter:drop-shadow(0 2px 2px rgba(0,0,0,.25))}
.loc-txt{padding:7px 10px;background:#fff;font-size:13px;line-height:1.4}
.loc-txt small{display:block;color:#999;font-size:11px;margin-top:2px}
.bubble.card-b{width:200px;padding:10px;white-space:normal}
.card-b .card-top{display:flex;gap:10px;align-items:center}
.card-b .card-top img{width:38px;height:38px;border-radius:4px}
.card-b .card-name{font-size:14px;font-weight:500}
.card-b .card-foot{border-top:1px solid #e5e5e5;margin-top:9px;padding-top:5px;font-size:11px;color:#999}
.bubble.rp-b{background:#fa9d3b;color:#fff;width:225px;padding:0;overflow:hidden;white-space:normal}
.msg-row.me .bubble.rp-b::after{border-left-color:#fa9d3b}
.bubble.rp-b .rp-top{display:flex;align-items:center;gap:10px;padding:14px 12px}
.bubble.rp-b .rp-ic{width:34px;height:40px;background:#f5c153;border-radius:5px;display:flex;align-items:center;justify-content:center;font-size:20px}
.bubble.rp-b .rp-txt{font-size:15px;line-height:1.4}
.bubble.rp-b .rp-foot{border-top:1px solid rgba(255,255,255,.35);padding:5px 12px;font-size:11px}
.bubble.rp-b.got{background:#f7b56a}
.bubble.tf-b{background:#fa9d3b;color:#fff;width:210px;padding:0;overflow:hidden;white-space:normal}
.msg-row.me .bubble.tf-b::after{border-left-color:#fa9d3b}
.tf-amt{padding:16px 12px 10px;font-size:15px}
.tf-amt b{font-size:23px;font-weight:400}
.tf-note{padding:0 12px 8px;font-size:12px;opacity:.9}
.tf-foot{border-top:1px solid rgba(255,255,255,.35);padding:5px 12px;font-size:11px}
.bubble.call-b{display:flex;align-items:center;gap:8px}
.bubble.call-b .ic{width:18px;height:18px}
.bubble.emoji-b{font-size:42px;padding:4px 8px;background:transparent}
.msg-row.me .bubble.emoji-b::after,.msg-row.other .bubble.emoji-b::after{display:none}
.sys-msg{text-align:center;margin:12px auto;font-size:12px;color:#a8a8a8;max-width:80%}
.sys-msg span{background:rgba(0,0,0,.06);padding:3px 8px;border-radius:3px;line-height:1.6}
.typing-tip{font-size:12px;color:var(--t2);padding:0 0 6px 12px}

/* 输入栏 */
.chat-input{flex:none;background:#f7f7f7;border-top:1px solid #dcdcdc;padding:7px 8px calc(7px + var(--safe-b));min-height:52px}
/* 用 margin 替代 flex gap（兼容旧 WebView）；子项禁止收缩为 0 导致按钮被挤出屏幕 */
.ci-row{display:flex;align-items:flex-end;flex-wrap:nowrap}
.ci-row>*{margin-left:8px;flex-shrink:0}
.ci-row>*:first-child{margin-left:0}
.ci-btn{width:32px;height:36px;display:flex;align-items:center;justify-content:center;flex:none;color:#333}
.ci-btn .ic{width:28px;height:28px}
.ci-box{flex:1 1 auto;min-width:0;min-height:36px;background:#fff;border-radius:5px;display:flex;align-items:center;padding:0 4px}
.ci-box textarea{flex:1 1 auto;width:100%;min-width:0;border:0;outline:0;resize:none;background:transparent;font-size:16px;line-height:24px;max-height:96px;padding:6px 4px;overflow-y:auto}
.ci-box .hold-btn{width:100%;height:34px;line-height:34px;text-align:center;font-size:15px;border-radius:4px;background:#fff;color:#191919}
.ci-box .hold-btn.recording{background:#e5e5e5}
.ci-send{height:34px;padding:0 12px;border-radius:4px;background:var(--green);color:#fff;font-size:14px;display:none;align-items:center;justify-content:center;flex:none}
.ci-send.show{display:flex}
.ci-paste{width:auto;height:34px;padding:0 10px;font-size:14px;color:#07c160;background:#eaf9f0;border-radius:6px;flex:none}
.panel-plus,.panel-emoji{height:230px;background:#f7f7f7;border-top:1px solid #e3e3e3;overflow-y:auto;display:none}
.panel-plus.show,.panel-emoji.show{display:block}
.plus-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px 0;padding:20px 8px}
.plus-item{display:flex;flex-direction:column;align-items:center;gap:7px;font-size:11px;color:#6b6b6b}
.plus-item .plus-ic{width:56px;height:56px;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center}
.plus-item .plus-ic .ic{width:30px;height:30px;color:#3d3d3d}
.plus-item:active .plus-ic{background:#e9e9e9}
.emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);padding:12px 8px;gap:6px}
.emoji-grid span{font-size:26px;text-align:center;padding:3px 0}
.emoji-bar{display:flex;align-items:center;gap:10px;padding:8px 12px;border-top:1px solid #e3e3e3;background:#f7f7f7}
.emoji-bar .del{margin-left:auto;font-size:13px;color:#666;background:#fff;padding:5px 12px;border-radius:4px}
.sticker-grid{display:none;grid-template-columns:repeat(4,1fr);gap:8px;padding:12px 10px;overflow-y:auto;height:170px}
.panel-emoji.show-sticker .emoji-grid{display:none}
.panel-emoji.show-sticker #stickerGrid{display:grid}
.panel-emoji.show-fav .emoji-grid{display:none}
.panel-emoji.show-fav #stickerGrid{display:none}
.panel-emoji.show-fav #favGrid{display:grid}
.fav-empty{grid-column:1/-1;text-align:center;color:#999;font-size:13px;padding:46px 0;line-height:1.9}
.sticker-item{width:100%;height:auto;border-radius:8px;background:#fff;cursor:pointer;display:block}
.sticker-item:active{background:#ececec}
.em-tab{font-size:13px;color:#888;padding:4px 9px;border-radius:14px;cursor:pointer}
.em-tab.active{color:#07c160;font-weight:600;background:rgba(7,193,96,.12)}
.emoji-bar .em-fill{margin-left:auto}
.emoji-bar .del{margin-left:0}
.recording-mask{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);width:150px;height:150px;border-radius:14px;background:rgba(0,0,0,.72);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;z-index:20;font-size:13px}
.recording-mask .ic{width:56px;height:56px}

/* 长按菜单 */
.msg-menu{position:fixed;z-index:200;background:#3c3c3c;border-radius:6px;display:flex;padding:0;box-shadow:0 4px 20px rgba(0,0,0,.3);max-width:92vw;flex-wrap:wrap}
.msg-menu .mi{padding:11px 13px;color:#fff;font-size:13px;white-space:nowrap;position:relative}
.msg-menu .mi:active{background:#555}
.msg-menu .mi+.mi::before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:1px;background:#555}

/* ============ 弹层 / 动作面板 / 表单 ============ */
.mask{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:300;display:flex;align-items:center;justify-content:center}
.sheet-wrap{position:fixed;inset:0;z-index:310;display:flex;flex-direction:column;justify-content:flex-end}
.sheet-mask{flex:1;background:rgba(0,0,0,.42)}
.action-sheet{background:#f7f7f7;padding-bottom:var(--safe-b);max-height:82vh;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.action-sheet .as-title{padding:16px;text-align:center;font-size:13px;color:var(--t2);background:#fff}
.action-sheet .as-item{height:54px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:17px;border-bottom:1px solid #e8e8e8}
.action-sheet .as-item:active{background:#f0f0f0}
.action-sheet .as-item.danger{color:var(--red)}
.action-sheet .as-cancel{height:54px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:17px;margin-top:8px}
.dialog{width:80%;max-width:300px;background:#fff;border-radius:12px;max-height:82vh;overflow-y:auto;text-align:center}
.dialog .dlg-title{padding:22px 20px 4px;font-size:17px;font-weight:600;color:#181818}
.dialog .dlg-body{padding:4px 20px 20px;font-size:14px;color:#8a8a8a;line-height:1.5}
.dialog .dlg-input{padding:6px 20px 18px}
.dialog .dlg-input input{width:100%;height:40px;border:1px solid #e0e0e0;border-radius:6px;padding:0 12px;outline:0;font-size:15px;box-sizing:border-box}
.dialog .dlg-input input:focus{border-color:#576b95}
.dialog .dlg-btns{display:flex;border-top:1px solid #e5e5e5}
.dialog .dlg-btns button{flex:1;height:48px;font-size:17px;color:#576b95;background:none;border:0;outline:0;-webkit-tap-highlight-color:transparent}
.dialog .dlg-btns button+button{border-left:1px solid #e5e5e5;font-weight:600}
.dialog .dlg-btns button:active{background:#f0f0f0}
.toast{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.78);color:#fff;padding:11px 18px;border-radius:6px;font-size:14px;z-index:500;max-width:80%;text-align:center;display:none;line-height:1.5}
.toast.show{display:block}
.form-card{background:#fff;margin:10px 0}
.form-row{display:flex;align-items:center;min-height:50px;padding:0 15px;border-bottom:1px solid #f0f0f0}
.form-row:last-child{border-bottom:0}
.form-row label{width:88px;color:var(--t1);font-size:15px;flex:none}
.form-row input,.form-row textarea{flex:1;border:0;outline:0;font-size:15px;background:transparent;color:var(--t1);resize:none;line-height:1.5}
.form-row .unit{font-size:15px;color:var(--t2)}
.form-hint{padding:8px 15px;color:var(--t2);font-size:12px;line-height:1.6}

/* 支付密码键盘 */
.paykey{position:fixed;inset:0;z-index:400;display:flex;flex-direction:column;justify-content:flex-end}
.paykey-mask{flex:1;background:rgba(0,0,0,.4)}
.paykey-box{background:#fff;padding:18px 16px 0}
.paykey-title{text-align:center;font-size:16px;margin-bottom:4px}
.paykey-amt{text-align:center;font-size:28px;margin:8px 0 16px}
.paykey-dots{display:flex;justify-content:center;gap:0;margin:0 24px 18px;border:1px solid #ddd;border-radius:6px;overflow:hidden}
.paykey-dots i{flex:1;height:44px;border-right:1px solid #ddd;display:flex;align-items:center;justify-content:center;font-style:normal}
.paykey-dots i:last-child{border-right:0}
.paykey-dots i.on::after{content:"";width:9px;height:9px;border-radius:50%;background:#111}
.pk-grid{display:grid;grid-template-columns:repeat(3,1fr);background:#d9d9d9;gap:1px;margin:0 -16px}
.pk-grid button{height:50px;background:#fff;font-size:23px;display:flex;align-items:center;justify-content:center}
.pk-grid button:active{background:#e6e6e6}
.pk-grid button.fn{background:#f3f3f3;font-size:15px}
.pk-foot{height:44px;display:flex;align-items:center;justify-content:flex-end;padding-right:16px;font-size:13px;color:var(--blue);background:#fff}

/* 图片预览 */
.viewer{position:fixed;inset:0;background:#000;z-index:450;display:flex;align-items:center;justify-content:center;flex-direction:column}
.viewer img{max-width:100%;max-height:86%;object-fit:contain}
.viewer .viewer-bar{position:absolute;top:calc(16px + env(safe-area-inset-top,0px));left:16px;color:#fff;font-size:14px}
.viewer .viewer-save{position:absolute;bottom:calc(28px + var(--safe-b));padding:8px 20px;border:1px solid #fff;border-radius:5px;color:#fff;font-size:14px}

/* ============ 通讯录 ============ */
.contact-top .cell{min-height:60px}
.contact-avatar{width:40px;height:40px;border-radius:4px;margin-right:12px;flex:none}
.letter-bar{position:absolute;right:2px;top:50%;transform:translateY(-50%);font-size:10px;color:#666;display:flex;flex-direction:column;gap:1px;z-index:3}
.letter-bar span{padding:1px 4px}
.profile-head{background:#fff;padding:22px 16px 16px;display:flex;align-items:center;gap:14px}
.profile-head img{width:62px;height:62px;border-radius:6px}
.profile-head .p-name{font-size:19px;font-weight:500}
.profile-head .p-sub{font-size:13px;color:var(--t2);margin-top:6px;line-height:1.6}
.profile-qr{width:14px;height:14px;color:#999;margin-left:6px}
.tag-pill{display:inline-block;padding:3px 10px;border:1px solid #ddd;border-radius:3px;font-size:12px;color:#666;margin:0 8px 8px 0}

/* ============ 发现 / 我 ============ */
.me-head{background:#fff;padding:30px 18px 26px;display:flex;align-items:center;gap:16px;margin-bottom:9px}
.me-head img{width:64px;height:64px;border-radius:6px}
.me-head .m-name{font-size:20px;font-weight:500}
.me-head .m-wxid{font-size:13px;color:var(--t2);margin-top:7px}
.me-head .m-right{margin-left:auto;display:flex;align-items:center;gap:8px;color:#b2b2b2}
.me-head .m-right .ic{width:17px;height:17px}
.cell-icon-box{width:26px;height:26px;margin-right:12px;display:flex;align-items:center;justify-content:center;flex:none}
.cell-icon-box .ic{width:24px;height:24px}
.ic-discover{color:#5b8ff9}.ic-moments{color:#4a90d9}.ic-qr{color:#576b95}.ic-pay{color:#07c160}.ic-fav{color:#f0b429}.ic-red{color:#fa5151}

/* ============ 朋友圈 ============ */
.moment-page{background:#fff}
.moment-cover{height:290px;background:linear-gradient(135deg,#5c6b7a,#8e9aa6);position:relative}
.moment-cover img{width:100%;height:100%;object-fit:cover;display:block}
.moment-me{position:absolute;right:14px;bottom:-46px;display:flex;align-items:flex-end;gap:12px}
.moment-me .m-nick{color:#fff;font-size:16px;text-shadow:0 1px 3px rgba(0,0,0,.5);padding-bottom:52px;font-weight:500}
.moment-me img{width:74px;height:74px;border-radius:6px;border:2px solid #fff;object-fit:cover}
.moment-list{padding-top:58px;background:#fff}
.mo-item{display:flex;padding:16px 14px 12px;gap:10px;border-bottom:1px solid #f0f0f0}
.mo-item img.mo-ava{width:42px;height:42px;border-radius:5px;flex:none;object-fit:cover}
.mo-main{flex:1;min-width:0}
.mo-name{color:var(--blue);font-size:15px;font-weight:500;margin-bottom:5px}
.mo-text{font-size:15px;line-height:1.5;word-break:break-word;margin-bottom:8px}
.mo-imgs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;max-width:240px}
.mo-imgs.one{grid-template-columns:1fr;max-width:180px}
.mo-imgs.two,.mo-imgs.four{grid-template-columns:repeat(2,1fr);max-width:170px}
.mo-imgs img{width:100%;aspect-ratio:1;object-fit:cover;background:#eee}
.mo-loc{font-size:12px;color:var(--blue);margin:6px 0}
.mo-foot{display:flex;align-items:center;margin-top:6px;position:relative}
.mo-time{font-size:12px;color:#a8a8a8;flex:1}
.mo-like-btn{width:30px;height:22px;border-radius:3px;background:#f7f7f7;display:flex;align-items:center;justify-content:center;color:#576b95;font-size:15px}
.mo-panel{background:#f7f7f7;border-radius:4px;margin-top:8px;font-size:14px;position:relative}
.mo-panel::before{content:"";position:absolute;top:-5px;left:14px;border:6px solid transparent;border-bottom-color:#f7f7f7;border-top:0}
.mo-likes{padding:6px 9px;color:var(--blue);border-bottom:1px solid #e6e6e6;line-height:1.5}
.mo-comment{padding:5px 9px;line-height:1.5}
.mo-comment b{color:var(--blue);font-weight:400}
.mo-comment span{color:#333}
.mo-actions{position:absolute;right:36px;top:-4px;background:#3c3c3c;border-radius:4px;display:flex;color:#fff;font-size:13px;z-index:5}
.mo-actions div{padding:7px 12px}
.mo-actions div+div{border-left:1px solid #555}
.moment-publish{background:#fff;flex:1;display:flex;flex-direction:column}
.moment-publish textarea{flex:1;border:0;outline:0;padding:16px;font-size:16px;resize:none;line-height:1.5}
.mp-imgs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0 16px 16px}
.mp-imgs img,.mp-add{width:100%;aspect-ratio:1;object-fit:cover;border-radius:3px}
.mp-add{background:#f2f2f2;display:flex;align-items:center;justify-content:center;font-size:38px;color:#ccc}

/* ============ 扫一扫 ============ */
.scan-page{background:#000;position:relative;color:#fff}
.scan-cam{position:absolute;inset:0;background:#000;display:flex;align-items:center;justify-content:center;color:#666;font-size:14px}
.scan-cam video{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;opacity:0;transition:opacity .18s linear}
.scan-cam video.ready{opacity:1}
.scan-frame{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);width:230px;height:230px}
.scan-frame .corner{position:absolute;width:24px;height:24px;border:3px solid var(--green)}
.scan-frame .c1{left:0;top:0;border-right:0;border-bottom:0}
.scan-frame .c2{right:0;top:0;border-left:0;border-bottom:0}
.scan-frame .c3{left:0;bottom:0;border-right:0;border-top:0}
.scan-frame .c4{right:0;bottom:0;border-left:0;border-top:0}
.scan-line{position:absolute;left:6px;right:6px;height:2px;background:var(--green);box-shadow:0 0 12px var(--green);animation:scanline 2.4s linear infinite}
@keyframes scanline{0%{top:4px}50%{top:calc(100% - 6px)}100%{top:4px}}
.scan-tip{position:absolute;top:calc(45% + 132px);left:0;right:0;text-align:center;font-size:13px;color:#bbb}
.scan-tabs{position:absolute;bottom:calc(30px + var(--safe-b));left:0;right:0;display:flex;justify-content:center;gap:42px;font-size:14px;color:#bbb}
.scan-tabs .on{color:var(--green)}
.scan-nav{position:absolute;top:calc(env(safe-area-inset-top,0px) + 8px);left:0;right:0;height:44px;display:flex;align-items:center;padding:0 14px;gap:16px;z-index:3}
.scan-nav .ic{color:#fff;width:26px;height:26px}

/* ============ 支付 / 钱包 ============ */
.pay-page{background:#f5f5f5}
/* ===== 服务页（微信：绿色头卡 + 白色分组网格） ===== */
.pay-svc{background:#ededed;min-height:100%}
.svc-hero{margin:10px;border-radius:12px;background:linear-gradient(180deg,#19c463,#07c160);display:flex;padding:24px 0;color:#fff}
.svc-hero-item{flex:1;text-align:center}
.svc-hero-item .ic{font-size:30px;line-height:1;color:#fff}
.svc-hero-label{font-size:15px;margin-top:8px;opacity:.95}
.svc-hero-bal{font-size:13px;margin-top:4px;opacity:.85}
.svc-card{background:#fff;border-radius:12px;margin:10px;padding:4px 0 12px}
.svc-sec{font-size:13px;color:#888;padding:10px 16px 6px}
.svc-grid{display:flex;flex-wrap:wrap}
.svc-item{flex:1;min-width:25%;text-align:center;padding:10px 0}
.svc-item .ic{font-size:26px;line-height:1}
.svc-item-label{font-size:12px;color:#333;margin-top:6px}
/* ===== 零钱页（微信：白底居中） ===== */
.wallet-page{background:#fff;display:flex;flex-direction:column;min-height:100%}
.wl-top{text-align:center;padding-top:56px}
.wl-icon{width:62px;height:62px;border-radius:50%;background:#f7b500;color:#fff;font-size:30px;font-weight:700;display:flex;align-items:center;justify-content:center;margin:0 auto}
.wl-label{font-size:15px;color:#333;margin-top:18px}
.wl-balance{font-size:38px;color:#111;font-weight:500;margin-top:12px}
.wl-actions{display:flex;flex-direction:column;align-items:center;gap:14px;margin-top:30vh;padding:0 0 6px}
.wl-btn{width:210px;height:44px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:16px}
.wl-btn-primary{background:#07c160;color:#fff}
.wl-btn-default{background:#f5f5f5;color:#222}
.wl-foot{text-align:center;color:#576b95;font-size:14px;padding:20px 0 40px}
.nav-link{font-size:15px;color:#333}
/* ===== 充值/提现页（微信样式） ===== */
.rc-page{background:#fff;display:flex;flex-direction:column;min-height:100%}
.rc-label{font-size:14px;color:#888;padding:34px 24px 12px}
.rc-row{display:flex;align-items:center;padding:0 24px 14px;border-bottom:1px solid #f0f0f0}
.rc-yen{font-size:28px;color:#111;margin-right:8px;font-weight:500}
.rc-input{flex:1;border:none;outline:none;font-size:32px;color:#111;background:transparent;min-width:0;-moz-appearance:textfield;appearance:textfield}
.rc-input::-webkit-outer-spin-button,.rc-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.rc-hint{font-size:12px;color:#aaa;padding:12px 24px}
.rc-spacer{height:44px}
.rc-btn{margin:0 20px 30px;height:46px;border-radius:8px;background:#07c160;color:#fff;display:flex;align-items:center;justify-content:center;font-size:16px}
.pay-page .cell-icon-box .ic{width:26px;height:26px}
.bill-item{display:flex;align-items:center;background:#fff;padding:14px 16px;border-bottom:1px solid #f0f0f0}
.bill-item .bi-ic{width:38px;height:38px;border-radius:50%;background:#f3f3f3;display:flex;align-items:center;justify-content:center;margin-right:12px;font-size:18px}
.bill-item .bi-mid{flex:1}
.bill-item .bi-title{font-size:15px}
.bill-item .bi-time{font-size:11px;color:#a8a8a8;margin-top:4px}
.bill-item .bi-amt{font-size:17px}
.bill-item .bi-amt.plus{color:#e6a23c}
.paycode-page{background:var(--green);color:#fff}
.paycode-card{background:#fff;color:#191919;margin:24px 20px;border-radius:8px;padding:22px 18px;text-align:center}
.paycode-card .pc-title{font-size:14px;color:#666}
.paycode-card .pc-barcode{width:100%;height:96px;object-fit:contain;margin:12px 0}
.paycode-card .pc-code{font-size:19px;letter-spacing:3px;font-family:monospace}
.paycode-card .pc-qr{width:190px;height:190px;margin:16px auto 0;display:block}
.paycode-card .pc-tip{font-size:12px;color:#999;margin-top:10px}
.paycode-foot{text-align:center;font-size:12px;color:rgba(255,255,255,.85);padding:6px 0 24px}
.collect-page{background:#ededed;display:flex;flex-direction:column;min-height:100%}
.cc-card{background:#fff;border-radius:12px;margin:12px 14px;padding:22px 18px 18px;text-align:center}
.cc-user{display:flex;flex-direction:column;align-items:center;margin-bottom:8px}
.cc-ava{width:48px;height:48px;border-radius:50%;object-fit:cover;background:#e6e6e6}
.cc-name{font-size:15px;color:#111;margin-top:8px}
.cc-title{font-size:13px;color:#888;margin-bottom:14px}
.cc-qr{width:220px;height:220px;margin:0 auto;display:block}
.cc-amt{font-size:34px;color:#111;margin:16px 0 2px;font-weight:500}
.cc-set{font-size:14px;color:#07c160;margin-bottom:12px}
.cc-hint{font-size:12px;color:#aaa;padding:6px 0 4px}
.cc-actions{margin:6px 14px}
.cc-actions .btn-block{margin:0 0 12px}
.bank-card{background:linear-gradient(120deg,#c6453d,#e0665c);border-radius:8px;color:#fff;padding:18px;margin:12px 16px}
.bank-card .b-name{font-size:16px}
.bank-card .b-tail{font-size:14px;margin-top:24px;letter-spacing:2px}

/* ============ 红包 / 转账 ============ */
.rp-page{background:#f5f5f5}
.rp-open-page{background:#fa5151;color:#fff;display:flex;flex-direction:column;align-items:center;padding-top:90px}
.rp-open-page .rp-ava{width:64px;height:64px;border-radius:6px;border:2px solid rgba(255,255,255,.5)}
.rp-open-page .rp-from{margin-top:12px;font-size:16px}
.rp-open-page .rp-title{font-size:15px;opacity:.9;margin-top:8px}
.rp-coin{width:96px;height:96px;border-radius:50%;background:#f8d25c;color:#a5401d;font-size:44px;display:flex;align-items:center;justify-content:center;margin:44px auto 0;border:4px solid #ffe49a;box-shadow:0 4px 14px rgba(0,0,0,.15)}
.rp-coin:active{transform:rotateY(20deg)}
.rp-open-amt{font-size:34px;margin-top:26px}
.rp-open-amt small{font-size:16px}
.rp-detail{background:#fff;width:100%;margin-top:auto;padding:16px;color:#333;font-size:14px}
.tf-page{background:#f5f5f5}
.tf-detail-page{background:#fff;text-align:center;padding-top:64px}
.tf-detail-page .tf-ico{width:64px;height:64px;border-radius:50%;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;margin:0 auto;font-size:32px}
.tf-detail-page .tf-amt{font-size:34px;margin:22px 0 6px}
.tf-detail-page .tf-status{font-size:14px;color:#666}

/* ============ 通话 ============ */
.call-page{position:fixed;inset:0;background:linear-gradient(180deg,#4a5058,#22262b);color:#fff;z-index:600;display:flex;flex-direction:column;align-items:center;padding-top:80px}
.call-page .callee-ava{width:88px;height:88px;border-radius:8px;object-fit:cover}
.call-page .callee-name{font-size:22px;margin-top:16px}
.call-page .call-status{font-size:14px;color:#c9c9c9;margin-top:10px}
.call-page video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}
.call-page .local-video{position:absolute;right:14px;top:calc(env(safe-area-inset-top,0px) + 60px);width:100px;height:150px;object-fit:cover;border-radius:6px;z-index:2;background:#333}
.call-page .call-ui{position:relative;z-index:3;display:flex;flex-direction:column;align-items:center;width:100%;flex:1}
.call-ctrls{position:absolute;bottom:calc(56px + var(--safe-b));left:0;right:0;display:flex;justify-content:space-around;z-index:4}
.call-ctrl{width:64px;height:64px;border-radius:50%;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;font-size:11px}
.call-ctrl .ic{width:26px;height:26px}
.call-ctrl.hangup{background:#f04c43}
.call-ctrl.accept{background:var(--green)}
.call-incoming{position:fixed;inset:0;background:rgba(20,22,25,.94);z-index:590;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.call-incoming img{width:78px;height:78px;border-radius:8px}
.call-incoming .ci-btns{display:flex;gap:70px;margin-top:70px}

/* ============ 网页版授权确认 ============ */
.webauth{background:#fff;padding:34px 22px;text-align:center}
.webauth .wa-icon{width:64px;height:64px;margin:0 auto 18px;background:#e9f8ef;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--green)}
.webauth .wa-title{font-size:18px}
.webauth .wa-sub{font-size:13px;color:var(--t2);margin:12px 0 26px;line-height:1.7}
.webauth .wa-device{background:#f7f7f7;border-radius:6px;padding:12px;font-size:13px;color:#666;margin-bottom:26px}

/* ============ 网页版（PC） ============ */
.webapp{height:100%;display:flex;background:#f5f5f5}
.webapp .web-side{width:64px;background:#2e2e2e;display:flex;flex-direction:column;align-items:center;padding-top:26px;gap:26px;flex:none}
.webapp .web-side img{width:38px;height:38px;border-radius:4px}
.webapp .web-side .ic{color:#888;width:26px;height:26px}
.webapp .web-list{width:270px;background:#eaeaea;border-right:1px solid #d6d6d6;display:flex;flex-direction:column;flex:none}
.webapp .web-search{padding:14px 12px}
.webapp .web-search input{width:100%;height:30px;border:0;border-radius:4px;background:#ddd;padding:0 10px;outline:0;font-size:13px}
.webapp .web-convs{flex:1;overflow-y:auto}
.webapp .web-conv{display:flex;align-items:center;gap:10px;padding:11px 12px;cursor:pointer}
.webapp .web-conv:hover{background:#dedede}
.webapp .web-conv.active{background:#c9c9c9}
.webapp .web-conv img{width:38px;height:38px;border-radius:3px}
.webapp .web-conv .wc-name{font-size:14px;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.webapp .web-conv .wc-time{font-size:11px;color:#999}
.webapp .web-conv .wc-brief{font-size:12px;color:#999;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:170px}
.webapp .web-main{flex:1;display:flex;flex-direction:column;min-width:0}
.webapp .web-title{height:60px;border-bottom:1px solid #e3e3e3;display:flex;align-items:center;padding:0 20px;font-size:17px;background:#f5f5f5}
.webapp .web-msgs{flex:1;overflow-y:auto;padding:18px 22px}
.webapp .web-msg{display:flex;gap:10px;margin-bottom:18px}
.webapp .web-msg.me{flex-direction:row-reverse}
.webapp .web-msg img{width:36px;height:36px;border-radius:3px}
.webapp .web-msg .wb{background:#fff;padding:9px 12px;border-radius:4px;font-size:14px;max-width:60%;line-height:1.5;word-break:break-word}
.webapp .web-msg.me .wb{background:#95ec69}
.webapp .web-input{height:150px;border-top:1px solid #e3e3e3;padding:10px 18px;background:#fff;display:flex;flex-direction:column}
.webapp .web-input textarea{flex:1;border:0;outline:0;resize:none;font-size:14px}
.webapp .web-input .wi-send{align-self:flex-end;padding:6px 20px;background:#f5f5f5;border:1px solid #ddd;border-radius:3px;font-size:13px;cursor:pointer}
.web-login{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#f5f5f5;flex-direction:column;gap:18px}
.web-login .wl-qr{width:220px;height:220px;background:#fff;padding:10px;box-shadow:0 2px 14px rgba(0,0,0,.1)}
.web-login .wl-qr img{width:100%;height:100%}
.web-login .wl-tip{font-size:14px;color:#666}
.web-login .wl-sub{font-size:12px;color:#999}

@media (min-width:700px){
  body{background:#2b2b2b}
  .app,.login-screen{left:50%;top:50%;transform:translate(-50%,-50%);width:390px;height:844px;max-height:100vh;border-radius:14px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.5)}
  #overlays{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:390px;height:844px;max-height:100vh;pointer-events:none;z-index:700}
  #overlays>*{pointer-events:auto}
  .toast{left:50%;top:50%}
}

/* 加密消息 */
.enc-mini{font-size:11px;opacity:.7;margin-right:4px}
#encBanner{color:#7a5b00;background:#fff7e0;border-bottom:1px solid #f0e2b6}

/* 朋友圈相册（仿微信布局） */
.nb-hero{position:absolute;left:0;right:0;top:var(--status-h);background:transparent !important;border-bottom:none !important;box-shadow:none}
.nb-hero .nav-title{display:none}
.nb-hero .nav-l,.nb-hero .nav-r{color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.5)}
.nb-hero .nav-l .ic,.nb-hero .nav-r .ic{filter:drop-shadow(0 1px 2px rgba(0,0,0,.4))}
.mm-hero{position:relative}
.mm-cover{height:38vh;min-height:250px;max-height:420px;background:linear-gradient(135deg,#5c6b7a,#8e9aa6);position:relative;overflow:hidden}
.mm-cover img{width:100%;height:100%;object-fit:cover;display:block}
.mm-cover[data-act]{cursor:pointer}
.mm-cover-hint{position:absolute;left:14px;bottom:14px;color:#fff;font-size:12px;background:rgba(0,0,0,.32);padding:5px 12px;border-radius:14px;pointer-events:none;text-shadow:0 1px 2px rgba(0,0,0,.3)}
.mm-me{position:absolute;right:14px;bottom:-38px;display:flex;align-items:flex-end;gap:12px;z-index:2}
.mm-me .m-nick{color:#fff;font-size:17px;font-weight:500;margin-bottom:10px;text-shadow:0 1px 3px rgba(0,0,0,.55)}
.mm-me img{width:72px;height:72px;border-radius:6px;border:2px solid #fff;object-fit:cover;background:#eee}
.chat-scroll[data-fs="1"] .bubble:not(.emoji-b){font-size:19px;line-height:1.46}
.chat-scroll[data-fs="2"] .bubble:not(.emoji-b){font-size:22px;line-height:1.52}
/* 字体大小：<html data-fs> 由 core.js 统一维护，全站文字按档位缩放 */
html[data-fs="1"] .navbar .nav-title,html[data-fs="1"] .cell .cell-txt,html[data-fs="1"] .conv-item .name,
html[data-fs="1"] .bubble:not(.emoji-b),html[data-fs="1"] .btn-block,html[data-fs="1"] .btn-green,
html[data-fs="1"] .action-sheet .as-item,html[data-fs="1"] .action-sheet .as-cancel,
html[data-fs="1"] .dialog .dlg-title,html[data-fs="1"] .dialog .dlg-btns button,
html[data-fs="1"] .ci-box textarea,html[data-fs="1"] .login-row input,
html[data-fs="1"] .profile-head .p-name,html[data-fs="1"] .me-head .m-name,
html[data-fs="1"] .mo-text,html[data-fs="1"] .mo-name,html[data-fs="1"] .moment-publish textarea{font-size:19px!important}
html[data-fs="2"] .navbar .nav-title,html[data-fs="2"] .cell .cell-txt,html[data-fs="2"] .conv-item .name,
html[data-fs="2"] .bubble:not(.emoji-b),html[data-fs="2"] .btn-block,html[data-fs="2"] .btn-green,
html[data-fs="2"] .action-sheet .as-item,html[data-fs="2"] .action-sheet .as-cancel,
html[data-fs="2"] .dialog .dlg-title,html[data-fs="2"] .dialog .dlg-btns button,
html[data-fs="2"] .ci-box textarea,html[data-fs="2"] .login-row input,
html[data-fs="2"] .profile-head .p-name,html[data-fs="2"] .me-head .m-name,
html[data-fs="2"] .mo-text,html[data-fs="2"] .mo-name,html[data-fs="2"] .moment-publish textarea{font-size:22px!important}
html[data-fs="1"] .cell .cell-sub,html[data-fs="1"] .cell .cell-right,html[data-fs="1"] .conv-item .brief,
html[data-fs="1"] .group-title,html[data-fs="1"] .list-letter,html[data-fs="1"] .section-title,
html[data-fs="1"] .searchbar,html[data-fs="1"] .search-input input,html[data-fs="1"] .form-row label,
html[data-fs="1"] .form-row input,html[data-fs="1"] .form-row textarea,html[data-fs="1"] .form-hint,
html[data-fs="1"] .empty-tip,html[data-fs="1"] .msg-name,html[data-fs="1"] .chat-time,
html[data-fs="1"] .sys-msg,html[data-fs="1"] .dialog .dlg-body,html[data-fs="1"] .toast,
html[data-fs="1"] .loc-txt,html[data-fs="1"] .card-b .card-name,html[data-fs="1"] .mo-actions,
html[data-fs="1"] .me-head .m-wxid,html[data-fs="1"] .profile-head .p-sub,html[data-fs="1"] .ci-send,
html[data-fs="1"] .ci-paste,html[data-fs="1"] .ci-box .hold-btn,html[data-fs="1"] .webapp .web-title{font-size:15px!important}
html[data-fs="2"] .cell .cell-sub,html[data-fs="2"] .cell .cell-right,html[data-fs="2"] .conv-item .brief,
html[data-fs="2"] .group-title,html[data-fs="2"] .list-letter,html[data-fs="2"] .section-title,
html[data-fs="2"] .searchbar,html[data-fs="2"] .search-input input,html[data-fs="2"] .form-row label,
html[data-fs="2"] .form-row input,html[data-fs="2"] .form-row textarea,html[data-fs="2"] .form-hint,
html[data-fs="2"] .empty-tip,html[data-fs="2"] .msg-name,html[data-fs="2"] .chat-time,
html[data-fs="2"] .sys-msg,html[data-fs="2"] .dialog .dlg-body,html[data-fs="2"] .toast,
html[data-fs="2"] .loc-txt,html[data-fs="2"] .card-b .card-name,html[data-fs="2"] .mo-actions,
html[data-fs="2"] .me-head .m-wxid,html[data-fs="2"] .profile-head .p-sub,html[data-fs="2"] .ci-send,
html[data-fs="2"] .ci-paste,html[data-fs="2"] .ci-box .hold-btn,html[data-fs="2"] .webapp .web-title{font-size:17px!important}
html[data-fs="1"] .tabbar .tab,html[data-fs="1"] .conv-item .time,html[data-fs="1"] .letter-bar,
html[data-fs="1"] .plus-item,html[data-fs="1"] .em-tab,html[data-fs="1"] .bubble .msg-status{font-size:12px!important}
html[data-fs="2"] .tabbar .tab,html[data-fs="2"] .conv-item .time,html[data-fs="2"] .letter-bar,
html[data-fs="2"] .plus-item,html[data-fs="2"] .em-tab,html[data-fs="2"] .bubble .msg-status{font-size:13px!important}
.moment-page .moment-list{padding-top:52px}

/* 深色模式 */
body.dark-mode .app, body.dark-mode .page, body.dark-mode .tabview, body.dark-mode .page.overlay{background:#111}
body.dark-mode .statusbar{background:#1c1c1c;color:#e8e8e8}
body.dark-mode .navbar{background:#1c1c1c;border-bottom-color:#2a2a2a}
body.dark-mode .nav-title, body.dark-mode .nav-l, body.dark-mode .nav-r{color:#e8e8e8}
body.dark-mode .cell, body.dark-mode .form-card{background:#1c1c1c;border-bottom-color:#2a2a2a}
body.dark-mode .cell-txt, body.dark-mode .cell-right, body.dark-mode .p-name, body.dark-mode .p-sub, body.dark-mode .m-name{color:#e8e8e8}
body.dark-mode .cell-sub, body.dark-mode .form-hint, body.dark-mode .empty-tip, body.dark-mode .m-wxid{color:#8a8a8a}
body.dark-mode .chat-bg, body.dark-mode .chat-scroll{background:#111 !important}
body.dark-mode .bubble{background:#2c2c2c;color:#e8e8e8}
body.dark-mode .bubble::after{border-right-color:#2c2c2c}
body.dark-mode .chat-input{background:#1c1c1c;border-top-color:#2a2a2a;color:#e8e8e8}
body.dark-mode .tabbar{background:#1c1c1c;border-top-color:#2a2a2a}
body.dark-mode .tabbar .tab{color:#8a8a8a}
body.dark-mode .tabbar .tab.active{color:#07c160}
body.dark-mode .searchbar{background:#2a2a2a;color:#8a8a8a}
body.dark-mode .btn-block.gray, body.dark-mode .sys-msg span{background:#2a2a2a;color:#c8c8c8}
body.dark-mode .dialog, body.dark-mode .action-sheet{background:#1c1c1c;color:#e8e8e8}
body.dark-mode .as-item, body.dark-mode .dlg-title{color:#e8e8e8}
body.dark-mode .toast{background:rgba(50,50,50,.95);color:#eee}
body.dark-mode .badge-mini{background:#fa5151;color:#fff}

/* 朋友圈页内评论输入条 */
.mo-inputbar{position:fixed;left:0;right:0;bottom:0;z-index:1200;display:flex;align-items:center;gap:10px;background:#f7f7f7;border-top:1px solid #e5e5e5;padding:8px 12px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}
.mo-inputbar input{flex:1;height:36px;border:0;outline:0;background:#fff;border-radius:4px;padding:0 10px;font-size:15px;color:#191919}
.mo-inputbar .mo-sendbtn{color:#07c160;font-size:15px;padding:4px 6px;flex-shrink:0}

/* ===== 长按会话菜单（微信样式） ===== */
#lpMask{position:fixed;inset:0;z-index:890;background:transparent}
#lpMenu{position:fixed;z-index:891;background:#fff;border-radius:8px;box-shadow:0 6px 30px rgba(0,0,0,.2);padding:2px 0;min-width:136px;overflow:hidden}
#lpMenu div{padding:13px 24px;font-size:15px;color:#181818;white-space:nowrap}
#lpMenu div:active{background:#f5f5f5}
