:root[data-theme="dark"]{--im-live-surface-bg:#111722}
/* 所有视频小窗（私聊/群通话小窗、本地预览、连麦自画面、站内直播悬浮）统一尺寸：9:16，手机约 140×249，不做头像级小窗 */
:root{--im-live-surface-bg:#f4f7fb;--im-float-w:clamp(132px,36vw,172px);--im-float-h:calc(var(--im-float-w) * 16 / 9);--im-float-gap:12px}

body.chat-detail .actions{display:grid!important;grid-template-columns:repeat(4,40px)!important;grid-auto-flow:column!important;gap:6px!important;align-items:center!important;justify-content:end!important;min-width:178px!important}body.chat-detail #voiceCallBtn{grid-column:1!important}body.chat-detail #videoCallBtn{grid-column:2!important}body.chat-detail #msgSearchBtn{grid-column:3!important}body.chat-detail #moreBtn{grid-column:4!important}body.chat-detail .actions .iconbtn{width:40px!important;height:40px!important;min-width:40px!important;padding:0!important;display:grid!important;place-items:center!important}body.chat-detail .actions .uiface{font-size:19px!important;line-height:1!important}
@media(max-width:850px){body.chat-detail .actions{grid-template-columns:repeat(4,36px)!important;gap:4px!important;min-width:156px!important}body.chat-detail .actions .iconbtn{width:36px!important;height:36px!important;min-width:36px!important}body.chat-detail .actions .uiface{font-size:18px!important}}
#messages .msg{position:relative}#messages .msg>div:not(.avatar){display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:100%}#messages .msg.me>div:not(.avatar){align-items:flex-end}#messages .im-msg-inline-actions{display:flex;flex-wrap:nowrap;gap:5px;margin-top:6px;margin-bottom:2px;max-width:100%;justify-content:flex-start}#messages .msg.me .im-msg-inline-actions{justify-content:flex-end;margin-left:auto}#messages .im-msg-inline-actions button{flex:0 0 auto;white-space:nowrap;border:1px solid var(--line,#d9e1ec);background:var(--panel,#fff);color:var(--text,#111827);border-radius:999px;padding:6px 9px;font-size:12px;font-weight:700;line-height:1.1;box-shadow:0 3px 10px rgba(15,23,42,.08)}#messages .im-msg-inline-actions button:active{transform:scale(.96)}#messages .msg.im-call-event .bubble{display:flex!important;align-items:center!important;gap:10px!important;min-width:min(76vw,260px)}#messages .msg.im-call-event .call-record{flex:1;min-width:0}#messages .msg.im-call-event .im-call-inline-time{margin-left:auto;align-self:center;white-space:nowrap;font-size:11px;font-weight:650;opacity:.66;font-variant-numeric:tabular-nums}
@media(max-width:850px){#messages .im-chat-media-button{width:fit-content!important;max-width:min(280px,58vw)!important}#messages .im-chat-media-button>img.media{width:auto!important;height:auto!important;max-width:100%!important;max-height:min(360px,42dvh)!important;object-fit:contain!important}#messages .msg video.media{width:auto!important;height:auto!important;max-width:min(280px,58vw)!important;max-height:min(360px,42dvh)!important;object-fit:contain!important;background:#000!important}}
#groupQuickBtn{display:grid!important;width:34px!important;min-width:34px!important;height:34px!important;padding:0!important;border-radius:11px!important;font-size:0!important;place-items:center!important}#groupQuickBtn:after{content:'⌕';font-size:21px!important;font-weight:800!important;line-height:1!important}.sidebar #search{display:none!important;margin-top:8px!important}.sidebar.im-search-open #search{display:block!important}.sideBrandWrap{display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;flex:1!important;overflow:hidden!important}.moment-shot{width:auto!important;min-width:52px!important;height:34px!important;min-height:34px!important;padding:0 12px!important;border-radius:12px!important;font-size:13px!important;line-height:1!important;white-space:nowrap!important;flex:0 0 auto!important;animation:none!important;background:transparent!important;color:var(--text)!important;border:1px solid var(--line)!important;box-shadow:none!important}#momentFriendStrip{display:flex;align-items:center;gap:5px;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important}#momentFriendStrip::-webkit-scrollbar{display:none!important}.mfp{height:30px;max-width:96px;flex:0 0 auto;border:1px solid var(--line);border-radius:999px;background:var(--panel2);color:var(--text);padding:2px 8px 2px 3px;display:flex;align-items:center;gap:4px;font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden}.mfp i{width:24px;height:24px;border-radius:50%;overflow:hidden;display:grid;place-items:center;flex:0 0 24px;background:linear-gradient(145deg,var(--avatar1),var(--avatar2));font-style:normal;font-size:10px}.mfp img{width:100%;height:100%;object-fit:cover}.mfp span{overflow:hidden;text-overflow:ellipsis}.im-chat-last-time{font-size:11px!important;line-height:1.2!important;font-weight:500!important;color:var(--muted,#6f7c91)!important;white-space:nowrap!important;align-self:center!important;justify-self:end!important;margin-left:8px!important;font-variant-numeric:tabular-nums!important}
#imMomentCamera{position:fixed;left:0;right:0;top:0;bottom:calc(var(--im-main-nav-height,62px) + var(--im-main-nav-safe,0px));z-index:60060!important;background:#000;overflow:hidden}#imMomentCamera .mc-stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#000}#imMomentCamera .mc-frame{position:relative;overflow:hidden;background:#000;flex:0 0 auto}#imMomentCamera video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000;opacity:0;transition:opacity .12s linear}#imMomentCamera video.mc-ready{opacity:1}#imMomentCamera video.front{transform:scaleX(-1)}.mc-x{position:absolute;left:14px;top:calc(env(safe-area-inset-top) + 12px);z-index:30;width:38px;height:38px;border:0;border-radius:50%;background:rgba(0,0,0,.72);color:#fff;font-size:24px;display:grid;place-items:center}.mc-ratio{position:absolute;right:14px;top:calc(env(safe-area-inset-top) + 12px);z-index:30;min-width:64px;height:36px;padding:0 12px;border:1px solid rgba(255,255,255,.45);border-radius:999px;background:rgba(0,0,0,.72);color:#fff;font-size:13px;font-weight:800;display:grid;place-items:center}.mc-ratio-menu{position:absolute;right:14px;top:calc(env(safe-area-inset-top) + 56px);z-index:31;display:none;flex-direction:column;gap:4px;min-width:120px;padding:6px;border-radius:12px;background:rgba(0,0,0,.92);border:1px solid rgba(255,255,255,.2)}.mc-ratio-menu.open{display:flex}.mc-ratio-menu button{border:0;background:transparent;color:#fff;text-align:left;padding:8px 10px;border-radius:8px;font-size:13px;font-weight:700}.mc-ratio-menu button.active,.mc-ratio-menu button:active{background:rgba(255,255,255,.14)}.mc-c{position:absolute;z-index:30;left:0;right:0;bottom:12px;height:72px;padding:0 22px;display:grid;grid-template-columns:1fr 82px 1fr;align-items:center}.mc-s{border:0;background:rgba(0,0,0,.55);color:#fff;border-radius:12px;min-width:62px;height:38px;padding:0 12px;font-size:13px;font-weight:750}.mc-s:first-child{justify-self:start}.mc-s:last-child{justify-self:end}.mc-shot{width:68px;height:68px;border-radius:50%;border:4px solid #fff;background:#fff4;padding:6px;justify-self:center;touch-action:manipulation}.mc-shot:after{content:'';display:block;width:100%;height:100%;border-radius:50%;background:#fff}.mc-shot.recording{border-color:#ff2d55}.mc-shot.recording:after{background:#ff2d55;transform:scale(.72);border-radius:12px}.mc-hint{position:absolute;z-index:30;left:50%;transform:translateX(-50%);bottom:88px;color:#fff;background:rgba(0,0,0,.55);border-radius:999px;padding:5px 10px;font-size:11px;white-space:nowrap}
.im-chat-searchbar{position:relative;z-index:18;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:7px 10px;background:var(--topbar);border-bottom:1px solid var(--line)}.im-chat-search-input{height:34px;min-width:0;border:1px solid var(--line);border-radius:10px;background:var(--input);color:var(--text);padding:0 10px;outline:none;font-size:13px}.im-chat-search-close{height:34px;min-width:54px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--text);font-size:12px;font-weight:750;padding:0 10px}.im-chat-search-results{display:none;grid-column:1/-1;max-height:210px;overflow:auto;border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:4px}.im-chat-search-results.show{display:block}.im-chat-search-hit{width:100%;border:0;border-radius:8px;background:transparent;color:var(--text);padding:7px 8px;text-align:left;display:flex;justify-content:space-between;gap:8px}.im-chat-search-hit:active{background:var(--hover)}.im-chat-search-hit span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.im-chat-search-hit small{flex:0 0 auto;color:var(--muted);font-size:10px}.im-chat-search-empty{padding:8px;color:var(--muted);font-size:12px;text-align:center}#locationSendBtn[hidden]{display:none!important}
.screen.show:not(#callScreen){place-items:center!important;padding:10px!important;overflow:auto!important}.screen.show:not(#callScreen)>.modal,#imRuntimeModal>.modal,#imBeautyModal>.modal{width:min(82vw,330px)!important;max-width:330px!important;max-height:72dvh!important;overflow:auto!important;padding:12px!important;border-radius:14px!important;margin:auto!important}.screen.show:not(#callScreen)>.modal h2,#imRuntimeModal>.modal h2,#imBeautyModal>.modal h2{font-size:17px!important;line-height:1.2!important;margin:0 0 9px!important}.screen.show:not(#callScreen) .modalactions{gap:6px!important;margin-top:9px!important}.screen.show:not(#callScreen) .modalactions button{min-height:32px!important;padding:6px 9px!important;border-radius:9px!important;font-size:12px!important}
#callScreen.show{display:block!important;position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;padding:0!important;background:#000!important}#callScreen.show~.toast{bottom:calc(env(safe-area-inset-bottom) + 120px)!important}

/* 移动端提示固定在主导航和安全区上方。 */
@media(max-width:850px){.toast{bottom:calc(var(--im-main-nav-height,62px) + var(--im-main-nav-safe,0px) + 14px)!important;z-index:50080!important}html.im-locked .toast{bottom:calc(env(safe-area-inset-bottom) + 18px)!important}}
/* 注册 / 登录 / 忘记密码跟随当前外观主题。 */
.im-auth-screen{position:fixed!important;inset:0!important;min-height:100dvh!important;height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;color-scheme:inherit!important;background:var(--main)!important;color:var(--text)!important;padding:calc(env(safe-area-inset-top) + 20px) 18px calc(env(safe-area-inset-bottom) + 28px)!important;overscroll-behavior:contain!important}.im-auth-card{width:min(100%,420px)!important;margin:max(22px,6dvh) auto 0!important;padding:18px 16px 24px!important;border-radius:24px!important;background:color-mix(in srgb,var(--panel) 94%,transparent)!important;border:1px solid var(--line)!important;box-shadow:var(--shadow)!important;backdrop-filter:blur(14px)!important;-webkit-backdrop-filter:blur(14px)!important}.im-auth-screen input,.im-auth-screen select,.im-auth-screen textarea{font-size:16px!important}.im-auth-screen .field{background:var(--input)!important;color:var(--text)!important;border-color:var(--line)!important}.im-auth-screen .muted{color:var(--muted)!important}@media(max-height:620px){.im-auth-card{margin:6px auto 0!important;padding-top:12px!important}}
.im-auth-brand b,.im-auth-card h1{color:var(--text)!important}.im-auth-brand span,.im-auth-sub,.im-auth-label,.im-auth-hint,.im-auth-link{color:var(--muted)!important}.im-auth-pass .ghost{background:var(--card)!important;border-color:var(--line)!important;color:var(--text)!important}
:root[data-theme="dark"] .im-adult-gate,:root[data-theme="dark"] .im-adult-blocked{background:var(--bg)!important;color:var(--text)!important;color-scheme:dark!important}:root[data-theme="dark"] .im-adult-title{color:var(--text)!important}:root[data-theme="dark"] .im-adult-copy{color:var(--muted)!important}:root[data-theme="dark"] .im-adult-no{background:var(--card)!important;color:var(--text)!important;border-color:var(--line)!important}:root[data-theme="dark"] .aidraw{background:var(--card)!important;color:var(--text)!important;color-scheme:dark!important}:root[data-theme="dark"] .aidraw-box{background:var(--panel2)!important}:root[data-theme="dark"] .aidraw-label,:root[data-theme="dark"] .aidraw-label button{color:var(--text)!important}:root[data-theme="dark"] .aidraw-input{background:var(--input)!important;color:var(--text)!important}:root[data-theme="dark"] .aidraw-side button{background:var(--panel2)!important;color:var(--text)!important;border-color:var(--line)!important}
/* 发现页重复入口在运行时也会被账号模块清掉；CSS 先保证首帧绝不闪出“文件 / 应用”。 */
[data-discover-direct="files"],[data-discover-direct="apps"]{display:none!important}
/* 做图页底部 5 个工具固定一排小按钮。 */
.aidraw-side{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:6px!important;padding-top:8px!important;width:100%!important;overflow-x:auto!important;scrollbar-width:none!important}.aidraw-side::-webkit-scrollbar{display:none!important}.aidraw-side button{flex:0 0 52px!important;width:52px!important;height:30px!important;min-height:30px!important;padding:0 6px!important;border-radius:999px!important;font-size:13px!important;white-space:nowrap!important}
body.chat-detail #panelView{display:none!important}
body.chat-detail #chatView{display:flex!important}

#panelView[data-owner="shared-media"] .sm-comment-sheet{height:min(52dvh,480px)!important;max-height:52dvh!important}
#panelView[data-owner="shared-media"] .sm-comment-head{flex-basis:40px!important;min-height:40px!important}
#panelView[data-owner="shared-media"] .sm-comment-close{top:2px!important;width:34px!important;height:34px!important;line-height:34px!important;font-size:22px!important}
#panelView[data-owner="shared-media"] .sm-comment-list{padding:2px 12px 7px!important}
#panelView[data-owner="shared-media"] .sm-comment-row{grid-template-columns:30px minmax(0,1fr)!important;gap:8px!important;padding:7px 0!important}
#panelView[data-owner="shared-media"] .sm-comment-avatar{width:30px!important;height:30px!important;font-size:12px!important}
#panelView[data-owner="shared-media"] .sm-comment-name{font-size:11px!important;line-height:16px!important}
#panelView[data-owner="shared-media"] .sm-comment-text{font-size:13px!important;line-height:1.4!important;margin-top:1px!important}
#panelView[data-owner="shared-media"] .sm-comment-compose{gap:5px!important;padding:6px 8px calc(env(safe-area-inset-bottom) + 6px)!important}
#panelView[data-owner="shared-media"] .sm-comment-input-wrap{min-height:36px!important;padding:0 10px!important;border-radius:18px!important}
#panelView[data-owner="shared-media"] .sm-comment-input{height:36px!important;font-size:15px!important}
#panelView[data-owner="shared-media"] .sm-comment-tool{width:34px!important;height:34px!important;flex-basis:34px!important;font-size:20px!important;line-height:34px!important}
#panelView[data-owner="shared-media"] .sm-comment-send{height:32px!important;min-width:44px!important;padding:0 9px!important;font-size:13px!important}
#panelView[data-owner="shared-media"] .sm-comment-emoji{padding:5px 8px!important}
#panelView[data-owner="shared-media"] .sm-comment-emoji button{height:30px!important;font-size:20px!important}

@media(max-width:850px){
 html,body{height:100dvh!important;min-height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;overscroll-behavior:none!important}

 

 
 html.has-chat-wallpaper body.chat-detail #chatView{padding-bottom:0!important}
 .screen:not(#callScreen){inset:0 0 var(--im-main-nav-total) 0!important;height:auto!important}
 
}

:where(button,[role="button"]):disabled{transform:none!important}


.wp-tile{position:relative!important}
.wp-tile.on{border-color:var(--accent)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 28%,transparent)!important;font-weight:800!important}
.wp-tile.on::after{content:'✅';position:absolute;right:5px;top:5px;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--panel);font-size:14px;box-shadow:0 2px 8px rgba(0,0,0,.16)}

@media(max-width:850px){body.chat-detail #chatView>.topbar{position:sticky!important;top:0!important;z-index:70!important}}

/* 深色模式 + 图片壁纸：只提高文字反差，不改变壁纸、透明度或布局。 */
:root[data-theme="dark"].has-chat-wallpaper #chatView{--text:#fff;--muted:#e2e8f0;color:#fff!important}
:root[data-theme="dark"].has-chat-wallpaper #chatView input::placeholder,:root[data-theme="dark"].has-chat-wallpaper #chatView textarea::placeholder{color:#cbd5e1!important;opacity:1!important}

