/* Homepage only. Layout overrides; original artwork, transitions and keyframes are retained. */
/* === 启用 case-card 底部链接点击：只在卡片 is-active 状态下才允许跳转 ===
   非激活状态下禁用 pointer-events，点击会先激活卡片，激活后才能点链接跳转 === */
body #wanpishi-home-case-deck .wanpishi-case-card:not(.is-active) .wanpishi-case-card__links a {
  pointer-events: none !important;
  cursor: default !important;
}

body #wanpishi-home-case-deck .wanpishi-case-card.is-active .wanpishi-case-card__links a {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* === 全局副标题统一：仅精确匹配 case-title p 和 reviews-header p，
     颜色用 rgba(24,24,24,.72)，字体统一 PingFang SC，避免误伤 hero 白色副标题 === */
body #wanpishi-home-case-deck .wanpishi-case-title p,
body .wanpishi-reviews-header p {
  color: rgba(24, 24, 24, .72) !important;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif !important;
  font-weight: 500 !important;
}

@media (max-width: 760px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body #pixpix-local-nav .pixpix-original-row {
        display: flex !important;
        justify-content: space-between !important;
        height: 64px !important;
        padding: 0 68px 0 16px !important;
    }

    body #pixpix-local-nav .pixpix-original-row > :first-child {
        width: auto !important;
        flex: 0 0 auto;
    }

    body #pixpix-local-nav .pixpix-nav-center,
    body #pixpix-local-nav .pixpix-reference-links,
    body #pixpix-local-nav .pixpix-original-links,
    body #pixpix-local-nav .pixpix-original-actions,
    body #pixpix-local-nav .pixpix-menu-button {
        display: none !important;
    }

    body #pixpix-local-nav .wanpishi-logo-link,
    body #pixpix-local-nav .pixpix-original-logo {
        display: flex !important;
        width: auto !important;
        align-items: center;
    }

    body #pixpix-local-nav .wanpishi-logo-image,
    body #pixpix-local-nav .pixpix-original-wanpishi-logo {
        display: block !important;
        width: 120px !important;
        height: auto !important;
        max-width: none !important;
        margin: 0 !important;
        transform: none !important;
    }

    .wanpishi-mobile-nav-toggle {
        width: 44px;
        height: 44px;
        top: 10px;
    }

    .wanpishi-mobile-nav-panel {
        max-height: calc(100dvh - 84px);
        overflow-y: auto;
    }

    html body .CandidateHero_hero__fDXr2.pixpix-restore-hero {
        height: auto !important;
        min-height: 0 !important;
        padding: 96px 0 96px !important;
    }

    .pixpix-restore-hero .CandidateHero_heroInformation__EN_6w {
        min-height: 0 !important;
        width: calc(100% - 32px) !important;
    }

    body .pixpix-restore-hero .CandidateHero_heroCopy__NEz7M {
        gap: 16px !important;
    }

    #candidate-hero-title .wanpishi-home-title-char {
        font-size: inherit !important;
        line-height: inherit !important;
    }

    body .pixpix-restore-hero .CandidateHero_heroEyebrow__vwmF3 {
        font-size: 14px !important;
        line-height: 22px !important;
    }

    body .pixpix-restore-hero .CandidateHero_heroDescription___y3Hl {
        font-size: clamp(12px, 3.6vw, 16px) !important;
        line-height: 1.6 !important;
    }

    html body .CandidateHero_hero__fDXr2.pixpix-restore-hero .CandidateHero_showcase__s7LJG {
        width: calc(100% - 32px) !important;
        max-width: 600px !important;
        padding: 10px !important;
        margin-top: 28px !important;
        margin-bottom: 38px !important;
    }

    html body .CandidateHero_hero__fDXr2.pixpix-restore-hero .CandidateHero_outputCanvas__YdEHe,
    html body .CandidateHero_hero__fDXr2.pixpix-restore-hero .CandidateHero_tvcPreview__xuMvH {
        border-radius: 16px !important;
    }

    html body .CandidateHero_hero__fDXr2.pixpix-restore-hero .wanpishi-idesign-ornament--blue {
        left: -12px !important;
    }

    #candidate-hero-title {
        overflow-wrap: anywhere !important;
    }

    .wanpishi-games-title,
    #jdpartner-heading,
    #wanpishi-pixpix-video-clone-title,
    #wanpishi-home-case-deck .wanpishi-case-title h2,
        /* 用 #wanpishi-volcengine-trust h2 匹配 home-2.css 的优先级 (0,2,1)，覆盖它的 font-size */
    #wanpishi-volcengine-trust h2,
    #wanpishi-reviews-title {
        width: 100% !important;
        max-width: 100% !important;
        line-height: 1.3 !important;
        font-size: clamp(20px, 5.6vw, 28px) !important;
        font-weight: 600 !important;
        letter-spacing: -.05em !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    body .wanpishi-heading-block .wanpishi-pixpix-subheading,
    #wanpishi-home-case-deck .wanpishi-case-title p,
    .wanpishi-reviews-header p,
    .wanpishi-pixpix-video-clone__subheading {
        font-size: 15px !important;
        line-height: 1.7 !important;
        max-width: 100% !important;
    }

    #wanpishi-jdcloud-partner .jdpartner-stat-desc {
        font-size: 12px !important;
        line-height: 1.6 !important;
    }

    .wanpishi-pixpix-video-clone::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 120px;
            background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 100%);
        pointer-events: none;
        z-index: 3;
    }

    /* 数字本身：移动端从默认 16px 放大到响应式 clamp(24px,7.4vw,36px) */
    #wanpishi-jdcloud-partner .jdpartner-num {
        font-size: clamp(24px, 7.4vw, 36px) !important;
        line-height: 1.25 !important;
        font-weight: 700 !important;
    }

    #wanpishi-jdcloud-partner .jdpartner-head {
        max-width: 100%;
    }

    body .CandidateCreativeShowcase_section__5__VL {
        padding: 52px 0 44px !important;
        gap: 24px !important;
    }

    body .CandidateCreativeShowcase_header__ZWFG5 {
        width: calc(100% - 32px) !important;
        gap: 0 !important;
    }

    body .CandidateCreativeShowcase_carouselBlock__LCFLL {
        height: 440px !important;
        margin-top: 0 !important;
    }

    body .CandidateCreativeShowcase_carousel__BBm3F {
        height: 440px !important;
        min-height: 0 !important;
        padding-bottom: 0 !important;
    }

    body .CandidateCreativeShowcase_labelsViewport__5RAlN,
    body .CandidateCreativeShowcase_edgeFade__bKBiy {
        height: 440px !important;
    }

    body .CandidateCreativeShowcase_primaryAction__0WLK0 {
        max-width: calc(100% - 32px) !important;
        padding-inline: 20px !important;
        margin-top: 0 !important;
    }

    .wanpishi-pixpix-video-clone {
        padding: 48px 0 32px !important;
    }

    .wanpishi-pixpix-video-clone__heading,
    .wanpishi-pixpix-video-clone__subheading {
        box-sizing: border-box;
        padding-inline: 16px;
    }

    .wanpishi-pixpix-video-clone__stage {
        height: calc(45vw + 40px) !important;
        min-height: 190px;
    }

    .wanpishi-pixpix-video-clone__card--hero {
        width: 82vw !important;
        height: auto !important;
        aspect-ratio: 1.833;
    }

    .wanpishi-pixpix-video-clone__nav {
        width: 44px !important;
        height: 44px !important;
        top: calc(22.4vw - 22px) !important;
    }

    #wanpishi-home-case-deck {
        padding: 48px 16px !important;
    }

    #wanpishi-home-case-deck .wanpishi-case-deck {
        height: clamp(280px, 70vw, 360px) !important;
        gap: clamp(4px, 1.5vw, 8px) !important;
        margin-top: 28px !important;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        scroll-padding-inline: 0;
    }

    /* === 侧边非激活卡片 === */
    #wanpishi-home-case-deck .wanpishi-case-card {
        flex: 0 0 clamp(36px, 9vw, 56px) !important;
    }
    #wanpishi-home-case-deck .wanpishi-case-card__logo {
        left: clamp(2px, 0.8vw, 6px) !important;
        bottom: clamp(8px, 2.5vw, 16px) !important;
        height: clamp(16px, 4vw, 28px) !important;
        max-width: clamp(40px, 10vw, 70px) !important;
    }
    #wanpishi-home-case-deck .wanpishi-case-card__logo img {
        max-height: 100% !important;
    }

    /* === 激活主卡片：所有值按 deck 高度(70vw) 同比例 === */
    #wanpishi-home-case-deck .wanpishi-case-card.is-active {
        flex: 0 0 min(80vw, 380px) !important;
    }
    /* logo: bottom≈deck的35%, height≈deck的11% */
    #wanpishi-home-case-deck .wanpishi-case-card.is-active .wanpishi-case-card__logo {
        left: clamp(12px, 4vw, 22px) !important;
        bottom: clamp(80px, 24vw, 130px) !important;
        height: clamp(24px, 7.5vw, 40px) !important;
        max-width: clamp(65px, 18vw, 120px) !important;
    }
    /* body: bottom≈deck的16%, font≈deck的3.1% */
    #wanpishi-home-case-deck .wanpishi-case-card__body {
        left: clamp(12px, 4vw, 22px) !important;
        right: clamp(12px, 4vw, 22px) !important;
        bottom: clamp(40px, 12vw, 72px) !important;
        font-size: clamp(11px, 3.5vw, 15px) !important;
        line-height: 1.55 !important;
        max-width: none !important;
    }
    /* links: bottom≈deck的6.7%, font≈deck的3.6% */
    #wanpishi-home-case-deck .wanpishi-case-card__links {
        left: clamp(12px, 4vw, 22px) !important;
        bottom: clamp(16px, 5vw, 30px) !important;
        gap: clamp(10px, 2.8vw, 22px) !important;
    }
    #wanpishi-home-case-deck .wanpishi-case-card__links a {
        font-size: clamp(12px, 3.8vw, 16px) !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    #wanpishi-home-case-deck .wanpishi-case-card__links a::after {
        margin-left: clamp(2px, 0.6vw, 5px) !important;
    }

    #wanpishi-volcengine-trust {
        padding: 52px 16px 44px !important;
    }

    #wanpishi-volcengine-trust .wanpishi-trust-content {
        padding: 22px 18px;
    }

    #wanpishi-youdoo-reviews {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }

    #wanpishi-youdoo-reviews .wanpishi-reviews-header {
        padding-inline: 16px;
    }

    /* === 真实玩家分享卡片：移动端适配 === */
    #wanpishi-youdoo-reviews .wanpishi-reviews-track {
        gap: 12px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    #wanpishi-youdoo-reviews .wanpishi-review-card {
        flex: 0 0 calc(100vw - 32px) !important;
        width: calc(100vw - 32px) !important;
        max-width: 300px;
        min-height: 0 !important;
        height: auto !important;
    }

    #wanpishi-youdoo-reviews .wanpishi-review-copy {
        min-height: 0 !important;
        height: auto !important;
        padding: 20px 18px !important;
        gap: 16px;
        justify-content: flex-start;
    }

    #wanpishi-youdoo-reviews .wanpishi-review-text {
        font-size: 12px !important;
        line-height: 1.7 !important;
    }

    #wanpishi-youdoo-reviews .wanpishi-review-avatar {
        width: 36px;
        height: 36px;
    }

    #wanpishi-youdoo-reviews .wanpishi-review-name {
        font-size: clamp(13px, 3.5vw, 16px) !important;
    }

    #wanpishi-youdoo-reviews .wanpishi-review-role {
        font-size: clamp(11px, 1.9vw, 13px) !important;
    }

    .wanpishi-shared-footer__description {
        font-size: 13px;
    }

    .wanpishi-shared-footer__contact {
        font-size: 12px;
        min-height: 40px;
        max-width: 100%;
        padding-inline: 12px;
    }

    .wanpishi-shared-footer__qr-label {
        font-size: 12px;
    }
}

