/* ============================================================
   Croplod Social (شبیه X) - استایل اصلی سرویس
   ============================================================ */

body { background: var(--bg-primary); }

.soc-app {
    max-width: 1260px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 275px minmax(0, 600px) 320px;
    gap: 0 24px;
    justify-content: center;
    min-height: 100vh;
    padding-bottom: 140px;
}

/* ---------- نوبار سمت راست ---------- */
.soc-nav {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
}

.soc-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin-bottom: 8px;
    transition: background 150ms ease;
}
.soc-logo:hover { background: var(--bg-hover); }
.soc-logo img { width: 34px; height: 34px; object-fit: contain; }

.soc-nav-links { display: flex; flex-direction: column; gap: 2px; }

.soc-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 150ms ease;
}
.soc-nav-item svg { width: 24px; height: 24px; flex-shrink: 0; }
.soc-nav-item:hover { background: var(--bg-hover); }
.soc-nav-item.active { font-weight: 800; }
.soc-nav-item.active svg { color: var(--color-primary-500); }

.soc-nav-badge {
    background: var(--color-primary-500);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    margin-inline-start: auto;
}

.soc-post-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 18px;
    padding: 13px 20px;
    border: none;
    border-radius: 999px;
    background: var(--color-primary-500);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 150ms ease, transform 100ms ease;
}
.soc-post-btn:hover { filter: brightness(1.08); }
.soc-post-btn:active { transform: scale(0.98); }
.soc-post-btn svg { width: 20px; height: 20px; }

.soc-nav-user { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px 4px; }
.soc-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 150ms ease;
}
.soc-user-card:hover { background: var(--bg-hover); }
.soc-user-card-text { display: flex; flex-direction: column; min-width: 0; }
.soc-user-card-text b { font-size: 14px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc-user-card-text small { font-size: 12px; color: var(--text-tertiary); }
.soc-nav-sub { font-size: 12px; color: var(--color-primary-500); text-decoration: none; padding: 2px 16px; }
.soc-nav-sub:hover { text-decoration: underline; }
.soc-auth-btn { width: 100%; }

/* ---------- ستون میانی ---------- */
.soc-main {
    border-inline: 1px solid var(--border-subtle);
    min-height: 100vh;
}

.soc-main-head {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg-primary) 80%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 18px;
}
.soc-main-head h1 { font-size: 19px; font-weight: 800; color: var(--text-primary); margin: 0; }
.soc-main-head p { font-size: 12.5px; color: var(--text-tertiary); margin: 3px 0 0; }

.soc-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
}
.soc-tab {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    transition: background 150ms ease;
}
.soc-tab:hover { background: var(--bg-hover); }
.soc-tab.active { color: var(--text-primary); font-weight: 800; }
.soc-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 56px;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: var(--color-primary-500);
}

.soc-feed { }
/* ---------- کارت پست ---------- */
.post {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 120ms ease;
}
.post:hover { background: var(--bg-hover); }

.post-repost-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    padding-inline-start: 56px;
}
.post-repost-head a { color: inherit; font-weight: 700; text-decoration: none; }
.post-repost-head a:hover { text-decoration: underline; }
.post-repost-icon { width: 15px; height: 15px; color: var(--color-success-500); flex-shrink: 0; }
.post-quote-head .post-repost-icon { color: var(--color-primary-500); }
.post-reply-head { color: var(--text-tertiary); }

.post-inner { display: flex; gap: 12px; }

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5 60%, #06b6d4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
    text-decoration: none;
    transition: filter 150ms ease;
}
.post-avatar:hover { filter: brightness(1.1); }
.post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-avatar-sm { width: 36px; height: 36px; font-size: 13px; }

.post-body { flex: 1; min-width: 0; }

.post-head {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    position: relative;
}
.post-author {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-primary);
}
.post-author-name { font-size: 14.5px; font-weight: 700; }
.post-author:hover .post-author-name { text-decoration: underline; }
.post-username, .post-time { font-size: 13.5px; color: var(--text-tertiary); text-decoration: none; }
.post-username:hover, .post-time:hover { text-decoration: underline; }
.post-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    direction: ltr;
    white-space: nowrap;
}
.post-views svg { width: 14px; height: 14px; flex-shrink: 0; }

.post-dot { color: var(--text-tertiary); }

.post-menu-wrap { position: relative; margin-inline-start: auto; }
.post-menu-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 50%;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms ease, color 150ms ease;
}
.post-menu-btn:hover { background: color-mix(in srgb, var(--color-primary-500) 12%, transparent); color: var(--color-primary-500); }
.post-menu {
    position: absolute;
    top: 34px;
    left: 0;
    z-index: 40;
    min-width: 170px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 6px;
    display: flex;
    flex-direction: column;
}
.post-menu-item {
    display: block;
    width: 100%;
    text-align: right;
    padding: 9px 12px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}
.post-menu-item:hover { background: var(--bg-hover); }
.post-menu-danger { color: #dc2626 !important; }
.post-content { margin-top: 4px; }
.post-text {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-primary);
    word-break: break-word;
    white-space: normal;
}
.post-text p { margin: 0 0 8px; }
.post-text p:last-child { margin-bottom: 0; }
.post-text a { color: var(--color-primary-500); text-decoration: none; }
.post-text a:hover { text-decoration: underline; }
.post-text h1, .post-text h2, .post-text h3, .post-text h4 { margin: 10px 0 6px; font-weight: 800; }
.post-text h2 { font-size: 18px; }
.post-text h3 { font-size: 16.5px; }
.post-text ul, .post-text ol { margin: 6px 0; padding-inline-start: 22px; }
.post-text li { margin: 3px 0; }
.post-text blockquote {
    border-inline-start: 4px solid var(--color-primary-500);
    padding: 4px 12px;
    margin: 8px 0;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 4px;
}
.post-text pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px;
    overflow-x: auto;
    font-size: 13px;
    direction: ltr;
    text-align: left;
}
.post-text code {
    background: var(--bg-secondary);
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 13px;
    direction: ltr;
    unicode-bidi: embed;
}
.post-text pre code { padding: 0; background: none; }
.post-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13.5px;
}
.post-text th, .post-text td {
    border: 1px solid var(--border-strong);
    padding: 7px 10px;
    text-align: right;
}
.post-text th { background: var(--bg-secondary); font-weight: 700; }
.post-text img { max-width: 100%; border-radius: 12px; }
.post-text hr { border: none; border-top: 1px solid var(--border-strong); margin: 12px 0; }

.post-readmore {
    display: block;
    margin-top: 6px;
    border: none;
    background: none;
    color: var(--color-primary-500);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.post-readmore:hover { text-decoration: underline; }

.post-media { display: block; margin-top: 10px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-subtle); }
.post-media img { display: block; width: 100%; max-height: 480px; object-fit: cover; transition: transform 250ms ease; }
.post-media:hover img { transform: scale(1.01); }

