/* ============================================================
   SOCIAL FEED — LinkedIn-Style 3-Column Layout
   ============================================================ */

/* ── ROOT GRID ─────────────────────────────────────────────── */
.lf-root {
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 1.25rem;
    max-width: 1180px;
    margin: 2rem auto;
    padding: 0 1rem;
    align-items: start;
}

/* ── CARD BASE ───────────────────────────────────────────────── */
.lf-card {
    background: var(--surface, #fff);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: var(--radius-xl, 16px);
    overflow: hidden;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.lf-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.lf-card-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem 0.5rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.lf-see-all {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}
.lf-see-all:hover { text-decoration: underline; }

/* ── SKELETON ───────────────────────────────────────────────── */
.lf-skel {
    height: 14px;
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: lf-shimmer 1.4s infinite;
    border-radius: 6px;
    margin: 0.75rem 1rem;
}
@keyframes lf-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── LEFT — PROFILE CARD ─────────────────────────────────────── */
.lf-profile-card {
    padding: 0;
    text-align: center;
}

.lf-profile-banner {
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary, #8b5cf6));
}

.lf-profile-avatar {
    margin: -28px auto 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid var(--surface, #fff);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
}

.lf-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.lf-avatar-init {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.lf-profile-info { padding: 0.5rem 1rem 0; }
.lf-profile-name { font-size: 0.95rem; font-weight: 700; margin: 0 0 0.2rem; }
.lf-profile-bio  { font-size: 0.78rem; color: var(--gray-600); margin: 0 0 0.25rem; }
.lf-profile-loc  { font-size: 0.75rem; color: var(--gray-500); margin: 0; }
.lf-profile-loc i { margin-right: 3px; }

.lf-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin-top: 0.75rem;
}

.lf-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0;
    border-right: 1px solid var(--gray-100);
}
.lf-stat:last-child { border-right: none; }

.lf-stat-num {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}
.lf-stat-lbl {
    font-size: 0.67rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lf-view-profile-btn {
    display: block;
    margin: 0.75rem auto 1rem;
    width: calc(100% - 2rem);
    text-align: center;
    text-decoration: none;
}

/* ── LEFT — QUICK LINKS ──────────────────────────────────────── */
.lf-quick-links { padding: 0.5rem 0; }

.lf-quick-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: background 0.15s;
}
.lf-quick-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}
.lf-quick-item i { width: 16px; text-align: center; }

.lf-quick-create {
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.25rem;
    border-top: 1px solid var(--gray-100);
    padding-top: 0.65rem;
}

/* ── MINI LIST (shared) ──────────────────────────────────────── */
.lf-mini-list { padding: 0.4rem 0; }

.lf-mini-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--gray-700);
    transition: background 0.15s;
}
.lf-mini-item:hover { background: var(--gray-50); color: var(--primary); }

.lf-mini-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.lf-mini-label {
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lf-mini-stat {
    font-size: 0.72rem;
    color: var(--gray-500);
}

.lf-mini-cta {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* ── CENTER — STORIES STRIP ──────────────────────────────────── */
.lf-stories-strip { padding: 0.75rem 1rem; }

.lf-stories-row {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.lf-stories-row::-webkit-scrollbar { display: none; }

.lf-story-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    flex-shrink: 0;
}

.lf-story-ring {
    width: 56px; height: 56px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary, #8b5cf6), #f59e0b);
}

.lf-story-avatar, .lf-story-avatar-init {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface, #fff);
}

.lf-story-avatar-init {
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem;
    background: var(--primary); color: #fff;
}

.lf-story-name {
    font-size: 0.7rem;
    color: var(--gray-600);
    max-width: 56px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── CENTER — TABS ───────────────────────────────────────────── */
.lf-feed-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
    flex-wrap: wrap;
}

.lf-tab {
    padding: 0.45rem 0.85rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-full, 99px);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}
.lf-tab:hover  { background: var(--gray-100); color: var(--gray-800); }
.lf-tab.active { background: var(--primary); color: #fff; }

/* ── CENTER — FEED CARD ──────────────────────────────────────── */
.lf-feed-card {
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s, transform 0.2s;
}
.lf-feed-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); }

