// スタイルシート common

@charset "utf-8";

@import "mixin";

:root { --sidebar-w: 200px; }

html { scroll-behavior: smooth; }

body {
    @include root;
    position: relative;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

img,
video {
    max-width: 100%;
    height: auto;
}

:where(figure) { margin: 0; }

br {
    &.sp {
        @media screen and (min-width: 769px) { display: none !important; }
    }
}

.default {
    @include contentdefault;
    @include eachcss;
}

// === Components ===

#bgmedia {
    pointer-events: none;
    position: fixed;
    inset: auto (50 / 1440 * 100vw) 0 auto;
    @include maxwidth(1024) {
        inset: auto auto 0 50%;
        transform: translateX(-50%);
    }

    svg {
        @include maxwidth(480) {
            width: 220px;
            height: 130vh;
        }
    }
}

#header {
    position: relative;
    .toppage & { position: absolute; inset: 0 0 auto 0; }
    z-index: 20;
    .container {
        padding: 30px (40 / 1440 * 100vw);
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 2rem;
        @include maxwidth(768) {
            justify-content: center;
            padding: 30px (28 / 375 * 100vw);
        }
        .sitename {
            img {
                width: 502px;
            }
        }
        .menu {
            color: $themecolor2;
            @include f_all(16);
            font-weight: bold;
            text-transform: uppercase;
            @include maxwidth(1280) { display: none; }
            nav {
                ul {
                    display: flex;
                    align-items: center;
                    flex-wrap: wrap;
                    gap: calc(30px - 2em);
                    li {
                        a {
                            @include flex_centering;
                            padding: 0.35em 1em;
                            box-sizing: border-box;
                            border-radius: 2em;
                            position: relative;
                            transition: 300ms ease;

                            @media (any-hover: hover) {
                                &:hover { background-color: $themecolor4; }
                            }
                        }
                    }
                }
            }
        }
    }
}

#gnav {
    &Container {
        pointer-events: none;
        position: fixed;
        inset: 0;
        z-index: 89;
        @media screen and (min-width: 1281px) { display: none !important; }
        body.menu_open & {  }
    }

    position: fixed;
    inset: 0;
    pointer-events: none;
    transform: translate(-100%, 0%);
    transition: 800ms ease;
    background-color: rgba(#FFF, 0.90);
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    &::-webkit-scrollbar { display: none; }
    padding: 10vh 0;
    box-sizing: border-box;

    body.menu_open & {
        pointer-events: auto;
        transform: translate(0, 0);
    }

    .container {
        @include container(600, 20);
        .sitename {
            img {
                width: 380px;
            }
        }
        .menu {
            margin-top: 40px;
            ul {
                display: flex;
                flex-direction: column;
                gap: 5px;
                li {
                    a {
                        @include f_all(16);
                        @include maxwidth(768) { @include f_all(15);}
                        font-weight: bold;
                        text-transform: uppercase;
                        @include flex_centering;
                        padding: 1em;
                        box-sizing: border-box;
                        border-radius: 2em;
                        color: $themecolor;
                        background-color: darken($themecolor4, 2%);
                        position: relative;

                        @media (any-hover: hover) {
                            &:hover { opacity: 0.8; }
                        }
                    }
                }
            }
        }
    }
}

#mainVisual {
    height: 100vh;
    height: 100svh;
    min-height: 600px;
    @include maxwidth(1024) { min-height: 750px; }
    @include maxwidth(420) { min-height: 650px; }
    position: relative;
    .container {
        display: flex;
        align-items: center;
        @include maxwidth(1024) { 
            justify-content: center;
        }
        height: 100%;
        .cols {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            gap: (60 / 1440 * 100vw);
            // padding: 10px (375 / 1440 * 100vw) 0 (90 / 1440 * 100vw);
            // @include maxwidth(1440) { padding: 10px (90 / 1440 * 100vw) 0; }
            padding: 10px (90 / 1440 * 100vw) 0;
            box-sizing: border-box;
            position: relative;
            @include maxwidth(1024) {
                padding: 10px 10px 4vh;
                flex-direction: column;
                // justify-content: flex-end;
                justify-content: center;
                gap: 20px;
                &>* { flex: none !important; }
            }
            .col {
                &:nth-child(1) {
                    flex-shrink: 0;
                    flex-basis: (320 / 1440 * 100vw);
                    @include maxwidth(1440) { flex-basis: 320px; }
                }
                &:nth-child(2) {
                    flex-basis: (590 / 1440 * 100vw);
                    @include maxwidth(1440) { flex-basis: 590px; }
                }
            }
        }
        .image {
            @include flex_centering;
            &>img {
                width: 320px;
                @include maxwidth(1024) {
                    width: (250 / 375 * 100vw);
                    max-width: 320px;
                    min-width: 250px;
                    margin-top: ((((450 / 320) * 100) / 1440 * 100vw) + 130px);
                }
                @include maxwidth(780) {
                    max-width: 280px;
                }
                @include maxwidth(480) {
                    width: (230 / 375 * 100vw);
                    min-width: 200px;
                }
            }
        }
        .label {
            text-align: center;
            margin-bottom: 30px;
            @include maxwidth(1024) { display: none !important; }
            &>img {  }
        }
        .title {
            @include ff_ja(biz);
            font-size: clamp(20px, (36 / 1440 * 100vw), 36px);
            font-weight: 500;
            line-height: 1.6;
            text-align: center;
            @include maxwidth(1024) { line-height: 1.8; }
            @include maxwidth(360) { font-size: 18px; }
        }
        .btn {
            @media screen and (min-width: 1025px) { display: none !important; }
            margin-top: 20px;
            &__link {
                @include f_all(16);
                font-weight: bold;
                line-height: 1.2;
                @include flex_centering;
                color: $accenttextcolor;
                background-color: $accentcolor;
                min-width: 315px;
                min-height: 3.75em;
                position: relative;
                @include maxwidth(360) {
                    @include f_all(15);
                    min-width: 280px;
                }

                &::after {
                    content: "";
                    flex-shrink: 0;
                    display: block;
                    width: 12px;
                    height: 14px;
                    background-color: currentColor;
                    clip-path: polygon(0 0, 0% 100%, 100% 50%);
                    margin-left: 5px;
                    margin-top: 0.15em;
                }
            }
        }
    }
}

