/* 鸣潮 · 飞讯。构图和贴图层次对应 KISGP/WuWaChat 的 Header、AreaLeft、
   CharCard、AreaRightView。只在选中主题时请求上游图片；每层都有纯 CSS 底。 */
body.wuwa-theme {
  --wu-shell:#252733; --wu-panel:#393c4b; --wu-gold:#eddaa1; --wu-paper:#eceef0; --wu-ink:#292c34;
  --bg-primary:#23252e; --bg-secondary:#30333e; --bg-sidebar:var(--wu-shell); --bg-tertiary:var(--wu-panel);
  --text-primary:#f4f3ef; --text-secondary:#ced0d7; --text-muted:#b2b4bd; --border-color:#565966;
  --accent-gold:var(--wu-gold); --accent-gold-rgb:237,218,161;
  --float-btn-bg:#e5e6e9; --float-btn-text:#494d56; --float-btn-border:#bec1c8;
  --float-btn-bg-hover:#fff; --float-btn-text-hover:#242630;
  --wu-bar:url('https://cdn.jsdelivr.net/gh/KISGP/WuWaChat@main/src/renderer/assets/T_PhoneSystemModel02.png');
  --wu-logo:url('https://cdn.jsdelivr.net/gh/KISGP/WuWaChat@main/src/renderer/assets/T_TPI_UiPhoneSystem_Main1_UIAtlas_1.png');
  --wu-side:url('https://cdn.jsdelivr.net/gh/KISGP/WuWaChat@main/src/renderer/assets/T_PhoneSystemBg01A.png');
  --wu-card:url('https://cdn.jsdelivr.net/gh/KISGP/WuWaChat@main/src/renderer/assets/1.png');
  --wu-over:url('https://cdn.jsdelivr.net/gh/KISGP/WuWaChat@main/src/renderer/assets/2.png');
  --wu-selected:url('https://cdn.jsdelivr.net/gh/KISGP/WuWaChat@main/src/renderer/assets/4.png');
  --wu-screen:url('https://cdn.jsdelivr.net/gh/KISGP/WuWaChat@main/src/renderer/assets/T_PhoneSystemPanel_01.png');
  --wu-contact:url('https://cdn.jsdelivr.net/gh/KISGP/WuWaChat@main/src/renderer/assets/T_PhoneSystemModel03.png');
  --wu-rule:url('https://cdn.jsdelivr.net/gh/KISGP/WuWaChat@main/src/renderer/assets/T_PhoneSystemModel03Line.png');
}
body.wuwa-theme:has(#wuwa-terminal-bar) {
  background:radial-gradient(ellipse at 22% 4%,#606367 0,transparent 54%),linear-gradient(130deg,#30343b,#191b20 74%);
}
body.wuwa-theme #app-container {
  --wu-bar-height:66px;
  padding-top:var(--wu-bar-height); box-sizing:border-box;
  background:transparent; border:0; border-radius:4px; box-shadow:none;
}
/* 参考窗体为 1200 × 720；内容的原始左右比例为 312 : 820。窄屏仍用 MySW 的抽屉。 */
@media (min-width:1025px), (min-width:769px) and (orientation:landscape) {
  body.wuwa-theme:not(.fullscreen-mode):not(.vn-fullscreen) #app-container:not(.mobile-view) {
    width:min(96vw,1132px); height:min(94dvh,690px);
  }
  body.wuwa-theme #app-container:not(.mobile-view) .sidebar { width:27.56%; }
}
body.wuwa-theme #wuwa-terminal-bar:not([hidden]) {
  position:absolute; inset:0 0 auto; height:var(--wu-bar-height); z-index:2;
  display:flex; align-items:center; padding:0 clamp(16px,3vw,38px); gap:clamp(4px,1.5vw,20px);
  background:var(--wu-bar) center / 100% 100% no-repeat,linear-gradient(174deg,#ebece8,#d7d9d9 75%,#b8bbbc);
  color:#62656b; border-bottom:3px solid #272a31;
}
body.wuwa-theme .sidebar-header :is(#sidebar-brand-icon,#sidebar-brand-title) { display:none; }
body.wuwa-theme .wuwa-brand { min-width:0; display:flex; align-items:center; gap:clamp(5px,1.3vw,18px); }
body.wuwa-theme #wuwa-brand-icon { flex:none; max-height:calc(var(--wu-bar-height) - 4px); font-size:30px; line-height:1; }
body.wuwa-theme .wuwa-sigil { width:40px; height:40px; background:var(--wu-logo) center / contain no-repeat; }
body.wuwa-theme .wuwa-brand::before { content:''; order:1; flex:0 0 6px; height:6px; border-radius:50%; background:#939699; }
body.wuwa-theme .wuwa-terminal-title { order:2; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:18px; font-weight:650; letter-spacing:.12em; }
body.wuwa-theme #wuwa-terminal-bar .sidebar-footer { flex:0 0 auto; max-width:75%; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; margin:0 0 0 auto; justify-content:flex-start; gap:clamp(2px,1.3vw,18px); }
body.wuwa-theme #wuwa-terminal-bar .icon-btn:not([hidden]) { flex:none; width:clamp(30px,5vw,40px); height:clamp(30px,5vw,40px); display:grid; place-items:center; background:transparent; border:0; color:#555961; font-size:21px; cursor:pointer; }
body.wuwa-theme #wuwa-terminal-bar .icon-btn[hidden] { display:none; }
/* 按钮原有的 hover 放大会撑开可滚动工具栏，又在鼠标下收回。只换色，不改变命中框。 */
body.wuwa-theme #wuwa-terminal-bar .sidebar-footer::-webkit-scrollbar { display:none; }
body.wuwa-theme :is(#wuwa-terminal-bar,#chat-header) .icon-btn { transform:none; transition:background-color .14s,color .14s; }
body.wuwa-theme #wuwa-terminal-bar .icon-btn { border-radius:5px; }
body.wuwa-theme #wuwa-terminal-bar .icon-btn:is(:hover,:focus-visible) { color:#141820; background:#fff7; }
body.wuwa-theme #wuwa-terminal-bar .icon-btn:focus-visible { outline:2px solid #555961; outline-offset:-2px; }
body.wuwa-theme .sidebar {
  padding:16px 9px 14px 16px; background:var(--wu-side) center / 100% 100% no-repeat,#2e3039;
  border:0; min-height:0;
}
body.wuwa-theme #app-container .sidebar:is(.hidden),body.wuwa-theme #app-container.mobile-view .sidebar { top:var(--wu-bar-height); height:calc(100% - var(--wu-bar-height)); }
body.wuwa-theme .sidebar-header { margin:0 0 8px; gap:5px; font-size:14px; }
body.wuwa-theme .sidebar .search-box-container { margin-bottom:7px; }
body.wuwa-theme .sidebar .search-box { background:#222630bd; border:1px solid #ffffff40; border-radius:4px; color:#fff; }
body.wuwa-theme .friend-list { padding:2px; margin:0 0 8px; }
body.wuwa-theme .friend-item {
  --wu-card-state:var(--wu-card); --wu-card-base:#424652;
  background:var(--wu-card-state) center / 100% 100% no-repeat,linear-gradient(107deg,var(--wu-card-base) 28%,#ffffff1c 29%,transparent 31%),var(--wu-card-base);
  min-height:70px; padding:5px 12px; margin:0 0 6px; border:2px solid transparent; border-radius:3px; color:#fff;
}
body.wuwa-theme .friend-item:hover { --wu-card-state:var(--wu-over); --wu-card-base:#c8cbd0; color:#30333c; border-color:#f2f4f4; }
body.wuwa-theme .friend-item.active { --wu-card-state:var(--wu-selected); --wu-card-base:#ded9c7; color:#21242a; }
body.wuwa-theme .friend-item .friend-avatar { width:clamp(40px,4.8vw,60px); height:auto; aspect-ratio:1; margin-right:clamp(12px,1.8vw,24px); border:0; }
body.wuwa-theme .friend-item .friend-name { color:inherit; font-size:17px; font-weight:600; }
body.wuwa-theme .friend-item:is(.active,:hover) .friend-status { color:#515560; }
body.wuwa-theme .chat-area:not(.has-custom-bg) {
  background:var(--wu-screen) center / 100% 100% no-repeat,linear-gradient(125deg,#f3f4f2,#dde0e3 80%,#c9cdd2);
}
body.wuwa-theme .chat-area:not(.has-custom-bg)::before { background:none; }
body.wuwa-theme .chat-header {
  margin:4px 8px 0; min-height:88px; padding-left:clamp(46px,4vw,52px); padding-right:58px; border:none;
  background:var(--wu-rule) center bottom / 96% 3px no-repeat,var(--wu-contact) center / 96% 100% no-repeat,linear-gradient(105deg,#f0f0ed,#e1e3e6);
  color:var(--wu-ink);
}
body.wuwa-theme #current-friend-name { color:var(--wu-ink); font-weight:650; }
body.wuwa-theme #current-friend-name::after { content:'飞讯终端 · 远程通讯'; display:block; margin-top:4px; font-size:11px; color:#636671; font-weight:500; letter-spacing:.08em; }
body.wuwa-theme .chat-header :is(.icon-btn,.editable-name) { background:transparent; border-color:transparent; color:#575b65; }
body.wuwa-theme .chat-header .icon-btn:hover { color:#20232b; background:#c4c9cd; }
body.wuwa-theme .chat-messages { margin:8px 10px 0; padding:12px clamp(10px,2vw,26px); gap:18px; }
body.wuwa-theme .chat-area:not(.has-custom-bg) :is(.nickname,.message-time,.message-meta) { color:#555964; text-shadow:none; }
body.wuwa-theme .message .nickname { font-size:14px; margin:4px 8px 5px; }
body.wuwa-theme .message .avatar { width:clamp(38px,4.7vw,56px); height:auto; aspect-ratio:1; border:2px solid #d4d6d8; box-shadow:0 0 0 2px #fff; }
body.wuwa-theme .message:is(.mine,.other) div.bubble:not(.has-custom-bg) { border:1px solid var(--wu-rim); background:var(--wu-fill); color:var(--wu-type) !important; padding:11px 18px; box-shadow:0 1px 2px #00000010; }
body.wuwa-theme .message.other { --wu-fill:white; --wu-type:#333; --wu-rim:#e5e7eb; }
body.wuwa-theme .message.mine { --wu-fill:#393c4b; --wu-type:white; --wu-rim:#393c4b; }
body.wuwa-theme .message.other div.bubble { border-radius:0 6px 12px 6px; }
body.wuwa-theme .message.mine div.bubble { border-radius:6px 0 6px 12px; }
body.wuwa-theme .message:is(.mine,.other) div.bubble:not(.has-custom-bg)::before {
  content:''; pointer-events:none; position:absolute; width:12px; height:13px; top:-1px;
  border-top:1px solid var(--wu-rim); background:radial-gradient(circle at var(--wu-tail-x) 100%,transparent 11px,var(--wu-rim) 11.5px,var(--wu-fill) 12.5px);
}
body.wuwa-theme .message.other div.bubble::before { right:100%; --wu-tail-x:0%; }
body.wuwa-theme .message.mine div.bubble::before { left:100%; --wu-tail-x:100%; }
body.wuwa-theme .message.other .bubble a { color:#504d75; }
body.wuwa-theme .chat-input-area { background:transparent; border:0; padding:8px 5% 18px 6%; gap:3px; }
body.wuwa-theme #chat-input-row {
  min-height:54px; padding:4px 10px; gap:8px !important; border:2px solid #d8dce1; border-radius:12px;
  background:rgba(255,255,255,.68); color:#333;
}
body.wuwa-theme #chat-input-row:focus-within { background:rgba(255,255,255,.92); border-color:#999ea9; }
body.wuwa-theme #message-input { background:transparent; color:#333; border:0; border-radius:0; box-shadow:none; }
body.wuwa-theme #message-input::placeholder { color:#767b85; }
body.wuwa-theme #chat-input-row :is(.input-icons,#send-btn,#command-panel-btn) { color:#676d78 !important; background:transparent; }
body.wuwa-theme #chat-input-row .input-icons { gap:7px; }
body.wuwa-theme #chat-input-row i[role=button]:hover { color:#24272f !important; }
body.wuwa-theme .pending-reply-preview { background:#484d59; }
body.wuwa-theme #disclaimer-bar { color:#626670 !important; margin-top:2px !important; }
body.wuwa-theme #disclaimer-bar a { color:inherit !important; }
@media (max-width:768px), (max-width:1024px) and (orientation:portrait) {
  body.wuwa-theme #app-container { --wu-bar-height:48px; }
  body.wuwa-theme #app-container .sidebar { top:var(--wu-bar-height); height:calc(100% - var(--wu-bar-height)); }
  body.wuwa-theme .chat-header { margin:2px 0 0; min-height:58px; padding-block:7px; }
  body.wuwa-theme .chat-messages { margin:4px 0 0; }
  body.wuwa-theme .chat-input-area { padding:4px 6px max(6px,env(safe-area-inset-bottom)); }
  body.wuwa-theme #chat-input-row { padding:2px 5px; gap:4px !important; }
  body.wuwa-theme #current-friend-name::after { font-size:10px; }
}
@media (max-height:520px) {
  body.wuwa-theme #app-container { --wu-bar-height:38px; }
  body.wuwa-theme .chat-header { min-height:44px; }
  body.wuwa-theme #current-friend-name::after { display:none; }
}
body.forum-page.wuwa-theme { --forum-bg:var(--wu-shell); --forum-panel:#303340; --forum-panel2:var(--wu-panel); --forum-gold:var(--wu-gold); --forum-line:#565967; --forum-text:#f4f2eb; --forum-muted:#bfc0cb; }
body.market-page.wuwa-theme { --mk-bg:var(--wu-shell); --mk-panel:#303340; --mk-panel2:var(--wu-panel); --mk-gold:var(--wu-gold); --mk-text:#f4f2eb; --mk-muted:#bfc0cb; --mk-line:#565967; }
body.wuwa-theme :is(.post-card,.mk-card,.mk-c-card) { border-radius:4px; border-left:3px solid #a79b78; }
body.wuwa-theme :is(.forum-nav.active,.market-tab.active) { background:var(--wu-gold); color:var(--wu-ink); border-radius:3px; }
body.wuwa-theme .dm-bubble.other { background:#fff; color:#333; border-radius:0 6px 12px 6px; }
body.wuwa-theme .dm-bubble.mine { background:var(--wu-panel); color:#fff; border-radius:6px 0 6px 12px; }

/* 飞讯窗口沿用聊天面板的雾银底、石墨字与浅金选中态。变量仅在弹层内生效。 */
body.wuwa-theme :is(.modal-overlay,.ad-overlay,.forum-modal,.market-modal) {
  --wu-edge:#b5bac3; --wu-focus:#746034; --wu-surface:#fafbf9; --wu-muted:#535b69;
  --bg-primary:var(--wu-paper); --bg-secondary:var(--wu-surface); --bg-tertiary:#e0e3e7;
  --text-primary:var(--wu-ink); --text-secondary:var(--wu-muted); --text-muted:#606774; --border-color:var(--wu-edge);
  --accent-gold:var(--wu-focus); --accent-gold-rgb:116,96,52;
  --forum-bg:var(--wu-paper); --forum-panel:var(--wu-surface); --forum-panel2:#e0e3e7; --forum-text:var(--wu-ink); --forum-muted:var(--wu-muted); --forum-gold:var(--wu-focus);
  --mk-bg:var(--wu-paper); --mk-panel:var(--wu-surface); --mk-panel2:#e0e3e7; --mk-text:var(--wu-ink); --mk-muted:var(--wu-muted); --mk-gold:var(--wu-focus);
  --wu-section:url('https://cdn.jsdelivr.net/gh/KISGP/WuWaChat@main/src/renderer/assets/T_BgPointMask.png');
  --ui-radius:4px; --ui-field-bg:#fff; --ui-field-bg-hover:#f6f7f9; --ui-field-border:#9299a5;
  --ui-field-text:var(--wu-ink); --ui-field-placeholder:#646c79; --ui-focus-ring:0 0 0 2px #87744855;
  background-color:rgba(30,34,45,.52);
}
html:not(.glass-off) body.wuwa-theme:not(.compatibility-mode) :is(.modal-overlay.show,.ad-overlay.show) { backdrop-filter:blur(5px); }
body.wuwa-theme :is(.modal-content,.forum-dialog,.market-dialog,.ad-card) {
  color-scheme:light; background:var(--wu-paper); color:var(--wu-ink); border:1px solid var(--wu-edge); border-radius:5px;
  box-shadow:0 18px 64px #0008;
}
body.wuwa-theme .modal-header {
  background:var(--wu-bar) center / 100% 100% no-repeat,#dddeda; color:#34373e;
  border-radius:4px 4px 0 0; border-bottom:2px solid #737373; padding:14px 20px;
}
body.wuwa-theme .modal-header h2 { color:inherit; font-size:1.15rem; font-weight:650; }
body.wuwa-theme .modal-header .close-modal { color:inherit; background:transparent; border:1px solid currentColor; border-radius:3px; width:32px; height:32px; flex:none; line-height:1; }
body.wuwa-theme .modal-header .close-modal:is(:hover,:focus-visible) { background:#8883; }
body.wuwa-theme :is(.modal-footer,.ad-foot,.forum-dialog .modal-actions) { border-top:1px solid var(--wu-edge); background:#dee1e5; color:var(--wu-ink); }
body.wuwa-theme .modal-content :is(.btn-outline,.btn-secondary,.btn-test),body.wuwa-theme .ad-btn {
  border:1px solid #969daa; background:#f7f8f8; color:var(--wu-ink); border-radius:4px;
}
/* 备份操作既有 button 也有文件选择 label；不要继承暗底上的深金文字。 */
body.wuwa-theme #ai-settings-modal :is(.config-export-btn,.config-import-label) {
  background:#f7f8fa; color:#292c34; border:1px solid #969daa; border-radius:4px;
  box-shadow:none; transform:none; transition:background-color .14s,border-color .14s;
}
body.wuwa-theme #ai-settings-modal :is(.config-export-btn,.config-import-label) i { color:inherit; }
body.wuwa-theme #ai-settings-modal :is(.config-export-btn,.config-import-label):is(:hover,:focus-visible) {
  background:#e5e8ed; color:#191c25; border-color:#696f7d;
}
body.wuwa-theme .modal-content :is(.btn-primary,.btn-success),body.wuwa-theme .ad-btn.primary {
  background:var(--wu-gold); color:#302d25; border:1px solid #a6915e; border-radius:4px;
}
body.wuwa-theme .modal-content .btn-danger,body.wuwa-theme .ad-card.danger .ad-btn.primary {
  background:#963c43; color:white; border:1px solid #81303a; border-radius:4px;
}
body.wuwa-theme .modal-content .btn:not(:disabled):hover,body.wuwa-theme .ad-btn:not(:disabled):hover { box-shadow:inset 0 0 0 1px currentColor; }
body.wuwa-theme .ad-head { padding:18px 18px 0; color:var(--wu-ink); }
body.wuwa-theme .ad-head i { color:var(--wu-focus); }
body.wuwa-theme .ad-card.danger .ad-head i { color:#963c43; }
body.wuwa-theme .ad-msg { padding-bottom:12px; color:var(--wu-muted); }
body.wuwa-theme .ad-body :is(input,textarea),body.wuwa-theme #settings-search { background:white; border:1px solid var(--ui-field-border); border-radius:4px; color:var(--wu-ink); }
body.wuwa-theme .ad-foot { padding-block:12px; }
body.wuwa-theme :is(.avatar-context-menu,.ai-avatar-context-menu,.friend-context-menu,.emoji-picker,.mention-menu) { background:#1c1c1d; color:#eeeae3; border:1px solid #77716a; border-radius:4px; }
body.wuwa-theme :is(.avatar-menu-item,.friend-menu-item):hover { color:#e8c690; background:#30302d; }
body.wuwa-theme .friend-menu-item.danger:hover { color:#ffa5a1; }

body.wuwa-theme #ai-settings-modal > .modal-content {
  width:min(1080px,96vw); height:min(740px,92dvh); max-width:96vw; max-height:94dvh;
  background:linear-gradient(140deg,#f5f6f4,var(--wu-paper) 70%,#dce0e4); container:wu-settings / inline-size;
}
body.wuwa-theme #ai-settings-modal .modal-header {
  background:var(--wu-bar) center / 100% 100% no-repeat,#dce0e3; border-bottom:1px solid var(--wu-edge); color:var(--wu-ink);
}
body.wuwa-theme #ai-settings-modal .settings-tabs { gap:5px; background:var(--wu-panel); border-color:#545966; margin-bottom:12px; }
body.wuwa-theme #ai-settings-modal .tab-button {
  flex:none; background:none; color:#e1e3e8; border:1px solid transparent; border-radius:3px; padding:9px 12px; font-weight:550; text-align:start;
}
body.wuwa-theme #ai-settings-modal .tab-button:is(:focus-visible,:hover) { color:#fff0c4; background:#ffffff0e; }
body.wuwa-theme #ai-settings-modal .tab-button.active { color:#302d25; border-color:#e5d3a5; background:var(--wu-gold); }
body.wuwa-theme #ai-settings-modal .mo-tab-pill { display:none; }
body.wuwa-theme #ai-settings-modal .tab-button.active::after { display:none; }
body.wuwa-theme #ai-settings-modal .set-fold { border:1px solid var(--wu-edge); border-radius:4px; background:var(--wu-surface); margin-bottom:8px; }
body.wuwa-theme #ai-settings-modal .set-fold:focus-within,body.wuwa-theme #ai-settings-modal .set-fold:hover { border-color:#b49a70; }
body.wuwa-theme #ai-settings-modal .set-fold > summary { padding:12px 16px; color:var(--wu-ink); background:linear-gradient(90deg,#dfe2e7ed,#f1f2f4ed),var(--wu-section) left center / auto 100% no-repeat; }
body.wuwa-theme #ai-settings-modal .set-fold[open] > summary { color:#483e28; background:linear-gradient(90deg,#eadcb8,#f4f3ed); border-bottom:1px solid var(--wu-edge); }
body.wuwa-theme #ai-settings-modal .set-fold-body { padding:14px; }
body.wuwa-theme #ai-settings-modal .form-group label { color:var(--wu-ink); }
body.wuwa-theme #ai-settings-modal .theme-card { background:var(--wu-surface); border:1px solid var(--wu-edge); border-radius:4px; color:var(--wu-ink); }
body.wuwa-theme #ai-settings-modal .theme-card:is(:hover,.active) { transform:none; border-color:var(--wu-focus); background:#f6efda; }
body.wuwa-theme #ai-settings-modal :is(input,select,textarea,button,summary):focus-visible { outline:2px solid var(--wu-focus); outline-offset:-2px; }
/* 按窗口实际宽度切换；手动拉窄设置窗口时也能回到可横滑的页签。 */
@container wu-settings (min-width:680px) {
  body.wuwa-theme #ai-settings-modal .modal-body {
    display:grid; grid-template-columns:150px minmax(0,1fr); align-content:start; align-items:start; gap:0 22px; padding:16px 20px 20px 12px;
    flex:1 1 0; min-height:0; container-type:size;
  }
  body.wuwa-theme #ai-settings-modal .settings-tabs {
    position:sticky; top:0; grid-column:1; flex-direction:column; align-items:stretch; margin:0; padding:0; gap:0;
    border:0; max-height:100cqh; overflow:hidden auto; scrollbar-width:thin; overscroll-behavior:contain;
  }
  body.wuwa-theme #ai-settings-modal .settings-tabs > .tab-button {
    width:100%; box-sizing:border-box; margin:0; min-height:36px; padding:8px 14px; border:0; border-radius:0;
  }
  body.wuwa-theme #ai-settings-modal .settings-tabs > .tab-button.active {
    background:var(--wu-gold); color:#292719; box-shadow:inset 3px 0 #816527;
  }
  body.wuwa-theme #ai-settings-modal .modal-body > :is(.tab-content,.settings-no-results) { grid-column:2; min-width:0; }
  body.wuwa-theme #ai-settings-modal .modal-body > .modal-footer { grid-column:1 / -1; }
}
@media (max-width:600px) {
  body.wuwa-theme #ai-settings-modal .modal-header { padding:9px 12px; }
  body.wuwa-theme #ai-settings-modal .modal-body { padding:12px; }
  body.wuwa-theme #ai-settings-modal .modal-footer { padding:8px 12px; }
}
body.wuwa-theme :is(.forum-dialog,.market-dialog) { border-top:3px solid #d2b985; }
body.wuwa-theme :is(.forum-dialog,.market-dialog) h2 { color:var(--wu-ink); }
/* 旧设置页含行内深色控件。只覆盖正文/控件的旧配色，保留主题色样、头像和用户预览。 */
body.wuwa-theme :is(.modal-content,.forum-dialog,.market-dialog) :is(select,textarea,input:not([type]),input:is([type=text],[type=search],[type=url],[type=email],[type=password],[type=number])) {
  color:var(--wu-ink) !important; background-color:var(--ui-field-bg) !important; border-color:var(--ui-field-border) !important;
}
body.wuwa-theme :is(.modal-content,.ad-card,.forum-dialog,.market-dialog) :is(input,textarea)::placeholder { color:var(--ui-field-placeholder); opacity:1; }
body.wuwa-theme :is(.modal-content,.forum-dialog,.market-dialog) option { background:white; color:var(--wu-ink); }
body.wuwa-theme .modal-content :is(label,h2,h3,h4,b,span,summary)[style*='color: #e6c78a'],
body.wuwa-theme .modal-content :is(label,h2,h3,h4,b,span,summary)[style*='color:#e6c78a'] { color:var(--wu-focus) !important; }
body.wuwa-theme .modal-content :is(p,small,label,span)[style*='#888'],body.wuwa-theme .modal-content :is(p,small,label,span)[style*='#aaa'] { color:var(--wu-muted) !important; }
body.wuwa-theme .modal-content :is(input[type=checkbox],input[type=range],input[type=radio]) { accent-color:var(--wu-focus) !important; }
body.wuwa-theme .modal-content :is(.set-fold-head,.wb-book-card,.wb-entry-card,.import-drawer,.friend-option,.shortcut-list li,.more-link,.laboratory-switch,.plugin-permissions-hint) { background:var(--wu-surface); border-color:var(--wu-edge); color:var(--wu-ink); }
body.wuwa-theme .modal-content :is(.set-fold-text b,.set-fold-section-head,.set-fold-section-head i,.set-fold-sum,.set-fold-caret,.more-link strong) { color:var(--wu-focus); }
body.wuwa-theme .modal-content :is(.ep-hint,.set-fold-tip,.set-fold-text small,.set-fold-section-desc,.plugin-permissions-desc,.more-link small,.settings-no-results,.settings-search-wrap i) { color:var(--wu-muted); }
body.wuwa-theme :is(.forum-dialog,.market-dialog) :is(label,.forum-close,.market-dialog-close,.context-text,.profile-user-row) { color:var(--wu-ink); }
body.wuwa-theme .forum-dialog .forum-primary { background:var(--wu-gold); color:var(--wu-ink); }

/* 更多 → 刷新网站：这些后代原本针对暗底显式指定浅色，不会继承面板文字色。 */
body.wuwa-theme #more-refresh { border-color:var(--wu-edge); }
body.wuwa-theme #more-refresh :is(h4,strong) { color:var(--wu-ink); }
body.wuwa-theme #more-refresh > p,body.wuwa-theme #more-refresh .more-refresh-btn small { color:#454d5b; }
body.wuwa-theme #more-refresh .more-refresh-btn { background:var(--wu-surface); border-color:var(--wu-edge); }
body.wuwa-theme #more-refresh .more-refresh-btn:not(:disabled):is(:hover,:focus-visible) { background:#f5f0e3; border-color:var(--wu-focus); }
body.wuwa-theme #more-refresh .more-refresh-btn small { font-size:.85em; }
body.wuwa-theme #more-refresh .more-refresh-btn em { color:#246143; font-weight:600; }
body.wuwa-theme #more-refresh .more-refresh-btn.is-danger { border-color:#b7777c; }
body.wuwa-theme #more-refresh .more-refresh-btn.is-danger :is(i,em) { color:#91343c; }
body.wuwa-theme #more-refresh .more-refresh-btn.is-danger:not(:disabled):is(:hover,:focus-visible) { background:#fcf0ef; border-color:#91343c; }