.post-quote-box {
    margin-top: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: background 150ms ease;
}
.post-quote-box:hover { background: var(--bg-hover); }
.post-nested { padding: 10px 12px; border-bottom: none; }
.post-nested:hover { background: transparent; }
/* ---------- کامپوزر (چسبیده به پایین) ---------- */
.soc-composer {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 900;
    background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-subtle);
}
.soc-composer-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.soc-composer-collapsed {
    display: flex;
    align-items: center;
    gap: 12px;
}
.soc-avatar-mini {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-primary-500);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}
.soc-avatar-mini img { width: 100%; height: 100%; object-fit: cover; }
.soc-composer-open {
    flex: 1;
    text-align: start;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--bg-secondary);
    cursor: text;
    transition: background 150ms ease;
}
.soc-composer-open:hover { background: var(--bg-hover); }
.soc-composer-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--color-primary-500);
    cursor: pointer;
    transition: background 150ms ease;
}
.soc-composer-icon:hover { background: var(--bg-hover); }
.soc-composer-icon svg { width: 21px; height: 21px; }

.soc-composer-expanded { display: none; }
.soc-composer.expanded .soc-composer-collapsed { display: none; }
.soc-composer.expanded .soc-composer-expanded { display: block; }

.soc-composer-top {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}
.soc-composer-area {
    flex: 1;
}
.soc-composer-editor {
    width: 100%;
    min-height: 110px;
    max-height: 320px;
    resize: vertical;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 16px;
    line-height: 1.9;
    padding: 4px 2px;
}
.soc-composer-editor:focus { box-shadow: none; }

.soc-composer-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
    margin-top: 4px;
}
.soc-tool-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--color-primary-500);
    cursor: pointer;
    transition: background 150ms ease, transform 120ms ease;
}
.soc-tool-btn:hover { background: var(--bg-hover); transform: scale(1.08); }
.soc-tool-btn svg { width: 18px; height: 18px; }

.soc-more-menu {
    position: relative;
}
.soc-more-pop {
    display: none;
    position: absolute;
    bottom: 44px;
    inset-inline-start: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    padding: 6px;
    min-width: 210px;
    z-index: 60;
}
.soc-more-pop.open { display: block; }
.soc-more-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    border-radius: 10px;
    cursor: pointer;
    text-align: start;
}
.soc-more-item:hover { background: var(--bg-hover); }
.soc-more-item svg { width: 17px; height: 17px; color: var(--color-primary-500); }
.soc-more-item.h { font-size: 12px; color: var(--text-tertiary); font-weight: 700; cursor: default; }
.soc-more-item.h:hover { background: transparent; }

.soc-composer-preview {
    margin-top: 10px;
    position: relative;
    display: inline-block;
}
.soc-composer-preview img {
    max-width: 240px;
    max-height: 180px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    object-fit: cover;
}
.soc-composer-preview button {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.6);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.soc-composer-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.soc-count {
    font-size: 13px;
    color: var(--text-secondary);
}
.soc-count.over { color: var(--color-danger-500); font-weight: 700; }
.soc-composer-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary-500);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 9px 22px;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 150ms ease, transform 120ms ease, opacity 150ms ease;
}
.soc-composer-submit:hover { background: var(--color-primary-600); transform: translateY(-1px); }
.soc-composer-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.soc-composer-submit svg { width: 16px; height: 16px; }
/* ---------- پروفایل ---------- */
.soc-profile { border-inline: 1px solid var(--border-subtle); }
.soc-profile-banner {
    height: 150px;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
}
.soc-profile-main { padding: 0 16px 16px; }
.soc-profile-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: -34px;
    padding-bottom: 12px;
}
.soc-profile-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    background: var(--color-primary-500);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 26px;
    overflow: hidden;
}
.soc-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.soc-profile-actions { display: flex; gap: 8px; padding-bottom: 10px; }
.soc-profile-name { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.soc-profile-handle { color: var(--text-tertiary); font-size: 14px; margin-top: 2px; }
.soc-profile-bio {
    margin-top: 12px;
    color: var(--text-primary);
    font-size: 14.5px;
    line-height: 1.8;
    white-space: pre-line;
}
.soc-profile-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 10px;
    font-size: 13.5px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}
.soc-profile-meta svg { width: 15px; height: 15px; vertical-align: -2px; margin-inline-end: 4px; }
.soc-profile-meta a { color: inherit; text-decoration: none; }
.soc-profile-meta a:hover { text-decoration: underline; }
.soc-profile-stats { display: flex; gap: 18px; margin-top: 12px; font-size: 14px; }
.soc-profile-stats b { color: var(--text-primary); }
.soc-profile-stats span { color: var(--text-tertiary); }
.soc-profile-stats a { text-decoration: none; }
.soc-profile-stats a:hover span { text-decoration: underline; }

.soc-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 8px 20px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 150ms ease;
    background: var(--color-primary-500);
    color: #fff;
    border: 1px solid transparent;
    text-decoration: none;
}
.soc-follow-btn:hover { background: var(--color-primary-600); }
.soc-follow-btn.following {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.soc-follow-btn.following:hover { background: var(--color-danger-500); color: #fff; border-color: transparent; }

/* ---------- تب‌های پروفایل (فیلتر افقی) ---------- */
.soc-profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
    scrollbar-width: none;
}
.soc-profile-tabs::-webkit-scrollbar { display: none; }
.soc-profile-tab {
    flex: 1;
    min-width: max-content;
    text-align: center;
    padding: 14px 18px;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 14.5px;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color 150ms ease, background 150ms ease;
}
.soc-profile-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.soc-profile-tab.active { color: var(--color-primary-500); border-bottom-color: var(--color-primary-500); }

/* ---------- کاربر (دنبال‌کننده‌ها) ---------- */
.soc-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 120ms ease;
}
.soc-user-row:hover { background: var(--bg-hover); }
.soc-user-info { flex: 1; min-width: 0; }
.soc-user-info a { text-decoration: none; }
.soc-user-name { font-weight: 700; color: var(--text-primary); font-size: 15px; }
.soc-user-name:hover { text-decoration: underline; }
.soc-user-handle { color: var(--text-tertiary); font-size: 13px; }
.soc-user-bio {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ---------- اعلان‌ها ---------- */
.soc-notif-item {
    display: flex;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 120ms ease;
}
.soc-notif-item:hover { background: var(--bg-hover); }
.soc-notif-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-secondary);
    color: var(--color-primary-500);
}
.soc-notif-icon svg { width: 18px; height: 18px; }
.soc-notif-body { flex: 1; min-width: 0; font-size: 14px; color: var(--text-primary); line-height: 1.7; }
.soc-notif-body a { color: var(--color-primary-500); text-decoration: none; font-weight: 700; }
.soc-notif-body a:hover { text-decoration: underline; }
.soc-notif-time { color: var(--text-tertiary); font-size: 12.5px; margin-top: 2px; }
.soc-notif-item.unread { background: color-mix(in srgb, var(--color-primary-500) 6%, transparent); }
.soc-notif-item.unread::after {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-primary-500);
    margin-top: 6px;
    flex-shrink: 0;
}
.soc-notifs-markall { margin-inline-start: auto; }

