/* 官网静态页手机适配增强(仅窄屏/触屏生效,桌面样式不受影响) */

/* ========== 通用层 ========== */

/* 触屏设备:去掉返回按钮的悬停位移,避免点按后卡在 hover 态 */
@media (hover: none) and (pointer: coarse) {
    body .home-button:hover {
        transform: none !important;
    }
}

@media (max-width: 768px) {

    /* 防横向溢出兜底(只锁横轴,不影响各页自身的纵向滚动策略) */
    html,
    body {
        overflow-x: hidden !important;
    }

    /* 媒体元素不得超出屏宽 */
    body img,
    body video {
        max-width: 100%;
        height: auto;
    }

    /* 长单词/长串字符不撑破容器 */
    body h1,
    body h2,
    body h3,
    body p {
        overflow-wrap: break-word;
    }

    /* 返回首页按钮:收小并避开刘海安全区 */
    body .home-button {
        width: 40px !important;
        height: 40px !important;
        top: calc(10px + env(safe-area-inset-top, 0px)) !important;
        left: 10px !important;
    }

    body .home-button svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* 备案信息脚注收缩 */
    body .beian-info,
    body .icp-info {
        font-size: 12px;
    }
}

/* ========== 逐页层 ========== */

@media (max-width: 768px) {

    /* about_us:装饰光球超大(700px/600px)且重模糊,手机收小减负 */
    body .orb-1 {
        width: 340px !important;
        height: 340px !important;
    }

    body .orb-2 {
        width: 280px !important;
        height: 280px !important;
    }

    /* space/spaceship:导航链接过多时允许换行,避免挤出屏幕 */
    body .navbar-links {
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 6px;
    }

    /* 电影级页面(AGI/超脑/全息宇宙/时空卫士/超级AI):进度条别压安全区 */
    body .progress-bar {
        top: env(safe-area-inset-top, 0px) !important;
    }
}

@media (max-width: 480px) {

    /* nvos:features 网格 minmax(300px) 在 320 宽屏会溢出,强制单列 */
    body .features {
        grid-template-columns: 1fr !important;
    }

    body .feature-icon {
        width: 110px !important;
        height: 110px !important;
    }

    /* 小屏上滚回顶部按钮别挡备案脚注 */
    body .scroll-to-top {
        bottom: 64px !important;
    }
}
