.story-shell {
    width: min(100%, 77rem);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.customer-story {
    --story-ink: #12283e;
    --story-blue: #0062b2;
    --story-line: #d6e2ed;
    --story-tint: #eef5fb;
    color: #2f4154;
}

.customer-story a:focus-visible {
    outline: 2px solid var(--story-blue);
    outline-offset: 3px;
}

.story-hero {
    position: relative;
    isolation: isolate;
    background-color: #10283e;
    color: #fff;
}

.story-hero__photo,
.story-hero::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.story-hero__photo {
    z-index: -2;
    object-fit: cover;
    object-position: center 20%;
}

.story-hero::after {
    z-index: -1;
    content: "";
    background:
        linear-gradient(90deg, rgb(10 30 50 / 90%), rgb(10 30 50 / 69%) 31%, rgb(10 30 50 / 23%) 63%, rgb(10 30 50 / 4%)),
        linear-gradient(0deg, rgb(10 30 50 / 24%), transparent 45%);
}

.story-hero__inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: clamp(27rem, 37vw, 35rem);
    padding-block: 3.5rem 4rem;
    text-shadow: 0 1px 5px rgb(5 20 35 / 55%);
}

.story-hero h1 {
    font-size: clamp(1.8125rem, 5.4vw, 4.125rem);
    font-weight: 800;
    line-height: 1.26;
    letter-spacing: 0.01em;
}

.story-hero h1 span {
    display: block;
}

.story-hero__summary {
    max-width: 32em;
    margin-top: 1.125rem;
    color: #eff7ff;
    font-size: clamp(0.9375rem, 1.5vw, 1.125rem);
    line-height: 1.85;
}

.story-layout {
    display: grid;
    gap: 2.125rem;
    padding-block: clamp(2rem, 4.5vw, 4.25rem) clamp(3rem, 7vw, 6rem);
}

.story-contents {
    align-self: start;
    padding: 1rem 1.2rem;
    border: 1px solid var(--story-line);
    border-radius: 0.75rem;
    background: #f7fafd;
}

.story-contents__title {
    color: var(--story-ink);
    font-size: 0.875rem;
    font-weight: 800;
}

.story-contents ul {
    margin-top: 0.5rem;
}

.story-contents li + li {
    border-top: 1px solid var(--story-line);
}

.story-contents a {
    display: block;
    padding-block: 0.6rem;
    color: var(--story-blue);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.55;
    text-decoration: none;
}

.story-contents a:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.story-body {
    min-width: 0;
    max-width: 50rem;
    font-size: clamp(1rem, 1.5vw, 1.0625rem);
    line-height: 1.95;
}

.story-body > section + section {
    margin-top: clamp(2.25rem, 5vw, 3.75rem);
}

.story-hospital-case {
    --case-gutter: clamp(0.75rem, 2vw, 1.5rem);
    margin-inline: calc(-1 * var(--case-gutter));
    padding: clamp(1.5rem, 3vw, 2.25rem) var(--case-gutter);
    border: 1px solid var(--story-line);
    border-top: 3px solid var(--story-blue);
    border-radius: 1rem;
    background-color: #f5f9fd;
}

.story-body h2,
.story-body h3 {
    color: #14539a;
    font-weight: 800;
    line-height: 1.45;
}

.story-body h2 {
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    scroll-margin-top: 6rem;
    text-wrap: balance;
}

.story-hospital-case > h2 {
    scroll-margin-top: 8.25rem;
}

.story-body h2 span {
    display: inline-block;
    max-width: 100%;
}

.story-body h3 {
    font-size: clamp(1.125rem, 1.65vw, 1.3125rem);
}

.story-goals {
    padding: 1rem 1rem 1rem 2.25rem;
    border-inline-start: 3px solid var(--story-blue);
    border-radius: 0 0.5rem 0.5rem 0;
    background: var(--story-tint);
    color: var(--story-ink);
    font-weight: 600;
}

.story-body li::marker {
    color: var(--story-blue);
}

.story-partnership__signoff {
    padding-block-start: 0.75rem;
    border-block-start: 1px solid var(--story-line);
}

.story-partnership__illustration {
    display: block;
    width: min(80%, 21.5rem);
    height: auto;
    margin-inline: auto;
    aspect-ratio: 4.4;
    object-fit: cover;
}

.story-figure-link {
    display: block;
    border-radius: 0.75rem;
    cursor: zoom-in;
}

.story-figure-link,
.story-figure-link:hover {
    text-decoration: none;
}

.story-figure {
    overflow: hidden;
    border: 1px solid var(--story-line);
    border-radius: 0.75rem;
    background: #f7fafd;
}

.story-figure figcaption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    padding: 0.7rem 1rem;
    border-top: 1px solid var(--story-line);
    color: var(--story-ink);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.65;
}

.story-figure__photo {
    display: block;
    width: 100%;
    height: auto;
    /* 元の写真に含まれる上下の黒帯を表示範囲の外に出す。 */
    aspect-ratio: 5 / 3;
    object-fit: cover;
    object-position: center 46%;
}

.story-figure__credit {
    color: #14539a;
}

.story-lightbox {
    width: max-content;
    max-width: calc(100% - 1.5rem);
    max-height: calc(100% - 1.5rem);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0.75rem;
    background: #fff;
}

.story-lightbox::backdrop {
    background: rgb(10 30 50 / 78%);
}

.story-lightbox__viewport,
.story-lightbox__viewport img {
    max-height: calc(100vh - 5rem);
    max-height: calc(100dvh - 5rem);
}

.story-lightbox__viewport {
    overflow: auto;
    overscroll-behavior: contain;
}

.story-lightbox__viewport:focus-visible {
    outline: 2px solid var(--story-blue);
    outline-offset: -2px;
}

.story-lightbox__viewport img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

.story-lightbox[data-original-size] .story-lightbox__viewport img {
    max-width: none;
    max-height: none;
}

@media (max-width: 47.99rem) {
    .story-hero__photo {
        object-position: 36% center;
    }

    .story-hero::after {
        background: linear-gradient(0deg, rgb(10 30 50 / 89%), rgb(10 30 50 / 62%) 46%, rgb(10 30 50 / 3%));
    }

    .story-hero__inner {
        justify-content: end;
        min-height: 25rem;
        padding-block: 8.5rem 3.5rem;
    }
}

@media (min-width: 56rem) {
    .story-layout {
        grid-template-columns: 13.5rem minmax(0, 1fr);
        gap: clamp(2rem, 5vw, 4.25rem);
    }

    .story-contents {
        position: sticky;
        top: 6rem;
    }
}
