/* ================================================================
   经典绿白全局主题（内部兼容主题 id: wechat）
   - 主题作用域：body.theme-wechat
   - 聊天壁纸/全局壁纸由现有美化系统管理，本文件不写死图片
   - 用户自定义 CSS 会被运行时移动到本文件之后，继续拥有最终覆盖权
   ================================================================ */

/* 主题卡片预览（无主题作用域，保证未选中时也能看到） */
.theme-preview-wechat {
    background: #ededed;
}
.theme-preview-wechat .tp-nav {
    background: #e9e9e9;
    border: 0;
    border-bottom: 1px solid #d8d8d8;
    border-radius: 1px;
    box-shadow: none;
}
.theme-preview-wechat .tp-content {
    justify-content: center;
    padding: 4px 2px;
}
.theme-preview-wechat .tp-card {
    flex: 0 0 20px;
    width: 62%;
    border: 0;
    border-radius: 3px;
    box-shadow: none;
    position: relative;
}
.theme-preview-wechat .tp-card::after {
    content: '';
    position: absolute;
    top: 6px;
    width: 0;
    height: 0;
    border-style: solid;
}
.theme-preview-wechat .tp-wechat-left {
    align-self: flex-start;
    background: #fff;
}
.theme-preview-wechat .tp-wechat-left::after {
    left: -4px;
    border-width: 4px 5px 4px 0;
    border-color: transparent #fff transparent transparent;
}
.theme-preview-wechat .tp-wechat-right {
    align-self: flex-end;
    background: #95ec69;
}
.theme-preview-wechat .tp-wechat-right::after {
    right: -4px;
    border-width: 4px 0 4px 5px;
    border-color: transparent transparent transparent #95ec69;
}
.theme-preview-wechat .tp-bar {
    background: #f7f7f7;
    border: 0;
    border-top: 1px solid #dadada;
    border-radius: 1px;
    box-shadow: none;
}

/* -------------------- 基础色与通用控件 -------------------- */
body.theme-wechat {
    --primary: #07c160;
    --red: #fa5151;
    --text-main: #191919;
    --text-sub: #888888;
    --chat-nav-bg: #ededed;
    --chat-nav-border: 1px solid #d8d8d8;
    --chat-nav-shadow: none;
    --chat-nav-color: #181818;
    --chat-nav-icon-color: #181818;
    --chat-nav-font-weight: 600;
    --chat-nav-font-size: 17px;
    --chat-input-bg: #f7f7f7;
    --chat-input-border: 1px solid #d7d7d7;
    --chat-input-shadow: none;
    color: #191919;
}

