﻿/* ═══════════════════════════════════════
   Stoling — Feed (Social)
   ═══════════════════════════════════════ */

/* ── Theme Custom Properties ── */
.fd {
    /* Background */
    --fd-bg: #0a0a1e;

    /* Accent palette */
    --fd-accent: #7c3aed;
    --fd-accent-violet: #8b5cf6;
    --fd-accent-pink: #ec4899;
    --fd-accent-rgb: 124, 58, 237;

    /* Text hierarchy */
    --fd-text-primary: #f1f5f9;
    --fd-text-secondary: #94a3b8;
    --fd-text-muted: #475569;

    /* Glassmorphic surfaces */
    --fd-glass-bg: rgba(15, 18, 36, .6);
    --fd-glass-bg-alt: rgba(10, 10, 30, .6);
    --fd-glass-blur: blur(14px);
    --fd-glass-border: rgba(139, 92, 246, .1);
    --fd-glass-border-hover: rgba(139, 92, 246, .25);

    /* Legacy alias used by .fd-tab.is-active */
    --accent: #7c3aed;
}

.page-feed .as-main {
    max-width: none;
    padding: 0
}

.page-feed .sc-footer {
    display: none
}

.page-profile .sc-footer {
    display: none
}

.fd {
    position: relative;
    min-height: 100vh;
    background: #0a0a1e;
    margin-top: -72px;
    padding-top: 72px
}

/* ── Three-Column Grid Layout ── */
.fd-layout {
    display: grid;
    grid-template-columns: 72px 1fr 320px;
    width: 92%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 56px)
}

/* ── Left Sidebar ── */
.fd-sidebar-left {
    position: sticky;
    top: 88px;
    height: calc(100vh - 56px);
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    gap: .5rem;
    z-index: 10;
    overflow-y: auto;
    scrollbar-width: none;
    flex-shrink: 0
}

.fd-sidebar-left::before {
    content: '';
    position: absolute;
    top: .75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: calc(100% - 1.5rem);
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 24px;
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.08);
    z-index: -1;
    pointer-events: none
}

.fd-sidebar-left::-webkit-scrollbar {
    display: none
}

/* ── Left Sidebar Buttons ── */
.fd-sidebar-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    background: none;
    border-radius: 12px;
    color: var(--fd-text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    -webkit-tap-highlight-color: transparent
}

.fd-sidebar-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--fd-text-primary);
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.2)
}

.fd-sidebar-btn.is-active {
    background: rgba(124, 58, 237, 0.25);
    color: #fff;
    border: 1px solid rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
    border-radius: 12px
}

/* Tooltip via ::after */
.fd-sidebar-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    padding: .35rem .65rem;
    background: rgba(15, 23, 42, .92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(var(--fd-accent-rgb), .15);
    border-radius: 8px;
    color: var(--fd-text-primary);
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 50
}

.fd-sidebar-btn:hover::after {
    opacity: 1
}

.fd-sidebar-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    overflow: hidden
}

.fd-sidebar-spacer {
    flex: 1
}

.fd-sidebar-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(124, 58, 237, .4);
    transition: all .2s;
    flex-shrink: 0;
    margin-bottom: 1.5rem;
    animation: fd-pulse 3s ease-in-out infinite
}

.fd-sidebar-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.5)
}

/* ── User Search Panel ── */
.fd-search-panel {
    position: fixed;
    top: 88px;
    left: 80px;
    width: 320px;
    max-height: calc(100vh - 120px);
    background: rgba(15, 18, 36, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fd-search-slideIn .2s ease;
}

@keyframes fd-search-slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fd-search-panel-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.fd-search-panel-input {
    flex: 1;
    background: rgba(15, 23, 42, .6);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 10px;
    padding: .6rem .85rem;
    color: #f1f5f9;
    font-size: .85rem;
    outline: none;
    transition: border-color .15s;
}

.fd-search-panel-input:focus {
    border-color: rgba(99, 102, 241, .4);
}

.fd-search-panel-input::placeholder {
    color: rgba(255, 255, 255, .3);
}

.fd-search-panel-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .5);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

.fd-search-panel-close:hover {
    background: rgba(255, 255, 255, .08);
    color: #f1f5f9;
}

.fd-search-panel-results {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    padding: .5rem;
}

.fd-search-result {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
}

.fd-search-result:hover {
    background: rgba(99, 102, 241, .1);
}

.fd-search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(99, 102, 241, .2);
}

.fd-search-result-info {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.fd-search-result-name {
    font-size: .85rem;
    font-weight: 600;
    color: #e2e8f0;
}

.fd-search-result-username {
    font-size: .72rem;
    color: rgba(255, 255, 255, .4);
}

.fd-search-loading,
.fd-search-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: rgba(255, 255, 255, .4);
    font-size: .82rem;
}

@keyframes fd-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    }

    50% {
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
    }
}

.fd-center {
    min-width: 0;
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding-top: 32px;
}

/* ── Right Sidebar ── */
.fd-sidebar-right {
    position: sticky;
    top: 88px;
    align-self: start;
    /* Fixed height + hidden overflow: the widgets flex-share this height and each
       scrolls INSIDE itself, so the whole set always fits one screen (no page scroll). */
    height: calc(100vh - 104px);
    max-height: calc(100vh - 104px);
    box-sizing: border-box;
    overflow: hidden;
    padding: 1rem .5rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    scrollbar-width: none
}

.fd-sidebar-right::-webkit-scrollbar {
    display: none
}

/* ── Right Sidebar Widget Cards ── */
.fd-widget {
    background: rgba(17, 24, 39, .75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(99, 102, 241, .12);
    border-radius: 18px;
    padding: 0;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
    /* Share the sidebar height; header stays fixed, body scrolls inside. */
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
}

.fd-widget:hover {
    border-color: var(--fd-glass-border-hover);
    box-shadow: 0 4px 20px rgba(var(--fd-accent-rgb), .06)
}

.fd-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .9rem .4rem;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    flex-shrink: 0;
}

.fd-widget-title {
    font-size: .8rem;
    font-weight: 700;
    color: var(--fd-text-primary);
    margin: 0;
    letter-spacing: .01em
}

.fd-widget-body {
    padding: .4rem .7rem .5rem;
    /* Fill the widget's flex share and scroll INSIDE it — never grows the card. */
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, .45) transparent;
}

.fd-widget-body::-webkit-scrollbar {
    width: 6px;
}

.fd-widget-body::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, .45);
    border-radius: 3px;
}

.fd-widget-body::-webkit-scrollbar-track {
    background: transparent;
}

/* The Style-DNA card carries the most essential content (axes + "full analysis"
   button), so give it a little more of the shared height than the list cards. */
.fd-widget-dna {
    flex-grow: 1.4;
}

.fd-widget-header-link {
    font-size: .72rem;
    font-weight: 600;
    color: #a5b4fc;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s
}

.fd-widget-header-link:hover {
    color: #c7d2fe
}

/* ── Trending Widget Items ── */
.fd-trending-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .25rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
    cursor: pointer
}

.fd-trending-item:hover {
    background: rgba(255, 255, 255, .04)
}

.fd-trending-item+.fd-trending-item {
    border-top: 1px solid rgba(255, 255, 255, .03)
}

.fd-trending-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(15, 23, 42, .5);
    border: 1px solid rgba(var(--fd-accent-rgb), .1)
}

.fd-trending-info {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0
}

.fd-trending-tag {
    font-size: .82rem;
    font-weight: 700;
    color: var(--fd-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.fd-trending-count {
    font-size: .7rem;
    color: var(--fd-text-secondary);
    font-weight: 500
}

/* ── Suggested Users Widget Items ── */
.fd-suggested-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .25rem;
    border-radius: 10px;
    transition: background .15s
}

.fd-suggested-item:hover {
    background: rgba(255, 255, 255, .04)
}

.fd-suggested-item+.fd-suggested-item {
    border-top: 1px solid rgba(255, 255, 255, .03)
}

.fd-suggested-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(15, 23, 42, .5);
    border: 2px solid rgba(var(--fd-accent-rgb), .15);
    cursor: pointer;
    transition: border-color .15s
}

.fd-suggested-avatar:hover {
    border-color: rgba(var(--fd-accent-rgb), .4)
}

