/**
 * TrollKhach - Desktop Layout (3 cột)
 * Tham chiếu: UI-DESIGN-SYSTEM.md Section 3
 */

/* ============================================================
   HEADER (56px fixed)
   ============================================================ */
.site-header {
    background: var(--color-neutral-0);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-neutral-200);
    position: sticky;
    top: 0;
    z-index: var(--z-30);
    height: var(--header-height);
}

/* UI mode: remove top header completely */
.site-header {
    display: none;
}

[data-theme="dark"] .site-header {
    background: var(--color-neutral-0);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header {
        background: rgba(255, 255, 255, 0.98);
    }

    [data-theme="dark"] .site-header {
        background: rgba(17, 17, 17, 0.98);
    }
}

@supports not (position: sticky) {
    .site-header,
    .feed-tab-bar,
    .sidebar-sticky,
    .sidebar-right {
        position: static;
        top: auto;
    }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: var(--space-4);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

/* Container helper */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

.site-branding .site-title {
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    line-height: 1;
}

.site-branding .site-title a {
    color: var(--color-neutral-900);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.site-branding .site-title a:hover {
    color: var(--color-neutral-700);
}

/* Nav */
.main-navigation .primary-menu {
    display: flex;
    gap: var(--space-1);
}

.main-navigation .primary-menu a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-neutral-600);
    transition: all var(--transition-fast);
}

.main-navigation .primary-menu a:hover,
.main-navigation .primary-menu .current-menu-item a {
    background: var(--color-neutral-50);
    color: var(--color-neutral-900);
}

.main-navigation .primary-menu .current-menu-item a {
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    color: var(--color-neutral-900);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* ============================================================
   BUTTON SYSTEM
   ============================================================ */
.btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-color: var(--color-neutral-300, #d1d5db);
    border-radius: 10px;
    background: var(--color-neutral-0);
    color: var(--color-neutral-800);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn:hover {
    background: var(--color-neutral-50);
    border-color: #9ca3af;
    border-color: var(--color-neutral-400, #9ca3af);
    color: var(--color-neutral-900);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px #bfdbfe;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--dub-accent-blue) 24%, transparent);
}

.btn:active {
    transform: translateY(1px);
}

.btn[disabled],
.btn.is-loading {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-sm {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: var(--text-xs);
}

.btn-lg {
    min-height: 40px;
    padding: 0 16px;
}

.btn-primary {
    background: var(--color-neutral-900);
    border-color: var(--color-neutral-900);
    color: #ffffff;
}

.btn-primary:hover {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.btn-ghost {
    background: #ffffff;
    background: var(--color-neutral-0, #ffffff);
    border-color: #6b7280;
    border-color: var(--color-neutral-500, #6b7280);
    color: var(--color-neutral-700);
}

.btn-ghost:hover {
    background: var(--color-neutral-100);
    border-color: var(--color-neutral-200);
    color: var(--color-neutral-900);
}

button.btn.btn-ghost,
a.btn.btn-ghost {
    border-width: 1px !important;
    border-style: solid !important;
    border-color: #6b7280 !important;
    background: #ffffff !important;
}

.profile-edit-actions .btn.btn-ghost {
    border-width: 1px !important;
    border-style: solid !important;
    border-color: #4b5563 !important;
    background: #ffffff !important;
}

.btn-secondary,
.btn-outline {
    background: var(--color-neutral-0);
    border-color: #d1d5db;
    border-color: var(--color-neutral-300, #d1d5db);
    color: var(--color-neutral-800);
}

.btn-secondary:hover,
.btn-outline:hover {
    background: var(--color-neutral-50);
    border-color: var(--color-neutral-400);
    color: var(--color-neutral-900);
}

.btn-compose {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: transparent;
    color: var(--color-neutral-800);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    padding: 0 var(--space-3);
    height: 34px;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-compose:hover {
    background: var(--color-neutral-50);
    border-color: var(--color-neutral-100);
    color: var(--color-neutral-900);
}

.notification-bell {
    position: relative;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-full);
    color: var(--color-neutral-500);
    transition: all var(--transition-fast);
    background: none;
    border: none;
}

.notification-bell:hover {
    background: var(--color-neutral-100);
    color: var(--color-neutral-700);
}

.notification-bell .badge-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 0.65rem;
    font-weight: var(--font-semibold);
    background: var(--dub-accent-orange-soft);
    color: var(--dub-accent-orange);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-neutral-0);
}

.user-dropdown { position: relative; }

.btn-user-menu {
    background: none;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 2px;
    border-radius: var(--radius-full);
    transition: border-color var(--transition-fast);
}

.btn-user-menu:hover,
.btn-user-menu:focus-visible {
    border-color: var(--dub-accent-blue);
}

.btn-user-menu img {
    border-radius: var(--radius-full);
    width: 36px;
    height: 36px;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 220px;
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-2);
    z-index: var(--z-10);
    animation: dropdownFadeIn var(--duration-150) var(--ease-out);
    display: none;
}

.dropdown-menu.is-open { display: block; }

.dropdown-menu a,
.dropdown-menu button {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2-5) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-neutral-700);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background: var(--color-neutral-100);
    color: var(--color-neutral-800);
}

.dropdown-menu a.danger,
.dropdown-menu button.danger {
    color: var(--color-error-600);
}

.dropdown-menu a.danger:hover,
.dropdown-menu button.danger:hover {
    background: var(--color-error-50);
}

.dropdown-divider {
    height: 1px;
    background: var(--color-neutral-100);
    margin: var(--space-1) 0;
}

/* ============================================================
   3-COLUMN LAYOUT
   ============================================================ */

/* Fallback (mobile / pre-grid) */
.site-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar-left  { width: 280px; flex-shrink: 0; background: var(--sidebar-bg); }
.site-content  { flex: 1; max-width: var(--feed-max-width); min-width: 0; padding: var(--space-4) var(--space-4); }
.sidebar-right { width: var(--sidebar-right-width); flex-shrink: 0; background: var(--color-neutral-0); }

@media (min-width: 1025px) {
    .site-layout {
        display: grid;
        grid-template-columns: 280px 1fr var(--sidebar-right-width);
        max-width: none;
        width: 100%;
        margin: 0;
        gap: 0;
        min-height: 100vh;
    }

    /* ---- LEFT SIDEBAR (light, full-height, Conceptzilla style) ---- */
    .sidebar-left {
        background: var(--sidebar-bg);
        border-right: 1px solid var(--sidebar-border);
        align-self: stretch;
        min-height: 100vh;
        padding: 0;
        box-shadow: 1px 0 0 0 var(--sidebar-border);
    }

    /* Sticky nav wrapper inside the stretched dark sidebar */
    .sidebar-sticky {
        position: sticky;
        top: 0;
        max-height: 100vh;
        overflow-y: auto;
        padding: var(--space-5) var(--space-4) var(--space-10);
        scrollbar-width: none;
    }
    .sidebar-sticky::-webkit-scrollbar { display: none; }

    /* ---- MAIN FEED ---- */
    .site-content {
        padding: var(--space-4) var(--space-6);
        max-width: var(--feed-max-width);
        width: 100%;
        margin: 0 auto;
        min-width: 0;
    }

    /* ---- RIGHT SIDEBAR (white panel, sticky) ---- */
    .sidebar-right {
        background: var(--color-neutral-0);
        border-left: 1px solid var(--color-neutral-100);
        position: sticky;
        top: 0;
        align-self: start;
        max-height: 100vh;
        overflow-y: auto;
        padding: var(--space-3) var(--space-4);
        scrollbar-width: thin;
        scrollbar-color: var(--color-neutral-200) transparent;
    }
}

/* ============================================================
   LEFT SIDEBAR NAVIGATION
   ============================================================ */
.sidebar-nav { margin-bottom: var(--space-2); }

.sidebar-brand {
    margin-bottom: var(--space-4);
    padding: 0 var(--space-2);
}

.sidebar-brand-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    color: var(--color-neutral-900);
    font-weight: var(--font-bold);
    font-size: 2rem;
    line-height: 1.1;
    max-width: 200px;
}

.sidebar-logo {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 64px;
    object-fit: contain;
}

.sidebar-brand-link:hover {
    color: var(--color-neutral-900);
}

.sidebar-brand-caret {
    color: var(--color-neutral-500);
    transform: translateY(2px);
}

.nav-list { display: flex; flex-direction: column; gap: 1px; }

.nav-item a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2-5) var(--space-4);
    border-radius: var(--radius-full);
    color: var(--sidebar-text);
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item a:hover {
    background: var(--sidebar-bg-hover);
    color: var(--sidebar-text-hover);
}

.nav-item.active a,
.nav-item.current-menu-item a {
    background: var(--color-neutral-0);
    border: 1px solid var(--sidebar-border);
    color: var(--color-neutral-900);
    font-weight: var(--font-semibold);
}

.nav-item a .icon { opacity: 0.5; transition: opacity var(--transition-fast); }
.nav-item.active a .icon,
.nav-item a:hover .icon { opacity: 0.85; }

/* Logout nav item */
.nav-item a.nav-logout {
    color: var(--color-neutral-400);
    margin-top: var(--space-1);
}
.nav-item a.nav-logout:hover {
    color: var(--color-error-600);
    background: var(--color-error-50);
}
.nav-item a.nav-logout:hover .icon {
    opacity: 1;
}

.nav-label { flex: 1; }

/* Unread badge on nav item — gray pill (Conceptzilla style) */
.nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    background: var(--color-neutral-200);
    color: var(--color-neutral-600);
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: var(--font-semibold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Sidebar Sections */
.sidebar-section {
    padding: var(--space-4);
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
}

.sidebar-section + .sidebar-section { margin-top: var(--space-3); }

/* Left sidebar section — flat dark, no card */
.sidebar-left .sidebar-section {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: var(--space-4) 0 0;
    border-top: 1px solid var(--sidebar-border);
    margin-top: var(--space-3);
}

/* Right sidebar section — flat white, divider only */
.sidebar-right .sidebar-section {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-neutral-100);
}
.sidebar-right .sidebar-section:last-child { border-bottom: none; }

.sidebar-title {
    font-size: 0.7rem;
    font-weight: var(--font-bold);
    color: var(--color-neutral-500);
    margin-bottom: var(--space-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 var(--space-3);
}

/* Left sidebar title */
.sidebar-left .sidebar-title {
    color: var(--sidebar-text-muted);
    padding: 0 var(--space-4) var(--space-2);
    font-size: 0.7rem;
    font-weight: var(--font-semibold);
    letter-spacing: 0.07em;
}

/* Right sidebar title (light bg) */
.sidebar-right .sidebar-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-700);
    text-transform: none;
    letter-spacing: normal;
    padding: 0 0 var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.sidebar-title-toggle::after {
    content: '';
    margin-left: auto;
    width: 16px;
    height: 16px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/contain no-repeat;
    opacity: 0.4;
    transition: transform 0.15s;
}
.sidebar-title-toggle.is-collapsed::after {
    transform: rotate(-90deg);
}

/* Filter (channel-style, Conceptzilla) */
.filter-list { display: flex; flex-direction: column; gap: 1px; }

.filter-item a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2-5) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--sidebar-text);
    transition: all var(--transition-fast);
}