:where(body.theme-wechat) .layer > .nav-bar,
:where(body.theme-wechat) .page > .nav-bar,
:where(body.theme-wechat) .api-settings-layer > .nav-bar {
    background: #ededed !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid #d8d8d8 !important;
    box-shadow: none !important;
    color: #181818 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
:where(body.theme-wechat) .nav-bar .nav-title,
:where(body.theme-wechat) .nav-title {
    color: #181818 !important;
    font-family: inherit !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}
:where(body.theme-wechat) .nav-bar .nav-icon,
:where(body.theme-wechat) .nav-icon {
    color: #181818 !important;
    text-shadow: none !important;
}
:where(body.theme-wechat) .nav-bar .nav-icon i {
    filter: none !important;
}

/* 紧凑型开关 */
:where(body.theme-wechat) .switch .slider,
:where(body.theme-wechat) .fb-toggle-bg {
    background: #c8c8c8 !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) .switch .slider::before,
:where(body.theme-wechat) .fb-toggle-dot {
    background: #fff !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.22) !important;
}
:where(body.theme-wechat) .switch input:checked + .slider,
:where(body.theme-wechat) .fb-toggle-switch input:checked ~ .fb-toggle-bg {
    background: #07c160 !important;
}

/* 常用输入控件，不干预游戏等特殊画面 */
:where(body.theme-wechat) #layer-settings input[type="text"],
:where(body.theme-wechat) #layer-settings input[type="number"],
:where(body.theme-wechat) #layer-settings input[type="url"],
:where(body.theme-wechat) #layer-settings input[type="password"],
:where(body.theme-wechat) #layer-settings input[type="date"],
:where(body.theme-wechat) #layer-settings textarea,
:where(body.theme-wechat) #layer-settings select,
:where(body.theme-wechat) #layer-beauty input[type="text"],
:where(body.theme-wechat) #layer-beauty input[type="number"],
:where(body.theme-wechat) #layer-beauty input[type="url"],
:where(body.theme-wechat) #layer-beauty textarea,
:where(body.theme-wechat) #layer-beauty select,
:where(body.theme-wechat) .api-settings-layer input:not([type]),
:where(body.theme-wechat) .api-settings-layer input[type="text"],
:where(body.theme-wechat) .api-settings-layer input[type="number"],
:where(body.theme-wechat) .api-settings-layer input[type="url"],
:where(body.theme-wechat) .api-settings-layer input[type="password"],
:where(body.theme-wechat) .api-settings-layer input[type="date"],
:where(body.theme-wechat) .api-settings-layer input[type="time"],
:where(body.theme-wechat) .api-settings-layer input[type="email"],
:where(body.theme-wechat) .api-settings-layer textarea,
:where(body.theme-wechat) .api-settings-layer select {
    background: #fff !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 5px !important;
    box-shadow: none !important;
    color: #191919 !important;
    font-family: inherit !important;
}
:where(body.theme-wechat) #layer-settings input:focus,
:where(body.theme-wechat) #layer-settings textarea:focus,
:where(body.theme-wechat) #layer-settings select:focus,
:where(body.theme-wechat) #layer-beauty input:focus,
:where(body.theme-wechat) #layer-beauty textarea:focus,
:where(body.theme-wechat) #layer-beauty select:focus,
:where(body.theme-wechat) .api-settings-layer input:not([type]):focus,
:where(body.theme-wechat) .api-settings-layer input[type="text"]:focus,
:where(body.theme-wechat) .api-settings-layer input[type="number"]:focus,
:where(body.theme-wechat) .api-settings-layer input[type="url"]:focus,
:where(body.theme-wechat) .api-settings-layer input[type="password"]:focus,
:where(body.theme-wechat) .api-settings-layer input[type="date"]:focus,
:where(body.theme-wechat) .api-settings-layer input[type="time"]:focus,
:where(body.theme-wechat) .api-settings-layer input[type="email"]:focus,
:where(body.theme-wechat) .api-settings-layer textarea:focus,
:where(body.theme-wechat) .api-settings-layer select:focus {
    border-color: #07c160 !important;
    outline: none !important;
    box-shadow: 0 0 0 1px rgba(7,193,96,.12) !important;
}
:where(body.theme-wechat) input[type="range"] {
    accent-color: #07c160;
}

/* 通用弹窗/底部面板：只改外壳与常用按钮，不重排具体功能 */
:where(body.theme-wechat) .modal-mask,
:where(body.theme-wechat) .unified-panel-mask,
:where(body.theme-wechat) .settings-sheet-mask {
    background: rgba(0,0,0,.45) !important;
}
:where(body.theme-wechat) .modal-box,
:where(body.theme-wechat) .unified-panel,
:where(body.theme-wechat) .settings-sheet,
:where(body.theme-wechat) .contact-action-modal .modal-box {
    background: #f7f7f7 !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 34px rgba(0,0,0,.2) !important;
    color: #191919 !important;
}
:where(body.theme-wechat) .settings-sheet {
    border-radius: 12px 12px 0 0 !important;
}
:where(body.theme-wechat) .unified-panel-header,
:where(body.theme-wechat) .settings-sheet-header {
    background: #f7f7f7 !important;
    border-bottom: 1px solid #dedede !important;
}
:where(body.theme-wechat) .settings-group,
:where(body.theme-wechat) .unified-group {
    background: #fff !important;
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) .settings-row + .settings-row,
:where(body.theme-wechat) .unified-row + .unified-row {
    border-top-color: #ededed !important;
}
:where(body.theme-wechat) .settings-sheet-close,
:where(body.theme-wechat) .unified-panel-close {
    background: #e5e5e5 !important;
    border: 0 !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) .settings-sheet-done,
:where(body.theme-wechat) .settings-style-add-btn,
:where(body.theme-wechat) .beauty-action-btn,
:where(body.theme-wechat) .full-btn {
    background: #07c160 !important;
    border: 1px solid #06ad56 !important;
    border-radius: 5px !important;
    box-shadow: none !important;
    color: #fff !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}
:where(body.theme-wechat) .beauty-action-btn.reset,
:where(body.theme-wechat) .beauty-action-btn.preset {
    background: #fff !important;
    border-color: #d7d7d7 !important;
    color: #333 !important;
}
:where(body.theme-wechat) .beauty-action-btn[style*="#fa5151"],
:where(body.theme-wechat) .full-btn[style*="#fa5151"] {
    background: #fa5151 !important;
    border-color: #e64848 !important;
    color: #fff !important;
}

/* -------------------- 聊天首页 / 会话列表 -------------------- */
:where(body.theme-wechat) #layer-wechat {
    background: #ededed !important;
    color: #191919 !important;
}
:where(body.theme-wechat) #tab-contacts:not(.gwp-has-wallpaper),
:where(body.theme-wechat) #tab-contacts:not(.gwp-has-wallpaper) #contact-list {
    background: #fff !important;
    background-image: none !important;
}
:where(body.theme-wechat) #tab-contacts.gwp-has-wallpaper,
:where(body.theme-wechat) #tab-contacts.gwp-has-wallpaper #contact-list {
    background-color: transparent !important;
}
:where(body.theme-wechat) #tab-contacts > .nav-bar {
    height: 54px !important;
    padding: 0 10px !important;
}
:where(body.theme-wechat) #tab-contacts > .nav-bar .nav-title {
    font-size: 0 !important;
}
:where(body.theme-wechat) #tab-contacts > .nav-bar .nav-title::after {
    content: '聊天';
    font-size: 18px;
    font-weight: 600;
    color: #181818;
}
:where(body.theme-wechat) #tab-contacts > .nav-bar .nav-icon {
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 9px !important;
    font-size: 21px !important;
}
:where(body.theme-wechat) #contact-list {
    padding-top: 54px !important;
    padding-bottom: calc(68px + var(--yan-safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
}
:where(body.theme-wechat) #contact-list .cg-body {
    background: transparent !important;
}
:where(body.theme-wechat) #contact-list .list-item {
    min-height: 76px !important;
    padding: 10px 16px !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid #ededed !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}
:where(body.theme-wechat) #contact-list .list-item[style*="background"] {
    background: #f4f4f4 !important;
}
:where(body.theme-wechat) #tab-contacts.gwp-has-wallpaper #contact-list .list-item {
    background: rgba(255,255,255,.9) !important;
}
:where(body.theme-wechat) #contact-list .list-item:active {
    background: #e9e9e9 !important;
}
:where(body.theme-wechat) #contact-list .list-item .avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border: 0 !important;
    border-radius: 5px !important;
    box-shadow: none !important;
    filter: none !important;
}
:where(body.theme-wechat) #contact-list .list-content {
    min-width: 0 !important;
    margin-left: 12px !important;
}
:where(body.theme-wechat) #contact-list .list-title {
    min-width: 0;
    color: #191919 !important;
    font-family: inherit !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    line-height: 23px !important;
}
:where(body.theme-wechat) #contact-list .contact-list-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
:where(body.theme-wechat) #contact-list .list-sub {
    margin-top: 4px !important;
    color: #b2b2b2 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 20px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.contact-list-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    padding-left: 8px;
    flex-shrink: 0;
}
.contact-list-time {
    display: none;
}
:where(body.theme-wechat) #contact-list .contact-list-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    padding-left: 8px;
    flex-shrink: 0;
}
:where(body.theme-wechat) #contact-list .contact-list-time {
    display: inline !important;
    color: #b2b2b2 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 20px;
    white-space: nowrap;
}
:where(body.theme-wechat) #contact-list .fa-thumbtack,
:where(body.theme-wechat) #contact-list .fa-users {
    color: #b2b2b2 !important;
    font-size: 11px !important;
}
:where(body.theme-wechat) #contact-list .unread-badge {
    top: -6px !important;
    right: -7px !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    background: #fa5151 !important;
    border: 1.5px solid #fff !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font-size: 11px !important;
}
:where(body.theme-wechat) #contact-list .cg-header {
    min-height: 34px !important;
    padding: 0 16px !important;
    background: #ededed !important;
    border: 0 !important;
    color: #888 !important;
    font-size: 12px !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) #contact-list .cg-manage-btn {
    margin: 8px 0 !important;
    padding: 13px 16px !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #576b95 !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) #contact-search-bar {
    top: 54px !important;
    background: #ededed !important;
    border-bottom: 1px solid #d8d8d8;
}
:where(body.theme-wechat) #contact-search-bar > div > div {
    border-radius: 5px !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) #contact-search-results {
    background: #fff !important;
}