#footerContent {
     body.subpage.page-history &{
        display: none;
    }
    // background-color: $basecolor;   
    position: relative;
    #footerContentContact {
        padding-top: 80px;
        @include maxwidth(768) { padding-top: 20px; }
        position: relative;
        .container {
            @include container(1440, 40);
            @include maxwidth(1024) {
                margin-left: 20px;
                margin-right: 20px;
            }
            body.toppage &{
                @media screen and (min-width: 1025px) {
                    &>* {
                        margin-left: calc(var(--sidebar-w) + 40px);
                    }
                }
            }
            .heading {
            }
            .body {
                margin-top: 40px;
                @include maxwidth(768) { margin-top: 30px; }
                .contact-buttons {
                    --mp-buttons-gap: 8px;
                    @include maxwidth(1200) {--mp-buttons-gap: 5px;}
                    display: flex;
                    flex-wrap: wrap;
                    gap: var(--mp-buttons-gap);
                    container-type: inline-size;
                    container-name: mp-buttons;
                    // justify-content: center;
                    @include maxwidth(768) { gap: 5px; }
                    body.subpage &{
                        margin: 0 calc(var(--sidebar-w) / 2 + 20px);
                        @include maxwidth(1200) { margin: 0 40px; }
                        @include maxwidth(768) { margin: 0; }
                    }
                }
                .contact-button {                    
                    flex: 1;              
                    aspect-ratio: 1;
                    @container mp-buttons (max-width: 768px) {
                        & { flex-basis: calc((100% - var(--mp-buttons-gap)) / 2); }
                    }
                    &__link {
                        text-align: center;       
                        @include ff_ja(mplus);
                        @include f_all(16);
                        @include maxwidth(1200) { @include f_all(14); } 
                        @include maxwidth(768) { @include f_all(13); }
                        @include maxwidth(360) { @include f_all(11); }
                        font-weight: bold;
                        line-height: 1.5;
                        @include flex_centering;                                         
                        height: 100%;
                        padding: 10px;
                        box-sizing: border-box;
                        color: $accenttextcolor;
                        background-color: $accentcolor;
                        position: relative;
                        transition: 300ms ease;
                        @media (any-hover: hover) {
                            &:hover { filter: opacity(0.85); }
                        }
                    }
                    &.bg-pink .contact-button__link {
                        color: $themecolor4;
                        background-color: $accentcolor;
                        @media (any-hover: hover) {
                            &:hover {
                                color: $accentcolor;
                                background-color: $themecolor4;
                            }
                        }
                    }
                    &.bg-white .contact-button__link {
                        color: $accentcolor;
                        background-color: rgba($themecolor4, 0.85);
                        @media (any-hover: hover) {
                            &:hover {
                                color: $accenttextcolor;
                                background-color: $accentcolor;
                            }
                        }
                    }
                }
            }
        }
    }
}

#footer {
    @include ff_ja(mplus);
    @include f_all(16);
    font-weight: bold;
    line-height: normal;
    text-transform: uppercase;
    text-align: center;
    padding: 80px 0 50px;
    @include maxwidth(768) { padding: 40px 0 80px; }
    position: relative;
    // background-color: $basecolor;
    .container {
        @include container(1440, 20);
        .sitename { color: $accentcolor; }
        .menu {
            color: $themecolor2;
            margin-top: 35px;
            @include maxwidth(768) { margin-top: 20px; }
            ul {
                display: flex;
                align-items: center;
                justify-content: center;
                flex-wrap: wrap;
                gap: calc(35px - 2em);
                @include maxwidth(768) {
                    flex-direction: column;
                    align-items: initial;
                    justify-content: initial;
                    gap: 10px;
                }
                li {
                    a {
                        @include flex_centering;
                        padding: 0.35em 1em;
                        box-sizing: border-box;
                        border-radius: 2em;
                        position: relative;
                        transition: 300ms ease;

                        @include maxwidth(768) {
                            @include f_all(14);
                            min-height: 3.57142em;
                            background-color: rgba($themecolor4, 0.85);
                            border-radius: 0px;
                        }

                        @media (any-hover: hover) {
                            &:hover { background-color: $themecolor4; }
                        }

                        &[target="_blank"] {
                            &::after {
                                content: "";
                                display: inline-block;
                                width: 11px;
                                aspect-ratio: 1;
                                background: url(../images/target-blank-color.svg) no-repeat center / contain;
                                margin-left: 5px;
                            }
                        }
                    }
                }
            }
            &.aside { margin-top: calc(20px - 0.7em); }
        }
        .copyright {
            color: $themecolor3;
            font-weight: 600;
            text-align: center;
            margin-top: 35px;
            @include maxwidth(768) {
                font-weight: bold;
                margin-top: 20px;
            }
            small {
                font-size: 14px;
                @include maxwidth(768) { font-size: 12px; }
            }
        }
    }
}

#sidebar {
    width: var(--sidebar-w);
    position: fixed;
    inset: 50% auto auto (40 / 1440 * 100vw);
    transform: translateY(-50%);
    z-index: 90;
    pointer-events: none;
    .header_scrollout & { pointer-events: auto; }
    @include maxwidth(1024) { display: none !important; }
    ul {
        display: flex;
        flex-direction: column;
        gap: 25px;
        li {
            opacity: 0;
            transform: translateX(-10px);
            transition: 300ms ease;
            @for $i from 0 to 10 {
                &:nth-child(#{$i + 1}) {
                    transition-delay: #{$i * 100}ms;
                }
            }
            .header_scrollout & {
                opacity: 1;
                transform: translateX(0px);
            }
            a {
                color: $themecolor3;
                @include f_all(14);
                font-weight: bold;
                line-height: normal;
                text-transform: uppercase;
                display: flex;
                align-items: flex-start;
                gap: 1rem;
                transition: 300ms ease;

                &::before {
                    content: "";
                    flex-shrink: 0;
                    display: block;
                    width: 6px;
                    aspect-ratio: 1;
                    background-color: currentColor;
                    margin-top: 0.45em;
                    transition: 300ms ease;
                }

                &.act {
                    color: $themecolor2;
                    &::before {
                        width: 8px;
                        background-color: $accentcolor;
                        border-radius: 50%;
                    }
                }

                @media (any-hover: hover) {
                    &:hover { transform: translateX(0.35em); }
                }
            }
        }
    }
}