.fd-suggested-info {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
    flex: 1
}

.fd-suggested-name {
    font-size: .82rem;
    font-weight: 700;
    color: var(--fd-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s
}

.fd-suggested-name:hover {
    color: #a5b4fc
}

.fd-suggested-desc {
    font-size: .7rem;
    color: var(--fd-text-secondary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.fd-suggested-follow-btn {
    flex-shrink: 0;
    padding: .4rem 1rem;
    border-radius: 99px;
    border: 1.5px solid rgba(var(--fd-accent-rgb), .35);
    background: transparent;
    color: #a5b4fc;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap
}

.fd-suggested-follow-btn:hover {
    background: rgba(var(--fd-accent-rgb), .18);
    border-color: rgba(var(--fd-accent-rgb), .5);
    transform: translateY(-1px)
}

.fd-suggested-follow-btn.following {
    background: linear-gradient(135deg, var(--fd-accent), var(--fd-accent-violet));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(var(--fd-accent-rgb), .25)
}

.fd-suggested-follow-btn.following:hover {
    opacity: .9;
    transform: translateY(-1px)
}

.fd-suggested-follow-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none
}

/* ── Style DNA Widget ── */
.fd-dna-layout {
    display: flex;
    gap: .75rem;
    align-items: center
}

.fd-dna-helix {
    flex-shrink: 0;
    width: 60px;
    height: 100px;
    opacity: .9
}

.fd-dna-helix svg {
    width: 100%;
    height: 100%
}

.fd-dna-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5rem
}

.fd-dna-item {
    display: flex;
    align-items: center;
    gap: .5rem
}

.fd-dna-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0
}

.fd-dna-name {
    font-size: .78rem;
    font-weight: 600;
    color: var(--fd-text-primary);
    flex: 1
}

.fd-dna-pct {
    font-size: .78rem;
    font-weight: 700;
    color: var(--fd-text-primary)
}

.fd-dna-link {
    display: block;
    margin-top: .65rem;
    font-size: .75rem;
    font-weight: 700;
    color: #a5b4fc;
    text-decoration: none;
    text-align: center;
    padding: .4rem 0;
    border-top: 1px solid rgba(255, 255, 255, .04);
    transition: color .15s
}

.fd-dna-link:hover {
    color: #c7d2fe
}

.fd-dna-cta {
    display: block;
    margin-top: .75rem;
    padding: .5rem 1rem;
    border-radius: 99px;
    background: linear-gradient(135deg, var(--fd-accent), var(--fd-accent-violet));
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(var(--fd-accent-rgb), .25)
}

.fd-dna-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--fd-accent-rgb), .4)
}

.fd-dna-empty {
    text-align: center;
    padding: .5rem 0
}

.fd-dna-empty-text {
    font-size: .82rem;
    font-weight: 600;
    color: var(--fd-text-secondary);
    margin: 0 0 .5rem
}

/* ── AI Recommendation Widget (3x2 Grid) ── */
.fd-ai-reco-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .25rem;
}

.fd-ai-reco-thumb {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1;
    display: block;
}

.fd-ai-reco-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s;
}

.fd-ai-reco-thumb:hover img {
    transform: scale(1.05);
}

.fd-ai-reco-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(124, 58, 237, .85);
    color: #fff;
    font-size: .45rem;
    font-weight: 700;
    padding: .05rem .2rem;
    border-radius: 3px;
}

/* Legacy single-card styles (kept for backward compat) */
.fd-ai-reco-card {
    display: flex;
    flex-direction: column;
    gap: .5rem
}

.fd-ai-reco-img {
    width: 100%;
    aspect-ratio: 3/2;
    max-height: 120px;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(15, 23, 42, .5);
    border: 1px solid rgba(var(--fd-accent-rgb), .1)
}

.fd-ai-reco-desc {
    font-size: .75rem;
    color: var(--fd-text-secondary);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.fd-ai-reco-btn {
    display: block;
    text-align: center;
    padding: .45rem .75rem;
    border-radius: 99px;
    background: linear-gradient(135deg, var(--fd-accent), var(--fd-accent-violet));
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(var(--fd-accent-rgb), .25)
}

.fd-ai-reco-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--fd-accent-rgb), .4)
}

/* ── Ambient Blobs ── */
.fd-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    animation: fdBgFadeIn 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fdBgFadeIn {
    to {
        opacity: 1;
    }
}

.fd-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .15
}

.fd-bg-blob--1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--fd-accent), transparent);
    top: -15%;
    left: -10%;
    animation: blobFloat 22s ease-in-out infinite
}

.fd-bg-blob--2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--fd-accent-pink), transparent);
    bottom: 5%;
    right: -8%;
    animation: blobFloat 22s ease-in-out infinite -8s
}

.fd-bg-blob--3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--fd-accent-violet), transparent);
    top: 35%;
    left: 45%;
    animation: blobFloat 22s ease-in-out infinite -15s
}

@keyframes blobFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1)
    }

    33% {
        transform: translate(30px, -25px) scale(1.05)
    }

    66% {
        transform: translate(-20px, 20px) scale(.95)
    }
}

/* ── Stories Bar ── */
.fd-stories {
    display: flex;
    gap: .75rem;
    padding: 1rem 1rem .75rem;
    overflow-x: auto;
    scrollbar-width: none
}

.fd-stories::-webkit-scrollbar {
    display: none
}

.fd-story {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
    width: 80px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent
}

.fd-story-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 3px;
    background: rgba(255, 255, 255, .06);
    transition: transform .2s
}

.fd-story:hover .fd-story-avatar {
    transform: scale(1.05)
}

.fd-story-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: rgba(15, 23, 42, .5)
}

/* Active story — gradient ring */
.fd-story--active .fd-story-avatar {
    background: linear-gradient(var(--fd-bg), var(--fd-bg)) padding-box,
        linear-gradient(135deg, var(--fd-accent), var(--fd-accent-pink)) border-box;
    border: 3px solid transparent
}

/* Own story — "+" overlay */
.fd-story--own .fd-story-add {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fd-accent), var(--fd-accent-violet));
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--fd-bg);
    box-shadow: 0 2px 6px rgba(var(--fd-accent-rgb), .35)
}

/* Truncated username */
.fd-story-name {
    font-size: .68rem;
    font-weight: 600;
    color: var(--fd-text-secondary);
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.fd-story:hover .fd-story-name {
    color: #e2e8f0
}

/* Placeholder / skeleton story slots */
.fd-story--placeholder .fd-story-avatar {
    background: rgba(255, 255, 255, .04)
}

.fd-story--placeholder .fd-story-avatar::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(255, 255, 255, .02) 25%, rgba(255, 255, 255, .06) 50%, rgba(255, 255, 255, .02) 75%);
    background-size: 200% 100%;
    animation: fdStoryShimmer 1.5s ease-in-out infinite
}

.fd-story--placeholder .fd-story-name {
    width: 48px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .04);
    overflow: hidden
}

.fd-story--placeholder .fd-story-name::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, .02) 25%, rgba(255, 255, 255, .06) 50%, rgba(255, 255, 255, .02) 75%);
    background-size: 200% 100%;
    animation: fdStoryShimmer 1.5s ease-in-out infinite
}

@keyframes fdStoryShimmer {
    0% {
        background-position: 200% 0
    }

    100% {
        background-position: -200% 0
    }
}

/* ── Create Post Prompt ── */
.fd-create-prompt {
    padding: .6rem .85rem;
    margin-bottom: .5rem;
    background: rgba(10, 10, 30, .6);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(139, 92, 246, .1);
    border-radius: 1rem;
    transition: all .2s;
    cursor: pointer;
}

.fd-create-prompt:hover {
    border-color: rgba(139, 92, 246, .25);
    box-shadow: 0 4px 16px rgba(139, 92, 246, .08)
}

.fd-create-prompt-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: inherit
}

.fd-create-prompt-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(99, 102, 241, .2);
    flex-shrink: 0
}

.fd-create-prompt-text {
    flex: 1;
    padding: .6rem 1rem;
    border-radius: 99px;
    border: 1.5px solid rgba(99, 102, 241, .1);
    background: rgba(15, 23, 42, .35);
    color: #94a3b8;
    font-size: .88rem;
    transition: all .2s
}