/* 添加联系人/群聊弹窗保持原功能，仅换成绿白主题菜单 */
:where(body.theme-wechat) #wx-add-menu {
    background: #4c4c4c !important;
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: 0 5px 18px rgba(0,0,0,.26) !important;
    color: #fff !important;
}
:where(body.theme-wechat) #wx-add-menu .add-item {
    color: #fff !important;
    border-bottom-color: rgba(255,255,255,.12) !important;
}
:where(body.theme-wechat) #wx-add-menu .add-item i {
    color: #fff !important;
}

/* -------------------- 聊天底部导航与“我的” -------------------- */
html body.theme-wechat #layer-wechat > .wx-tab-bar {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: calc(56px + var(--yan-safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
    margin: 0 !important;
    padding: 0 0 var(--yan-safe-bottom, env(safe-area-inset-bottom, 0px)) !important;
    transform: none !important;
    background: rgba(247,247,247,.98) !important;
    border: 0 !important;
    border-top: 1px solid #d8d8d8 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab {
    height: 56px !important;
    padding: 4px 0 3px !important;
    gap: 1px !important;
    color: #191919 !important;
    font-size: 0 !important;
    font-weight: 500 !important;
}
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab i {
    display: none !important;
}
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab::before {
    content: '';
    display: block;
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    background-color: currentColor;
}
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab:nth-child(1)::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5h16v11H9l-5 3v-14z' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5h16v11H9l-5 3v-14z' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab:nth-child(2)::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='m15.5 8.5-2.2 4.8-4.8 2.2 2.2-4.8 4.8-2.2z' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='m15.5 8.5-2.2 4.8-4.8 2.2 2.2-4.8 4.8-2.2z' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab:nth-child(3)::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='3.2' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M5.5 20c.6-4 3-6 6.5-6s5.9 2 6.5 6' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='3.2' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M5.5 20c.6-4 3-6 6.5-6s5.9 2 6.5 6' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab.active,
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab.active i {
    color: #07c160 !important;
}
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab span {
    font-size: 0 !important;
    line-height: 14px;
}
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab span::after {
    font-size: 11px;
    color: currentColor;
}
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab:nth-child(1) span::after { content: '聊天'; }
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab:nth-child(2) span::after { content: '动态'; }
:where(body.theme-wechat) #layer-wechat > .wx-tab-bar .nav-tab:nth-child(3) span::after { content: '我的'; }

:where(body.theme-wechat) #tab-me {
    padding-top: 0 !important;
    background: #ededed !important;
}
:where(body.theme-wechat) #tab-me > .scroll-y {
    background: #ededed !important;
    background-image: none !important;
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
}
:where(body.theme-wechat) #tab-me.gwp-has-wallpaper,
:where(body.theme-wechat) #tab-me.gwp-has-wallpaper > .scroll-y {
    background-color: transparent !important;
}
:where(body.theme-wechat) #tab-me .scroll-y::before,
:where(body.theme-wechat) #tab-me .scroll-y::after,
:where(body.theme-wechat) #tab-me .group-box::before,
:where(body.theme-wechat) #tab-me .group-box::after {
    content: none !important;
    display: none !important;
}
:where(body.theme-wechat) #tab-me > .scroll-y > div:first-child {
    min-height: 150px !important;
    margin: 0 0 8px !important;
    padding: 36px 24px 28px !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}
:where(body.theme-wechat) #tab-me.gwp-has-wallpaper > .scroll-y > div:first-child {
    background: rgba(255,255,255,.9) !important;
}
:where(body.theme-wechat) #tab-me #my-avatar {
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    min-height: 70px !important;
    max-width: 70px !important;
    max-height: 70px !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    filter: none !important;
}
:where(body.theme-wechat) #tab-me #my-name {
    margin-bottom: 11px !important;
    color: #191919 !important;
    font-family: inherit !important;
    font-size: 21px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}
:where(body.theme-wechat) #tab-me #my-wxid,
:where(body.theme-wechat) #tab-me #my-name + p {
    color: #888 !important;
    font-size: 14px !important;
}
:where(body.theme-wechat) #tab-me > .scroll-y > div:first-child .fa-chevron-right {
    color: #b2b2b2 !important;
    font-size: 18px !important;
}
:where(body.theme-wechat) #tab-me .group-box {
    margin: 0 0 8px !important;
    padding: 0 !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    transform: none !important;
}
:where(body.theme-wechat) #tab-me.gwp-has-wallpaper .group-box {
    background: rgba(255,255,255,.9) !important;
}
:where(body.theme-wechat) #tab-me .list-item,
:where(body.theme-wechat) #tab-me .form-cell {
    min-height: 58px !important;
    padding: 10px 20px !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid #ededed !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) #tab-me .list-item:last-child,
:where(body.theme-wechat) #tab-me .form-cell:last-child {
    border-bottom: 0 !important;
}
:where(body.theme-wechat) #tab-me .list-item:active {
    background: rgba(0,0,0,.055) !important;
}
:where(body.theme-wechat) #tab-me .list-item::after {
    content: '›';
    margin-left: 10px;
    color: #b2b2b2;
    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
}
:where(body.theme-wechat) #tab-me .list-content {
    margin-left: 15px !important;
}
:where(body.theme-wechat) #tab-me .list-title,
:where(body.theme-wechat) #tab-me .form-label {
    color: #191919 !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}
