[data-stories] {
    display: block;
}

:root {
    --stories-pt-to-px: 1.3333;
    --stories-cat-size: 34px;
    --stories-title-size: 22px;
    --stories-excerpt-size: 18px;
    --stories-date-size: 16px;
    --stories-content-size: 20px;
    --stories-thumb-h: 210px;
    --stories-grid-gap: 24px;
    --stories-list-gap: 14px;
    --stories-latest-gap: 60px;
    --stories-cat-scaleY: 1.0;
}

html:has(.stories-latest),
body:has(.stories-latest) {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html:has(.stories-latest)::-webkit-scrollbar,
body:has(.stories-latest)::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/WebKit */
}


.stories-grid {
    display: grid;
    gap: var(--stories-grid-gap);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 768px) {
    .stories-grid {
        grid-template-columns: 1fr;
    }

    .stories-grid {
        gap: 60px;
    }
}

.stories-col {
    min-width: 0;
}

.stories-cat {
    margin: 0 0 8px 0;
    font-size: var(--stories-cat-size);
    line-height: 1.0;
    font-weight: 800;
    text-align: center;
    transform: scaleY(var(--stories-cat-scaleY));
    transform-origin: 50% 0%;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.stories-list {
    display: grid;
    gap: var(--stories-list-gap);
}

.stories-card {
    /* border: 1px solid rgba(0, 0, 0, .2); */
    padding: 8px;
    background: transparent;
}

.stories-thumb-btn {
    display: block;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.stories-thumb {
    width: 100%;
    height: var(--stories-thumb-h);
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #8f92a1;
}

.stories-thumb>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.stories-meta {
    margin-top: 8px;
}

.stories-title {
    margin: 12px 0 4px 0;
    font-size: var(--stories-title-size);
    line-height: 1.2;
    font-weight: 800;
}

.stories-excerpt {
    font-size: var(--stories-excerpt-size);
    line-height: 1.35;
    word-break: break-word;
    padding-top: 5px;
    font-weight: 400;
}

.stories-date {
    display: block;
    font-size: var(--stories-date-size);
    opacity: .8;
    font-weight: 200;
    color: #7e7e7f;
}

.stories-empty {
    margin: 8px 0;
    font-size: 12px;
}

.stories-modal[hidden] {
    display: none !important;
}

.stories-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: block;
    overflow: hidden;
    overscroll-behavior: contain;
}

.stories-modal-dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.stories-modal-box {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--stories-modal-top) - 6vh);
}

.stories-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 24px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.stories-modal-hero {
    border: 1px solid #8f92a1;
}

.stories-modal-hero img {
    width: 100%;
    max-height: 60vh;
    object-fit: cover;
    object-position: center;
    display: block;
}

.stories-modal-title {
    margin: 10px 6px 6px;
    font-size: 38px;
    line-height: 1.25;
    font-weight: 700;
}

.stories-modal-content {
    padding: 0 6px 0px;
    font-size: var(--stories-content-size);
}

.stories-modal-content :where(p, ul, ol, table, blockquote, pre, figure) {
    margin-top: 12px;
    margin-bottom: 0px;
}

.stories-latest-list {
    display: grid;
    gap: var(--stories-latest-gap);
}

.stories-latest-list .stories-modal-body {
    padding-bottom: 6px;
    /* border-bottom: 1px solid rgba(0, 0, 0, .08); */
}

.stories-latest-list .stories-modal-body:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.stories-latest .stories-modal-hero img {
    width: 100% !important;
}

@media (max-width:768px) {
    .stories-cat {
        font-size: 24px;
    }

    .stories-modal-title {
        margin: 5px 6px 0;
        font-size: 22px !important;
        line-height: 1.25;
        font-weight: 700;
    }


    .stories-modal-content {
        padding: 0px 0px 0px 6px;
        font-size: var(--stories-content-size);
    }

    .stories-modal-content :where(p, ul, ol, table, blockquote, pre, figure) {
        margin-top: 0px;
        margin-bottom: 0px;
        font-size: 16px !important;
    }

    .stories-title {
        font-size: 22px !important;
        /* line-height: 1.2;
        font-weight: 800; */
        margin-bottom: -1px;
    }

    .stories-excerpt {
        font-size: 16px !important;
        /* line-height: 1.35;
        word-break: break-word;
        padding-top: 5px;
        font-weight: 400; */
    }

    .stories-date {
        font-size: 14px !important;
        margin-top: -2.5px;
    }
}

:root {
    --stories-font: 'Paperlogy', sans-serif;
}

[data-stories],
[data-stories] *,
.stories-modal,
.stories-modal *,
.stories-latest,
.stories-latest * {
    font-family: var(--stories-font) !important;
}

:root {
    --stories-modal-top: 10.0vh;
    --stories-modal-min-h: 20vh;
}

.stories-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: block;
    overflow: hidden;
    overscroll-behavior: contain;
}

.stories-modal-dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 0;
}

.stories-modal-box {
    position: relative;
    z-index: 1;
    width: 67vw;
    margin: 94px auto 6vh;
    min-height: var(--stories-modal-min-h);
    background: #fff;
    /* border: 1px solid #8f92a1; */
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--stories-modal-top) - 6vh);
    overflow: hidden;
}

.stories-modal-scroll {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 0 5px 0;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge 구버전 */
}

.stories-modal-scroll::-webkit-scrollbar {
    display: none;
}

/* WebKit */

.stories-modal-close {
    margin: -10px 0px 0 0;
}

@media (max-width: 768px) {
    .stories-modal-box {
        width: 92vw;
        margin: calc(var(--stories-modal-top) * .8) auto 4vh;
    }

    .stories-modal-box {
        margin: 14vh auto 6vh;
        width: 90vw;
        min-height: 70vh;
        margin-top: 14vh;
    }
}

.stories-modal-close {
    position: absolute;
    z-index: 5;
    width: 60px;
    height: 60px;
    font-size: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    cursor: pointer;
    right: 12px;
    top: 20px;
    --close-size: 72px;
    --close-stroke: 1px;
    --stroke-scale: 0.6;
    color: #111;
}

.stories-modal-close::before,
.stories-modal-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--close-size);
    height: var(--close-stroke);
    background: currentColor;
    border-radius: 999px;
    transform: translate(-50%, -50%) rotate(45deg) scaleY(var(--stroke-scale));
}

.stories-modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg) scaleY(var(--stroke-scale));
}

@media (max-width: 768px) {
    .stories-modal[aria-hidden="false"] .stories-modal-dim {
        background: #fff !important;
    }
}

@media (min-width: 769px) {
    .stories-modal-dim {
        background: transparent !important;
    }
}

html.stories-lock,
body.stories-lock {
    overflow: hidden !important;
    height: 100% !important;
}

body.stories-lock {
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
}