.fd-create-prompt:hover .fd-create-prompt-text {
    border-color: rgba(99, 102, 241, .3);
    background: rgba(15, 23, 42, .5);
    color: #e2e8f0
}

/* ── Tab Bar ── */
.fd-tabs {
    position: sticky;
    top: 72px;
    z-index: 20;
    background: rgba(17, 24, 39, .85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    border-radius: 0 0 16px 16px;
    padding: .5rem 1rem
}

.fd-tabs-inner {
    display: flex;
    gap: .25rem;
    justify-content: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 .5rem
}

.fd-tab {
    flex-shrink: 0;
    padding: .5rem 1.1rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--fd-text-secondary);
    cursor: pointer;
    border: none;
    background: none;
    border-radius: 99px;
    transition: all .2s;
    white-space: nowrap
}

.fd-tab:hover {
    color: var(--fd-text-primary);
    background: rgba(255, 255, 255, .06)
}

.fd-tab.is-active {
    color: #fff;
    background: var(--fd-accent);
    box-shadow: 0 2px 8px rgba(var(--fd-accent-rgb), .25)
}

/* ── Panels ── */
.fd-panels {
    margin: 0 auto;
    padding: 1rem .5rem 4rem
}

.fd-panel {
    display: none;
    animation: fdFadeUp .35s cubic-bezier(.16, 1, .3, 1)
}

.fd-panel.is-visible {
    display: block
}

@keyframes fdFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

/* ── Feed Grid (single column like Instagram) ── */
.fd-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem
}

/* ── Post Card ── */
.fd-card {
    position: relative;
    background: rgba(17, 24, 39, .6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all .3s cubic-bezier(.16, 1, .3, 1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .2)
}

.fd-card:hover {
    border-color: rgba(99, 102, 241, .25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25)
}

/* Card Header — author */
.fd-card-head {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .04)
}

.fd-card-author-wrap {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
    flex: 1
}

.fd-card-author-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap
}

.fd-card-meta-row {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    color: var(--fd-text-muted)
}

.fd-card-meta-row .fd-card-time {
    font-size: inherit;
    color: inherit
}

.fd-card-meta-row .fd-card-location {
    font-size: inherit;
    color: inherit
}

.fd-card-meta-row .fd-card-location::before {
    content: '·';
    margin-right: .35rem
}

.fd-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(var(--fd-accent-rgb), .25);
    background: var(--fd-glass-bg-alt);
    cursor: pointer;
    flex-shrink: 0
}

.fd-card-author {
    font-weight: 700;
    font-size: .85rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: color .15s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.fd-card-author:hover {
    color: #a5b4fc
}

.fd-card-time {
    font-size: .68rem;
    color: var(--fd-text-muted);
    flex-shrink: 0;
    white-space: nowrap
}

.fd-card-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--fd-text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all .15s;
    flex-shrink: 0
}

.fd-card-menu:hover {
    background: rgba(255, 255, 255, .06);
    color: var(--fd-text-primary)
}

.fd-card-type {
    font-size: .58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #a5b4fc;
    background: rgba(var(--fd-accent-rgb), .1);
    padding: .15rem .5rem;
    border-radius: 99px;
    margin-left: .3rem
}

/* AI Recommendation Badge */
.fd-card-ai-badge {
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: #f0abfc;
    background: linear-gradient(135deg, rgba(139, 92, 246, .15), rgba(236, 72, 153, .15));
    padding: .15rem .55rem;
    border-radius: 99px;
    white-space: nowrap;
    border: 1px solid rgba(236, 72, 153, .2)
}

/* Location Display */
.fd-card-location {
    font-size: .68rem;
    color: var(--fd-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px
}

/* Card Image */
.fd-card-img-wrap {
    position: relative;
    cursor: pointer;
    overflow: hidden
}

.fd-card-img {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    display: block;
    transition: transform .4s cubic-bezier(.16, 1, .3, 1)
}

.fd-card:hover .fd-card-img {
    transform: scale(1.02)
}

.fd-card-img-count {
    position: absolute;
    top: .6rem;
    right: .6rem;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
    padding: .2rem .55rem;
    border-radius: 99px;
    font-size: .68rem;
    font-weight: 700;
    color: #fff
}

/* ── Image Carousel ── */
.fd-carousel {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: rgba(17, 24, 39, .8)
}

.fd-carousel-track {
    display: flex;
    transition: transform .35s cubic-bezier(.16, 1, .3, 1);
    will-change: transform
}

.fd-carousel-slide {
    width: 100%;
    flex-shrink: 0;
    max-height: 600px;
    object-fit: contain;
    display: block
}

.fd-carousel-slide--video {
    background: #000;
    cursor: pointer;
}

/* Wrapper around the <video> — must behave exactly like a slide so the
   carousel translation and aspect-ratio rules still match. */
.fd-video-wrap {
    position: relative;
    width: 100%;
    flex-shrink: 0;
    display: block;
}

.fd-video-wrap>video.fd-carousel-slide--video {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    display: block;
}

.fd-video-mute {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(6px);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background .2s, transform .2s;
}

.fd-video-mute:hover {
    background: rgba(0, 0, 0, .8);
    transform: scale(1.08);
}

.fd-carousel-prev,
.fd-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background .2s, opacity .2s;
    opacity: .8
}

.fd-carousel-prev:hover,
.fd-carousel-next:hover {
    background: rgba(0, 0, 0, .7);
    opacity: 1
}

.fd-carousel-prev {
    left: .6rem
}

.fd-carousel-next {
    right: .6rem
}

.fd-carousel-prev[hidden],
.fd-carousel-next[hidden] {
    display: none
}

.fd-carousel-dots {
    position: absolute;
    bottom: .6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .35rem;
    z-index: 3
}

.fd-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
    transition: background .2s, transform .2s;
    cursor: pointer
}

.fd-carousel-dot.is-active {
    background: #fff;
    transform: scale(1.25)
}

.fd-carousel-counter {
    position: absolute;
    bottom: .6rem;
    right: .6rem;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
    padding: .2rem .55rem;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    z-index: 3
}

/* AI Style Score Badge */
.fd-card-ai-score {
    position: absolute;
    top: .6rem;
    right: .6rem;
    background: rgba(15, 23, 42, .7);
    backdrop-filter: blur(12px);
    padding: .5rem .75rem;
    border-radius: 12px;
    border: 1px solid rgba(var(--fd-accent-rgb), .25);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem
}

.fd-card-ai-score-label {
    font-size: .6rem;
    font-weight: 600;
    color: var(--fd-text-secondary);
    letter-spacing: .02em
}

.fd-card-ai-score-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #a78bfa;
    line-height: 1
}

/* Outfit Link Button */
.fd-card-outfit-link {
    position: absolute;
    bottom: .8rem;
    left: .8rem;
    background: rgba(15, 23, 42, .7);
    backdrop-filter: blur(10px);
    padding: .5rem .85rem;
    border-radius: 99px;
    font-size: .78rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    z-index: 3;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid rgba(255, 255, 255, .1)
}

.fd-card-outfit-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0
}

.fd-card-outfit-link:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 1), rgba(139, 92, 246, 1));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--fd-accent-rgb), .35)
}

/* When carousel has dots, push outfit link up to avoid overlap */
.fd-carousel-dots~.fd-card-outfit-link {
    bottom: 2rem
}

/* Product Tags on Image */
.fd-card-tag {
    position: absolute;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(8px);
    padding: .25rem .6rem;
    border-radius: 99px;
    font-size: .68rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    z-index: 2
}

.fd-card-tag:hover {
    background: rgba(var(--fd-accent-rgb), .8);
    transform: scale(1.05)
}

/* Card Body */
.fd-card-body {
    padding: .65rem 1rem .25rem
}

.fd-card-body-author {
    font-weight: 700;
    color: var(--fd-text-primary)
}

.fd-card-caption {
    font-size: .88rem;
    color: var(--fd-text-secondary);
    margin: 0;
    line-height: 1.5
}

.fd-card-text {
    font-size: .82rem;
    color: var(--fd-text-secondary);
    margin: 0;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden
}

/* Hashtag Links */
.fd-hashtag {
    color: #a5b4fc;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: color .15s, text-decoration .15s
}

