:root {
    --void: #0b0a0c;
    --paper: #eae6df;
    --muted: #7d766c;
    --blood: #9c1c26;
    --line: rgba(234, 230, 223, 0.12);

    --gothic: 'UnifrakturMaguntia', serif;
    --serif: 'EB Garamond', serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    background: var(--void);
    color: var(--paper);
    font-family: var(--serif);
    zoom: 1.2;
}

a {
    color: inherit;
}

a:focus-visible {
    outline: 1px solid var(--blood);
    outline-offset: 3px;
}

.page {
    display: flex;
    align-items: flex-start;
    height: 100vh;
}

.stream {
    flex: 0 0 auto;
    width: 460px;
    max-width: 40vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 20px 24px 24px;
    border-right: 1px solid var(--line);
}

.stream__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.stream__video {
    width: 100%;
    max-width: 460px;
    aspect-ratio: 550 / 350;
    height: auto;
    border: 1px solid var(--line);
    background: var(--void);
}

.stream__chat-wrap {
    position: relative;
    width: 100%;
    max-width: 460px;
    height: 420px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--void);
}

.stream__chat {
    position: absolute;
    top: 0;
    left: 0;
    width: 116%;
    height: 116%;
    border: none;
    background: var(--void);
    transform: scale(0.862069);
    transform-origin: top left;
}

.content {
    flex: 1 1 auto;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
}

.content__inner {
    zoom: 1.166667;
}

.cover {
    max-width: 640px;
    margin: 0 auto;
    padding: 88px 24px 64px;
    text-align: center;
}

.cover__mark {
    display: block;
    width: 6px;
    height: 6px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--blood);
}

.cover__title {
    font-family: var(--gothic);
    font-weight: 400;
    font-size: 46px;
    margin: 0;
}

.cover__subtitle {
    margin: 10px 0 0;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.cover__tagline {
    margin: 26px 0 0;
    font-style: italic;
    font-size: 16px;
    color: var(--blood);
}

.cover__nav {
    margin-top: 34px;
    font-size: 13px;
    letter-spacing: 0.06em;
}

.cover__nav a {
    text-decoration: none;
    color: var(--muted);
}

.cover__nav a:hover,
.cover__nav a:focus-visible {
    color: var(--paper);
}

.cover__nav span {
    margin: 0 10px;
    color: var(--line);
}

.notebook {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.chapter + .chapter {
    margin-top: 56px;
}

.chapter h2 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.leaves {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.leaf__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.leaf h3 {
    margin: 0;
    font-weight: 600;
    font-size: 19px;
}

.leaf h3 a {
    text-decoration: none;
}

.leaf h3 a:hover,
.leaf h3 a:focus-visible {
    color: var(--blood);
}

.tag {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.tag--live {
    color: var(--blood);
}

.leaf p {
    margin: 6px 0 0;
    font-style: italic;
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.5;
}

.blank-leaf {
    margin: 0;
    font-style: italic;
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.7;
}

.back-cover {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 24px 56px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
    body {
        height: auto;
        overflow: visible;
    }

    .page {
        flex-direction: column;
        height: auto;
    }

    .stream {
        width: 100%;
        max-width: none;
        height: auto;
        overflow: visible;
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding: 24px 24px 28px;
    }

    .content {
        height: auto;
        overflow-y: visible;
    }
}

@media (max-width: 520px) {
    .cover__title {
        font-size: 38px;
    }
}