#footbar {
    // body.subpage.page-memorial-project_application-form &,
    body.subpage.page-history &{
        display: none;
    }
    position: fixed;
    body.toppage & { position: absolute; }
    body.toppage.menu_open & { position: fixed; }
    z-index: 90;
    inset: 50vh 0 auto auto;
    transform: translateY(-50%);
    overflow: hidden;
    body.admin-bar & {
        inset: calc(50vh + 32px) 0 auto auto;
    }
    @include maxwidth(768) {
        position: fixed !important;
        inset: auto 0 0 0 !important;
        transform: translate(0, 0);
        body.toppage & {
            transform: translate(0, 100%);
            transition: transform 300ms ease;
        }
        body.toppage.header_scrollout &,
        body.toppage.menu_open &
        { transform: translate(0, 0); }
    }
    ul {
        display: flex;
        flex-direction: column-reverse;
        @include maxwidth(768) {
            flex-direction: row;
            justify-content: flex-end;
        }
        li {
            @media screen and (min-width: 1281px) {
                &:has(> #gnavToggle) { display: none; }
            }
            @include maxwidth(768) {
                flex: 1;
                &:has(> #gnavToggle) {
                    flex: 0 0 96px;
                    body.subpage.page-memorial-project_application-form &{
                        flex: 0 0 100%;
                    }
                }
            }
            &:nth-child(1){
                body.subpage.page-memorial-project_application-form &{
                    display: none;                    
                }
            }
            a {
                @media screen and (min-width: 769px) {
                    transition: 300ms ease;
                    @media (any-hover: hover) {
                        &:hover { transform: translateX(5px); }
                    }
                }
                &:not(#gnavToggle) {
                    @include f_all(16);
                    @include maxwidth(360) { @include f_all(14); }
                    font-weight: bold;
                    line-height: 1;
                    @include flex_centering;
                    gap: 10px;
                    color: $accenttextcolor;
                    background-color: $accentcolor;
                    position: relative;
                    &::after {
                        content: "";
                        flex-shrink: 0;
                        display: block;
                        width: 11px;
                        height: 10px;
                        background-color: currentColor;
                        clip-path: polygon(0 0, 0% 100%, 100% 50%);
                        margin-left: 4px;
                    }
                    @media screen and (min-width: 769px) {
                        flex-direction: column;
                        width: 55px;
                        height: 348px;
                    }
                    @include maxwidth(768) {
                        height: 50px;
                    }
                    &>span {
                        @media screen and (min-width: 769px) {
                            display: inline-block;
                            width: 1em;
                            writing-mode: vertical-rl;
                            letter-spacing: 0.2em;
                        }
                    }
                }
                &#gnavToggle {
                    cursor: pointer;
                    @include f_all(12);
                    font-weight: bold;
                    text-transform: uppercase;
                    display: block;
                    overflow: hidden;
                    text-indent: -9999px;
                    width: 55px;
                    height: 50px;
                    color: $themecolor2;
                    background-color: $themecolor4;
                    body.menu_open & { color: $accentcolor; }
                    position: relative;
                    @include maxwidth(768) {
                        @include f_all(15);
                        width: 100%;
                    }
                    &::after {
                        content: "menu";
                        body.menu_open & { content: "close"; }
                        position: absolute;
                        inset: 0;
                        @include flex_centering;
                        text-indent: 0px !important;
                    }
                }
            }
        }
    }
}

.c-heading {
    color: $themecolor;
    @include f_all(20);
    @include maxwidth(768) { @include f_all(18); }
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.5;
    padding-bottom: 10px;
    box-sizing: border-box;
    position: relative;
    &::after {
        content: "";
        display: block;
        width: 150px;
        height: 5px;
        @include maxwidth(768) { height: 4px; }
        background-color: $themecolor;
        position: absolute;
        inset: auto 0 0 0;
        margin: auto;
    }

    .lowercase { text-transform: lowercase }

}

.c-buttons {
    @include flex_centering;
    flex-wrap: wrap;
    gap: 5px;
}