.fd-hashtag:hover {
    color: #c7d2fe;
    text-decoration: underline
}

/* Card Actions */
.fd-card-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .6rem 1rem .75rem
}

/* Icon wrap for like/save circular backgrounds */
.fd-act-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all .2s
}

.fd-act-icon-wrap--like {
    background: rgba(244, 114, 182, .12)
}

.fd-act--liked .fd-act-icon-wrap--like {
    background: rgba(244, 114, 182, .2)
}

.fd-act-icon-wrap--save {
    background: rgba(129, 140, 248, .12)
}

.fd-act--saved .fd-act-icon-wrap--save {
    background: rgba(129, 140, 248, .2)
}

/* ── Comment Preview (inline on card) ── */
.fd-card-comments-preview {
    padding: .25rem 1rem .5rem;
    border-top: 1px solid rgba(255, 255, 255, .04)
}

.fd-card-comments-title {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    padding: .5rem 0 .35rem
}

.fd-mini-comment {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .4rem 0
}

.fd-mini-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(15, 23, 42, .5)
}

.fd-mini-comment-body {
    flex: 1;
    min-width: 0
}

.fd-mini-comment-top {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    flex-wrap: wrap
}

.fd-mini-comment-author {
    font-size: .8rem;
    font-weight: 700;
    color: var(--fd-text-primary);
    flex-shrink: 0
}

.fd-mini-comment-text {
    font-size: .8rem;
    color: var(--fd-text-secondary);
    line-height: 1.4
}

.fd-mini-comment-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .2rem
}

.fd-mini-comment-time {
    font-size: .68rem;
    color: var(--fd-text-muted)
}

.fd-mini-comment-reply {
    font-size: .68rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color .15s
}

.fd-mini-comment-reply:hover {
    color: var(--fd-text-secondary)
}

/* ── Inline Comment Input (on card) ── */
.fd-card-comment-input {
    display: flex;
    gap: .5rem;
    padding: .65rem 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, .04)
}

.fd-inline-comment {
    flex: 1;
    padding: .6rem .9rem;
    border: 1.5px solid rgba(var(--fd-accent-rgb), .1);
    border-radius: 99px;
    background: rgba(15, 23, 42, .35);
    color: #e2e8f0;
    font-size: .85rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s
}

.fd-inline-comment::placeholder {
    color: var(--fd-text-muted)
}

.fd-inline-comment:focus {
    border-color: rgba(var(--fd-accent-rgb), .4)
}

.fd-inline-comment-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--fd-accent), var(--fd-accent-violet));
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .15s;
    box-shadow: 0 2px 8px rgba(var(--fd-accent-rgb), .3)
}

.fd-inline-comment-send:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(var(--fd-accent-rgb), .4)
}

.fd-act {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .7rem;
    border: none;
    background: none;
    color: var(--fd-text-secondary);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 99px;
    transition: all .15s
}

.fd-act:hover {
    background: rgba(255, 255, 255, .06);
    color: #e2e8f0
}

.fd-act-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0
}

.fd-act--liked {
    color: #f472b6
}

.fd-act--saved {
    color: #818cf8
}

.fd-act-spacer {
    flex: 1
}

/* ── Share Toast & Tooltip ── */
.fd-share-toast {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(99, 102, 241, 0.9);
    color: #f1f5f9;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    animation: fd-toast-fade 2s ease forwards;
    z-index: 10;
}

@keyframes fd-toast-fade {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    70% {
        opacity: 1;
        transform: translateX(-50%) translateY(-4px);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }
}

.fd-share-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: #94a3b8;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(8px);
    z-index: 10;
    user-select: all;
    cursor: text;
}

/* ── Share Modal ── */
.fd-share-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fd-share-fadeIn .2s ease;
}

@keyframes fd-share-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fd-share-modal {
    background: #1a1f2e;
    border: 1px solid rgba(99, 102, 241, .2);
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
    animation: fd-share-slideUp .25s ease;
}

@keyframes fd-share-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fd-share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.fd-share-header h3 {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    color: #f1f5f9;
}

.fd-share-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .5);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

.fd-share-close:hover {
    background: rgba(255, 255, 255, .08);
    color: #f1f5f9;
}

.fd-share-copy-section {
    padding: .75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.fd-share-copy-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(15, 23, 42, .6);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 10px;
    padding: .5rem .75rem;
}

.fd-share-copy-row input {
    flex: 1;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: .78rem;
    outline: none;
    min-width: 0;
}

.fd-share-copy-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    padding: .4rem .75rem;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s;
}

.fd-share-copy-btn:hover {
    opacity: .85;
}

.fd-share-friends-section {
    padding: .75rem 1.25rem .5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fd-share-friends-title {
    font-size: .75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .5);
    margin-bottom: .5rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.fd-share-search {
    width: 100%;
    background: rgba(15, 23, 42, .6);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 8px;
    padding: .5rem .75rem;
    color: #f1f5f9;
    font-size: .8rem;
    outline: none;
    margin-bottom: .5rem;
    transition: border-color .15s;
}

.fd-share-search:focus {
    border-color: rgba(99, 102, 241, .4);
}

.fd-share-search::placeholder {
    color: rgba(255, 255, 255, .3);
}

.fd-share-friends-list {
    flex: 1;
    overflow-y: auto;
    max-height: 200px;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.fd-share-friend-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}

.fd-share-friend-item:hover {
    background: rgba(99, 102, 241, .08);
}

.fd-share-friend-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(99, 102, 241, .2);
}

.fd-share-friend-name {
    flex: 1;
    font-size: .82rem;
    font-weight: 600;
    color: #e2e8f0;
}

.fd-share-friend-send {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: #fff;
    font-size: .68rem;
    font-weight: 600;
    padding: .35rem .7rem;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}

.fd-share-friend-send:hover {
    opacity: .85;
    transform: scale(1.02);
}

.fd-share-friend-send.sent {
    background: rgba(16, 185, 129, .2);
    color: #34d399;
    pointer-events: none;
}

.fd-share-friends-empty {
    text-align: center;
    padding: 1rem;
    color: rgba(255, 255, 255, .3);
    font-size: .78rem;
}

.fd-share-external-section {
    padding: .75rem 1.25rem 1rem;
}

.fd-share-external-title {
    font-size: .75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .5);
    margin-bottom: .6rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.fd-share-external-grid {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.fd-share-ext-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    border-radius: 10px;
    transition: background .15s;
}

.fd-share-ext-btn:hover {
    background: rgba(255, 255, 255, .05);
}

.fd-share-ext-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.fd-share-ext-label {
    font-size: .65rem;
    color: rgba(255, 255, 255, .5);
    font-weight: 500;
}

.fd-share-ext-whatsapp .fd-share-ext-icon {
    background: #25d366;
    color: #fff;
}

.fd-share-ext-telegram .fd-share-ext-icon {
    background: #0088cc;
    color: #fff;
}

.fd-share-ext-twitter .fd-share-ext-icon {
    background: #1da1f2;
    color: #fff;
}

.fd-share-ext-facebook .fd-share-ext-icon {
    background: #1877f2;
    color: #fff;
}

/* ── Empty State ── */
.fd-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--fd-text-muted)
}

.fd-empty-icon {
    font-size: 3rem;
    margin-bottom: .5rem;
    opacity: .5
}

.fd-empty p {
    font-size: .9rem;
    margin: 0
}

/* ── Load More ── */
.fd-load-more {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 1.5rem auto 0;
    padding: .7rem 1.2rem;
    border-radius: 14px;
    border: 1.5px solid rgba(var(--fd-accent-rgb), .15);
    background: rgba(var(--fd-accent-rgb), .06);
    color: #a5b4fc;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    transition: all .2s
}

.fd-load-more:hover {
    background: rgba(var(--fd-accent-rgb), .12);
    border-color: rgba(var(--fd-accent-rgb), .3);
    transform: translateY(-1px)
}

/* ── Create Post FAB ── */
.fd-create-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 30;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--fd-accent), var(--fd-accent-violet));
    color: #fff;
    font-size: 1.6rem;
    font-weight: 300;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(var(--fd-accent-rgb), .4);
    transition: all .25s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1
}

.fd-create-fab--left {
    right: auto;
    left: 1.5rem
}

.fd-create-fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 36px rgba(var(--fd-accent-rgb), .5)
}