.lf-feed-card-achievement {
    border-left: 4px solid var(--success, #22c55e);
    background: linear-gradient(135deg, var(--surface), rgba(34,197,94,0.04));
}

.lf-fc-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.lf-feed-avatar, .lf-feed-avatar-init {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.lf-feed-avatar-init {
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-100, rgba(99,102,241,.15));
    color: var(--primary); font-weight: 700;
}

.lf-fc-type-badge {
    position: absolute;
    bottom: -3px; right: -3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid var(--surface, #fff);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.55rem;
    color: #fff;
}

.lf-fc-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.lf-fc-name   { font-weight: 700; font-size: 0.9rem; color: var(--gray-900); }
.lf-fc-action { font-size: 0.85rem; color: var(--gray-600); }
.lf-fc-time   { font-size: 0.75rem; color: var(--gray-500); }
.lf-fc-time i { margin-right: 3px; }

.lf-fc-target {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius-md, 8px);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: background 0.15s;
}
.lf-fc-target:hover { background: var(--gray-100); }

.lf-fc-achievement-banner {
    margin-top: 0.6rem;
    padding: 0.4rem 0.75rem;
    background: rgba(34,197,94,0.1);
    border-radius: 8px;
    font-size: 0.82rem;
    color: #166534;
    font-weight: 500;
}

.lf-fc-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--gray-100);
}

.lf-fc-action-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.4rem;
    border-radius: var(--radius-md, 8px);
    font-size: 0.8rem;
    color: var(--gray-500);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    gap: 0.4rem;
    transition: all 0.15s;
}
.lf-fc-action-btn:hover { background: var(--gray-100); color: var(--primary); }

/* ── CENTER — LOADING / EMPTY / MORE ─────────────────────────── */
.lf-spinner-wrap {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
}
.lf-spinner { color: var(--primary); font-size: 1.5rem; }

.lf-empty {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem;
    gap: 0.75rem;
}
.lf-empty h3 { font-size: 1.1rem; margin: 0; }
.lf-empty p  { color: var(--gray-500); font-size: 0.9rem; margin: 0; }
.lf-empty-icon {
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--gray-100);
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-400); font-size: 1.5rem;
}

.lf-load-more { text-align: center; padding: 1rem 0; }

/* ── RIGHT — SUGGESTED PEOPLE ────────────────────────────────── */
.lf-suggest-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
}

.lf-suggest-avatar, .lf-suggest-avatar-init {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.lf-suggest-avatar-init {
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 0.85rem;
}

.lf-suggest-info { flex: 1; min-width: 0; }
.lf-suggest-name {
    font-size: 0.83rem; font-weight: 600;
    color: var(--gray-800); text-decoration: none;
    display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lf-suggest-name:hover { color: var(--primary); }
.lf-suggest-bio {
    font-size: 0.72rem; color: var(--gray-500);
    margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.lf-btn-follow {
    flex-shrink: 0;
    padding: 0.3rem 0.7rem;
    border: 1.5px solid var(--primary);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.15s;
}
.lf-btn-follow:hover { background: var(--primary); color: #fff; }

/* ── RIGHT — PROMO CARD ──────────────────────────────────────── */
.lf-promo-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary, #8b5cf6));
    border: none;
}

.lf-promo-inner { padding: 1.25rem; }

.lf-promo-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
}

.lf-promo-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.4rem;
}
.lf-promo-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    margin: 0 0 0.8rem;
}
.lf-promo-btn {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}
.lf-promo-btn:hover { background: rgba(255,255,255,0.35); }