.c-button {
    display: inline-block;
    @include maxwidth(768) { width: 100%; }
    &__link {
        @include ff_ja(noto);
        @include f_all(14);
        font-weight: bold;
        @include flex_centering;
        color: $accenttextcolor;
        background-color: $accentcolor;
        min-width: 273px;
        @include maxwidth(768) { min-width: initial; }
        min-height: 45px;
        position: relative;
        transition: 300ms ease;

        @media (any-hover: hover) {
            will-change: transform, box-shadow, border-radius;
            &:hover {
                border-radius: 50px;
                box-shadow:
                    0 8px 20px rgba($accentcolor, 0.35),
                    inset 0 0 20px rgba(#fff, 0.2);
            }
        }
    }
}

.news-terms {
    @include f_all(14);
    font-weight: bold;
    line-height: normal;
    position: relative;
    &:has(+ .news-headline) {
        margin-bottom: 50px;
        @include maxwidth(768) { margin-bottom: 25px; }
    }
    ul {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        .toppage & {
            @include maxwidth(768) {
                flex-wrap: nowrap;
            }
        }
        gap: 5px;
        li {
            .subpage & {
                @include maxwidth(768) {
                    flex-basis: calc((100% - 5px) / 2);
                    &:first-child { flex-basis: 100%; }
                }
            }
            a {
                @include flex_centering;
                min-width: 230px;
                min-height: 40px;
                color: $accentcolor;
                background-color: #FAF5EA;
                position: relative;
                transition: 300ms ease;
                .subpage & {
                    @include maxwidth(768) { min-width: initial; }
                }

                @media (any-hover: hover) {
                    .toppage & {
                        &:hover { box-shadow:inset 0 0 20px rgba($basetextcolor, 0.2); }
                    }
                    .subpage & {
                        &:hover { opacity: 0.8; }
                    }
                }
                
                &.current {
                    color: $accenttextcolor;
                    background-color:$accentcolor;
                    @media (any-hover: hover) {
                        &:hover { box-shadow:inset 0 0 20px rgba($accenttextcolor, 0.2); }
                    }
                }
            }
        }
    }
}

.headline {
    .noposts {
        @include f_all(14);
        font-weight: 500;
        line-height: 1.4;
        padding: 1em 2em;
        @include maxwidth(768) { padding: 1em; }
        box-sizing: border-box;
        background-color: #FAF5EA;
    }
}

.news-headline {
    position: relative;
    .toppage & {
        container-type: inline-size;
        container-name: news-headline-container;
    }
    .headline-items {
        display: flex;
        flex-wrap: wrap;
        gap: 40px 15px;
        .toppage & {
            @container news-headline-container (max-width: 900px) {
                & { row-gap: 15px; }
            }
            @include maxwidth(768) { gap: 10px; }
        }
        .subpage & {
            @include maxwidth(768) { gap: 10px; }
        }
        .headline-item {
            .toppage & {
                flex-basis: calc((100% - (15px * 2)) / 3);
                
                @container news-headline-container (max-width: 900px) {
                    & { flex-basis: calc((100% - (15px * 1)) / 2); }
                }
                @include maxwidth(768) { flex-basis: 100%; }
            }
            .subpage & {
                flex-basis: calc((100% - (15px * 2)) / 3);
                @include maxwidth(1200) { flex-basis: calc((100% - (15px * 1)) / 2); }
                @include maxwidth(768) { flex-basis: 100%; }
            }
            &__link {
                @include ff_ja(noto);
                @include f_all(14);
                font-weight: 500;
                line-height: 1.5;
                display: block;
                padding: 10px 10px 15px 25px;
                box-sizing: border-box;
                border-left: solid 5px $accentcolor;
                height: 100%;
                min-height: 120px;
                position: relative;
                transition: transform 300ms ease, border-width 300ms ease, background-color 300ms ease;

                @include maxwidth(768) {
                    padding: 10px 0 15px 16px;
                    min-height: 100px;
                    border-width: 4px;
                }

                @media (any-hover: hover) {
                    &:hover {
                        transform: translateX(5px);
                        border-left-width: 8px;
                        background-color: rgba($themecolor4, 0.5);
                    }
                }
                @media (any-hover: hover) and (max-width: 768px) {
                    &:hover {
                        transform: translateX(3px);
                        border-left-width: 6px;
                    }
                }

                .docs {
                    display: flex;
                    align-items: center;
                    flex-wrap: wrap;
                    gap: 0.5em 20px;
                }

                .date {
                    @include maxwidth(768) {
                        @include f_all(13);
                    }
                }

                .terms {
                    @include f_all(12);
                    font-weight: bold;
                    line-height: 1;
                    display: flex;
                    flex-wrap: wrap;
                    gap: 0.25em;
                    .term {
                        @include flex_centering;
                        padding: 0.20em 12px 0.25em;
                        box-sizing: border-box;
                        color: $accenttextcolor;
                        background-color: $accentcolor;
                        min-height: 20px;
                    }
                }

                .title { flex-basis: 100%; }
                
            }
        }
    }
}

// === Front page ===

@mixin gradientWipe() {
    background: linear-gradient(
        135deg,
        $basetextcolor 0%,
        $basetextcolor 50%,
        $themecolor3 50%,
        $themecolor3 100%
    );
    background-size: 200% 200%;
    background-position: 100% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 800ms cubic-bezier(0.4, 0, 0.2, 1);
    
    &.is-active {
        background-position: 0% 0%;
        transition-duration: 1200ms;
    }
}

#toppageMessage {
    min-height: 100vh;
    padding: 200px 0;
    @include maxwidth(768) { padding: 60px 0 80px; }
    box-sizing: border-box;
    @include flex_centering;
    position: relative;
    .container {
        @include container(1440, 20);
        .heading {  }
        .body {
            @include ff_ja(biz);
            text-align: center;
            margin-top: 40px;
            display: flex;
            flex-direction: column;
            align-items: center;

            .leadtext {
                font-size: clamp(24px, (36 / 1024 * 100vw), 36px);
                font-weight: 500;
                line-height: 1.5;
            }
            .text {
                @include f_all(18);
                @include maxwidth(768) { @include f_all(14); }
                color: $themecolor3;
                font-weight: 500;
                line-height: 1.6;
                margin-top: 30px;
                @include maxwidth(768) {
                    line-height: 1.8;
                    margin-top: 40px;
                }

                &>p:not(:first-child) { margin-top: 1.6em; }

                &>p {
                    @include gradientWipe();
                }
            }
        }
    }
}