.fd-create-fab:active {
    transform: translateY(0) scale(.95)
}

/* ── Modal ── */
.fd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* Anchor to the top and use the DYNAMIC viewport height so the overlay's
       bottom edge lands on the visible viewport bottom — never behind the
       mobile browser's collapsing address/tool bar. Falls back to vh on
       browsers without dvh (desktop is unaffected: dvh == vh there). */
    height: 100vh;
    height: 100dvh;
    background: rgba(15, 23, 42, .7);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem
}

.fd-modal-overlay.is-open {
    display: flex
}

.fd-modal {
    background: linear-gradient(160deg, #1e293b, #1e1b4b);
    border: 1px solid rgba(var(--fd-accent-rgb), .15);
    border-radius: 1.25rem;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .4);
    animation: fdFadeUp .25s ease
}

.fd-modal--detail {
    max-width: 920px;
    height: min(88vh, 780px);
    display: flex;
    flex-direction: column;
    overflow: hidden
}

/* Instagram-style split: media left, self-scrolling comments column right */
.fd-modal--detail .fd-modal-body {
    padding: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden
}

.fd-detail-split {
    display: flex;
    height: 100%;
    min-height: 0
}

.fd-detail-media {
    flex: 1 1 58%;
    min-width: 0;
    background: #0b1020;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    padding: .4rem
}

.fd-detail-media .fd-detail-img {
    width: 100%;
    border-radius: .5rem;
    margin: 0 0 .4rem
}

.fd-detail-media .fd-detail-img:last-child {
    margin-bottom: 0
}

.fd-detail-side {
    flex: 1 1 42%;
    max-width: 390px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid rgba(var(--fd-accent-rgb), .1)
}

.fd-detail-side-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1.1rem 1.1rem .4rem
}

.fd-detail-side .fd-comment-input-row {
    margin-top: 0;
    padding: .7rem 1rem;
    border-top: 1px solid rgba(var(--fd-accent-rgb), .1);
    background: rgba(15, 23, 42, .45)
}

.fd-comments-empty {
    font-size: .82rem;
    color: #475569;
    text-align: center;
    padding: .5rem 0
}

/* Text-only posts: no media pane, single centred column */
.fd-detail-split--nomedia .fd-detail-side {
    flex: 1 1 100%;
    max-width: 560px;
    margin: 0 auto;
    border-left: none
}

.fd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.3rem;
    border-bottom: 1px solid rgba(var(--fd-accent-rgb), .1)
}

.fd-modal-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: var(--fd-text-primary)
}

.fd-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    color: var(--fd-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s
}

.fd-modal-close:hover {
    background: rgba(255, 255, 255, .06);
    color: var(--fd-text-primary)
}

.fd-modal-body {
    padding: 1.3rem
}

/* ── Create Form ── */
.fd-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: 1rem
}

.fd-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem
}

.fd-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--fd-text-secondary)
}

.fd-input,
.fd-textarea,
.fd-select {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid rgba(var(--fd-accent-rgb), .12);
    border-radius: .7rem;
    background: rgba(15, 23, 42, .4);
    color: #e2e8f0;
    font-size: .85rem;
    font-family: inherit;
    outline: none;
    transition: all .25s
}

.fd-input::placeholder,
.fd-textarea::placeholder {
    color: var(--fd-text-muted)
}

.fd-input:focus,
.fd-textarea:focus,
.fd-select:focus {
    border-color: rgba(var(--fd-accent-rgb), .5);
    background: rgba(15, 23, 42, .6);
    box-shadow: 0 0 0 3px rgba(var(--fd-accent-rgb), .1)
}

.fd-textarea {
    resize: vertical;
    min-height: 60px
}

.fd-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .7rem center
}

/* Upload area */
.fd-upload-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: 1.5rem;
    border: 2px dashed rgba(var(--fd-accent-rgb), .18);
    border-radius: 1rem;
    background: rgba(var(--fd-accent-rgb), .02);
    cursor: pointer;
    transition: all .2s;
    min-height: 100px
}

.fd-upload-area:hover {
    border-color: rgba(var(--fd-accent-rgb), .4);
    background: rgba(var(--fd-accent-rgb), .06)
}

.fd-upload-icon {
    font-size: 1.6rem;
    opacity: .5
}

.fd-upload-text {
    font-size: .78rem;
    color: var(--fd-text-muted);
    margin: 0
}

.fd-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer
}

.fd-upload-previews {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .5rem
}

.fd-upload-previews img {
    width: 72px;
    height: 72px;
    border-radius: .6rem;
    object-fit: cover;
    border: 2px solid rgba(var(--fd-accent-rgb), .2)
}

.fd-submit {
    width: 100%;
    padding: .8rem 1.4rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: .92rem;
    border: none;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--fd-accent), var(--fd-accent-violet));
    box-shadow: 0 4px 16px rgba(var(--fd-accent-rgb), .3);
    transition: all .25s;
    margin-top: .3rem
}

.fd-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(var(--fd-accent-rgb), .4)
}

/* ── Detail Modal ── */
.fd-detail-author {
    display: flex;
    align-items: center;
    gap: .5rem
}

.fd-detail-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(var(--fd-accent-rgb), .2);
    cursor: pointer;
    transition: border-color .15s
}

.fd-detail-avatar:hover {
    border-color: rgba(var(--fd-accent-rgb), .5)
}

.fd-detail-name {
    font-weight: 700;
    font-size: .88rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: color .15s
}

.fd-detail-name:hover {
    color: #a5b4fc
}

.fd-detail-img {
    width: 100%;
    border-radius: .8rem;
    margin-bottom: 1rem
}

.fd-detail-caption {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fd-text-primary);
    margin: 0 0 .3rem
}

.fd-detail-text {
    font-size: .88rem;
    color: var(--fd-text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem
}

.fd-detail-actions {
    display: flex;
    gap: .3rem;
    margin-bottom: 1.2rem
}

/* Comments */
.fd-comments-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--fd-text-muted);
    margin: 0 0 .6rem
}

.fd-comment {
    display: flex;
    gap: .5rem;
    padding: .5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .04)
}

.fd-comment:last-child {
    border: 0
}

.fd-comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(15, 23, 42, .5);
    cursor: pointer;
    transition: border-color .15s
}

.fd-comment-body {
    flex: 1;
    min-width: 0
}

.fd-comment-author {
    font-weight: 700;
    font-size: .78rem;
    color: #a5b4fc;
    cursor: pointer;
    transition: color .15s
}

.fd-comment-author:hover {
    color: #c7d2fe
}

.fd-comment-text {
    font-size: .82rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin: .1rem 0 0
}

.fd-comment-time {
    font-size: .65rem;
    color: var(--fd-text-muted);
    margin-top: .15rem
}

/* ── Premium comment meta + actions ── */
.fd-comment-meta {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: .15rem;
}

.fd-comment-edited {
    font-size: .62rem;
    color: var(--fd-text-muted);
    font-style: italic;
}

.fd-cmt-actions {
    display: flex;
    gap: .1rem;
    margin-top: .25rem;
    opacity: 0;
    transition: opacity .15s ease;
}

.fd-comment:hover>.fd-comment-body>.fd-cmt-actions,
.fd-comment-body:focus-within .fd-cmt-actions {
    opacity: 1;
}

@media (hover: none) {
    .fd-cmt-actions {
        opacity: 1;
    }

    /* always visible on touch */
}

.fd-cmt-act {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .68rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    padding: .15rem .4rem;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

.fd-cmt-act:hover {
    background: rgba(139, 92, 246, .12);
    color: #c4b5fd;
}

.fd-cmt-act--danger:hover {
    background: rgba(239, 68, 68, .12);
    color: #f87171;
}

/* Nested replies — indented rail */
.fd-comment-replies {
    margin-top: .5rem;
    padding-left: .85rem;
    border-left: 2px solid rgba(139, 92, 246, .18);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.fd-comment--reply .fd-comment-avatar {
    width: 26px;
    height: 26px;
}

/* Inline edit / reply boxes */
.fd-cmt-editbox,
.fd-cmt-replybox {
    display: flex;
    gap: .35rem;
    margin-top: .4rem;
    align-items: center;
}

.fd-cmt-input {
    flex: 1;
    min-width: 0;
    padding: .4rem .6rem;
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, .25);
    background: rgba(15, 12, 41, .6);
    color: #e2e8f0;
    font-size: .8rem;
}

.fd-cmt-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, .6);
}