.filter-item a:hover {
    background: var(--sidebar-bg-hover);
    color: var(--sidebar-text-hover);
}

.filter-item.active a {
    background: var(--sidebar-bg-active);
    color: var(--color-neutral-900);
    font-weight: var(--font-semibold);
}

.filter-dot {
    width: 8px;
    height: 8px;
    background: var(--color-neutral-300);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.filter-dot.is-thiet-ke { background: var(--color-brand-thiet-ke); }
.filter-dot.is-marketing { background: var(--color-brand-marketing); }
.filter-dot.is-ui-ux { background: var(--color-brand-uiux); }
.filter-dot.is-editor { background: var(--color-brand-editor); }
.filter-dot.is-tim-viec { background: var(--color-brand-timviec); }

/* Flair hash prefix */
.flair-hash {
    width: 16px;
    flex-shrink: 0;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    color: var(--color-neutral-400);
    text-align: center;
}
.filter-item.active .flair-hash { color: var(--color-neutral-700); }

/* Right sidebar tag cloud */
.sidebar-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1-5);
}

.sidebar-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: var(--color-neutral-50);
    color: var(--color-neutral-600);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.sidebar-tag-chip:hover {
    background: var(--color-neutral-100);
    color: var(--color-neutral-800);
    border-color: var(--color-neutral-200);
}

/* Remove duplicate sidebar-left .sidebar-title override below (kept in block above) */

/* ============================================================
   RIGHT SIDEBAR
   ============================================================ */
.sidebar-right { display: flex; flex-direction: column; gap: var(--space-3); }