:where(body.theme-wechat) #tab-me .list-sub {
    color: #888 !important;
    font-family: inherit !important;
    font-size: 13px !important;
}
:where(body.theme-wechat) #tab-me .list-item > i {
    width: 26px !important;
    margin-right: 0 !important;
    background: none !important;
    font-size: 23px !important;
    filter: none !important;
}
:where(body.theme-wechat) #tab-me .list-item > .fa-wallet { color: #07c160 !important; }
:where(body.theme-wechat) #tab-me .list-item > .fa-bookmark { color: #f5a623 !important; }
:where(body.theme-wechat) #tab-me .list-item > .fa-layer-group,
:where(body.theme-wechat) #tab-me .list-item > .fa-address-book,
:where(body.theme-wechat) #tab-me .list-item > .fa-id-badge { color: #10aeff !important; }
:where(body.theme-wechat) #tab-me .list-item > .fa-smile { color: #f5b400 !important; }
:where(body.theme-wechat) #tab-me .list-item > .fa-music { color: #fa5151 !important; }
:where(body.theme-wechat) #tab-me .list-item > .fa-book-reader { color: #07c160 !important; }
:where(body.theme-wechat) #tab-me .list-item > .fa-dice { color: #ff7a45 !important; }
:where(body.theme-wechat) #tab-me .list-item > .fa-ticket-alt { color: #10aeff !important; }
:where(body.theme-wechat) #tab-me .group-box:last-child .list-item:nth-child(1) > i { color: #f5a623 !important; }
:where(body.theme-wechat) #tab-me .group-box:last-child .list-item:nth-child(2) > i { color: #10aeff !important; }
:where(body.theme-wechat) #tab-me .group-box:last-child .list-item:nth-child(3) > i { color: #576b95 !important; }
:where(body.theme-wechat) #tab-me .group-box:last-child .list-item:nth-child(4) > i { color: #f5b400 !important; }
:where(body.theme-wechat) #tab-me .group-box:last-child .list-item:nth-child(5) > i { color: #fa5151 !important; }
:where(body.theme-wechat) #tab-me .group-box:last-child .list-item:nth-child(6) > i { color: #07c160 !important; }
:where(body.theme-wechat) #tab-me .group-box:last-child .list-item:nth-child(7) > i { color: #ff7a45 !important; }
:where(body.theme-wechat) #tab-me .group-box:last-child .list-item:nth-child(8) > i { color: #10aeff !important; }

/* 朋友圈保留现有封面功能，只统一滚动后的导航色 */
:where(body.theme-wechat) #tab-moments.moments-scrolled > .nav-bar,
:where(body.theme-wechat) #tab-moments.moments-scrolled .nav-bar {
    background: #ededed !important;
    border-bottom: 1px solid #d8d8d8 !important;
}