.fd-cmt-save,
.fd-cmt-cancel {
    border: none;
    cursor: pointer;
    font-size: .72rem;
    font-weight: 700;
    padding: .4rem .7rem;
    border-radius: 10px;
    white-space: nowrap;
}

.fd-cmt-save {
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.fd-cmt-cancel {
    color: var(--fd-text-muted);
    background: rgba(255, 255, 255, .05);
}

/* Comment input */
.fd-comment-input-row {
    display: flex;
    gap: .4rem;
    margin-top: .6rem
}

.fd-comment-input {
    flex: 1;
    padding: .55rem .75rem;
    border: 1.5px solid rgba(var(--fd-accent-rgb), .1);
    border-radius: 99px;
    background: rgba(15, 23, 42, .35);
    color: #e2e8f0;
    font-size: .82rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s
}

.fd-comment-input:focus {
    border-color: rgba(var(--fd-accent-rgb), .4)
}

.fd-comment-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--fd-accent), var(--fd-accent-violet));
    color: #fff;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .15s
}

.fd-comment-send:hover {
    transform: scale(1.08)
}

/* ── Bottom Navigation Bar (hidden by default, shown on mobile) ── */
.fd-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: 60px;
    background: rgba(17, 24, 39, .85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, .06);
    align-items: center;
    justify-content: space-around;
    padding: 0 .5rem
}

.fd-bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    flex: 1;
    padding: .4rem 0;
    border: none;
    background: none;
    color: var(--fd-text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent
}

.fd-bottom-nav-btn:hover,
.fd-bottom-nav-btn.is-active {
    color: #a5b4fc
}

.fd-bottom-nav-icon {
    font-size: 1.25rem;
    line-height: 1
}

.fd-bottom-nav-label {
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .02em
}

.fd-bottom-nav-btn--create .fd-bottom-nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fd-accent), var(--fd-accent-violet));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(var(--fd-accent-rgb), .35)
}

/* ── Skeleton Loader ── */
@keyframes shimmer {
    0% {
        background-position: 200% 0
    }

    100% {
        background-position: -200% 0
    }
}

.fd-skeleton {
    background: var(--fd-glass-bg);
    backdrop-filter: var(--fd-glass-blur);
    -webkit-backdrop-filter: var(--fd-glass-blur);
    border: 1px solid rgba(var(--fd-accent-rgb), .08);
    border-radius: 1.25rem;
    overflow: hidden
}

.fd-skeleton-header {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem 1rem
}

.fd-skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0
}

.fd-skeleton-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite
}

.fd-skeleton-body {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .85rem 1rem
}

.fd-skeleton-line {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite
}

.fd-skeleton-line--short {
    width: 40%
}

.fd-skeleton-line--medium {
    width: 70%
}

/* ── End of Feed Message ── */
.fd-end-of-feed {
    text-align: center;
    padding: 2.5rem 1rem;
    font-size: .92rem;
    font-weight: 600;
    color: var(--fd-text-secondary);
    letter-spacing: .01em
}

/* ── Error Retry ── */
.fd-error-retry {
    text-align: center;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem
}

.fd-error-retry-text {
    font-size: .85rem;
    font-weight: 600;
    color: var(--fd-text-secondary);
    margin: 0
}

.fd-error-retry-btn {
    padding: .55rem 1.4rem;
    border-radius: 99px;
    border: 1.5px solid rgba(var(--fd-accent-rgb), .25);
    background: rgba(var(--fd-accent-rgb), .08);
    color: #a5b4fc;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s
}

.fd-error-retry-btn:hover {
    background: rgba(var(--fd-accent-rgb), .18);
    border-color: rgba(var(--fd-accent-rgb), .45);
    transform: translateY(-1px)
}

/* ── Responsive ── */
@media(max-width:1200px) {
    .fd-layout {
        grid-template-columns: 72px 1fr
    }

    .fd-sidebar-right {
        display: none
    }
}

@media(max-width:767px) {
    .fd-layout {
        grid-template-columns: 1fr
    }

    .fd-sidebar-left {
        display: none
    }

    .fd-center {
        padding: 0 12px
    }

    .fd-bottom-nav {
        display: flex
    }

    .fd-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-left: -12px;
        margin-right: -12px
    }

    .fd-card-img {
        border-radius: 0
    }

    .fd-create-fab--left {
        left: auto;
        right: 1rem;
        bottom: calc(60px + 1rem)
    }

    .fd-create-fab {
        bottom: calc(60px + 1rem);
        right: 1rem
    }
}

@media(max-width:640px) {
    .fd-panels {
        padding: .75rem .75rem 5rem
    }

    .fd-tabs-inner {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none
    }

    .fd-tabs-inner::-webkit-scrollbar {
        display: none
    }

    .fd-form-row {
        grid-template-columns: 1fr
    }

    .fd-modal {
        max-width: 100%;
        border-radius: 1rem 1rem 0 0;
        max-height: 95vh;
        margin-top: auto
    }

    /* Detail modal stacks on mobile: media on top (capped), comments fill the
       rest with their own scroll and a pinned composer. */
    .fd-modal--detail {
        max-width: 100%;
        height: 95vh;
        height: 95dvh
    }

    /* Keep the pinned composer clear of the phone's home indicator / gesture bar. */
    .fd-modal--detail .fd-detail-side .fd-comment-input-row {
        padding-bottom: calc(.7rem + env(safe-area-inset-bottom, 0px))
    }

    .fd-detail-split {
        flex-direction: column
    }

    .fd-detail-media {
        flex: 0 0 auto;
        max-height: 46vh
    }

    .fd-detail-side {
        max-width: none;
        flex: 1 1 auto;
        border-left: none;
        border-top: 1px solid rgba(var(--fd-accent-rgb), .1)
    }
}

/* ═══ POST MENU DROPDOWN ═══ */
.fd-post-menu {
    position: fixed;
    background: rgba(30, 41, 59, .97);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: .75rem;
    padding: .35rem 0;
    min-width: 150px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
    z-index: 1000
}

.fd-post-menu-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .55rem 1rem;
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: .82rem;
    cursor: pointer;
    transition: background .15s;
    text-align: left
}

.fd-post-menu-item:hover {
    background: rgba(99, 102, 241, .1)
}

/* ═══ REPORT MODAL ═══ */
.fd-modal--report {
    max-width: 380px
}

.fd-report-desc {
    font-size: .85rem;
    color: #94a3b8;
    margin: 0 0 1rem
}

.fd-report-reasons {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1.25rem
}

.fd-report-reason {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    background: rgba(15, 23, 42, .4);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: .5rem;
    cursor: pointer;
    transition: all .15s;
    font-size: .82rem;
    color: #e2e8f0
}

.fd-report-reason:hover {
    border-color: rgba(99, 102, 241, .3);
    background: rgba(99, 102, 241, .05)
}

.fd-report-reason input[type="radio"] {
    accent-color: var(--fd-accent, #6366f1);
    width: 16px;
    height: 16px
}

.fd-report-submit {
    width: 100%;
    padding: .6rem;
    border: none;
    border-radius: 99px;
    background: var(--fd-accent, #6366f1);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s
}

.fd-report-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, .3)
}

.fd-report-submit:disabled {
    opacity: .5;
    cursor: not-allowed
}

.fd-report-status {
    text-align: center;
    font-size: .82rem;
    margin-top: .75rem;
    font-weight: 600
}


