/**
 * post_card.css
 * BEM namespace: .post-card
 *
 * Renders a single idea card. Supports:
 *   - featured variant (animated conic-gradient hairline border)
 *   - alert variant (red-tinted gradient border + soft inner overlay)
 *   - inline GIF (preview)
 *   - inline structured media: chart / candles / poll / sparkline tiles /
 *     quote-repost / reply-thread / placeholder
 *   - sentiment chip in the header
 *   - engagement bar with vote + bookmark toggle states
 */

.post-card {
    padding: 18px 20px 14px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}
.post-card:hover {
    border-color: var(--hairline-2);
    box-shadow: var(--shadow-pop);
}
.post-card--modal-open,
.post-card--modal-open:hover {
    transform: none;
}

.post-card--featured {
    --ang: 0deg;
    border-color: transparent;
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        conic-gradient(from var(--ang),
            #6366f1 0%, #22d3ee 25%, #a855f7 50%, #22d3ee 75%, #6366f1 100%) border-box;
    animation: postCardSpin 12s linear infinite;
}
@keyframes postCardSpin { to { --ang: 360deg; } }

.post-card--alert {
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        linear-gradient(135deg, color-mix(in srgb, var(--red) 28%, transparent), transparent 60%) border-box;
    border: 1px solid transparent;
}
.post-card--alert::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, color-mix(in srgb, var(--red) 6%, transparent), transparent 50%);
    pointer-events: none;
}

/* ---------- Header ---------- */
.post-card__header {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.post-card__avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: white;
    letter-spacing: 0;
    user-select: none;
    overflow: hidden;
}
.post-card__avatar-link {
    display: inline-flex;
    width: fit-content;
    height: fit-content;
    border-radius: 50%;
    text-decoration: none;
}
.post-card__avatar-link:focus-visible {
    outline: 2px solid var(--iris);
    outline-offset: 3px;
}
.post-card__avatar-img,
.post-card__comment-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.post-card__avatar:has(> .post-card__avatar-img:not([hidden])) > span:first-child,
.post-card__comment-avatar:has(> .post-card__comment-avatar-img:not([hidden])) > span:first-child {
    opacity: 0;
}
.post-card__avatar-img[hidden],
.post-card__comment-avatar-img[hidden] {
    display: none;
}

.post-card__meta { min-width: 0; }

.post-card__row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.post-card__name {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    letter-spacing: -0.01em;
}
.post-card__profile-link {
    text-decoration: none;
}
.post-card__profile-link:hover {
    color: var(--iris);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-card__subscribed {
    color: #d8a21f;
    display: inline-flex;
    align-items: center;
    filter: drop-shadow(0 2px 5px color-mix(in srgb, #d8a21f 24%, transparent));
}
.post-card__subscribed svg {
    width: 20px;
    height: 20px;
}

.post-card__role {
    display: inline-flex;
    align-items: center;
    height: 22px;
    font-size: 11px;
    font-weight: 600;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--iris-tint);
    color: var(--iris);
    border: 1px solid color-mix(in srgb, var(--iris) 18%, transparent);
    line-height: 1;
}
.post-card__role--green { background: var(--green-tint); color: var(--green-2); }
.post-card__role--violet { background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--violet); }
.post-card__role--amber { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.post-card__role--alert { background: var(--red-tint); color: var(--red); }

.post-card__rating-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-2);
    font: 800 11px/1 'Inter Tight', 'Inter', sans-serif;
    white-space: nowrap;
}
.post-card__rating-badge--comment {
    height: 20px;
    padding: 0 7px;
    font-size: 10px;
}

.post-card__handle { font-size: 13px; color: var(--text-2); }
.post-card__dot-sep { color: var(--text-3); }
.post-card__time { font-size: 13px; color: var(--text-3); }
.post-card__edited {
    font-size: 12px;
    color: var(--text-3);
}

