h1 {
    margin: 0;
}

.centering-wrapper {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    overflow: hidden;
}

.main-container,
.footer-wrapper {
    margin: 1rem;
}

/* Bento UI Grid (最小限の機能) */
.works-wrapper {
    display: grid;
    /* 自動的にカラムを埋める。最小200px */
    grid-template-columns: 1fr;
    gap: 1rem;
}

.work-item {
    cursor: pointer;
    background: #ccc;
    border-radius: 1rem;
    overflow: hidden;
    height: 8rem;
    position: relative;
    box-shadow: 0 0 1rem var(--background-edge-color);
    transition: opacity .39s ease, box-shadow .39s ease;
}

.work-item:hover {
    opacity: .8;
    box-shadow: 0 0 2rem -1rem #fff;
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.work-item h3 {
    margin: 0;
    border: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #ffffff;
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--main-color-b) 75%, transparent 25%));
    padding: 5rem 1rem 1rem 1rem;
}

/* モーダル */
.modal {
    display: none;
    /* 初期状態は非表示 */
    position: fixed;
    align-items: center;
    justify-content: center;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(247, 250, 255, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    /* class追加で表示される */
}

body.show {
    overflow: hidden;
}

.modal-content {
    background: var(--background-color-b);
    padding: 1rem;
    margin-top: 5dvh;
    border-radius: 0;
    width: 100%;
    max-width: 768px;
    max-height: 90dvh;
    overflow-y: auto;
    position: relative;
    box-shadow:
        0 0 0.25rem var(--background-color-a),
        0 0 1rem var(--background-edge-color);
}


#modal-body img {
    max-width: 100%;
    max-height: 60dvh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.close-btn {
    position: fixed;
    top: 0;
    right: 1rem;
    font-size: 4rem;
    cursor: pointer;
    color: var(--main-color-a);
    line-height: 1;
    text-shadow: 0 0 .25em var(--background-color-b);
    transition: opacity .39s ease;
}

.close-btn:hover {
    opacity: .6;
}



h2.fulukalor-ink-color,
h3.fulukalor-ink-color {
    border-color: var(--fulukalor-ink-color);
}

.linkButton.fulukalor-ink-color {
    background: var(--fulukalor-ink-color);
}


@media (min-width: 768px) {
    .works-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(192px, 1fr));
    }

    .work-item:first-of-type {
        grid-column: span 2;
        grid-row: span 2;
    }

    .work-item {
        height: initial;
        aspect-ratio: 1;
    }

    .modal-content {
        border-radius: 1rem;
        padding: 1.5rem;
    }

    .close-btn {
        right: calc(50% - 384px);
    }
}