.trending-tabs {
    display: flex;
    gap: var(--space-1);
    padding: var(--space-1);
    background: var(--color-neutral-50);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.trending-tabs .tab-btn {
    flex: 1;
    padding: var(--space-1-5) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-neutral-500);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.trending-tabs .tab-btn:hover { color: var(--color-neutral-700); }

.trending-tabs .tab-btn.active {
    background: var(--color-neutral-0);
    color: var(--color-neutral-900);
    font-weight: var(--font-semibold);
    border: 1px solid var(--color-neutral-100);
    box-shadow: none;
}

.trending-list { display: flex; flex-direction: column; gap: var(--space-1); }

.trending-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-1);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.trending-item:hover { background: var(--color-neutral-50); }

.trending-rank {
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--color-neutral-500);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.trending-item:nth-child(-n+3) .trending-rank { color: var(--color-neutral-500); }

.trending-content { flex: 1; min-width: 0; }

.trending-title {
    font-size: var(--text-sm);
    color: var(--color-neutral-700);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: var(--leading-snug);
}

.trending-meta {
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    margin-top: 2px;
}

/* Suggestions */
.suggestions-list { display: flex; flex-direction: column; gap: var(--space-2); }

.suggestion-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
}

.suggestion-item img {
    width: var(--avatar-sm);
    height: var(--avatar-sm);
    border-radius: var(--radius-full);
    object-fit: cover;
}

.suggestion-info { flex: 1; min-width: 0; }

.suggestion-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-800);
    line-height: var(--leading-tight);
}