.post-card__shimmer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(120deg,
        color-mix(in srgb, var(--iris) 14%, transparent) 0%,
        color-mix(in srgb, var(--cyan) 14%, transparent) 50%,
        color-mix(in srgb, var(--violet) 14%, transparent) 100%);
    background-size: 220% 100%;
    background-position: var(--shimmer-x, 0%) 0;
    color: var(--iris);
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    border: 1px solid color-mix(in srgb, var(--iris) 18%, transparent);
    animation: postCardShimmer 6s ease-in-out infinite;
    margin-top: 4px;
}
@keyframes postCardShimmer {
    0%, 100% { --shimmer-x: 0%; }
    50%      { --shimmer-x: 100%; }
}

.post-card__more {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
}
.post-card__more:hover {
    background: var(--surface-2);
    color: var(--text);
}
.post-card__more-menu {
    position: absolute;
    right: 0;
    top: 36px;
    z-index: 35;
    min-width: 128px;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--hairline);
    background: var(--surface);
    box-shadow: var(--shadow-pop);
}
.post-card__more-item {
    width: 100%;
    min-height: 32px;
    padding: 0 8px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-2);
    text-align: left;
    font: 650 12px 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.post-card__more-item:hover {
    background: var(--surface-2);
    color: var(--text);
}
.post-card__more-item--danger,
.post-card__comment-reply-btn--danger {
    color: var(--red);
}
.post-card__more-empty {
    display: block;
    padding: 8px;
    color: var(--text-3);
    font-size: 12px;
}
.post-card__confirm-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 8px;
    border-radius: 8px;
    background: var(--red-tint);
    color: var(--red);
    font: 650 12px 'Inter', sans-serif;
}
.post-card__confirm-bubble button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    border: 1px solid color-mix(in srgb, var(--red) 25%, transparent);
    border-radius: 6px;
    background: var(--surface);
    color: var(--red);
    cursor: pointer;
}

/* ---------- Body ---------- */
.post-card__body {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    margin: 6px 0 12px;
    letter-spacing: -0.005em;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.post-card__inline-media {
    display: block;
    margin: 10px 0;
}
.post-card__inline-media-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 12px;
    object-fit: contain;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
}
.post-card__media-frame {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    min-height: 220px;
    background: var(--surface-2);
}
.post-card__media-frame--grid {
    min-height: 260px;
    aspect-ratio: 16 / 9;
}
.post-card__media-frame--gif {
    margin: 10px 0 6px;
    border-radius: 14px;
    min-height: 240px;
    aspect-ratio: 16 / 9;
}
.post-card__media-frame--inline {
    width: min(520px, 100%);
    max-width: 100%;
    min-height: 260px;
    aspect-ratio: 16 / 10;
}
.post-card__media-frame--comment-gif,
.post-card__media-frame--quote-gif {
    width: min(420px, 100%);
    min-height: 220px;
    aspect-ratio: 16 / 9;
    margin-top: 8px;
}
.post-card__prediction {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    margin: 8px 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--iris) 24%, var(--hairline));
    background: linear-gradient(135deg, var(--iris-tint), color-mix(in srgb, var(--cyan) 8%, var(--surface)));
}
.post-card__prediction--comment {
    margin: 8px 0;
    grid-template-columns: 30px 1fr;
    padding: 8px 10px;
}
.post-card__prediction-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--surface);
    color: var(--iris);
    border: 1px solid color-mix(in srgb, var(--iris) 25%, var(--hairline));
}
.post-card__prediction--comment .post-card__prediction-icon {
    width: 30px;
    height: 30px;
    font-size: 13px;
}
.post-card__prediction-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}
.post-card__prediction-label {
    color: var(--text-3);
    font: 800 10px/1 'Inter Tight', 'Inter', sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.post-card__prediction-line {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    color: var(--text);
    font: 700 13px/1.25 'Inter Tight', 'Inter', sans-serif;
}
.post-card__prediction-line strong {
    color: var(--iris);
}
.post-card__prediction-date {
    color: var(--text-2);
    font-weight: 650;
}
.post-card__media-frame--loading::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, var(--surface-2), color-mix(in srgb, var(--text) 7%, var(--surface-2)), var(--surface-2));
    background-size: 220% 100%;
    animation: postCardMediaSkeleton 1.2s ease-in-out infinite;
}
@keyframes postCardMediaSkeleton {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}
.post-card__edit-box,
.post-card__comment-edit-box {
    display: grid;
    gap: 8px;
    margin: 8px 0 12px;
}
.post-card__edit-input,
.post-card__comment-edit-input {
    width: 100%;
    min-height: 86px;
    resize: vertical;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    padding: 10px;
    font: 500 14px 'Inter', sans-serif;
    line-height: 1.45;
}
.post-card__edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.post-card__edit-media-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.post-card__edit-media-item {
    display: grid;
    grid-template-columns: 64px auto;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: var(--surface-2);
}
.post-card__edit-media-item img {
    width: 64px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
}
.post-card__edit-media-item button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    border: 1px solid var(--hairline);
    border-radius: 6px;
    background: var(--surface);
    color: var(--red);
    font: 650 12px 'Inter', sans-serif;
    cursor: pointer;
}
.post-card__comment-reply-btn--primary {
    color: var(--iris);
}
.post-card__attached-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 12px;
}
.post-card__attached-media-grid[data-count="1"] {
    grid-template-columns: 1fr;
}
.post-card__attached-media-img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: var(--surface-2);
}

