/*! ACGFav Phase 12 (v13.0) Core Stylesheet — Global A11y, Dark/Light Contrast, Mobile UX */
.lazy,
.sites-icon.lazy,
[class*="placeholder"] {
    -webkit-animation: none !important;
    animation: none !important;
}

/* 2. Swiper 分页圆点与悬浮工具按钮安全触控热区 (>= 24x24px) */
.swiper-pagination-bullet {
    width: 24px !important;
    height: 24px !important;
    padding: 8px !important;
    margin: 0 2px !important;
    background-clip: content-box !important;
    box-sizing: border-box !important;
}
.swiper-pagination-bullet-active {
    width: 30px !important;
}
#footer-tools .btn-tools {
    min-width: 40px !important;
    min-height: 40px !important;
    margin: 5px 0 !important;
}
.item-tags .badge {
    display: inline-flex !important;
    align-items: center;
    min-height: 24px !important;
    line-height: 1.2 !important;
    padding: 4px 9px !important;
    margin: 3px 6px 3px 0 !important;
    box-sizing: border-box;
}

/* 3. 正文行内链接非纯颜色可辨识（修复 link-in-text-block） */
.acgfav-sites-seo-block__route a,
.panel-body p a:not(.btn):not(.badge) {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* 4. 浅色模式全页面 WCAG 2.2 AA (>= 4.5:1) 对比度加固（深色模式 io-black-mode 完全保持原样） */
html:not(.io-black-mode) body:not(.io-black-mode) #acgfavTodayDayTag,
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-today-day-tag {
    background: #1e40af !important;
    color: #ffffff !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-today-count-tag,
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-today-header-left > span:not(.acgfav-today-day-tag) {
    color: #1e293b !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-me-title {
    color: #0f172a !important;
}
/* [v12.0] #acgfavHomeCheckinBtn 双态高对比样式已移至 v12.0 专属区块 */
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-today-more-link {
    color: #1d4ed8 !important;
    font-weight: 600;
}
html:not(.io-black-mode) body:not(.io-black-mode) .slider-tab .tab-item.active,
html:not(.io-black-mode) body:not(.io-black-mode) .btn.vc-red,
html:not(.io-black-mode) body:not(.io-black-mode) .btn.vc-theme {
    background-color: #c81e32 !important;
    border-color: #c81e32 !important;
    color: #ffffff !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .btn.vc-red span,
html:not(.io-black-mode) body:not(.io-black-mode) .btn.vc-theme span {
    color: #ffffff !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .url-card .text-muted,
html:not(.io-black-mode) body:not(.io-black-mode) .posts-item .text-muted,
html:not(.io-black-mode) body:not(.io-black-mode) .slider-tab .tab-item:not(.active),
html:not(.io-black-mode) body:not(.io-black-mode) .tab-title.text-gray,
html:not(.io-black-mode) body:not(.io-black-mode) .list-select:not(.active),
html:not(.io-black-mode) body:not(.io-black-mode) .cat-select:not(.active),
html:not(.io-black-mode) body:not(.io-black-mode) a.ajax-page-post,
html:not(.io-black-mode) body:not(.io-black-mode) .site-name-box span,
html:not(.io-black-mode) body:not(.io-black-mode) .site-name-box .views,
html:not(.io-black-mode) body:not(.io-black-mode) .panel-header span,
html:not(.io-black-mode) body:not(.io-black-mode) .posts-copyright,
html:not(.io-black-mode) body:not(.io-black-mode) .card-body > .text-xs > div,
html:not(.io-black-mode) body:not(.io-black-mode) .near-permalink .text-muted,
html:not(.io-black-mode) body:not(.io-black-mode) .footer .text-muted,
html:not(.io-black-mode) body:not(.io-black-mode) .footer-mini-img .text-muted,
html:not(.io-black-mode) body:not(.io-black-mode) .mininav-seo-desc {
    color: #4b5563 !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .cat-select.active,
html:not(.io-black-mode) body:not(.io-black-mode) .list-select.active {
    color: #b91c1c !important;
    font-weight: 600;
}
html:not(.io-black-mode) body:not(.io-black-mode) .vc-l-red,
html:not(.io-black-mode) body:not(.io-black-mode) .vc-l-theme {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .vc-l-red span,
html:not(.io-black-mode) body:not(.io-black-mode) .vc-l-theme span {
    color: #991b1b !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .vc-l-purple {
    background-color: #ede9fe !important;
    color: #5b21b6 !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .vc-l-violet,
html:not(.io-black-mode) body:not(.io-black-mode) .vc-l-blue {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .vc-l-yellow,
html:not(.io-black-mode) body:not(.io-black-mode) .vc-l-orange {
    background-color: #ffedd5 !important;
    color: #9a3412 !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .panel-body code {
    background-color: #f1f5f9 !important;
    color: #991b1b !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .panel-body blockquote a {
    color: #be185d !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-footer-seo-mesh div,
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-footer-seo-mesh span {
    color: #334155 !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-footer-seo-mesh a {
    color: #be185d !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) #acgfavMagnetHub .acgfav-mag-title span,
html:not(.io-black-mode) body:not(.io-black-mode) #acgfavMagnetHub .acgfav-mag-hot-tags span {
    color: #0369a1 !important;
}

/* 6. [v7.0] 浅色模式补漏：.vc-l-cyan/green、/rankings 隐形白字、/acg-start 霓虹角标与快捷侧栏 */
html:not(.io-black-mode) body:not(.io-black-mode) .vc-l-cyan {
    background-color: #cffafe !important;
    color: #155e75 !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .vc-l-green {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-rankings-container {
    color: #0f172a !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-rankings-container span:not([style*="linear-gradient"]) {
    color: #0f172a !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-rankings-container span[style*="linear-gradient"] {
    background: #be185d !important;
    color: #ffffff !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-rankings-container a {
    color: #1d4ed8 !important;
    font-weight: 600 !important;
}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-topic-tag {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
}
.acgfav-sidebar-quickhub .acgfav-sqh-link {
    display: block;
    padding: 7px 10px;
    border-radius: 7px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b !important;
    font-weight: 600;
    text-decoration: none !important;
}
.acgfav-sidebar-quickhub .acgfav-sqh-link:hover {
    border-color: #1d4ed8;
    color: #1d4ed8 !important;
}

/* 7. [v7.0] 暗黑模式 (io-black-mode) 深度融合：消除智能内链、当季导流、失效互助卡与榜单刺眼白/黄块 */
:is(html.io-black-mode, body.io-black-mode) .acgfav-smart-mesh-box {
    background: #1e242c !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-smart-mesh-box h2,
:is(html.io-black-mode, body.io-black-mode) .acgfav-smart-mesh-box h3 {
    color: #f8fafc !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-smart-mesh-box > div > a {
    background: #27303c !important;
    border-color: #3f4b5c !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-smart-mesh-box > div > a > div:first-child {
    color: #60a5fa !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-smart-mesh-box > div > a > div:last-child,
:is(html.io-black-mode, body.io-black-mode) .acgfav-smart-mesh-box > div:last-child {
    color: #cbd5e1 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-smart-mesh-box > div:last-child a {
    color: #93c5fd !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-seasonal-spotlight {
    background: linear-gradient(135deg, #1e293b 0%, #26233d 100%) !important;
    border-color: #3b4c6b !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-seasonal-spotlight > div:first-child {
    color: #e2e8f0 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-seasonal-spotlight a {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-dead-site-helper {
    background: #2b2314 !important;
    border-color: #785418 !important;
    border-left-color: #f59e0b !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-dead-site-helper > div:first-child {
    color: #fcd34d !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-dead-site-helper p {
    color: #fde68a !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-dead-site-helper a[style*="background: #ffffff"] {
    background: #1e242c !important;
    color: #fde68a !important;
    border-color: #b45309 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-rankings-container {
    background: #1e242c !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-rankings-container h2 {
    color: #f8fafc !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-rankings-container [style*="background: #f8fafc"] {
    background: #27303c !important;
    border-color: #3f4b5c !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-sidebar-quickhub .acgfav-sqh-link {
    background: #27303c !important;
    border-color: #3f4b5c !important;
    color: #e2e8f0 !important;
}
/* 8. [v8.0] 品牌高清裁剪 Logo 尺寸放大、深蓝紫极光搜索视觉与移动端全站 UI 重塑 */
.navbar-logo .logo-expanded img {
    height: 34px !important;
    max-height: 34px !important;
    width: auto !important;
    object-fit: contain;
}
.footer-logo img,
.footer-mini-img img[alt*="ACGFav"] {
    height: 30px !important;
    max-height: 30px !important;
    width: auto !important;
    object-fit: contain;
}

/* 深蓝紫极光风搜索横幅（取代原生刺眼荧光洋红渐变，与下方蓝白新番卡浑然一体） */
.header-banner.css-color {
    background: linear-gradient(135deg, #172554 0%, #1e3a8a 42%, #3b1d7a 78%, #4c1d95 100%) !important;
    background-size: 100% 100% !important;
}
:is(html.io-black-mode, body.io-black-mode) .header-banner.css-color {
    background: linear-gradient(135deg, #090d16 0%, #172554 48%, #2e1065 100%) !important;
    background-size: 100% 100% !important;
}
.header-banner #search .search-submit-btn,
.header-banner #search .btn.vc-theme {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%) !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
}
.header-banner .s-type-list,
.header-banner .search-hot-text,
.header-banner .search-keywords {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    padding-right: 16px;
    -webkit-mask-image: linear-gradient(to right, #000 90%, transparent 100%);
    mask-image: linear-gradient(to right, #000 90%, transparent 100%);
}
.header-banner .s-type-list::-webkit-scrollbar,
.header-banner .search-hot-text::-webkit-scrollbar {
    display: none;
}

:is(html.io-black-mode, body.io-black-mode) #acgfavMagnetHub,
:is(html.io-black-mode, body.io-black-mode) .acgfav-sc-wrap {
    background: #1e242c !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
:is(html.io-black-mode, body.io-black-mode) .tab-title,
:is(html.io-black-mode, body.io-black-mode) .tab-title.text-gray {
    color: #e2e8f0 !important;
}
:is(html.io-black-mode, body.io-black-mode) .slider-tab .tab-item:not(.active) {
    color: #cbd5e1 !important;
}

/* 桌面端确保移动端底栏绝不显露，且长文探索胶囊与右侧工具列互不重叠 */
@media (min-width: 768px) {
    .footer-tabbar,
    .footer-tabbar-placeholder {
        display: none !important;
    }
    #acgfav-floating-capsule {
        right: 72px !important;
        bottom: 24px !important;
    }
}

/* 长文对比表格防溢出、排行榜左对齐防孤字、归档页失效提示提亮 */
.panel-body table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
}
.acgfav-rankings-container h2 {
    text-wrap: balance;
}
.acgfav-rankings-container ol,
.acgfav-rankings-container ul,
.acgfav-rankings-container li,
.acgfav-rankings-container [style*="background: #f8fafc"] > div:not(:first-child) {
    text-align: left !important;
}
.taxonomy-head-content .text-muted,
.taxonomy-head-content [class*="dead"],
.color-head .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ==================== 移动端核心重塑 (<= 767.98px) ==================== */
@media (max-width: 767.98px) {
    :root {
        --main-nav-hight: 54px !important;
    }
    body {
        padding-top: 54px !important;
    }
    .main-header.header-fixed {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 54px !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
    .main-header .header-nav {
        height: 54px !important;
        margin: 0 !important;
        padding: 0 8px !important;
        border-radius: 0 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: saturate(180%) blur(18px) !important;
        -webkit-backdrop-filter: saturate(180%) blur(18px) !important;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05) !important;
    }
    :is(html.io-black-mode, body.io-black-mode) .main-header .header-nav {
        background: rgba(17, 22, 32, 0.95) !important;
        border-bottom-color: rgba(148, 163, 184, 0.14) !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important;
    }
    .main-header .header-nav .iconfont,
    .main-header .header-nav a {
        color: #1e293b !important;
    }
    .main-header .menu-btn .menu-bar {
        background-color: #1e293b !important;
    }
    .main-header .search-bar,
    .main-header .search-bar::before,
    .main-header .search-bar::after {
        border-color: #1e293b !important;
    }
    :is(html.io-black-mode, body.io-black-mode) .main-header .header-nav .iconfont,
    :is(html.io-black-mode, body.io-black-mode) .main-header .header-nav a {
        color: #f1f5f9 !important;
    }
    :is(html.io-black-mode, body.io-black-mode) .main-header .menu-btn .menu-bar {
        background-color: #f1f5f9 !important;
    }
    :is(html.io-black-mode, body.io-black-mode) .main-header .search-bar,
    :is(html.io-black-mode, body.io-black-mode) .main-header .search-bar::before,
    :is(html.io-black-mode, body.io-black-mode) .main-header .search-bar::after {
        border-color: #f1f5f9 !important;
    }
    .navbar-logo .more-menu-logo {
        display: none !important;
    }
    .navbar-logo.mr-4 {
        margin-right: 0 !important;
    }
    .navbar-logo .logo-expanded img {
        height: 28px !important;
        max-height: 28px !important;
    }
    .header-tools .nav-dark-toggle a,
    .header-tools .nav-search a {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 36px !important;
        height: 36px !important;
        border-radius: 999px;
    }
    .header-banner.header-big {
        margin-top: -54px !important;
        padding-top: 60px !important;
        padding-bottom: 12px !important;
        margin-bottom: 12px !important;
    }
    #search.big-search {
        height: auto !important;
        min-height: 0 !important;
        padding: 4px 0 2px !important;
    }
    #search .search-box {
        margin-top: 6px !important;
        margin-bottom: 8px !important;
    }
    .tools-left.io-footer-tools,
    #footer-tools.tools-right {
        display: none !important;
    }
    .site-go .qr-img {
        display: none !important;
    }
    .footer-tabbar.tabbar-type-round {
        padding: 0 10px calc(6px + env(safe-area-inset-bottom)) !important;
    }
    .footer-tabbar .tabbar-bg {
        background: rgba(255, 255, 255, 0.96) !important;
        backdrop-filter: saturate(180%) blur(18px) !important;
        -webkit-backdrop-filter: saturate(180%) blur(18px) !important;
        border: 1px solid rgba(15, 23, 42, 0.08) !important;
        border-radius: 16px !important;
        box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1) !important;
    }
    :is(html.io-black-mode, body.io-black-mode) .footer-tabbar .tabbar-bg {
        background: rgba(22, 27, 38, 0.96) !important;
        border-color: rgba(148, 163, 184, 0.16) !important;
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45) !important;
    }
    .tabbar-type-round .tabbar-item,
    .tabbar-type-round .tabbar-item > a {
        min-height: 52px !important;
    }
    .tabbar-type-round + .footer-tabbar-placeholder {
        height: calc(66px + env(safe-area-inset-bottom)) !important;
    }
    #acgfav-retention-banner {
        bottom: calc(68px + env(safe-area-inset-bottom)) !important;
        left: 12px !important;
        right: 12px !important;
        max-width: none !important;
        padding: 11px 36px 11px 14px !important;
        border-radius: 12px !important;
        z-index: 102 !important;
    }
    #acgfav-retention-banner .acgfav-close-btn {
        top: 4px !important;
        right: 4px !important;
        width: 34px !important;
        height: 34px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 20px !important;
    }
    #acgfav-floating-capsule {
        position: static !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        margin: 16px 12px 6px !important;
        z-index: 1 !important;
    }
    :is(html.io-black-mode, body.io-black-mode) #acgfav-floating-capsule a {
        background: #1e242c !important;
        border-color: #334155 !important;
        color: #f1f5f9 !important;
    }
    .acgfav-seasonal-spotlight {
        padding: 11px 12px !important;
        margin-bottom: 12px !important;
    }
    .acgfav-seasonal-spotlight .acgfav-ssp-head {
        font-size: 13px !important;
        margin-bottom: 8px !important;
    }
    .acgfav-seasonal-spotlight .acgfav-ssp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }
    .acgfav-seasonal-spotlight .acgfav-ssp-link {
        padding: 7px 8px !important;
        font-size: 12px !important;
        gap: 5px !important;
    }
    .acgfav-seasonal-spotlight .acgfav-ssp-badge {
        display: none !important;
    }
    nav[aria-label="breadcrumb"] {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* 9. [v9.0] 电脑端顶/侧栏精修、/acg 智能折叠周历与锚点高亮、/guides 及挂件深色模式 */
#acgfav-schedule,
#acgfavMobileScheduleSlot {
    scroll-margin-top: 84px;
}
@media (max-width: 767.98px) {
    #acgfav-schedule,
    #acgfavMobileScheduleSlot {
        scroll-margin-top: 66px;
    }
}
.acgfav-sched-highlight {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.45), 0 10px 28px rgba(37, 99, 235, 0.2) !important;
    border-color: #3b82f6 !important;
    border-radius: 12px;
    transition: box-shadow 0.35s ease, border-color 0.35s ease !important;
}

/* 电脑端 (>= 768px)：消除顶栏上方 10px 漏半截字缝隙、拉宽左侧栏至 172px 防截断、错开右下角留存条 */
@media (min-width: 768px) {
    :root {
        --main-nav-hight: 66px !important;
        --main-aside-basis-width: 172px !important;
    }
    body {
        padding-top: 66px !important;
    }
    body:not(.aside-min) {
        --main-aside-width: 172px !important;
    }
    .aside-body .aside-ul a {
        padding-right: 10px !important;
    }
    .aside-body .aside-ul a span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 112px;
        display: inline-block;
        vertical-align: middle;
    }
    .main-header.header-fixed {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 66px !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
    .main-header .header-nav {
        height: 66px !important;
        margin: 0 !important;
        padding: 0 20px !important;
        border-radius: 0 !important;
        background: rgba(255, 255, 255, 0.94) !important;
        backdrop-filter: saturate(180%) blur(18px) !important;
        -webkit-backdrop-filter: saturate(180%) blur(18px) !important;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
        box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05) !important;
    }
    :is(html.io-black-mode, body.io-black-mode) .main-header .header-nav {
        background: rgba(17, 22, 32, 0.94) !important;
        border-bottom-color: rgba(148, 163, 184, 0.14) !important;
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4) !important;
    }
    .main-header .header-nav .navbar-header > li > a,
    .main-header .header-nav .header-tools > li > a {
        color: #1e293b !important;
    }
    .main-header .header-nav .search-bar,
    .main-header .header-nav .search-bar::before,
    .main-header .header-nav .search-bar::after {
        border-color: #1e293b !important;
    }
    :is(html.io-black-mode, body.io-black-mode) .main-header .header-nav .navbar-header > li > a,
    :is(html.io-black-mode, body.io-black-mode) .main-header .header-nav .header-tools > li > a {
        color: #f1f5f9 !important;
    }
    :is(html.io-black-mode, body.io-black-mode) .main-header .header-nav .search-bar,
    :is(html.io-black-mode, body.io-black-mode) .main-header .header-nav .search-bar::before,
    :is(html.io-black-mode, body.io-black-mode) .main-header .header-nav .search-bar::after {
        border-color: #f1f5f9 !important;
    }
    .header-banner.header-big {
        margin-top: -66px !important;
        padding-top: 76px !important;
    }
    #acgfav-retention-banner {
        right: 74px !important;
        bottom: 20px !important;
    }
}
/* /guides 指南全景页、/acg 御神签与传送门深色适配 + /contribute 手机编辑器限高 */
:is(html.io-black-mode, body.io-black-mode) .acgfav-guides-pillar-hub {
    background: #1e242c !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-guides-pillar-hub > div:first-child {
    border-bottom-color: #334155 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-guides-pillar-hub h2,
:is(html.io-black-mode, body.io-black-mode) .acgfav-guides-pillar-hub strong {
    color: #f8fafc !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-guides-pillar-hub p,
:is(html.io-black-mode, body.io-black-mode) .acgfav-guides-pillar-hub a > span:last-child {
    color: #cbd5e1 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-guides-pillar-hub a {
    background: #27303c !important;
    border-color: #3f4b5c !important;
}
@media (max-width: 767.98px) {
    .wp-editor-container iframe,
    .wp-editor-area {
        max-height: 220px !important;
        height: 220px !important;
    }
}

/* 10. [v10.0] 详情页平替对比表与 AI-SEO 模块、隐藏站长 5118 权重条、近 1MB 大页分屏懒渲染、免登录个人中心 */
body:not(.logged-in) .sites-seo-load {
    display: none !important;
}

/* 近 1MB 超大导航页 (/acg、/ai) 屏外区块跳过首帧排版绘制，100% 保留 SSR HTML 索引 */
#module_id_1 .content-layout > [id^="term-"]:nth-of-type(n+2),
.home-container .content-layout > .io-cat-box:nth-of-type(n+2) {
    content-visibility: auto;
    contain-intrinsic-size: auto 480px;
}

/* 详情页 AI-SEO 同类可用平替对比表与问答区深浅双色适配 */
.acgfav-sites-peer-heading {
    margin: 16px 0 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a;
}
.acgfav-sites-peer-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 8px 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}
.acgfav-sites-peer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.5;
}
.acgfav-sites-peer-table th,
.acgfav-sites-peer-table td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.acgfav-sites-peer-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}
.acgfav-sites-peer-table tr:last-child td {
    border-bottom: none;
}
.acgfav-sites-peer-table td a {
    color: #1d4ed8 !important;
    text-decoration: none !important;
}
.acgfav-sites-peer-table td a:hover {
    text-decoration: underline !important;
}
.acgfav-peer-ok {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
    white-space: nowrap;
}
.acgfav-sites-faq-mini {
    margin: 12px 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.acgfav-sites-faq-mini h3 {
    margin: 0 0 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a;
}
.acgfav-sites-faq-mini p {
    margin: 0 0 8px !important;
    font-size: 13px;
    line-height: 1.65;
    color: #334155;
}
.acgfav-sites-faq-mini p:last-child {
    margin-bottom: 0 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-sites-seo-block {
    background: #1e242c !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-sites-seo-block h2,
:is(html.io-black-mode, body.io-black-mode) .acgfav-sites-peer-heading,
:is(html.io-black-mode, body.io-black-mode) .acgfav-sites-faq-mini h3 {
    color: #f8fafc !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-sites-peer-table-wrap,
:is(html.io-black-mode, body.io-black-mode) .acgfav-sites-faq-mini {
    background: #27303c !important;
    border-color: #3f4b5c !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-sites-peer-table th {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-bottom-color: #334155 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-sites-peer-table td {
    color: #cbd5e1 !important;
    border-bottom-color: #334155 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-sites-peer-table td a {
    color: #60a5fa !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-peer-ok {
    background: rgba(22, 163, 74, 0.22) !important;
    color: #4ade80 !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-sites-faq-mini p {
    color: #cbd5e1 !important;
}

/* 文章页顶部 E-E-A-T 实测署名与更新时间条 */
.acgfav-eeat-freshness-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin: 0 0 14px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    font-size: 12.5px;
    color: #0369a1;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-eeat-freshness-bar {
    background: rgba(14, 116, 144, 0.18) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
    color: #7dd3fc !important;
}
/* /user/ 未登录免注册本地个人中心看板（仅限 user-center，避免误隐藏 /author/* 作者头部） */
body.user-center:not(.logged-in) .box-head-author {
    display: none !important;
}
/* 11. [v11.0] 详情页预览节点说明与搜索零结果多源救援卡样式 */
.acgfav-preview-node-note {
    padding: 7px 10px 4px;
    font-size: 11.5px;
    line-height: 1.45;
    color: #64748b;
    text-align: left;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-preview-node-note {
    color: #94a3b8;
}
.acgfav-search-rescue-card {
    padding: 16px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border: 1px solid #bfdbfe;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-search-rescue-card {
    background: linear-gradient(135deg, #1e293b 0%, #25213b 100%);
    border-color: #3b4c6b;
}
.acgfav-src-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 6px;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-src-title {
    color: #93c5fd;
}
.acgfav-src-desc {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.55;
    color: #475569;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-src-desc {
    color: #cbd5e1;
}
.acgfav-src-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.acgfav-src-btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b !important;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none !important;
}
.acgfav-src-btn.is-primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff !important;
}
:is(html.io-black-mode, body.io-black-mode) .acgfav-src-btn:not(.is-primary) {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9 !important;
}
#acgfavMiniToast {
    position: fixed;
    top: calc(16px + env(safe-area-inset-top, 0px));
    bottom: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    z-index: 10090;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    max-width: 92vw;
    overflow: hidden;
    text-overflow: ellipsis;
}
#acgfavMiniToast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
:is(html.io-black-mode, body.io-black-mode) .posts-item .text-muted,
:is(html.io-black-mode, body.io-black-mode) .url-card .text-muted,
:is(html.io-black-mode, body.io-black-mode) .footer .text-muted {
    color: #b4bcc8 !important;
}
:is(html.io-black-mode, body.io-black-mode) .slider-tab .tab-item.active {
    background-color: #c81e32 !important;
    color: #ffffff !important;
}

:is(html.io-black-mode, body.io-black-mode) .badge-secondary {
    color: #d1d5db !important;
    background-color: #374151 !important;
}
:is(html.io-black-mode, body.io-black-mode) .list-select:not(.active),
:is(html.io-black-mode, body.io-black-mode) .cat-select:not(.active),
:is(html.io-black-mode, body.io-black-mode) a.ajax-page-post,
:is(html.io-black-mode, body.io-black-mode) .slider-tab .tab-item:not(.active) {
    color: #b4bcc8 !important;
}

/* =========================================================================
   [v13.0] Core Phase 12 Additions: Modal Scroll-Lock & /contribute Editor CLS
   ========================================================================= */
html.acgfav-modal-open,
body.acgfav-modal-open {
    overflow: hidden !important;
}
.acgfav-contrib-editor-wrap,
#wp-post_content-editor-container.wp-editor-container {
    min-height: 320px;
}
@media (max-width: 767.98px) {
    .acgfav-contrib-editor-wrap,
    #wp-post_content-editor-container.wp-editor-container {
        min-height: 296px;
    }
}