/* ---------- جزئیات پست ---------- */
.soc-detail-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg-primary) 90%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.soc-detail-head h1 { font-size: 18px; margin: 0; }
.soc-detail-sub { color: var(--text-tertiary); font-size: 12.5px; }
.soc-back {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: background 150ms ease;
}
.soc-back:hover { background: var(--bg-hover); }
.soc-back svg { width: 19px; height: 19px; }
.soc-replies { border-top: 1px solid var(--border-subtle); }
.soc-replies-title { padding: 14px 16px 6px; font-weight: 800; color: var(--text-primary); }

/* ---------- خالی / بارگذاری ---------- */
.soc-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.soc-empty-icon { font-size: 44px; margin-bottom: 10px; }
.soc-empty h3 { color: var(--text-primary); margin: 0 0 6px; font-size: 17px; }
.soc-empty p { margin: 0; font-size: 14px; }
.soc-loadmore-wrap { text-align: center; padding: 18px; }
.soc-loadmore {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--color-primary-500);
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 26px;
    cursor: pointer;
    transition: all 150ms ease;
}
.soc-loadmore:hover { background: var(--bg-hover); }
.soc-loading-dots {
    display: inline-flex;
    gap: 5px;
    padding: 14px;
}
.soc-loading-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary-500);
    animation: soc-bounce 1s infinite ease-in-out;
}
.soc-loading-dots span:nth-child(2) { animation-delay: .15s; }
.soc-loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes soc-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: .4; }
    30% { transform: translateY(-5px); opacity: 1; }
}
/* ---------- دیالوگ ریپلای / نقل‌قول ---------- */
.soc-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.soc-modal.open { display: flex; animation: soc-fade 150ms ease; }
@keyframes soc-fade { from { opacity: 0; } to { opacity: 1; } }
.soc-modal-box {
    width: 100%;
    max-width: 560px;
    background: var(--bg-secondary);
    border-radius: 18px 18px 0 0;
    padding: 16px;
    max-height: 82vh;
    overflow-y: auto;
    animation: soc-slideup 200ms ease;
}
@media (min-width: 640px) {
    .soc-modal { align-items: center; }
    .soc-modal-box { border-radius: 18px; }
}
@keyframes soc-slideup { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.soc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.soc-modal-head h3 { margin: 0; font-size: 16px; }
.soc-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
}
.soc-modal-close:hover { background: var(--bg-hover); }
.soc-reply-target {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 13.5px;
    max-height: 96px;
    overflow: hidden;
    line-height: 1.7;
}
.soc-reply-target b { color: var(--color-primary-500); }
.soc-modal-editor {
    width: 100%;
    min-height: 110px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 16px;
    line-height: 1.9;
    resize: vertical;
}
.soc-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}
.soc-modal-submit {
    background: var(--color-primary-500);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 9px 22px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 150ms ease, transform 120ms ease;
}
.soc-modal-submit:hover { background: var(--color-primary-600); transform: translateY(-1px); }
.soc-modal-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- منوی بازپست ---------- */
.soc-repost-pop {
    display: none;
    position: absolute;
    bottom: 34px;
    inset-inline-start: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    padding: 6px;
    min-width: 190px;
    z-index: 60;
}
.soc-repost-pop.open { display: block; }
.soc-action-group { position: relative; }

/* ---------- منوی سه‌نقطه پست ---------- */
.soc-post-menu {
    position: relative;
}
.soc-post-menu-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.soc-post-menu-btn:hover { background: var(--bg-hover); color: var(--color-primary-500); }
.soc-post-menu-btn svg { width: 16px; height: 16px; }
.soc-post-menu-pop {
    display: none;
    position: absolute;
    inset-inline-end: 0;
    top: 34px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    padding: 5px;
    min-width: 170px;
    z-index: 70;
}
.soc-post-menu-pop.open { display: block; }

/* ---------- بیشتر بخوانید ---------- */
.post-text.long .js-long-text { display: none; }
.post-text.long .js-short-text { display: block; }
.post-text .js-short-text { display: none; }
.post-text.expanded .js-long-text { display: block; }
.post-text.expanded .js-short-text { display: none; }
.soc-more-btn {
    display: inline-block;
    margin-top: 6px;
    background: none;
    border: none;
    padding: 0;
    color: var(--color-primary-500);
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
}
.soc-more-btn:hover { text-decoration: underline; }

/* ---------- سایدبار (پیشنهادها) ---------- */
.soc-side {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 12px 8px;
    overflow-y: auto;
    scrollbar-width: none;
}
.soc-side::-webkit-scrollbar { display: none; }
.soc-side-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 16px;
}
.soc-side-card h3 { margin: 0 0 10px; font-size: 17px; }
.soc-side-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
}
.soc-side-user a { text-decoration: none; flex: 1; min-width: 0; }
.soc-side-user .post-avatar { width: 38px; height: 38px; font-size: 14px; }
.soc-side-user b { display: block; color: var(--text-primary); font-size: 14px; }
.soc-side-user span { color: var(--text-tertiary); font-size: 12.5px; }
.soc-side-follow {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 999px;
    padding: 6px 16px;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    transition: opacity 150ms ease;
}
.soc-side-follow:hover { opacity: .8; }
.soc-side-note {
    color: var(--text-tertiary);
    font-size: 12.5px;
    line-height: 1.8;
    padding: 8px 4px 0;
}
.soc-side-note a { color: var(--text-tertiary); text-decoration: none; margin-inline-end: 10px; }
.soc-side-note a:hover { text-decoration: underline; }

/* ---------- لیست ساده (پروفایل‌های کوچک) ---------- */
.soc-list { max-width: 600px; margin: 0 auto; min-height: 100vh; }
.soc-list .soc-feed { border-inline: 1px solid var(--border-subtle); min-height: 60vh; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1080px) {
    .soc-app { grid-template-columns: 90px minmax(0, 600px); }
    .soc-nav .soc-nav-label { display: none; }
    .soc-nav-item { justify-content: center; width: 48px; }
    .soc-side { display: none; }
    .soc-logo { margin-inline: auto; }
}
@media (max-width: 700px) {
    .soc-app { display: block; padding-bottom: 170px; }
    .soc-nav {
        position: fixed;
        top: auto;
        bottom: 0;
        inset-inline: 0;
        height: auto;
        flex-direction: row;
        justify-content: space-around;
        z-index: 950;
        background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-subtle);
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    }
    .soc-nav .soc-logo { display: none; }
    .soc-nav-item { width: 44px; height: 44px; }
    .soc-main-head h1 { font-size: 19px; }
    .soc-main-head p { display: none; }
    .soc-profile-banner { height: 110px; }
    .soc-profile-avatar { width: 62px; height: 62px; font-size: 21px; }
    .soc-composer-inner { padding-inline: 10px; }
}

