.home-wrap .search-title {
    display: flex;
    font-size: 0.75rem;
    color: #fafafa;
    text-align: center;
    margin: 0 auto 0.5rem;
    justify-content: center;
    align-items: center;
}

.home-wrap .search-title>p {
    font-size: 0.85rem;
    text-shadow: 0 0 0.5rem #ff4a7c;
}

.home-wrap .search-title>img {
    display: block;
    width: 3.2rem;
}

.home-wrap .search-title span {
    color: #fe628e;
}

.search-wrap {
    width: 100%;
    margin-bottom: 1rem;
}

/* 首页大搜索框默认隐藏，点击导航栏 #toggleSearch 切换 .is-home-search-open */
.home-wrap .search-wrap .search-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem;
    border-radius: 1.25rem;
    border: 0.05rem solid transparent;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    background-image: linear-gradient(to right, #171922, #171922), linear-gradient(90deg, #742fff, #ff4a7c);
}

.home-wrap:not(.is-home-search-open) .search-wrap .search-box {
    display: none;
}

/* 热门女优/标签/搜索：与搜索框同一套显隐（导航搜索图标切换 .is-home-search-open） */
.home-wrap:not(.is-home-search-open) .search-wrap .home-hot-sections {
    display: none;
}

.home-wrap:not(.is-home-search-open) .search-wrap .histoty-wrap {
    display: none;
}

/* 展开大搜索时隐藏顶部标题，与下方搜索框显隐相反 */
.home-wrap.is-home-search-open .search-title {
    display: none;
}

.home-wrap .search-wrap .search-box .search-prefix {
    width: 0.75rem;
    height: 0.75rem;
    margin-inline: 0.3rem;
}

.home-wrap .search-wrap .search-box .search-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.home-wrap .search-wrap .search-box .search-content>input {
    border: none;
    outline: none;
    padding: 0;
    background-color: transparent;
    font-size: 0.65rem;
    color: #fafafa;
}

.home-wrap .search-wrap .search-box .search-content>input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.home-wrap .search-wrap .search-box .search-content .input-mobile-search-btn {
    padding: 0.2rem 0.8rem;
    border-radius: 1rem;
    background-image: linear-gradient(112deg, #742fff, #ff4a7c 77%);
    font-size: 0.65rem;
    white-space: nowrap;
    color: #fff;
}

.home-wrap .title_with_more {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.9375rem 0 0.4688rem;
}

.home-wrap .title_with_more .title {
    font-weight: 500;
    font-size: 0.75rem;
}

.home-wrap .title_with_more .more {
    cursor: pointer;
    font-size: 0.75rem;
    color: #b8babc;
}

.home-wrap .title_with_more .more:hover {
    color: var(--萤石云破解-highlight-text-color);
}

.home-wrap .title_with_more .more img {
    width: 0.8125rem;
    height: 0.8125rem;
    display: block;
}

.xqbj-component-zz-recommend {
    margin-bottom: 0.9375rem;
}

/* —— 热门女优 / 热门标签 / 热门搜索 —— */
.home-hot-sections {
    width: 100%;
    margin-top: 1.875rem;
    margin-bottom: 0.5rem;
}

.home-hot-block__title {
    margin: 0 0 0.625rem;
    font-family: PingFangSC;
    font-size: 0.8rem;
    color: #7d7f86;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
}

.home-hot-block__divider {
    height: 0;
    margin: 1.2rem 0;
    border: none;
    border-top: 0.05rem solid rgba(255, 255, 255, 0.08);
}

/* 移动端：至少每行 2 个，避免过窄屏挤成 4 列 */
.home-hot-actress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem 0.5rem;
}

.home-hot-actress-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.home-hot-actress-item__avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    -o-object-fit: cover;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    background: #1a1d28;
}

/* z-image-loader 占位阶段全局 img.loading 为 contain，此处强制与成图一致 */
.home-hot-actress-item__avatar:not([src]),
.home-hot-actress-item__avatar.loading {
    -o-object-fit: cover;
    object-fit: cover;
    object-position: center;
}