/* -------------------- 聊天详情 -------------------- */
:where(body.theme-wechat) #layer-chat {
    background-color: #ededed !important;
}
:where(body.theme-wechat) #chat-history:not(.has-custom-bg) {
    background-color: #ededed !important;
    background-image: none !important;
}
:where(body.theme-wechat) #chat-history.has-custom-bg {
    background-color: transparent !important;
}
:where(body.theme-wechat):not(.has-custom-global-css) #layer-chat > .nav-bar#chat-nav-bar {
    height: 54px !important;
    padding: 0 8px !important;
    background: var(--chat-nav-bg, #ededed) !important;
    border: 0 !important;
    border-bottom: var(--chat-nav-border, 1px solid #d8d8d8) !important;
    box-shadow: var(--chat-nav-shadow, none) !important;
}
:where(body.theme-wechat):not(.has-custom-global-css) #layer-chat > .nav-bar#chat-nav-bar .nav-title {
    color: var(--chat-nav-color, #181818) !important;
    font-family: var(--chat-nav-font, inherit) !important;
    font-size: var(--chat-nav-font-size, 17px) !important;
    font-weight: var(--chat-nav-font-weight, 600) !important;
    letter-spacing: 0 !important;
}
:where(body.theme-wechat):not(.has-custom-global-css) #layer-chat > .nav-bar#chat-nav-bar .nav-icon {
    min-width: 44px !important;
    height: 44px !important;
    padding: 10px !important;
    color: var(--chat-nav-icon-color, #181818) !important;
    font-size: 21px !important;
}
:where(body.theme-wechat):not(.has-custom-global-css) #layer-chat > .nav-bar#chat-nav-bar > .nav-icon:first-child {
    transform: translateX(-5px) !important;
}
:where(body.theme-wechat):not(.has-custom-global-css) #layer-chat > .nav-bar#chat-nav-bar > .nav-icon:first-child i,
:where(body.theme-wechat):not(.has-custom-global-css) #layer-chat > .nav-bar#chat-nav-bar > .nav-icon:last-child i {
    display: none !important;
}
:where(body.theme-wechat):not(.has-custom-global-css) #layer-chat > .nav-bar#chat-nav-bar > .nav-icon:first-child::before,
:where(body.theme-wechat):not(.has-custom-global-css) #layer-chat > .nav-bar#chat-nav-bar > .nav-icon:last-child::before {
    content: '';
    display: block;
    width: 22px;
    height: 22px;
    background-color: currentColor;
}
:where(body.theme-wechat):not(.has-custom-global-css) #layer-chat > .nav-bar#chat-nav-bar > .nav-icon:first-child::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 4 7 12l8 8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 4 7 12l8 8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
:where(body.theme-wechat):not(.has-custom-global-css) #layer-chat > .nav-bar#chat-nav-bar > .nav-icon:last-child::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='5' cy='12' r='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='19' cy='12' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='5' cy='12' r='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='19' cy='12' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
:where(body.theme-wechat) #layer-chat .msg-row {
    gap: 10px !important;
    padding: 5px 12px !important;
    margin-bottom: var(--bubble-gap, 0px) !important;
}
:where(body.theme-wechat) #layer-chat .msg-row .avatar {
    width: var(--avatar-size, 40px) !important;
    height: var(--avatar-size, 40px) !important;
    min-width: var(--avatar-size, 40px) !important;
    min-height: var(--avatar-size, 40px) !important;
    border: 0 !important;
    border-radius: var(--avatar-radius, 5px) !important;
    box-shadow: none !important;
    filter: none !important;
}
:where(body.theme-wechat) #layer-chat .bubble {
    max-width: var(--bubble-size, min(200px, calc(100vw - 108px))) !important;
    min-height: 28px !important;
    padding: var(--bubble-padding, 5px) !important;
    border-radius: 2px !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #191919 !important;
    font-family: inherit !important;
    font-size: var(--bubble-font-size, 12px) !important;
    line-height: var(--bubble-spacing, 1.45) !important;
}
:where(body.theme-wechat) #layer-chat .msg-row:not(.me) .bubble {
    background: #fff !important;
    border: var(--bubble-border-other, none) !important;
}
:where(body.theme-wechat) #layer-chat .msg-row.me .bubble {
    background: #95ec69 !important;
    border: var(--bubble-border-me, none) !important;
    color: #191919 !important;
}
:where(body.theme-wechat) #layer-chat .msg-row:not(.me) .bubble::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 8px !important;
    left: -6px !important;
    right: auto !important;
    width: 0 !important;
    height: 0 !important;
    border-style: solid !important;
    border-width: 6px 8px 6px 0 !important;
    border-color: transparent #fff transparent transparent !important;
    background: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
}
:where(body.theme-wechat) #layer-chat .msg-row:not(.me) .bubble::after {
    content: none !important;
    display: none !important;
}
:where(body.theme-wechat) #layer-chat .msg-row.me .bubble::before {
    content: none !important;
    display: none !important;
}
:where(body.theme-wechat) #layer-chat .msg-row.me .bubble::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 8px !important;
    right: -6px !important;
    left: auto !important;
    width: 0 !important;
    height: 0 !important;
    border-style: solid !important;
    border-width: 6px 0 6px 8px !important;
    border-color: transparent transparent transparent #95ec69 !important;
    background: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
}
/* 只有语音转文字附属气泡不绘制尖角；普通主气泡始终保留无缝尖角。 */
:where(body.theme-wechat) #layer-chat .voice-transcription-bubble::before,
:where(body.theme-wechat) #layer-chat .voice-transcription-bubble::after {
    content: none !important;
    display: none !important;
}
:where(body.theme-wechat) #layer-chat .bubble:has(img:not(.emoji-img)):not(.voice) {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) #layer-chat .bubble:has(img:not(.emoji-img)):not(.voice)::before,
:where(body.theme-wechat) #layer-chat .bubble:has(img:not(.emoji-img)):not(.voice)::after,
:where(body.theme-wechat) #layer-chat .bubble.recalled::before,
:where(body.theme-wechat) #layer-chat .bubble.recalled::after {
    content: none !important;
    display: none !important;
}
:where(body.theme-wechat) #layer-chat .bubble img:not(.emoji-img) {
    border-radius: 5px !important;
    filter: none !important;
}
:where(body.theme-wechat) #layer-chat .chat-time-separator,
:where(body.theme-wechat) #layer-chat .time-divider,
:where(body.theme-wechat) #layer-chat .time-label {
    color: #a3a3a3 !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-style: normal !important;
    letter-spacing: 0 !important;
    text-align: center !important;
}
:where(body.theme-wechat) #layer-chat .avatar-time-label,
:where(body.theme-wechat) #layer-chat .bubble-time-label {
    color: #a3a3a3 !important;
    font-family: inherit !important;
    font-size: 10px !important;
    font-style: normal !important;
    letter-spacing: 0 !important;
}
:where(body.theme-wechat) #layer-chat .msg-row:not(.me) .bubble.voice .voice-wave-anim span {
    background: #191919 !important;
}
:where(body.theme-wechat) #layer-chat .msg-row.me .bubble.voice .voice-wave-anim span {
    background: #191919 !important;
}
:where(body.theme-wechat) #layer-chat .msg-row.me .bubble.voice .voice-sec,
:where(body.theme-wechat) #layer-chat .msg-row:not(.me) .bubble.voice .voice-sec {
    color: #777 !important;
}

/* 输入栏保留加号/生成/心声/发送四个原按钮和 onclick，仅调整主题图标与排列 */
:where(body.theme-wechat):not(.has-custom-global-css) #layer-chat .input-bar,
:where(body.theme-wechat):not(.has-custom-global-css) #chat-input-bar {
    --chat-input-gap: 6px;
    margin: 0 !important;
    padding: 7px 10px !important;
    padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px)) !important;
    background-color: var(--chat-input-bg, #f7f7f7) !important;
    background-image: var(--chat-input-bg-image, none);
    border: 0 !important;
    border-top: var(--chat-input-border, 1px solid #d7d7d7) !important;
    border-radius: 0 !important;
    box-shadow: var(--chat-input-shadow, none) !important;
}
:where(body.theme-wechat) #chat-input-bar .input-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    min-height: 40px !important;
    gap: var(--chat-input-gap, 6px) !important;
}
:where(body.theme-wechat) #chat-input-bar .input-row > .btn-gen { order: 1; }
:where(body.theme-wechat) #chat-input-bar .input-row > .input-field-wrap { order: 2; }
:where(body.theme-wechat) #chat-input-bar .input-row > .btn-send { order: 3; }
:where(body.theme-wechat) #chat-input-bar .input-row > .btn-toolbar-toggle { order: 4; }
:where(body.theme-wechat) #chat-input-bar .input-field-wrap,
:where(body.theme-wechat) #chat-input-bar .input-field-wrap > .input-field,
:where(body.theme-wechat) #chat-input {
    min-height: 40px !important;
}
:where(body.theme-wechat) #chat-input-bar .input-field-wrap > .input-field,
:where(body.theme-wechat) #chat-input {
    padding: 8px 40px 8px 12px !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 5px !important;
    box-shadow: none !important;
    color: #191919 !important;
    font-family: inherit !important;
    font-size: 16px !important;
    line-height: 24px !important;
}
:where(body.theme-wechat) #chat-input:focus {
    outline: none !important;
    border: 0 !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) #chat-input-bar .btn-act {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    color: #181818 !important;
    font-size: 25px !important;
    overflow: visible !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    touch-action: manipulation;
}
:where(body.theme-wechat) #chat-input-bar .input-field-wrap > .btn-thought {
    position: absolute !important;
    top: 50% !important;
    right: 5px !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    flex-basis: 30px !important;
    width: 30px !important;
    height: 30px !important;
    color: #666 !important;
}
:where(body.theme-wechat:not(.has-custom-global-css)) #layer-chat #chat-input-bar .btn-act:not(.btn-gen):not(.has-custom-icon):not([style*="background-image"]) > svg,
:where(body.theme-wechat:not(.has-custom-global-css)) #layer-chat #chat-input-bar .btn-act:not(.btn-gen):not(.has-custom-icon):not([style*="background-image"]) > i {
    display: none !important;
}
:where(body.theme-wechat:not(.has-custom-global-css)) #chat-input-bar .btn-act:not(.btn-gen):not(.has-custom-icon):not([style*="background-image"])::before {
    display: block;
    content: '';
    background-color: currentColor;
}
/* Keep one SVG element so legacy `.btn-gen svg` custom-icon CSS still has a
   single target.  Other themes/custom CSS use the original lightning group;
   The green-white theme swaps to the direct stroked voice group so WebKit cannot rasterize
   its thin circle as a broken CSS mask. */