/* ---------- توست ---------- */
.soc-toast {
    position: fixed;
    bottom: 90px;
    inset-inline: 0;
    margin: auto;
    width: max-content;
    max-width: 92vw;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 14px;
    border-radius: 999px;
    padding: 11px 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
    z-index: 2000;
    text-align: center;
}
.soc-toast.show { opacity: 1; transform: translateY(0); }
.soc-toast.err { background: var(--color-danger-500); color: #fff; }
/* ============ مکمل: کلاس‌های واقعی قالب‌ها (۱) ============ */

.soc-nav-links { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.soc-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 150ms ease;
    width: max-content;
    min-width: 48px;
}
.soc-nav-item:hover { background: var(--bg-hover); }
.soc-nav-item.active { font-weight: 800; }
.soc-nav-item svg { width: 24px; height: 24px; flex-shrink: 0; }
.soc-nav-badge {
    background: var(--color-primary-500);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    min-width: 19px;
    height: 19px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.soc-post-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 0;
    background: var(--color-primary-500);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 13px 22px;
    font: inherit;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: background 150ms ease, transform 120ms ease;
    width: max-content;
    min-width: 200px;
}
.soc-post-btn:hover { background: var(--color-primary-600); transform: translateY(-1px); }
.soc-post-btn svg { width: 19px; height: 19px; }
.soc-nav-user { margin-top: auto; padding-bottom: 8px; }
.soc-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 150ms ease;
}
.soc-user-card:hover { background: var(--bg-hover); }
.soc-user-card-text { min-width: 0; }
.soc-user-card-text b { display: block; color: var(--text-primary); font-size: 14px; }
.soc-user-card-text small { color: var(--text-tertiary); font-size: 12.5px; }
.soc-nav-sub {
    display: block;
    color: var(--color-primary-500);
    font-size: 13px;
    text-decoration: none;
    padding: 4px 14px;
}
.soc-nav-sub:hover { text-decoration: underline; }
.soc-auth-btn { width: max-content; min-width: 160px; margin: 4px 0; text-align: center; }

.soc-main { border-inline: 1px solid var(--border-subtle); min-height: 100vh; padding-bottom: 120px; }
.soc-main-head {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.soc-main-head h1 { margin: 0; font-size: 20px; }
.soc-main-head p { margin: 2px 0 0; color: var(--text-tertiary); font-size: 13px; }
.soc-tabs { display: flex; border-bottom: 1px solid var(--border-subtle); }
.soc-tab {
    flex: 1;
    text-align: center;
    padding: 13px;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 14.5px;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color 150ms ease, background 150ms ease;
}
.soc-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.soc-tab.active { color: var(--color-primary-500); border-bottom-color: var(--color-primary-500); }

.soc-search { position: relative; margin-bottom: 16px; }
.soc-search-icon {
    position: absolute;
    left: 14px;
    right: auto;
    inset-inline-start: auto;
    inset-inline-end: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--text-tertiary);
    pointer-events: none;
}
.soc-search input {
    width: 100%;
    background: var(--bg-secondary);
    border: none;
    box-shadow: inset 0 0 0 1px transparent;
    border-radius: 999px;
    padding: 11px 16px 11px 42px;
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: box-shadow 150ms ease, background 150ms ease;
}
.soc-search input:focus {
    box-shadow: inset 0 0 0 2px var(--color-primary-500);
    background: var(--bg-primary);
}
.soc-search-card,
.soc-explore-search {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 16px;
}
.soc-search-results {
    position: absolute;
    top: 48px;
    inset-inline: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    z-index: 80;
    max-height: 320px;
    overflow-y: auto;
}
.soc-search-results a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    border-bottom: 1px solid var(--border-subtle);
}
.soc-search-results a:hover { background: var(--bg-hover); }
.soc-search-results .soc-avatar-mini { width: 34px; height: 34px; font-size: 13px; }
.soc-widget {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 16px;
}
.soc-widget h3 { margin: 0 0 10px; font-size: 17px; }
.soc-suggest { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.soc-suggest-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; }
.soc-suggest-text b { display: block; color: var(--text-primary); font-size: 14px; }
.soc-suggest-text small { color: var(--text-tertiary); font-size: 12.5px; }
.soc-widget-links { display: grid; gap: 2px; }
.soc-widget-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    padding: 3px 0;
}
.soc-widget-links a:hover { text-decoration: underline; }
.soc-widget-links span { color: var(--text-tertiary); font-size: 12px; padding-top: 6px; }
/* ============ مکمل (۲): پست و ویرایشگر ============ */

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    max-width: 420px;
    gap: 4px;
}
.post-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
.post-action svg { width: 17px; height: 17px; }
.post-action:hover { background: color-mix(in srgb, var(--color-primary-500) 12%, transparent); color: var(--color-primary-500); }
.post-action.is-liked { color: var(--color-danger-500); }
.post-action.is-liked svg { fill: var(--color-danger-500); stroke: var(--color-danger-500); }
.post-action.is-active { color: var(--color-success-500); }
.post-action-group { position: relative; }
.post-repost-menu {
    position: absolute;
    bottom: 36px;
    inset-inline-start: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    padding: 6px;
    min-width: 170px;
    z-index: 70;
}
.post-repost-menu button {
    display: block;
    width: 100%;
    text-align: start;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
}
.post-repost-menu button:hover { background: var(--bg-hover); }

.post-menu-wrap { position: relative; margin-inline-start: auto; }
.post-menu-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms ease, color 150ms ease;
}
.post-menu-btn:hover { background: var(--bg-hover); color: var(--color-primary-500); }
.post-menu {
    position: absolute;
    inset-inline-end: 0;
    top: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    padding: 5px;
    min-width: 170px;
    z-index: 80;
}
.post-menu-item {
    display: block;
    width: 100%;
    text-align: start;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 13.5px;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
}
.post-menu-item:hover { background: var(--bg-hover); }
.post-menu-danger { color: var(--color-danger-500) !important; }
.post-menu form { margin: 0; }

.post-head { display: flex; align-items: center; gap: 6px; }
.post-author { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.post-author-name { color: var(--text-primary); font-weight: 800; font-size: 14.5px; }
.post-author:hover .post-author-name { text-decoration: underline; }
.post-username, .post-time { color: var(--text-tertiary); font-size: 13px; text-decoration: none; }
.post-username:hover { text-decoration: underline; }
.post-dot { color: var(--text-tertiary); }
.post-readmore {
    display: block;
    margin-top: 6px;
    background: none;
    border: none;
    padding: 0;
    color: var(--color-primary-500);
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
}
.post-readmore:hover { text-decoration: underline; }
.post-text-clamp { overflow: hidden; }
.post-text-full { margin-top: 4px; }
.post-text img { max-width: 100%; border-radius: 14px; margin: 6px 0; }
.post-text table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13.5px; }
.post-text th, .post-text td { border: 1px solid var(--border-subtle); padding: 7px 10px; text-align: start; }
.post-text th { background: var(--bg-secondary); font-weight: 800; }
.post-text pre { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 12px; overflow-x: auto; direction: ltr; text-align: left; }
.post-text code { background: var(--bg-secondary); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.post-quote-box {
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    margin-top: 8px;
    overflow: hidden;
}
.post-quote-box .post { border-bottom: none; }
.post-media { display: block; margin-top: 8px; }
.post-media img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 14px; }
.post-nested .post-avatar-sm { width: 30px; height: 30px; font-size: 12px; }

