.work-detail {
    background: var(--case-ivory);
}

.work-detail-page .case-shell {
    max-width: 860px;
}

.work-detail__intro {
    padding-block: 72px 38px;
}

.work-detail__intro h1 {
    margin: 28px 0 0;
    color: var(--case-ink);
    font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: clamp(36px, 3.9vw, 54px);
    font-weight: 400;
    line-height: 1.35;
}

.work-detail__meta {
    display: flex;
    align-items: center;
    gap: 0.65em;
    margin: 22px 0 0;
    color: var(--case-brown);
    font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: 15px;
    line-height: 1.8;
}

.work-gallery {
    padding-bottom: 76px;
}

.work-gallery__stage {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    display: block;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #eee9e1;
    color: #fff;
}

.work-gallery__stage > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-gallery__stage picture,
.work-gallery__thumb picture {
    display: block;
    width: 100%;
    height: 100%;
}

.work-gallery__stage picture img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.work-gallery__counter {
    position: absolute;
    right: 22px;
    bottom: 22px;
    padding: 5px 8px;
    background: rgba(23, 23, 22, 0.28);
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: 14px;
    letter-spacing: 0.16em;
}

.work-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.work-gallery__thumb {
    position: relative;
    aspect-ratio: 3 / 2;
    display: block;
    padding: 0;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 0;
    background: #eee9e1;
    cursor: pointer;
}

.work-gallery__thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 250, 242, 0.2);
    transition: opacity 180ms ease;
}

.work-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-gallery__thumb:hover::after,
.work-gallery__thumb:focus-visible::after,
.work-gallery__thumb.is-current::after {
    opacity: 0;
}

.work-gallery__thumb.is-current {
    border-color: var(--case-ink);
}

.work-gallery__thumb:focus-visible,
.work-overview__back:focus-visible {
    outline: 2px solid var(--case-brown);
    outline-offset: 4px;
}

.work-overview {
    padding-block: 88px 0;
}

.work-overview__list {
    margin: 36px 0 0;
    border-top: 1px solid var(--case-line);
}

.work-overview__list > div {
    display: grid;
    grid-template-columns: minmax(160px, 26%) 1fr;
    gap: 24px;
    padding: 20px 12px;
    border-bottom: 1px solid var(--case-line);
}

.work-overview__list dt,
.work-overview__list dd {
    margin: 0;
    color: var(--case-brown);
    font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: 15px;
    line-height: 1.7;
}

.work-overview__list dt {
    color: var(--case-muted);
}

.work-overview__back {
    width: fit-content;
    max-width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-left: auto;
    color: var(--case-brown);
    font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: 14px;
}

.work-index-nav {
    padding-block: 24px 72px;
}

.work-overview__back span {
    transition: transform 180ms ease;
}

.work-overview__back:hover span,
.work-overview__back:focus-visible span {
    transform: translateX(4px);
}

@media (max-width: 680px) {
    .work-detail__intro {
        padding-block: 60px 34px;
    }

    .work-detail__intro h1 {
        margin-top: 28px;
        font-size: 29px;
        line-height: 1.4;
    }

    .work-detail__meta {
        margin-top: 16px;
        font-size: 13px;
    }

    .work-gallery {
        padding-bottom: 68px;
    }

    .work-gallery__stage {
        aspect-ratio: 4 / 3;
    }

    .work-gallery__stage > img {
        object-position: center;
    }

    .work-gallery__counter {
        right: 12px;
        bottom: 12px;
        font-size: 12px;
    }

    .work-gallery__thumbs {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 36%;
        gap: 8px;
        margin-inline: -20px;
        padding-inline: 20px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
        scrollbar-color: var(--case-brown) rgba(83, 71, 55, 0.12);
    }

    .work-overview {
        padding-block: 54px 0;
    }

    .work-overview__list {
        margin-top: 34px;
    }

    .work-overview__list > div {
        grid-template-columns: 92px 1fr;
        gap: 14px;
        padding: 18px 4px;
    }

    .work-overview__list dt,
    .work-overview__list dd {
        font-size: 13px;
    }

    .work-index-nav {
        padding-block: 20px 48px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .work-gallery__thumb::after,
    .work-overview__back span {
        transition: none;
    }
}

.work-detail__intro {
    padding-block: 38px 28px;
}

.work-detail__intro h1 {
    margin-top: 20px;
    font-size: 44px;
}

.work-detail__catch {
    margin: 16px 0 0;
    font-family: "Noto Serif JP", "Yu Mincho", serif;
    font-size: 18px;
    line-height: 1.8;
}

.work-detail__meta {
    flex-wrap: wrap;
    gap: 4px 20px;
    margin-top: 12px;
    font-size: 13px;
}

.work-gallery {
    padding-bottom: 44px;
}

.work-gallery__thumb > span {
    position: absolute;
    bottom: 5px;
    left: 6px;
    padding: 2px 5px;
    background: rgb(0 0 0 / 60%);
    color: #fff;
    font-family: var(--case-section-label-font);
    font-size: 12px;
}

.work-story,
.work-points {
    padding-block: 88px;
}

.work-story {
    padding-top: 36px;
}

.work-story h2,
.work-point h3,
.work-consultation h2 {
    font-family: "Noto Serif JP", "Yu Mincho", serif;
    font-weight: 400;
    line-height: 1.7;
    text-wrap: pretty;
}

.work-story h2 {
    margin: 28px 0;
    font-size: 28px;
}

.work-mobile-break {
    display: none;
}

.work-story__copy {
    max-width: 680px;
}

.work-story__copy p,
.work-point__copy > p:not(.work-point__number) {
    margin: 0 0 16px;
    color: var(--case-brown);
    font-family: "Noto Serif JP", "Yu Mincho", serif;
    font-size: 15px;
    line-height: 2.05;
    overflow-wrap: anywhere;
}

.work-points {
    background: #f0ede7;
}

.work-detail .case-label {
    line-height: 1.6;
}

.work-point {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    margin-top: 50px;
    padding-bottom: 50px;
    border-bottom: 1px solid var(--case-line);
}

.work-point:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.work-point figure {
    margin: 0;
}

.work-point picture {
    display: block;
    aspect-ratio: 3 / 2;
}

.work-point img {
    width: 100%;
    height: auto;
    aspect-ratio: 2400 / 1601;
}

.work-point__number {
    margin: 0 0 14px;
    color: var(--case-brown);
    font-family: var(--case-section-label-font);
    font-size: 15px;
}

.work-point h3 {
    margin: 0 0 20px;
    font-size: 24px;
}

.work-scope {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.work-consultation {
    padding-block: 40px;
    background: #eeece8;
    color: #242424;
}

.work-consultation .case-label {
    color: inherit;
    font-size: 14px;
}

.work-consultation h2 {
    margin: 12px 0;
    font-size: 22px;
}

.work-consultation p:not(.case-label) {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.9;
}

.work-line-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: fit-content;
    max-width: 100%;
    min-height: 56px;
    padding: 14px 22px;
    background: #262626;
    color: #fff;
    font-family: "Noto Serif JP", "Yu Mincho", serif;
    font-size: 15px;
    line-height: 1.6;
    transition: background 180ms ease;
}

.work-line-link > span:last-child {
    flex-shrink: 0;
}

.work-line-link:hover {
    background: #454545;
}

.work-line-link:focus-visible,
.work-form-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 5px;
}

