.thread-main {
    position: relative;
    padding-top: calc(var(--nav-h) + var(--space-12));
    padding-bottom: var(--space-24);
    background: var(--surface); 
    min-height: 100vh;
    min-height: 100svh;
}

.thread-hero {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--space-8) var(--space-10);
}

.thread-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--sans);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink-muted);
    margin-bottom: var(--space-8);
    transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .thread-back-btn:hover { color: var(--ink); transform: translateX(-4px); }
}
.thread-back-btn svg.lucide { width: 14px; height: 14px; }

.thread-hero-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.25rem, 4.6vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 var(--space-3);
}

.thread-hero-desc {
    max-width: 56ch;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ink-soft);
    margin-bottom: var(--space-6);
}

.thread-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--surface-3);
}

.filter-btn {
    padding: 0 14px;
    min-height: var(--chip-h, 34px);
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--ink-muted);
    font-family: var(--sans);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .filter-btn:hover {
        background: var(--surface-2);
        border-color: var(--surface-3);
    }
}

.filter-btn.is-active {
    background: var(--ink);
    color: var(--white);
}

.thread-feed {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--space-8);
    
    column-count: 2;
    column-gap: var(--space-8); 
}

.thread-post {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    display: inline-block;
    width: 100%;
    
    margin-bottom: var(--space-12);
}

.thread-post.is-filtered-out {
    display: none;
}

.thread-post-meta {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    text-transform: uppercase;
    margin-bottom: var(--space-3);
}

.thread-post-meta .thread-post-location {
    color: var(--ink-muted);
    font-weight: 400;
}

.thread-post-meta .thread-post-location::before {
    content: '·';
    margin-right: var(--space-3);
}

.thread-post-media {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: var(--space-4);
    background: var(--surface-3); 
}

.thread-post-media img,
.thread-post-media video {
    width: 100%;
    max-width: 100%;
    max-height: 440px;
    height: auto;
    display: block;
    object-fit: cover;
    cursor: zoom-in;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

.js .thread-post-media img { opacity: 0; }

.thread-post-media img.img-loaded,
.thread-post-media video {
    opacity: 1;
}

.thread-post-media:not(:has(img.img-loaded, video)) { aspect-ratio: 4 / 5; }

.thread-post-media + .thread-post-media {
    margin-top: var(--space-2);
}

.thread-post-caption {
    width: 100%; 
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

.thread-post-caption + .thread-post-caption {
    margin-top: var(--space-4);
}

.thread-post-caption strong {
    color: var(--ink);
    font-weight: 600;
}

.thread-post.is-text-only .thread-post-caption {
    font-family: var(--serif);
    font-size: 1.0625rem;
    line-height: 1.5;
    color: var(--ink);
    text-wrap: pretty;
}
.thread-post.is-text-only .thread-post-caption strong { font-weight: 500; }

.thread-post-quote {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

@media (max-width: 768px) {
    .thread-feed {
        column-count: 1;
        column-gap: 0;
        max-width: 540px;
    }
    
    .thread-main { padding-top: calc(var(--nav-h) + var(--space-6)); }
    .thread-hero { padding-bottom: var(--space-8); }
    
    .thread-hero-title { font-size: clamp(1.6rem, 7vw, 1.95rem); line-height: 1.25; margin-left: -0.02em; }
    .thread-hero-desc { font-size: 1.0625rem; line-height: 1.5; color: var(--ink-soft); }
    
    .thread-post { 
        margin-bottom: var(--space-12);
    }
    
    .thread-post-media {
        width: 100%;
    }

    .thread-post-media img,
    .thread-post-media video {
        object-fit: cover;
    }
    
    .thread-post-caption {
        width: 100%; 
        font-size: 0.9375rem; 
    }
    
    .thread-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--space-2);
        scrollbar-width: none; 
    }
    .thread-filters::-webkit-scrollbar { display: none; }
}

.thread-feed.is-js-masonry {
    column-count: auto;
    column-gap: 0;
    display: grid;
    grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
    column-gap: var(--space-8);
    align-items: start;
}
.thread-feed.is-js-masonry.is-single-col { grid-template-columns: minmax(0, 1fr); }
.thread-col { min-width: 0; }

.thread-empty {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--space-8);
    color: var(--ink-muted);
}

@media (max-width: 768px) {
    .thread-post-media img,
    .thread-post-media video { max-height: none; }
    .thread-hero, .thread-feed, .thread-empty { padding-left: var(--space-5); padding-right: var(--space-5); }

    .thread-filters {
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
                mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
        padding-right: var(--space-6);
        scroll-snap-type: x proximity;
    }
    .thread-filters .filter-btn { scroll-snap-align: start; flex-shrink: 0; }
}