.home-hot-actress-item__meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.home-hot-actress-item__name {
    font-family: PingFangSC;
    font-size: 0.7rem;
    font-weight: 600;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #fff;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-hot-actress-item__count {
    font-family: PingFangSC;
    font-size: 0.7rem;
    font-weight: normal;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

/* 移动端：每行至少 3 个；桌面端见 @media (min-width: 960px) */
.home-hot-tag-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 0.4rem;
}

.home-hot-tag {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    padding: 0.35rem 0.2rem;
    border-radius: 0.3rem;
    border: solid 0.05rem #979797;
    font-size: 0.55rem;
    color: #fafafa;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: transparent;
}

.home-hot-tag:hover {
    color: var(--a-text-color);
}

.home-hot-tag:active {
    opacity: 0.85;
}

.home-hot-search-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-hot-search-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.45rem 0;
    cursor: pointer;
}

/* 子元素已单独设置 color，inherit 被覆盖，需在 hover 里写子选择器 */
.home-hot-search-row:hover .home-hot-search-row__title,
.home-hot-search-row:hover .home-hot-search-row__heat {
    color: var(--a-text-color);
}

.home-hot-search-row:hover .home-hot-search-row__rank-num {
    color: var(--a-text-color);
}

.home-hot-search-row:last-child {
    border-bottom: none;
}

.home-hot-search-row__rank-cell {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    min-height: 1rem;
}

.home-hot-search-row__rank-img {
    display: block;
    width: 0.9rem;
    height: auto;
    object-fit: contain;
}

.home-hot-search-row__rank-num {
    font-size: 0.75rem;
    font-weight: 500;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    text-align: center;
    color: #ffbc01;
}

.home-hot-search-row__title {
    flex: 1;
    min-width: 0;
    font-family: PingFangSC;
    font-size: 0.7rem;
    font-weight: normal;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #fff;
    line-height: 1.45;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-hot-search-row__heat {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    font-family: PingFangSC;
    font-size: 0.6rem;
    font-weight: normal;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #fff;
}

.home-hot-search-row__heat-icon {
    display: block;
    width: 1.2rem;
    height: 1.2rem;
    object-fit: contain;
    flex-shrink: 0;
}

/* desktop */
@media (min-width: 960px) {
    .home-wrap .search-title {
        font-size: 1.8rem;
        margin: 0 auto 0.3rem;
    }

    .home-wrap .search-title>img {
        display: block;
        width: 4rem;
    }

    .home-wrap .search-title>p {
        font-size: 1.3rem;
    }

    .search-wrap {
        max-width: 40rem;
        margin: 0 auto 2rem;
    }

    .home-wrap .search-wrap .search-box {
        border-radius: 2.5rem;
    }

    .home-wrap .search-wrap .search-box .search-prefix {
        width: 1.5rem;
        height: 1.5rem;
        margin-inline: 0.625rem;
    }

    .home-wrap .search-wrap .search-box .search-content>input {
        font-size: 1rem;
    }

    .home-wrap .search-wrap .search-box .search-content .input-mobile-search-btn {
        padding: 0.3rem 1.8rem;
        border-radius: 1.25rem;
        font-size: 1rem;
    }

    .home-wrap .histoty-wrap {
        padding-inline: 0.8125rem;
    }

    .home-wrap .title_with_more {
        margin: 1.875rem 0 0.9375rem;
    }

    .home-wrap .title_with_more .title {
        font-size: 1rem;
    }

    .home-wrap .title_with_more .more {
        font-size: 0.9rem;
    }

    .home-hot-block__title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .home-hot-actress-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.2rem 0.4rem;
    }

    .home-hot-actress-item__avatar {
        width: 3rem;
        height: 3rem;
        -o-object-fit: cover;
        object-fit: cover;
        object-position: center;
    }

    .home-hot-actress-item__name {
        font-family: PingFangSC;
        font-size: 0.7rem;
        font-weight: 600;
        font-stretch: normal;
        font-style: normal;
        line-height: normal;
        letter-spacing: normal;
        color: #fff;
    }

    .home-hot-actress-item__count {
        font-size: 0.7rem;
    }

    .home-hot-tag-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.7rem 1rem;
    }

    .home-hot-tag {
        font-size: 0.8rem;
        padding: 0.45rem 0.35rem;
        border-radius: 0.35rem;
    }

    .home-hot-search-row__rank-cell {
        width: 1.5rem;
    }

    .home-hot-search-row__rank-img {
        width: 1.1rem;
    }

    .home-hot-search-row__rank-num {
        font-size: 0.75rem;
    }

    .home-hot-search-row__title {
        font-size: 0.8rem;
    }

    .home-hot-search-row__heat {
        font-size: 0.75rem;
    }
}

