/* Anminxin material finish: existing layout, navigation and business behavior stay intact. */
html[data-client-variant=wechat]{--amx-highlight:rgba(255,255,255,.75);--amx-control-shadow:rgba(21,36,49,.12);--amx-card-shadow:rgba(21,36,49,.075);--amx-soft-surface:rgba(255,255,255,.13)}
html[data-client-variant=wechat][data-theme=dark]{--amx-highlight:rgba(255,255,255,.11);--amx-control-shadow:rgba(0,0,0,.32);--amx-card-shadow:rgba(0,0,0,.24);--amx-soft-surface:rgba(255,255,255,.025)}
html:root[data-client-variant=wechat] :is(.ref-button,.ref-primary,.ref-danger,.primary-button,.send-button,.icon-button,.ref-icon,.settings-header-done,.settings-theme-radio,.wechat-desktop-settings-tab,.ref-folder,.interface-background-upload):not(:disabled){
 background-image:linear-gradient(180deg,var(--amx-soft-surface),transparent 75%);box-shadow:inset 0 1px 0 var(--amx-highlight),0 1px 3px var(--amx-control-shadow);transition:box-shadow .12s ease,transform .08s ease,background-color .12s ease;
}
html:root[data-client-variant=wechat] :is(.ref-button,.ref-primary,.ref-danger,.primary-button,.send-button,.icon-button,.ref-icon,.settings-header-done,.wechat-desktop-settings-tab):not(:disabled):hover{box-shadow:inset 0 1px 0 var(--amx-highlight),0 3px 8px var(--amx-control-shadow)}
html:root[data-client-variant=wechat] :is(.ref-button,.ref-primary,.primary-button,.send-button,.icon-button,.ref-icon,.settings-header-done,.wechat-desktop-settings-tab):not(:disabled):active{transform:translateY(1px);box-shadow:inset 0 1px 3px var(--amx-control-shadow)}
html[data-client-variant=wechat] button:focus-visible{outline:2px solid var(--ref-accent-ink);outline-offset:3px}
html[data-client-variant=wechat] .settings-group{margin:0 12px 16px}
html[data-client-variant=wechat] .settings-group-rows{border:1px solid var(--ref-line);border-radius:12px!important;background:var(--ref-panel)!important;box-shadow:inset 0 1px 0 var(--amx-highlight),0 3px 10px var(--amx-card-shadow);overflow:hidden}
html[data-client-variant=wechat] .settings-row{background-image:linear-gradient(180deg,var(--amx-soft-surface),transparent);min-height:58px}
html[data-client-variant=wechat] .settings-row:not(.settings-readonly):hover{background-color:var(--ref-hover)}
html[data-client-variant=wechat] .settings-row-copy strong{font-weight:500}
html[data-client-variant=wechat] .settings-group-title{font-weight:600;padding-left:7px}
html[data-client-variant=wechat] .settings-icon{width:32px;height:32px;border-radius:9px;color:var(--ref-accent-ink);background:linear-gradient(145deg,var(--ref-selected),var(--ref-field));border:1px solid var(--ref-line);box-shadow:inset 0 1px 0 var(--amx-highlight),0 1px 2px var(--amx-card-shadow)}
html[data-client-variant=wechat] .settings-profile{box-shadow:inset 0 1px 0 var(--amx-highlight),0 2px 8px var(--amx-card-shadow)}
html[data-client-variant=wechat] .settings-switch-track{box-shadow:inset 0 1px 3px var(--amx-control-shadow),0 1px 0 var(--amx-highlight)}
html[data-client-variant=wechat] .settings-switch-thumb{background:linear-gradient(#fff,#f0f2f3);border:1px solid #ffffff80;box-shadow:0 1px 3px #0004}
html[data-client-variant=wechat] .wechat-desktop-settings-content .settings-group{margin-left:0;margin-right:0}
html[data-client-variant=wechat] .amx-interface-backdrop{position:fixed;inset:0;z-index:-1;pointer-events:none;contain:strict}
html[data-client-variant=wechat][data-interface-background] body{isolation:isolate;background:transparent}
html[data-client-variant=wechat][data-interface-background] :is(.app-shell,.workspace,.chat-panel,.chat-empty,.message-view,.ref-page-body,.settings-body){background:transparent!important}
html[data-client-variant=wechat][data-interface-background] :is(.conversation-panel,.panel-heading,.conversation-tools,.chat-heading,.composer,.ref-tabs,.ref-page-head,.desktop-sidebar,.wechat-desktop-sidebar,.wechat-desktop-settings-nav){
 background:color-mix(in srgb,var(--ref-panel) 87%,transparent)!important;
}
html:root[data-client-variant=wechat][data-interface-background] .ref-screen{background:var(--ref-panel)!important}
html[data-client-variant=wechat][data-interface-background] .conversation-item{background:color-mix(in srgb,var(--ref-panel) 78%,transparent)}
html[data-client-variant=wechat][data-interface-background] .conversation-item.active{background:var(--ref-selected)}
html[data-client-variant=wechat][data-interface-background] :is(.message-bubble,.settings-group-rows,.settings-profile,.ref-sheet,.auth-dialog){background-color:var(--ref-panel)}
html[data-client-variant=wechat][data-interface-background] .own .message-bubble{background-color:var(--ref-outgoing)}
.interface-background-description{padding:8px 18px 14px;color:var(--ref-secondary);line-height:1.6;font-size:14px}
.interface-background-preview{height:220px;margin:0 18px 18px;border:1px solid var(--ref-line);border-radius:12px;overflow:hidden;box-shadow:inset 0 1px 0 var(--amx-highlight),0 5px 14px var(--amx-card-shadow)}
.interface-background-preview-shell{display:flex;width:100%;height:100%;pointer-events:none}
.interface-background-preview-shell aside{width:26%;background:#ffffffa8;padding:16px 12px;display:flex;flex-direction:column;gap:13px;border-right:1px solid #ffffff80}
.interface-background-preview-shell aside i{display:block;height:23px;border-radius:5px;background:#ffffffd9;box-shadow:0 1px 3px #172c4417}
.interface-background-preview-shell section{flex:1;position:relative;padding:17px;display:flex;align-items:flex-start;flex-direction:column;gap:12px}
.interface-background-preview-shell strong{background:#fffffff2;border-radius:5px;padding:5px 9px;color:#253546;font:600 13px system-ui}
.interface-background-preview-shell section>div{width:55%;height:24px;border-radius:7px;background:#fffffff0;box-shadow:0 2px 4px #172c4417}
.interface-background-preview-shell section>div+div{align-self:flex-end;background:#a8e7b9}
.interface-background-preview-shell footer{display:flex;gap:8px;position:absolute;bottom:14px;left:16px;right:16px;background:#ffffffe3;padding:6px;border-radius:6px}
.interface-background-preview-shell footer span{flex:1;background:#fff;border-radius:4px}
.interface-background-preview-shell footer b{font:12px system-ui;padding:4px 9px;border-radius:4px;background:#168547;color:white}
.interface-background-colors{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:0 18px 18px}
.interface-color-choice{min-height:66px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:var(--ref-panel);color:var(--ref-text);border:1px solid var(--ref-line);border-radius:9px;font-size:12px}
.interface-color-choice:before{content:'';width:28px;height:24px;background:var(--sample-color,var(--ref-bg));border:1px solid #80808040;border-radius:6px;box-shadow:inset 0 1px 0 #ffffff70}
.interface-color-choice[aria-pressed=true]{outline:2px solid var(--ref-accent-ink);outline-offset:1px}
.interface-background-upload,.interface-background-use-image{margin:0 18px 12px;min-height:44px;border:1px solid var(--ref-line);color:var(--ref-accent-ink);background-color:var(--ref-panel)}
.interface-background-controls{display:flex;flex-direction:column;gap:18px;padding:8px 18px 20px}
.interface-background-controls label{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;color:var(--ref-text);font-size:14px}
.interface-background-controls output{font-size:13px;color:var(--ref-secondary)}
.interface-background-controls select{max-width:100%;min-height:42px;padding:8px 12px;border:1px solid var(--ref-line);background:var(--ref-panel);color:var(--ref-text);border-radius:7px}
.interface-background-controls input[type=range]{flex-basis:100%;width:100%;height:28px;accent-color:var(--ref-action)}
.interface-background-actions{display:flex;justify-content:space-between;gap:12px;padding:0 18px}
.interface-background-actions button{min-height:44px}
html[data-client-variant=wechat][data-reduce-motion=true] :is(button,.settings-switch-thumb){transition:none!important;transform:none!important}
@media(max-width:480px){.interface-background-preview{height:190px}.interface-background-colors{grid-template-columns:repeat(4,minmax(0,1fr))}.interface-background-actions{flex-wrap:wrap}}


/* Ongoing media work must leave the ordinary composer usable. */
:root[data-client-variant] dialog.ref-sheet.ref-task-sheet[open]{position:fixed;inset:auto 14px 92px auto;margin:0;width:min(370px,calc(100vw - 28px));max-width:calc(100vw - 28px);height:auto;max-height:calc(100dvh - 170px);border:1px solid var(--ref-line);border-radius:12px;z-index:65;box-shadow:0 8px 28px #0003;overflow:hidden}
:root[data-client-variant] dialog.ref-task-sheet .ref-sheet-head{min-height:48px;height:auto;padding:4px 8px;gap:6px}
:root[data-client-variant] dialog.ref-task-sheet .ref-sheet-head h2{font-size:16px;flex:1;min-width:0;margin:0}
:root[data-client-variant] dialog.ref-task-sheet .ref-sheet-body{height:auto;max-height:calc(100dvh - 230px);overflow:auto;padding:12px;min-height:0}
:root[data-client-variant] dialog.ref-task-sheet .ref-task-toggle{padding:7px 10px;min-height:36px;border-radius:7px;background:#8882;color:inherit;white-space:nowrap}
:root[data-client-variant] dialog.ref-task-sheet.ref-task-collapsed .ref-sheet-body{display:none!important}
:root[data-client-variant] dialog.ref-task-sheet.ref-call{top:70px;bottom:auto;max-height:calc(100dvh - 160px)}
:root[data-client-variant] dialog.ref-task-sheet.ref-call .ref-sheet-body{height:auto;min-height:260px;gap:8px}
:root[data-client-variant] dialog.ref-task-sheet.ref-call .ref-avatar{width:48px;height:48px;margin:4px}
:root[data-client-variant] dialog.ref-task-sheet.ref-call .ref-remote-video{max-height:min(28dvh,220px);width:100%}
:root[data-client-variant] dialog.ref-task-sheet.ref-call .ref-local-video{width:64px;max-height:80px}
:root[data-client-variant] dialog.ref-task-sheet.ref-call .ref-call-controls{gap:12px;margin-top:8px;flex-wrap:wrap;justify-content:center}
:root[data-client-variant] dialog.ref-task-sheet.ref-call .ref-call-controls button{width:52px;height:52px;gap:3px;font-size:10px}
:root[data-client-variant] dialog.ref-media-upload progress{width:100%}
@media(max-width:740px){:root[data-client-variant] dialog.ref-sheet.ref-task-sheet[open]{right:10px;width:calc(100vw - 20px);max-width:calc(100vw - 20px);bottom:84px}:root[data-client-variant] dialog.ref-task-sheet.ref-call[open]{top:64px;bottom:auto}}

/* Keep three Chinese call labels intact at phone widths. */
:root[data-client-variant] dialog.ref-task-sheet.ref-call .ref-call-controls button{width:64px;height:64px;padding:7px;gap:3px;font-size:11px;line-height:16px}
:root[data-client-variant] dialog.ref-task-sheet.ref-call .ref-call-controls button span{white-space:nowrap;word-break:keep-all}