.post-card__ticker {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    color: var(--iris);
    padding: 1px 7px;
    margin: 0 1px;
    background: var(--iris-tint);
    border-radius: 6px;
    font-size: 14px;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
}
.post-card__ticker--green { color: var(--green-2); background: var(--green-tint); }
.post-card__ticker--red { color: var(--red); background: var(--red-tint); }
.post-card__ticker--violet { color: var(--violet); background: color-mix(in srgb, var(--violet) 14%, transparent); }

.post-card__ticker-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--iris-tint);
    color: var(--iris);
    letter-spacing: -0.01em;
    text-decoration: none;
}
.post-card__ticker-logo {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface);
    border: 1px solid var(--hairline);
    flex: 0 0 auto;
}
.post-card__ticker-logo--inline {
    width: 14px;
    height: 14px;
}
.post-card__ticker-logo--fallback {
    display: inline-grid;
    place-items: center;
    color: currentColor;
    font: 800 7px/1 'Inter Tight', 'Inter', sans-serif;
}
.post-card__ticker-chip--green { background: var(--green-tint); color: var(--green-2); }
.post-card__ticker-chip--violet { background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--violet); }
.post-card__ticker-chip--red { background: var(--red-tint); color: var(--red); }

/* ---------- GIF inline ---------- */
.post-card__gif {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 14px;
    margin: 0;
    background: var(--surface-2);
}

/* ---------- Media cards ---------- */
.post-card__media {
    margin: 10px 0 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    position: relative;
    overflow: hidden;
}

.post-card__media-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.post-card__media-title {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: -0.01em;
}
.post-card__media-change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-feature-settings: "tnum";
}
.post-card__media-change--up { color: var(--green-2); }
.post-card__media-change--down { color: var(--red); }
.post-card__media-change--muted { color: var(--text-3); }

.post-card__media-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.post-card__callout-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--iris-tint), color-mix(in srgb, var(--cyan) 12%, transparent));
    color: var(--iris);
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: -0.01em;
    border: 1px solid color-mix(in srgb, var(--iris) 18%, transparent);
    white-space: nowrap;
}

/* Poll */
.post-card__poll {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 6px 0 4px;
}
.post-card__poll-row {
    display: grid;
    grid-template-columns: 60px 1fr 50px;
    gap: 12px;
    align-items: center;
    font-size: 13px;
}
.post-card__poll-label { font-weight: 500; }
.post-card__poll-pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-2);
    text-align: right;
    font-feature-settings: "tnum";
}
.post-card__poll-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--surface);
    overflow: hidden;
    border: 1px solid var(--hairline);
}
.post-card__poll-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 1.2s cubic-bezier(.25,.8,.25,1);
}
.post-card__poll-row--bull .post-card__poll-fill {
    background: linear-gradient(90deg, var(--green), #4ade80);
}
.post-card__poll-row--bear .post-card__poll-fill {
    background: linear-gradient(90deg, var(--red), #fb7185);
}
.post-card__poll-row--hold .post-card__poll-fill {
    background: linear-gradient(90deg, var(--iris), var(--violet));
}
.post-card__poll-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
}

/* Quote-repost */
.post-card__quote {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--hairline);
}
.post-card__quote-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}
.post-card__quote-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    font-size: 11px;
    color: white;
}
.post-card__quote-name {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
}
.post-card__quote-body {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

/* Sparkline tiles row */
.post-card__spark-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}
.post-card__spark-tile {
    padding: 12px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
}
.post-card__spark-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.post-card__spark-sym {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: -0.01em;
}
.post-card__spark-ch {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-feature-settings: "tnum";
}
.post-card__spark-ch--up { color: var(--green-2); }
.post-card__spark-ch--down { color: var(--red); }
.post-card__spark-svg {
    display: block;
    width: 100%;
    height: 36px;
    margin-top: 4px;
}

