.slide {
    --img-size: min(900px, 90vw);
    --aspect-ratio: 1.5;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    inline-size: var(--img-size);
    aspect-ratio: var(--aspect-ratio);
    border: none;
    box-sizing: content-box;
    margin: auto;
    padding: 0;
    background-color: #fff;
    text-align: center;
}

.slide li {
    list-style: none;
    width: 18px;
    aspect-ratio: 1;
    user-select: none;
}

.slide input {
    translate: 0 50px;
    width: 100%;
    height: 100%;
    border-radius: 100%;
    background-color: #eee;
    cursor: pointer;
}

.slide input:checked {
    background-color: #bbb;
}

.slide img {
    --opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    inline-size: var(--img-size);
    aspect-ratio: var(--aspect-ratio);
    opacity: var(--opacity);
    transition: opacity 0.2s 0s ease-out;
    pointer-events: none;
    border-radius: 5px;
    object-fit: cover;
}

[for^="slide"]:has(:checked)+img {
    --opacity: 1;
}

[for^="slide"]:before,
[for^="slide"]:after {
    --btn-size: calc(var(--img-size) / 13);
    position: absolute;
    top: calc(50% - (var(--btn-size) / 2));
    inline-size: var(--btn-size);
    aspect-ratio: 1;
    background: #ffffffaa url(data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M16.67%200l2.83%202.829-9.339%209.175%209.339%209.167-2.83%202.829-12.17-11.996z%22%2F%3E%3C%2Fsvg%3E) no-repeat 50% 50% / calc(var(--btn-size) * 0.4);
    border: 1px solid #eee;
    border-radius: 100%;
    color: #fff;
    cursor: pointer;
    z-index: 1;
}

[for^="slide"]:before {
    left: calc(var(--btn-size) / 2 * -1);
}

[for^="slide"]:after {
    left: calc(var(--img-size) - var(--btn-size) / 2);
    rotate: 180deg;
}

/* 大事なのはここだけ
-----------------------------------
*/
li:has(:checked)+li [for^="slide"]:after,
li:not(li:has(:checked), li:has(:checked) ~ li) [for^="slide"]:before {
    content: "";
}

.nav_tile .portfolio-gallery {
    width: 100%;
    height: auto;
    position: relative;

}

.portfolio_title {
    font-weight: 700;
}

.portfolio_categories {
    font-size: 1em;
    color: #b3b3b1;
    letter-spacing: 2px;
    padding: 4px 0 8px 0;
}

.nav_tile {
    width: 100%;
    margin-top: 5em;
}

.nav_tile h3 {
    width: 100%;
    font-size: 1.2em;
    font-weight: 700;
    text-align: center;
}


.portfolio_wrap .pg-items {
    width: 100%;
}

.portfolio_wrap .pg-page-wrapper {
    width: 100%;
    min-height: 1560px;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.portfolio_wrap .pg-item {
    opacity: 1;
    width: min(25%, 275px);
    height: auto;
}

.portfolio_wrap .pg-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (800px <=width < 1300px) {
    .portfolio_wrap .pg-item {
        opacity: 1;
        width: min(33%, 250px);
    }

    .portfolio_wrap .pg-effect-overlay .pg-img-wrapper, .pc-effect-overlay .pg-img-wrapper {
        height: 250px;
    }
}

@media (1px <=width < 799px) {
    .portfolio_wrap .pg-item {
        opacity: 1;
        width: 100%;
        min-height: 250px;
    }
}