/* My Center refinement: static materials, bounded motion and scoped overrides. */
#ref-modal-wrapper {
    --mc-edge: rgba(148,163,184,.18);
    --mc-soft: rgba(148,163,184,.075);
    --mc-accent: #7dd3fc;
    --mc-ease: cubic-bezier(.22,1,.36,1);
}
#edit-profile-modal, #topic-bbs-modal { --mc-ease: cubic-bezier(.22,1,.36,1); }
#ref-modal-wrapper .modal-content { scrollbar-width: thin; scrollbar-color: var(--mc-scroll-thumb) var(--mc-scroll-track); }
#ref-modal-wrapper .mc-topcard,
#ref-modal-wrapper .mc-insights {
    border: 1px solid var(--mc-edge);
    border-radius: 16px;
    box-shadow: none;
}
#ref-modal-wrapper .mc-insights { background: linear-gradient(160deg, var(--mc-soft), transparent 48%); }
#ref-modal-wrapper .mc-topcard { padding: 22px 18px; gap: 22px; }
#ref-modal-wrapper .mc-topcell-profile { min-width: 0; }
#ref-modal-wrapper .mc-topcell-earn .lucky-ref-earned {
    animation: none !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--mc-accent) !important;
    filter: none !important;
    font-size: clamp(28px, 4vw, 40px) !important;
    font-weight: 700 !important;
    letter-spacing: -.035em;
    font-variant-numeric: tabular-nums;
}
#ref-modal-wrapper .mc-topcell-earn > div:first-child { display: none; }
#ref-modal-wrapper .mc-topcell-earn > [data-i18n='lucky.commEarned'] { letter-spacing: .04em !important; font-size: 12px !important; margin-bottom: 8px !important; color: var(--mc-accent-ink) !important; }
#ref-modal-wrapper #agent-activation-overlay {
    border: 1px solid rgba(226,190,113,.22);
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(213,172,88,.07), transparent) !important;
    padding: 16px !important;
    overflow: hidden;
}
#ref-modal-wrapper #agent-activation-overlay h3 { color: #ebd49e !important; font-size: 19px !important; letter-spacing: -.025em; text-shadow: none !important; }
#ref-modal-wrapper #agent-activation-overlay p { color: #b8c5d9 !important; font-size: 12px !important; line-height: 1.65; }
#ref-modal-wrapper #agent-activation-overlay .btn-spin-1,
#ref-modal-wrapper .btn-spin-10 { animation: none !important; }
#ref-modal-wrapper #agent-activation-overlay .btn-spin-1::before,
#ref-modal-wrapper #agent-activation-overlay .btn-spin-1::after,
#ref-modal-wrapper .btn-spin-10::before,
#ref-modal-wrapper .btn-spin-10::after { animation: none !important; display: none; }
#ref-modal-wrapper #agent-activation-overlay .lucky-btn-neon {
    font-size: 13px !important;
    padding: 10px 18px !important;
}
#ref-modal-wrapper .mc-insights-title,
#ref-modal-wrapper .mc-badges-head { font-weight: 650; letter-spacing: -.015em; }
#ref-modal-wrapper .mc-insights-note { line-height: 1.7; color: var(--mc-ink-mute); padding-block: 22px; }
#ref-modal-wrapper .mc-comm-head { min-height: 32px; font-size: 13px; }
#ref-modal-wrapper .mc-comm-hint { font-size: 11px; color: var(--mc-ink-mute); }
#ref-modal-wrapper .mc-poll-item { border-color: var(--mc-edge); background: var(--mc-soft); border-radius: 10px; }
#ref-modal-wrapper .mc-poll-lit { border-color: rgba(213,172,88,.25) !important; background: rgba(213,172,88,.045) !important; }
#ref-modal-wrapper .mc-poll-lit .mc-poll-rank { color: var(--mc-gold-ink); }
#ref-modal-wrapper .mc-poll-title { font-weight: 600; font-size: 13px; }
#ref-modal-wrapper .mc-poll-meta { font-size: 11px; color: var(--mc-ink-mute); }
#ref-modal-wrapper .mc-vote-btn { min-height: 36px; padding-inline: 12px; border-radius: 8px; font-weight: 600; }
#ref-modal-wrapper .mc-bbs-preview { display: block; position: relative; }
#ref-modal-wrapper .mc-bbs-track { display: flex; flex-direction: column; gap: 8px; position: relative; }
#ref-modal-wrapper .mc-bbs-item {
    height: 46px; min-height: 46px; box-sizing: border-box; flex: 0 0 46px;
    padding: 10px 12px !important; border-radius: 9px;
    background: var(--mc-soft); border: 1px solid rgba(148,163,184,.06);
}
#ref-modal-wrapper .mc-bbs-text { font-size: 12px; line-height: 1.5; font-weight: 500; }
#ref-modal-wrapper .mc-bbs-who { font-size: 11px; color: var(--mc-ink-mute); }
#ref-modal-wrapper .mc-bbs-preview.mc-bbs-rotating {
    height: 154px; overflow: hidden; padding-block: 4px;
    mask-image: linear-gradient(transparent, #000 8px, #000 calc(100% - 12px), transparent);
}
/* Nonmoving mode keeps all fetched messages reachable by native scrolling. */
#ref-modal-wrapper .mc-bbs-preview:not(.mc-bbs-rotating) { max-height: 208px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--mc-scroll-thumb) var(--mc-scroll-track); }
#ref-modal-wrapper .mc-motion-toggle {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0; border-radius: 8px;
    border: 1px solid var(--mc-edge); color: var(--mc-ink-soft); background: transparent; cursor: pointer;
}
#ref-modal-wrapper .mc-motion-toggle[hidden] { display: none; }
#ref-modal-wrapper .mc-motion-toggle:hover { background: var(--mc-accent-bg); color: var(--mc-accent-ink); }
#ref-modal-wrapper :is(button, a, .mc-badge):focus-visible { outline: 2px solid var(--mc-accent); outline-offset: 3px; }
#ref-modal-wrapper .mc-badge-grid { grid-template-columns: repeat(6, minmax(0,1fr)) !important; gap: 10px; }
#ref-modal-wrapper .mc-badge {
    padding: 14px 10px 12px; gap: 9px; min-height: 126px; box-sizing: border-box;
    border-radius: 12px; background: var(--mc-soft); border-color: var(--mc-edge);
    box-shadow: none; animation: none; transition: border-color 180ms, background-color 180ms, transform 180ms var(--mc-ease), box-shadow 180ms;
}
#ref-modal-wrapper .mc-badge:hover { transform: translateY(-2px); border-color: var(--mc-accent-line); background: var(--mc-accent-bg); box-shadow: 0 6px 16px rgba(16,24,38,.08); }
#ref-modal-wrapper .mc-badge .mc-badge-icon {
    display: grid; place-items: center; height: 36px; width: 36px;
    color: var(--mc-ink-mute); border-radius: 10px; border: 1px solid var(--mc-line);
    background: var(--mc-soft); filter: none; font-size: 22px;
}
#ref-modal-wrapper .mc-badge .mc-badge-icon .ic { width: 22px; height: 22px; stroke-width: 1.6; }
#ref-modal-wrapper .mc-badge .mc-badge-name { color: var(--mc-ink-soft); font-size: 11px; font-weight: 550; line-height: 1.4; }
#ref-modal-wrapper .mc-badge .mc-badge-progress { font-size: 11px; color: var(--mc-ink-mute); font-variant-numeric: tabular-nums; }
#ref-modal-wrapper .mc-badge .mc-badge-bar { height: 3px; border-radius: 2px; background: var(--mc-surface-3); margin-top: auto; }
#ref-modal-wrapper .mc-badge .mc-badge-bar i {
    width: 100%; transform-origin: left; background: var(--mc-accent-ink);
    transition: transform 650ms var(--mc-ease); border-radius: inherit;
}
#ref-modal-wrapper .mc-badge.mc-earned { border-color: var(--mc-gold-line); background: linear-gradient(160deg, var(--mc-gold-bg), transparent); box-shadow: none; }
#ref-modal-wrapper .mc-badge.mc-earned .mc-badge-icon { color: var(--mc-gold-ink); border-color: var(--mc-gold-line); background: var(--mc-gold-bg); text-shadow: none; }
#ref-modal-wrapper .mc-badge.mc-earned .mc-badge-name { color: var(--mc-gold-ink); }
#ref-modal-wrapper .mc-badge.mc-earned .mc-badge-bar i { background: var(--mc-gold-ink); }
#ref-modal-wrapper .mc-badge.mc-earned::after {
    content: ''; position: absolute; inset: 0; border: 1px solid var(--mc-gold-line); border-radius: inherit;
    pointer-events: none; opacity: 0;
}
#ref-modal-wrapper .mc-badge-count { color: var(--mc-gold-ink); font-variant-numeric: tabular-nums; }
#ref-modal-wrapper .mc-wr-track { height: 4px; border-radius: 3px; overflow: hidden; }
#ref-modal-wrapper .mc-style-track { height: 5px; border-radius: 3px; }
#ref-modal-wrapper .ic { vertical-align: -.15em; }
@media (prefers-reduced-motion: no-preference) {
    #ref-modal-wrapper.mc-motion-open .mc-topcard { animation: mcCardReveal 480ms var(--mc-ease) both; }
    #ref-modal-wrapper.mc-motion-open #agent-activation-overlay h3 { animation: mcCopyReveal 580ms var(--mc-ease) both; }
    #ref-modal-wrapper.mc-motion-open .mc-badge.mc-earned::after { animation: mcBadgeLight 1000ms var(--mc-ease) calc(var(--badge-order, 0) * 20ms) both; }
    #ref-modal-wrapper.mc-motion-open .mc-badge.mc-earned .mc-badge-icon .ic { animation: mcSealLight 700ms var(--mc-ease) both; }
}
@keyframes mcCardReveal { from { opacity: .7; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mcCopyReveal { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mcBadgeLight { 0%,100% { opacity: 0; } 35% { opacity: .8; } }
@keyframes mcSealLight { from { opacity: .4; transform: scale(.88); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 1023px) { #ref-modal-wrapper .mc-badge-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; } }
@media (max-width: 600px) {
    html body #ref-modal-wrapper .mc-badge-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 8px; }
    #ref-modal-wrapper .mc-badge { padding: 12px 8px 10px; min-height: 128px; }
    #ref-modal-wrapper .mc-topcard { padding: 18px 14px; gap: 16px; }
    #ref-modal-wrapper .mc-topcell + .mc-topcell { border-left: 0; padding-left: 0; }
    #ref-modal-wrapper .mc-comm-enter { min-height: 36px; }
    #ref-modal-wrapper .mc-motion-toggle { height: 36px; width: 36px; }
    #ref-modal-wrapper .mc-bbs-who { max-width: 30%; }
}
@media (max-width: 359px) { html body #ref-modal-wrapper .mc-badge-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; } }
@media (prefers-reduced-motion: reduce) {
    #ref-modal-wrapper *, #ref-modal-wrapper *::before, #ref-modal-wrapper *::after {
        animation: none !important; transition: none !important; scroll-behavior: auto !important;
    }
}
/* 三主题裁决统一走 theme-tokens.css G 组令牌, 不再按主题写死色值。 */
#ref-modal-wrapper #agent-activation-overlay { background: linear-gradient(120deg, var(--mc-gold-bg), transparent), var(--mc-surface-2) !important; border-color: var(--mc-gold-line) !important; }
#ref-modal-wrapper #agent-activation-overlay [data-i18n='lucky.becomeAgentTitle'] {
    color: var(--mc-gold-ink) !important; background: none !important; -webkit-text-fill-color: currentColor !important;
    filter: none !important; font-size: 19px !important; font-weight: 650 !important; letter-spacing: -.025em !important;
}
#ref-modal-wrapper #agent-activation-overlay [data-i18n='lucky.becomeAgentDesc'] { color: var(--mc-ink-soft) !important; line-height: 1.6; text-align: center; }
#ref-modal-wrapper.mc-motion-open #agent-activation-overlay [data-i18n='lucky.becomeAgentTitle'] { animation: mcCopyReveal 580ms var(--mc-ease) both; }
@media (prefers-reduced-motion: reduce) { #ref-modal-wrapper.mc-motion-open #agent-activation-overlay [data-i18n='lucky.becomeAgentTitle'] { animation: none !important; } }
#ref-modal-wrapper .ref-modal-content { padding: 0 !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
/* 深色玻璃原本 0.85 透明 + 无 backdrop-filter → 页面内容透底形成噪点; 改不透明径向渐变保留层次 */
html body.dark-mode #ref-modal-wrapper .ref-modal-content,
html body.is-lucky-mode:not(.fun-mode) #ref-modal-wrapper .ref-modal-content {
    background: radial-gradient(circle at 50% 0%, #1E2235, #0B0F19) !important;
}
#ref-modal-wrapper .modal-header { background: var(--mc-header-bg) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-bottom: 1px solid var(--mc-line) !important; }
#ref-modal-wrapper .modal-header h3,
#ref-modal-wrapper .modal-header h3 > span:not(.lucky-vip-pill) { color: var(--mc-ink) !important; }
#ref-modal-wrapper .modal-header .close-btn { background: var(--mc-surface-2) !important; color: var(--mc-ink) !important; }
#ref-modal-wrapper .modal-header .close-btn:hover { background: var(--mc-surface-3) !important; }
#ref-modal-wrapper :is(.fs-banner,.fs-banner-pulse,.lucky-vip-pill) { animation: none !important; }
#ref-modal-wrapper .lucky-vip-pill { box-shadow: none !important; }
@media (max-width: 600px) {
    #ref-modal-wrapper .mc-badge .mc-badge-name { font-size: 12px; }
    #ref-modal-wrapper .modal-header { padding: 16px 18px !important; }
}

/* ============================================================================
 * H 组 — v6.161 元素级三主题裁决 (表面/墨色令牌见 theme-tokens.css G 组)
 * ----------------------------------------------------------------------------
 * 统一前缀 `html body #ref-modal-wrapper .modal-content` = (1,2,2)+：
 *   · element 数压过 ref-modal.css 浅色兜底 `body:not()×3 #ref-modal-wrapper .x` (1,3,1)
 *     —— 其中 `.lucky-ref-rules *` 把节点圆圈的浅字刷成 #0f172a，压深底仅 1.14:1；
 *   · 加载顺序压过 fun-mode.css 通配 (1,2,2)（本文件最后加载）；
 *   · !important 压过 index.html / app.js 写入的内联赛博色。
 * 深色主题升级前 0 不达标，令牌值沿用原赛博观感，故同一套规则三主题通用。
 * ========================================================================== */

/* H0. 语义状态常量：闪兑 Banner 四态 + 进度计量条。
   原 JS 内联亮红/亮绿渐变配白字仅 2.5~3.7:1，统一压深到白字 ≥4.5:1。 */
#ref-modal-wrapper {
    --mc-state-active: linear-gradient(135deg, #B91C1C, #7F1D1D);
    --mc-state-ready: linear-gradient(135deg, #0F6B3B, #064E3B);
    --mc-state-expired: linear-gradient(135deg, #57534E, #292524);
    --mc-meter-track: #16202E;
    --mc-meter-ramp: linear-gradient(90deg, #B91C1C, #B45309, #0F6B3B);
}

/* ── H1. 三合一名片卡 ─────────────────────────────────────────────────── */
html body #ref-modal-wrapper .modal-content .mc-topcard {
    background: var(--mc-surface) !important;
    border-color: var(--mc-line) !important;
}
html body #ref-modal-wrapper .modal-content #my-center-nickname { color: var(--mc-ink) !important; }
html body #ref-modal-wrapper .modal-content #my-center-address { color: var(--mc-ink-mute) !important; }
html body #ref-modal-wrapper .modal-content #my-center-address:hover {
    color: var(--mc-accent-ink) !important; background: var(--mc-accent-bg) !important;
}
html body #ref-modal-wrapper .modal-content #my-center-avatar,
html body #ref-modal-wrapper .modal-content #my-center-avatar-fallback { border-color: var(--mc-accent-line) !important; }
html body #ref-modal-wrapper .modal-content #my-center-avatar-fallback {
    background: var(--mc-surface-2) !important; color: var(--mc-ink-soft) !important;
}
html body #ref-modal-wrapper .modal-content .mc-topcell-profile .btn-mini {
    background: var(--mc-surface-2) !important; border-color: var(--mc-line-strong) !important;
    color: var(--mc-ink) !important; box-shadow: none !important;
}
html body #ref-modal-wrapper .modal-content .mc-topcell-profile .btn-mini:hover {
    background: var(--mc-accent-bg) !important; border-color: var(--mc-accent-line) !important;
    color: var(--mc-accent-ink) !important;
}
html body #ref-modal-wrapper .modal-content .mc-topcell-earn [data-i18n='lucky.viewAgentProgress'] {
    color: var(--mc-accent-ink) !important; background: var(--mc-accent-bg) !important;
    border-color: var(--mc-accent-line) !important;
}
html body #ref-modal-wrapper .modal-content .mc-topcell-earn [data-i18n='lucky.viewAgentProgress']:hover {
    background: var(--mc-surface-3) !important;
}

/* ── H2. 邀请链接 + 复制 ──────────────────────────────────────────────── */
html body #ref-modal-wrapper .modal-content .mc-topcell-invite [data-i18n='lucky.promoLink'] { color: var(--mc-ink) !important; }
html body #ref-modal-wrapper .modal-content .lucky-ref-link {
    background: var(--mc-surface-2) !important; border-color: var(--mc-line) !important;
    color: var(--mc-ink-soft) !important;
}
html body #ref-modal-wrapper .modal-content .mc-topcell-invite .lucky-btn-neon {
    background: var(--mc-copy-bg) !important; color: var(--mc-copy-ink) !important;
    border-color: transparent !important; text-shadow: none !important;
    box-shadow: 0 2px 8px rgba(16, 24, 38, .18) !important;
}
html body #ref-modal-wrapper .modal-content .mc-topcell-invite .lucky-btn-neon:hover {
    filter: brightness(1.07); box-shadow: 0 5px 14px rgba(16, 24, 38, .22) !important;
}
/* fun 的 C1b 通配把 -webkit-text-fill-color 刷成巧克力棕，压过这里的 color →
   洋红底深棕字 1.5:1。让填充色跟随按钮自身 color，三主题统一裁决。 */