#chat-input-bar .btn-gen > .btn-gen-icon > .wechat-voice-glyph {
    display: none !important;
}
:where(body.theme-wechat:not(.has-custom-global-css)) #layer-chat #chat-input-bar .btn-gen:not(.has-custom-icon):not([style*="background-image"]) > .btn-gen-icon > .btn-gen-default-glyph {
    display: none !important;
}
:where(body.theme-wechat:not(.has-custom-global-css)) #layer-chat #chat-input-bar .btn-gen:not(.has-custom-icon):not([style*="background-image"]) > .btn-gen-icon {
    display: block !important;
    width: 26px !important;
    height: 26px !important;
    flex: 0 0 26px !important;
    color: currentColor;
    shape-rendering: geometricPrecision;
}
:where(body.theme-wechat:not(.has-custom-global-css)) #layer-chat #chat-input-bar .btn-gen:not(.has-custom-icon):not([style*="background-image"]) > .btn-gen-icon > .wechat-voice-glyph {
    display: inline !important;
}
:where(body.theme-wechat:not(.has-custom-global-css)) #chat-input-bar .btn-thought:not(.has-custom-icon):not([style*="background-image"])::before {
    width: 21px;
    height: 21px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='9' y='3' width='6' height='11' rx='3' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M6.5 11a5.5 5.5 0 0 0 11 0M12 16.5V21M9 21h6' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='9' y='3' width='6' height='11' rx='3' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M6.5 11a5.5 5.5 0 0 0 11 0M12 16.5V21M9 21h6' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
:where(body.theme-wechat:not(.has-custom-global-css)) #chat-input-bar .btn-send:not(.has-custom-icon):not([style*="background-image"])::before {
    width: 27px;
    height: 27px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke='black' stroke-width='1.45'/%3E%3Ccircle cx='9' cy='10' r='1'/%3E%3Ccircle cx='15' cy='10' r='1'/%3E%3Cpath d='M8.5 14.5c1 1.3 2.1 2 3.5 2s2.5-.7 3.5-2' fill='none' stroke='black' stroke-width='1.45' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke='black' stroke-width='1.45'/%3E%3Ccircle cx='9' cy='10' r='1'/%3E%3Ccircle cx='15' cy='10' r='1'/%3E%3Cpath d='M8.5 14.5c1 1.3 2.1 2 3.5 2s2.5-.7 3.5-2' fill='none' stroke='black' stroke-width='1.45' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
:where(body.theme-wechat:not(.has-custom-global-css)) #chat-input-bar .btn-toolbar-toggle:not(.has-custom-icon):not([style*="background-image"])::before {
    width: 28px;
    height: 28px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='black' stroke-width='1.45'/%3E%3Cpath d='M12 7v10M7 12h10' fill='none' stroke='black' stroke-width='1.45' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='black' stroke-width='1.45'/%3E%3Cpath d='M12 7v10M7 12h10' fill='none' stroke='black' stroke-width='1.45' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
:where(body.theme-wechat:not(.has-custom-global-css)) #chat-input-bar .btn-act:not(.has-custom-icon):not([style*="background-image"])::after {
    content: none !important;
    display: none !important;
}
:where(body.theme-wechat) #chat-input-bar .btn-act:active {
    background: rgba(0,0,0,.06) !important;
    opacity: .65 !important;
}
:where(body.theme-wechat) #chat-input-bar .btn-act:focus-visible {
    outline: 2px solid rgba(7,193,96,.62) !important;
    outline-offset: 1px !important;
}
:where(body.theme-wechat) #layer-chat .toolbar {
    min-height: 48px !important;
    background: #f7f7f7 !important;
    border-top: 1px solid #e1e1e1 !important;
    color: #191919 !important;
}
:where(body.theme-wechat) #layer-chat .toolbar i {
    color: #191919 !important;
}
:where(body.theme-wechat) #layer-chat .quote-preview {
    background: #ececec !important;
    border: 0 !important;
    border-left: 3px solid #07c160 !important;
    border-radius: 3px !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) #layer-chat .pop-menu {
    background: #4c4c4c !important;
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: 0 5px 18px rgba(0,0,0,.24) !important;
}
:where(body.theme-wechat) #layer-chat .pop-opt {
    color: #fff !important;
    border-bottom-color: rgba(255,255,255,.12) !important;
}
:where(body.theme-wechat) #layer-chat .pop-opt:active {
    background: rgba(255,255,255,.1) !important;
    color: #fff !important;
}