#toppageNmeng {
    // margin-top: -50vh;
    background-color: #FFF;
    margin-bottom: 30vh;
    @include maxwidth(1024) { margin-bottom: 10vh; }
    position: relative;
    z-index: 95;

    .sticky {
        &-wrapper {
            height: 200vh;
            position: relative;
        }
        &-content {
            height: 100vh;
            overflow: hidden;
            position: sticky;
            inset: 0 auto auto 0;
        }
    }

    .first, .second {
        position: relative;
        z-index: 1;
    }
    .first {
        .sticky {
            &-wrapper {  }
            &-content {
                @include flex_centering;
                .logo {
                    will-change: transform, opacity;
                    &>img {
                        width: 202px;
                        @include maxwidth(768) { width: 150px; }
                    }
                }
            }
        }
    }
    .second {
        margin-top: -80vh;
        .sticky {
            &-wrapper {  }
            &-content {
                .gallery {
                    display: grid;
                    grid-template-columns: repeat(3, 1fr);
                    grid-template-rows: repeat(3, (100 / 3 * 1%));
                    height: 100%;
                    @include maxwidth(768) {
                        grid-template-columns: repeat(2, 1fr);
                        grid-template-rows: repeat(4, 25%);
                    }
                    // 高さ600px以下: PC幅は2行、スマホ幅は3行
                    @media (max-height: 600px) and (min-width: 769px) {
                        grid-template-rows: repeat(2, 50%);
                    }
                    @media (max-height: 600px) and (max-width: 768px) {
                        grid-template-rows: repeat(3, (100% / 3));
                    }
                    // 高さ400px以下: スマホ幅は2行
                    @media (max-height: 400px) and (max-width: 768px) {
                        grid-template-rows: repeat(2, 50%);
                    }
                    &-item {
                        overflow: hidden;
                        will-change: transform, opacity;
                        &:nth-child(1) { grid-area: 1 / 1 / 2 / 2; }
                        &:nth-child(2) { grid-area: 1 / 2 / 2 / 3; }
                        &:nth-child(3) { grid-area: 1 / 3 / 2 / 4; }
                        &:nth-child(4) { grid-area: 2 / 1 / 3 / 2; }
                        &:nth-child(5) { grid-area: 2 / 2 / 3 / 3; }
                        &:nth-child(6) { grid-area: 2 / 3 / 3 / 4; }
                        &:nth-child(7) { grid-area: 3 / 1 / 4 / 2; }
                        &:nth-child(8) { grid-area: 3 / 2 / 4 / 3; }
                        &:nth-child(9) { grid-area: 3 / 3 / 4 / 4; }
                        @include maxwidth(768) {
                            &:nth-child(1) { grid-area: 1 / 1 / 2 / 2; }
                            &:nth-child(2) { grid-area: 1 / 2 / 2 / 3; }
                            &:nth-child(3) { grid-area: 2 / 1 / 3 / 2; }
                            &:nth-child(4) { grid-area: 2 / 2 / 3 / 3; }
                            &:nth-child(5) { grid-area: 3 / 1 / 4 / 2; }
                            &:nth-child(6) { grid-area: 3 / 2 / 4 / 3; }
                            &:nth-child(7) { grid-area: 4 / 1 / 5 / 2; }
                            &:nth-child(8) { grid-area: 4 / 2 / 5 / 3; }
                            &:nth-child(9) { display: none; }
                        }
                        // 高さ600px以下: PC幅は2行(item7-9非表示)
                        @media (max-height: 600px) and (min-width: 769px) {
                            &:nth-child(7),
                            &:nth-child(8),
                            &:nth-child(9) { display: none; }
                        }
                        // 高さ600px以下: スマホ幅は3行(item7-9非表示)
                        @media (max-height: 600px) and (max-width: 768px) {
                            &:nth-child(7),
                            &:nth-child(8),
                            &:nth-child(9) { display: none; }
                        }
                        // 高さ400px以下: スマホ幅は2行(item5-9非表示)
                        @media (max-height: 400px) and (max-width: 768px) {
                            &:nth-child(5),
                            &:nth-child(6),
                            &:nth-child(7),
                            &:nth-child(8),
                            &:nth-child(9) { display: none; }
                        }
                        &>img {
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                        }
                    }
                }
            }
        }
    }
}

#toppageHistory {
    padding: (300 / 1440 * 100vw) 0 (400 / 1440 * 100vw);
    // padding: (300 / 1440 * 100vw) 0 (250 / 1440 * 100vw);
    @include maxwidth(1024) {
        padding: (340 / 375 * 100vw) 0 (480 / 375 * 100vw);
    }
    @include flex_centering;
    position: relative;
    .images {
        position: absolute;
        inset: 0;
        .image {
            position: absolute;
            overflow: hidden;
            &>img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

            &.js-target {
                opacity: 0;
                filter: blur(4px);
                transition: 800ms ease;
                &.is-active {
                    opacity: 1;
                    filter: blur(0px);
                }
            }
        }
        &.images__top {
            &>img {  }
            .image {
                &:nth-child(1) {
                    inset: 0 auto auto (150 / 1440 * 100vw);
                    width: (350 / 1440 * 100vw);
                    aspect-ratio: 350 / 310;
                    @include maxwidth(1024) {
                        inset: 30vw auto auto 0;
                        width: (208 / 375 * 100vw);
                    }
                }
                &:nth-child(2) {
                    inset: 0 30% auto auto;
                    width: (300 / 1440 * 100vw);
                    aspect-ratio: 300 / 232;
                    @include maxwidth(1024) {
                        width: (134 / 375 * 100vw);
                        inset: 0 auto auto 20%;
                    }
                }
                &:nth-child(3) {
                    inset: 25vh 0 auto auto;
                    width: (353 / 1440 * 100vw);
                    aspect-ratio: 353 / 269;
                    @include maxwidth(1024) {
                        inset: 25vw 0 auto auto;
                        width: (158 / 375 * 100vw);
                    }
                }
            }
        }
        &.image__bottom {
            .image {
                &>img {  }
                &:nth-child(1) {
                    inset: auto auto calc(10vh + 80px) 0;
                    width: (412 / 1440 * 100vw);
                    aspect-ratio: 412 / 331;
                    @include maxwidth(1024) {
                        width: (233 / 375 * 100vw);
                        inset: auto auto 64vw 0;
                    }
                }
                &:nth-child(2) {
                    inset: auto auto calc(0vh + 80px) 30%;
                    width: (237 / 1440 * 100vw);
                    aspect-ratio: 237 / 224;
                    @include maxwidth(1024) {
                        inset: auto 0 58vw auto;
                        width: (134 / 375 * 100vw);
                    }
                }
                &:nth-child(3) {
                    inset: auto (40 / 1440 * 100vw) calc(5vh + 80px) auto;
                    width: (335 / 1440 * 100vw);
                    aspect-ratio: 335 / 410;
                    @include maxwidth(1024) {
                        inset: auto auto 0 12vw;
                        width: (188 / 375 * 100vw);
                    }
                }
            }
        }
    }
    .container {
        @include container(1440, 20);
        z-index: 5;
        .heading {  }
        .body {
            @include ff_ja(biz);
            text-align: center;
            margin-top: 40px;
            @include maxwidth(768) { 
                margin-top: 20px;
            }
            .logo {
                text-align: center;
                &>img {
                    width: 150px;
                    @include maxwidth(768) { width: 132px; }
                }
            }
            .leadtext {
                @include f_all(28);
                font-weight: 500;
                line-height: 1.5;
                margin-top: 10px;
                @include maxwidth(768) {
                    @include f_all(24);
                    margin-top: 20px;
                    margin-left: -10px;
                    margin-right: -10px;
                }
                @include maxwidth(360) {
                    @include f_all(21);
                }
            }
            .c-buttons {
                margin-top: 30px;
                @include maxwidth(768) { margin-top: 20px; }
            }
            .c-button {
                &__link {
                }
            }
        }
    }
}

