@font-face {
    font-family: 'Antique Legacy';
    src: url('Antique-Legacy-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Antique Legacy';
    src: url('Antique-Legacy-Light-Italic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: 'Antique Legacy';
    src: url('Antique-Legacy-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Antique Legacy';
    src: url('Antique-Legacy-Book-Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Antique Legacy', sans-serif;
    font-weight: 300;
    font-size: 12.5px;
    line-height: 1.3;
    color: #191A18;
    background-color: #fff;
}

.container {
    display: flex;
    gap: 24px;
    padding: 16px 24px;
    height: 100vh;
    align-items: flex-start;
    justify-content: flex-end;
    overflow: hidden;
}

.left-column {
    flex: 1 0 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

/* Custom scrollbar - circular thumb, no track */
.left-column::-webkit-scrollbar {
    width: 8px;
}

.left-column::-webkit-scrollbar-track {
    background: transparent;
}

.left-column::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.left-column.show-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.4);
}

.left-column.show-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

.main-text {
    min-width: 0;
    margin-top: auto;
    min-height: min-content;
}

.main-text p {
    line-height: 1.3;
    margin-bottom: 0;
    white-space: pre-wrap;
}

.main-text p:last-child {
    margin-bottom: 0;
}

.main-text a {
    text-decoration: none;
    color: #191A18;
    cursor: pointer;
}

.main-text a:hover {
    opacity: 0.6;
}

.right-column {
    flex: 1 0 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    min-width: 0;
    height: 100%;
}

.author-info-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-info {
    font-family: 'Antique Legacy', sans-serif;
    font-weight: 300;
    line-height: 1.3;
    font-size: 12.5px;
    text-align: right;
    white-space: nowrap;
}

.author-info p {
    line-height: 1.3;
    margin: 0;
}

.author-info a {
    text-decoration: none;
    color: #191A18;
    cursor: pointer;
}

.author-info a:hover {
    opacity: 0.6;
}

.newsletter-list-container {
    display: flex;
    gap: 10px;
    flex: 1 0 0;
    align-items: flex-end;
    justify-content: flex-end;
    width: 100%;
    min-height: 0;
}

.newsletter-list {
    display: flex;
    flex-direction: column;
    gap: 3.75px; /* 30% of 12.5px */
    align-items: flex-end;
    justify-content: flex-end;
}

.newsletter-item {
    display: flex;
    gap: 10px; /* Same as Figma */
    align-items: center;
    justify-content: center;
}

.newsletter-title {
    font-family: 'Antique Legacy', sans-serif;
    font-weight: 300;
    line-height: normal;
    font-size: 12.5px;
    text-align: right;
}

.newsletter-title.clickable {
    cursor: pointer;
}

.newsletter-title.clickable:hover {
    opacity: 0.6;
}

.date {
    font-family: 'Antique Legacy', sans-serif;
    font-weight: 300;
    line-height: normal;
    font-size: 12.5px;
    text-align: right;
    color: #191A18;
}

/* Mobile styles */
@media (max-width: 480px) {
    html, body {
        overflow: hidden;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    .container {
        flex-direction: column;
        gap: 10px;
        padding: 16px 24px;
        height: 100vh;
        height: 100dvh;
        align-items: flex-start;
        justify-content: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .left-column {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
        overflow: visible;
        order: 2;
        padding-top: 0;
    }
    
    .left-column.has-content {
        order: 1;
    }
    
    .main-text {
        padding-top: 0;
        position: relative;
        transition: transform 0.3s ease;
    }
    
    .main-text.swiping-out {
        transition: transform 0.3s ease;
    }
    
    .main-text.swiping-out.swipe-left {
        transform: translateX(-100%);
    }
    
    .main-text.swiping-out.swipe-right {
        transform: translateX(100%);
    }
    
    .main-text.swiping-out.swipe-up {
        transform: translateY(-100%);
    }
    
    .main-text.swiping-out.swipe-down {
        transform: translateY(100%);
    }
    
    .main-text .back-button {
        font-family: 'Antique Legacy', sans-serif;
        font-weight: 300;
        font-size: 12.5px;
        color: #B5B5B1 !important;
        cursor: pointer;
        text-align: left;
        margin-top: 0;
        line-height: 1.3;
        margin-bottom: 0;
        transition: color 0.2s ease;
    }
    
    .main-text .back-button:hover {
        color: #191A18 !important;
    }
    
    .right-column {
        flex: 1 0 0;
        width: 100%;
        height: 100%;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        order: 1;
        gap: 0;
        min-height: 0;
        position: relative;
    }
    
    .author-info-wrapper {
        order: 1;
        align-self: flex-end;
        flex-shrink: 0;
        position: absolute;
        top: 0;
        right: 0;
    }
    
    .author-info {
        text-align: right;
    }
    
    .newsletter-list-container {
        flex: 1 0 0;
        width: 100%;
        align-items: center;
        justify-content: center;
        order: 2;
        display: flex;
        min-height: 0;
        margin-top: 60px; /* Space for author info at top */
    }
    
    /* Hide right column (author info + newsletter list) when content is shown */
    .left-column.has-content ~ .right-column {
        display: none;
    }
    
    .newsletter-list {
        align-items: center;
        justify-content: center;
        gap: 3.75px; /* 30% of 12.5px - ensure it's correct on mobile */
    }
    
    .newsletter-item {
        justify-content: center;
    }
    
    .newsletter-title,
    .date {
        text-align: center;
    }
    
    .main-text {
        margin-top: 0;
    }
}