.suggestion-bio {
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-follow-sm {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border: 1px solid #d1d5db;
    border-color: var(--color-neutral-200, #d1d5db);
    background: transparent;
    color: var(--color-neutral-800);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

button.btn-follow-sm {
    border-width: 1px !important;
    border-style: solid !important;
    border-color: #d1d5db !important;
}

.btn-follow-sm:hover { background: var(--color-neutral-900); border-color: var(--color-neutral-900); color: #ffffff; }

.btn-follow-sm.following {
    background: var(--color-neutral-50);
    border-color: var(--color-neutral-100);
    color: var(--color-neutral-700);
}
.btn-follow-sm.is-active {
    background: var(--color-neutral-900);
    border-color: var(--color-neutral-900);
    color: #ffffff;
}

/* Filter toggle (Xem thêm) */
.filter-toggle {
    display: inline-block; padding: 4px 0; margin-top: 2px;
    border: none; background: none;
    color: var(--color-neutral-500); font-size: var(--text-xs);
    cursor: pointer; font-family: inherit; line-height: 1.5;
}
.filter-toggle:hover { color: var(--color-neutral-800); }

/* Rules */
.rules-list li {
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    padding-left: var(--space-3);
    position: relative;
    margin-bottom: var(--space-2);
}

.rules-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 6px;
    height: 6px;
    background: var(--color-neutral-300);
    border-radius: var(--radius-full);
}

.sidebar-footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* Suggestions list */
.suggestion-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid var(--color-neutral-100);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-avatar-link { flex-shrink: 0; line-height: 0; }
.suggestion-avatar-link .avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.suggestion-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.suggestion-name { font-size: 13px; font-weight: 600; color: var(--color-neutral-800); text-decoration: none; }
.suggestion-name:hover { color: var(--dub-accent-blue); }
.suggestion-bio { font-size: 11px; color: var(--color-neutral-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-job { font-size: 11px; color: var(--color-neutral-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-followers { font-size: 10px; color: var(--color-neutral-400); }

.sidebar-footer-links a {
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
}

.sidebar-footer-links a:hover { color: var(--dub-accent-blue); }

.loading-text {
    font-size: var(--text-sm);
    color: var(--color-neutral-400);
    text-align: center;
    padding: var(--space-4) 0;
}

/* ============================================================
   FEED TAB BAR (underline style — Conceptzilla)
   ============================================================ */
.feed-tab-bar {
    position: sticky;
    top: 0;
    z-index: var(--z-10);
    background: var(--page-bg);
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--color-neutral-200);
    margin-bottom: var(--space-4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.feed-tab-bar::-webkit-scrollbar { display: none; }

[data-theme="dark"] .feed-tab-bar {
    background: var(--color-neutral-50);
    border-bottom-color: var(--color-neutral-200);
}

.feed-tab-bar .tab-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-neutral-500);
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    min-width: fit-content;
}

.feed-tab-bar .tab-btn:hover {
    color: var(--color-neutral-700);
    background: var(--color-neutral-50);
}

.feed-tab-bar .tab-btn.active {
    color: var(--color-neutral-900);
    border-bottom-color: var(--color-neutral-900);
    font-weight: var(--font-semibold);
    background: transparent;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-header {
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: var(--space-4);
}

.profile-cover {
    height: 160px;
    background: linear-gradient(135deg, var(--color-neutral-50), var(--color-neutral-100));
    overflow: hidden;
    position: relative;
}

.profile-cover img { width: 100%; height: 100%; object-fit: cover; }

.profile-cover-uploader {
    cursor: pointer;
}

.profile-cover-uploader.is-dragover {
    outline: 2px dashed var(--dub-accent-blue);
    outline-offset: -10px;
}

.profile-info { padding: 0 var(--space-5) var(--space-5); position: relative; }

.profile-avatar { margin-top: -50px; margin-bottom: var(--space-3); position: relative; display: inline-block; }

.profile-avatar-uploader {
    cursor: pointer;
}

.profile-avatar-uploader.is-dragover img {
    box-shadow: 0 0 0 3px var(--dub-accent-blue);
}

.profile-avatar img {
    width: var(--avatar-xl);
    height: var(--avatar-xl);
    border-radius: var(--radius-full);
    border: 4px solid var(--color-neutral-0);
    object-fit: cover;
}

.profile-name { font-size: var(--text-xl); font-weight: var(--font-bold); }
.profile-username { color: var(--color-neutral-500); font-size: var(--text-sm); }
.profile-bio { margin-top: var(--space-2); color: var(--color-neutral-700); font-size: var(--text-base); }
.profile-meta { margin-top: var(--space-3); display: flex; gap: var(--space-2); flex-wrap: wrap; }
.profile-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: var(--space-3);
    flex-wrap: wrap;
}

.profile-stats { display: flex; gap: var(--space-5); margin-top: 0; font-size: var(--text-sm); color: var(--color-neutral-500); }
.profile-stats strong { color: var(--color-neutral-800); }

.profile-stat-link {
    border: none;
    background: transparent;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.profile-stat-link:hover {
    color: var(--color-neutral-800);
    text-decoration: underline;
}

.profile-stats-row .btn-follow {
    margin-left: auto;
    white-space: nowrap;
}

.profile-stats-row .btn-follow.is-active {
    background: var(--color-neutral-900);
    border-color: var(--color-neutral-900);
    color: #ffffff;
}

.profile-follow-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    background: rgba(17, 24, 39, 0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.profile-follow-modal[hidden] {
    display: none !important;
}

.profile-follow-dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: 82vh;
    overflow: hidden;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-lg);
    background: var(--color-neutral-0);
    box-shadow: var(--shadow-lg);
}

.profile-follow-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: var(--color-neutral-500);
    cursor: pointer;
}

.profile-follow-tabs {
    display: flex;
    gap: 4px;
    padding: 14px 14px 0;
    border-bottom: 1px solid var(--color-neutral-100);
}

.profile-follow-tab {
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-bottom: 2px solid transparent;
    color: var(--color-neutral-600);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
}

.profile-follow-tab.is-active {
    color: var(--color-neutral-900);
    border-bottom-color: var(--color-neutral-900);
}

.profile-follow-list {
    padding: 8px 14px 14px;
    max-height: calc(82vh - 60px);
    overflow-y: auto;
}

.profile-follow-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-neutral-100);
}

.profile-follow-item:last-child {
    border-bottom: none;
}

.profile-follow-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.profile-follow-user img {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
}

.profile-follow-user-meta {
    display: grid;
    min-width: 0;
}

.profile-follow-user-meta strong {
    font-size: var(--text-sm);
    color: var(--color-neutral-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-follow-user-meta small {
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
}

.profile-follow-action .btn-follow {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 9px;
}

.profile-follow-action .btn-follow.is-active {
    background: var(--color-neutral-900);
    border-color: var(--color-neutral-900);
    color: #fff;
}

.profile-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.profile-name-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.profile-switch-to {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--dub-accent-blue);
    text-decoration: none;
    border: 1px solid var(--color-neutral-300, #d1d5db);
    border-radius: 999px;
    padding: 2px 8px;
    line-height: 1.4;
    white-space: nowrap;
}

.profile-switch-to:hover {
    background: var(--color-neutral-50);
    border-color: var(--color-neutral-400, #9ca3af);
}

.btn-edit-profile {
    white-space: nowrap;
}

.profile-extra-info {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-extra-item {
    font-size: var(--text-sm);
    color: var(--color-neutral-600);
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-100);
    border-radius: 999px;
    padding: 2px 10px;
}

.profile-extra-item.is-empty {
    color: var(--color-neutral-500, #6b7280);
    background: var(--color-neutral-50, #f9fafb);
    border-style: dashed;
}

.profile-interest-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-interest-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.4;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    color: var(--color-neutral-700, #374151);
    background: #fff;
}

.profile-interest-pill.is-empty {
    color: var(--color-neutral-500, #6b7280);
    background: var(--color-neutral-50, #f9fafb);
    border-style: dashed;
}

.profile-interest-pill--linh-vuc {
    border-color: rgba(37, 99, 235, 0.28);
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

.profile-interest-pill--flair {
    border-color: rgba(14, 116, 144, 0.28);
    background: rgba(14, 116, 144, 0.08);
    color: #0e7490;
}

.profile-links-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
}

.profile-inline-link {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-neutral-700);
    text-decoration: none;
    white-space: nowrap;
}

.profile-inline-link:hover {
    color: var(--dub-accent-blue);
    text-decoration: underline;
}

.profile-tab-bar.feed-tab-bar {
    position: static;
    top: auto;
    z-index: auto;
    background: var(--color-neutral-0);
    margin-top: var(--space-2);
    margin-bottom: var(--space-3);
}

.profile-feed .feed-container.profile-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.profile-media-card {
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: block;
    background: var(--color-neutral-0);
}

.profile-media-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.profile-media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(17, 24, 39, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.profile-media-lightbox[hidden] {
    display: none !important;
}

.profile-media-lightbox img {
    max-width: min(92vw, 1100px);
    max-height: 88vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.profile-media-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-media-lightbox-close svg {
    width: 18px;
    height: 18px;
}

body.is-lightbox-open {
    overflow: hidden;
}

.profile-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(17, 24, 39, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.profile-edit-modal[hidden] {
    display: none !important;
}

.profile-edit-dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 18px;
}

.profile-edit-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-neutral-500);
}

.profile-edit-form {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.profile-edit-form label {
    display: grid;
    gap: 5px;
    font-size: var(--text-sm);
    color: var(--color-neutral-700);
}

.profile-edit-form input,
.profile-edit-form textarea {
    width: 100%;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    font-size: var(--text-sm);
}

.profile-location-list {
    max-height: 188px;
    overflow: auto;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: var(--radius-md);
    background: var(--color-neutral-0, #fff);
    margin-top: 2px;
}

.profile-location-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--color-neutral-100, #f3f4f6);
    background: transparent;
    text-align: left;
    padding: 8px 10px;
    font-size: var(--text-sm);
    color: var(--color-neutral-800, #1f2937);
    cursor: pointer;
}

.profile-location-item:last-child {
    border-bottom: 0;
}

.profile-location-item:hover {
    background: var(--color-neutral-50, #f9fafb);
    color: var(--dub-accent-blue, #2563eb);
}

.profile-location-empty {
    font-size: var(--text-sm);
    color: var(--color-neutral-500, #6b7280);
    padding: 8px 10px;
}

.profile-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

.profile-edit-actions .btn {
    min-width: 112px;
}

.profile-media-trigger {
    position: static;
}

.profile-media-actions {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    gap: 6px;
}

.profile-media-actions-avatar {
    right: -8px;
    bottom: -8px;
}

.profile-media-action-btn {
    border: 1px solid #d1d5db;
    border-color: var(--color-neutral-200, #d1d5db);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-neutral-800);
    font-size: 12px;
    line-height: 1.2;
    padding: 4px 10px;
    cursor: pointer;
}

button.profile-media-action-btn {
    border-width: 1px !important;
    border-style: solid !important;
    border-color: #d1d5db !important;
}

.profile-avatar-trigger {
    right: auto;
    bottom: auto;
    padding: 4px 10px;
}

.profile-media-manager {
    margin-bottom: var(--space-4);
    padding: var(--space-4);
}

.profile-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.profile-dropzone {
    border: 1px dashed var(--color-neutral-300);
    background: var(--color-neutral-50);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.profile-dropzone p { margin: 4px 0; font-size: var(--text-sm); }

.profile-dropzone.is-dragover {
    border-color: var(--dub-accent-blue);
    background: var(--color-neutral-0);
}

.profile-uploaded-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: var(--space-3);
}

.profile-uploaded-gallery-inline {
    margin-top: 8px;
}

.profile-uploaded-item {
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-neutral-0);
}

.profile-uploaded-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
}

.profile-uploaded-actions {
    display: grid;
    gap: 6px;
    padding: 8px;
}

.tk-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.45);
    padding: 16px;
}

.tk-popup-backdrop.is-open {
    display: flex;
}

.tk-popup {
    width: min(420px, 100%);
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 16px;
}

.tk-popup.tk-popup-large {
    width: min(560px, 100%);
}

.tk-popup-message {
    margin: 0;
    color: var(--color-neutral-800);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.tk-popup-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.tk-popup-stack {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.tk-popup-choice {
    justify-content: center;
}

.tk-popup-library-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.tk-popup-library-item {
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    background: var(--color-neutral-0);
}

.tk-popup-library-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
}

.tk-popup-preview-wrap {
    margin-top: 12px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-neutral-200);
    background: var(--color-neutral-50);
}

.tk-popup-preview-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.tk-popup-preview-wrap.is-avatar {
    width: 180px;
    height: 180px;
    margin: 12px auto 0;
    border-radius: 999px;
}

.tk-popup-preview-wrap.is-avatar .tk-popup-preview-image {
    width: 100%;
    height: 100%;
    border-radius: 999px;
}

.tk-popup-preview-wrap.is-cover {
    border-radius: var(--radius-md);
}

.tk-popup-range-wrap {
    margin-top: 12px;
}

.tk-popup-range {
    width: 100%;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--color-neutral-0);
    border-top: 1px solid var(--color-neutral-100);
    padding: var(--space-6) 0;
    margin-top: var(--space-10);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.footer-info { font-size: var(--text-sm); color: var(--color-neutral-500); text-align: left; }

.footer-menu { display: flex; gap: var(--space-4); flex-wrap: wrap; justify-content: center; }

.footer-social { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--color-neutral-500);
    transition: color var(--transition-fast);
    text-decoration: none;
}

.footer-social-icon:hover { color: var(--dub-accent-blue); }

.footer-menu a {
    font-size: var(--text-sm);
    color: var(--color-neutral-500);
    transition: color var(--transition-fast);
}

.footer-menu a:hover { color: var(--dub-accent-blue); }

/* Menu toggle (hidden on desktop) */
.menu-toggle { display: none; }

/* ============================================================
   REFINED POST CARD (Threads-style)
   ============================================================ */
.post-card {
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    margin-bottom: var(--feed-card-gap);
    margin-top: var(--feed-card-gap);
    transition: box-shadow var(--transition-fast);
    box-shadow: none;
}

.post-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.post-card-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2-5);
    margin-bottom: var(--space-2-5);
}

.post-card-more {
    margin-left: auto;
    position: relative;
    flex-shrink: 0;
}

.post-card-more .more-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--color-neutral-0, #fff);
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 50;
}

.post-card-more .menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-neutral-700);
    text-decoration: none;
    font-size: var(--text-sm);
    line-height: 1.35;
    cursor: pointer;
}

.post-card-more .menu-item:hover {
    background: var(--color-neutral-50);
    color: var(--color-neutral-900);
}

.post-card-more .btn-delete-post {
    color: var(--color-error-600, #dc2626);
}

.post-card-more .btn-delete-post:hover {
    background: var(--color-error-50, #fef2f2);
}

.post-card-header .post-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    border: 2px solid var(--color-neutral-100);
    transition: border-color var(--transition-fast);
}

.post-card:hover .post-card-avatar {
    border-color: var(--color-neutral-200);
}

.post-card-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
    flex: 1;
}

.post-author-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    min-width: 0;
}

.post-author-main .post-author-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-author-sub {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.post-author-sub .badge {
    margin: 0;
}

.post-card-extra-meta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: nowrap;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.post-extra-meta-chip {
    display: inline-flex;
    align-items: center;
    max-width: 180px;
    min-width: 0;
    flex: 0 1 auto;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-neutral-200);
    background: var(--color-neutral-50);
    color: var(--color-neutral-600);
    font-size: 11px;
    line-height: 1;
    padding: 4px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-author-name {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    color: var(--color-neutral-700);
    line-height: 1.3;
}

.post-author-name:hover {
    color: var(--color-neutral-800);
    text-decoration: underline;
}

.post-time {
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    white-space: nowrap;
    flex: 0 0 auto;
}

.post-card-body {
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--color-neutral-700);
    word-break: break-word;
    margin-bottom: var(--space-3);
}

.post-card-text {
    margin-bottom: 12px;
}

.post-card-text > :last-child {
    margin-bottom: 0;
}

.post-card-text.is-clamped {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
}

.post-card-text.is-expanded {
    display: block;
    overflow: visible;
}

.post-card-body p { margin-bottom: var(--space-3); }
.post-card-body p:last-child { margin-bottom: 0; }

.post-card-body a {
    color: #0a66c2;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-card-body a:hover {
    color: #004182;
}

.composer-title-input {
    margin: 0 0 2px;
    min-height: auto;
    height: auto;
    padding: 4px 0 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-neutral-800);
    font-size: 1rem;
    line-height: 1.45;
    font-weight: 600;
    box-shadow: none;
    outline: none;
}

.composer-title-input::placeholder {
    color: var(--color-neutral-400);
    font-weight: 500;
}

.composer-title-input:hover,
.composer-title-input:focus,
.composer-title-input:focus-visible {
    border: 0;
    box-shadow: none;
    outline: none;
    background: transparent;
}

.post-card-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--color-neutral-900, #0f172a);
}

.post-card-body iframe,
.post-card-body embed,
.post-card-body object,
.post-card-body video {
    max-width: 100% !important;
    margin-top: 10px;
    margin-bottom: 10px;
}

.post-card-body iframe {
    width: 100% !important;
    display: block;
    border: 0;
}

.post-card-body .wp-video,
.post-card-body .wp-block-embed,
.post-card-body .wp-block-embed__wrapper {
    max-width: 100%;
    overflow: hidden;
}

.post-card-body .wp-video,
.post-card-body .wp-block-embed,
.post-card-body .wp-block-embed__wrapper,
.post-card-body .wp-video-shortcode,
.post-card-body figure.wp-block-embed {
    margin-top: 10px;
}

.post-card-media {
    margin-top: 12px;
    margin-bottom: var(--space-4);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-neutral-100);
}

.post-card-media-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-y;
}

