/**
 * 手机端等比缩小：布局 1440×810，整页同比缩放；页间留缝防遮挡；禁闪动
 */
html.mobile-proportional,
html.mobile-proportional body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100%;
    -webkit-overflow-scrolling: touch;
}

html.mobile-proportional {
    --mpro-screen-h: calc(100vw * 9 / 16);
    --mpro-vh: calc(100vw * 9 / 1600);
    --mpro-section-gap: calc(100vw * 9 / 240);
}

html.mobile-proportional .scroll-wrapper {
    transform: none !important;
    transition: none !important;
    width: 100vw;
    display: flex;
    flex-direction: column;
    gap: var(--mpro-section-gap);
    padding-bottom: var(--mpro-section-gap);
}

html.mobile-proportional .scroll-wrapper > section:not(.site-footer-wrap):not(.products-page-section):not(.hero-page5-section),
html.mobile-proportional .support-hero-section,
html.mobile-proportional .support-download-section,
html.mobile-proportional .support-faq-section,
html.mobile-proportional .contact-section,
html.mobile-proportional .tech-hero,
html.mobile-proportional .hero-page3-section,
html.mobile-proportional .tech-ion-section,
html.mobile-proportional .tech-laser-section,
html.mobile-proportional .tech-matrix-section,
html.mobile-proportional .tech-pvd-section,
html.mobile-proportional .tech-cook-section,
html.mobile-proportional .story-hero,
html.mobile-proportional .story-lifestyle,
html.mobile-proportional .story-cert,
html.mobile-proportional .detail-hero,
html.mobile-proportional .museum-slide {
    min-height: var(--mpro-screen-h) !important;
    height: var(--mpro-screen-h) !important;
    max-height: var(--mpro-screen-h) !important;
    overflow: hidden !important;
    box-sizing: border-box;
    isolation: isolate;
    position: relative;
    z-index: 0;
    flex-shrink: 0;
}

html.mobile-proportional .site-footer-wrap {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin-top: calc(var(--mpro-section-gap) * 0.5);
}

/* 内容超过一屏的页面：保持桌面横向排版，高度随内容伸展（钻釜之家 / 首页产品屏） */
html.mobile-proportional .products-page-section,
html.mobile-proportional .hero-page5-section {
    min-height: var(--mpro-screen-h) !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box;
    isolation: isolate;
    flex-shrink: 0;
    position: relative;
    z-index: 0;
    justify-content: flex-start !important;
    padding-top: calc(100vw * 9 / 120) !important;
    padding-bottom: calc(100vw * 9 / 64) !important;
}

html.mobile-proportional .products-page-text {
    transform: translateY(calc(100vw * 9 / 480)) !important;
}

html.mobile-proportional .products-filter-bar {
    margin-top: calc(100vw * 9 / 200) !important;
}

html.mobile-proportional .products-cards-container {
    height: calc(100vw * 581 / 1440) !important;
    min-height: calc(100vw * 581 / 1440) !important;
    margin-top: calc(100vw * 9 / 320) !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
}

html.mobile-proportional .products-card {
    flex: 0 0 calc((100% - 48px) / 3) !important;
    max-width: calc((100% - 48px) / 3) !important;
    width: auto !important;
    height: 100% !important;
}

html.mobile-proportional .hero-page5-section .page5-cards-container {
    flex-direction: row !important;
    height: calc(100vw * 480 / 1440) !important;
    min-height: calc(100vw * 480 / 1440) !important;
    margin-bottom: calc(100vw * 9 / 120) !important;
}

html.mobile-proportional .hero-page5-section .page5-card {
    flex: 1 !important;
    width: auto !important;
    height: 100% !important;
}

html.mobile-proportional .hero-page5-section .page5-footer {
    position: relative !important;
    width: calc(100% - 10vw) !important;
    margin: 0 auto calc(100vw * 9 / 160) !important;
}