.soc-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 5px 7px;
    margin-bottom: 8px;
    background: var(--bg-secondary);
}
.soc-toolbar button {
    min-width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    padding: 0 8px;
    transition: background 150ms ease, color 150ms ease;
}
.soc-toolbar button:hover { background: var(--bg-hover); color: var(--color-primary-500); }
.soc-tb-sep { width: 1px; height: 20px; background: var(--border-subtle); margin: 0 4px; }
.soc-more-wrap { position: relative; }
.soc-more-menu {
    position: absolute;
    bottom: 36px;
    inset-inline-start: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    padding: 5px;
    min-width: 190px;
    z-index: 90;
    display: grid;
    gap: 1px;
}
.soc-more-menu button {
    width: 100%;
    text-align: start;
    padding: 9px 11px;
}
.soc-editor {
    min-height: 110px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 4px;
    outline: none;
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-primary);
}
.soc-editor:empty:before {
    content: attr(data-placeholder);
    color: var(--text-tertiary);
    pointer-events: none;
}
.soc-editor img { max-width: 100%; border-radius: 10px; }
.soc-editor table { width: 100%; border-collapse: collapse; }
.soc-editor th, .soc-editor td { border: 1px solid var(--border-subtle); padding: 5px 8px; }
.soc-composer-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}
.soc-char-count { color: var(--text-secondary); font-size: 13px; }
.soc-long-hint { color: var(--color-primary-500); font-size: 12.5px; font-weight: 700; }
.soc-publish {
    background: var(--color-primary-500);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 9px 24px;
    font: inherit;
    font-weight: 800;
    font-size: 14.5px;
    cursor: pointer;
    transition: background 150ms ease, transform 120ms ease, opacity 150ms ease;
}
.soc-publish:hover { background: var(--color-primary-600); transform: translateY(-1px); }
.soc-publish:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.soc-composer-context {
    display: flex;
    align-items: center;
    gap: 8px;
    background: color-mix(in srgb, var(--color-primary-500) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-primary-500) 25%, transparent);
    border-radius: 999px;
    padding: 5px 8px 5px 14px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--color-primary-500);
    font-weight: 700;
    width: max-content;
    max-width: 100%;
}
.soc-composer-context button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--color-primary-500);
    cursor: pointer;
}
.soc-composer-context button:hover { background: color-mix(in srgb, var(--color-primary-500) 15%, transparent); }

.soc-login-dock {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 900;
    background: color-mix(in srgb, var(--bg-primary) 90%, transparent);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-subtle);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}
.soc-login-dock p { margin: 0; font-weight: 700; color: var(--text-primary); }
.soc-login-dock .btn { text-decoration: none; }

@media (max-width: 1080px) {
    .soc-post-btn { min-width: 0; width: 48px; padding: 13px; }
    .soc-post-btn span { display: none; }
    .soc-user-card-text, .soc-nav-sub { display: none; }
}
@media (max-width: 700px) {
    .soc-auth-btn { min-width: 120px; }
    .soc-nav-item span { display: none; }
    .soc-nav-item { padding: 10px; }
    .soc-post-btn { display: none; }
}
/* ================= اصلاحات Round 2 ================= */

/* --- ۱) رفع باگ: مودال‌ها نباید در حالت عادی باز باشند --- */
[hidden] { display: none !important; }

/* --- ۲) آیکون‌های متا پروفایل (SVG) --- */
.soc-meta-icon { display: inline-flex; align-items: center; gap: 5px; }
.soc-meta-icon svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .85; }
.soc-context-x { display: inline-flex; align-items: center; justify-content: center; background: transparent; border: none; color: var(--text-secondary); cursor: pointer; padding: 4px; border-radius: 6px; }
.soc-context-x:hover { background: var(--bg-hover); color: var(--color-danger-500); }
.soc-context-x svg { width: 14px; height: 14px; }

/* --- ۳) دکمه سه‌نقطه منوی ویرایشگر --- */
.soc-more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.soc-more-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }
.soc-more-menu button svg { width: 15px; height: 15px; vertical-align: -2px; margin-inline-end: 6px; }

/* --- ۴) موبایل: نوبار افقی پایین فقط آیکون --- */
@media (max-width: 700px) {
    .soc-nav { justify-content: center; }
    .soc-nav-links {
        flex-direction: row;
        width: 100%;
        max-width: 420px;
        justify-content: space-around;
        margin-top: 0;
        gap: 0;
    }
    .soc-nav-item {
        min-width: 0;
        width: 48px;
        padding: 8px;
        justify-content: center;
        position: relative;
    }
    .soc-nav-item span { display: none; }
    .soc-nav-user { display: none; }
    .soc-nav-badge {
        position: absolute;
        top: 2px;
        inset-inline-end: 0;
        min-width: 17px;
        height: 17px;
        font-size: 10px;
        padding: 0 4px;
    }

    /* --- ۵) کامپوزر بالای نوبار پایین --- */
    .soc-composer { bottom: calc(58px + env(safe-area-inset-bottom)); }
    .soc-login-dock { bottom: calc(58px + env(safe-area-inset-bottom)); }
    .soc-app { padding-bottom: 240px; }

    /* --- ۶) ویرایشگر موبایل: جمع‌وجور در سه‌نقطه --- */
    .soc-toolbar { flex-wrap: nowrap; }
    .soc-toolbar > button[data-cmd],
    .soc-toolbar > .soc-tb-sep { display: none !important; }
    .soc-more-toggle span { display: none; }
    .soc-more-toggle { min-width: 34px; height: 32px; justify-content: center; padding: 0 8px; }
    .soc-more-menu {
        bottom: auto;
        top: calc(100% + 6px);
        inset-inline-end: 0;
        inset-inline-start: auto;
        min-width: 200px;
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* ================= چیدمان صفحه اصلی (گرید دو ستونه) ================= */
.soc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}
.soc-layout-main { min-width: 0; }
.soc-layout-side {
    position: sticky;
    top: calc(var(--header-height, 64px) + 20px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* کارت فید */
.soc-feed-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
}
.soc-feed-card .post:last-child { border-bottom: none; }

/* نشان اعلان در سایدبار */
.account-sidebar-link .soc-nav-badge {
    margin-inline-start: auto;
    min-width: 20px;
    height: 20px;
    font-size: 11px;
}

/* ابعاد استاندارد آیکون‌ها */
.post-action svg { width: 18px; height: 18px; }
.post-action.is-saved { color: var(--color-primary-500); }
.post-action.is-saved svg { fill: var(--color-primary-500); stroke: var(--color-primary-500); }
.post-menu-btn svg { width: 18px; height: 18px; }
.post-repost-icon { width: 16px; height: 16px; }

@media (max-width: 1023px) {
    .soc-layout { grid-template-columns: 1fr; }
    .soc-layout-side { display: none; }
    .post-action svg { width: 19px; height: 19px; }
}

/* جستجوی اکتشاف (تب «همه») */
.soc-discover-card { margin-bottom: 16px; }
@media (max-width: 1023px) {
  .soc-discover-card { margin-bottom: 12px; }
}
/* ============================================================
   Croplod Social - Fixes v6 (ضافه‌شده روی انتهای فایل)
   ============================================================ */

/* --- کامپوزر: نه تمام‌عرض، نه روی سایدبار --- */
.soc-composer {
    inset-inline: 0;
    margin-inline: auto;
    max-width: 680px;
    z-index: 250; /* زیر سایدبار (400) و زیر پوشش سایدبار (300) */
}
.soc-login-dock {
    z-index: 250;
}

/* --- ستون چپ (جستجو + پیشنهادها): ثابت + اسکرول مستقل از پست‌ها --- */
.soc-layout-side {
    position: sticky;
    top: calc(var(--header-height, 64px) + 16px);
    height: calc(100vh - var(--header-height, 64px) - 24px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
    padding-inline-end: 4px;
}
.soc-layout-side::-webkit-scrollbar { width: 5px; }
.soc-layout-side::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
.soc-layout-side .account-card { flex-shrink: 0; }

/* --- نتایج جستجو داخل همان ستون بمانند --- */
.soc-search { position: relative; }
.soc-search-results {
    position: absolute;
    top: 46px;
    inset-inline: 0;
    max-height: 300px;
    overflow-y: auto;
    z-index: 120;
}
.soc-search-results a { display: flex; align-items: center; gap: 10px; }
.soc-search-name { display: inline-flex; align-items: center; gap: 4px; }
.soc-search-name .cr-badge { width: 15px; height: 15px; flex-shrink: 0; }

/* --- آیکون‌های منوی سه‌نقطه پست --- */
.post-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: start;
}
.post-menu-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-secondary);
}
.post-menu-danger svg { color: var(--color-danger-500); }