/* ACGFav v13.0 Core Visual, Dark-Mode & Mobile Fixes */

/* [P0-2] /ai-acg-tools Dark (.acgfav-topic-v9) */
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9{--v9-ink:#f8fafc;--v9-text:#cbd5e1;--v9-muted:#aeb9c9;--v9-line:#334155;--v9-soft:#27303c;--v9-panel:#1e242c;--v9-blue:#93c5fd;--v9-teal:#5eead4;--v9-green:#6ee7b7;--v9-rose:#fda4af;--v9-amber:#fcd34d;color:#cbd5e1}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 :is(h1,h2,h3,h4,.v9-choice strong,.v9-task-link strong,.v9-tool-row p strong,.v9-next-link){color:#f8fafc}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 .v9-section-kicker{color:#93c5fd}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 .v9-lead{color:#cbd5e1}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 .v9-hero{background:#1e242c;border-color:#334155;box-shadow:0 14px 34px rgba(0,0,0,.35)}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 .v9-hero-choice{background:#27303c;border-color:#3f4b5c}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 :is(.v9-choice,.v9-route-lead,.v9-task-link,.v9-starter,.v9-flow-step,.v9-tool-row,.v9-standard,.v9-next-link){background:#1e242c;border-color:#334155}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 :is(.v9-kicker,.v9-choice i,.v9-rank,.v9-pill,.v9-tag){background:#1e3a5f;border-color:rgba(147,197,253,.34);color:#bfdbfe}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 .v9-kicker:before{background:#93c5fd}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 .v9-button{background:#27303c;border-color:#475569;color:#f8fafc}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 .v9-button.primary{background:#1d4ed8;border-color:#2563eb;color:#fff;box-shadow:0 10px 22px rgba(29,78,216,.35)}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 :is(.v9-choice-title span,.v9-tag.teal){background:#134e4a;color:#99f6e4}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 :is(.v9-step-no,.v9-tag.green){background:#14532d;color:#bbf7d0}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 .v9-tag.rose{background:#4c1d32;color:#fbcfe8}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 .v9-tag.amber{background:#451a03;color:#fde68a}
:is(html.io-black-mode,body.io-black-mode) .acgfav-topic-v9 :is(.v9-button,.v9-choice,.v9-starter,.v9-task-link,.v9-tool-row,.v9-next-link):hover{border-color:rgba(147,197,253,.45);box-shadow:0 12px 26px rgba(0,0,0,.35)}

/* [P0-3] /acg-start Dark (.acgfav-acg-start) */
:is(html.io-black-mode,body.io-black-mode) .acgfav-acg-start :is(.ags-chip,.ags-route-links a){background:#27303c;border-color:#475569;color:#f1f5f9}
:is(html.io-black-mode,body.io-black-mode) .acgfav-acg-start :is(.ags-chip,.ags-route-links a):hover{background:#334155;border-color:#60a5fa;color:#fff}
:is(html.io-black-mode,body.io-black-mode) .acgfav-acg-start .ags-chip.main{background:#1e3a5f;border-color:rgba(147,197,253,.42);color:#bfdbfe}
:is(html.io-black-mode,body.io-black-mode) .acgfav-acg-start .ags-chip.main:hover{background:#1d4ed8;border-color:#60a5fa;color:#fff}
:is(html.io-black-mode,body.io-black-mode) .acgfav-acg-start :is(.ags-button.primary,.ags-link-arrow){background:#1d4ed8;border-color:#2563eb;color:#fff}
:is(html.io-black-mode,body.io-black-mode) .acgfav-acg-start :is(.ags-button.primary,.ags-link-arrow):hover{background:#1e40af;border-color:#3b82f6;color:#fff}
:is(html.io-black-mode,body.io-black-mode) .acgfav-acg-start .ags-board-item{border-bottom-color:#334155}
:is(html.io-black-mode,body.io-black-mode) .acgfav-acg-start :is(.ags-kicker,.ags-discovery-card small){color:#93c5fd}

/* [P1-4] /rankings Dark HoF + exact-duplicate tab guard */
:is(html.io-black-mode,body.io-black-mode) .acgfav-rankings-container [style*="border-bottom: 2px solid #fff1f2"]{border-bottom-color:#334155!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-rankings-container span[style*="linear-gradient"]{background:#be185d!important;color:#fff!important}
:is(html.io-black-mode,body.io-black-mode) :is(.acgfav-rankings-container p,.acgfav-sites-seo-block__hint){color:#cbd5e1!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-rankings-container :is([style*="color: #475569"],[style*="color:#475569"],[style*="background: #f8fafc"]>div:last-child){color:#e2e8f0!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-rankings-container a{color:#93c5fd!important}
.color-head-rankings .range-nav:has(>a.range-tab-btn.--r1[href*="type=post"])>a.range-tab-btn.--l1[href*="type=post"],
.color-head-rankings .range-nav:has(>a.range-tab-btn.--r1[href*="type=sites"])>a.range-tab-btn.--l1[href*="type=sites"]{display:none!important}

/* [P1-5] /sites/*.html Peer Table width + Dark links, CTA & muted */
.panel-body table.acgfav-sites-peer-table,table.acgfav-sites-peer-table{display:table!important;width:100%!important;min-width:100%;table-layout:auto}
:is(html.io-black-mode,body.io-black-mode) :is(.acgfav-sites-seo-block a:not(.acgfav-sites-seo-block__pill),.acgfav-sites-seo-block a:not(.acgfav-sites-seo-block__pill) strong,.acgfav-sites-peer-table td a,.acgfav-sites-faq-mini a){color:#93c5fd!important}
:is(html.io-black-mode,body.io-black-mode) :is(.acgfav-sites-seo-block a:not(.acgfav-sites-seo-block__pill),.acgfav-sites-peer-table td a,.acgfav-sites-faq-mini a):hover{color:#bfdbfe!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-sites-seo-block__notice{color:#fcd34d!important}
:is(html.io-black-mode,body.io-black-mode) :is(.btn.vc-theme:not(.search-submit-btn),.btn.vc-red){background-color:#c81e32!important;border-color:#c81e32!important;color:#fff!important;--this-bg:#c81e32;--this-color:#fff}
:is(html.io-black-mode,body.io-black-mode) :is(.btn.vc-theme:not(.search-submit-btn),.btn.vc-red) span{color:#fff!important}
:is(html.io-black-mode,body.io-black-mode) :is(.btn.vc-theme:not(.search-submit-btn),.btn.vc-red):hover{background-color:#b91c1c!important;border-color:#b91c1c!important;color:#fff!important}
:is(html.io-black-mode,body.io-black-mode){--muted-color:#a3acb8}
:is(html.io-black-mode,body.io-black-mode) :is(.cat-select.active,.list-select.active){color:#fda4af!important;font-weight:600}

/* [P1-6] Mobile <=767.98px touch targets >=32px & tabbar clearance */
@media (max-width:767.98px){
  a.togo{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;padding:6px;box-sizing:border-box}
  .sites-item:not(.style-sites-max) a.togo{right:2px}
  .selects-box :is(.cat-select,.list-select),.taxonomy-selects .is-tab-btn{display:inline-flex;align-items:center;min-height:32px;padding:6px 4px;line-height:1.25;vertical-align:middle;box-sizing:border-box}
  .selects-box .cat-select+.cat-select{margin-left:10px}
  #search .search-group li{padding:2px 4px;vertical-align:middle}
  #search .search-group li a{display:inline-flex;align-items:center;min-height:32px;padding:6px 8px;line-height:1.25;box-sizing:border-box}
  .item-meta a.avatar-sm{display:inline-flex;align-items:center;justify-content:center;width:auto;height:auto;min-width:32px;min-height:32px;padding:6px;margin:-6px 0 -6px -6px;box-sizing:border-box;vertical-align:middle}
  .item-meta a.avatar-sm>img{width:20px;height:20px;border-radius:50%;flex-shrink:0}
  .aside-body,#layout_aside.aside-body{bottom:0!important;padding-bottom:calc(84px + env(safe-area-inset-bottom))!important;box-sizing:border-box!important;z-index:104!important}
  .mobile-header .mobile-nav{padding-bottom:calc(84px + env(safe-area-inset-bottom))!important;z-index:105!important}
}

/* [P2] /guides <br> grid fix + light/dark category tag contrast */
.acgfav-guides-pillar-hub :is(div[style*="grid"],a,h2)>br{display:none!important}
.acgfav-guides-pillar-hub div[style*="grid"]{align-items:stretch}
.acgfav-guides-pillar-hub h2 span[style*="#ff5c8a"]{background:#be185d!important;color:#fff!important}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-guides-pillar-hub a>span[style*="#ff5c8a"]{color:#be185d!important}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-guides-pillar-hub a>span[style*="#8b5cf6"]{color:#6d28d9!important}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-guides-pillar-hub a>span[style*="#0284c7"]{color:#0369a1!important}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-guides-pillar-hub a>span[style*="#10b981"]{color:#047857!important}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-guides-pillar-hub a>span[style*="#f59e0b"]{color:#b45309!important}
:is(html.io-black-mode,body.io-black-mode) :is(.acgfav-rankings-container a,.acgfav-guides-pillar-hub a>span)[style*="#ff5c8a"]{color:#fda4af!important}
:is(html.io-black-mode,body.io-black-mode) :is(.acgfav-rankings-container a,.acgfav-guides-pillar-hub a>span)[style*="#8b5cf6"]{color:#c4b5fd!important}
:is(html.io-black-mode,body.io-black-mode) :is(.acgfav-rankings-container a,.acgfav-guides-pillar-hub a>span)[style*="#0284c7"]{color:#7dd3fc!important}
:is(html.io-black-mode,body.io-black-mode) :is(.acgfav-rankings-container a,.acgfav-guides-pillar-hub a>span)[style*="#10b981"]{color:#6ee7b7!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-guides-pillar-hub a>span[style*="#f59e0b"]{color:#fcd34d!important}

/* [P2] Dark guest menu pills (.menu-user-btn / .white-nowrap) */
:is(html.io-black-mode,body.io-black-mode) .menu-user-box .menu-user-btn.vc-l-blue{background-color:#1e3a5f!important;color:#93c5fd!important;--this-bg:#1e3a5f;--this-color:#93c5fd}
:is(html.io-black-mode,body.io-black-mode) .menu-user-box .menu-user-btn.vc-l-purple{background-color:#3b1d5e!important;color:#d8b4fe!important;--this-bg:#3b1d5e;--this-color:#d8b4fe}
:is(html.io-black-mode,body.io-black-mode) .menu-user-box .menu-user-btn.vc-l-green{background-color:#14432a!important;color:#86efac!important;--this-bg:#14432a;--this-color:#86efac}
:is(html.io-black-mode,body.io-black-mode) .menu-user-box .menu-user-btn :is(.white-nowrap,i){color:inherit!important}

/* [v13.0 #27] Single-post contextual nav strip (film-tv & acg-news Sogou high-bounce conversion) + 360px mobile safety */
.acgfav-post-entry-strip{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:0 0 14px;padding:8px 12px;border-radius:8px;background:#f8fafc;border:1px solid #e2e8f0;font-size:12.5px;line-height:1.4;color:#1e293b}
.acgfav-pes-label{font-weight:700;color:#0f172a}
.acgfav-pes-link{display:inline-flex;align-items:center;min-height:28px;padding:3px 10px;border-radius:999px;background:#ffffff;border:1px solid #cbd5e1;color:#1d4ed8!important;font-size:12px;font-weight:600;text-decoration:none!important;white-space:nowrap}
.acgfav-pes-link.is-primary{background:#1d4ed8;border-color:#1d4ed8;color:#ffffff!important}
.acgfav-pes-link:hover{border-color:#1d4ed8;background:#eff6ff}
.acgfav-pes-link.is-primary:hover{background:#1e40af}
:is(html.io-black-mode,body.io-black-mode) .acgfav-post-entry-strip{background:#1e242c;border-color:#334155;color:#e2e8f0}
:is(html.io-black-mode,body.io-black-mode) .acgfav-pes-label{color:#f8fafc}
:is(html.io-black-mode,body.io-black-mode) .acgfav-pes-link:not(.is-primary){background:#27303c;border-color:#475569;color:#93c5fd!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-pes-link.is-primary{background:#1d4ed8;border-color:#2563eb;color:#ffffff!important}
@media (max-width:375px){
  .acgfav-post-entry-strip{padding:7px 9px;gap:6px}
  .acgfav-pes-link{min-height:32px;padding:4px 9px;font-size:12px}
  .acgfav-seasonal-spotlight .acgfav-ssp-grid{gap:5px!important}
  .acgfav-seasonal-spotlight .acgfav-ssp-link{padding:6px 7px!important;font-size:11.5px!important}
  .acgfav-src-btn{min-height:32px;padding:6px 10px;font-size:12px}
}

/* [v13.1] Light ranking tabs, article inline pink links & dark purple badges/buttons contrast */
html:not(.io-black-mode) body:not(.io-black-mode) .io-widget-ranking-list .range-nav .is-tab-btn:not(.active){color:#475569!important}
html:not(.io-black-mode) body:not(.io-black-mode) :is(.entry-content,.panel-body.single) a[style*="#ff5c8a"],
html:not(.io-black-mode) body:not(.io-black-mode) :is(.entry-content,.panel-body.single) a[style*="rgb(255, 92, 138)"]{color:#be185d!important;border-bottom-color:#be185d!important}
:is(html.io-black-mode,body.io-black-mode) :is(.badge.vc-l-purple,.btn.vc-l-purple){background-color:#3b1d5e!important;color:#e9d5ff!important;--this-bg:#3b1d5e;--this-color:#e9d5ff}

/* [v13.2] Dead-site manual try + 1-click revive + zero-login card/detail site bookmarking */
.posts-item.sites-item{position:relative}
.acgfav-card-fav-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border-radius:50%;border:1px solid transparent;background:transparent;color:#64748b;font-size:14px;line-height:1;cursor:pointer;flex-shrink:0;transition:color .16s ease,background-color .16s ease,border-color .16s ease,transform .16s ease}
.sites-item:not(.style-sites-max):not(.style-sites-big) .acgfav-card-fav-btn{position:absolute;top:4px;right:4px;z-index:3;opacity:.68}
.sites-item:not(.style-sites-max):not(.style-sites-big):hover .acgfav-card-fav-btn,
.sites-item:not(.style-sites-max):not(.style-sites-big) .acgfav-card-fav-btn:focus-visible,
.sites-item:not(.style-sites-max):not(.style-sites-big) .acgfav-card-fav-btn.is-fav{opacity:1}
.sites-item:not(.style-sites-max):not(.style-sites-big) .item-title{padding-right:22px}
.sites-item.style-sites-max .sites-tags .acgfav-card-fav-btn{margin-left:auto;margin-right:4px}
.sites-item.style-sites-max .sites-tags .togo{margin-left:0!important}
.sites-item.style-sites-big .sites-tags{display:flex;align-items:center;gap:6px}
.acgfav-card-fav-btn:hover{background:#fef3c7;border-color:#f59e0b;color:#b45309;transform:scale(1.08)}
.acgfav-card-fav-btn.is-fav{background:#fef3c7!important;border-color:#f59e0b!important;color:#b45309!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-card-fav-btn{color:#94a3b8}
:is(html.io-black-mode,body.io-black-mode) .acgfav-card-fav-btn:hover,
:is(html.io-black-mode,body.io-black-mode) .acgfav-card-fav-btn.is-fav{background:rgba(120,53,15,.45)!important;border-color:rgba(251,191,36,.6)!important;color:#fbbf24!important}

html:not(.io-black-mode) body:not(.io-black-mode) .io-posts-like.acgfav-local-star-active{background-color:#b45309!important;border-color:#b45309!important;color:#ffffff!important}
:is(html.io-black-mode,body.io-black-mode) .io-posts-like.acgfav-local-star-active{background-color:#78350f!important;border-color:#fbbf24!important;color:#fef3c7!important}

html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-dead-try-btn{background-color:#fffbeb!important;border-color:#d97706!important;color:#92400e!important;font-weight:600}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-dead-try-btn:hover{background-color:#fef3c7!important;color:#78350f!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-dead-try-btn{background-color:rgba(120,53,15,.36)!important;border-color:#f59e0b!important;color:#fde68a!important;font-weight:600}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-revive-btn{background-color:#047857!important;border-color:#047857!important;color:#ffffff!important;font-weight:600}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-revive-btn:hover{background-color:#065f46!important}
html:not(.io-black-mode) body:not(.io-black-mode) .acgfav-revive-btn.is-reported{background-color:#ecfdf5!important;border:1px solid #059669!important;color:#065f46!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-revive-btn{background-color:#065f46!important;border-color:#10b981!important;color:#ecfdf5!important;font-weight:600}
:is(html.io-black-mode,body.io-black-mode) .acgfav-revive-btn.is-reported{background-color:rgba(6,78,59,.45)!important;border-color:#34d399!important;color:#a7f3d0!important}

/* [v13.3] Raise mobile .alert-system toast above bottom tabbar (<768px, P1-4) */
@media (max-width:767.98px){
  #alert_placeholder.alert-system,.alert-system{bottom:calc(env(safe-area-inset-bottom,0px) + 72px)!important;z-index:10095!important}
}

/* [v13.4] Home tab AJAX failure card: retry / WAF reload / direct category link (WCAG 2.1 AA, wraps <=540px) */
.acgfav-tab-error-box{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;max-width:100%;min-width:0;box-sizing:border-box;margin:8px 0;padding:20px 16px;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc;color:#1e293b;text-align:center;overflow-wrap:anywhere;word-break:break-word}
/* [v13.5.1] Override .row-col-2a>* { flex:0 0 calc(50% - ...); max-width:calc(50% - ...) } so failure card spans full row */
.ajax-list-body>.acgfav-tab-error-box,[class*="row-col-"]>.acgfav-tab-error-box{-webkit-box-flex:0!important;-ms-flex:0 0 100%!important;flex:0 0 100%!important;width:100%!important;max-width:100%!important;grid-column:1/-1!important}
.acgfav-tab-error-msg{margin:0;max-width:640px;color:#1e293b;font-size:14px;line-height:1.6}
.acgfav-tab-error-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;max-width:100%;min-width:0}
.acgfav-tab-retry-btn,.acgfav-tab-reload-btn,.acgfav-tab-direct-link{appearance:none;display:inline-flex;align-items:center;justify-content:center;min-height:36px;max-width:100%;box-sizing:border-box;padding:6px 16px;border-radius:8px;font-size:13px;font-weight:600;line-height:1.4;white-space:normal;text-align:center;text-decoration:none!important;cursor:pointer;transition:background-color .16s ease,border-color .16s ease,color .16s ease}
.acgfav-tab-retry-btn{background:#1d4ed8;border:1px solid #1d4ed8;color:#ffffff}
.acgfav-tab-retry-btn:hover,.acgfav-tab-retry-btn:focus-visible{background:#1e40af;border-color:#1e40af;color:#ffffff}
.acgfav-tab-reload-btn,.acgfav-tab-direct-link{background:#ffffff;border:1px solid #94a3b8;color:#0f172a!important}
.acgfav-tab-reload-btn:hover,.acgfav-tab-reload-btn:focus-visible,.acgfav-tab-direct-link:hover,.acgfav-tab-direct-link:focus-visible{background:#f1f5f9;border-color:#94a3b8;color:#0f172a!important}
.acgfav-tab-retry-btn:focus-visible,.acgfav-tab-reload-btn:focus-visible,.acgfav-tab-direct-link:focus-visible{outline:2px solid #1d4ed8;outline-offset:2px}
:is(html.io-black-mode,body.io-black-mode) .acgfav-tab-error-box{background:#1e242c;border-color:#334155;color:#f1f5f9}
:is(html.io-black-mode,body.io-black-mode) .acgfav-tab-error-msg{color:#f1f5f9}
:is(html.io-black-mode,body.io-black-mode) .acgfav-tab-retry-btn{background:#2563eb;border-color:#2563eb;color:#ffffff}
:is(html.io-black-mode,body.io-black-mode) .acgfav-tab-retry-btn:hover,:is(html.io-black-mode,body.io-black-mode) .acgfav-tab-retry-btn:focus-visible{background:#1d4ed8;border-color:#1d4ed8;color:#ffffff}
:is(html.io-black-mode,body.io-black-mode) :is(.acgfav-tab-reload-btn,.acgfav-tab-direct-link){background:#27303c;border-color:#475569;color:#e2e8f0!important}
:is(html.io-black-mode,body.io-black-mode) :is(.acgfav-tab-reload-btn,.acgfav-tab-direct-link):is(:hover,:focus-visible){background:#334155;border-color:#475569;color:#e2e8f0!important}
:is(html.io-black-mode,body.io-black-mode) :is(.acgfav-tab-retry-btn,.acgfav-tab-reload-btn,.acgfav-tab-direct-link):focus-visible{outline-color:#60a5fa}
@media (max-width:540px){
  .acgfav-tab-error-box{padding:16px 12px;gap:10px;border-radius:10px}
  .acgfav-tab-error-msg{font-size:13px}
  .acgfav-tab-error-actions{flex-direction:column;align-items:stretch;width:100%;gap:8px}
  .acgfav-tab-retry-btn,.acgfav-tab-reload-btn,.acgfav-tab-direct-link{width:100%;padding:8px 12px}
}

/* [v13.5] Sogou mobile landing conversion strip on live /sites/*.html (WCAG AA light & dark, 0 overflow @360px) */
.acgfav-site-backup-strip{margin:0 0 16px;padding:12px 14px;border-radius:12px;background:#f0f9ff;border:1px solid #bae6fd;color:#0f172a;box-sizing:border-box;max-width:100%}
.acgfav-sbs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 10px}
.acgfav-sbs-title{font-size:13.5px;font-weight:700;line-height:1.45;color:#0c4a6e}
.acgfav-sbs-actions{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:100%}
.acgfav-sbs-fav-btn.acgfav-card-fav-btn{position:static;width:auto;height:auto;min-height:32px;padding:5px 11px;border-radius:999px;background:#ffffff;border:1px solid #0284c7;color:#0369a1;font-size:12.5px;font-weight:600;line-height:1.25;white-space:nowrap;opacity:1;transform:none}
.acgfav-sbs-fav-btn.acgfav-card-fav-btn:hover,.acgfav-sbs-fav-btn.acgfav-card-fav-btn:focus-visible{background:#e0f2fe;border-color:#0369a1;color:#0c4a6e;transform:none}
.acgfav-sbs-fav-btn.is-fav,.acgfav-sbs-fav-btn.is-faved{background:#fef3c7!important;border-color:#d97706!important;color:#92400e!important}
.acgfav-sbs-more{display:inline-flex;align-items:center;min-height:32px;padding:5px 11px;border-radius:999px;background:#1d4ed8;border:1px solid #1d4ed8;color:#ffffff!important;font-size:12.5px;font-weight:600;line-height:1.25;text-decoration:none!important;white-space:nowrap;box-sizing:border-box}
.acgfav-sbs-more:hover,.acgfav-sbs-more:focus-visible{background:#1e40af;border-color:#1e40af;color:#ffffff!important}
.acgfav-sbs-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:10px}
.acgfav-sbs-item{display:flex;align-items:center;justify-content:center;min-width:0;min-height:36px;padding:6px 10px;border-radius:8px;background:#ffffff;border:1px solid #cbd5e1;color:#1e293b!important;font-size:12.5px;font-weight:600;line-height:1.3;text-decoration:none!important;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}
.acgfav-sbs-item:hover,.acgfav-sbs-item:focus-visible{border-color:#2563eb;background:#eff6ff;color:#1d4ed8!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-site-backup-strip{background:#1a2433;border-color:#334155;color:#e2e8f0}
:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-title{color:#bae6fd}
:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-fav-btn.acgfav-card-fav-btn{background:#0f172a;border-color:#38bdf8;color:#7dd3fc}
:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-fav-btn.acgfav-card-fav-btn:hover,:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-fav-btn.acgfav-card-fav-btn:focus-visible{background:#1e293b;border-color:#7dd3fc;color:#e0f2fe}
:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-fav-btn.is-fav,:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-fav-btn.is-faved{background:rgba(120,53,15,.55)!important;border-color:#fbbf24!important;color:#fde68a!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-more{background:#2563eb;border-color:#3b82f6;color:#ffffff!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-more:hover,:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-more:focus-visible{background:#1d4ed8;border-color:#60a5fa;color:#ffffff!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-item{background:#27303c;border-color:#3f4b5c;color:#f1f5f9!important}
:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-item:hover,:is(html.io-black-mode,body.io-black-mode) .acgfav-sbs-item:focus-visible{background:#334155;border-color:#60a5fa;color:#ffffff!important}
@media (max-width:767.98px){
  .acgfav-site-backup-strip{padding:10px 11px}
  .acgfav-sbs-title{font-size:13px}
  .acgfav-sbs-actions{width:100%}
  .acgfav-sbs-fav-btn.acgfav-card-fav-btn,.acgfav-sbs-more{font-size:12px;padding:5px 10px}
  .acgfav-sbs-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px}
  .acgfav-sbs-item{padding:6px 8px;font-size:12px}
}
