/* ==========================================================================
   Page layout — Mobile (max-width: 767px)
   ========================================================================== */

@media (max-width: 767px) {
    body {
        padding-right: 0;
        padding-bottom: 0;
        max-width: none;
    }

    .app {
        flex-direction: column;
        max-width: none;
        width: 100%;
        min-width: 0;
        padding-bottom: 0;
    }

    /* 侧栏 / 顶栏 / 页脚移动端样式见 sidebar.mobile.css、site-header.mobile.css、site-footer.mobile.css */

    /* —— 主内容区 —— */
    .page-main {
        padding: 16px 16px 24px;
        gap: 28px;
    }

    .page-search {
        display: flex;
        align-self: stretch;
        height: 46px;
        padding: 0 16px 0 12px;
        align-items: center;
        gap: 10px;
        background: rgba(255, 255, 255, 0.04);
        border-radius: 13px;
        border: 1px solid rgba(255, 255, 255, 0.07);
        box-sizing: border-box;
    }

    .page-search__icon {
        flex-shrink: 0;
        width: 12px;
        height: 12px;
        object-fit: contain;
        display: block;
    }

    .page-search__input {
        flex: 1 1 0;
        min-width: 0;
        border: none;
        background: transparent;
        outline: none;
        color: #eef0f8;
        font-size: 14px;
        font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    }

    .page-search__input::placeholder {
        color: #676d85;
    }

    .content-section {
        gap: 22px;
    }

    .content-section--lg-gap {
        gap: 22px;
    }

    /* —— 区块标题 —— */
    .section-header {
        align-items: center;
        gap: 13px;
    }

    .section-header--split {
        align-items: center;
    }

    .section-header__inner {
        flex-wrap: wrap;
        gap: 13px;
        align-items: center;
    }

    .section-header__accent {
        width: 5px;
        height: 26px;
        border-radius: 5px;
        background: linear-gradient(90deg, #8a6bff 0%, #26d7e6 100%);
    }

    .section-header__title {
        font-size: 20px;
        white-space: nowrap;
    }

    .section-header__desc {
        font-size: 12px;
        color: #676d85;
        line-height: 1.3;
    }

    .section-header__more {
        font-size: 13px;
        font-weight: 600;
        color: #a7acc2;
    }

    /* —— 文章轮播：Swiper 单卡 —— */
    .article-carousel-wrap .article-carousel__btn,
    .article-carousel-wrap:hover .article-carousel__btn {
        display: none !important;
    }

    .article-carousel .swiper-slide.article-card,
    .article-carousel .swiper-slide.carousel-slide {
        height: 182px;
        min-height: 182px;
        max-height: 182px;
        overflow: hidden;
    }

    .article-carousel .swiper-slide .article-card__shell {
        height: 100%;
    }

    .article-card__body {
        width: 100%;
        max-width: none;
        padding: 20px 16px 20px 20px;
        gap: 8px;
    }

    .article-card__title {
        font-size: 22px;
        line-height: 1.28;
    }

    .article-card__title--md {
        font-size: 21px;
        line-height: 1.28;
    }

    .article-card__desc {
        color: rgba(255, 255, 255, 0.82);
        line-height: 1.5;
    }

    .article-card__more {
        color: #eef0f8;
        font-weight: 600;
    }

    .article-card__img {
        width: 46%;
        height: 100%;
        top: 0;
        transform: none;
    }

    /* 与桌面端相同的径向底 + 线性遮罩，窄屏略提前透明以露出右侧封面 */
    .article-card--violet .article-card__body {
        background: linear-gradient(
                90deg,
                #140a3a 0%,
                #3a1f9e 54%,
                rgba(58, 31, 158, 0.72) 64%,
                rgba(20, 10, 58, 0.28) 82%,
                transparent 100%
        );
    }

    .article-card--cyan .article-card__body {
        background: linear-gradient(
                90deg,
                #061820 0%,
                #0d3d4a 54%,
                rgba(10, 40, 48, 0.72) 64%,
                rgba(6, 24, 32, 0.28) 82%,
                transparent 100%
        );
    }

    .article-card--pink .article-card__body {
        background: linear-gradient(
                90deg,
                #160a18 0%,
                #4a1848 54%,
                rgba(42, 16, 40, 0.72) 64%,
                rgba(22, 10, 24, 0.28) 82%,
                transparent 100%
        );
    }

    .carousel-dots {
        margin-top: 0;
        gap: 8px;
    }

    .carousel-dots__item {
        width: 8px;
        height: 8px;
        border-radius: 4px;
    }

    .carousel-dots__item--active {
        width: 26px;
        height: 8px;
        border-radius: 5px;
    }

    /* —— 热门推荐：主推 + 2 列小卡 —— */
    .featured-block__row {
        flex-direction: column;
        gap: 14px;
        padding: 0;
        background: none;
        border: 0;
    }

    .featured-card {
        width: 100%;
        min-height: 0;
        padding: 18px;
        border-radius: 24px;
        background: linear-gradient(90deg, #16121f 0%, #0e1626 55%, #0a0d17 100%);
        border: 1px solid rgba(138, 107, 255, 0.3);
        box-shadow: none;
        gap: 16px;
    }

    .featured-card__desc {
        font-size: 14px;
        line-height: 22.4px;
        color: #a7acc2;
    }

    .featured-card__title {
        font-size: 23px;
    }

    .featured-side {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        width: 100%;
    }

    .tool-card-compact {
        width: calc((100% - 15px) / 2);
        flex: 0 0 calc((100% - 15px) / 2);
        min-height: 0;
        padding: 18px;
        border-radius: 18px;
        background: linear-gradient(90deg, #16121f 0%, #0e1626 55%, #0a0d17 100%);
        border: 1px solid rgba(138, 107, 255, 0.3);
        gap: 11px;
    }

    .tool-card-compact__desc {
        font-size: 12px;
        line-height: 18px;
    }

    .tool-card__name {
        font-size: 15px;
    }

    /* —— 横幅 + 工具卡 2 列自适应（高 125px） —— */
    .hot-tools {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 14px;
        column-gap: 15px;
        align-content: flex-start;
        width: 100%;
    }

    .hot-tools > .banner-row {
        grid-column: 1 / -1;
        width: 100%;
    }

    .hot-tools > .tool-grid {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 14px;
        column-gap: 15px;
        width: 100%;
    }

    .banner-row {
        flex-wrap: nowrap;
        gap: 16px;
        padding-bottom: 4px;
    }

    .banner-img {
        width: 140px;
        height: 70px;
        border-radius: 10px;
        border: 0.7px solid rgba(255, 255, 255, 0.3);
    }

    .hot-tools > .tool-card,
    .hot-tools > .tool-grid > .tool-card {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 125px;
        min-height: 125px;
        max-height: 125px;
        padding: 18px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.07);
        gap: 11px;
        overflow: hidden;
    }

    .hot-tools .tool-card__desc {
        font-size: 12px;
        line-height: 18px;
        -webkit-line-clamp: 2;
    }

    .page-main--index .hot-tools .tool-card__desc {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: unset;
        -webkit-box-orient: unset;
    }

    .hot-tools .tool-card__name {
        font-size: 15px;
    }

    /* —— 首页：隐藏分类筛选 —— */
    .page-main--index .filter-nav {
        display: none;
    }

    /* —— 筛选标签横向滚动 —— */
    .filter-nav {
        align-self: stretch;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-nav::-webkit-scrollbar {
        display: none;
    }
}
