/* 几何来自 App Design/tokens.json、ProfileHomeHeader；品牌值由导入器生成。 */
/* 使用平台字体：iOS 为系统字体/PingFang，Android 由系统提供 Roboto；不下载字体。 */
:root{font-family:-apple-system,BlinkMacSystemFont,system-ui,'PingFang SC',sans-serif;-webkit-text-size-adjust:100%}
html,body{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
body,#app{height:var(--viewport-height,100dvh)}
#app{min-height:0;padding-top:var(--safe-top, env(safe-area-inset-top));max-width:760px;position:relative;background:var(--background)}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0!important}
.native-icon{display:inline-block;width:24px;height:24px;flex-shrink:0;background:currentColor;mask:var(--icon) center/contain no-repeat;-webkit-mask:var(--icon) center/contain no-repeat}
.preview-bar{position:absolute;right:4px;top:var(--safe-top, env(safe-area-inset-top));z-index:9;padding:1px 4px;font-size:8px;opacity:.7;pointer-events:none;background:transparent}
.topbar{position:relative;min-height:var(--native-headerHeight);height:var(--native-headerHeight);padding:0 12px;border:0;background:var(--surface);justify-content:center;gap:0}
.topbar h1{font-size:calc(18px * var(--native-fontScale));font-weight:400;text-align:center;line-height:1.47}
.topbar>.icon-button:first-child{position:absolute;left:8px;top:0;height:100%}
.topbar>.icon-button:last-child{left:auto;right:12px}
.topbar>.icon-button:only-child{left:8px;right:auto}
.topbar .heading{padding:0 56px}
.chat-detail{position:absolute;right:6px;top:0;width:48px;height:48px;display:grid;place-items:center}
.chat-detail .avatar{width:32px;height:32px;border-radius:50%;font-size:13px}
#app[data-screen=login]{background:var(--surface)}
.login:not(.recovery){padding:var(--native-loginTop) var(--native-loginGutter) 16px;background:linear-gradient(var(--soft),var(--surface) 40%);color:var(--loginInk)}
.login-brand{display:flex;flex-direction:column;gap:var(--native-loginTitleGap);margin:0;text-align:center}
.login-brand img{width:var(--native-loginLogo);height:var(--native-loginLogo);border-radius:28px;background:var(--surface)}
.login h1{font-size:calc(var(--native-loginTitle) * var(--native-fontScale));font-weight:400;line-height:1.47;margin:0}
.login:not(.recovery) form{margin-top:var(--native-loginFormGap);gap:0;display:flex;flex-direction:column}
.login:not(.recovery) .field{border:0;background:var(--inputSurface);border-radius:24px;padding:0 12px;min-height:var(--native-loginField);height:var(--native-loginField);gap:0;margin-bottom:var(--native-loginRowGap)}
.login:not(.recovery) .field>.native-icon{width:48px;height:22px;mask-size:22px;-webkit-mask-size:22px;color:var(--loginSecondary)}
.login:not(.recovery) .field:has(.password-toggle)>.native-icon{display:none}
.login .field input{font-size:calc(14px * var(--native-fontScale));color:var(--loginInk)}
.login .field input::placeholder{color:var(--loginSecondary)}
.password-toggle{width:48px;color:var(--loginSecondary)}
.password-toggle .native-icon{width:20px;height:20px}
.forgot{white-space:nowrap;padding:0 4px;font-size:calc(14px * var(--native-fontScale));color:var(--loginSecondary)}
.login:not(.recovery) .primary{width:var(--native-loginButtonWidth);align-self:center;border-radius:24px;padding:8px;min-height:48px;font-weight:400;font-size:calc(16px * var(--native-fontScale));margin-top:12px}
.login:not(.recovery) .error:empty{display:none}
.login:not(.recovery) .register{color:var(--loginSecondary);font-size:calc(14px * var(--native-fontScale));margin-top:8px;height:48px}
.login-foot{margin-top:auto;padding-top:32px;font-size:calc(12px * var(--native-fontScale));color:var(--loginSecondary);line-height:1.47}
.search-wrap{padding:8px 16px 12px}#app[data-screen=list] .search-wrap{padding-top:12px}
.search{border-radius:12px;height:40px;padding:0 12px;background:var(--surface);gap:8px}
.search input{font-size:calc(14px * var(--native-fontScale))}
.search .native-icon{width:20px;height:20px}
#conversation-list{margin:0 16px;background:var(--surface);border-radius:16px 16px 0 0}
.conversation{min-height:var(--native-listRow);padding:10px 12px;gap:12px;position:relative}
.conversation+.conversation{border:0}
.conversation+.conversation:before{content:'';position:absolute;top:0;left:68px;right:12px;height:1px;background:var(--border)}
.avatar{width:var(--native-listAvatar);height:var(--native-listAvatar);border-radius:50%;font-weight:400}
.conversation.pinned{background:var(--pinned)}
.conversation-name{font-size:calc(var(--native-listTitle) * var(--native-fontScale));font-weight:400}
.conversation-line{margin-bottom:4px}
.preview-text{font-size:calc(var(--native-listPreview) * var(--native-fontScale))}
.time{font-size:calc(12px * var(--native-fontScale))}
.badge{font-size:12px;right:-5px;top:-4px;line-height:18px;height:20px;min-width:20px;border:0}
.bottom-nav{height:calc(var(--native-tabHeight) + var(--safe-bottom, env(safe-area-inset-bottom)));padding:0 0 var(--safe-bottom, env(safe-area-inset-bottom));background:var(--surface);border-color:var(--border)}
.nav-item{padding:8px 0 4px;gap:3px;justify-content:flex-start;color:var(--secondary);font-size:12px}
.nav-item .native-icon{width:28px;height:28px}
.messages{padding:0 6px 12px;background:var(--chatBackground)}
.message{gap:2px;margin:8px 0;align-items:flex-end;color:var(--chatText)}
.message .avatar{width:var(--native-messageAvatar);height:var(--native-messageAvatar);border-radius:50%;font-size:12px}
.message.own>.avatar{display:none}
.message-body{max-width:calc(100% - 48px);position:relative}
/* 发送中提示放在气泡左侧、不占行高：发送中→已发送时行高不变，列表不跳（原生在气泡旁转圈）。失败按钮仍占位便于点按。 */
.message.own .message-body>.message-status:not(.failed):not(.media-cancel){position:absolute;right:calc(100% + 6px);bottom:2px;margin:0;white-space:nowrap;pointer-events:none}
.message.own .message-body>.message-status.media-cancel{position:absolute;right:calc(100% + 6px);bottom:2px;margin:0;white-space:nowrap}
.message.own .message-body>.message-status:not(.failed):not(.media-cancel):has(~ .media-cancel){bottom:24px}
.bubble{font-size:calc(var(--native-messageFont) * var(--native-fontScale));line-height:1.47;padding:var(--native-messagePadding) 12px;border-radius:var(--native-bubbleRadius) var(--native-bubbleRadius) var(--native-bubbleRadius) 5px;color:var(--chatText)}
.own .bubble{border-radius:var(--native-bubbleRadius) var(--native-bubbleRadius) 5px var(--native-bubbleRadius)}
.bubble:before{top:auto;bottom:0;left:-4px;border-top:0;border-bottom:8px solid var(--surface);border-right:0;border-left:7px solid transparent}
.own .bubble:before{right:-4px;left:auto;border-left:0;border-top:0;border-bottom:8px solid var(--outgoing);border-right:7px solid transparent}
.bubble-time{font-size:calc(10px * var(--native-fontScale));color:var(--chatSecondary);float:right;margin:6px 0 0 10px;white-space:nowrap}
.sender{font-size:calc(12px * var(--native-fontScale));padding:8px 12px 0;margin:0;background:var(--surface);border-radius:16px 16px 0 0;color:var(--primary)}
.message-body:has(.sender)>.bubble{border-top-left-radius:0;border-top-right-radius:0}
.timestamp{font-size:calc(11px * var(--native-fontScale));margin:12px 0;color:var(--chatSecondary)}
.composer{border:0;gap:0;min-height:var(--native-composerHeight);padding:4px 0 max(4px,var(--safe-bottom, env(safe-area-inset-bottom)));background:var(--surface)}
.composer .icon-button{width:44px;height:48px;color:var(--chatText)}
.composer .native-icon{width:24px;height:24px}
.composer textarea{background:var(--inputSurface);border-radius:16px;min-height:42px;line-height:23px;padding:9px 12px;font-size:max(16px,calc(var(--native-messageFont) * var(--native-fontScale)))}
.composer .primary{min-height:42px;height:42px;min-width:48px;border-radius:12px;margin:0 6px;font-weight:400;padding:8px;font-size:14px}
.emoji-panel{height:268px;padding:0 12px max(8px,var(--safe-bottom, env(safe-area-inset-bottom)));background:var(--surface);border:0;display:flex;flex-direction:column}
.emoji-tabs{order:2;min-height:44px;border:0;flex-shrink:0}
.emoji-items{flex:1;min-height:0;overflow-y:auto;align-content:start;grid-template-columns:repeat(8,1fr);gap:0;padding:8px 0}
.emoji-items button{height:42px;font-size:28px;min-height:42px}
.emoji-items.sticker-items{grid-template-columns:repeat(4,1fr)}
.sticker-items button{height:76px}
#app[data-screen=me]{background:var(--mePage)}
.profile{padding:48px 20px 30px 24px;background:transparent;width:100%;text-align:left;gap:16px}
.profile .avatar{width:var(--native-meAvatar);height:var(--native-meAvatar);border-radius:50%}
.profile>div:nth-child(2){flex:1;min-width:0}
.profile h2{font-size:22px;line-height:30px;color:var(--meText);font-weight:700}
.profile p{font-size:15px;margin-top:6px;color:var(--meSubtext)}
.profile>.native-icon{width:20px;height:20px;color:var(--meSubtext)}
.profile>.native-icon:last-child{width:10px;height:16px;margin-left:-10px}
.me-card{margin:0 16px 10px;border-radius:var(--native-meCardRadius);background:var(--meCard);overflow:hidden}
.me-row{display:flex;align-items:center;width:100%;height:56px;padding:0 16px;gap:14px;text-align:left;position:relative}
.me-row>span:not(.native-icon){flex:1;font-size:17px;color:var(--meText)}
.me-row .native-icon{width:24px;height:24px;color:var(--meIcon)}
.me-row .native-icon:last-child{width:10px;height:16px;color:var(--meChevron)}
.me-row+.me-row:before{position:absolute;left:54px;right:16px;top:0;height:1px;content:'';background:var(--meLine)}
.profile-hero{padding:24px;display:grid;place-items:center;background:var(--surface)}
.profile-hero .avatar{width:80px;height:80px}
.profile-row{padding:20px 16px;background:var(--surface);display:flex;justify-content:space-between;border-bottom:1px solid var(--border)}
.contact-list .conversation{min-height:64px;padding:10px 16px}
.member-list .conversation{min-height:var(--native-memberRow);padding:12px 16px}
.member-list .conversation-name{font-size:calc(15px * var(--native-fontScale))}
@media(prefers-reduced-motion:reduce){.message{animation:none}}
.avatar,.avatar.group-avatar{background:var(--avatarBackground);padding:0;letter-spacing:0;color:var(--surface)}
.avatar>.native-icon{width:100%;height:100%}
.profile{background:var(--meCard);margin-bottom:10px}
.profile-card{margin:12px 16px 0;background:var(--surface);border-radius:16px;overflow:hidden}
.profile-row{height:56px;padding:8px 16px;gap:12px;width:100%;font-size:calc(14px * var(--native-fontScale));border:0;position:relative;text-align:left}
.profile-row>span:first-child:not(.native-icon){flex:1}
.profile-row .avatar{width:48px;height:48px}
.profile-row .native-icon:last-child{width:12px;height:16px;color:var(--secondary)}
.profile-row+.profile-row:before{content:'';position:absolute;left:16px;right:16px;top:0;height:1px;background:var(--border)}
.profile-row:has(.avatar){height:76px}
.profile-row .muted{font-size:calc(14px * var(--native-fontScale));max-width:65%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.contact-list{margin:0 16px 8px;border-radius:16px;background:var(--surface);flex:none;max-height:calc(100% - 180px)}
.contact-shortcut{display:flex;gap:12px;align-items:center;width:100%;min-height:56px;padding:12px 16px;font-size:calc(14px * var(--native-fontScale));text-align:left}
.contact-shortcut>span:nth-child(2){flex:1}
.contact-shortcut .native-icon{width:20px;height:20px;color:var(--secondary)}
.contact-shortcut .native-icon:last-child{width:12px;height:16px}
#app[data-screen=friends]>.bottom-nav{margin-top:auto}
.member-list{margin:0 16px 12px}
.member-list .conversation{border-radius:16px;margin-bottom:1px}
.member-list .conversation>.native-icon:last-child{width:12px;height:16px;color:var(--secondary)}
.login .primary:disabled{opacity:.32}
.native-emoji img{width:32px;height:32px;object-fit:contain}
.inline-emoji{width:1.47em;height:1.47em;vertical-align:middle;object-fit:contain}
.pure-emoji .inline-emoji{width:48px;height:48px}
.pure-emoji .bubble{background:transparent;padding:0}
.pure-emoji .bubble:before,.pure-emoji .bubble-time{display:none}
.conversation-meta{display:flex;flex-direction:column;align-items:flex-end;gap:5px;align-self:stretch;min-width:34px}
.conversation-meta .badge{position:static;font-size:12px;min-height:18px;height:18px;line-height:18px;min-width:18px}
.conversation-meta .muted-dot{min-width:8px;min-height:8px;width:8px;height:8px;padding:0}
.continuation .sender{display:none}
.followed>.avatar{visibility:hidden}
.continuation{margin-top:3px}
.system-message{justify-content:center;margin:12px 0}
.system-message .avatar,.system-message .sender,.system-message .bubble-time{display:none}
.system-message .message-body{max-width:90%}
.system-message .bubble{background:transparent;color:var(--chatSecondary);font-size:12px;text-align:center;padding:0}
.system-message .bubble:before{display:none}
/* 系统提示行（安卓 content_notification.xml / iOS ChatMessageLayout .system）：上 10、下 4，左右 24；文字 12 号、次要色、居中、内边距 3；没有气泡和时间。 */
.message.system-notice-row{display:flex;justify-content:center;margin:0;padding:10px 24px 4px}
.message.system-notice-row.hidden{display:none}
.system-notice-row .message-body{max-width:100%;min-width:0;align-items:center}
.system-notice{padding:3px;font-size:calc(12px * var(--native-fontScale));line-height:1.4;color:var(--chatSecondary);text-align:center;white-space:pre-wrap;overflow-wrap:anywhere}

#app{position:fixed;left:0;right:0;top:var(--viewport-offset,0px)}
.keyboard-open{--safe-bottom:0px}
#app:before{content:'';position:absolute;left:0;right:0;top:0;height:var(--safe-top,env(safe-area-inset-top));background:var(--surface);pointer-events:none}
.nav-item{position:relative}
.nav-badge{left:52%;right:auto;top:4px;min-width:18px;height:18px;line-height:18px;font-size:11px}
.section-heading{background:var(--background);padding:12px 16px 6px;font-size:12px;color:var(--secondary);text-align:left}
.member-count{padding:0 0 8px;font-size:13px;color:var(--secondary)}
.member-list .conversation+.conversation:before{left:72px}
.contact-list .conversation{border-radius:0 0 16px 16px}
.member-list .conversation-main>.muted{display:inline-block;background:var(--soft);color:var(--primary);font-size:12px;padding:2px 6px;border-radius:4px;margin-top:4px}
.member-role{background:var(--soft);color:var(--primary);font-size:12px;padding:3px 8px;border-radius:4px;white-space:nowrap}
.pure-emoji .inline-emoji{width:var(--native-pureEmojiSize);height:var(--native-pureEmojiSize)}
.image-bubble{max-width:var(--native-imageMaxWidth);min-width:var(--native-imageMinEdge);min-height:0;border-radius:16px}
.image-bubble img{max-height:var(--native-imageMaxHeight);object-fit:cover}
.sender{color:var(--sender)}
.badge{background:var(--meMissedCall)}
.message-editor{background:var(--inputSurface);border-radius:16px;min-height:42px;max-height:120px;line-height:23px;padding:9px 12px;font-size:max(16px,calc(var(--native-messageFont) * var(--native-fontScale)));flex:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;overflow-y:auto;outline:none;color:var(--chatText);-webkit-user-select:text;user-select:text}
.message-editor:empty:before{content:attr(data-placeholder);color:var(--secondary);pointer-events:none}
.message-editor .inline-emoji{width:23px;height:23px;vertical-align:bottom}
.messages{padding-inline:0}
.message{gap:5px;margin-right:6px}
.message-body{max-width:calc(100% - 73px)}
.own .message-body,.chat:not(.group-chat) .message-body{max-width:calc(100% - 40px)}
.chat:not(.group-chat) .message{margin-left:6px}
.chat:not(.group-chat) .message>.avatar{display:none}
.bubble{padding:var(--native-messagePadding) var(--native-bubbleHorizontal)}
.sender{font-size:calc(var(--native-senderFont) * var(--native-fontScale));padding:6px var(--native-bubbleHorizontal) 0;border-radius:var(--native-bubbleRadius) var(--native-bubbleRadius) 0 0}
.bubble-time{font-size:calc(var(--native-messageTime) * var(--native-fontScale));margin-left:8px}
.continuation .bubble{border-top-left-radius:6px;border-top-right-radius:6px}
.pure-emoji .bubble{background:var(--surface);padding:var(--native-messagePadding) var(--native-bubbleHorizontal)}
.pure-emoji.own .bubble{background:var(--outgoing)}
.pure-emoji .bubble-time,.pure-emoji .bubble:before{display:block}
.composer .message-editor{font-size:16px}
/* ChatMessageLayout：正文最大 280（含左右 padding），气泡另有 6pt 尾部。 */
.message-body,.own .message-body,.chat:not(.group-chat) .message-body{max-width:min(var(--native-textBubbleMax),calc(100% - 73px))}
.own .message-body,.chat:not(.group-chat) .message-body{max-width:min(var(--native-textBubbleMax),calc(100% - 40px))}
.bubble{padding-right:16px;line-break:strict;word-break:normal}
#app[data-screen=chat]>.topbar,#app[data-screen=members]>.topbar,#app[data-screen=profile]>.topbar{height:var(--native-chatHeaderHeight);min-height:var(--native-chatHeaderHeight)}
.chat-detail{top:4px}
.bubble-time{color:var(--messageTimeInk)}
.own .bubble{color:var(--outgoingInk)}
.own .bubble-time{color:var(--ownMessageTimeInk)}
.skeleton-row{display:flex;align-items:center;gap:12px;padding:12px 16px;min-height:72px;background:var(--surface)}
.skeleton-avatar{width:44px;height:44px;flex-shrink:0;background:var(--skeleton);border-radius:50%}
.skeleton-line{height:14px;flex:0 1 80%;background:var(--skeleton);border-radius:4px}
.blank>.native-icon{width:48px;height:48px;color:var(--secondary)}
/* 第 0 阶段：浮动时间必须参与气泡高度，不能溢出短气泡。 */
.bubble{display:flow-root}
.back-unread{position:absolute;left:36px;top:50%;transform:translateY(-50%);min-width:20px;padding:0 5px;height:20px;line-height:20px;font-size:calc(12px * var(--native-fontScale));border-radius:12px;background:var(--primary);color:var(--surface);white-space:nowrap}
#app[data-screen=chat]>.topbar .heading{padding-left:88px;padding-right:48px}
.emoji-panel{position:relative;padding:0 0 var(--safe-bottom,env(safe-area-inset-bottom));background:var(--emojiPanelSurface)}
.emoji-content{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.emoji-heading{font-size:12px;color:var(--emojiPanelSectionTitle);padding:10px 16px 6px}
.emoji-items{overflow:visible;padding:0 12px 62px;min-height:0}
.emoji-tabs{order:initial;height:var(--native-emojiTabHeight);min-height:var(--native-emojiTabHeight);padding:0 8px;gap:4px;border-top:1px solid var(--emojiPanelSelected);display:flex;align-items:center;overflow-x:auto}
.emoji-tabs button{font-size:0;width:40px;height:40px;min-width:40px;min-height:40px;padding:6px;display:grid;place-items:center;border-radius:8px;background:none;color:var(--secondary)}
.emoji-tabs button.active{background:var(--emojiPanelSelected);color:var(--primary)}
.emoji-tabs img,.emoji-tabs .native-icon{width:28px;height:28px;object-fit:contain}
.emoji-actions{position:absolute;right:12px;bottom:calc(var(--native-emojiTabHeight) + 10px + var(--safe-bottom,env(safe-area-inset-bottom)));display:flex;gap:8px;height:var(--native-emojiActionHeight)}
.emoji-actions .icon-button{background:var(--emojiPanelSelected);color:var(--secondary);width:var(--native-emojiDeleteWidth);height:var(--native-emojiActionHeight);border-radius:12px}
.emoji-actions .primary{width:var(--native-emojiSendWidth);height:var(--native-emojiActionHeight);min-height:var(--native-emojiActionHeight);padding:0;border-radius:12px;font-size:14px;font-weight:400}
.empty-favorites{display:block;padding:24px 16px}
/* 好友：取自 ContactDetail / FriendSocial / AddFriend 的原生布局。 */
.social-page{padding:0 var(--native-friendGutter);background:var(--background)}
.social-page .profile-card{margin:0 0 12px;overflow:hidden;border-radius:14px}
.friend-hero{display:flex;align-items:center;gap:12px;padding:var(--native-friendGutter)}
.friend-hero .avatar{width:var(--native-friendAvatar);height:var(--native-friendAvatar);flex:0 0 var(--native-friendAvatar)}
.friend-identity{min-width:0;flex:1}.friend-identity h2{font-size:calc(var(--native-friendName) * var(--native-fontScale));font-weight:500;margin:0 0 6px;overflow-wrap:anywhere}
.friend-identity p{margin:4px 0;font-size:calc(13px * var(--native-fontScale));overflow-wrap:anywhere}
.friend-hero>.primary{font-size:14px;padding:0 10px;min-height:36px;white-space:nowrap}
.friend-search{display:flex;gap:8px;padding-top:16px}.friend-search .search{flex:1;min-width:0;margin:0;background:var(--surface);border-radius:28px;height:48px}
.friend-search .primary{border-radius:24px;min-height:36px;height:36px;align-self:center;padding:0 18px;font-size:14px}
.friend-help{font-size:calc(12px * var(--native-fontScale));padding:0 4px;line-height:1.6;overflow-wrap:anywhere}
.friend-search-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:55vh;font-size:13px;color:var(--secondary);gap:12px}
.friend-search-empty .native-icon{width:28px;height:28px}
.native-switch{width:52px;height:28px;border-radius:20px;background:var(--avatarBackground);display:inline-block;position:relative;flex-shrink:0}
.native-switch:before{content:'';position:absolute;width:24px;height:24px;top:2px;left:2px;border-radius:50%;background:var(--surface)}
.native-switch.on{background:var(--primary)}.native-switch.on:before{left:26px}
.social-form{padding:16px 0;display:flex;flex-direction:column;gap:12px}.social-form input,.social-form textarea{background:var(--surface);color:var(--text);border:0;border-radius:8px;padding:14px;font:inherit;width:100%;box-sizing:border-box}.social-form textarea{min-height:120px;resize:vertical}
.request-page{background:var(--surface)}.request-page .friend-hero{padding:32px 20px 24px;border-bottom:8px solid var(--background)}
.request-page .friend-hero .avatar{width:var(--native-friendDetailAvatar);height:var(--native-friendDetailAvatar);flex-basis:var(--native-friendDetailAvatar)}
.request-row{display:flex;width:100%;gap:12px;align-items:center;text-align:left;padding:16px;border-bottom:1px solid var(--border);background:var(--surface);color:var(--text)}
.request-row .avatar{flex-shrink:0}.request-row p{margin:6px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.request-status{color:var(--secondary);font-size:12px;max-width:64px;flex-shrink:0}
.request-body{padding:20px;font-size:calc(13px * var(--native-fontScale));border-bottom:8px solid var(--background)}
.request-message{background:var(--emojiPanelSurface);border-radius:6px;padding:14px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:calc(15px * var(--native-fontScale))}
.request-actions{display:flex;justify-content:center;gap:24px;padding:8px 0 4px}.request-actions button{width:var(--native-friendActionWidth);height:var(--native-friendActionHeight);min-height:var(--native-friendActionHeight);padding:0;font-size:14px;border-radius:12px}.request-actions .quiet{background:var(--emojiPanelSelected);color:var(--text)}
#app[data-screen=social]{background:var(--background)}
#app[data-screen=social]>.topbar{background:var(--background);height:56px;min-height:56px}
.social-page .friend-search input{font-size:calc(15px * var(--native-fontScale));font-weight:400}
.social-page .friend-search .primary{font-weight:400}.social-page .friend-search .primary:disabled{background:var(--soft);color:var(--secondary);opacity:1}
.friend-help{margin:16px 0}.friend-search-empty{min-height:calc(var(--viewport-height) - 240px)}
.social-page .profile-row{align-items:center;font-size:calc(16px * var(--native-fontScale));height:52px}
.social-page .profile-row>.native-icon:first-child{color:var(--secondary);width:20px;height:20px}
.social-page .profile-row>.native-icon:first-child+span{flex:1}
.social-page .section-heading{margin:12px 0;padding:0;color:var(--secondary);font-size:calc(13px * var(--native-fontScale));font-weight:400;background:none}
.friend-identity h2{font-weight:400}.friend-identity p{font-size:calc(13px * var(--native-fontScale));line-height:1.2}
.toolbar-save{position:absolute;right:8px;min-height:32px;height:32px;padding:0 20px;border-radius:20px;font-weight:400;font-size:calc(14px * var(--native-fontScale))}
.remark-identity{display:flex;align-items:center;gap:12px;padding:12px 16px;margin-top:16px!important;min-height:80px}
.remark-identity .avatar{width:44px;height:44px}.remark-form{border-radius:14px;background:var(--surface);padding:12px 16px;gap:12px}
.remark-form input{border:1px solid var(--secondary);background:var(--emojiPanelSurface);border-radius:10px;font-size:calc(16px * var(--native-fontScale));height:48px}
.field-caption{display:flex;justify-content:space-between;align-items:center}.field-caption .muted,.remark-form p{font-size:calc(13px * var(--native-fontScale));margin:0}
.social-confirm{border:0;border-radius:16px;background:var(--surface);color:var(--text);width:calc(100% - 64px);max-width:360px;padding:20px;line-height:1.6}.social-confirm::backdrop,.ui-layer:has(>.social-confirm)>.layer-scrim{background:color-mix(in srgb,var(--text) 35%,transparent)}
#app[data-screen=social]>.request-header{background:var(--surface)}
.verification-form{background:var(--surface);padding:8px 20px 12px;font-size:calc(14px * var(--native-fontScale));border-bottom:8px solid var(--background)}
.verification-field{border:1px solid var(--border);border-radius:8px;background:var(--emojiPanelSurface);padding:12px}
.verification-field textarea{display:block;width:100%;min-height:88px;border:0;padding:0;resize:none;font:inherit;color:var(--text);background:transparent}
.verification-field p{text-align:right;font-size:calc(13px * var(--native-fontScale));margin:8px 0 0}
.request-page{background:var(--background)}.request-page .friend-hero,.request-body{background:var(--surface)}
.request-page .friend-hero{padding-top:24px}
.verification-form{padding-top:16px;padding-bottom:20px}.verification-form>p{margin:8px 0 16px}.verification-form>p:last-child{margin:16px 0 0}

/* Native group pages use gp_toolbar_height; contact pickers keep their own header. */
.topbar.group-header{height:var(--native-groupToolbarHeight);min-height:var(--native-groupToolbarHeight)}

.topbar.group-picker-header{height:var(--native-groupPickerToolbarHeight);min-height:var(--native-groupPickerToolbarHeight)}

.emoji-actions .primary{font-size:calc(var(--native-emojiActionFont) * var(--native-fontScale))}
.emoji-actions .primary:disabled{opacity:1;background:var(--primary);color:var(--emojiSendDisabledInk)}
.emoji-actions .icon-button{color:var(--text)}
.emoji-actions .icon-button:disabled{opacity:1}

/* ChatEmojiPanel：基础表情与大贴纸各自约束图片，不依赖原图固有尺寸。 */
.emoji-items:not(.sticker-items){grid-template-columns:repeat(var(--native-emojiColumns),minmax(0,1fr));grid-auto-rows:var(--native-emojiRow);row-gap:var(--native-emojiRowGap);padding:0 var(--native-emojiGutter) var(--native-emojiContentBottom)}
.emoji-items:not(.sticker-items) button{height:var(--native-emojiRow);min-height:0;min-width:0;display:grid;place-items:center;padding:0}
.emoji-items.native-emoji img{width:var(--native-emojiImage);height:var(--native-emojiImage);max-width:100%;object-fit:contain}
.emoji-items.sticker-items{grid-template-columns:repeat(var(--native-stickerColumns),minmax(0,1fr));grid-auto-rows:var(--native-stickerRow);gap:var(--native-stickerRowGap) var(--native-stickerGap);padding:0 var(--native-stickerGutter) var(--native-stickerGutter)}
.emoji-items.sticker-items button{height:var(--native-stickerRow);min-height:0;min-width:0;padding:0;display:grid;place-items:center;overflow:hidden}
.emoji-items.sticker-items img{display:block;width:var(--native-stickerImage);height:var(--native-stickerImage);max-width:100%;max-height:100%;object-fit:contain}
.emoji-tabs button{width:var(--native-emojiTabWidth);min-width:var(--native-emojiTabWidth);flex:0 0 var(--native-emojiTabWidth)}
.emoji-tabs img,.emoji-tabs .native-icon{width:var(--native-emojiTabImage);height:var(--native-emojiTabImage)}

/* 手机横屏仍使用全屏布局，刘海左右安全区只约束内容，背景铺满。 */
@media (hover:none), (pointer:coarse){
 #app{max-width:none;margin:0;border:0;border-radius:0;box-shadow:none;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
 body{background:var(--navigationBackground,var(--surface))}
}

.emoji-heading{font-size:calc(var(--native-emojiTitleFont) * var(--native-fontScale));padding:var(--native-emojiTitleTop) var(--native-emojiTitleGutter) var(--native-emojiTitleBottom)}
.emoji-content:has(.sticker-items) .emoji-heading{padding-bottom:var(--native-stickerTitleBottom)}

/* ChatAttachmentButton 与 panelGrid：只显示本批已实现的相册，保留原生格子和面板几何。 */
.attachment-panel{display:grid;grid-template-columns:repeat(var(--native-attachmentColumns),minmax(0,1fr));gap:var(--native-attachmentGap);height:calc(var(--native-attachmentPanelHeight) + var(--safe-bottom,env(safe-area-inset-bottom)));max-height:calc(var(--viewport-height,100dvh) - var(--safe-top,env(safe-area-inset-top)) - var(--native-chatHeaderHeight) - var(--native-composerHeight));flex-shrink:0;align-content:start;grid-auto-rows:var(--native-attachmentRow);padding:var(--native-attachmentGutter) var(--native-attachmentGutter) calc(var(--native-attachmentGutter) + var(--safe-bottom,env(safe-area-inset-bottom)));overflow-y:auto;background:var(--attachmentSurface)}
.attachment-item{display:flex;flex-direction:column;align-items:center;background:none;font:inherit;min-width:0;justify-content:flex-start;gap:var(--native-attachmentLabelGap);color:var(--secondary);font-size:calc(var(--native-attachmentText) * var(--native-fontScale));padding:0}
.attachment-tile{width:var(--native-attachmentIcon);height:var(--native-attachmentIcon);display:grid;place-items:center;background:var(--attachmentTile);border-radius:var(--native-attachmentRadius)}
.attachment-item .native-icon{width:var(--native-attachmentGlyph);height:var(--native-attachmentGlyph);padding:0;background:var(--attachmentInk);border-radius:0}
.chat:has(.attachment-panel:not(.hidden)) .composer{padding-bottom:4px}
/* 横屏安全区只限制内容；栏背景沿左右真实安全区延伸至屏幕边缘。 */
.topbar{--edge-background:var(--navigationBackground,var(--surface))}
.bottom-nav,.composer{--edge-background:var(--surface)}
.emoji-panel{--edge-background:var(--emojiPanelSurface)}
.attachment-panel{--edge-background:var(--attachmentSurface)}
@media (hover:none), (pointer:coarse){
 .topbar,.bottom-nav,.composer,.emoji-panel,.attachment-panel{box-shadow:calc(-1 * env(safe-area-inset-left)) 0 0 var(--edge-background),env(safe-area-inset-right) 0 0 var(--edge-background)}
}
/* 群头像拼图（安卓 BojinGroupAvatar.Mosaic）：2×2、每格一半、没有间距；整块外圈裁一次圆，单格方形不裁圆；不到 4 人的空格留空（没有底色）。 */
.avatar.avatar-mosaic{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:0;overflow:hidden;background:transparent;padding:0;place-items:stretch}
.avatar-mosaic>.mosaic-cell{display:flex;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;border-radius:0;margin:0;background:var(--avatarBackground);color:var(--surface)}
.avatar-mosaic>.mosaic-cell>img{width:100%;height:100%;object-fit:cover;border-radius:0}
.avatar-mosaic>.mosaic-cell>.native-icon,.avatar-mosaic>.mosaic-cell>svg{width:100%;height:100%;color:var(--surface)}
.avatar-viewer-stage>.avatar-full.avatar-mosaic,.contact-avatar-frame>.avatar-full.avatar-mosaic{width:min(100%,100vh);height:auto;aspect-ratio:1;display:grid;border-radius:0}