/* 全站搜索弹层：补全样式依赖 index.css 的 global-search；并避免桌面端 .search-wrap{max-width:40rem} 宽过面板 */
#global-search-popup .search-popup-body .home-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#global-search-popup .search-popup-body .home-wrap .search-wrap {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

@media (min-width: 960px) {
    .home-wrap .page-title-h1 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    #global-search-popup .search-popup-body .home-wrap .search-wrap {
        max-width: 100%;
        margin: 0;
    }
}

/* H5 侧边栏：展开子菜单为 2 列圆角卡片网格（与 UI 稿一致） */
#popup-menu .is-mobile #van-popup-menu nav ul>li>.content-collapse.show {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.75rem;
    height: auto !important;
    overflow: visible;
    box-sizing: border-box;
}

#popup-menu .is-mobile #van-popup-menu nav ul>li>.content-collapse.show>a {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.25rem;
    padding: 0.55rem 0.35rem;
    margin: 0;
    border-radius: 0.35rem;
    background: #161a23;
    color: #fff;
    font-size: 0.65rem;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

#popup-menu .is-mobile #van-popup-menu nav ul>li>.content-collapse.show>a.selected,
#popup-menu .is-mobile #van-popup-menu nav ul>li>.content-collapse.show>a:active {
    background: #1e2433;
    color: #fff;
}

/* PC 顶栏：「最新资源 / 我的收藏」右侧下拉箭头（结构为 a.nav-title > .nav_item，无内嵌 SVG） */
@media (min-width: 960px) {
    .is-desktop.navbar .navbar-content nav ul li > a.nav-title {
        overflow: visible;
    }

    .is-desktop.navbar .navbar-content nav ul li > a.nav-title::after {
        content: "";
        display: inline-block;
        flex-shrink: 0;
        width: 0.75rem;
        height: 0.75rem;
        margin-left: 0.125rem;
        background-color: currentColor;
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cpath d='M297.4 470.6C309.9 483.1 330.2 483.1 342.7 470.6L534.7 278.6C547.2 266.1 547.2 245.8 534.7 233.3C522.2 220.8 501.9 220.8 489.4 233.3L320 402.7L150.6 233.4C138.1 220.9 117.8 220.9 105.3 233.4C92.8 245.9 92.8 266.2 105.3 278.7L297.3 470.7z'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cpath d='M297.4 470.6C309.9 483.1 330.2 483.1 342.7 470.6L534.7 278.6C547.2 266.1 547.2 245.8 534.7 233.3C522.2 220.8 501.9 220.8 489.4 233.3L320 402.7L150.6 233.4C138.1 220.9 117.8 220.9 105.3 233.4C92.8 245.9 92.8 266.2 105.3 278.7L297.3 470.7z'/%3E%3C/svg%3E");
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
        -webkit-mask-size: contain;
        mask-size: contain;
        transition: transform 0.2s ease;
    }

    /* 子菜单展开（jQuery .show() 设为 display:block）时箭头朝上 */
    .is-desktop.navbar .navbar-content nav ul li:has(> .content-collapse[style*="display: block"]) > a.nav-title::after,
    .is-desktop.navbar .navbar-content nav ul li:has(> .content-collapse[style*="display:block"]) > a.nav-title::after {
        transform: rotate(180deg);
    }
}