/* ── Post content (detail text below caption) ── */
.fd-card-content {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 4px 0 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ── Product Mini-Card in Feed ── */
.fd-product-cards {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.fd-product-card {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .8rem;
    background: rgba(15, 23, 42, .4);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 10px;
    margin: 0 .8rem .4rem;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.fd-product-card:hover {
    background: rgba(99, 102, 241, .08);
    border-color: rgba(99, 102, 241, .3);
}

.fd-product-card-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.fd-product-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.fd-product-card-name {
    font-size: .75rem;
    font-weight: 600;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fd-product-card-price {
    font-size: .7rem;
    color: #a5b4fc;
    font-weight: 700;
}

.fd-product-card-btn {
    font-size: .68rem;
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.fd-product-card-btn:hover {
    color: #a78bfa;
}

/* ── Followed Sellers Products Widget ── */
.fd-sp-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .3rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background .12s;
}

.fd-sp-item:hover {
    background: rgba(99, 102, 241, .06);
}

.fd-sp-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(99, 102, 241, .12);
}

.fd-sp-info {
    display: flex;
    flex-direction: column;
    gap: .05rem;
    min-width: 0;
}

.fd-sp-name {
    font-size: .72rem;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fd-sp-seller {
    font-size: .62rem;
    color: rgba(255, 255, 255, .35);
}

.fd-sp-price {
    font-size: .7rem;
    font-weight: 700;
    color: #a5b4fc;
}

/* ── Product Tagging Field in Create Post ── */
.fd-field--seller-only .fd-select {
    background: rgba(15, 23, 42, .6);
    border: 1px solid rgba(99, 102, 241, .15);
    border-radius: 10px;
    padding: .6rem .85rem;
    color: #f1f5f9;
    font-size: .85rem;
    width: 100%;
}


/* ── Composer product tag picker (Feed + Profile) ── */
.fd-tag-list {
    margin-top: .55rem;
    max-height: 200px;
    overflow-y: auto;
    background: rgba(15, 15, 25, .55);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: .35rem;
}

.fd-tag-list::-webkit-scrollbar {
    width: 8px;
}

.fd-tag-list::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, .35);
    border-radius: 8px;
}

.fd-tag-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .45rem .55rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease;
}

.fd-tag-item:hover {
    background: rgba(167, 139, 250, .08);
}

.fd-tag-item.is-selected {
    background: rgba(167, 139, 250, .15);
}

.fd-tag-check {
    width: 16px;
    height: 16px;
    accent-color: #a78bfa;
    flex-shrink: 0;
}

.fd-tag-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(255, 255, 255, .04);
    flex-shrink: 0;
}

.fd-tag-thumb--empty {
    display: inline-block;
}

.fd-tag-name {
    flex: 1;
    color: #f1f5f9;
    font-size: .85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fd-tag-price {
    color: #c4b5fd;
    font-size: .78rem;
    font-weight: 600;
    flex-shrink: 0;
}

.fd-tag-empty {
    padding: .8rem;
    text-align: center;
    color: #94a3b8;
    font-size: .82rem;
}

.fd-tag-selected {
    margin-top: .55rem;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.fd-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .55rem .3rem .65rem;
    background: linear-gradient(135deg, rgba(167, 139, 250, .2), rgba(236, 72, 153, .14));
    border: 1px solid rgba(167, 139, 250, .35);
    border-radius: 999px;
    color: #f1f5f9;
    font-size: .78rem;
    font-weight: 600;
}

.fd-tag-chip-x {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, .7);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 .15rem;
    border-radius: 50%;
    transition: background .15s ease;
}

.fd-tag-chip-x:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}


/* ── Confirm Modal (delete, etc.) ── */
.fd-modal--confirm {
    max-width: 420px;
}

.fd-confirm-desc {
    margin: 0 0 1.25rem 0;
    color: var(--fd-text-secondary);
    font-size: .9rem;
    line-height: 1.5;
}

.fd-confirm-actions {
    display: flex;
    gap: .6rem;
    justify-content: flex-end;
}