#toppageMemorialProject {
    padding: 80px 0 75px;
    @include maxwidth(768) {
        padding: 60px 0 25px;
    }
    position: relative;
    .container {
        @include container(1440, 40);
        @include maxwidth(1024) {
            margin-left: 20px;
            margin-right: 20px;
        }
        @media screen and (min-width: 1025px) {
            &>* {
                margin-left: calc(var(--sidebar-w) + 40px);
            }
        }
        .cols {
            display: flex;
            justify-content: space-between;
            gap: 2rem;
            // @include maxwidth(1024) {
            @include maxwidth(1200) {
                flex-direction: column;
                justify-content: initial;
                gap: 0;
            }
            .col {
                &:nth-child(1) {
                    flex-basis:570px;
                }
                &:nth-child(2) {
                    flex-basis:520px;
                }

                // @include maxwidth(1024) {
                @include maxwidth(1200) {
                    display: contents !important;
                }

                .image {
                    width: 100%;
                    aspect-ratio: 540 / 445;
                    // @include maxwidth(1024) {
                    @include maxwidth(1200) {
                        aspect-ratio: 335 / 186;
                        order: 2;
                        margin-top: 20px;
                    }
                    &>img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }
                }

                .heading {
                    // @media screen and (min-width: 1025px) {
                    @media screen and (min-width: 1200px) {
                        text-align: left;
                    }
                    // @include maxwidth(1024) {
                    @include maxwidth(1200) {
                        order: 1;
                    }
                    &::after {
                        // @media screen and (min-width: 1025px) {
                        @media screen and (min-width: 1200px) {
                            inset: auto auto 0 0;
                        }
                    }
                    span{
                        display: inline-block;
                        text-indent: -0.5em;
                        padding-bottom: 0.25em;
                        @include maxwidth(1200) {
                           text-indent: 0.2em; 
                        }
                    }
                }

                .body {
                    @include ff_ja(biz);
                    margin-top: 40px;
                    display: flex;
                    flex-direction: column;
                    align-items: flex-start;
                    &>* { width: 100%; }
                    // @include maxwidth(1024) {
                    @include maxwidth(1200) {
                        order: 3;
                        margin-top: 30px;
                    }
                    
                    .leadtext {
                        @include f_all(28);
                        font-weight: 500;
                        line-height: 1.5;
                        // @include maxwidth(1024) {
                        @include maxwidth(1200) {
                            text-align: center;
                        }
                        @include maxwidth(768) {
                            @include f_all(24);
                        }
                    }
                    .text {
                        @include f_all(18);
                        color: $themecolor3;
                        font-weight: 500;
                        line-height: 1.6;
                        margin-top: 30px;
                        // @include maxwidth(1024) {
                        @include maxwidth(1200) {
                            max-width: 540px;
                            width: 100%;
                            margin-left: auto;
                            margin-right: auto;
                        }
                        @include maxwidth(768) {
                            max-width: 400px;
                            @include f_all(14);
                        }

                        &>p:not(:first-child) { margin-top: 1.6em; }

                        &>p {
                            @include gradientWipe();
                        }
                    }
                }
            }
        }
        .buttons {
            --mp-buttons-gap: 8px;
            // @include maxwidth(1024) {--mp-buttons-gap: 5px;}
            @include maxwidth(1200) {--mp-buttons-gap: 5px;}
            display: flex;
            flex-wrap: wrap;
            gap: var(--mp-buttons-gap);
            margin-top: 30px;
            container-type: inline-size;
            container-name: mp-buttons;
            .button {
                flex: 1;
                aspect-ratio: 1;
                
                @container mp-buttons (max-width: 768px) {
                    & { flex-basis: calc((100% - var(--mp-buttons-gap)) / 2); }
                }

                &__link {
                    text-align: center;
                    @include flex_centering;
                    flex-direction: column;
                    gap: 25px;
                    @include maxwidth(768) { gap: 20px; }
                    padding: 10px;
                    box-sizing: border-box;
                    height: 100%;
                    color: $accentcolor;
                    background-color: #F8F4E6;
                    position: relative;
                    transition: 300ms ease;
                    .title {
                        @include ff_ja(mplus);
                        @include f_all(16);
                        @include maxwidth(1200) { @include f_all(14); } 
                        @include maxwidth(768) { @include f_all(13); }
                        @include maxwidth(360) { @include f_all(11); }
                        font-weight: bold;
                        line-height: 1.5;
                        @include flex_centering;
                        min-height: 3em;
                    }
                    .icon {
                        flex-shrink: 0;
                        transition: 300ms ease;
                    }

                    @media (any-hover: hover) {
                        &:hover {
                            color: $accenttextcolor;
                            background-color: $accentcolor;
                            .icon { filter: brightness(0) invert(1); }
                        }
                    }
                }

                // ホバーできない場合、1番目と4番目にホバースタイルを適用
                @container mp-buttons (max-width: 768px) {
                    &:nth-child(1),
                    &:nth-child(4) {
                        @media (any-hover: none) {
                            .button__link {
                                color: $accenttextcolor;
                                background-color: $accentcolor;
                                .icon { filter: brightness(0) invert(1); }
                            }
                        }
                    }
                }
            }
        }
    }
}