html body #ref-modal-wrapper .modal-content .lucky-btn-neon,
html body #ref-modal-wrapper .modal-content .lucky-btn-neon * {
    -webkit-text-fill-color: currentColor !important;
}
html body #ref-modal-wrapper .modal-content .lucky-btn-neon * { color: inherit !important; }

/* ── H3. 预测偏好：风格胶囊 / 统计条 / 图例 / 胜率 / 投票 / BBS 入口 ────── */
html body #ref-modal-wrapper .modal-content .mc-style-pill { border-width: 1px !important; border-style: solid !important; }
html body #ref-modal-wrapper .modal-content .mc-style-pill.mc-aggressive {
    background: var(--mc-red-bg) !important; color: var(--mc-red-ink) !important; border-color: var(--mc-red-line) !important;
}
html body #ref-modal-wrapper .modal-content .mc-style-pill.mc-balanced {
    background: var(--mc-gold-bg) !important; color: var(--mc-gold-ink) !important; border-color: var(--mc-gold-line) !important;
}
html body #ref-modal-wrapper .modal-content .mc-style-pill.mc-conservative {
    background: var(--mc-green-bg) !important; color: var(--mc-green-ink) !important; border-color: var(--mc-green-line) !important;
}
html body #ref-modal-wrapper .modal-content .mc-style-pill.mc-unknown {
    background: var(--mc-surface-2) !important; color: var(--mc-ink-soft) !important; border-color: var(--mc-line-strong) !important;
}
html body #ref-modal-wrapper .modal-content .mc-stat {
    background: var(--mc-surface-2) !important; border-color: var(--mc-line) !important;
}
html body #ref-modal-wrapper .modal-content .mc-stat-v { color: var(--mc-ink) !important; }
html body #ref-modal-wrapper .modal-content .mc-stat-k { color: var(--mc-ink-mute) !important; }
html body #ref-modal-wrapper .modal-content .mc-legend-row,
html body #ref-modal-wrapper .modal-content .mc-wr-name,
html body #ref-modal-wrapper .modal-content .mc-wr-val,
html body #ref-modal-wrapper .modal-content .mc-poll-title,
html body #ref-modal-wrapper .modal-content .mc-bbs-text,
html body #ref-modal-wrapper .modal-content .mc-comm-head > span:first-child,
html body #ref-modal-wrapper .modal-content .mc-insights-title,
html body #ref-modal-wrapper .modal-content .mc-badges-head > span:first-child,
html body #ref-modal-wrapper .modal-content .mc-winrate-head > span:first-child,
html body #ref-modal-wrapper .modal-content .mc-style-meter-labels,
html body #ref-modal-wrapper .modal-content .mc-radar-total { color: var(--mc-ink) !important; }
html body #ref-modal-wrapper .modal-content .mc-legend-pct,
html body #ref-modal-wrapper .modal-content .mc-style-caption,
html body #ref-modal-wrapper .modal-content .mc-winrate-total { color: var(--mc-ink-soft) !important; }
html body #ref-modal-wrapper .modal-content .mc-legend-sub,
html body #ref-modal-wrapper .modal-content .mc-poll-meta,
html body #ref-modal-wrapper .modal-content .mc-comm-hint,
html body #ref-modal-wrapper .modal-content .mc-insights-note,
html body #ref-modal-wrapper .modal-content .mc-bbs-who { color: var(--mc-ink-mute) !important; }
html body #ref-modal-wrapper .modal-content .mc-poll-rank,
html body #ref-modal-wrapper .modal-content .mc-poll-rank .mono { color: var(--mc-ink-mute) !important; }
/* ref-modal.css:919 的浅色兜底 (1,4,1) !! 写死 #64748b，压过上面的令牌规则；
   留言卡底是 --mc-surface-2，合成后只有 4.39:1。同 :not 链 + .modal-content 夺回。 */
