/* ---------------------------------------
   Texts
--------------------------------------- */

.page-texts,
.page-text-item {
    padding-top: 0;
}

.section-texts .site-footer {
    display: none;
}


.texts-page {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #ffffff;
}


.texts-stage {
    position: fixed;
    inset:0;
    height: 100vh;
    pointer-events: none;
}


/* ---------------------------------------
   List
--------------------------------------- */

.texts-list {
    grid-column: 1 / span 5;

    position: relative;

    margin-top: var(--header-height);

    height:
        calc(
            100vh -
            var(--header-height)
        );

    overflow-y: auto;
    overscroll-behavior: contain;

    pointer-events: auto;

    scrollbar-width: none;

    transition:
        margin-top 0.28s ease,
        height 0.28s ease;
}


.texts-list::-webkit-scrollbar {
    display: none;
}


body.header-hidden
.texts-list {
    margin-top: 0;
    height: 100vh;
}


/* ---------------------------------------
   List card
--------------------------------------- */

.texts-card {
    position: relative;
    display: block;
    width: 100%;
    min-height: clamp(150px, 10vw, 180px);
    padding: 16px;
    background: var(--text-card-color);
}


.texts-card.is-viewing {
    background: #fff;
}


.texts-card__status {
    position: absolute;

    top: 16px;
    right: 16px;

    display: flex;
    flex-direction: column;

    align-items: flex-end;

    gap: 6px;
}

button.texts-footnotes__back {
    font-size: 12px;
    margin-top: 48px;
}


.texts-card__updated,
.texts-card__viewing {
    font-family:
        var(--font-schema),
        sans-serif;

    font-size: 12px;
    line-height: 1;
}


.texts-card__updated {
    color: rgba(60, 60, 67, 0.60);
}


.texts-card__viewing {
    color: #FF383C;
}


.texts-card__title {
    padding-right: 80px;

    font-family:
        var(--font-schema),
        sans-serif;
line-height: 1;
    font-size: 30px;
    word-break: keep-all;
}

.texts-card__title [data-lang="ko"] {
    line-height: 1.25;
}

.texts-card__overview {
    margin-top: 10px;

    padding-right: 70px;

    font-family:
        var(--font-hal),
        var(--font-ko),
        serif;

    font-size: 16px;
    line-height: 1.16;
}


/* ---------------------------------------
   Detail
--------------------------------------- */

.texts-detail {
    grid-column: 8 / span 6;
    position: relative;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    pointer-events: auto;
    scrollbar-width: none;
}


.texts-detail::-webkit-scrollbar {
    display: none;
}

[data-lang="ko"] {
    font-weight: 500;
}

.texts-article {
    width: 100%;
    padding: calc(var(--header-height) + 16px) 16px 48px;
}


.texts-article[hidden] {
    display: none;
}


.texts-article__title {
    margin: 0;

    font-family:
        var(--font-schema),
        sans-serif;

    font-size: 30px;
    line-height: 1.16;

    font-weight: normal;
}


.texts-article__meta {
    margin-top: 10px;

    font-family:
        var(--font-hal),
        var(--font-ko),
        serif;

    font-size: 16px;
    line-height: 1.16;
}


.texts-article__body {
    margin-top: 64px;

    font-family:
        var(--font-hal),
        var(--font-ko),
        serif;

    font-size: 16px;
    line-height: 1.3;
    word-break: keep-all;
}


.texts-article__body p {
    margin: 0 0 2em;
}

.texts-article__body[data-lang="ko"] {
    line-height: 1.5;
}

.texts-article__body p:last-child {
    margin-bottom: 0;
}

.text-footnote-ref {
    color: #AEAEB2;
    cursor: pointer;
    display: inline;
    padding: 0 3px 0 3px;
    background: #f2f2f2;
    color: #8a8a8a;
    cursor: pointer;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.text-footnote-ref sup {
    position: relative;
    top: -0.7em;
    margin-left: 2px;
    font-size: 0.65em;
    line-height: 1;
    vertical-align: baseline;
}

.texts-article__overview {
    margin-bottom: 2px;
}

.texts-footnotes {
    margin-top: 48px;
}

.texts-footnote {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 8px;
    align-items: start;
    font-size: 12px;
    color: #AEAEB2;
    word-break: keep-all;
}

.texts-footnote + .texts-footnote {
    margin-top: 16px;
}

.texts-footnote__number {
    width: 36px;
    min-width: 36px;

    white-space: nowrap;
}

.texts-footnote__content {
    min-width: 0;
}

/* KirbyText가 만드는 p 기본 여백 제거 */
.texts-footnote__content p {
    margin: 0;
}
