/* MUKU WEB霊園 responsive correction R31 — layout only. */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

main,
.hero,
.hero-copy,
.hero-visual,
.intro > *,
.opening-grid > *,
.feature-grid > *,
.design-grid > *,
.pricing-explanation > *,
.capacity-section > *,
.privacy-inner > *,
.assurance-grid > * {
    min-width: 0;
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
}

.r28-top-breadcrumb,
.section,
.site-footer {
    width: min(1160px, calc(100% - 32px));
}

/*
 * The former desktop hero combined a centered max-width grid with a second
 * viewport-derived left padding. On wide screens that double offset reduced
 * the text column to only a few Japanese characters. R31 uses one fluid
 * container, definite image heights and zero-minimum grid tracks.
 */
.hero {
    width: min(1380px, calc(100% - 32px));
    min-height: 0;
    margin: 4px auto 40px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 64px);
    align-items: center;
}

.hero-copy {
    align-self: center;
    width: 100%;
    max-width: none;
    padding: clamp(34px, 5vw, 68px) clamp(20px, 2.2vw, 34px)
        clamp(34px, 5vw, 68px) clamp(24px, 3.2vw, 52px);
}

.hero h1 {
    max-width: 100%;
    margin-bottom: 22px;
    font-size: clamp(2.05rem, 3.35vw, 3.25rem);
    line-height: 1.38;
    letter-spacing: .025em;
    text-wrap: pretty;
    word-break: keep-all;
    overflow-wrap: normal;
}

.hero-title-phrase {
    display: block;
    max-width: 100%;
    white-space: nowrap;
}

.hero-title-note,
.hero-lead {
    max-width: 620px;
    overflow-wrap: anywhere;
}

.hero-title-note {
    margin: -6px 0 20px;
}

.hero-visual {
    align-self: center;
    width: 100%;
    height: clamp(520px, 50vw, 720px);
    min-height: 0;
    max-height: 720px;
    margin: 0;
    border-radius: clamp(56px, 7vw, 105px) 22px 22px 22px;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center 47%;
}

.hero-visual figcaption {
    right: clamp(22px, 3vw, 38px);
    bottom: clamp(22px, 3vw, 36px);
    left: clamp(22px, 3vw, 38px);
}

.hero-actions .button {
    min-width: min(180px, 100%);
}

.hero-facts li {
    white-space: normal;
}

.design-card,
.opening-card,
.assurance-grid article,
.pricing-explanation,
.capacity-table-wrap {
    max-width: 100%;
}

.pricing-explanation dl div {
    flex-wrap: wrap;
}

@media (max-width: 1080px) {
    .hero {
        gap: 30px;
    }

    .hero-copy {
        padding-right: 18px;
        padding-left: 30px;
    }

    .hero h1 {
        font-size: clamp(2rem, 3.4vw, 2.45rem);
    }
}

@media (max-width: 960px) {
    .hero {
        width: min(760px, calc(100% - 32px));
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        margin-top: 0;
    }

    .hero-copy {
        max-width: 720px;
        margin: 0 auto;
        padding: 42px 22px 38px;
    }

    .hero h1 {
        font-size: clamp(2.25rem, 6.5vw, 3.2rem);
    }

    .hero-visual {
        width: 100%;
        height: clamp(450px, 72vw, 620px);
        max-height: 620px;
        margin: 0 auto;
        border-radius: 72px 18px 18px 18px;
    }

    .intro,
    .capacity-section,
    .privacy-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .header-inner,
    .r28-top-breadcrumb,
    .section,
    .site-footer {
        width: calc(100% - 24px);
    }

    .hero {
        width: calc(100% - 20px);
        margin-bottom: 28px;
    }

    .hero-copy {
        padding: 35px 16px 30px;
    }

    .hero h1 {
        margin-bottom: 18px;
        font-size: clamp(1.9rem, 8.8vw, 2.7rem);
        line-height: 1.42;
        letter-spacing: .01em;
    }

    .hero-title-note {
        margin-top: -3px;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-actions .button {
        width: 100%;
        min-width: 0;
    }

    .hero-visual {
        height: min(118vw, 560px);
        min-height: 390px;
        border-radius: 52px 14px 14px 14px;
    }

    .hero-visual figcaption {
        right: 20px;
        bottom: 20px;
        left: 20px;
    }

    .design-grid,
    .opening-grid,
    .assurance-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .login-card,
    .capacity-section .price-note {
        grid-column: auto;
    }

    .footer-main,
    .footer-status {
        align-items: stretch;
        flex-direction: column;
    }

    .footer-main nav {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-title-phrase {
        white-space: normal;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 8.4vw, 2.35rem);
        word-break: normal;
        overflow-wrap: break-word;
    }

    .hero-visual {
        height: min(122vw, 520px);
        min-height: 350px;
    }

    .hero-facts {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-facts li {
        width: fit-content;
        max-width: 100%;
    }

    .pricing-explanation dl div {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    table {
        min-width: 500px;
    }
}

@media (max-width: 340px) {
    .wordmark {
        font-size: 1.25rem;
        letter-spacing: .08em;
    }

    .wordmark span {
        margin-left: 5px;
        font-size: .7rem;
    }

    .hero-copy {
        padding-right: 13px;
        padding-left: 13px;
    }
}