/* Reply thread */
.post-card__reply-thread {
    margin-top: 12px;
    padding-left: 16px;
    border-left: 2px solid var(--hairline);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.post-card__reply {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
}
.post-card__reply-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}
.post-card__reply-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    font-size: 10px;
    color: white;
}
.post-card__reply-body {
    font-size: 14px;
    line-height: 1.5;
}
.post-card__typing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    font-size: 13px;
    color: var(--text-2);
    width: fit-content;
}
.post-card__typing-dots {
    display: inline-flex;
    gap: 3px;
}
.post-card__typing-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--iris);
    animation: postCardTypingDot 1.2s ease-in-out infinite;
}
.post-card__typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.post-card__typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes postCardTypingDot {
    0%, 60%, 100% { transform: scale(0.6); opacity: 0.4; }
    30%           { transform: scale(1); opacity: 1; }
}

/* Real comment tree */
.post-card__comments {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--hairline);
}
.post-card__comments[hidden] {
    display: none;
}
.post-card__comments-composer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.post-card__comment-reply-context {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 12px;
}
.post-card__comment-cancel {
    border: none;
    background: transparent;
    color: var(--iris);
    font: 650 12px 'Inter', sans-serif;
    cursor: pointer;
    padding: 0;
}
.post-card__comment-form {
    display: grid;
    gap: 8px;
    align-items: stretch;
}
.post-card__comment-input-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
}
.post-card__comment-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 94px;
    max-height: none;
    resize: none;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    padding: 10px 12px;
    font: 500 13px/1.4 'Inter', sans-serif;
}
.post-card__comment-resize-handle {
    position: absolute;
    right: 8px;
    bottom: 6px;
    width: 20px;
    height: 12px;
    cursor: ns-resize;
}
.post-card__comment-resize-handle::before {
    content: '';
    display: block;
    width: 14px;
    height: 8px;
    margin: 2px 0 0 auto;
    border-right: 2px solid var(--text-3);
    border-bottom: 2px solid var(--text-3);
    border-radius: 1px;
    opacity: 0.7;
}
.post-card__comment-input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--iris) 50%, transparent);
    box-shadow: 0 0 0 3px var(--iris-tint);
    background: var(--surface);
}
.post-card__comment-input::placeholder {
    color: var(--text-3);
}
.post-card__comment-submit {
    height: 42px;
    min-width: 72px;
    padding: 0 16px;
}
.post-card__comment-submit[data-busy="true"] {
    opacity: 0.72;
    pointer-events: none;
}
.post-card__comment-compose-actions {
    margin-top: 0;
    flex-wrap: wrap;
}
.post-card__comment-tool-btn {
    flex: 0 0 auto;
}
.post-card__comment-sentiment-slot {
    display: inline-flex;
}
.post-card__comment-gif-preview {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: var(--surface-2);
}
.post-card__comment-gif-preview-img {
    width: 54px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface);
}
.post-card__comment-gif-preview-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-2);
    font: 650 12px 'Inter', sans-serif;
}
.post-card__comment-gif-preview-remove {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
}
.post-card__comment-gif-preview-remove:hover {
    background: var(--surface);
    color: var(--text);
}
.post-card__comment-prediction-panel {
    padding: 10px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--iris) 22%, var(--hairline));
    background: linear-gradient(135deg, var(--iris-tint), color-mix(in srgb, var(--cyan) 7%, var(--surface)));
}
.post-card__comment-prediction-panel[hidden] {
    display: none;
}
.post-card__comment-prediction-grid {
    display: grid;
    grid-template-columns: minmax(92px, 0.8fr) minmax(120px, 1fr) minmax(160px, 1.2fr);
    gap: 8px;
}
.post-card__comment-prediction-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.post-card__comment-prediction-field label {
    color: var(--text-2);
    font: 750 11px/1 'Inter Tight', 'Inter', sans-serif;
}
.post-card__comment-prediction-field input {
    width: 100%;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--hairline);
    background: var(--surface);
    color: var(--text);
    padding: 0 9px;
    font: 650 12px/1 'Inter', sans-serif;
}
.post-card__comment-prediction-field input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--iris) 48%, transparent);
    box-shadow: 0 0 0 3px var(--iris-tint);
}
.post-card__comment-media-uploading,
.post-card__typing-indicator {
    padding: 8px 0;
    color: var(--text-2);
    font: 650 12px 'Inter', sans-serif;
}
.post-card__typing-indicator {
    padding-left: 26px;
}
.post-card__comments-list-wrap {
    margin-top: 12px;
}
.post-card__comments-state {
    padding: 14px;
    border: 1px dashed var(--hairline);
    border-radius: 12px;
    color: var(--text-3);
    text-align: center;
    font-size: 13px;
}
.post-card__comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.post-card__comment-list--nested {
    margin-top: 8px;
    margin-left: 24px;
    padding-left: 14px;
    border-left: 2px solid var(--hairline);
}
.post-card__comment {
    position: relative;
}
.post-card__comment-row {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 8px;
    align-items: start;
}
.post-card__comment-arrow {
    width: 18px;
    height: 30px;
    display: grid;
    place-items: center;
    color: var(--text-3);
}
.post-card__comment-arrow--root {
    display: block;
}
.post-card__comment-card {
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
}
.post-card__comment--highlight > .post-card__comment-row .post-card__comment-card {
    border-color: color-mix(in srgb, var(--iris) 45%, transparent);
    box-shadow: 0 0 0 4px var(--iris-tint);
}
.post-card__comment-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.post-card__comment-avatar {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: white;
    font: 700 10px 'Inter Tight', sans-serif;
    flex: 0 0 auto;
    overflow: hidden;
}
.post-card__comment-name {
    color: var(--text);
    font-family: 'Inter Tight', sans-serif;
    font-size: 13px;
    font-weight: 700;
}
.post-card__comment-body {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.post-card__comment-sentiment {
    display: inline-flex;
    align-items: center;
    height: 24px;
    width: fit-content;
    margin-bottom: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font: 700 11px 'Inter Tight', 'Inter', sans-serif;
}
.post-card__comment-sentiment--bullish {
    background: var(--green-tint);
    color: var(--green-2);
}
.post-card__comment-sentiment--bearish {
    background: var(--red-tint);
    color: var(--red);
}
.post-card__comment-gif {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 12px;
    margin: 0;
    background: var(--surface);
}
.post-card__comment-actions {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.post-card__comment-share-menu {
    position: relative;
    display: inline-flex;
}
.post-card__comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 4px 7px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    font: 650 12px 'Inter', sans-serif;
    cursor: pointer;
}
.post-card__comment-action-btn svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}
.post-card__comment-action-btn:hover,
.post-card__comment-action-btn.is-on {
    color: var(--iris);
    background: var(--surface);
}
.post-card__comment-action-btn--danger {
    color: var(--red);
}
.post-card__comment-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: var(--text-2);
    font: 650 12px 'Inter', sans-serif;
    cursor: pointer;
    padding: 2px 0;
}
.post-card__comment-reply-btn:hover {
    color: var(--iris);
}
.post-card__comment-reply-btn.is-on {
    color: var(--iris);
}
.post-card__comment-reply-btn[aria-busy="true"] {
    opacity: 0.72;
    pointer-events: none;
}

