/* X-style feed and repost presentation override. */

@media (min-width: 701px) {
    .feed .post-card,
    .post-card,
    .post-card-main,
    .post-card-repost-entry.post-card-main {
        background: transparent;
        border-bottom: 1px solid var(--social-border);
        transition: background 0.12s ease;
    }

    .feed .post-card:hover,
    .post-card:hover,
    .post-card-main:hover {
        background: rgba(255, 255, 255, 0.02);
    }

    /* Thread replies: no card separators — continuous spine handles structure */
    .reply-card-root,
    .reply-card-nested {
        background: transparent !important;
        border-bottom: none !important;
    }

    body.social-home .post-card,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 0 10px;
        padding: 8px 16px 6px;
    }

    body.social-home .post-meta-row,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-meta-row {
        gap: 6px;
        align-items: center;
        margin: 0;
    }

    body.social-home .post-meta-names,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-meta-names {
        gap: 4px;
        font-size: 15px;
        line-height: 1.2;
    }

    body.social-home .post-author,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-author {
        font-weight: 800;
    }

    body.social-home .post-handle,
    body.social-home .post-time,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-handle,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-time {
        font-size: 15px;
    }

    body.social-home .post-text,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-text {
        margin: -2px 0 0;
        font-size: 15px;
        line-height: 1.4;
    }

    body.social-home .post-text-block,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-text-block,
    body.social-home .post-text-block .post-text,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-text-block .post-text {
        margin: 0;
    }

    body.social-home .post-actions,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-actions {
        margin: 8px 0 0;
        gap: 0;
    }

    body.social-home .post-actions-btn,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-actions-btn {
        padding: 0;
        min-height: 34px;
    }

    body.social-home .post-actions-icon svg,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-actions-icon svg {
        width: 17px;
        height: 17px;
    }

    body.social-home .post-actions-count,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-actions-count {
        font-size: 12px;
    }

    .post-avatar-link .author-avatar,
    .author-avatar {
        width: 36px;
        height: 36px;
        margin-top: 2px;
    }

    .post-card-main {
        padding: 0;
    }

    .post-card-main .post-body,
    .post-card-repost-entry .post-body {
        min-width: 0;
    }

    .post-card-main .post-media,
    .post-card-main .post-media img,
    .post-card-main .post-media video {
        border-radius: 16px;
    }

    .post-card-repost-entry:not(.post-card-expanded) {
        cursor: pointer;
    }

    .post-card-repost-entry.post-card-expanded,
    .post-card-repost-entry.post-card-main {
        cursor: default;
    }

    .post-card-quote-repost .repost-quote-text {
        margin: 0 0 8px;
        font-size: 16px;
        line-height: 22px;
        letter-spacing: -0.01em;
    }

    .post-repost-badge {
        margin: 0 0 6px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.01em;
        color: var(--text-muted);
    }

    .post-repost-embed {
        margin: 4px 0 6px;
    }

    .post-repost-inner {
        border: 1px solid rgba(47, 51, 54, 0.75);
        border-radius: 14px;
        overflow: hidden;
        background: transparent;
    }

    .post-repost-inner:hover {
        border-color: rgba(71, 75, 78, 0.95);
        background: rgba(255, 255, 255, 0.01);
    }

    .post-card-embedded {
        padding: 10px 12px 8px;
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 0 8px;
    }

    .post-card-embedded .post-avatar-link .author-avatar,
    .post-card-embedded .author-avatar {
        width: 28px;
        height: 28px;
    }

    .post-card-embedded .post-meta-names {
        font-size: 13px;
        line-height: 1.2;
    }

    .post-card-embedded .post-text {
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 6px;
    }

    .post-card-embedded .post-media {
        border-radius: 12px;
        max-height: 240px;
    }

    .post-card-embedded .post-media img,
    .post-card-embedded .post-media video {
        max-height: 240px;
        object-fit: cover;
    }

    .post-card-repost-entry .post-actions-repost-own {
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid rgba(47, 51, 54, 0.45);
    }

    /* ── Simple reposts: X-style layout ───────────────────────────────── */

    /* Banner row spans both grid columns */
    .post-card-simple-repost {
        grid-template-rows: auto auto;
    }

    .post-card-simple-repost > .post-repost-banner {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 4px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-muted);
    }

    .post-repost-banner-icon {
        display: grid;
        place-items: center;
        width: 16px;
        height: 16px;
        color: var(--social-repost, #00ba7c);
        flex-shrink: 0;
    }

    .post-repost-banner-icon svg {
        width: 14px;
        height: 14px;
    }

    .post-repost-banner-user {
        color: var(--text-muted);
        text-decoration: none;
        font-weight: 700;
    }

    .post-repost-banner-user:hover {
        text-decoration: underline;
    }

    .post-repost-banner-text {
        flex: 1;
    }

    /* Move the 3-dot menu to the right inside the banner */
    .post-repost-banner > .post-menu {
        margin-left: auto;
    }

    /* Hide the reposter's avatar — they're identified in the banner */
    .post-card-simple-repost > .post-avatar-link {
        display: none;
    }

    /* Full-width under banner: original post sits flush like a normal post (not indented). */
    .post-card-simple-repost > .post-body {
        grid-column: 1 / -1;
        min-width: 0;
    }

    /* Hide the redundant reposter name/handle/time row */
    .post-card-simple-repost > .post-body > .post-meta-row {
        display: none;
    }

    /* Remove the box from simple repost — show original post flat */
    .post-card-simple-repost .post-repost-inner {
        border: none !important;
        background: transparent !important;
        border-radius: 0;
        overflow: visible;
    }

    .post-card-simple-repost .post-repost-embed {
        margin: 0;
    }

    /* Style the embedded original post like a regular feed card */
    .post-card-simple-repost .post-card-embedded {
        padding: 0;
        margin: 0;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 0 10px;
        cursor: pointer;
        width: 100%;
    }

    .post-card-simple-repost .post-card-embedded .author-avatar {
        width: 40px;
        height: 40px;
    }

    .post-card-simple-repost .post-card-embedded .post-meta-names {
        font-size: 14px;
        line-height: 1.2;
        gap: 4px;
    }

    .post-card-simple-repost .post-card-embedded .post-author {
        font-weight: 700;
    }

    .post-card-simple-repost .post-card-embedded .post-text {
        font-size: 14px;
        line-height: 1.35;
        margin-top: 1px;
        margin-bottom: 0;
    }

    /* Keep simple repost actions aligned exactly like regular post actions */
    .post-card-simple-repost .post-actions-repost-own {
        margin: 4px -8px 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
        gap: 0 !important;
        align-items: center;
    }

    .post-card-simple-repost .post-actions-repost-own .post-actions-reply,
    .post-card-simple-repost .post-actions-repost-own .post-actions-repost,
    .post-card-simple-repost .post-actions-repost-own .post-actions-like,
    .post-card-simple-repost .post-actions-repost-own .post-actions-views,
    .post-card-simple-repost .post-actions-repost-own .post-actions-bookmark {
        flex: 1 1 0;
        max-width: none;
        min-width: 0;
        margin-left: 0;
    }

    .post-card-simple-repost .post-actions-repost-own .post-actions-bookmark {
        justify-content: flex-end;
    }

    .post-detail-thread .post-card-repost-entry.post-card-main {
        padding: 14px 16px;
    }

    .post-detail-thread .post-card-repost-entry.post-card-main .repost-quote-text {
        font-size: 20px;
        line-height: 1.2;
    }

    .post-detail-thread .post-card-repost-entry.post-card-main .post-avatar-link .author-avatar,
    .post-detail-thread .post-card-repost-entry.post-card-main .author-avatar {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 700px) {
    body.social-home .post-card,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 0 9px;
        padding: 7px 12px 5px;
    }

    body.social-home .post-meta-row,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-meta-row {
        margin: 0;
        gap: 5px;
        align-items: center;
    }

    body.social-home .post-meta-names,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-meta-names {
        gap: 3px;
        font-size: 14px;
        line-height: 1.15;
    }

    body.social-home .post-handle,
    body.social-home .post-time,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-handle,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-time {
        font-size: 14px;
    }

    body.social-home .post-text,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-text {
        margin: -1px 0 0;
        font-size: 14px;
        line-height: 1.36;
    }

    body.social-home .post-text-block,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-text-block,
    body.social-home .post-text-block .post-text,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-text-block .post-text {
        margin: 0;
    }

    body.social-home .post-actions,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-actions {
        margin: 8px 0 0;
        gap: 0;
    }

    body.social-home .post-actions-btn,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-actions-btn {
        padding: 0;
        min-height: 30px;
    }

    body.social-home .post-actions-icon svg,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-actions-icon svg {
        width: 17px;
        height: 17px;
    }

    body.social-home .post-actions-count,
    .feed .post-card:not(.post-card-expanded):not(.post-card-embedded) .post-actions-count {
        font-size: 12px;
    }

    .post-avatar-link .author-avatar,
    .author-avatar {
        width: 36px;
        height: 36px;
        margin-top: 1px;
    }

    .post-repost-inner {
        border-radius: 14px;
    }

    .post-card-embedded .post-media {
        border-radius: 12px;
    }

    /* Simple reposts on mobile should visually match normal posts below the repost banner. */
    .post-card-simple-repost {
        grid-template-rows: auto auto;
    }

    .post-card-simple-repost > .post-repost-banner {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 4px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-muted);
    }

    .post-card-simple-repost > .post-repost-banner > .post-menu {
        margin-left: auto;
    }

    .post-card-simple-repost > .post-avatar-link {
        display: none;
    }

    .post-card-simple-repost > .post-body {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .post-card-simple-repost > .post-body > .post-meta-row {
        display: none;
    }

    .post-card-simple-repost .post-repost-inner {
        border: none !important;
        background: transparent !important;
        border-radius: 0;
        overflow: visible;
    }

    .post-card-simple-repost .post-repost-embed {
        margin: 0;
    }

    .post-card-simple-repost .post-card-embedded {
        padding: 0;
        margin: 0;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 0 9px;
        cursor: pointer;
        width: 100%;
    }

    .post-card-simple-repost .post-card-embedded .author-avatar {
        width: 36px;
        height: 36px;
    }

    .post-card-simple-repost .post-card-embedded .post-meta-names {
        font-size: 14px;
        line-height: 1.15;
        gap: 3px;
    }

    .post-card-simple-repost .post-card-embedded .post-text {
        margin: -1px 0 0;
        font-size: 14px;
        line-height: 1.36;
    }

    .post-card-simple-repost .post-actions-repost-own {
        margin: 5px -8px 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
        width: 100%;
        max-width: 100%;
    }

    .post-card-simple-repost .post-actions-repost-own .post-actions-reply,
    .post-card-simple-repost .post-actions-repost-own .post-actions-repost,
    .post-card-simple-repost .post-actions-repost-own .post-actions-like,
    .post-card-simple-repost .post-actions-repost-own .post-actions-views,
    .post-card-simple-repost .post-actions-repost-own .post-actions-bookmark {
        flex: 0 0 auto !important; /* was 1 1 0 */
        max-width: none !important;
        min-width: 0;
        margin-left: 0 !important;
    }
}

