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

:root {
    --bg-color: #e8e6e1;
    --text-color: #1a1a1a;
    --light-text: #666;
    --accent: #c97070;
    --line-height: 1.8;
    --font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: var(--line-height);
    font-size: var(--font-size);
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    text-align: left;
}

.logo {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--light-text);
    font-weight: 400;
}

.letter-container {
    flex: 1;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.letter-section {
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.letter-section:nth-child(1) { animation-delay: 0.1s; }
.letter-section:nth-child(2) { animation-delay: 0.2s; }
.letter-section:nth-child(3) { animation-delay: 0.3s; }
.letter-section:nth-child(4) { animation-delay: 0.4s; }
.letter-section:nth-child(5) { animation-delay: 0.5s; }
.letter-section:nth-child(6) { animation-delay: 0.6s; }
.letter-section:nth-child(7) { animation-delay: 0.7s; }
.letter-section:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.greeting {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.letter-section p {
    margin-bottom: 1.25rem;
    text-align: left;
}

.letter-section p:last-child {
    margin-bottom: 0;
}

em {
    font-style: italic;
    color: var(--text-color);
}

.highlight-section {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem 0;
    margin: 2rem -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section-header {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.thank-you {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.divider {
    text-align: center;
    margin: 2rem 0;
    color: var(--light-text);
    font-weight: 300;
    letter-spacing: 0.2em;
}

.closing-section {
    margin-top: 2rem;
}

.footnote {
    font-size: 0.875rem;
    color: var(--light-text);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.attribution {
    font-size: 0.875rem;
    color: var(--light-text);
    font-weight: 500;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    :root {
        --font-size: 15px;
    }

    .header {
        padding: 1.5rem 1.25rem;
    }

    .letter-container {
        padding: 1.5rem 1.25rem;
    }

    .letter-section {
        margin-bottom: 1.75rem;
    }

    .greeting {
        font-size: 1.125rem;
    }

    .thank-you {
        font-size: 1.5rem;
    }

    .highlight-section {
        margin: 1.75rem -1.25rem;
        padding: 1.25rem 1.25rem;
    }
}

/* Tablet and up */
@media (min-width: 768px) {
    .letter-container {
        max-width: 700px;
        margin: 0 auto;
    }

    .header {
        max-width: 700px;
        margin: 0 auto;
    }
}