/* --- منوی «گزینه‌های بیشتر»: دسته‌بندی چند قسمتی --- */
.soc-more-menu {
    grid-template-columns: 1fr 1fr;
    min-width: 320px;
    max-width: 92vw;
    max-height: 62vh;
    overflow-y: auto;
    padding: 6px;
    gap: 2px 4px;
}
.soc-more-group { display: contents; }
.soc-more-head {
    grid-column: 1 / -1;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-tertiary);
    padding: 7px 8px 2px;
    margin-top: 2px;
    border-bottom: 1px solid var(--border-subtle);
}
.soc-more-menu button {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.soc-more-menu button svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    vertical-align: -2px;
    margin-inline-end: 5px;
}

/* --- آیکون‌های پیشنهادها + نشان تایید --- */
.soc-suggest-text { display: flex; flex-direction: column; }
.soc-suggest-text b { display: inline-flex; align-items: center; gap: 4px; }
.soc-suggest-text .cr-badge { width: 15px; height: 15px; flex-shrink: 0; }

/* --- موبایل: کامپوزر چسبیده به کف، پشت سایدبار --- */
@media (max-width: 700px) {
    .soc-composer {
        bottom: 0;
        max-width: none;
        width: 100%;
    }
    .soc-composer-inner {
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    }
    .soc-more-menu {
        min-width: 240px;
        max-height: 55vh;
    }
}

/* --- پاک‌سازی: فقط یک باکس جستجو (دسکتاپ: سمت چپ) --- */
.soc-discover-card { display: none !important; }
/* --- لاگین داک: هم‌عرض با کامپوزر --- */
.soc-login-dock {
    inset-inline: 0;
    margin-inline: auto;
    max-width: 680px;
    border-radius: 16px 16px 0 0;
    border-inline: 1px solid var(--border-subtle);
}
@media (max-width: 700px) {
    .soc-login-dock {
        max-width: none;
        width: 100%;
        border-radius: 0;
        border-inline: none;
    }
}
/* ============================================================
   Croplod Social - Fixes v8 (اکتشاف جدا + اسکرول مستقل ستون چپ)
   ============================================================ */

/* رفع اسکرول مشترک: overflow-x:hidden روی account-shell باعث می‌شود
   position:sticky کار نکند (ancestor تبدیل به scroll container می‌شود) */
.account-shell {
    overflow-x: clip;
}

/* --- دکمه جستجو در نوار کامپوزر (فقط موبایل): مسیر به صفحه اکتشاف --- */
.soc-composer-search {
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary, #666);
}
@media (max-width: 1023px) {
    .soc-composer-search {
        display: inline-flex;
    }
}

/* --- صفحه اکتشاف: جستجوی بزرگ در ستون اصلی --- */
.soc-explore-search {
    margin-bottom: 0;
}
.soc-search-lg .soc-search-icon {
    width: 20px;
    height: 20px;
    inset-inline-start: 14px;
}
.soc-search-lg input {
    padding: 13px 46px;
    font-size: 15px;
    height: auto;
}
.soc-search-lg .soc-search-results {
    top: 56px;
    max-height: 320px;
}
.soc-explore-tabs {
    margin: 16px 0;
}
/* ============================================================
   Croplod Social - Fixes v9 (آیکون ریپست + جایگاه منوی گزینه‌های بیشتر)
   ============================================================ */

/* --- آیکون‌های منوی بازپست: اندازه استاندارد ۱۶px --- */
.post-repost-menu button svg,
.soc-repost-pop button svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    vertical-align: -2px;
    margin-inline-end: 6px;
}

/* --- منوی «گزینه‌های بیشتر»: داخل کادر کامپوزر، بالای تولبار --- */
.soc-more-menu {
    bottom: 40px;
    inset-inline-start: auto;
    inset-inline-end: 0;
}

/* --- موبایل: منو رو به بالا باز شود (نه رو به بیرون کادر/لبه صفحه) --- */
@media (max-width: 700px) {
    .soc-more-menu {
        top: auto;
        bottom: 40px;
        inset-inline-end: 0;
        inset-inline-start: auto;
    }
}
/* ============================================================
   Croplod Social - Fixes v10 (جلوگیری از تکرار نمایش پست + مودال موبایل)
   ============================================================ */