html body:not(.dark-mode):not(.is-lucky-mode):not(.fun-mode) #ref-modal-wrapper .modal-content .mc-bbs-who {
    color: var(--mc-ink-mute) !important;
}
html body #ref-modal-wrapper .modal-content .mc-poll-lit {
    border-color: var(--mc-gold-line) !important; background: var(--mc-gold-bg) !important;
}
html body #ref-modal-wrapper .modal-content .mc-poll-lit .mc-poll-rank { color: var(--mc-gold-ink) !important; }
html body #ref-modal-wrapper .modal-content .mc-vote-btn {
    background: var(--mc-green-bg) !important; color: var(--mc-green-ink) !important;
    border-color: var(--mc-green-line) !important; text-shadow: none !important;
}
html body #ref-modal-wrapper .modal-content .mc-vote-btn:hover {
    background: var(--mc-green-line) !important; color: var(--mc-green-ink) !important;
}
html body #ref-modal-wrapper .modal-content .mc-vote-btn.voted {
    background: var(--mc-green-solid) !important; color: #FFFFFF !important;
    border-color: var(--mc-green-solid) !important;
}
html body #ref-modal-wrapper .modal-content .mc-comm-enter {
    background: var(--mc-accent-bg) !important; color: var(--mc-accent-ink) !important;
    border-color: var(--mc-accent-line) !important;
}
html body #ref-modal-wrapper .modal-content .mc-comm-enter:hover { background: var(--mc-surface-3) !important; }
html body #ref-modal-wrapper .modal-content .mc-bbs-item {
    background: var(--mc-surface-2) !important; border-color: var(--mc-line) !important;
}
html body #ref-modal-wrapper .modal-content .mc-community { border-top-color: var(--mc-line) !important; }
html body #ref-modal-wrapper .modal-content .mc-comm-col + .mc-comm-col { border-left-color: var(--mc-line) !important; }