/* -------------------- 美化与设置 -------------------- */
:where(body.theme-wechat) #layer-beauty,
:where(body.theme-wechat) #layer-settings,
:where(body.theme-wechat) .api-settings-layer {
    background: #ededed !important;
    color: #191919 !important;
}
:where(body.theme-wechat) #layer-beauty > .nav-bar,
:where(body.theme-wechat) #layer-settings > .nav-bar,
:where(body.theme-wechat) .api-settings-layer > .nav-bar {
    min-height: 52px !important;
    background: #ededed !important;
    border-bottom: 1px solid #d8d8d8 !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) #layer-beauty > .nav-bar .nav-title,
:where(body.theme-wechat) #layer-settings > .nav-bar .nav-title,
:where(body.theme-wechat) .api-settings-layer > .nav-bar .nav-title {
    color: #191919 !important;
    font-family: inherit !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}
:where(body.theme-wechat) #beauty-menu,
:where(body.theme-wechat) #settings-menu {
    padding: 0 0 calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    background: #ededed !important;
    background-image: none !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-menu-list,
:where(body.theme-wechat) #layer-settings .settings-nav-list {
    gap: 0 !important;
    background: #fff !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-menu-item,
:where(body.theme-wechat) #layer-settings .settings-nav-item {
    min-height: 68px !important;
    margin: 0 !important;
    padding: 10px 16px !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid #ededed !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-menu-item:last-child,
:where(body.theme-wechat) #layer-settings .settings-nav-item:last-child {
    border-bottom: 0 !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-menu-item:active,
:where(body.theme-wechat) #layer-settings .settings-nav-item:active {
    background: #e9e9e9 !important;
    transform: none !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-menu-icon,
:where(body.theme-wechat) #layer-settings .settings-nav-icon-i {
    width: 38px !important;
    height: 38px !important;
    margin-right: 13px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 23px !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-menu-item:nth-child(1) .beauty-menu-icon { color: #10aeff !important; }
:where(body.theme-wechat) #layer-beauty .beauty-menu-item:nth-child(2) .beauty-menu-icon { color: #07c160 !important; }
:where(body.theme-wechat) #layer-beauty .beauty-menu-item:nth-child(3) .beauty-menu-icon { color: #f5a623 !important; }
:where(body.theme-wechat) #layer-beauty .beauty-menu-item:nth-child(4) .beauty-menu-icon { color: #576b95 !important; }
:where(body.theme-wechat) #layer-beauty .beauty-menu-item:nth-child(5) .beauty-menu-icon { color: #fa5151 !important; }
:where(body.theme-wechat) #layer-beauty .beauty-menu-item:nth-child(6) .beauty-menu-icon { color: #10aeff !important; }
:where(body.theme-wechat) #layer-beauty .beauty-menu-icon i { color: inherit !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(1) .settings-nav-icon-i { color: #10aeff !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(2) .settings-nav-icon-i { color: #07c160 !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(3) .settings-nav-icon-i { color: #f5a623 !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(4) .settings-nav-icon-i { color: #576b95 !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(5) .settings-nav-icon-i { color: #fa5151 !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(6) .settings-nav-icon-i { color: #f5a623 !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(7) .settings-nav-icon-i { color: #576b95 !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(8) .settings-nav-icon-i { color: #07c160 !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(9) .settings-nav-icon-i { color: #fa5151 !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(10) .settings-nav-icon-i { color: #9b59b6 !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(11) .settings-nav-icon-i { color: #ff7a45 !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(12) .settings-nav-icon-i { color: #10aeff !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(13) .settings-nav-icon-i { color: #07c160 !important; }
:where(body.theme-wechat) #layer-settings .settings-nav-item:nth-child(14) .settings-nav-icon-i { color: #576b95 !important; }
:where(body.theme-wechat) #layer-beauty .beauty-menu-title,
:where(body.theme-wechat) #layer-settings .settings-nav-title-text {
    margin-bottom: 3px !important;
    color: #191919 !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-menu-desc,
:where(body.theme-wechat) #layer-settings .settings-nav-desc {
    color: #888 !important;
    font-family: inherit !important;
    font-size: 12px !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-menu-arrow,
:where(body.theme-wechat) #layer-settings .settings-nav-arrow {
    color: #b2b2b2 !important;
    font-size: 15px !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-subpage > .scroll-y,
:where(body.theme-wechat) #layer-settings .settings-subpage > .scroll-y,
:where(body.theme-wechat) .api-settings-layer > .scroll-y {
    padding: 12px 12px calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    background: #ededed !important;
    background-image: none !important;
}
:where(body.theme-wechat) #layer-beauty.gwp-has-wallpaper .beauty-subpage > .scroll-y,
:where(body.theme-wechat) #layer-settings.gwp-has-wallpaper .settings-subpage > .scroll-y {
    background-color: transparent !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-section-card,
:where(body.theme-wechat) #layer-settings .beauty-section-card,
:where(body.theme-wechat) .api-settings-layer .beauty-section-card {
    margin: 0 0 12px !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    overflow: hidden !important;
    transform: none !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-section-card::after,
:where(body.theme-wechat) #layer-settings .beauty-section-card::after,
:where(body.theme-wechat) .api-settings-layer .beauty-section-card::after {
    content: none !important;
    display: none !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-section-header,
:where(body.theme-wechat) #layer-settings .beauty-section-header,
:where(body.theme-wechat) .api-settings-layer .beauty-section-header,
:where(body.theme-wechat) .api-settings-layer .api-section-header {
    min-height: 48px !important;
    padding: 12px 16px !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid #ededed !important;
    border-radius: 0 !important;
    color: #191919 !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 500 !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-section-header span,
:where(body.theme-wechat) #layer-settings .beauty-section-header span,
:where(body.theme-wechat) .api-settings-layer .beauty-section-header span {
    color: #191919 !important;
}
:where(body.theme-wechat) #layer-beauty .form-cell,
:where(body.theme-wechat) #layer-settings .form-cell,
:where(body.theme-wechat) .api-settings-layer .form-cell {
    min-height: 52px !important;
    padding: 10px 16px !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid #ededed !important;
}
:where(body.theme-wechat) #layer-beauty .form-cell:last-child,
:where(body.theme-wechat) #layer-settings .form-cell:last-child,
:where(body.theme-wechat) .api-settings-layer .form-cell:last-child {
    border-bottom: 0 !important;
}
:where(body.theme-wechat) #layer-beauty .form-label,
:where(body.theme-wechat) #layer-settings .form-label,
:where(body.theme-wechat) .api-settings-layer .form-label,
:where(body.theme-wechat) #layer-beauty label,
:where(body.theme-wechat) #layer-settings label,
:where(body.theme-wechat) .api-settings-layer label {
    color: #191919 !important;
    font-family: inherit !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-comp-tabs,
:where(body.theme-wechat) #layer-beauty .beauty-mode-toggle {
    margin: 12px 16px !important;
    background: #ededed !important;
    border: 0 !important;
    border-radius: 5px !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-comp-tab,
:where(body.theme-wechat) #layer-beauty .beauty-mode-btn {
    border: 0 !important;
    border-radius: 4px !important;
    color: #666 !important;
    font-family: inherit !important;
    font-weight: 500 !important;
}
:where(body.theme-wechat) #layer-beauty .beauty-comp-tab.active,
:where(body.theme-wechat) #layer-beauty .beauty-mode-btn.active {
    background: #fff !important;
    color: #07c160 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.1) !important;
}
:where(body.theme-wechat) #layer-beauty .font-preset-item,
:where(body.theme-wechat) #layer-settings .settings-style-item {
    background: #fff !important;
    border: 1px solid #ededed !important;
    border-radius: 5px !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) #global-theme-grid .theme-card {
    border: 1px solid #dedede !important;
    border-radius: 7px !important;
    box-shadow: none !important;
}
:where(body.theme-wechat) #global-theme-grid .theme-card.active {
    border: 2px solid #07c160 !important;
    box-shadow: 0 0 0 2px rgba(7,193,96,.1) !important;
}
:where(body.theme-wechat) #global-theme-grid .theme-card-check {
    color: #07c160 !important;
}