/* Thread empty state polish: prevent ultra-narrow word stacking on some layouts. */
.post-thread-empty {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    padding: 22px 16px;
    box-sizing: border-box;
}

.post-thread-empty p {
    margin: 0 auto;
    max-width: 34ch;
    line-height: 1.45;
    text-wrap: balance;
}

/* repost-align-feedx-20260722 — actions use content column grid (see social.css perfect-layout) */
.post-card-simple-repost .post-handle,
.post-card-quote-repost .post-handle,
.post-repost-embed .post-handle {
    display: none !important;
}
.post-card-simple-repost > .post-body > .post-actions,
.post-card-simple-repost .post-actions-simple-repost {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* stablecnt3-20260723 — even spacing: comment — repost — heart — views — bookmark
   Heart is the true centre between comment and bookmark.
   Repost sits between comment & heart; views between heart & bookmark.
   Counts stay absolute so they never shift icons.
*/
.post-card .post-actions,
.reply-card .post-actions,
.post-card-simple-repost .post-actions,
.post-card-simple-repost .post-actions-simple-repost,
.post-card-quote-repost .post-actions,
.post-card-quote-repost .post-actions-repost-own,
.post-card-repost-entry .post-actions,
.post-card-repost-entry .post-actions-simple-repost,
.post-card-repost-entry .post-actions-repost-own {
    --pa-icon: 18.75px;
    --pa-hit: 34.75px;
    --pa-count-w: 3ch;
    --pa-slot: 34.75px; /* equal slot width → even space-between centres */
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important; /* 5 equal gaps: ends flush, middles even */
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Equal-width slots so space-between places icon centres at 0 / 25% / 50% / 75% / 100% */
.post-card .post-actions > .post-actions-item,
.reply-card .post-actions > .post-actions-item,
.post-card-repost-entry .post-actions > .post-actions-item,
.post-card-simple-repost .post-actions > .post-actions-item,
.post-card-simple-repost .post-actions-simple-repost > .post-actions-item,
.post-card-quote-repost .post-actions-repost-own > .post-actions-item,
.post-card-repost-entry .post-actions-simple-repost > .post-actions-item,
.post-card-repost-entry .post-actions-repost-own > .post-actions-item {
    flex: 0 0 var(--pa-slot) !important;
    width: var(--pa-slot) !important;
    min-width: var(--pa-slot) !important;
    max-width: var(--pa-slot) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.post-actions-reply { order: 1 !important; justify-content: flex-start !important; }
.post-actions-repost { order: 2 !important; justify-content: center !important; }
.post-actions-like { order: 3 !important; justify-content: center !important; }
.post-actions-views { order: 4 !important; justify-content: center !important; }
.post-actions-bookmark,
.post-actions-share { order: 5 !important; justify-content: flex-end !important; }

/* Button shell — only icon sizes the box; count is absolute */
.post-card .post-actions .post-actions-btn,
.post-card .post-actions .like-button,
.post-card .post-actions a.post-views-link,
.post-card-repost-entry .post-actions .post-actions-btn,
.post-card-repost-entry .post-actions .like-button,
.post-card-repost-entry .post-actions a.post-views-link,
body.social-page .post-actions .like-button,
.feed .post-card .post-actions-btn,
body.social-home .post-actions-btn {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    min-height: var(--pa-hit) !important;
    width: auto !important;
    border: none !important;
    background: transparent !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.post-actions-item form {
    display: flex !important;
    align-items: center !important;
    justify-content: inherit !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Fixed icon hit — never grows with count */
.post-card .post-actions .post-actions-icon,
.post-card-repost-entry .post-actions .post-actions-icon {
    position: relative !important;
    z-index: 1 !important;
    width: var(--pa-hit) !important;
    height: var(--pa-hit) !important;
    min-width: var(--pa-hit) !important;
    max-width: var(--pa-hit) !important;
    flex: 0 0 var(--pa-hit) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 999px !important;
    box-sizing: border-box !important;
}
.post-card .post-actions .post-actions-icon svg,
.post-card-repost-entry .post-actions .post-actions-icon svg {
    width: var(--pa-icon) !important;
    height: var(--pa-icon) !important;
    min-width: var(--pa-icon) !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* COMMENT: left edge of SVG under display name (slot still full width for even spacing) */
.post-actions-reply {
    justify-content: flex-start !important;
}
.post-actions-reply .post-actions-btn,
.post-actions-reply form {
    justify-content: flex-start !important;
    margin: 0 !important;
    width: 100% !important;
}
.post-actions-reply .post-actions-icon {
    width: var(--pa-icon) !important;
    min-width: var(--pa-icon) !important;
    max-width: var(--pa-icon) !important;
    flex: 0 0 var(--pa-icon) !important;
    justify-content: flex-start !important;
}

/* MIDDLE three: icon dead-centre in their slots
   (slots sit at 25% / 50% / 75% via space-between) */
.post-actions-repost,
.post-actions-like,
.post-actions-views {
    justify-content: center !important;
}
.post-actions-repost form,
.post-actions-like form,
.post-actions-repost .post-actions-btn,
.post-actions-like .post-actions-btn,
.post-actions-like .like-button,
.post-actions-views .post-actions-btn,
.post-actions-views a.post-views-link {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    justify-content: center !important;
}

/* BOOKMARK: right edge of slot under ⋯ */
.post-actions-bookmark {
    justify-content: flex-end !important;
}
.post-actions-bookmark form,
.post-actions-bookmark .post-actions-btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    justify-content: flex-end !important;
}
.post-actions-bookmark .post-actions-icon {
    width: var(--pa-hit) !important;
    min-width: var(--pa-hit) !important;
    max-width: var(--pa-hit) !important;
    flex: 0 0 var(--pa-hit) !important;
    justify-content: center !important;
}

/* COUNTS: absolute — never shift icons (1 / 999 / 1k / 1.2k) */
.post-card .post-actions .post-actions-count,
.post-card .post-actions .post-views-count,
.post-card .post-actions .count-value,
.post-card .post-actions .repost-count,
.post-card-repost-entry .post-actions .post-actions-count,
.post-card-repost-entry .post-actions .post-views-count,
.post-card-repost-entry .post-actions .count-value,
.post-card-repost-entry .post-actions .repost-count,
.reply-card .post-actions .post-actions-count,
body.social-home .post-actions .post-actions-count,
.feed .post-card .post-actions .post-actions-count {
    position: absolute !important;
    left: 100% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 0 0 2px !important;
    padding: 0 !important;
    min-width: 0 !important;
    max-width: var(--pa-count-w) !important;
    width: max-content !important;
    font-size: 13px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    font-variant-numeric: tabular-nums !important;
    font-feature-settings: "tnum" 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    pointer-events: none !important;
    color: inherit !important;
    display: block !important;
    visibility: visible !important;
    box-sizing: border-box !important;
    flex: none !important;
    float: none !important;
}

.post-card .post-actions .post-actions-count:empty,
.post-card .post-actions .post-views-count:empty,
.post-card-repost-entry .post-actions .post-actions-count:empty,
.post-card-repost-entry .post-actions .post-views-count:empty,
body.social-home .post-actions .post-actions-count:empty,
.feed .post-card .post-actions .post-actions-count:empty {
    display: block !important;
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.post-actions-reply .post-actions-count {
    left: 100% !important;
    margin-left: 4px !important;
}

/* Anchor absolute counts to the icon, not the full slot (keeps 1k tight to glyph) */
.post-actions-repost .post-actions-btn,
.post-actions-like .post-actions-btn,
.post-actions-like .like-button,
.post-actions-views .post-actions-btn,
.post-actions-views a.post-views-link {
    /* icon is centred in slot; count rides to the right of the icon */
    position: relative !important;
}

/* Simple/quote repost: actions locked to content column */
.post-card-simple-repost > .post-body,
.post-card-quote-repost > .post-body {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    column-gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
}
.post-card-simple-repost > .post-body > .post-meta-row { display: none !important; }
.post-card-simple-repost > .post-body > .post-card-open-zone,
.post-card-simple-repost > .post-body > .post-repost-embed,
.post-card-quote-repost > .post-body > .post-card-open-zone {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
}
.post-card-simple-repost > .post-body > .post-actions,
.post-card-simple-repost .post-actions-simple-repost,
.post-card-simple-repost .post-actions-repost-own,
.post-card-quote-repost > .post-body > .post-actions,
.post-card-quote-repost .post-actions-repost-own,
.post-card-repost-entry > .post-body > .post-actions {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
}

@media (max-width: 700px) {
    .post-card .post-actions,
    .post-card-simple-repost .post-actions,
    .post-card-repost-entry .post-actions {
        --pa-icon: 18px;
        --pa-hit: 32px;
        --pa-slot: 34.75px;
        --pa-count-w: 2.75ch;
    }
    .post-card-simple-repost > .post-body,
    .post-card-quote-repost > .post-body {
        grid-template-columns: 38px minmax(0, 1fr) !important;
        column-gap: 9px !important;
    }
}

/* actmobile1 DISABLED — superseded by social.post-actions.css */

/* ========== closer bigger badges + names 20260727-names2 ========== */
:root {
    --user-badge-emoji-size: 1.32em;
    --user-badge-emoji-size-profile: 1.5em;
}
.identity-name-wrap {
    gap: 0.04em !important;
    align-items: center !important;
}
.post-author .user-badges,
.notification-actor-link .user-badges,
.dm-thread-name .user-badges,
.profile-title .user-badges,
.suggestion-row-name .user-badges,
.reel-author .user-badges,
.tb-profile-preview-badges {
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 0.05em !important;
}
.user-badge-emoji,
.user-badge-icon {
    width: var(--user-badge-emoji-size) !important;
    height: var(--user-badge-emoji-size) !important;
}
.profile-title .user-badge-emoji,
.profile-title .user-badge-icon,
.profile-title .user-badge-tip-btn {
    width: var(--user-badge-emoji-size-profile) !important;
    height: var(--user-badge-emoji-size-profile) !important;
}
/* Premium seal: slightly larger + snug to name */
.user-badge-icon--premium {
    width: 1.55em !important;
    height: 1.55em !important;
    margin-left: -0.06em !important;
    margin-right: -0.02em !important;
    vertical-align: -0.24em !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border: 0 !important;
    object-fit: contain !important;
}
.profile-title .user-badge-icon--premium,
.profile-title .user-badge-tip-btn .user-badge-icon--premium {
    width: 1.7em !important;
    height: 1.7em !important;
    margin-left: -0.04em !important;
}
body.reels-page .reel-author .user-badge-emoji,
body.reels-page .reel-author .user-badge-icon,
body.reels-page .reel-author .user-badge-tip-btn,
body.reels-page .reel-author .user-badge-tip-btn .user-badge-emoji,
body.reels-page .reel-author .user-badge-tip-btn .user-badge-icon {
    width: 1.4em !important;
    height: 1.4em !important;
    min-width: 1.4em !important;
    min-height: 1.4em !important;
    max-width: 1.55em !important;
    max-height: 1.55em !important;
}
body.reels-page .reel-author .user-badge-icon--premium {
    width: 1.55em !important;
    height: 1.55em !important;
    max-width: 1.55em !important;
    max-height: 1.55em !important;
    margin-left: -0.06em !important;
}
.tb-profile-preview-name-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.04em !important;
}
.tb-profile-preview-name-row .tb-profile-preview-name {
    margin: 0 !important;
}
.tb-profile-preview-badges {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
}
.tb-profile-preview-badges .user-badge-icon,
.tb-profile-preview-badges .user-badge-emoji {
    width: 1.55em !important;
    height: 1.55em !important;
}
.tb-profile-preview-badges .user-badge-icon--premium {
    width: 1.65em !important;
    height: 1.65em !important;
}
/* ========== /closer bigger badges + names 20260727-names2 ========== */

/* ========== thread fix 20260727-thread1 ========== */
/* Clean X-style continuous spine; aligned avatars; Show replies under parent */

.post-thread-main,
.post-thread-feed,
.post-detail-thread {
    --thread-pad-x: 16px;
    --thread-avatar-col: 40px;
    --thread-avatar-size: 40px;
    --thread-gap: 12px;
    --thread-spine-x: calc(var(--thread-pad-x) + (var(--thread-avatar-col) / 2));
    --thread-content-indent: calc(var(--thread-pad-x) + var(--thread-avatar-col) + var(--thread-gap));
    --thread-line: var(--social-border, #2f3336);
}

.post-detail-thread {
    --thread-pad-x: 16px;
    --thread-main-avatar-size: 48px;
    --thread-avatar-col: 40px;
    --thread-avatar-size: 40px;
}

@media (max-width: 640px) {
    .post-thread-main,
    .post-thread-feed,
    .post-detail-thread {
        --thread-pad-x: 12px;
        --thread-avatar-col: 36px;
        --thread-avatar-size: 36px;
        --thread-gap: 10px;
    }
    .post-detail-thread {
        --thread-main-avatar-size: 40px;
        --thread-avatar-col: 36px;
        --thread-avatar-size: 36px;
    }
}

/* Kill leftover elbows / grey nested panels / double lines */
.post-thread-replies .reply-thread-branch,
.reply-thread-branch,
.reply-thread-nested,
.reply-thread-meta {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}
.reply-card-nested::before,
.reply-card-nested::after,
.reply-card-nested:not(:last-child)::after,
.reply-thread-branch::before,
.reply-thread-branch:not([hidden])::before {
    content: none !important;
    display: none !important;
}

/* Main post → replies spine */
.post-detail-thread:has(.post-thread-replies > .reply-thread-node) .post-card-main {
    position: relative !important;
    border-bottom: none !important;
    overflow: visible !important;
}
.post-detail-thread:has(.post-thread-replies > .reply-thread-node) .post-card-main::after,
.post-card.post-thread-open:not(.post-card-expanded):has(+ .post-thread-feed:not([hidden]))::after {
    content: '' !important;
    position: absolute !important;
    left: var(--thread-spine-x) !important;
    width: 2px !important;
    transform: translateX(-50%) !important;
    background: var(--thread-line) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}
.post-detail-thread:has(.post-thread-replies > .reply-thread-node) .post-card-main::after {
    top: calc(12px + var(--thread-main-avatar-size, 48px) + 2px) !important;
    bottom: 0 !important;
}
.post-card.post-thread-open:not(.post-card-expanded):has(+ .post-thread-feed:not([hidden])) {
    position: relative !important;
    overflow: visible !important;
    border-bottom: none !important;
}
.post-card.post-thread-open:not(.post-card-expanded):has(+ .post-thread-feed:not([hidden]))::after {
    top: calc(12px + var(--thread-avatar-size) + 2px) !important;
    bottom: 0 !important;
}

/* Root + nested share one avatar column so the spine is a single straight line */
.post-thread-feed .reply-card-root,
.post-detail-thread .reply-card-root,
.post-thread-main .reply-card-root,
.reply-card-root,
.post-thread-feed .reply-card-nested,
.post-detail-thread .reply-card-nested,
.post-thread-main .reply-card-nested,
.reply-card-nested {
    display: grid !important;
    grid-template-columns: var(--thread-avatar-col) minmax(0, 1fr) !important;
    column-gap: var(--thread-gap) !important;
    row-gap: 0 !important;
    padding: 10px var(--thread-pad-x) 0 !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    position: relative !important;
}
.reply-card-root:hover,
.reply-card-nested:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}
html[data-theme="light"] .reply-card-root:hover,
html[data-theme="light"] .reply-card-nested:hover {
    background: rgba(15, 20, 25, 0.03) !important;
}

.reply-rail {
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    width: var(--thread-avatar-col) !important;
    min-height: var(--thread-avatar-size) !important;
    z-index: 1 !important;
}
.reply-card-root .post-avatar-link .author-avatar,
.reply-card-root .author-avatar,
.reply-card-nested .post-avatar-link .author-avatar,
.reply-card-nested .author-avatar {
    width: var(--thread-avatar-size) !important;
    height: var(--thread-avatar-size) !important;
    position: relative !important;
    z-index: 2 !important;
    background-color: var(--bg, #000) !important;
    border-radius: 999px !important;
}

.reply-body {
    min-width: 0 !important;
    padding-bottom: 2px !important;
}

/* Continuous spine through top-level nodes (and open nested) */
.post-thread-replies {
    position: relative !important;
}
.post-thread-replies > .reply-thread-node {
    position: relative !important;
    z-index: 1 !important;
    border: none !important;
}
.post-thread-replies > .reply-thread-node:not(:last-child)::after,
.post-thread-replies > .reply-thread-node--has-branch:has(.reply-thread-branch:not([hidden]))::after {
    content: '' !important;
    position: absolute !important;
    left: var(--thread-spine-x) !important;
    top: calc(10px + var(--thread-avatar-size) + 2px) !important;
    bottom: 0 !important;
    width: 2px !important;
    transform: translateX(-50%) !important;
    background: var(--thread-line) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* Cap under last leaf avatar so the line does not run into empty space */
.post-thread-replies > .reply-thread-node:last-child:not(:has(.reply-thread-branch:not([hidden]))) .reply-card-root .reply-rail::after,
.post-thread-replies > .reply-thread-node--has-branch:has(.reply-thread-branch:not([hidden])):last-child .reply-thread-nested > .reply-card-nested:last-child .reply-rail::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    left: 50% !important;
    top: calc(var(--thread-avatar-size) + 2px) !important;
    bottom: -40vh !important;
    width: 8px !important;
    transform: translateX(-50%) !important;
    background: var(--bg, #000) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Connector stub from parent post into first reply */
.post-thread-replies > .reply-thread-node:first-child .reply-card-root .reply-rail::before {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: -12px !important;
    width: 2px !important;
    height: 12px !important;
    transform: translateX(-50%) !important;
    background: var(--thread-line) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* Kill old rail stubs that mis-align */
.post-thread-replies > .reply-thread-node .reply-card-root .reply-rail::after,
.reply-thread-node--has-branch .reply-card-root .reply-rail::after {
    /* only last-leaf mask above may show */
}
.post-thread-replies > .reply-thread-node:not(:last-child) .reply-card-root .reply-rail::after,
.post-thread-replies > .reply-thread-node--has-branch:has(.reply-thread-branch:not([hidden])):not(:last-child) .reply-card-root .reply-rail::after {
    content: none !important;
    display: none !important;
}

/* Show / Hide replies — under content column, blue, aligned with text */
.reply-thread-meta {
    position: relative !important;
    z-index: 2 !important;
    padding: 0 var(--thread-pad-x) 4px var(--thread-content-indent) !important;
    margin: 0 !important;
    background: transparent !important;
}
.reply-show-replies-btn {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 2px 0 8px !important;
    min-height: 28px !important;
    border: none !important;
    background: none !important;
    color: var(--social-blue, #1d9bf0) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 18px !important;
    cursor: pointer !important;
    text-align: left !important;
    box-shadow: none !important;
    font-family: inherit !important;
}
.reply-show-replies-btn:hover {
    text-decoration: underline !important;
    color: var(--social-blue, #1d9bf0) !important;
}
@media (max-width: 640px) {
    .reply-show-replies-btn {
        min-height: 40px !important;
        padding: 6px 0 10px !important;
        font-size: 15px !important;
    }
}

/* Nested flat under parent — same grid column */
.reply-thread-branch {
    display: block !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}
.reply-thread-branch[hidden] {
    display: none !important;
}
.reply-thread-nested {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}
.reply-thread-nested > .reply-card-nested {
    padding-top: 6px !important;
}

/* Feed "View N replies" under posts */
a.post-view-thread {
    display: inline-flex !important;
    align-items: center !important;
    margin: 4px 0 0 !important;
    padding: 4px 0 !important;
    color: var(--social-blue, #1d9bf0) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    min-height: 32px !important;
}
a.post-view-thread:hover {
    text-decoration: underline !important;
}

/* Typography consistent root/nested */
.reply-card-root .post-author,
.reply-card-nested .post-author {
    font-size: 15px !important;
    font-weight: 800 !important;
}
.reply-card-root .post-handle,
.reply-card-root .post-time,
.reply-card-nested .post-handle,
.reply-card-nested .post-time {
    font-size: 14px !important;
}
.reply-card-root .post-text,
.reply-card-root .reply-text,
.reply-card-nested .post-text,
.reply-card-nested .reply-text {
    font-size: 15px !important;
    line-height: 20px !important;
    margin: 2px 0 4px !important;
}

/* Action bars sit under text, not under avatar */
.reply-actions-thread,
.reply-actions-nested {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 0 2px -6px !important;
}

/* No divider lines between replies in a conversation block */
.post-thread-replies .reply-card,
.post-thread-replies > .reply-thread-node {
    border-bottom: none !important;
}
.post-thread-main .post-thread-replies {
    border-bottom: 1px solid var(--social-border, #2f3336);
}
.post-thread-feed .post-thread-main .post-thread-replies {
    border-bottom: none !important;
}

/* Show more (long posts) stays blue and left-aligned under text */
.post-text-block .post-read-more {
    display: inline !important;
    color: var(--social-blue, #1d9bf0) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    margin-top: 2px !important;
}
/* ========== /thread fix 20260727-thread1 ========== */