html.mobile-proportional .hero-media,
html.mobile-proportional .hero-page2-bg,
html.mobile-proportional .hero-page3-bg,
html.mobile-proportional .hero-page4-bg,
html.mobile-proportional .hero-page5-bg,
html.mobile-proportional .products-page-bg,
html.mobile-proportional .support-hero-bg,
html.mobile-proportional .support-download-bg,
html.mobile-proportional .support-faq-bg,
html.mobile-proportional .story-hero-bg,
html.mobile-proportional .story-lifestyle-bg,
html.mobile-proportional .story-cert-bg,
html.mobile-proportional .detail-hero-bg,
html.mobile-proportional .tech-hero-bg,
html.mobile-proportional .tech-ion-bg,
html.mobile-proportional .tech-laser-bg,
html.mobile-proportional .tech-matrix-bg,
html.mobile-proportional .tech-pvd-bg,
html.mobile-proportional .tech-cook-bg,
html.mobile-proportional .museum-slide > .slide-bg {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    z-index: 0 !important;
    pointer-events: none;
}

html.mobile-proportional .hero-media {
    background-position: center center !important;
}

html.mobile-proportional .hero-page2-bg {
    background-position: center center !important;
}

html.mobile-proportional .hero-page3-bg,
html.mobile-proportional section.hero-page3-section .hero-page3-bg {
    background-position: center bottom !important;
}

html.mobile-proportional .hero-page4-bg {
    background-position: center center !important;
}

html.mobile-proportional .hero-page5-bg,
html.mobile-proportional .products-page-bg {
    background-position: center top !important;
}

html.mobile-proportional .museum-slide > .slide-bg {
    opacity: 0.15;
    filter: none !important;
    transform: none !important;
}

html.mobile-proportional .museum-slider {
    height: auto !important;
    overflow: visible !important;
}

html.mobile-proportional .museum-track {
    height: auto !important;
    display: flex;
    flex-direction: column;
    gap: var(--mpro-section-gap);
}

html.mobile-proportional .scroll-wrapper > section:not(.site-footer-wrap) > :not([class$="-bg"]):not([class*="-overlay"]):not(.hero-media),
html.mobile-proportional .hero-content,
html.mobile-proportional .hero-page2-content,
html.mobile-proportional .hero-page3-content,
html.mobile-proportional .hero-page4-content,
html.mobile-proportional .hero-page4-cards,
html.mobile-proportional .hero-page5-content,
html.mobile-proportional .tech-hero-content,
html.mobile-proportional .products-page-content {
    position: relative;
    z-index: 2;
}

html.mobile-proportional .hero-content {
    margin-top: calc(100vw * 9 / 160) !important;
    padding-left: 16vw !important;
    padding-right: 4vw !important;
}

html.mobile-proportional .hero-page2-content {
    margin-top: calc(100vw * 9 / 160) !important;
}

html.mobile-proportional .hero-page3-content,
html.mobile-proportional .hero-page4-content {
    margin-top: calc(100vw * 9 / 110) !important;
    padding-right: 5vw !important;
}

html.mobile-proportional .hero-page4-cards {
    bottom: calc(100vw * 9 / 280) !important;
    padding-bottom: calc(100vw * 9 / 480) !important;
}

html.mobile-proportional .hero-page5-content {
    padding-top: calc(100vw * 9 / 200) !important;
}

html.mobile-proportional .four-values-content {
    padding-top: calc(100vw * 9 / 180) !important;
}

html.mobile-proportional .tech-hero-content {
    margin-top: calc(100vw * 9 / 120) !important;
}

html.mobile-proportional .story-timeline-pin {
    min-height: var(--mpro-screen-h) !important;
    height: var(--mpro-screen-h) !important;
}

html.mobile-proportional .story-timeline-viewport {
    height: 100% !important;
    min-height: 0 !important;
}

html.mobile-proportional .story-timeline-frame {
    height: 100% !important;
}

html.mobile-proportional header {
    position: fixed;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.72) 0%, rgba(10, 10, 10, 0.35) 70%, transparent 100%);
}

/* 禁用手机端渐显动画，防止闪烁 */
html.mobile-proportional .fade-in,
html.mobile-proportional .fade-in.visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* 减少背景层在滚动时的合成闪烁 */
html.mobile-proportional .hero-media,
html.mobile-proportional [class$="-bg"]:not(.card-bg):not(.card-bg-small):not(.card-bg-large) {
    will-change: auto;
}