/* 内页图标使用绿白主题功能色，不让历史内联灰色把整页重新染成黑灰。 */
body.theme-wechat #layer-beauty .beauty-section-header i,
body.theme-wechat #layer-settings .beauty-section-header i,
body.theme-wechat .api-settings-layer .beauty-section-header i,
body.theme-wechat .api-settings-layer .api-section-header i {
    color: #10aeff !important;
}
body.theme-wechat :is(#layer-beauty, #layer-settings, .api-settings-layer) :is(.beauty-section-header, .api-section-header) i:is(.fa-comments, .fa-headphones, .fa-signal, .fa-check, .fa-check-circle) {
    color: #07c160 !important;
}
body.theme-wechat :is(#layer-beauty, #layer-settings, .api-settings-layer) :is(.beauty-section-header, .api-section-header) i:is(.fa-palette, .fa-bell, .fa-sun) {
    color: #f5a623 !important;
}
body.theme-wechat :is(#layer-beauty, #layer-settings, .api-settings-layer) :is(.beauty-section-header, .api-section-header) i:is(.fa-swatchbook, .fa-magic, .fa-wand-magic-sparkles) {
    color: #9b59b6 !important;
}
body.theme-wechat :is(#layer-beauty, #layer-settings, .api-settings-layer) :is(.beauty-section-header, .api-section-header) i:is(.fa-trash, .fa-trash-alt, .fa-exclamation-triangle) {
    color: #fa5151 !important;
}

/* 详情页按钮统一为紧凑小圆角矩形；覆盖默认主题遗留的大圆角。 */
body.theme-wechat #layer-beauty .beauty-action-btn,
body.theme-wechat #layer-settings .beauty-action-btn,
body.theme-wechat #layer-settings .stt-provider-btn,
body.theme-wechat #layer-settings .imggen-provider-btn,
body.theme-wechat #layer-beauty .font-preset-item .fp-actions button,
body.theme-wechat .api-settings-layer .beauty-action-btn,
body.theme-wechat .api-settings-layer .full-btn {
    border-radius: 6px !important;
    box-shadow: none !important;
}

/* 小屏上收紧会话时间和聊天按钮，避免输入框被挤没 */
@media (max-width: 360px) {
    :where(body.theme-wechat) #contact-list .list-item {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    :where(body.theme-wechat) #contact-list .list-item .avatar {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    :where(body.theme-wechat) #contact-list .contact-list-time {
        font-size: 11px !important;
    }
    :where(body.theme-wechat) #chat-input-bar .input-row {
        gap: var(--chat-input-gap, 5px) !important;
    }
    :where(body.theme-wechat):not(.has-custom-global-css) #chat-input-bar {
        --chat-input-gap: 5px;
    }
    :where(body.theme-wechat) #chat-input-bar .btn-act {
        flex-basis: 34px !important;
        width: 34px !important;
        height: 36px !important;
    }
}

/* 运行时布局保护样式会在主题文件后注入；双 ID 保证绿白主题的四按钮尺寸不被抢回。 */
body.theme-wechat:not(.has-custom-global-css) #layer-chat #chat-input-bar .input-row {
    min-height: 40px !important;
    gap: var(--chat-input-gap, 6px) !important;
}
body.theme-wechat #layer-chat #chat-input-bar .input-row > .btn-act,
body.theme-wechat #layer-chat #chat-input-bar .input-row > .btn-gen,
body.theme-wechat #layer-chat #chat-input-bar .input-row > .btn-send {
    width: 38px !important;
    height: 38px !important;
}
body.theme-wechat #layer-chat #chat-input-bar .input-row > .input-field-wrap > .btn-thought {
    width: 30px !important;
    height: 30px !important;
}
@media (max-width: 360px) {
    body.theme-wechat #layer-chat #chat-input-bar .input-row > .btn-act,
    body.theme-wechat #layer-chat #chat-input-bar .input-row > .btn-gen,
    body.theme-wechat #layer-chat #chat-input-bar .input-row > .btn-send {
        flex-basis: 34px !important;
        width: 34px !important;
        height: 36px !important;
    }
}