/* ── H4. NewCoin 闪兑卡：内联赛博色 → 令牌 ────────────────────────────── */
html body #ref-modal-wrapper .modal-content #fs-task-card {
    background: var(--mc-surface) !important; border-color: var(--mc-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body { border-top-color: var(--mc-line) !important; }
/* 内联文字色映射（index.html 静态 + app.js 历史卡动态渲染都命中） */
html body #ref-modal-wrapper .modal-content #fs-task-body :is([style*="color: #facc15"], [style*="color:#facc15"], [style*="color: #fde047"], [style*="color: #fde68a"]) { color: var(--mc-gold-ink) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body :is([style*="color: #fff"], [style*="color:#fff"], [style*="color: #f1f5f9"], [style*="color: #e2e8f0"]) { color: var(--mc-ink) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body [style*="color: #cbd5e1"] { color: var(--mc-ink-soft) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body :is([style*="color: #94a3b8"], [style*="color:#94a3b8"], [style*="color: #64748b"], [style*="color: #666"]) { color: var(--mc-ink-mute) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body [style*="color: #c4b5fd"] { color: var(--mc-purple-ink) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body [style*="color: #fca5a5"] { color: var(--mc-red-ink) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body :is([style*="color: #10b981"], [style*="color: #00e676"], [style*="color: #6ee7b7"]) { color: var(--mc-green-ink) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body [style*="color: #38bdf8"] { color: var(--mc-accent-ink) !important; }
/* 内联深色底映射：白卡上 rgba(34,34,34,.6) 会合成 #7a7a7a 灰底 */
html body #ref-modal-wrapper .modal-content #fs-task-body :is([style*="background: rgba(0,0,0,0.3)"], [style*="background: rgba(0,0,0,0.4)"], [style*="background: rgba(0,0,0,0.25)"]) { background: var(--mc-surface-2) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body :is([style*="background: rgba(34,34,34,0.6)"], [style*="background: rgba(34,34,34,0.8)"], [style*="background: rgba(0,0,0,0.5)"], [style*="background: rgba(0,0,0,0.6)"]) { background: var(--mc-surface-3) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body [style*="background: rgba(168,85,247,0.2)"] { background: var(--mc-purple-bg) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body [style*="background: rgba(239,68,68,0.15)"] { background: var(--mc-red-bg) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body [style*="background: rgba(56,189,248,0.2)"] { background: var(--mc-accent-bg) !important; }
/* 显式元素规则一律带 #fs-task-body：上面的内联映射是双 id (2,2,2)，
   只带单 id 的元素规则会被它压过，hover / 选中 / 计量条白字全部失效。 */
html body #ref-modal-wrapper .modal-content #fs-task-body [data-i18n='lucky.fsTaskTitle'] { color: var(--mc-gold-ink) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-status-pill {
    background: var(--mc-accent-bg) !important; color: var(--mc-accent-ink) !important;
    border: 1px solid var(--mc-accent-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-tabs {
    background: var(--mc-surface-2) !important; border-color: var(--mc-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-tab-btn {
    background: transparent !important; color: var(--mc-ink-mute) !important;
    border-color: transparent !important; text-shadow: none !important; box-shadow: none !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-tab-btn:hover { color: var(--mc-ink) !important; background: var(--mc-surface-3) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-tab-btn.active {
    background: var(--mc-gold-bg) !important; color: var(--mc-gold-ink) !important;
    border-color: var(--mc-gold-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body [data-i18n='lucky.fsTaskSelectAmount'] { color: var(--mc-ink-soft) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-amount-btn {
    background: var(--mc-surface) !important; color: var(--mc-gold-ink) !important;
    border: 1px solid var(--mc-gold-line) !important; text-shadow: none !important;
    box-shadow: none !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-amount-btn:hover {
    background: var(--mc-gold-bg) !important; border-color: var(--mc-gold-ink) !important;
    transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 24, 38, .10) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-amount-btn:active { transform: translateY(0) scale(.985); }
/* 选中态由 app.js 打 .is-selected（不再写内联色，否则 !important 会吃掉选中反馈） */
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-amount-btn.is-selected {
    background: var(--mc-gold-bg) !important; color: var(--mc-gold-ink) !important;
    border-color: var(--mc-gold-ink) !important;
    box-shadow: inset 0 0 0 1px var(--mc-gold-ink) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-amount-all-btn {
    background: var(--mc-purple-bg) !important; color: var(--mc-purple-ink) !important;
    border-color: var(--mc-purple-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-amount-all-btn:hover { border-color: var(--mc-purple-ink) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-amount-all-btn.is-selected {
    border-color: var(--mc-purple-ink) !important; box-shadow: inset 0 0 0 1px var(--mc-purple-ink) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-custom-amount {
    background: var(--mc-surface-2) !important; color: var(--mc-ink) !important;
    border-color: var(--mc-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-custom-amount::placeholder { color: var(--mc-ink-mute) !important; opacity: 1; }
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-balance-hint {
    background: var(--mc-surface-2) !important; border-color: var(--mc-gold-line) !important;
    color: var(--mc-gold-ink) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-create-btn,
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-main-btn:not([disabled]) {
    background: var(--mc-cta-bg) !important; color: var(--mc-cta-ink) !important;
    border-color: transparent !important; text-shadow: none !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-create-btn { box-shadow: 0 3px 12px rgba(124, 45, 18, .22) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-create-btn:hover { filter: brightness(1.06); box-shadow: 0 6px 18px rgba(124, 45, 18, .28) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-main-btn[disabled] {
    background: var(--mc-surface-3) !important; color: var(--mc-ink-mute) !important;
    border-color: var(--mc-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-cancel-btn {
    background: var(--mc-red-bg) !important; color: var(--mc-red-ink) !important;
    border-color: var(--mc-red-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-cancel-btn:hover { border-color: var(--mc-red-ink) !important; }
/* 计量条：深底 + 压深的红→琥珀→绿 ramp，白字在任何填充比例下都 ≥4.5:1 */
html body #ref-modal-wrapper .modal-content #fs-task-active > div:first-child {
    background: var(--mc-meter-track) !important; border-color: var(--mc-line-strong) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-progress { background: var(--mc-meter-ramp) !important; background-size: 200% 100% !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-progress-label,
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-progress-label * { color: #FFFFFF !important; text-shadow: 0 1px 3px rgba(0, 0, 0, .55) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-history-card {
    background: var(--mc-surface-2) !important; border-color: var(--mc-line) !important;
    color: var(--mc-ink) !important; text-shadow: none !important;
}
/* 语义态（app.js 打 data-state）：亮绿/亮红内联底已移除，这里按令牌裁决 */
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-status-pill[data-state="claimable"] {
    background: var(--mc-green-bg) !important; color: var(--mc-green-ink) !important;
    border-color: var(--mc-green-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-status-pill[data-state="expired"] {
    background: var(--mc-red-bg) !important; color: var(--mc-red-ink) !important;
    border-color: var(--mc-red-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-main-btn[data-state="claimable"] {
    background: var(--mc-state-ready) !important; color: #FFFFFF !important;
    border-color: var(--mc-green-line) !important;
    box-shadow: 0 3px 12px rgba(6, 78, 59, .24) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-main-btn[data-state="claimable"]:hover { filter: brightness(1.08); }
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-main-btn[data-state="active"],
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-main-btn[data-state="expired"],
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-task-main-btn[data-state="canceled"] {
    background: var(--mc-surface-3) !important; color: var(--mc-ink-mute) !important;
    border-color: var(--mc-line) !important; box-shadow: none !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body #fs-main-btn-icon .ic { width: 16px; height: 16px; }
/* 历史卡：状态胶囊 + 计量条（深底轨道 + 压深填充 → 白字恒 ≥4.5:1） */
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-pill {
    background: var(--mc-surface-3) !important; color: var(--mc-ink-mute) !important;
    border: 1px solid var(--mc-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-pill[data-state="completed"] {
    background: var(--mc-green-bg) !important; color: var(--mc-green-ink) !important;
    border-color: var(--mc-green-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-pill[data-state="expired"] {
    background: var(--mc-red-bg) !important; color: var(--mc-red-ink) !important;
    border-color: var(--mc-red-line) !important;
}
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-meter { background: var(--mc-meter-track) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-fill { background: #57534E !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-meter[data-state="completed"] .fs-hist-fill { background: var(--mc-green-solid) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-meter[data-state="expired"] .fs-hist-fill { background: #B91C1C !important; }
/* 历史卡文字：原内联灰/黄/紫在浅底上 1.6~4.4:1，统一走令牌 */
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-date,
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-unit,
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-arrow,
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-final-val { color: var(--mc-ink-mute) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-amount { color: var(--mc-gold-ink) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-out { color: var(--mc-ink-mute) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-out[data-state="completed"] { color: var(--mc-green-ink) !important; }
html body #ref-modal-wrapper .modal-content #fs-task-body .fs-hist-events-val { color: var(--mc-accent-ink) !important; }

/* ── H5. 闪兑 Banner：四态语义色（双 id 压过一切通配/内联） ────────────── */
html body #ref-modal-wrapper #fs-task-banner { background: var(--mc-banner-bg) !important; }
html body #ref-modal-wrapper #fs-task-banner[data-state="active"] { background: var(--mc-state-active) !important; }
html body #ref-modal-wrapper #fs-task-banner[data-state="claimable"] { background: var(--mc-state-ready) !important; }
html body #ref-modal-wrapper #fs-task-banner[data-state="expired"] { background: var(--mc-state-expired) !important; }
html body #ref-modal-wrapper #fs-task-banner .fs-banner-title { color: var(--mc-banner-ink) !important; }
html body #ref-modal-wrapper #fs-task-banner .fs-banner-sub { color: var(--mc-banner-sub) !important; }
html body #ref-modal-wrapper #fs-task-banner [data-i18n='lucky.fsTaskCountdown'],
html body #ref-modal-wrapper #fs-task-banner [data-i18n='lucky.fsTaskCountdownIdle'],
html body #ref-modal-wrapper #fs-task-banner [data-i18n='lucky.fsTaskCountdownReady'],
html body #ref-modal-wrapper #fs-task-banner [data-i18n='lucky.fsTaskCountdownExpired'] { color: var(--mc-banner-sub) !important; }
/* 状态底(红/绿/灰)比默认棕底浅一档，金/灰副标题在其上仅 4.4:1；状态态提为暖白保 ≥5:1 */
html body #ref-modal-wrapper #fs-task-banner[data-state="active"] :is(.fs-banner-sub, [data-i18n='lucky.fsTaskCountdown'], [data-i18n='lucky.fsTaskCountdownIdle'], [data-i18n='lucky.fsTaskCountdownReady'], [data-i18n='lucky.fsTaskCountdownExpired']),
html body #ref-modal-wrapper #fs-task-banner[data-state="claimable"] :is(.fs-banner-sub, [data-i18n='lucky.fsTaskCountdown'], [data-i18n='lucky.fsTaskCountdownIdle'], [data-i18n='lucky.fsTaskCountdownReady'], [data-i18n='lucky.fsTaskCountdownExpired']),
html body #ref-modal-wrapper #fs-task-banner[data-state="expired"] :is(.fs-banner-sub, [data-i18n='lucky.fsTaskCountdown'], [data-i18n='lucky.fsTaskCountdownIdle'], [data-i18n='lucky.fsTaskCountdownReady'], [data-i18n='lucky.fsTaskCountdownExpired']) { color: #FFF7E0 !important; }
html body #ref-modal-wrapper #fs-banner-countdown {
    color: var(--mc-banner-ink) !important; text-shadow: 0 1px 3px rgba(0, 0, 0, .45) !important;
}
/* 紧迫态：浅红 / 暖琥珀压在四态深底 Banner 上均 ≥5:1 */
html body #ref-modal-wrapper #fs-banner-countdown[data-urgency="soon"] {
    color: #FDE68A !important; text-shadow: 0 1px 3px rgba(0, 0, 0, .5) !important;
}
html body #ref-modal-wrapper #fs-banner-countdown[data-urgency="critical"] {
    color: #FEE2E2 !important; text-shadow: 0 0 14px rgba(254, 226, 226, .55), 0 1px 3px rgba(0, 0, 0, .55) !important;
}
html body #ref-modal-wrapper #fs-expand-btn {
    background: rgba(255, 255, 255, .16) !important; color: var(--mc-banner-ink) !important;
    border: 1px solid rgba(255, 255, 255, .30) !important;
}
html body #ref-modal-wrapper #fs-expand-btn:hover { background: rgba(255, 255, 255, .28) !important; }

/* ── H6. 代理等级卡：表面 / 等级 / 返佣 / 节点链 / 进度模块 ────────────── */
html body #ref-modal-wrapper .modal-content .mc-rules {
    background: var(--mc-surface) !important; border-color: var(--mc-line) !important;
}
html body #ref-modal-wrapper .modal-content .mc-rules [data-i18n='lucky.currentAgentLevel'],
html body #ref-modal-wrapper .modal-content .mc-rules [data-i18n='lucky.commissionRate'] { color: var(--mc-ink-mute) !important; }
html body #ref-modal-wrapper .modal-content .mc-rules .lucky-level-display:not(.lucky-vip-pill) {
    color: var(--mc-gold-ink) !important; filter: none !important; text-shadow: none !important;
}
html body #ref-modal-wrapper .modal-content .mc-rules .lucky-agent-rate { color: var(--mc-ink) !important; }
html body #ref-modal-wrapper .modal-content .mc-rules [data-locked-commission-display] {
    background: var(--mc-gold-bg) !important; border-color: var(--mc-gold-line) !important;
}
html body #ref-modal-wrapper .modal-content .mc-rules [data-locked-commission-display] span { color: var(--mc-gold-ink) !important; }
html body #ref-modal-wrapper .modal-content .mc-rules [data-locked-commission-display] [data-i18n='lucky.commissionLockedTip'] { color: var(--mc-ink-soft) !important; }
html body #ref-modal-wrapper .modal-content #agent-node-chain-container { border-top-color: var(--mc-line) !important; }
/* 节点圆圈三态：JS 内联调色板在浅色下是深底浅字，被浅色兜底刷成深字后 1.14:1。
   这里按状态类重新裁决，浅/深/欢乐盘各走自己的令牌。 */
html body #ref-modal-wrapper .modal-content .agent-node-circle {
    text-shadow: none !important; transition: transform 200ms var(--mc-ease), box-shadow 200ms, background-color 200ms;
}
html body #ref-modal-wrapper .modal-content .agent-node-circle.is-unreached {
    background: var(--mc-surface-2) !important; color: var(--mc-ink-mute) !important;
    border: 2px solid var(--mc-line-strong) !important;
}
html body #ref-modal-wrapper .modal-content .agent-node-circle.is-reached {
    background: var(--mc-gold-bg) !important; color: var(--mc-gold-ink) !important;
    border: 2px solid var(--mc-gold-line) !important;
}
html body #ref-modal-wrapper .modal-content .agent-node-circle.is-current {
    background: var(--mc-cta-bg) !important; color: var(--mc-cta-ink) !important;
    border: 2px solid var(--mc-gold-ink) !important;
}
/* 只有浅色主题需要抹掉 JS 内联的深色投影/金色光晕：深底上它们是层次，白底上是脏边。
   深色保留金光、欢乐盘保留呼吸光晕（animation 仍驱动 transform）。 */
html body:not(.dark-mode):not(.is-lucky-mode):not(.fun-mode) #ref-modal-wrapper .modal-content .agent-node-circle.is-unreached,
html body:not(.dark-mode):not(.is-lucky-mode):not(.fun-mode) #ref-modal-wrapper .modal-content .agent-node-circle.is-reached {
    box-shadow: none !important;
}
html body #ref-modal-wrapper .modal-content .agent-node-label { color: var(--mc-ink-mute) !important; text-shadow: none !important; }
html body #ref-modal-wrapper .modal-content .agent-node-label.is-reached { color: var(--mc-gold-ink) !important; }
html body #ref-modal-wrapper .modal-content .agent-node-label.is-current { color: var(--mc-ink) !important; font-weight: 750; }
html body #ref-modal-wrapper .modal-content .agent-node-item:hover .agent-node-circle { transform: translateY(-2px); }
/* 连接线：轨道走令牌，已达成段保留 JS 流光渐变 */
html body #ref-modal-wrapper .modal-content .agent-node-line { background: var(--mc-surface-3) !important; box-shadow: none !important; }

/* 进度模块（填充等级卡空腔）：团队概览 chips + 下一级双进度条 */
html body #ref-modal-wrapper .modal-content .mc-ap-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0;
}
html body #ref-modal-wrapper .modal-content .mc-ap-title {
    font-size: 12px; font-weight: 650; color: var(--mc-ink-soft); letter-spacing: .01em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html body #ref-modal-wrapper .modal-content .mc-ap-next { font-size: 12px; font-weight: 700; color: var(--mc-gold-ink); flex: 0 0 auto; }
html body #ref-modal-wrapper .modal-content .mc-ap-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
html body #ref-modal-wrapper .modal-content .mc-ap-chip {
    background: var(--mc-surface-2); border: 1px solid var(--mc-line); border-radius: 10px;
    padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
html body #ref-modal-wrapper .modal-content .mc-ap-chip b {
    font-size: 15px; font-weight: 750; color: var(--mc-ink); font-variant-numeric: tabular-nums;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html body #ref-modal-wrapper .modal-content .mc-ap-chip span {
    font-size: 10.5px; color: var(--mc-ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html body #ref-modal-wrapper .modal-content .mc-ap-rows { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
html body #ref-modal-wrapper .modal-content .mc-ap-row { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
html body #ref-modal-wrapper .modal-content .mc-ap-row-head {
    display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--mc-ink-soft); min-width: 0;
}
html body #ref-modal-wrapper .modal-content .mc-ap-row-head > span:first-child {
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html body #ref-modal-wrapper .modal-content .mc-ap-row-head .mono { color: var(--mc-ink-mute); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
html body #ref-modal-wrapper .modal-content .mc-ap-track { height: 5px; border-radius: 3px; background: var(--mc-surface-3); overflow: hidden; }
html body #ref-modal-wrapper .modal-content .mc-ap-track i {
    display: block; height: 100%; border-radius: inherit; background: var(--mc-gold-ink);
    transition: width 700ms var(--mc-ease);
}
html body #ref-modal-wrapper .modal-content .mc-ap-row.is-met .mc-ap-track i { background: var(--mc-green-solid); }
html body #ref-modal-wrapper .modal-content .mc-ap-row.is-met .mc-ap-row-head .mono { color: var(--mc-green-ink); }
html body #ref-modal-wrapper .modal-content .mc-ap-tip { font-size: 11px; line-height: 1.6; color: var(--mc-ink-mute); }

/* ── H7. 滚动条：轨道/滑块走令牌，不再黄黑赛博条压白卡 ────────────────── */
#ref-modal-wrapper .ref-modal-content::-webkit-scrollbar,
#ref-modal-wrapper #fs-panel-current::-webkit-scrollbar,
#ref-modal-wrapper #fs-history-list::-webkit-scrollbar,
#ref-modal-wrapper .mc-bbs-preview::-webkit-scrollbar { width: 8px; height: 8px; }
#ref-modal-wrapper .ref-modal-content::-webkit-scrollbar-track,
#ref-modal-wrapper #fs-panel-current::-webkit-scrollbar-track,
#ref-modal-wrapper #fs-history-list::-webkit-scrollbar-track,
#ref-modal-wrapper .mc-bbs-preview::-webkit-scrollbar-track { background: var(--mc-scroll-track) !important; border-radius: 4px; }
#ref-modal-wrapper .ref-modal-content::-webkit-scrollbar-thumb,
#ref-modal-wrapper #fs-panel-current::-webkit-scrollbar-thumb,
#ref-modal-wrapper #fs-history-list::-webkit-scrollbar-thumb,
#ref-modal-wrapper .mc-bbs-preview::-webkit-scrollbar-thumb {
    background: var(--mc-scroll-thumb) !important; border-radius: 4px; border: none !important;
}
#ref-modal-wrapper .ref-modal-content::-webkit-scrollbar-thumb:hover,
#ref-modal-wrapper #fs-panel-current::-webkit-scrollbar-thumb:hover,
#ref-modal-wrapper #fs-history-list::-webkit-scrollbar-thumb:hover { background: var(--mc-gold-ink) !important; }
#ref-modal-wrapper #fs-panel-current,
#ref-modal-wrapper #fs-history-list { scrollbar-width: thin; scrollbar-color: var(--mc-scroll-thumb) var(--mc-scroll-track); }

/* ── H8. 微交互：克制、有反馈、可被 reduced-motion 关掉 ───────────────── */
#ref-modal-wrapper .mc-poll-item { transition: border-color 180ms, background-color 180ms, transform 180ms var(--mc-ease); }
#ref-modal-wrapper .mc-poll-item:hover { transform: translateY(-1px); border-color: var(--mc-line-strong); }
#ref-modal-wrapper .mc-vote-btn,
#ref-modal-wrapper .mc-comm-enter,
#ref-modal-wrapper .fs-tab-btn,
#ref-modal-wrapper .fs-amount-btn,
#ref-modal-wrapper .mc-topcell-profile .btn-mini {
    transition: background-color 160ms, border-color 160ms, color 160ms, transform 160ms var(--mc-ease), box-shadow 160ms;
}
#ref-modal-wrapper .mc-vote-btn:active,
#ref-modal-wrapper .mc-comm-enter:active,
#ref-modal-wrapper .fs-tab-btn:active,
#ref-modal-wrapper #fs-task-create-btn:active,
#ref-modal-wrapper .mc-topcell-invite .lucky-btn-neon:active { transform: translateY(0) scale(.98); }
#ref-modal-wrapper .mc-ap-chip { transition: border-color 180ms, background-color 180ms; }
#ref-modal-wrapper .mc-ap-chip:hover { border-color: var(--mc-line-strong); }
@media (prefers-reduced-motion: reduce) {
    #ref-modal-wrapper .mc-poll-item:hover,
    #ref-modal-wrapper .agent-node-item:hover .agent-node-circle,
    #ref-modal-wrapper .fs-amount-btn:hover { transform: none; }
}
@media (max-width: 600px) {
    html body #ref-modal-wrapper .modal-content .mc-ap-chip b { font-size: 14px; }
    html body #ref-modal-wrapper .modal-content .mc-ap-chip span { font-size: 10px; }
}

/* ============================================================================
 * I 组 — v6.164 编辑资料 / 社区 BBS 弹窗重设计 + 代理卡满级态
 * ----------------------------------------------------------------------------
 * 令牌见 theme-tokens.css G/I 组。选择器统一 `html body #<modal> .modal-content …`
 * = (1,3,2) 起，压过 fun-mode.css:1535 的 `body.fun-mode #edit-profile-modal
 * .modal-content *` (1,2,2) !! 通配墨色，以及 main.css .btn-spin-10 的赛博琥珀字。
 * ========================================================================== */
#edit-profile-modal, #topic-bbs-modal { --mc-ease: cubic-bezier(.22, 1, .36, 1); }

/* ── I1. 外壳与头部：不透明主题表面 + 图标瓷片标题 ─────────────────────── */
html body #edit-profile-modal .modal-content,
html body #topic-bbs-modal .modal-content {
    padding: 0 !important;
    border: 1px solid var(--mc-line) !important;
    border-radius: 18px !important;
    box-shadow: var(--mc-modal-shadow) !important;
    color: var(--mc-ink) !important;
    max-height: 92vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--mc-scroll-thumb) var(--mc-scroll-track);
}
html body #edit-profile-modal .modal-content { width: min(400px, 94vw); max-width: 400px; }
html body #topic-bbs-modal .modal-content { width: min(600px, 94vw); max-width: 600px; }
html body #edit-profile-modal .modal-content::-webkit-scrollbar,
html body #topic-bbs-modal .modal-content::-webkit-scrollbar,
html body #topic-bbs-modal .bbs-pane::-webkit-scrollbar { width: 8px; height: 8px; }
html body #edit-profile-modal .modal-content::-webkit-scrollbar-track,
html body #topic-bbs-modal .modal-content::-webkit-scrollbar-track,
html body #topic-bbs-modal .bbs-pane::-webkit-scrollbar-track { background: var(--mc-scroll-track) !important; }
html body #edit-profile-modal .modal-content::-webkit-scrollbar-thumb,
html body #topic-bbs-modal .modal-content::-webkit-scrollbar-thumb,
html body #topic-bbs-modal .bbs-pane::-webkit-scrollbar-thumb {
    background: var(--mc-scroll-thumb) !important; border-radius: 4px; border: none !important;
}
html body #edit-profile-modal .modal-header,
html body #topic-bbs-modal .modal-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 18px; margin-bottom: 0;
    background: var(--mc-header-bg) !important;
    border-bottom: 1px solid var(--mc-line) !important;
    position: sticky; top: 0; z-index: 3;
}
html body #edit-profile-modal .modal-header h3,
html body #topic-bbs-modal .modal-header h3 {
    display: flex; align-items: center; gap: 10px; margin: 0; min-width: 0;
    font-size: 16px; font-weight: 700; letter-spacing: -.01em;
    color: var(--mc-ink) !important;
}
html body #edit-profile-modal .modal-header h3 .ic,
html body #topic-bbs-modal .modal-header h3 .ic {
    flex: 0 0 auto; width: 30px; height: 30px; padding: 6px; box-sizing: border-box;
    border-radius: 9px; background: var(--mc-accent-bg); color: var(--mc-accent-ink) !important;
    border: 1px solid var(--mc-accent-line); stroke-width: 1.7;
}
html body #topic-bbs-modal .modal-header h3 .ic {
    background: var(--mc-gold-bg); color: var(--mc-gold-ink) !important; border-color: var(--mc-gold-line);
}
html body #edit-profile-modal .close-btn,
html body #topic-bbs-modal .close-btn {
    flex: 0 0 auto; width: 32px; height: 32px; padding: 0; display: grid; place-items: center;
    border-radius: 9px; border: 1px solid var(--mc-line);
    background: var(--mc-surface-2) !important; color: var(--mc-ink-soft) !important;
    font-size: 18px; line-height: 1; cursor: pointer;
    transition: background-color 160ms, color 160ms, transform 160ms var(--mc-ease);
}
html body #edit-profile-modal .close-btn:hover,
html body #topic-bbs-modal .close-btn:hover {
    background: var(--mc-surface-3) !important; color: var(--mc-ink) !important; transform: rotate(90deg);
}
html body #edit-profile-modal :is(button, input, label):focus-visible,
html body #topic-bbs-modal :is(button, input, textarea):focus-visible {
    outline: 2px solid var(--mc-accent); outline-offset: 2px;
}

/* ── I2. 编辑资料：身份区 / 昵称字段 / 保存 CTA / 安全区 ───────────────── */
html body #edit-profile-modal .modal-content .ep-body { display: flex; flex-direction: column; gap: 18px; padding: 20px 18px 18px; }
html body #edit-profile-modal .modal-content .ep-identity { display: flex; flex-direction: column; align-items: center; gap: 10px; }
html body #edit-profile-modal .modal-content .ep-avatar {
    position: relative; display: grid; place-items: center; width: 96px; height: 96px;
    border-radius: 50%; border: 2px solid transparent; cursor: pointer;
    background: linear-gradient(var(--mc-surface-2), var(--mc-surface-2)) padding-box,
        conic-gradient(from 200deg, var(--mc-accent-ink), var(--mc-purple-ink), var(--mc-gold-ink), var(--mc-accent-ink)) border-box;
    transition: transform 220ms var(--mc-ease), box-shadow 220ms;
}
html body #edit-profile-modal .modal-content .ep-avatar:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(8, 12, 20, .20); }
html body #edit-profile-modal .modal-content .ep-avatar-img,
html body #edit-profile-modal .modal-content .ep-avatar-fallback {
    grid-area: 1 / 1; width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
}
html body #edit-profile-modal .modal-content .ep-avatar-fallback {
    display: flex; align-items: center; justify-content: center;
    background: var(--mc-surface-2); color: var(--mc-accent-ink) !important;
}
html body #edit-profile-modal .modal-content .ep-avatar-fallback .ic { width: 40px; height: 40px; stroke-width: 1.5; }
html body #edit-profile-modal .modal-content .ep-avatar-cam {
    position: absolute; right: -2px; bottom: -2px; z-index: 2;
    width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
    background: var(--mc-accent-bg); color: var(--mc-accent-ink) !important;
    border: 2px solid var(--mc-modal-bg); box-shadow: 0 2px 8px rgba(8, 12, 20, .22);
    transition: transform 200ms var(--mc-ease);
}
html body #edit-profile-modal .modal-content .ep-avatar-cam .ic { width: 15px; height: 15px; stroke-width: 1.9; }
html body #edit-profile-modal .modal-content .ep-avatar:hover .ep-avatar-cam { transform: scale(1.08); }
html body #edit-profile-modal .modal-content .ep-hint { font-size: 12px; line-height: 1.5; color: var(--mc-ink-mute) !important; text-align: center; }
html body #edit-profile-modal .modal-content .ep-hint .ic { width: 14px; height: 14px; vertical-align: -.2em; }
html body #edit-profile-modal .modal-content .ep-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
html body #edit-profile-modal .modal-content .ep-field > label {
    font-size: 12px; font-weight: 650; letter-spacing: .02em; color: var(--mc-ink-soft) !important;
}
html body #edit-profile-modal .modal-content .ep-input {
    width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 11px;
    background: var(--mc-surface-2) !important; border: 1px solid var(--mc-line) !important;
    color: var(--mc-ink) !important; font-size: 14px; font-family: var(--font-sans);
    transition: border-color 160ms, box-shadow 160ms, background-color 160ms;
}
html body #edit-profile-modal .modal-content .ep-input::placeholder { color: var(--mc-ink-mute); opacity: .8; }
html body #edit-profile-modal .modal-content .ep-input:focus {
    outline: none; background: var(--mc-surface) !important;
    border-color: var(--mc-accent-line) !important; box-shadow: 0 0 0 3px var(--mc-accent-bg) !important;
}
html body #edit-profile-modal .modal-content .ep-save {
    width: 100%; min-height: 46px; padding: 12px 18px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 12px !important; border: 1px solid transparent !important;
    background: var(--mc-copy-bg) !important; color: var(--mc-copy-ink) !important;
    -webkit-text-fill-color: currentColor !important;
    box-shadow: 0 8px 20px rgba(76, 29, 149, .26) !important;
    font-family: var(--font-sans); font-size: 14px; font-weight: 700;
    letter-spacing: .02em; text-transform: none; text-shadow: none !important;
}
html body #edit-profile-modal .modal-content .ep-save *,
html body #edit-profile-modal .modal-content .ep-save .ic { color: inherit !important; -webkit-text-fill-color: currentColor !important; }
html body #edit-profile-modal .modal-content .ep-save .ic { width: 18px; height: 18px; stroke-width: 1.8; }
html body #edit-profile-modal .modal-content .ep-save:hover {
    background: var(--mc-copy-bg) !important; color: var(--mc-copy-ink) !important;
    -webkit-text-fill-color: currentColor !important;
    filter: brightness(1.08); transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(76, 29, 149, .32) !important;
}
html body #edit-profile-modal .modal-content .ep-save:active { transform: translateY(0) scale(.99); }
html body #edit-profile-modal .modal-content .ep-save[disabled] { opacity: .6; cursor: progress; filter: none; transform: none; }
html body #edit-profile-modal .modal-content .ep-security {
    padding: 14px; border-radius: 14px; background: var(--mc-surface-2);
    border: 1px solid var(--mc-line);
}
html body #edit-profile-modal .modal-content .ep-security-head {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
    font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--mc-ink-soft) !important;
}
html body #edit-profile-modal .modal-content .ep-security-head .ic { width: 16px; height: 16px; color: var(--mc-red-ink) !important; stroke-width: 1.8; }
html body #edit-profile-modal .modal-content .ep-export {
    width: 100%; min-height: 42px; padding: 10px 14px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 10px; border: 1px solid var(--mc-red-line);
    background: var(--mc-surface); color: var(--mc-red-ink) !important;
    font-family: var(--font-sans); font-size: 13px; font-weight: 650; cursor: pointer;
    transition: background-color 160ms, color 160ms, border-color 160ms, transform 160ms var(--mc-ease);
}
html body #edit-profile-modal .modal-content .ep-export .ic { width: 16px; height: 16px; color: inherit !important; stroke-width: 1.8; }
html body #edit-profile-modal .modal-content .ep-export:hover {
    background: var(--mc-red-solid); border-color: var(--mc-red-solid); color: #FFFFFF !important; transform: translateY(-1px);
}
html body #edit-profile-modal .modal-content .ep-export:hover .ic { color: #FFFFFF !important; }
html body #edit-profile-modal .modal-content .ep-export:active { transform: translateY(0) scale(.99); }