body.is-gallery-dragging {
    user-select: none;
}

.post-card-media-grid.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.post-card-media-item {
    display: block;
    flex: 0 0 calc((100% - 6px) / 2);
    scroll-snap-align: start;
    user-select: none;
    -webkit-user-drag: none;
}

.post-card-media-item img {
    user-select: none;
    -webkit-user-drag: none;
}

.post-card-media-grid-1 {
    display: block;
}

.post-card-media-grid-1 .post-card-media-item {
    flex: 1 1 auto;
}

/* Threads-like hint: show 2 full cards + 1/2 of the third when 3+ images. */
.post-card-media-grid-3 .post-card-media-item,
.post-card-media-grid-4 .post-card-media-item {
    flex-basis: calc((100% - 12px) / 2.5);
}

.post-card-media img {
    width: 100%;
    height: 100%;
    max-height: 450px;
    object-fit: cover;
    display: block;
}

/* Infeed ads: ảnh vuông 1:1, không bị max-height chặn */
.tk-infeed-ad .post-card-media img {
    max-height: none;
    aspect-ratio: 1 / 1;
}

.post-card-media-grid::-webkit-scrollbar {
    display: none;
}

.post-card-media-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.7);
    border-radius: 999px;
}

.tk-post-media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10130;
    background: rgba(2, 6, 23, 0.84);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.tk-post-media-lightbox[hidden] {
    display: none;
}