#toppageNews {
    padding: 75px 0 80px;
    @include maxwidth(768) { padding: 25px 0 40px; }
    position: relative;
    .container {
        @include container(1440, 40);

        @include maxwidth(1024) {
            margin-left: 20px;
            margin-right: 20px;
        }

        @media screen and (min-width: 1025px) {
            &>* {
                margin-left: calc(var(--sidebar-w) + 40px);
            }
        }

        .heading {
            @media screen and (min-width: 1025px) {
                text-align: left;
                &::after { inset: auto auto 0 0; }
            }
        }
        .body {
            margin-top: 30px;
            @include maxwidth(1024) { margin-top: 25px; }
            .news-terms {
                // display: none;
            }
            .news-headline {
                .headline-items {
                    .headline-item {
                        &__link {  }
                    }
                }
            }
        }
    }
    .c-buttons {
        margin: 50px 20px 0;
        @include maxwidth(1024) { margin-top: 30px; }
    }
}

// === Sub page ===

body.subpage #content,
body.subpage #header,
body.subpage #subpageTopicpath {
    background-color: #FFF;
    position: relative;
}

#subpageTopicpath {
    @include f_all(13);
    @include maxwidth(768) { @include f_all(12); }
    font-weight: 500;
    line-height: normal;
    position: relative;
    z-index: 1;
    .container {
        padding: 0 (40 / 1440 * 100vw) 13px;
        @include maxwidth(768) { padding: 0 20px 13px; }
        box-sizing: border-box;
        ul {
            li {
                display: inline-flex;
                align-items: center;
                &::after {
                    content: "";
                    flex-shrink: 0;
                    display: block;
                    width: 3px;
                    height: 5px;
                    background: url(../images/topicpath.svg) no-repeat center / contain;
                    margin: 0 8px;
                    margin-top: 0.15em;
                }

                &:last-child::after { display: none; }
            }
        }
    }
}

#subpageHeading {
    margin: 88px 0 55px;
    @include maxwidth(768) { margin: 60px 0 40px; }
    position: relative;
    .container {
        color: $themecolor;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1px;
        padding-bottom: 1rem;
        box-sizing: border-box;
        margin: 0 10px;
        .en {
            @include f_all(14);
            @include maxwidth(768) { @include f_all(13); }
            font-weight: bold;
            text-transform: uppercase;
            line-height: normal;
        }
        .ja {
            @include f_all(26);
            @include maxwidth(768) { @include f_all(24); }
            font-weight: bold;
            line-height: 1.5;
            text-align: center;
            span.sp-break{
                @include maxwidth(768) {
                    display: block;
                    line-height: 1.2;
                }
            }
        }
        .terms {
            body.single-news &{
                display: none;
            }
            @include f_all(12);
            font-weight: bold;
            line-height: 1;
            @include flex_centering;
            flex-wrap: wrap;
            gap: 0.25em;
            margin-top: 0.5em;
            .term {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                padding: 0.2em 12px 0.25em;
                box-sizing: border-box;
                color: $accenttextcolor;
                background-color: $accentcolor;
                min-height: 20px;
                &::before { content: "#"; margin-right: 0.1em; }

                @media (any-hover: hover) {
                    &:hover { opacity: 0.8; }
                }
            }
        }
        &::after {
            content: "";
            display: block;
            width: 150px;
            height: 5px;
            background-color: currentColor;
            position: absolute;
            inset: auto 0 0 0;
            margin: auto;
        }
    }
}

#subpageContent {
    margin-top: 55px;
    padding-bottom: 100px;
    @include maxwidth(768) {
        margin-top: 40px;
        padding-bottom: 80px;
    }
    position: relative;
    .container {
        @include container(900, 70);
        @include maxwidth(768) { margin-left: 20px; margin-right: 20px; }
        body.page-history & {
            @include container(1060, 70);
            @include maxwidth(768) { margin-left: 20px; margin-right: 20px; }
        }
        body.page-memorial-project_featured-selection & {
            @include container(1040, 70);
            @include maxwidth(768) { margin-left: 20px; margin-right: 20px; }
        }
        .default {
        }
    }
}

#subpageArchiveContent {
    margin-top: 55px;
    padding-bottom: 100px;
    @include maxwidth(768) {
        margin-top: 40px;
        padding-bottom: 80px;
    }
    position: relative;
    .container {
        @include container(1200, 70);
        @include maxwidth(768) { margin-left: 20px; margin-right: 20px; }
    }
}

.pager {
    text-align: center;
    margin: 40px 0;
    @include f_all(13);
    a,
    span {
        display: inline-block;
        margin: 0 0 0.25em 0.75em;
        min-width: 3em;
        padding: 1em;
        box-sizing: border-box;
        color: $accnetcolor;
        background-color: #FAF5EA;
        @media (any-hover: hover) {
            &:hover { opacity: 0.8; }
        }
    }
    .current {
        color: $accenttextcolor;
        background-color: $accentcolor;
        opacity: 1 !important;
    }
}