.fd-confirm-cancel,
.fd-confirm-ok {
    padding: .55rem 1.1rem;
    border-radius: .6rem;
    border: none;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

.fd-confirm-cancel {
    background: rgba(255, 255, 255, .06);
    color: var(--fd-text-primary);
    border: 1px solid rgba(255, 255, 255, .08);
}

.fd-confirm-cancel:hover {
    background: rgba(255, 255, 255, .12);
}

.fd-confirm-ok {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 6px 18px rgba(220, 38, 38, .35);
}

.fd-confirm-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(220, 38, 38, .45);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE FEED — proper cards, even gutters
   Appended last so it supersedes the 767px / 640px blocks above.
   Desktop and tablet are untouched.

   What was wrong:
     • the 767px block deliberately stripped the card: border-radius:0, no side
       borders, and margin-left/right:-12px to bleed past .fd-center's padding
     • but at <=640px .fd-panels adds another .75rem of padding, so the card
       pulled back only 12px of a 24px inset — it ended up neither a card nor
       full-bleed, sitting off-centre with hard square corners
     • .fd-panels' 4-5rem bottom padding did not account for the 60px fixed
       bottom nav plus the iOS home indicator
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* ── One single source of horizontal gutter ──
          .fd-center handles vertical rhythm only; .fd-panels owns the gutter,
          so the card can never be inset by two stacked paddings again. */
    .fd-center {
        padding: 10px 0 0;
        max-width: 560px;
        margin-inline: auto;
    }

    .fd-panels {
        max-width: 560px;
        margin-inline: auto;
        /* 60px nav + breathing room + home indicator */
        padding: 10px 14px calc(60px + 24px + env(safe-area-inset-bottom, 0px));
    }

    /* ── Restore the card ──
          Undo the full-bleed overrides: soft corners, hairline on all four
          sides, and no negative margins. */
    .fd-card {
        margin-left: 0;
        margin-right: 0;
        border: 1px solid rgba(129, 118, 220, .18);
        border-radius: 18px;
        box-shadow:
            0 10px 26px rgba(0, 0, 0, .3),
            0 1px 2px rgba(0, 0, 0, .2);
    }

    /* The card clips with overflow:hidden, so the media needs no radius of its
       own. Feed media is .fd-carousel-slide (renderSlide in feed.js);
       .fd-card-img is the legacy single-image class — cover both. */
    .fd-card-img,
    .fd-carousel-slide {
        border-radius: 0;
        /* Cap the height so one tall portrait post cannot fill the whole
           viewport; `contain` is kept so nothing gets cropped. */
        max-height: 58vh;
    }

    .fd-carousel {
        background: rgba(255, 255, 255, .02);
    }

    .fd-grid {
        gap: 14px;
    }

    /* ── Even internal padding on every row of the card ── */
    .fd-card-head {
        padding: .7rem .85rem;
    }

    .fd-card-actions {
        padding: .55rem .85rem .6rem;
        gap: .3rem;
    }

    .fd-card-body {
        padding: .5rem .85rem .3rem;
    }

    .fd-card-caption {
        font-size: .85rem;
        line-height: 1.45;
    }

    /* ── Comment row: aligned with the rest of the card ──
          .fd-card-comment-input is the flex row; .fd-inline-comment is the field. */
    .fd-card-comment-input {
        padding: .6rem .85rem .8rem;
        gap: .45rem;
    }

    .fd-inline-comment {
        min-height: 42px;
        /* 16px stops iOS Safari zooming the page on focus. */
        font-size: 16px;
    }

    .fd-comment-send {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }

    /* ── Tab rail: aligned to the same gutter as the cards ── */
    .fd-tabs-inner {
        padding-left: 14px;
        padding-right: 14px;
        gap: .4rem;
    }

    /* ── FABs clear the bottom nav and the home indicator ── */
    .fd-create-fab,
    .fd-create-fab--left {
        bottom: calc(60px + 16px + env(safe-area-inset-bottom, 0px));
        right: 14px;
        left: auto;
    }

    .fd-bottom-nav {
        height: calc(60px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

@media (max-width: 400px) {
    .fd-panels {
        padding-left: 10px;
        padding-right: 10px;
    }

    .fd-card {
        border-radius: 16px;
    }

    .fd-card-head,
    .fd-card-actions,
    .fd-card-body,
    .fd-card-comment-input {
        padding-left: .7rem;
        padding-right: .7rem;
    }

    .fd-tabs-inner {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT TAGS — keep them inside the image
   Tags are absolutely positioned from percentages the author picked while
   looking at a desktop-sized photo, and the pill is `white-space: nowrap`.
   On a 360px-wide image a label like "The Way-High AZN 150.00" is ~190px, so
   any tag placed past ~45% ran off the edge and got clipped by the card's
   overflow:hidden. The JS clamp in feed.js repositions them; these rules cap
   the width so a very long product name degrades to an ellipsis instead of
   forcing the clamp to shove the pill to the far left.
   ═══════════════════════════════════════════════════════════════════════════ */
.fd-card-tag {
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
    /* The pill is inline by default; block-level sizing is needed for max-width
       and ellipsis to take effect together with nowrap. */
    display: block;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .fd-card-tag {
        font-size: .64rem;
        padding: .22rem .5rem;
        max-width: calc(100% - 12px);
        /* Softer plate so it stays readable over light product photos. */
        background: rgba(8, 6, 20, .78);
        box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEED — mobile premium pass (max-width 767px)
   • Use the shared global bottom nav instead of the feed's own emoji bar
   • Tabs: all in one row, no horizontal scroll, evenly sized
   • Lighter header spacing tuned for the feed
   • More modern card sizing
   Desktop/tablet untouched.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* ── Retire the feed's own bottom bar; the global .as-bottomnav takes over ── */
    .fd-bottom-nav {
        display: none !important;
    }

    /* ── Top gap fix ──
          `body` already has padding-top:72px to clear the fixed nav, and .fd's
          base -72/+72 trick nets that back to a correct 72px. A previous edit
          set margin-top:0 which STACKED another 62px → a huge empty band.
          Restore the cancel and tighten to an 8pt-clean offset. */
    .fd {
        margin-top: -72px;
        /* floating pill header bottom ~66px → clear it with a small gap */
        padding-top: 72px;
    }

    /* The header pill is `.as-nav { width:95% }` of the viewport. The feed sat
       inside `.fd-layout { width:92% }`, so a 95% inner width was really 95% of
       92% ≈ 87% — narrower than the header. Make the layout itself 95% and let
       the center column fill it, so both share the exact same edges. */
    .fd-layout {
        width: 95%;
        max-width: 560px;
        margin: 0 auto;
    }

    .fd-center {
        padding-top: 8px;
        width: 100%;
        max-width: none;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .fd-panels {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: calc(64px + 24px + env(safe-area-inset-bottom, 0px));
    }

    .fd-tabs-inner {
        display: flex;
        gap: 6px;
        max-width: 100%;
        overflow: visible;
    }

    .fd-tabs-inner::-webkit-scrollbar {
        display: none;
    }

    .fd-tab {
        flex: 1 1 0;
        min-width: 0;
        padding: .5rem .3rem;
        font-size: .78rem;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-radius: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

    /* Emoji glyphs eat width; the labels alone read cleaner at 4-across. The
       leading emoji is a text node, so shrink it rather than remove markup. */
    .fd-tab {
        font-size: 0;
    }

    .fd-tab span {
        font-size: .78rem;
    }

    /* ── Create-prompt: a touch tighter ── */
    .fd-create-prompt {
        margin: 10px 0;
    }

    /* ── Modern card sizing ── */
    .fd-card {
        border-radius: 20px;
    }

    .fd-card-head {
        padding: .8rem .9rem .5rem;
    }

    .fd-card-actions {
        padding: .4rem .9rem .5rem;
    }

    .fd-card-body {
        padding: .3rem .9rem .5rem;
    }

    .fd-card-comment-input {
        padding: .55rem .9rem .85rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEED — PREMIUM MOBILE REDESIGN  (max-width 767px only)
   Segmented tabs, premium composer, refined cards, 8pt spacing.
   Appended last so it is authoritative over the legacy feed rules.
   Desktop/tablet untouched.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* ── Composer card ── */
    .fd-create-prompt {
        margin: 0 0 12px;
        padding: 12px;
        border-radius: 20px;
        background: rgba(20, 18, 44, .6);
        border: 1px solid rgba(139, 92, 246, .16);
        box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
        backdrop-filter: blur(16px) saturate(160%);
        -webkit-backdrop-filter: blur(16px) saturate(160%);
    }

    .fd-create-prompt-link {
        gap: 12px;
    }

    .fd-create-prompt-avatar {
        width: 44px;
        height: 44px;
        border: 2px solid rgba(139, 92, 246, .35);
    }

    .fd-create-prompt-text {
        padding: 12px 16px;
        font-size: .9rem;
        border-radius: 14px;
        border: 1px solid rgba(139, 92, 246, .14);
        background: rgba(10, 10, 30, .5);
        color: rgba(180, 188, 208, .85);
    }

    /* ── Segmented control tabs ── */
    .fd-tabs {
        position: static;
        top: auto;
        background: none;
        border: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0 0 12px;
        box-shadow: none;
    }

    .fd-tabs-inner {
        display: flex;
        gap: 4px;
        max-width: 100%;
        overflow: visible;
        padding: 4px;
        border-radius: 14px;
        background: rgba(255, 255, 255, .04);
        border: 1px solid rgba(139, 92, 246, .16);
    }

    .fd-tab {
        flex: 1 1 0;
        min-width: 0;
        padding: 9px 4px;
        border-radius: 10px;
        font-size: 0;
        font-weight: 700;
        color: rgba(180, 188, 208, .8);
        background: none;
        transition: color .2s ease, background .25s ease, box-shadow .25s ease;
    }

    .fd-tab span {
        font-size: .8rem;
        letter-spacing: -.01em;
    }

    .fd-tab.is-active {
        color: #fff;
        background: linear-gradient(135deg, #7c3aed, #a855f7);
        box-shadow: 0 4px 14px rgba(124, 58, 237, .4);
    }

    /* ── Post card ── */
    .fd-card {
        border-radius: 22px;
        border: 1px solid rgba(139, 92, 246, .14);
        background: rgba(18, 18, 42, .55);
        box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
        margin-bottom: 0;
    }

    /* Equal, tighter spacing between cards. */
    .fd-grid {
        gap: 12px;
    }

    /* Header row: bigger avatar, clear name/time hierarchy */
    .fd-card-head {
        padding: 14px 16px 10px;
        gap: 12px;
    }

    .fd-card-head .fd-card-avatar,
    .fd-card-head img:first-of-type {
        width: 42px;
        height: 42px;
    }

    .fd-card-author-wrap .fd-card-author,
    .fd-card-body-author {
        font-size: .95rem;
        font-weight: 700;
    }

    .fd-card-time {
        font-size: .72rem;
        color: rgba(148, 163, 184, .8);
    }

    /* Action row: evenly spaced, save pushed right by the existing spacer */
    .fd-card-actions {
        padding: 8px 12px;
        gap: 4px;
    }

    .fd-act {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 7px 10px;
        border-radius: 12px;
        font-size: .8rem;
    }

    .fd-act-icon {
        width: 22px;
        height: 22px;
    }

    /* Caption */
    .fd-card-body {
        padding: 4px 16px 12px;
    }

    .fd-card-caption {
        font-size: .9rem;
        line-height: 1.5;
        color: rgba(226, 232, 240, .92);
    }

    /* Comment input */
    .fd-card-comment-input {
        padding: 0 16px 16px;
        gap: 8px;
    }

    .fd-inline-comment {
        min-height: 44px;
        font-size: 16px;
        border-radius: 14px;
        padding: 0 16px;
        background: rgba(10, 10, 30, .5);
        border: 1px solid rgba(139, 92, 246, .14);
    }

    .fd-comment-send {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
    }
}

/* ── Edit-post modal (dynamic) ── */
.fd-edit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .8);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 1rem;
}

.fd-edit-modal {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(180deg, #1e1b4b, #14122b);
    border: 1px solid rgba(139, 92, 246, .2);
    border-radius: 18px;
    padding: 1.4rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.fd-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.fd-edit-head h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #e0e7ff;
    font-weight: 700;
}

.fd-edit-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.fd-edit-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .4rem;
}

.fd-edit-textarea {
    width: 100%;
    padding: .75rem .9rem;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, .25);
    background: rgba(10, 7, 28, .7);
    color: #e2e8f0;
    font-size: .9rem;
    resize: vertical;
    min-height: 90px;
}

.fd-edit-textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, .6);
}

.fd-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    margin-top: 1.1rem;
}

.fd-edit-cancel,
.fd-edit-save {
    border: none;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 700;
    padding: .6rem 1.1rem;
    border-radius: 12px;
}

.fd-edit-cancel {
    color: #94a3b8;
    background: rgba(255, 255, 255, .05);
}

.fd-edit-save {
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.fd-edit-save:disabled {
    opacity: .5;
    cursor: not-allowed;
}