.story-detail-page {
    background: rgb(249, 248, 245);
    color: rgb(29, 29, 28);
}

.story-detail {
    padding: calc(var(--site-header-solid-height, 60px) + clamp(3rem, 6vw, 5.5rem)) 0
        clamp(5rem, 9vw, 8rem);
}

.story-detail__container {
    max-width: 1320px;
}

.story-detail__eyebrow-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(3rem, 6vw, 5rem);
    padding-bottom: 1rem;
    border-bottom: 1px solid rgb(210, 208, 201);
}

.story-detail__eyebrow-row a {
    color: rgb(92, 90, 85);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.story-detail__eyebrow-row a:hover {
    color: rgb(29, 29, 28);
}

.story-detail__eyebrow-row a:focus-visible,
.story-detail-navigation a:focus-visible {
    outline: 2px solid rgb(29, 29, 28);
    outline-offset: 0.3rem;
}

.story-detail-layout {
    margin-top: clamp(2.5rem, 5vw, 4rem);
    margin-right: 0;
    margin-left: 0;
}

.story-detail__article {
    min-width: 0;
}

.story-detail__cover {
    width: 100%;
    margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.story-detail__cover img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(76vh, 52rem);
    object-fit: contain;
    background: rgb(225, 224, 220);
}

.story-detail__preview-image {
    display: grid;
    width: 100%;
    aspect-ratio: 3 / 2;
    place-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 52%),
        rgb(211, 209, 203);
    color: rgb(103, 101, 96);
    font-family: var(--font-latin), sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.story-detail__header {
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.story-detail__period {
    margin: 0 0 0.9rem;
    color: rgb(112, 110, 105);
    font-family: var(--font-latin), var(--font-cjk-primary),
        var(--font-cjk-secondary), sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    line-height: 1.6;
}

.story-detail__title {
    margin: 0;
    color: rgb(25, 25, 24);
    font-family: var(--font-cjk-primary), var(--font-cjk-secondary), sans-serif;
    font-size: clamp(1.75rem, 3.25vw, 3rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.35;
    text-wrap: balance;
}

.story-detail__metadata {
    margin-top: clamp(1rem, 2vw, 1.4rem);
    color: rgb(105, 103, 98);
    font-family: var(--font-cjk-primary), var(--font-cjk-secondary), sans-serif;
    font-size: clamp(0.75rem, 1vw, 0.8125rem);
    letter-spacing: 0.04em;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.story-detail__intro {
    margin: clamp(1.25rem, 2.5vw, 2rem) 0 0;
    color: rgb(83, 81, 77);
    font-family: var(--font-cjk-primary), var(--font-cjk-secondary), sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.95;
}

.story-detail__body {
    color: rgb(58, 57, 54);
    font-family: var(--font-cjk-primary), var(--font-cjk-secondary), sans-serif;
    font-size: clamp(1rem, 1.3vw, 1.0625rem);
    line-height: 2.05;
}

.story-detail__body p {
    margin: 0 0 1.65em;
}

.story-detail__body ul,
.story-detail__body ol {
    margin: 0 0 1.65em;
    padding-left: 1.4em;
}

.story-detail__body li + li {
    margin-top: 0.55em;
}

.story-detail__body blockquote {
    margin: clamp(2.5rem, 5vw, 4rem) 0;
    padding: 0.35rem 0 0.35rem clamp(1.25rem, 3vw, 2rem);
    border-left: 2px solid rgb(154, 151, 143);
    color: rgb(50, 49, 46);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 1.85;
}

.story-detail__body blockquote p {
    margin: 0;
}

.story-album {
    margin-top: clamp(3rem, 7vw, 6rem);
}

.story-album__grid {
    --story-album-grid-gap: 1.875rem;
    display: grid;
    grid-template-columns: repeat(
        var(--story-album-columns, 1),
        minmax(0, 1fr)
    );
    align-items: start;
    gap: clamp(2.25rem, 7vw, 3.5rem) var(--story-album-grid-gap);
}

.story-album__item {
    position: relative;
    min-width: 0;
    margin: 0;
}

.story-album__media {
    position: relative;
    overflow: hidden;
    background-color: rgb(225, 224, 220);
}

.story-album__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    object-position:
        var(--story-album-focal-x, 50%)
        var(--story-album-focal-y, 50%);
    transform: scale(var(--story-album-zoom, 1));
    transform-origin:
        var(--story-album-focal-x, 50%)
        var(--story-album-focal-y, 50%);
}

.story-album__item--wide .story-album__image {
    aspect-ratio: 2 / 1;
}

.story-album__item--portrait .story-album__image {
    aspect-ratio: 2 / 3;
}

.story-album__item--wide-square .story-album__image {
    aspect-ratio: 1;
}

.story-album__caption {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: rgb(45, 44, 42);
    font-size: 0.75rem;
    line-height: 1.65;
}

.story-album__lightbox-trigger {
    position: absolute;
    z-index: 3;
    inset: 0;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.story-album__lightbox-trigger:focus-visible {
    outline: 2px solid rgb(255, 255, 255);
    outline-offset: -0.5rem;
}

@media (min-width: 501px) {
    .story-album__grid {
        grid-auto-rows: var(--story-album-row-size, auto);
        align-items: stretch;
        gap: var(--story-album-grid-gap);
    }

    .story-album__item,
    .story-album__media {
        height: 100%;
    }

    .story-album__image {
        position: absolute;
        inset: 0;
        height: 100%;
        aspect-ratio: auto;
    }
}

.story-detail__figure {
    width: 100%;
    margin: clamp(3rem, 7vw, 6rem) 0 0;
}

.story-detail__figure--normal {
    width: min(100%, 50rem);
}

.story-detail__figure img {
    display: block;
    width: 100%;
    height: auto;
}

.story-detail__figure figcaption {
    margin-top: 0.75rem;
    color: rgb(105, 103, 98);
    font-family: var(--font-cjk-primary), var(--font-cjk-secondary), sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    line-height: 1.7;
}

.story-detail__tags {
    margin-top: clamp(3rem, 6vw, 5rem);
    padding-top: 1.25rem;
    border-top: 1px solid rgb(218, 216, 210);
}

.story-detail__tags h2 {
    margin: 0 0 0.75rem;
    font-family: var(--font-latin), sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.story-detail__tags p {
    margin: 0;
    color: rgb(112, 110, 105);
    font-family: var(--font-cjk-primary), var(--font-cjk-secondary), sans-serif;
    font-size: 0.8125rem;
    line-height: 1.7;
}

.story-detail-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    margin-top: clamp(5rem, 10vw, 8rem);
    padding-top: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid rgb(210, 208, 201);
}

.story-detail-navigation a {
    color: rgb(35, 35, 33);
    text-decoration: none;
}

.story-detail-navigation__side {
    min-width: 0;
}

.story-detail-navigation__side a {
    display: inline-flex;
    max-width: 100%;
    flex-direction: column;
}

.story-detail-navigation__side span {
    margin-bottom: 0.55rem;
    color: rgb(121, 119, 113);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.17em;
    line-height: 1.45;
    text-transform: uppercase;
}

.story-detail-navigation__side strong {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.story-detail-navigation__side--next {
    text-align: right;
}

.story-detail-navigation__side--next a {
    align-items: flex-end;
}

.story-detail-navigation__back {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid currentColor;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

html:lang(ko) .story-detail__title,
html:lang(ko) .story-detail__metadata,
html:lang(ko) .story-detail__intro,
html:lang(ko) .story-detail__body,
html:lang(ko) .story-detail__figure figcaption {
    word-break: keep-all;
    overflow-wrap: break-word;
}

html:lang(ja) .story-detail__title,
html:lang(ja) .story-detail__metadata,
html:lang(ja) .story-detail__intro,
html:lang(ja) .story-detail__body,
html:lang(ja) .story-detail__figure figcaption {
    line-break: strict;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .story-detail-navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .story-detail-navigation__back {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
    }
}