/* ── SHARED BUTTONS ──────────────────────────────────────────── */
.lf-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.lf-btn-primary:hover { background: var(--primary-dark, #4338ca); transform: translateY(-1px); }

.lf-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background: transparent;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.lf-btn-outline:hover { background: var(--primary); color: #fff; }

/* ── DARK MODE ───────────────────────────────────────────────── */
[data-theme="dark"] .lf-card {
    background: var(--gray-100, #1f2937);
    border-color: var(--gray-200, #374151);
}
[data-theme="dark"] .lf-card-hdr { border-color: var(--gray-200); }
[data-theme="dark"] .lf-quick-item:hover,
[data-theme="dark"] .lf-mini-item:hover { background: var(--gray-200); }
[data-theme="dark"] .lf-fc-target { background: var(--gray-200); color: var(--gray-800); }
[data-theme="dark"] .lf-fc-target:hover { background: var(--gray-300); }
[data-theme="dark"] .lf-fc-actions { border-color: var(--gray-200); }
[data-theme="dark"] .lf-fc-action-btn:hover { background: var(--gray-200); }
[data-theme="dark"] .lf-story-ring { border-color: var(--gray-100); }
[data-theme="dark"] .lf-fc-achievement-banner { background: rgba(34,197,94,0.15); color: #86efac; }
[data-theme="dark"] .lf-empty-icon { background: var(--gray-200); color: var(--gray-400); }
[data-theme="dark"] .lf-skel { background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%); background-size: 200% 100%; }
[data-theme="dark"] .lf-profile-banner { background: linear-gradient(135deg, var(--primary-dark, #4338ca), #6d28d9); }
[data-theme="dark"] .lf-fc-type-badge { border-color: var(--gray-100); }
[data-theme="dark"] .lf-profile-avatar { border-color: var(--gray-100); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */

/* Tablet: hide right sidebar inline, show as 2-col below main */
@media (max-width: 1024px) {
    .lf-root {
        grid-template-columns: 220px 1fr;
        grid-template-areas:
            "left center"
            "left right";
    }
    .lf-left   { grid-area: left; }
    .lf-center { grid-area: center; }
    .lf-right  {
        grid-area: right;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .lf-right .lf-card { margin-bottom: 0; }
}

/* Mobile: single column, sidebars off-screen, drawer system */
@media (max-width: 768px) {
    .lf-root {
        grid-template-columns: 1fr;
        grid-template-areas: "center";
        margin: 0;
        padding: 0;
        gap: 0;
    }

    /* Hide desktop sidebars completely — they're in drawers on mobile */
    .lf-left,
    .lf-right {
        display: none !important;
    }

    /* Mobile top bar */
    .lf-mobile-bar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        background: var(--surface, #fff);
        border-bottom: 1px solid var(--gray-200, #e5e7eb);
        position: sticky;
        top: 0;
        z-index: 100;
        gap: 8px;
    }

    .lf-mob-title {
        font-weight: 700;
        font-size: 1rem;
        color: var(--text-main, #111);
        letter-spacing: -0.02em;
        flex: 1;
        text-align: center;
    }

    .lf-mob-btn {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        border: 1px solid var(--gray-200, #e5e7eb);
        background: var(--bg-card, #fff);
        color: var(--text-main, #111);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1rem;
        transition: background 0.15s, color 0.15s;
    }

    .lf-mob-btn:hover,
    .lf-mob-btn:active {
        background: var(--primary, #6366f1);
        color: #fff;
        border-color: var(--primary, #6366f1);
    }

    /* Feed center: full width, no extra padding */
    .lf-center {
        grid-area: center;
        padding: 0;
    }
}

/* Hide mobile bar on desktop */
@media (min-width: 769px) {
    .lf-mobile-bar { display: none !important; }
}

/* ── MOBILE DRAWER SYSTEM ────────────────────────────────────── */

/* Backdrop */
.lf-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(2px);
}

.lf-drawer-backdrop.lf-backdrop-visible {
    display: block;
    opacity: 1;
}

/* Drawer base */
.lf-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    width: min(320px, 85vw);
    z-index: 9999;
    background: var(--surface, #fff);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.32, 0, 0.15, 1);
    box-shadow: 0 0 40px rgba(0,0,0,0.18);
}

/* Left drawer slides from the left */
.lf-drawer-left {
    left: 0;
    border-radius: 0 20px 20px 0;
    transform: translateX(-100%);
}

/* Right drawer slides from the right */
.lf-drawer-right {
    right: 0;
    border-radius: 20px 0 0 20px;
    transform: translateX(100%);
}

/* Open state */
.lf-drawer.lf-drawer-open {
    transform: translateX(0);
}

/* Drawer header */
.lf-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200, #e5e7eb);
    flex-shrink: 0;
}

.lf-drawer-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main, #111);
    display: flex;
    align-items: center;
}

.lf-drawer-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--gray-200, #e5e7eb);
    background: transparent;
    color: var(--text-secondary, #6b7280);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
    flex-shrink: 0;
}

.lf-drawer-close:hover {
    background: var(--gray-100, #f3f4f6);
    color: var(--text-main, #111);
}

/* Drawer body */
.lf-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

/* Drawer profile card mini */
.lf-drawer-profile {
    padding: 20px;
    text-align: center;
    border-radius: 16px;
    margin-bottom: 0;
}

/* Dark mode for drawers */
[data-theme="dark"] .lf-drawer {
    background: var(--bg-card, #1e1e2e);
    border-color: var(--gray-200);
}

[data-theme="dark"] .lf-drawer-header {
    border-color: var(--gray-200);
}

[data-theme="dark"] .lf-mob-btn {
    background: var(--bg-card, #1e1e2e);
    border-color: var(--gray-200);
    color: var(--text-main);
}

[data-theme="dark"] .lf-mobile-bar {
    background: var(--bg-card, #1e1e2e);
    border-color: var(--gray-200);
}


/* ============================================================
   HUB LAYOUT -- Group and Community Detail Pages
   Reddit-style: banner + 3-column + tabs
   ============================================================ */

.hub-page { min-height: 100vh; }

/* Banner */
.hub-banner { width:100%; color:#fff; padding:40px 0 28px; }
.hub-banner-inner { max-width:1180px; margin:0 auto; padding:0 1.25rem; }
.hub-title { font-size:2rem; font-weight:800; margin:8px 0 6px; line-height:1.2; text-shadow:0 1px 4px rgba(0,0,0,.3); }
.hub-desc { font-size:1rem; opacity:.88; margin-bottom:12px; max-width:600px; text-shadow:0 1px 3px rgba(0,0,0,.25); }
.hub-banner-meta { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.hub-badge { display:inline-flex; align-items:center; padding:3px 10px; border-radius:99px; font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; background:rgba(255,255,255,.22); color:#fff; backdrop-filter:blur(4px); }
.hub-badge-featured { background:rgba(253,224,71,.3); color:#fef08a; }
.hub-badge-type { background:rgba(255,255,255,.15); }
.hub-stats-row { display:flex; gap:16px; flex-wrap:wrap; font-size:.875rem; opacity:.88; margin-bottom:14px; }
.hub-stats-row span { white-space:nowrap; }
.hub-actions-row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.hub-status-warning { margin-top:12px; background:rgba(255,243,205,.95); color:#856404; padding:10px 16px; border-radius:10px; border:1px solid #ffeeba; font-size:.875rem; }

/* 3-column body */
.hub-body { display:grid; grid-template-columns:220px 1fr 220px; gap:1.25rem; max-width:1180px; margin:1.5rem auto; padding:0 1rem; align-items:start; }

/* Info card */
.hub-info-card { padding:16px; }
.hub-info-title { font-weight:700; font-size:.85rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-secondary,#6b7280); margin-bottom:10px; }
.hub-about-text { font-size:.9rem; color:var(--text-secondary); line-height:1.55; margin-bottom:8px; }
.hub-divider { border:none; border-top:1px solid var(--gray-200,#e5e7eb); margin:12px 0; }
.hub-info-row { display:flex; align-items:center; gap:8px; font-size:.875rem; color:var(--text-main); margin-bottom:8px; }
.hub-info-row a { color:var(--primary); text-decoration:none; }
.hub-info-row a:hover { text-decoration:underline; }

/* Tabs */
.hub-tabs { display:flex; gap:4px; background:var(--surface,#fff); border:1px solid var(--gray-200,#e5e7eb); border-radius:14px; padding:5px; margin-bottom:16px; flex-wrap:wrap; }
.hub-tab { flex:1; min-width:80px; padding:9px 12px; border:none; background:transparent; color:var(--text-secondary,#6b7280); font-size:.875rem; font-weight:500; border-radius:10px; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; transition:background 0.15s,color 0.15s; white-space:nowrap; }
.hub-tab:hover { background:var(--gray-100,#f3f4f6); color:var(--text-main); }
.hub-tab-active { background:var(--primary,#6366f1) !important; color:#fff !important; font-weight:600; box-shadow:0 2px 8px rgba(99,102,241,.3); }
.hub-tab-count { background:rgba(255,255,255,.25); color:inherit; border-radius:99px; padding:1px 7px; font-size:.75rem; font-weight:700; }
.hub-tab-active .hub-tab-count { background:rgba(255,255,255,.3); }

/* Panel */
.hub-panel { animation:hubFadeIn 0.2s ease; }
@keyframes hubFadeIn { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }

/* Intent cards grid */
.intent-hub-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px; }
.intent-hub-card { padding:16px; transition:box-shadow 0.2s,transform 0.2s; }
.intent-hub-card:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,.1); }
.intent-hub-footer { display:flex; align-items:center; gap:12px; border-top:1px solid var(--gray-200,#e5e7eb); padding-top:10px; font-size:.82rem; color:var(--text-secondary); flex-wrap:wrap; }
.intent-hub-footer a { margin-left:auto; }

/* Group cards (community hub) */
.hub-groups-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; }
.hub-group-card { padding:16px; transition:box-shadow 0.2s,transform 0.2s; }
.hub-group-card:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,.1); }
.hub-group-header { margin-bottom:8px; }
.hub-group-name { font-size:1rem; margin:0 0 6px; }
.hub-group-name a { color:var(--text-main); text-decoration:none; font-weight:600; }
.hub-group-name a:hover { color:var(--primary); }
.hub-group-desc { font-size:.875rem; color:var(--text-secondary); margin-bottom:10px; line-height:1.5; }
.hub-group-stats { display:flex; gap:12px; font-size:.8rem; color:var(--text-secondary); margin-bottom:12px; }
.hub-group-actions { display:flex; gap:8px; }

/* Story cards */
.hub-stories-list { display:flex; flex-direction:column; gap:12px; }
.hub-story-card { padding:16px; transition:box-shadow 0.2s; }
.hub-story-card:hover { box-shadow:0 4px 16px rgba(0,0,0,.08); }

/* Stats card */
.hub-stats-card { padding:16px; }
.hub-stat-row { display:flex; justify-content:space-between; align-items:center; padding:6px 0; border-bottom:1px solid var(--gray-200,#e5e7eb); font-size:.875rem; }
.hub-stat-row:last-child { border-bottom:none; }
.hub-stat-label { color:var(--text-secondary); }

/* Empty & loading */
.hub-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:48px 24px; color:var(--text-secondary); gap:12px; }
.hub-loading-state { display:flex; flex-direction:column; gap:12px; }
.hub-content-placeholder { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:48px 24px; text-align:center; gap:12px; color:var(--text-secondary); }

/* Dark mode */
[data-theme=dark] .hub-tabs { background:var(--bg-card,#1e1e2e); border-color:var(--gray-200); }
[data-theme=dark] .hub-tab:hover { background:var(--gray-200); color:var(--text-main); }
[data-theme=dark] .hub-stat-row { border-color:var(--gray-200); }
[data-theme=dark] .hub-divider { border-color:var(--gray-200); }
[data-theme=dark] .hub-info-card { background:var(--bg-card); }
[data-theme=dark] .intent-hub-footer { border-color:var(--gray-200); }
[data-theme=dark] .hub-status-warning { background:rgba(133,100,4,.2); border-color:#856404; color:#fef08a; }

/* Hub responsive */
@media (max-width:1024px) {
    .hub-body { grid-template-columns:200px 1fr; grid-template-areas:'left center' 'right right'; }
    .hub-left { grid-area:left; }
    .hub-center { grid-area:center; }
    .hub-right { grid-area:right; display:grid; grid-template-columns:repeat(2,1fr); gap:1rem; }
    .hub-right > * { margin-top:0 !important; }
}
@media (max-width:768px) {
    .hub-banner { padding:24px 0 16px; }
    .hub-title { font-size:1.4rem; }
    .hub-desc { font-size:.9rem; }
    .hub-stats-row { gap:10px; font-size:.8rem; }
    .hub-body { grid-template-columns:1fr; grid-template-areas:'center' 'left' 'right'; margin:0; padding:12px; gap:12px; }
    .hub-left { grid-area:left; }
    .hub-center { grid-area:center; }
    .hub-right { grid-area:right; display:flex; flex-direction:column; gap:12px; }
    .hub-tabs { gap:2px; }
    .hub-tab { padding:7px 8px; font-size:.8rem; min-width:60px; }
    .hub-tab-count { display:none; }
    .intent-hub-grid { grid-template-columns:1fr; }
    .hub-groups-grid { grid-template-columns:1fr; }
    .hub-actions-row .btn { font-size:.85rem; padding:7px 12px; }
}

/* ============================================================
   INTENT ROW CARD (.irc) - Full-width single-column listing
   ============================================================ */

.intents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.irc {
    display: flex;
    align-items: stretch;
    background: var(--surface, #fff);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
}

.irc:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.09);
    transform: translateY(-1px);
}

/* Thumbnail column */
.irc-thumb {
    width: 100px;
    min-height: 110px;
    flex-shrink: 0;
    display: block;
    overflow: hidden;
    text-decoration: none;
}

.irc-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.irc-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
}

/* Body */
.irc-body {
    flex: 1;
    min-width: 0;
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Meta row */
.irc-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: .75rem;
}

.irc-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 99px;
    font-weight: 700;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.irc-type {
    background: var(--gray-100, #f3f4f6);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 99px;
    font-size: .72rem;
}

.irc-badge {
    background: rgba(99,102,241,.12);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 600;
}

.irc-badge-bound {
    background: rgba(34,197,94,.12);
    color: #16a34a;
}

.irc-lang { font-size: .85rem; }

.irc-days {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: .72rem;
    white-space: nowrap;
}

/* Title */
.irc-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 2px 0;
    line-height: 1.3;
}

.irc-title a {
    color: var(--text-main);
    text-decoration: none;
}

.irc-title a:hover { color: var(--primary); }

/* Description */
.irc-desc {
    font-size: .88rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Stats strip */
.irc-stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.irc-stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.irc-stat strong { color: var(--text-main); font-weight: 700; }

.irc-stat-icon { font-size: .9em; }

.irc-stat-hot strong { color: #ef4444; }

/* Footer */
.irc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.irc-footer-left { display: flex; align-items: center; gap: 8px; }

.irc-footer-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.irc-creator {
    font-size: .8rem;
    color: var(--text-secondary);
}

.irc-creator a { color: var(--primary); text-decoration: none; font-weight: 500; }
.irc-creator a:hover { text-decoration: underline; }

/* Dark mode */
[data-theme=dark] .irc {
    background: var(--bg-card, #1e1e2e);
    border-color: var(--gray-200);
}

[data-theme=dark] .irc-type { background: var(--gray-200); color: var(--text-secondary); }

/* Responsive */
@media (max-width: 480px) {
    .irc-thumb { width: 72px; min-height: 90px; }
    .irc-body  { padding: 10px 12px 10px; }
    .irc-title { font-size: .95rem; }
    .irc-desc  { -webkit-line-clamp: 2; line-clamp: 2; }
    .irc-stats { gap: 8px; font-size: .75rem; }
    .irc-footer { gap: 4px; }
}


/* ============================================================
   EMOJI REACTION PICKER
   ============================================================ */

.rx-bar {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Summary button (collapsed view) */
.rx-summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--gray-100, #f3f4f6);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 99px;
    padding: 4px 12px;
    font-size: .82rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.rx-summary:hover:not(:disabled) {
    background: var(--gray-200, #e5e7eb);
    color: var(--text-main);
}

.rx-summary.rx-active {
    background: rgba(99,102,241,.1);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.rx-summary:disabled {
    opacity: .6;
    cursor: default;
}

.rx-count { font-weight: 700; }

.rx-placeholder { opacity: .6; font-size: .78rem; }

/* Floating picker popup */
.rx-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: var(--surface, #fff);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 16px;
    padding: 6px 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,.16);
    display: none;
    gap: 4px;
    z-index: 500;
    white-space: nowrap;
}

.rx-picker.rx-open { display: flex; animation: rxPop 0.15s ease; }

@keyframes rxPop {
    from { opacity:0; transform:scale(0.85) translateY(4px); }
    to   { opacity:1; transform:scale(1) translateY(0); }
}

/* Individual emoji button in picker */
.rx-emoji-btn {
    position: relative;
    background: none;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 4px 6px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.1s, transform 0.1s, border-color 0.1s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1;
}

.rx-emoji-btn:hover {
    background: var(--gray-100, #f3f4f6);
    transform: scale(1.2);
}

.rx-emoji-btn.rx-selected {
    background: rgba(99,102,241,.12);
    border-color: var(--primary);
}

.rx-emoji-count {
    font-size: .65rem;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1;
}

/* Dark mode */
[data-theme=dark] .rx-summary { background: var(--gray-200); border-color: var(--gray-200); }
[data-theme=dark] .rx-summary:hover:not(:disabled) { background: rgba(255,255,255,.1); }
[data-theme=dark] .rx-picker { background: var(--bg-card, #1e1e2e); border-color: var(--gray-200); }
[data-theme=dark] .rx-emoji-btn:hover { background: rgba(255,255,255,.08); }


/* ============================================================
   NAVBAR HAMBURGER BUTTON
   ============================================================ */

.nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-main);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

@media (min-width: 832px) {
    .nav-hamburger {
        display: none !important;
    }
}

.nav-hamburger:hover {
    background: var(--gray-100, #f3f4f6);
    color: var(--primary);
}

[data-theme=dark] .nav-hamburger:hover { background: var(--gray-200); }

/* Left sidebar collapse on desktop */
.lf-left-collapsed .lf-left {
    transform: translateX(-110%);
    width: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.lf-left {
    transition: transform 0.25s ease, width 0.25s ease;
}

/* When left is collapsed, let center expand */
.lf-left-collapsed .lf-root {
    grid-template-columns: 0 1fr var(--lf-right-width, 280px);
}