.tk-post-media-image {
    max-width: min(96vw, 1200px);
    width: auto;
    height: 100vh;
    max-height: 100vh;
    object-fit: contain;
}

.tk-post-media-close,
.tk-post-media-nav {
    position: fixed;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tk-post-media-close {
    top: 14px;
    right: 14px;
}

.tk-post-media-nav.prev {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.tk-post-media-nav.next {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

/* Shared comment popup UI (also reused inline on single thread). */
.comment-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10120;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.42);
}

.comment-modal {
    width: min(680px, 96vw);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-xl);
    background: var(--color-neutral-0);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.comment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-neutral-200);
}

.comment-modal-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
}

.comment-modal-close {
    border: 0;
    background: transparent;
    color: var(--color-neutral-500);
    cursor: pointer;
    border-radius: var(--radius-full);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.comment-modal-close:hover {
    background: var(--color-neutral-100);
    color: var(--color-neutral-800);
}

.comment-modal-body {
    flex: 1;
    min-height: 180px;
    max-height: 58vh;
    overflow: auto;
    padding: var(--space-3);
}

.comment-modal-footer {
    border-top: 1px solid var(--color-neutral-200);
    padding: var(--space-3);
    background: var(--color-neutral-0);
}

.comment-form-inline {
    display: block;
}

.comment-input-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}

.comment-current-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    flex: 0 0 28px;
}

.comment-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.comment-input-row textarea,
.comment-form-inline textarea {
    width: 100%;
    min-height: 42px;
    max-height: 160px;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    padding: 8px 70px 8px 10px;
    resize: vertical;
    line-height: 1.4;
    box-sizing: border-box;
}

.comment-submit-btn {
    position: absolute;
    right: 10px;
    top: 8px;
    border: 0;
    border-radius: 10px;
    background: #111111;
    color: #ffffff;
    height: 28px;
    min-height: 28px;
    line-height: 28px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--transition-fast);
    font-family: inherit;
}

.comment-submit-btn:hover {
    opacity: 0.85;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2-5);
}

.comment-modal-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}

.comment-modal-item.depth-1 {
    margin-left: 30px;
}

.comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    flex: 0 0 24px;
}

.comment-modal-item .comment-body {
    flex: 1;
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    padding: 8px 10px;
}

.comment-modal-item .comment-heading {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: 4px;
}

.comment-modal-item .comment-author-line {
    font-size: var(--text-xs);
    color: var(--color-neutral-900);
}

.comment-modal-item .comment-date {
    font-size: 11px;
    color: var(--color-neutral-500);
    white-space: nowrap;
}

.comment-text-content {
    font-size: var(--text-sm);
    line-height: 1.45;
    color: var(--color-neutral-700);
}

.comment-text-content p {
    margin: 0;
}

