* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0d0d0d;
    --surface: #1a1a1f;
    --surface-border: #2a2a30;
    --text: #e8e8e8;
    --text-secondary: #888;
    --text-accent: #c9a87c;
    --content-width: 640px;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--bg);
    color: var(--text);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.01em;
}

/* Progress bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--text-accent), var(--text));
    z-index: 100;
    transition: width 0.3s ease;
}

/* Intro screen */
.screen {
    min-height: 100vh;
    min-height: 100dvh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.screen--intro {
    padding: 0 24px;
}

.intro-content {
    max-width: var(--content-width);
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typewriter {
    font-size: 1.5rem;
    line-height: 2.2;
    color: var(--text);
    font-weight: 400;
}

.typewriter .line {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.typewriter .line.visible {
    opacity: 1;
    transform: translateY(0);
}

.typewriter .pause {
    display: block;
    height: 1.8rem;
}

.scroll-hint {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 1.2s ease;
}

.scroll-hint.visible {
    opacity: 0.4;
}

.scroll-arrow {
    font-size: 1.4rem;
    color: var(--text-secondary);
    display: block;
    animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* Chapters */
.chapters {
    width: 100%;
    padding: 0 16px;
}

.chapter {
    min-height: 100vh;
    min-height: 100dvh;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.chapter.visible {
    opacity: 1;
    transform: translateY(0);
}

.chapter-inner {
    max-width: var(--content-width);
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 44px 36px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.chapter-inner p {
    font-size: 1.1rem;
    line-height: 2;
    margin-bottom: 1.4em;
    color: var(--text);
}

.chapter-inner p:last-child {
    margin-bottom: 0;
}

.chapter-inner hr {
    display: none;
}

.chapter-inner strong {
    font-weight: 700;
    color: var(--text-accent);
}

.chapter-inner em {
    font-style: italic;
    color: var(--text-secondary);
}

/* Emphasis block — for emotionally important paragraphs */
.chapter-inner p.lead {
    font-size: 1.2rem;
    color: var(--text-accent);
    text-align: center;
    line-height: 1.9;
}

.chapter-inner p.thought {
    border-left: 2px solid var(--text-accent);
    padding-left: 20px;
    margin-left: 8px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Outro */
.screen--outro {
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
}

.outro-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 2.5s ease;
    font-style: italic;
}

.outro-text.visible {
    opacity: 1;
}

/* Mobile */
@media (max-width: 600px) {
    .typewriter {
        font-size: 1.2rem;
    }

    .chapter-inner {
        padding: 32px 22px;
        border-radius: 12px;
    }

    .chapter-inner p {
        font-size: 1rem;
        line-height: 1.9;
    }

    .chapter-inner p.lead {
        font-size: 1.1rem;
    }

    .chapter {
        padding: 24px 0;
    }

    .scroll-hint {
        bottom: 35px;
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .chapter-inner {
        padding: 40px 32px;
    }
}