/* The shared menu is inserted on mobile; keep it hidden when resizing back to desktop. */
@media (min-width: 761px) {
    .wanpishi-mobile-nav-toggle, .wanpishi-mobile-nav-panel {
        display: none !important;
    }
}

@media (max-width: 640px) {
    body .CandidateCreativeShowcase_carouselBlock__LCFLL,
    body .CandidateCreativeShowcase_carousel__BBm3F,
    body .CandidateCreativeShowcase_labelsViewport__5RAlN,
    body .CandidateCreativeShowcase_edgeFade__bKBiy {
        height: 68vw !important;
        min-height: 0 !important;
    }
}

@media (max-width: 620px) {
    /* Keep the hero's two Chinese phrases together without replacing animated glyphs. */
    html body #candidate-hero-title.CandidateHero_heroTitle__vPcbn.wanpishi-home-title-motion {
        max-width: 7em !important;
        margin-inline: auto !important;
        text-wrap: wrap !important;
    }
}

@media (max-width: 760px) {
    /* Anchor the original blue atmosphere to the responsive hero, instead of
       cropping its dark top with the legacy -70px offset / 620px fixed height. */
    html body .CandidateHero_hero__fDXr2.pixpix-restore-hero .CandidateHero_atmosphere__q_gwm {
        top: -20px !important;
        bottom: 0 !important;
        height: calc(100% + 20px) !important;
        filter: blur(clamp(10px, 3.5vw, 24px)) !important;
        background: linear-gradient(180deg, #190096 0%, #0080ff 21%, #78d2ff 53%, transparent 100%) !important;
    }
}