/**
 * JIN theme critical layout stability
 *
 * ヘッダー直下の高さ変動を先に止めるための軽量CSS。
 * `jin-performance-fixes.css` より早く読み込み、初回レイアウトを安定させる。
 */

body.wp-theme-jin #nav-container,
body.wp-child-theme-jin-child #nav-container {
    min-height: 56px;
}

body.wp-theme-jin #drawernav .fixed-content,
body.wp-child-theme-jin-child #drawernav .fixed-content {
    min-height: 56px;
}

body.wp-theme-jin #nav-container.header-style3-animate.animate,
body.wp-child-theme-jin-child #nav-container.header-style3-animate.animate,
body.wp-theme-jin .pickup-contents-box.animate,
body.wp-child-theme-jin-child .pickup-contents-box.animate,
body.wp-theme-jin #main-contents.animate,
body.wp-child-theme-jin-child #main-contents.animate,
body.wp-theme-jin .cps-post-main.animate,
body.wp-child-theme-jin-child .cps-post-main.animate {
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

body.wp-theme-jin .pickup-contents-box,
body.wp-child-theme-jin-child .pickup-contents-box {
    min-height: clamp(104px, 15vw, 151px);
    overflow: hidden;
}

body.wp-theme-jin .pickup-contents,
body.wp-child-theme-jin-child .pickup-contents {
    min-height: inherit;
}

body.wp-theme-jin .cps-post-main,
body.wp-child-theme-jin-child .cps-post-main {
    display: flow-root;
    min-height: 1px;
}

body.wp-theme-jin .cps-post-main > :first-child,
body.wp-child-theme-jin-child .cps-post-main > :first-child {
    margin-top: 0 !important;
}

body.wp-theme-jin h2.wp-block-heading,
body.wp-child-theme-jin-child h2.wp-block-heading {
    scroll-margin-top: 80px;
}

@media screen and (max-width: 768px) {
    body.wp-theme-jin #nav-container,
    body.wp-child-theme-jin-child #nav-container,
    body.wp-theme-jin #drawernav .fixed-content,
    body.wp-child-theme-jin-child #drawernav .fixed-content {
        min-height: 48px;
    }

    body.wp-theme-jin .pickup-contents-box,
    body.wp-child-theme-jin-child .pickup-contents-box {
        min-height: clamp(88px, 28vw, 151px);
    }
}