/* Media placeholder (video screenshot) */
.post-card__placeholder {
    margin-top: 12px;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    height: 200px;
    background: linear-gradient(135deg, #6366f1 0%, #22d3ee 50%, #a855f7 100%);
    display: grid;
    place-items: center;
}
.post-card__placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.18), transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(0,0,0,0.18), transparent 50%);
}
.post-card__play-glyph {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}
.post-card__play-glyph:hover { transform: scale(1.06); }
.post-card__play-glyph svg { color: #6366f1; margin-left: 3px; }

/* ---------- Engagement bar ---------- */
.post-card__engage {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--hairline);
    color: var(--text-2);
    font-size: 13px;
}
.post-card__engage-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-feature-settings: "tnum";
    transition: color 0.15s, background 0.15s;
}
.post-card__engage-btn:hover {
    color: var(--iris);
    background: var(--iris-tint);
}
.post-card__share-menu {
    position: relative;
    display: inline-flex;
    margin-left: auto;
}
.post-card__repost-menu {
    position: relative;
    display: inline-flex;
}
.post-card__engage-btn--share { margin-left: 0; }
.post-card__repost-bubble,
.post-card__comment-quote-bubble {
    position: fixed;
    inset: 0;
    z-index: 110;
    width: auto;
    max-height: none;
    overflow-y: auto;
    padding: 24px;
    border: 0;
    border-radius: 0;
    background: var(--modal-backdrop);
    box-shadow: none;
    color: var(--text);
    display: grid;
    place-items: center;
}
.post-card__repost-modal-panel {
    width: min(720px, calc(100vw - 32px));
    max-height: min(82vh, 760px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: var(--surface);
    box-shadow: var(--shadow-pop);
}
.post-card__repost-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--hairline);
}
.post-card__repost-modal-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: var(--text);
    font: 800 15px/1 'Inter Tight', 'Inter', sans-serif;
}
.post-card__repost-modal-title i {
    color: var(--iris);
}
.post-card__repost-modal-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.post-card__repost-modal-close:hover,
.post-card__repost-modal-close:focus-visible {
    transform: scale(1.08);
    background: var(--surface);
    color: var(--text);
    border-color: color-mix(in srgb, var(--iris) 35%, var(--hairline));
}
.post-card__repost-modal-body {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    gap: 8px;
    padding: 14px;
}
.post-card__repost-input {
    width: 100%;
    min-height: 84px;
    max-height: 220px;
    resize: vertical;
    border-radius: 8px;
    border: 1px solid var(--hairline);
    background: var(--surface-2);
    color: var(--text);
    padding: 9px 10px;
    font: 500 13px/1.45 'Inter', sans-serif;
}
.post-card__repost-input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--iris) 50%, transparent);
    box-shadow: 0 0 0 3px var(--iris-tint);
    background: var(--surface);
}
.post-card__quote-preview {
    margin-top: 8px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--hairline);
    background: var(--surface-2);
}
.post-card__quote-preview-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}
.post-card__quote-preview-name {
    color: var(--text);
    font: 700 12px 'Inter Tight', 'Inter', sans-serif;
}
.post-card__quote-preview-body {
    margin: 0;
    color: var(--text-2);
    font: 500 13px/1.45 'Inter', sans-serif;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.post-card__quote-preview-gif {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 10px;
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--hairline);
}
.post-card__repost-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--hairline);
    background: var(--surface);
}
.post-card__share-primary[data-busy="true"] {
    opacity: 0.72;
    pointer-events: none;
}
.post-card__share-bubble {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 40;
    width: min(340px, calc(100vw - 32px));
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--hairline);
    background: var(--surface);
    box-shadow: var(--shadow-pop);
    color: var(--text);
}
.post-card__share-bubble--comment {
    left: 0;
    right: auto;
    bottom: calc(100% + 6px);
    width: min(340px, calc(100vw - 48px));
}
.post-card__share-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.post-card__share-primary,
.post-card__share-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--hairline);
    font: 700 12px 'Inter Tight', 'Inter', sans-serif;
    letter-spacing: 0;
    cursor: pointer;
    padding: 0 10px;
}
.post-card__share-primary {
    background: var(--text);
    color: var(--surface);
    border-color: var(--text);
}
.post-card__share-secondary {
    background: var(--surface-2);
    color: var(--text-2);
}
.post-card__share-url-row {
    margin-top: 8px;
    display: block;
}
.post-card__share-url-field {
    position: relative;
}
.post-card__share-url {
    width: 100%;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--hairline);
    background: var(--surface-2);
    color: var(--text-2);
    padding: 0 92px 0 10px;
    font: 500 12px 'JetBrains Mono', monospace;
}
.post-card__share-copy-inline {
    position: absolute;
    top: 4px;
    right: 4px;
    height: 26px;
    max-width: 84px;
    border-radius: 7px;
    border: 1px solid var(--hairline);
    background: var(--text);
    color: var(--surface);
    font: 700 11px 'Inter Tight', 'Inter', sans-serif;
    letter-spacing: 0;
    cursor: pointer;
    padding: 0 8px;
}
.post-card__share-copy-inline[data-copy-state="copied"] {
    background: var(--green-2);
    border-color: var(--green-2);
}
.post-card__share-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.post-card__share-more-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 8px;
}
.post-card__share-option {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid var(--hairline);
    background: var(--surface-2);
    color: var(--text-2);
    text-decoration: none;
    font: 650 12px 'Inter', sans-serif;
}
.post-card__share-option:hover {
    color: var(--iris);
    border-color: color-mix(in srgb, var(--iris) 30%, var(--hairline));
    background: var(--iris-tint);
}