.monthly_archive_link {
    @include container(800, 10);
    margin-top: 50px;
    @include f_all(14);
    a.show_archive_links {
        display: block;
        width: 200px;
        height: 30px;
        display: flex;
        justify-content: center;
        align-items: center;
        // background-color: mix($basetextcolor, $basecolor, 0.05);
        background-color: #FAF5EA;
        margin: auto;
        border-radius: 30px;
        position: relative;
        &:after {
            content: ">";
            display: inline-block;
            transform: rotateZ(90deg) scaleX(0.5);
            position: absolute;
            right: 30px;
            top: 0;
            bottom: 0;
            margin: auto;
        }
    }
    ul {
        margin-top: 20px;
        display: none;
        &.show {
            display: flex;
        }
        justify-content: center;
        flex-wrap: wrap;
        li {
            margin: 0 5px 10px;
            flex: 0 0 113px;
            text-align: center;
            a {
                display: block;
                // background-color: mix($basetextcolor, $basecolor, 0.05);
                background-color: #FAF5EA;
                padding: 7px 0;
                border-radius: 15px;
            }
        }
    }
}

#connect {
    margin-top: 80px;
    position: relative;
    .wp-block-buttons {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .wp-block-button {
        &.is-current {
            pointer-events: none;
            filter: grayscale(100%);
        }
        &__link {
            min-width: initial;
        }
    }
}
.instagram-block{
    h3{}
    .instagram-inner{
        margin-top: 30px;
        background-color: #FAF5EA;
		padding: 30px 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        .logo{
            margin-bottom: 20px;
            img{}
        }
        .qr{
            margin-bottom: 20px;
            img{
                aspect-ratio:1;
                object-fit: cover;
                width: 173px;
            }
        }
        .c-button.btn{
            a.c-button__link{
                border-radius: 0px;
				@include f_all(14);
				font-weight: bold;
				line-height: normal;
				@include flex_centering;
				color: $accenttextcolor;
				background-color: $accentcolor;
				padding: 0.75em 2em;
				box-sizing: border-box;
				min-width: 273px;
				min-height: 45px;
				position: relative;
                text-decoration: none;
				@include maxwidth(768) {
					min-width: auto;
					width: 100% !important;
				}
				&::before {
					content: "";
					display: block;
					width: 5px;
					height: 7px;
					background: url(../images/arrow-right-white.svg) no-repeat center / contain;
					position: absolute;
					inset: 0 auto 0 15px;
					margin: auto;
				}
				&[target="_blank"] {
					&::before { display: none; }
					&::after {
						content: "";
						flex-shrink: 0;
						display: block;
						width: 9px;
						height: 9px;
						background: url(../images/target-blank-white.svg) no-repeat center / contain;
					}
				}

				@media (any-hover: hover) {
					&:hover { opacity: 0.8; }
				}
            }
        }
    }
}

#firstview {
    // margin-top: 13px;
    position: relative;
    z-index: 81;
    .container {
        #historySliders {
            height: calc(100vh - 145px);
            min-height: 700px;
            body.admin-bar & {
                height: calc(100vh - (145px + 32px));
            }
            @include maxwidth(768) {
                height: 100vw;
                min-height: 500px;
            }
            // .swiper {
            //     height: calc(100% / 4);
            //     &-wrapper {
            //     }
            //     &-slide {
            //         width: (380 / 1440 * 100vw);
            //         min-width: 355px;
            //         @include maxwidth(768) {
            //             width: (200 / 375 * 100vw);
            //             min-width: 200px;
            //         }
            //         height: 100%;
            //         overflow: hidden;
            //         >img {
            //             width: 100%;
            //             height: 100%;
            //             object-fit: cover;
            //         }
            //         > img.swap-clone {
            //             position: absolute;
            //             inset: 0;
            //             z-index: 1;
            //             clip-path: circle(0% at 50% 50%);
            //             transition: clip-path 1s ease-in-out;
            //             &.reveal { clip-path: circle(100% at 50% 50%); }
            //         }
            //     }
            // }
            .history {
                height: calc(100% / 4);
                overflow: hidden;
                &:nth-child(2) {
                    .history-wrapper {
                        transform: translate((190 / 1440 * -100vw), 0);
                        @include maxwidth(768) { transform: translate((120 / 375 * -100vw), 0); }
                    }
                }
                &:nth-child(3) {
                    .history-wrapper {
                        transform: translate((20 / 1440 * -100vw), 0);
                        @include maxwidth(768) { transform: translate((20 / 375 * -100vw), 0); }
                    }
                }
                &-wrapper {
                    display: inline-flex;
                    flex-wrap: nowrap;
                    height: 100%;
                }
                &-slide {
                    // width: (380 / 1440 * 100vw);
                    // min-width: 355px;
                    width: (355 / 1440 * 100vw);
                    min-width: 355px;
                    &.swiper-slide {
                        width: (380 / 1440 * 100vw);
                        min-width: 380px;
                    }
                    @include maxwidth(768) {
                        width: (200 / 375 * 100vw) !important;
                        min-width: 200px !important;
                    }
                    height: 100%;
                    overflow: hidden;
                    position: relative;
                    &::after {
                        content: "";
                        pointer-events: none;
                        position: absolute;
                        inset: 0;
                        background-color: rgba(#000, 0.05);
                        z-index: 1;
                    }
                    >img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }
                    > img.swap-clone {
                        position: absolute;
                        inset: 0;
                        z-index: 1;
                        clip-path: circle(0% at 50% 50%);
                        transition: clip-path 1s ease-in-out;
                        &.reveal { clip-path: circle(100% at 50% 50%); }
                    }
                }
            }
        }
        .overlay-logo {
            position: absolute;
            z-index: 1;
            inset: 10px;
            margin: auto;
            @include flex_centering;
            max-width: 415px;
            aspect-ratio: 1;
            background-color: rgba(#FFF, 0.75);
            padding: 1rem;
            box-sizing: border-box;
            @include maxwidth(768) {
                padding: 10px;
                max-width:280px;
            }
            img {
                width: 100%;
                height: 100%;
                object-fit: contain;
            }
        }
    }
}

#lightBulb {
    pointer-events: none;
    position: fixed;
    inset: auto (50 / 1440 * 100vw) 0 auto;
    @include maxwidth(1024) {
        inset: auto auto 0 50%;
        transform: translateX(-50%);
    }
    svg {
        @include maxwidth(480) {
            width: 220px;
            height: 130vh;
        }
    }
}