.work-line-link:focus-visible {
    outline-color: #666;
}

.work-consultation--bottom {
    padding-block: 64px;
    text-align: center;
}

.work-consultation--bottom .work-line-link {
    margin-inline: auto;
}

.work-form-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin-top: 20px;
    text-decoration: underline;
    text-underline-offset: 5px;
    font-size: 13px;
}

.work-sticky,
.work-sticky[hidden] {
    display: none;
}

@media (max-width: 960px) {
    .work-point {
        gap: 28px;
    }

    .work-point h3 {
        font-size: 21px;
    }
}

@media (max-width: 680px) {
    .work-detail-page {
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    .work-detail-page a,
    .work-detail-page button {
        scroll-margin-block: 20px 110px;
    }

    .work-detail__intro {
        padding-block: 32px 24px;
    }

    .work-detail__intro h1 {
        font-size: 32px;
    }

    .work-detail__catch {
        font-size: 16px;
    }

    .work-detail__meta {
        font-size: 12px;
        gap: 4px 12px;
    }

    .work-gallery__stage {
        aspect-ratio: 3 / 2;
    }

    .work-gallery__thumb {
        min-height: 44px;
    }

    .work-story,
    .work-points {
        padding-block: 56px;
    }

    .work-story {
        padding-top: 20px;
    }

    .work-scope {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .work-story h2 {
        font-size: 23px;
    }

    .work-mobile-break {
        display: inline;
    }

    .work-point {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 32px;
        padding-bottom: 32px;
    }

    .work-point h3 {
        font-size: 22px;
    }

    .work-consultation {
        padding-block: 32px;
    }

    .work-consultation h2 {
        margin-block: 20px 16px;
        font-size: 23px;
    }

    .work-line-link {
        padding-inline: 16px;
        gap: 12px;
        font-size: 14px;
    }

    .work-consultation--bottom {
        padding-block: 52px;
        text-align: center;
    }

    .work-consultation--bottom p:not(.case-label) {
        max-width: 30em;
        margin: 0 auto 28px;
        text-wrap: pretty;
    }

    .work-consultation--bottom .work-line-link {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto;
        text-align: center;
    }

    .work-sticky:not([hidden]) {
        position: fixed;
        z-index: 50;
        inset: auto 0 0;
        display: block;
        padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgb(255 250 242 / 97%);
        border-top: 1px solid var(--case-line);
    }

    .work-sticky .work-line-link {
        width: 100%;
    }
}
.work-keep-together {
    display: inline-block;
}

.work-gallery__arrow:not([hidden]) {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 45%);
    border-radius: 0;
    background: rgb(20 20 20 / 48%);
    cursor: pointer;
    transition: background .2s;
}

.work-gallery__arrow--prev { left: 12px; }
.work-gallery__arrow--next { right: 12px; }
.work-gallery__arrow img { filter: invert(1); }
.work-gallery__arrow:hover { background: rgb(20 20 20 / 72%); }
.work-gallery__arrow:focus-visible { outline: 2px solid white; outline-offset: 3px; }