/* ── I3. BBS：分段页签 / 投票行 / 留言卡 / 回复 / composer ─────────────── */
html body #topic-bbs-modal .bbs-tabs {
    display: flex; gap: 4px; padding: 4px; margin: 14px 18px 12px;
    background: var(--mc-seg-track); border: 1px solid var(--mc-line); border-radius: 13px;
}
html body #topic-bbs-modal .bbs-tab {
    flex: 1 1 0; min-width: 0; min-height: 38px; padding: 8px 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border-radius: 9px; border: 1px solid transparent; background: transparent;
    color: var(--mc-ink-mute) !important; font-family: var(--font-sans);
    font-size: 13px; font-weight: 650; cursor: pointer;
    transition: background-color 180ms, color 180ms, box-shadow 180ms, transform 180ms var(--mc-ease);
}
html body #topic-bbs-modal .bbs-tab .ic { width: 16px; height: 16px; color: inherit !important; stroke-width: 1.8; }
html body #topic-bbs-modal .bbs-tab:hover { color: var(--mc-ink) !important; background: var(--mc-soft); }
html body #topic-bbs-modal .bbs-tab.active {
    background: var(--mc-seg-active); color: var(--mc-accent-ink) !important;
    border-color: var(--mc-line); box-shadow: 0 2px 8px rgba(8, 12, 20, .12); font-weight: 700;
}
html body #topic-bbs-modal .bbs-tab:active { transform: scale(.985); }
html body #topic-bbs-modal .bbs-pane {
    display: flex; flex-direction: column; gap: 8px; min-width: 0;
    max-height: min(46vh, 420px); overflow-y: auto; padding: 2px 18px 4px; margin-bottom: 12px;
    scrollbar-width: thin; scrollbar-color: var(--mc-scroll-thumb) var(--mc-scroll-track);
}
html body #topic-bbs-modal .mc-insights-note { color: var(--mc-ink-mute) !important; font-size: 12.5px; line-height: 1.7; padding: 18px 4px; text-align: center; }
html body #topic-bbs-modal .mc-poll-item {
    display: flex; align-items: center; gap: 10px; min-width: 0;
    padding: 9px 11px; border-radius: 11px;
    background: var(--mc-surface-2) !important; border: 1px solid var(--mc-line) !important;
    box-shadow: none !important;
    transition: border-color 180ms, background-color 180ms, transform 180ms var(--mc-ease);
}
html body #topic-bbs-modal .mc-poll-item:hover { transform: translateY(-1px); border-color: var(--mc-line-strong) !important; }
html body #topic-bbs-modal .mc-poll-item.mc-poll-lit {
    background: linear-gradient(135deg, var(--mc-gold-bg), var(--mc-surface-2)) !important;
    border-color: var(--mc-gold-line) !important;
}
html body #topic-bbs-modal .mc-poll-rank { width: 24px; flex: 0 0 auto; text-align: center; color: var(--mc-ink-mute) !important; font-size: 12px; }
html body #topic-bbs-modal .mc-poll-rank .ic { width: 18px; height: 18px; color: var(--mc-gold-ink) !important; }
html body #topic-bbs-modal .mc-poll-info { flex: 1 1 auto; min-width: 0; }
html body #topic-bbs-modal .mc-poll-title {
    font-size: 13px; font-weight: 650; color: var(--mc-ink) !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html body #topic-bbs-modal .mc-poll-meta { font-size: 11px; color: var(--mc-ink-mute) !important; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body #topic-bbs-modal .mc-vote-btn {
    flex: 0 0 auto; min-height: 34px; padding: 6px 12px; border-radius: 9px;
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--mc-green-bg) !important; color: var(--mc-green-ink) !important;
    border: 1px solid var(--mc-green-line) !important;
    font-family: var(--font-sans); font-size: 12px; font-weight: 700; cursor: pointer;
    transition: background-color 160ms, color 160ms, transform 160ms var(--mc-ease);
}
html body #topic-bbs-modal .mc-vote-btn .ic { width: 15px; height: 15px; color: inherit !important; }
html body #topic-bbs-modal .mc-vote-btn:hover { background: var(--mc-green-solid) !important; color: #FFFFFF !important; transform: translateY(-1px); }
html body #topic-bbs-modal .mc-vote-btn:hover .ic { color: #FFFFFF !important; }
html body #topic-bbs-modal .mc-vote-btn.voted { background: var(--mc-green-solid) !important; color: #FFFFFF !important; border-color: var(--mc-green-solid) !important; }
html body #topic-bbs-modal .bbs-msg {
    background: var(--mc-surface-2) !important; border: 1px solid var(--mc-line) !important;
    border-radius: 12px; padding: 12px 14px; min-width: 0;
    transition: border-color 180ms;
}
html body #topic-bbs-modal .bbs-msg:hover { border-color: var(--mc-line-strong) !important; }
html body #topic-bbs-modal .bbs-msg-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 11px; color: var(--mc-ink-mute) !important; margin-bottom: 6px;
}
html body #topic-bbs-modal .bbs-msg-head b { font-size: 12.5px; font-weight: 700; color: var(--mc-ink) !important; }
html body #topic-bbs-modal .bbs-msg-head .mono { font-size: 10.5px; color: var(--mc-ink-mute) !important; opacity: .85; }
html body #topic-bbs-modal .bbs-msg-status { display: inline-flex; align-items: center; }
html body #topic-bbs-modal .bbs-msg-status .ic { width: 14px; height: 14px; stroke-width: 1.9; }
html body #topic-bbs-modal .bbs-msg-status[data-state="approved"] .ic { color: var(--mc-green-ink) !important; }
html body #topic-bbs-modal .bbs-msg-status[data-state="pending"] .ic { color: var(--mc-gold-ink) !important; }
html body #topic-bbs-modal .bbs-msg-time { margin-left: auto; font-variant-numeric: tabular-nums; }
html body #topic-bbs-modal .bbs-msg-text { font-size: 13px; line-height: 1.65; color: var(--mc-ink-soft) !important; }
html body #topic-bbs-modal .bbs-msg-actions { display: flex; gap: 8px; margin-top: 8px; }
html body #topic-bbs-modal .bbs-reply-btn {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 7px;
    background: transparent; border: none; color: var(--mc-accent-ink) !important;
    font-family: var(--font-sans); font-size: 12px; font-weight: 650; cursor: pointer;
    transition: background-color 160ms;
}
html body #topic-bbs-modal .bbs-reply-btn .ic { width: 14px; height: 14px; color: inherit !important; }
html body #topic-bbs-modal .bbs-reply-btn:hover { background: var(--mc-accent-bg); text-decoration: none; }
html body #topic-bbs-modal .bbs-replies {
    margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--mc-accent-line);
    display: flex; flex-direction: column; gap: 6px;
}
html body #topic-bbs-modal .bbs-reply-item { font-size: 12px; line-height: 1.55; color: var(--mc-ink-soft) !important; }
html body #topic-bbs-modal .bbs-reply-item b { color: var(--mc-ink) !important; margin-right: 6px; }
html body #topic-bbs-modal .bbs-reply-box { display: flex; gap: 6px; margin-top: 8px; }
html body #topic-bbs-modal .bbs-reply-box input {
    flex: 1 1 auto; min-width: 0; padding: 7px 10px; border-radius: 9px;
    background: var(--mc-surface) !important; border: 1px solid var(--mc-line) !important;
    color: var(--mc-ink) !important; font-size: 12px; font-family: var(--font-sans);
}
html body #topic-bbs-modal .bbs-reply-box input:focus {
    outline: none; border-color: var(--mc-accent-line) !important; box-shadow: 0 0 0 3px var(--mc-accent-bg) !important;
}
html body #topic-bbs-modal .bbs-reply-box button {
    flex: 0 0 auto; padding: 0 12px; border-radius: 9px;
    background: var(--mc-accent-bg) !important; color: var(--mc-accent-ink) !important;
    border: 1px solid var(--mc-accent-line) !important;
    font-family: var(--font-sans); font-size: 12px; font-weight: 700; cursor: pointer;
}
html body #topic-bbs-modal .bbs-reply-box button:hover { background: var(--mc-accent-ink) !important; color: var(--mc-surface) !important; }
html body #topic-bbs-modal .bbs-loading { text-align: center; color: var(--mc-ink-mute) !important; font-size: 12px; padding: 10px; }
html body #topic-bbs-modal .bbs-composer {
    display: flex; align-items: flex-end; gap: 10px;
    padding: 14px 18px 16px; border-top: 1px solid var(--mc-line);
    background: var(--mc-header-bg); position: sticky; bottom: 0; z-index: 2;
}
html body #topic-bbs-modal .bbs-composer-field { position: relative; flex: 1 1 auto; min-width: 0; }
html body #topic-bbs-modal .bbs-composer textarea {
    display: block; width: 100%; box-sizing: border-box; min-height: 66px;
    padding: 10px 12px 22px; border-radius: 12px; resize: none;
    background: var(--mc-surface-2) !important; border: 1px solid var(--mc-line) !important;
    color: var(--mc-ink) !important; font-size: 13px; line-height: 1.55; font-family: var(--font-sans);
    transition: border-color 160ms, box-shadow 160ms, background-color 160ms;
}
html body #topic-bbs-modal .bbs-composer textarea::placeholder { color: var(--mc-ink-mute); opacity: .85; }
html body #topic-bbs-modal .bbs-composer textarea:focus {
    outline: none; background: var(--mc-surface) !important;
    border-color: var(--mc-accent-line) !important; box-shadow: 0 0 0 3px var(--mc-accent-bg) !important;
}
html body #topic-bbs-modal .bbs-count {
    position: absolute; right: 11px; bottom: 7px; pointer-events: none;
    font-size: 10.5px; color: var(--mc-ink-mute) !important; font-variant-numeric: tabular-nums;
}
html body #topic-bbs-modal .bbs-count.is-near { color: var(--mc-gold-ink) !important; font-weight: 700; }
html body #topic-bbs-modal .bbs-submit {
    flex: 0 0 auto; min-height: 44px; padding: 0 18px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    background: var(--mc-copy-bg) !important; color: var(--mc-copy-ink) !important;
    border: 1px solid transparent !important; box-shadow: 0 6px 16px rgba(76, 29, 149, .24);
    font-family: var(--font-sans); font-size: 13px; font-weight: 700; cursor: pointer;
    transition: filter 160ms, transform 160ms var(--mc-ease), box-shadow 160ms;
}
html body #topic-bbs-modal .bbs-submit .ic { width: 16px; height: 16px; color: inherit !important; stroke-width: 1.9; }
html body #topic-bbs-modal .bbs-submit:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(76, 29, 149, .30); }
html body #topic-bbs-modal .bbs-submit:active { transform: translateY(0) scale(.99); }
html body #topic-bbs-modal .bbs-submit:disabled { opacity: .55; cursor: not-allowed; filter: none; transform: none; }

