@font-face {
    font-family: 'Barlow Condensed';
    src: url('../fonts/BarlowCondensed-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: Inter;
    src: url('../fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Mochiy Pop P One';
    src: url('../fonts/MochiyPopPOne-Regular.woff2') format('woff2');
    font-display: swap;
}

/* The characters retain the Figma layers and cropping. The article and its
   paragraphs flow naturally so added text remains readable at every width. */
.story {
    min-height: 918px;
    padding: 96px 0 39px;
    overflow: hidden;
}
.story-background {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--yellow);
}
.story-background > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: luminosity;
    opacity: .5;
}
.story-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #fff22900, var(--yellow));
}
.story-strip {
    top: 0;
    left: calc(50% - 147.5px);
    width: 649px;
    height: 1038px;
    transform: translateX(-50%);
    z-index: -1;
}
.story-strip > img {
    width: 100%;
    height: 100%;
}
.story-title {
    position: absolute;
    left: calc(50% - 472px);
    top: 96px;
    font: 700 120px/1.2 var(--condensed);
    color: var(--blue);
    text-transform: uppercase;
    white-space: nowrap;
}
.story-mirai {
    left: calc(50% - 494px);
    top: 122px;
    width: 646px;
    height: 1220px;
    overflow: hidden;
    z-index: 1;
}
.story-mirai > img {
    position: absolute;
    left: -24.5%;
    top: 0;
    width: 133.53%;
    height: 100%;
    max-width: none;
}
.story-piko {
    left: calc(50% - 472px);
    top: 297px;
    width: 252px;
    height: 318px;
    z-index: 2;
}
.story-piko > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-name {
    position: absolute;
    width: 90px;
    height: 220px;
    padding: 32px 0;
    overflow: hidden;
    background: #b3ffe6;
    color: var(--blue);
    box-shadow: 0 2px 16px #0004;
    font: 64px/1.2 'Mochiy Pop P One', sans-serif;
    text-align: center;
}
.story-name-mirai {
    left: calc(50% - 70px);
    top: 369px;
}
.story-name-piko {
    left: calc(50% - 472px);
    top: 585px;
}
.story-panel {
    position: relative;
    z-index: 3;
    width: 439px;
    min-height: 783px;
    margin-left: calc(50% + 58px);
    padding: 27px 0 49px;
    backdrop-filter: blur(50px);
    background: linear-gradient(180.96deg, #ffffff00 .465%, #ffffff99 46.456%), #ffffff33;
}
.story-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 15px 2px;
    color: var(--blue);
}
.story-pagination button {
    width: 16px;
    height: 32px;
    font-size: 16px;
    line-height: 32px;
}
.story-pagination button:disabled {
    opacity: .5;
    cursor: default;
}
.story-article-header {
    display: grid;
    grid-template-columns: 97px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    width: calc(100% - 15px);
    min-height: 149px;
    padding: 16px;
    background: var(--blue);
    color: white;
}
.episode-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-right: 1px;
    border-right: 1px solid var(--yellow);
    text-align: left;
}
.episode-title strong {
    font: 700 32px/31px 'Barlow Condensed', sans-serif;
    color: #fff;
}
.series-label {
    font: 500 12px/18px Inter, sans-serif;
    letter-spacing: 2px;
    color: var(--yellow);
}
.episode-badge {
    padding: 3px 9px;
    border-radius: 2px;
    background: var(--yellow);
    color: var(--blue);
    font: 700 16px/19px 'Barlow Condensed', sans-serif;
}
.story-article-header h3 {
    font: 28px/1.2 var(--heading);
    white-space: pre-line;
}
.story-article-body {
    margin-top: 24px;
    padding: 0 16px;
    color: #000;
    font: 16px/24px var(--body);
}
#story-paragraphs p + p {
    margin-top: 15px;
}
.story-article-illustration {
    width: calc(100% + 1px);
    height: 176px;
    object-fit: cover;
    margin-top: 21px;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1100px) {
    .story {
        min-height: 0;
        padding: 64px 32px 48px;
    }
    .story-title {
        left: 32px;
        top: 64px;
        font-size: clamp(72px, 8.8vw, 96px);
    }
    .story-strip {
        left: 31%;
        width: 500px;
        height: 1140px;
    }
    .story-mirai {
        left: -20px;
        top: 120px;
        width: 520px;
        height: 982px;
    }
    .story-piko {
        left: 24px;
        top: 285px;
        width: 190px;
        height: 240px;
    }
    .story-name {
        width: 68px;
        height: 168px;
        padding-top: 24px;
        font-size: 48px;
    }
    .story-name-mirai {
        left: calc(48% - 75px);
        top: 390px;
    }
    .story-name-piko {
        left: 32px;
        top: 540px;
    }
    .story-panel {
        width: 52%;
        min-height: 0;
        margin-left: 48%;
        padding-top: 20px;
    }
    .story-pagination button {
        width: 32px;
        height: 32px;
    }
    .story-pagination {
        gap: 0;
    }
    .story-pagination .icon {
        display: inline-block;
    }
    .story-pagination button:first-child .icon {
        transform: translateX(4px);
    }
    .story-pagination button:last-child .icon {
        transform: translateX(-4px);
    }
    .story-article-header {
        gap: 18px;
    }
    .story-article-illustration {
        width: 100%;
        height: auto;
        aspect-ratio: 408 / 176;
    }
    .hololive {
        padding-top: 70px;
    }
    .holo-pair figure:nth-child(2) {
        padding-top: 44px;
    }
}
@media (max-width: 600px) {
    .story {
        --story-mobile-title-size: clamp(58px, 17vw, 100px);
        --story-mobile-card-gap: 430px;
        padding: 48px 20px 40px;
    }
    .story-title {
        position: relative;
        left: auto;
        top: auto;
        font-size: var(--story-mobile-title-size);
        text-align: center;
    }
    .story-strip {
        /* The artwork and story card share the same mobile side edges. */
        width: calc(100% - 40px);
        /* End the white artwork where the character meets the story card. */
        height: calc(48px + var(--story-mobile-title-size) * 1.2 + var(--story-mobile-card-gap));
        overflow: hidden;
        left: 20px;
        transform: none;
    }
    .story-strip > img {
        position: absolute;
        left: calc(50% - 204px);
        width: 360px;
        height: 1440px;
        max-height: none;
    }
    .story-mirai {
        left: calc(50% - 150px);
        top: 130px;
        width: 340px;
        height: 642px;
    }
    .story-piko {
        top: 250px;
        left: calc(50% - 140px);
        width: 130px;
        height: 164px;
    }
    .story-name {
        width: 45px;
        height: 116px;
        padding-top: 18px;
        font-size: 32px;
    }
    .story-name-mirai {
        top: 270px;
        left: calc(50% + 100px);
    }
    .story-name-piko {
        top: 420px;
        left: calc(50% - 160px);
    }
    .story-panel {
        width: 100%;
        margin-top: var(--story-mobile-card-gap);
        margin-left: 0;
        padding-bottom: 28px;
    }
    .story-pagination button {
        width: 44px;
        height: 44px;
        font-size: 20px;
        line-height: 44px;
    }
    .story-pagination button:first-child .icon {
        transform: translateX(8px);
    }
    .story-pagination button:last-child .icon {
        transform: translateX(-8px);
    }
    .story-article-header {
        gap: 16px;
    }
    .story-article-header h3 {
        font-size: 26px;
    }
    .hololive {
        padding-top: 48px;
    }
    .holo-pair figure:nth-child(2) {
        padding-top: 30px;
    }
}