.post-card__vote-group {
    display: inline-flex;
    align-items: center;
    height: 30px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-2);
    overflow: hidden;
    font-feature-settings: "tnum";
}
.post-card__vote-group[aria-busy="true"],
.post-card__engage-btn[aria-busy="true"] {
    opacity: 0.72;
    pointer-events: none;
}
.post-card__vote-group.is-bouncing {
    animation: postCardVotePulse 0.28s ease;
}
.post-card__vote-btn {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s, background 0.15s;
}
.post-card__vote-btn:disabled {
    opacity: 0.46;
    cursor: not-allowed;
}
.post-card__vote-btn:disabled:hover {
    color: inherit;
    background: transparent;
}
.post-card__vote-btn:hover {
    color: var(--iris);
    background: var(--iris-tint);
}
.post-card__vote-btn--up.is-on {
    color: var(--green-2);
    background: var(--green-tint);
}
.post-card__vote-btn--down.is-on {
    color: var(--red);
    background: var(--red-tint);
}
.post-card__vote-karma {
    min-width: 38px;
    padding: 0 8px;
    border-left: 1px solid var(--hairline);
    border-right: 1px solid var(--hairline);
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    line-height: 30px;
    color: var(--text);
}
@keyframes postCardVotePulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}
.post-card__engage-btn--bookmark.is-on svg {
    fill: var(--iris);
    color: var(--iris);
    animation: postCardFoldDown 0.3s ease;
}
.post-card__engage-btn[data-action="repost"].is-on {
    color: var(--green-2);
    background: var(--green-tint);
}
.post-card__share-primary[data-copy-state="copied"] {
    background: var(--green);
    border-color: var(--green);
}
.post-card__share-primary[data-copy-state="select"] {
    background: var(--amber);
    border-color: var(--amber);
    color: white;
}
@keyframes postCardFoldDown {
    0%   { transform: translateY(-3px); }
    60%  { transform: translateY(2px); }
    100% { transform: translateY(0); }
}

@media (max-width: 768px) {
    .post-card { padding: 16px; }
    .post-card__engage { gap: 10px; }
    .post-card__share-menu { margin-left: 0; }
    .post-card__share-bubble { left: 0; right: auto; }
    .post-card__comment-submit { width: fit-content; justify-self: end; }
    .post-card__comment-prediction-grid { grid-template-columns: 1fr; }
    .post-card__comment-list--nested { margin-left: 14px; padding-left: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .post-card,
    .post-card--featured,
    .post-card__shimmer-pill,
    .post-card__typing-dots i {
        animation: none !important;
    }
}