/* ── I4. 代理等级卡：满级 banner 取代误导满条 + 进度渐变 ───────────────── */
html body #ref-modal-wrapper .modal-content .mc-ap-track i {
    background: linear-gradient(90deg, var(--mc-accent-ink), var(--mc-gold-ink));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
html body #ref-modal-wrapper .modal-content .mc-ap-row.is-met .mc-ap-track i {
    background: var(--mc-green-solid); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
html body #ref-modal-wrapper .modal-content .mc-ap-max {
    display: flex; align-items: center; gap: 12px; min-width: 0;
    padding: 12px 14px; border-radius: 12px;
    background: linear-gradient(135deg, var(--mc-gold-bg), var(--mc-surface-2));
    border: 1px solid var(--mc-gold-line);
}
html body #ref-modal-wrapper .modal-content .mc-ap-max-ic {
    flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center;
    border-radius: 10px; background: var(--mc-cta-bg); color: var(--mc-cta-ink) !important;
    box-shadow: 0 4px 12px rgba(120, 53, 15, .22);
}
html body #ref-modal-wrapper .modal-content .mc-ap-max-ic .ic { width: 19px; height: 19px; color: inherit !important; stroke-width: 1.8; }
html body #ref-modal-wrapper .modal-content .mc-ap-max-tip {
    flex: 1 1 auto; min-width: 0; font-size: 11.5px; line-height: 1.6; color: var(--mc-ink-soft) !important;
}
html body #ref-modal-wrapper .modal-content .mc-ap-max-pill {
    flex: 0 0 auto; padding: 4px 9px; border-radius: 999px;
    background: var(--mc-surface); border: 1px solid var(--mc-gold-line);
    color: var(--mc-gold-ink) !important; font-size: 10.5px; font-weight: 800; letter-spacing: .08em;
}