.comment-meta-row {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.comment-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-action-btn {
    border: 1px solid var(--color-neutral-200);
    background: var(--color-neutral-0);
    font-size: 12px;
    color: var(--color-neutral-600);
    min-height: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: var(--radius-full);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.comment-action-btn:hover {
    border-color: var(--color-neutral-300);
    background: var(--color-neutral-50);
    color: var(--color-neutral-800);
}

.cmt-reaction-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cmt-react-btn {
    border: 1px solid var(--color-neutral-200);
    background: var(--color-neutral-0);
    color: var(--color-neutral-600);
    border-radius: var(--radius-full);
    min-height: 26px;
    height: 26px;
    padding: 0 8px;
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.comment-actions .comment-action-btn,
.comment-meta-row .cmt-react-btn {
    vertical-align: middle;
}

.cmt-react-btn:hover,
.cmt-react-btn.is-active {
    border-color: var(--color-neutral-300);
    background: var(--color-neutral-50);
    color: var(--color-neutral-800);
}

.cmt-react-label.is-active {
    font-weight: var(--font-medium);
}

.cmt-react-count {
    font-size: 12px;
    color: var(--color-neutral-500);
    min-width: 10px;
}

.cmt-reaction-picker {
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    display: none;
    align-items: center;
    gap: 4px;
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    padding: 4px;
    z-index: 3;
}

.cmt-reaction-picker.is-open {
    display: inline-flex;
}

.cmt-reaction-picker button {
    border: 0;
    background: transparent;
    border-radius: 999px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.cmt-reaction-picker button:hover {
    background: var(--color-neutral-100);
}

.comment-loading,
.comment-empty,
.comment-error,
.comment-load-more-hint,
.feed-status {
    font-size: var(--text-sm);
    color: var(--color-neutral-500);
    margin: 0;
    padding: var(--space-3) var(--space-1);
    text-align: center;
}

.comment-reply-badge {
    font-size: var(--text-xs);
    color: var(--color-neutral-600);
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    padding: 5px 8px;
}

.comment-reply-badge .reply-cancel {
    border: 0;
    background: transparent;
    color: var(--color-neutral-500);
    cursor: pointer;
    margin-left: var(--space-1);
}

.creative-feed-head {
    padding: 14px 16px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff 0%, #f6f8fb 100%);
    margin-bottom: 12px;
}

.creative-feed-head h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.creative-feed-head p {
    margin: 6px 0 0;
    color: var(--color-neutral-600, #4b5563);
    font-size: 14px;
}

.post-card-creative .post-card-body {
    padding-top: 10px;
}

.creative-media-link {
    display: block;
}

.creative-photo-media img,
.creative-video-media img {
    width: 100%;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.creative-video-media {
    position: relative;
}

.creative-play-pill {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 12px;
    padding: 5px 10px;
}

.creative-caption {
    font-size: 15px;
}

.creative-feed-container .no-results {
    margin: 16px 0 4px;
}

.creative-feed-container .empty-state {
    text-align: left;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}

.creative-feed-container .empty-state h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--color-neutral-700, #374151);
}

.creative-feed-container .empty-state p {
    display: none;
}

.demo-link-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    color: inherit;
    background: var(--color-neutral-0);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.demo-link-card:hover {
    border-color: var(--color-neutral-200);
    background: var(--color-neutral-50);
}

.demo-link-domain {
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.demo-link-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-800);
}

.demo-link-desc {
    font-size: var(--text-sm);
    color: var(--color-neutral-600);
    line-height: 1.45;
}

.post-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-1);
}

.post-action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-1-5) var(--space-2-5);
    border: none;
    background: none;
    color: var(--color-neutral-500);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.post-action-btn:hover {
    background: var(--color-neutral-50);
    color: var(--color-neutral-800);
}

.post-action-btn .action-count {
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
    min-width: 16px;
}

/* Like button active */
.post-action-btn.liked { color: var(--color-error-500); }
.post-action-btn.liked:hover { background: var(--color-error-50); }
.post-action-btn.liked svg { fill: var(--color-error-500); stroke: var(--color-error-500); animation: heartPop 0.4s ease; }

/* Repost button active */
.post-action-btn.reposted { color: var(--color-success-500); }

/* Card menu button */
/* Feed container */
.feed-container {
    display: flex;
    flex-direction: column;
    padding-top: 1px;
}

/* ============================================================
   TRENDING ITEM REFINED
   ============================================================ */
.trending-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-2-5) var(--space-2);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.trending-item:hover { background: var(--color-neutral-50); }

.trending-rank {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--color-neutral-400);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.3;
}

.trending-item:nth-child(-n+3) .trending-rank { color: var(--color-neutral-500); }
.trending-item:nth-child(1) .trending-rank { color: var(--color-neutral-700); font-size: var(--text-lg); }

.trending-title {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-neutral-700);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: var(--leading-snug);
}

.trending-title:hover { color: var(--dub-accent-blue); }

.trending-meta {
    font-size: var(--text-xs);
    color: var(--color-neutral-400);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}
/* ============================================================
   ADMIN LAYOUT — 2 cột (sidebar + content), full-width
   ============================================================ */
.admin-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - var(--header-height, 0px) - 1px);
}

/* Admin sidebar (trái) */
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--color-neutral-0);
    border-right: 1px solid var(--color-neutral-200);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-sticky {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--space-4) 0;
}

.admin-sidebar-brand {
    padding: 0 var(--space-4) var(--space-4);
    border-bottom: 1px solid var(--color-neutral-100);
    margin-bottom: var(--space-2);
}

.admin-sidebar-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-sidebar-logo-img {
    max-height: 32px;
    width: auto;
}

.admin-sidebar-brand-name {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--color-neutral-900);
}

.admin-sidebar-nav {
    flex: 1;
    padding: 0 var(--space-2);
}

.admin-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-sidebar-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--color-neutral-600);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
}

.admin-sidebar-item a:hover {
    background: var(--color-neutral-50);
    color: var(--color-neutral-900);
}

.admin-sidebar-item.active a {
    background: var(--color-neutral-100);
    color: var(--color-neutral-900);
    font-weight: var(--font-semibold);
}

.admin-sidebar-item.active a svg {
    color: var(--dub-accent-blue);
}

.admin-sidebar-footer {
    padding: var(--space-3) var(--space-2) 0;
    border-top: 1px solid var(--color-neutral-100);
    margin-top: auto;
}

.admin-sidebar-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--color-neutral-500);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.admin-sidebar-back:hover {
    background: var(--color-neutral-50);
    color: var(--color-neutral-900);
}

/* Admin content (phải) — full-width */
.admin-content {
    flex: 1;
    min-width: 0;
    padding: var(--space-5) var(--space-6);
    max-width: 100%;
}

/* Responsive: mobile/tablet ẩn admin sidebar */
@media (max-width: 900px) {
    .admin-sidebar {
        display: none;
    }
    .admin-content {
        padding: var(--space-4);
    }
}

/* Single thread page uses the same post card as feed for consistent UI. */
.single-thread-view {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.single-thread-topbar {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--color-neutral-0);
    padding: var(--space-1) 0;
}

.single-thread-back {
    appearance: none;
    border: 1px solid var(--color-neutral-200);
    background: var(--color-neutral-0);
    color: var(--color-neutral-800);
    border-radius: var(--radius-full);
    height: 34px;
    padding: 0 var(--space-3);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

.single-thread-back:hover {
    background: var(--color-neutral-50);
}

.single-thread-card-wrap .post-card {
    margin-bottom: 0;
}

.single-thread-comments {
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-xl);
    background: var(--color-neutral-0);
    padding: 0;
}

.single-thread-comments .comment-inline-panel.is-inline-comment {
    position: static;
    inset: auto;
    display: block !important;
    background: transparent;
    padding: 0;
}

.single-thread-comments .comment-inline-shell {
    display: block;
    width: 100%;
    overflow: visible;
    background: var(--color-neutral-0);
}

.single-thread-comments .comment-inline-header {
    border-bottom: 1px solid var(--color-neutral-200);
    padding: var(--space-3) var(--space-4);
}

.single-thread-comments .comment-inline-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
}

.single-thread-comments .comment-inline-body {
    display: block;
    overflow: visible !important;
    max-height: none !important;
    padding: var(--space-3);
}

.single-thread-comments .comment-inline-footer {
    border-top: 1px solid var(--color-neutral-200);
    padding: var(--space-3);
    background: var(--color-neutral-0);
}

/* Single thread must never show fixed popup overlays that can overlap footer. */
body.single-thread .comment-modal-overlay {
    display: none !important;
    pointer-events: none !important;
}