/* --- ارجاع فشرده بازپست/نقل‌قول وقتی پست اصلی از قبل در فید است --- */
.post-ref {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 8px 12px;
    margin: 4px 0 2px;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    font-size: 13px;
    transition: background 150ms ease;
}
.post-ref:hover { background: var(--bg-hover); }
.post-ref-head { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.post-ref-head b { color: var(--text-primary); }
.post-ref-head svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--color-success-500); }
.post-ref-quote .post-ref-head svg { color: var(--color-primary-500); }
.post-ref-text {
    color: var(--text-tertiary);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* --- موبایل: مودال ابزارهای ویرایشگر وسط صفحه، همیشه دیده می‌شود --- */
@media (max-width: 700px) {
    .soc-more-menu {
        position: fixed;
        inset-inline: 12px;
        top: 50%;
        transform: translateY(-50%);
        min-width: 0;
        max-width: none;
        max-height: 62vh;
        z-index: 300;
        box-shadow: 0 16px 48px rgba(0, 0, 0, .4);
    }
}
/* ============================================================
   Croplod Social - Fixes v11 (وسط‌چین واقعی مودال موبایل)
   ============================================================ */

/* رفع: bottom باقی‌مانده از v9 باعث کش‌آمدن مودال به‌جای وسط‌چین می‌شد */
@media (max-width: 700px) {
    .soc-more-menu {
        bottom: auto;
    }
}
/* ============================================================
   Croplod Social - Fixes v13 (منشن + پست درجا + تب‌های چسبان)
   ============================================================ */

/* --- منشن @username --- */
.mention {
    color: var(--color-primary-500);
    font-weight: 600;
    text-decoration: none;
}
.mention:hover { text-decoration: underline; }

/* --- باکس پیشنهاد منشن --- */
.soc-mention-box {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    padding: 5px;
    min-width: 220px;
    max-width: 300px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1200;
}
.soc-mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
}
.soc-mention-item.active,
.soc-mention-item:hover { background: var(--bg-hover); }
.soc-mention-item .soc-avatar-mini { width: 32px; height: 32px; font-size: 13px; }
.soc-mention-meta { display: flex; flex-direction: column; }
.soc-mention-meta b { font-size: 13.5px; }
.soc-mention-meta small { color: var(--text-tertiary); }