/* ── I5. 社区头部：图标瓷片区分投票榜 / 留言板 ─────────────────────────── */
#ref-modal-wrapper .mc-comm-head > span:first-child {
    min-width: 0; font-weight: 650; color: var(--mc-ink);
}
#ref-modal-wrapper .mc-comm-head > span:first-child .ic {
    width: 26px; height: 26px; padding: 5px; box-sizing: border-box;
    border-radius: 8px; background: var(--mc-accent-bg); color: var(--mc-accent-ink);
    border: 1px solid var(--mc-accent-line); stroke-width: 1.7;
    vertical-align: middle; margin-right: 7px; position: relative; top: -1px;
}
#ref-modal-wrapper .mc-comm-col:last-child .mc-comm-head > span:first-child .ic {
    background: var(--mc-gold-bg); color: var(--mc-gold-ink); border-color: var(--mc-gold-line);
}

@media (prefers-reduced-motion: reduce) {
    #edit-profile-modal *, #topic-bbs-modal *,
    #edit-profile-modal *::before, #topic-bbs-modal *::after { animation: none !important; transition: none !important; }
    html body #edit-profile-modal .modal-content .ep-avatar:hover,
    html body #edit-profile-modal .modal-content .ep-save:hover,
    html body #edit-profile-modal .modal-content .ep-export:hover,
    html body #topic-bbs-modal .bbs-submit:hover,
    html body #topic-bbs-modal .mc-poll-item:hover,
    html body #edit-profile-modal .close-btn:hover,
    html body #topic-bbs-modal .close-btn:hover { transform: none; }
}
@media (max-width: 600px) {
    html body #edit-profile-modal .modal-header,
    html body #topic-bbs-modal .modal-header { padding: 14px 16px; }
    html body #edit-profile-modal .modal-content .ep-body { padding: 18px 16px 16px; gap: 16px; }
    html body #edit-profile-modal .modal-content .ep-avatar { width: 88px; height: 88px; }
    html body #topic-bbs-modal .bbs-tabs { margin: 12px 16px 10px; }
    html body #topic-bbs-modal .bbs-pane { padding: 2px 16px 4px; max-height: 42vh; }
    html body #topic-bbs-modal .bbs-composer { padding: 12px 16px 14px; gap: 8px; }
    html body #topic-bbs-modal .bbs-submit { padding: 0 14px; }
    html body #topic-bbs-modal .bbs-tab { font-size: 12.5px; padding: 8px 8px; }
}