body.single-thread .single-thread-comments,
body.single-thread .single-thread-comments .comment-inline-panel,
body.single-thread .single-thread-comments .comment-inline-shell,
body.single-thread .single-thread-comments .comment-inline-body,
body.single-thread .single-thread-comments .comment-inline-footer {
    position: static !important;
    overflow: visible !important;
}

.single-thread-comments .comment-modal {
    width: 100%;
    max-height: none !important;
    display: block;
    overflow: visible !important;
    border: 0;
    border-radius: inherit;
    box-shadow: none;
}

.single-thread-comments .comment-modal-body {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

.single-thread-comments .comment-list {
    overflow: visible !important;
}

.single-thread-comments .comments-title {
    font-size: var(--text-base);
    margin-bottom: var(--space-3);
}

.single-thread-comments .comment-list {
    margin: 0;
    list-style: none;
    padding: 0;
}

.single-thread-comments .comment-body {
    display: block;
    gap: 0;
    min-width: 0;
}

.single-thread-comments .comment-modal-item .comment-body {
    display: block !important;
    width: 100%;
}

.single-thread-comments .comment-author-avatar {
    flex: 0 0 36px;
}

.single-thread-comments .comment-author-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 999px;
}

.single-thread-comments .comment-content {
    flex: 1;
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    padding: var(--space-2-5) var(--space-3);
}

.single-thread-comments .comment-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.single-thread-comments .comment-author-line .fn {
    font-style: normal;
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    color: var(--color-neutral-900);
}

.single-thread-comments .comment-time {
    color: var(--color-neutral-500);
    font-size: var(--text-xs);
}

.single-thread-comments .comment-text {
    color: var(--color-neutral-700);
    font-size: var(--text-sm);
    line-height: 1.45;
}

.single-thread-comments .comment-text p {
    margin: 0;
}

.single-thread-comments .comment-actions {
    margin-top: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
}

.single-thread-comments .comment-actions a {
    color: var(--color-neutral-500);
}

.single-thread-comments .comment-actions a:hover {
    color: var(--color-neutral-800);
}

.single-thread-comments .comment-reply-title {
    margin-bottom: var(--space-2);
    font-size: var(--text-base);
    color: var(--color-neutral-900);
}

.single-thread-comments .comment-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.single-thread-comments .comment-form textarea {
    width: 100%;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    resize: vertical;
    min-height: 92px;
}

.single-thread-comments .comment-form .form-submit {
    margin: 0;
}

.single-thread-comments .comment-form .btn-submit-comment {
    min-height: 36px;
    border-radius: var(--radius-full);
    padding: 0 var(--space-4);
}

/* Standalone single-thread comments UI (no popup class inheritance). */
.single-comments-panel {
    display: block;
    width: 100%;
    background: transparent;
}

.single-comments-header {
    padding: var(--space-3) var(--space-4);
}

.single-comments-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
}

.single-comments-list-wrap {
    padding: var(--space-3);
}

.single-comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.single-comments-status {
    margin: 0;
    color: var(--color-neutral-500);
    font-size: var(--text-sm);
    text-align: center;
    padding: var(--space-2) 0;
}

.single-comment-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}

.single-comment-item.depth-1 {
    margin-left: 28px;
}

.single-comment-item.depth-0 .single-comment-bubble {
    background: var(--color-neutral-0);
    border: 0;
    border-radius: 0;
    padding: 8px 0;
}

.single-comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    flex: 0 0 24px;
}

.single-comment-bubble {
    flex: 1;
    min-width: 0;
    padding: 4px 0;
}

.single-comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: 4px;
}

.single-comment-author {
    font-size: 12px;
    color: var(--color-neutral-900);
}

.comment-author-link {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}

.comment-author-link:hover {
    text-decoration: underline;
}

.single-comment-replyto {
    color: var(--color-neutral-500);
    font-weight: var(--font-normal);
}

.single-comment-time {
    font-size: 11px;
    color: var(--color-neutral-500);
    white-space: nowrap;
}

.single-comment-content {
    color: var(--color-neutral-700);
    font-size: var(--text-sm);
    line-height: 1.45;
}

.single-comment-content p {
    margin: 0;
}

.single-comment-actions {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.single-comments-panel .single-comment-actions .comment-actions {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.single-comments-panel .single-comment-actions .cmt-react-btn,
.single-comments-panel .single-comment-actions .comment-action-btn {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    margin: 0;
    min-height: 26px;
    height: 26px;
    line-height: 1;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.single-comment-action {
    border: 1px solid var(--color-neutral-200);
    background: var(--color-neutral-0);
    color: var(--color-neutral-600);
    height: 26px;
    min-height: 26px;
    border-radius: var(--radius-full);
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    cursor: pointer;
}

.single-comment-action:hover {
    border-color: var(--color-neutral-300);
    background: var(--color-neutral-50);
    color: var(--color-neutral-800);
}

.single-comments-footer {
    padding: var(--space-3);
}

.single-comments-footer-top {
    padding: var(--space-3);
}

.single-comments-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.single-comments-reply-badge {
    font-size: var(--text-xs);
    color: var(--color-neutral-600);
    padding: 4px 0;
}

.single-reply-cancel {
    border: 0;
    background: transparent;
    color: var(--color-neutral-500);
    margin-left: var(--space-1);
    cursor: pointer;
}

.single-comments-input-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}

.single-comments-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.single-comments-current-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    flex: 0 0 28px;
}

.single-comments-input-row textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    padding: 8px 70px 8px 10px;
    resize: vertical;
    line-height: 1.4;
}

.single-comments-submit-btn {
    position: absolute;
    right: 10px;
    top: 8px;
    transform: none;
    border: 0;
    border-radius: 10px;
    background: #111111;
    color: #ffffff;
    height: 28px;
    min-height: 28px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.single-comments-submit-btn:hover {
    background: #000000;
}

.single-comments-submit-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.single-comment-edit {
    margin-top: 8px;
}

.single-comment-edit-text {
    width: 100%;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    resize: vertical;
}

.single-comment-edit-actions {
    margin-top: 6px;
    display: flex;
    gap: 8px;
}

.single-comment-edit-save,
.single-comment-edit-cancel {
    border: 1px solid var(--color-neutral-200);
    background: var(--color-neutral-0);
    color: var(--color-neutral-700);
    height: 26px;
    border-radius: var(--radius-full);
    padding: 0 10px;
    font-size: 12px;
    cursor: pointer;
}