/* --- تب‌های «همه / دنبال‌شده‌ها» چسبان به بالای صفحه --- */
.soc-tabs {
    position: sticky;
    top: var(--header-height, 64px);
    z-index: 120;
    background: color-mix(in srgb, var(--bg-secondary) 94%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 14px 14px 0 0;
}
.soc-explore-tabs {
    top: calc(var(--header-height, 64px) + 16px);
}

/* ================= اصلاحات Round 3 ================= */

/* --- تیک تأیید: هم‌راستا با اسم (پروفایل + پیشنهادها) --- */
.soc-suggest-text b {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.soc-suggest-text b .cr-badge {
    margin-inline-start: 2px;
}
.soc-name-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}
.soc-name-badge .cr-badge {
    margin-inline-start: 2px;
    flex-shrink: 0;
}
.account-profile-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* --- تب‌ها: چسبیدن کامل زیر هدر + فاصله پست اول --- */
.soc-layout-main .soc-tabs {
    position: sticky;
    top: var(--header-height, 64px);
    z-index: 40;
    border-radius: 12px 12px 0 0;
    background: color-mix(in srgb, var(--bg-secondary) 94%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.soc-layout-main .soc-feed-card {
    margin-top: 14px;
}

/* --- فضای استاندارد زیر هدر در صفحات اجتماعی (رفع فضای خالی) --- */
.account-content:has(> .soc-layout) {
    padding-top: 16px;
    padding-bottom: 56px;
}

/* --- سابقه جستجو (اکتشاف) --- */
.soc-history-card .account-card-header {
    margin-bottom: 12px;
}
.soc-history-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: none;
    color: var(--text-tertiary);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 999px;
    transition: color 150ms ease, background 150ms ease;
}
.soc-history-clear:hover {
    color: var(--color-danger-500);
    background: color-mix(in srgb, var(--color-danger-500) 10%, transparent);
}
.soc-history-clear svg { width: 14px; height: 14px; }
.soc-history-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.soc-history-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.soc-history-chip:hover {
    border-color: var(--color-primary-500);
    color: var(--color-primary-500);
    background: color-mix(in srgb, var(--color-primary-500) 8%, transparent);
}
.soc-history-empty { color: var(--text-tertiary); font-size: 13px; }

/* --- هدر فید پیشنهادی --- */
.soc-feed-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 2px 2px 12px;
}
.soc-feed-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}
.soc-feed-sub {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* --- لیست‌ها: اعداد و نقاط بزرگ --- */
.post-text ul li::marker,
.soc-editor ul li::marker,
.cp-editor ul li::marker {
    color: var(--color-primary-500);
    font-size: 1.4em;
    font-weight: 800;
}
.post-text ol li::marker,
.soc-editor ol li::marker,
.cp-editor ol li::marker {
    color: var(--color-primary-500);
    font-size: 1.2em;
    font-weight: 800;
}

/* --- بلوک کد: هایلایت + دکمه کپی --- */
pre { position: relative; }
.soc-code-copy {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 150ms ease, background 150ms ease, color 150ms ease;
    z-index: 5;
}
pre:hover .soc-code-copy,
.soc-code-copy:focus-visible { opacity: 1; }
.soc-code-copy:hover {
    background: var(--bg-hover);
    color: var(--color-primary-500);
}
.soc-code-copy.copied { color: var(--color-success-500); }
.soc-code-copy svg { width: 15px; height: 15px; }

/* رنگ توکن‌های هایلایت (پیش‌فرض: تم تیره) */
.tok-kw { color: #c678dd; font-weight: 600; }
.tok-str { color: #98c379; }
.tok-num { color: #d19a66; }
.tok-cm { color: #7f848e; font-style: italic; }
.tok-fn { color: #61afef; }
.tok-tag { color: #e06c75; }
:root[data-theme="light"] .tok-kw { color: #8250df; }
:root[data-theme="light"] .tok-str { color: #1a7f37; }
:root[data-theme="light"] .tok-num { color: #9a6700; }
:root[data-theme="light"] .tok-cm { color: #6e7781; }
:root[data-theme="light"] .tok-fn { color: #0550ae; }
:root[data-theme="light"] .tok-tag { color: #cf222e; }
:root[data-theme="system"] .tok-kw { color: #c678dd; }
:root[data-theme="system"] .tok-str { color: #98c379; }
:root[data-theme="system"] .tok-num { color: #d19a66; }
:root[data-theme="system"] .tok-cm { color: #7f848e; }
:root[data-theme="system"] .tok-fn { color: #61afef; }
:root[data-theme="system"] .tok-tag { color: #e06c75; }
@media (prefers-color-scheme: light) {
    :root[data-theme="system"] .tok-kw { color: #8250df; }
    :root[data-theme="system"] .tok-str { color: #1a7f37; }
    :root[data-theme="system"] .tok-num { color: #9a6700; }
    :root[data-theme="system"] .tok-cm { color: #6e7781; }
    :root[data-theme="system"] .tok-fn { color: #0550ae; }
    :root[data-theme="system"] .tok-tag { color: #cf222e; }
}

/* --- دکمه شناور نوشتن پست (+) --- */
.soc-fab {
    position: fixed;
    bottom: calc(86px + env(safe-area-inset-bottom));
    inset-inline-end: 18px;
    z-index: 960;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-500);
    color: #fff;
    box-shadow: 0 10px 26px rgba(99, 102, 241, 0.45);
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
    text-decoration: none;
}
.soc-fab:hover {
    transform: scale(1.08);
    filter: brightness(1.08);
    box-shadow: 0 14px 32px rgba(99, 102, 241, 0.55);
}
.soc-fab:active { transform: scale(0.94); }
.soc-fab svg { width: 26px; height: 26px; }

/* --- موبایل: کارت پست چسبیده به لبه‌های صفحه + بدون گوشه گرد --- */
@media (max-width: 639px) {
    .soc-layout {
        display: block;
    }
    .soc-layout-main {
        margin-inline: -16px;
    }
    .soc-layout-side {
        margin-inline: 16px;
        margin-top: 16px;
        position: static;
    }
    .soc-layout-main .soc-tabs {
        margin-inline: 0;
        padding-inline: 0;
        top: var(--header-height, 56px);
    }
    .soc-layout-main .soc-feed-card {
        margin-top: 12px;
        border-radius: 0 !important;
        border-inline: 0;
    }
    .soc-feed-card .post {
        border-radius: 0 !important;
    }
    /* فاصله محتوای پست از لبه‌های کارت — فقط موبایل */
    .post-content {
        padding-inline: 8px;
        padding-block: 2px 6px;
    }
    .post-media,
    .post-media img,
    .post-text img,
    .post-quote-box {
        border-radius: 0 !important;
    }
    .soc-fab {
        bottom: calc(20px + env(safe-area-inset-bottom));
        inset-inline-end: 16px;
        width: 54px;
        height: 54px;
        box-shadow: 0 10px 24px rgba(99, 102, 241, 0.5);
    }
}
@media (min-width: 640px) {
    .soc-fab {
        bottom: 28px;
        inset-inline-end: 28px;
    }
}

/* ================= اصلاحات Round 4: ثابت‌سازی کامل تب‌ها و باکس‌های سرچ ================= */

/* --- تب‌های «همه / دنبال‌شده‌ها»: کاملاً چسبان زیر هدر، بدون اسکرول --- */
.soc-layout-main .soc-tabs {
    position: sticky;
    top: var(--header-height, 64px);
    z-index: 80;
    background: var(--bg-secondary);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* فاصله بیشتر بین تب‌ها و اولین پست */
.soc-layout-main .soc-feed-card {
    margin-top: 18px;
}

/* --- باکس جستجوی سایدبار: ثابت بالای ستون کناری (با اسکرول داخلی خودش) --- */
.soc-layout-side .soc-search-card {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--bg-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- باکس جستجوی صفحه اکتشاف: کاملاً چسبان زیر هدر --- */
.soc-layout-main .soc-explore-search {
    position: sticky;
    top: var(--header-height, 64px);
    z-index: 80;
    background: var(--bg-card);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* ================= اصلاحات Round 5: مخفی‌سازی کامل سایدبار در موبایل ================= */
/* سایدبار (جستجو + پیشنهادها + لینک‌های سریع) در موبایل و تبلت کاملاً مخفی شود */
@media (max-width: 1023px) {
    .soc-layout-side {
        display: none !important;
    }
}

/* ================= اصلاحات Round 6: فقط پست‌ها اسکرول می‌خورند ================= */
/* صفحه اجتماعی (خانه/اکتشاف): هدر ثابت، تب‌ها چسبان زیر هدر، فقط ستون پست‌ها اسکرول */
.account-content:has(> .soc-layout) {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height, 64px));
    height: calc(100dvh - var(--header-height, 64px));
    overflow: hidden;
    padding: 0 16px 16px;
    box-sizing: border-box;
}
.soc-layout {
    flex: 1;
    min-height: 0;
}
.soc-layout-main {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
/* تب‌های «همه / دنبال‌شده‌ها»: چسبان به بالای ستون اسکرول (دقیقاً زیر هدر) */
.soc-layout-main .soc-tabs {
    position: sticky;
    top: 0;
    z-index: 80;
    margin: 0;
    background: var(--bg-secondary);
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
/* باکس جستجوی صفحه اکتشاف: چسبان به بالای ستون اسکرول */
.soc-layout-main .soc-explore-search {
    position: sticky;
    top: 0;
    z-index: 80;
}
/* فاصله پست اول از تب‌ها */
.soc-layout-main .soc-feed-card {
    margin-top: 16px;
}
@media (max-width: 639px) {
    .account-content:has(> .soc-layout) {
        padding: 0 0 16px;
    }
    .soc-layout-main .soc-tabs {
        top: 0;
        margin-inline: 0;
        border-radius: 0;
    }
    .soc-layout-main .soc-feed-card {
        margin-top: 12px;
    }
}


/* ================= اصلاح تم تاریک: حذف هایلایت/برچسب روشن ذخیره‌شده در متن پست‌ها =================
/* ادیتور هنگام ساخت پست، spanهایی با background-color روشن (مثل rgb(248,249,250)) و color خاکستری
   در content_html ذخیره می‌کند که در تم تاریک مانند برچسب روشن روی متن دیده شده و متن را می‌پوشاند. */
[data-theme="dark"] .post-text p > span,
[data-theme="dark"] .post-text h1 > span,
[data-theme="dark"] .post-text h2 > span,
[data-theme="dark"] .post-text h3 > span,
[data-theme="dark"] .post-text h4 > span,
[data-theme="dark"] .post-text h5 > span,
[data-theme="dark"] .post-text li > span,
[data-theme="dark"] .post-text blockquote > span,
[data-theme="dark"] .post-text div > span {
    background-color: transparent !important;
    color: var(--text-primary) !important;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .post-text p > span,
    :root:not([data-theme="light"]) .post-text h1 > span,
    :root:not([data-theme="light"]) .post-text h2 > span,
    :root:not([data-theme="light"]) .post-text h3 > span,
    :root:not([data-theme="light"]) .post-text h4 > span,
    :root:not([data-theme="light"]) .post-text h5 > span,
    :root:not([data-theme="light"]) .post-text li > span,
    :root:not([data-theme="light"]) .post-text blockquote > span,
    :root:not([data-theme="light"]) .post-text div > span {
        background-color: transparent !important;
        color: var(--text-primary) !important;
    }
}


/* ===== صفحه جزئیات پست: کارت تمام‌عرض + گوشه صاف (موبایل و دسکتاپ) ===== */
.soc-detail {
    margin-inline: -32px;
}
.soc-detail .soc-feed-card {
    border-radius: 0 !important;
    border-inline: 0;
}
@media (max-width: 1023px) {
    .soc-detail {
        margin-inline: -20px;
    }
}
@media (max-width: 639px) {
    .soc-detail {
        margin-inline: -16px;
    }
}

