/* ==========================================================================
   «Постинг» (редизайн 15.11.2026) — раздел #postingTab и окно редактора поста (#advModal .pst-editor).
   Шапка раздела, вкладки-пилюли, лента постов карточками по месяцам, редактор с превью, комментирование
   Threads с ответом в карточке, аналитика (показатели + графики), карточки подключений и брендбук.
   Всё под #postingTab / #advModal .pst-editor, классы с префиксом pst-. Разметка — index.html и app.js
   (loadPostingTab, renderAdvPosts, openAdvPostEditor, renderPostingComments, renderPostingAnalytics,
   renderPostingConnections, renderBrandSettings). Светлая и тёмная тема (body[data-theme="dark"]).
   Обычные <select> и чекбоксы — без своих appearance: их общий вид задаёт style-new.css.
   ========================================================================== */
#postingTab,
#advModal .pst-editor {
    --pst-bg: #f4f6fa;
    --pst-card: #ffffff;
    --pst-soft: #f8fafc;
    --pst-soft2: #f1f5f9;
    --pst-bd: #e4e8ef;
    --pst-bd2: #d5dce6;
    --pst-ink: #0f172a;
    --pst-ink2: #334155;
    --pst-mut: #64748b;
    --pst-meta: #94a3b8;
    --pst-pri: #074783;
    --pst-pri-h: #0a5ca8;
    --pst-pri-soft: rgba(7, 71, 131, 0.08);
    --pst-pri-soft2: rgba(7, 71, 131, 0.14);
    --pst-pri-ink: #ffffff;
    --pst-bar: #2a78d6;
    --pst-bar-soft: rgba(42, 120, 214, 0.18);
    --pst-ai1: #6366f1;
    --pst-ai2: #8b5cf6;
    --pst-ok: #047857;
    --pst-ok-bg: #ecfdf5;
    --pst-ok-bd: #a7f3d0;
    --pst-warn: #b45309;
    --pst-warn-bg: #fffbeb;
    --pst-warn-bd: #fde68a;
    --pst-bad: #b91c1c;
    --pst-bad-bg: #fef2f2;
    --pst-bad-bd: #fecaca;
    --pst-info: #1d4ed8;
    --pst-info-bg: #eff6ff;
    --pst-ig: #d6336c;
    --pst-ig-bg: #fdebf2;
    --pst-fb: #1877f2;
    --pst-fb-bg: #e8f1fe;
    --pst-th: #111827;
    --pst-th-bg: #eef0f3;
    --pst-tg: #1c93d1;
    --pst-tg-bg: #e6f4fb;
    --pst-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.05);
    --pst-shadow-h: 0 10px 28px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.06);
    --pst-pop: 0 24px 64px rgba(15, 23, 42, 0.28);
    --pst-r: 14px;
    --pst-r-sm: 10px;
    color: var(--pst-ink);
}
body[data-theme="dark"] #postingTab,
body[data-theme="dark"] #advModal .pst-editor {
    --pst-bg: #0b1220;
    --pst-card: #111a2b;
    --pst-soft: #0f1726;
    --pst-soft2: #172236;
    --pst-bd: #1f2a3d;
    --pst-bd2: #2b3850;
    --pst-ink: #f1f5f9;
    --pst-ink2: #cbd5e1;
    --pst-mut: #94a3b8;
    --pst-meta: #64748b;
    --pst-pri: #4a9eff;
    --pst-pri-h: #6db3ff;
    --pst-pri-soft: rgba(74, 158, 255, 0.12);
    --pst-pri-soft2: rgba(74, 158, 255, 0.2);
    --pst-pri-ink: #06121f;
    --pst-bar: #3987e5;
    --pst-bar-soft: rgba(57, 135, 229, 0.25);
    --pst-ok: #34d399;
    --pst-ok-bg: rgba(16, 185, 129, 0.12);
    --pst-ok-bd: rgba(16, 185, 129, 0.32);
    --pst-warn: #fbbf24;
    --pst-warn-bg: rgba(245, 158, 11, 0.12);
    --pst-warn-bd: rgba(245, 158, 11, 0.32);
    --pst-bad: #fca5a5;
    --pst-bad-bg: rgba(239, 68, 68, 0.12);
    --pst-bad-bd: rgba(239, 68, 68, 0.32);
    --pst-info: #93c5fd;
    --pst-info-bg: rgba(59, 130, 246, 0.14);
    --pst-ig: #f472a8;
    --pst-ig-bg: rgba(236, 72, 153, 0.16);
    --pst-fb: #6aa8ff;
    --pst-fb-bg: rgba(24, 119, 242, 0.18);
    --pst-th: #e2e8f0;
    --pst-th-bg: rgba(148, 163, 184, 0.16);
    --pst-tg: #5cc2f2;
    --pst-tg-bg: rgba(28, 147, 209, 0.18);
    --pst-shadow: none;
    --pst-shadow-h: 0 10px 28px rgba(0, 0, 0, 0.45);
    --pst-pop: 0 24px 64px rgba(0, 0, 0, 0.6);
}

#postingTab.active { overflow-y: auto; overflow-x: hidden; }
#postingTab .pst { width: 100%; max-width: 1480px; margin: 0 auto; padding: 4px 0 56px; display: flex; flex-direction: column; gap: 16px; min-width: 0; font-variant-numeric: tabular-nums; }
#postingTab .pst svg,
#advModal .pst-editor svg { flex: none; }
#postingTab .pst-ico { display: inline-flex; align-items: center; justify-content: center; }
#postingTab .pst-dim,
#advModal .pst-editor .pst-dim { color: var(--pst-meta); }
#postingTab code,
#advModal .pst-editor code { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em; background: var(--pst-soft2); color: var(--pst-ink2); padding: 1px 5px; border-radius: 5px; }

/* ── шапка раздела ── */
#postingTab .pst-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
#postingTab .pst-head-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
#postingTab .pst-head-ico { width: 46px; height: 46px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #074783 0%, #0a5ca8 55%, #3b82f6 100%); box-shadow: 0 6px 16px rgba(7, 71, 131, 0.28); }
#postingTab .pst-head-ico svg { width: 24px; height: 24px; }
#postingTab .pst-head-txt { min-width: 0; }
#postingTab .pst-title { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; color: var(--pst-ink); }
#postingTab .pst-sub { margin: 3px 0 0; font-size: 13px; color: var(--pst-mut); }
#postingTab .pst-head-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#postingTab .pst-head-conn { display: inline-flex; align-items: center; gap: 4px; padding: 4px; background: var(--pst-card); border: 1px solid var(--pst-bd); border-radius: 12px; box-shadow: var(--pst-shadow); }
#postingTab .pst-head-conn[hidden] { display: none; }
#postingTab .pst-hc { position: relative; display: inline-flex; padding: 3px; border: none; background: transparent; border-radius: 9px; cursor: pointer; }
#postingTab .pst-hc:hover { background: var(--pst-soft2); }
#postingTab .pst-hc-dot { position: absolute; right: 1px; bottom: 1px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--pst-card); background: var(--pst-ok); }
#postingTab .pst-hc-warn .pst-hc-dot { background: #f59e0b; }
#postingTab .pst-hc-bad .pst-hc-dot { background: #ef4444; }
#postingTab .pst-hc-off .pst-hc-dot { background: var(--pst-meta); }

/* ── вкладки ── */
#postingTab .pst-tabs { display: flex; gap: 4px; padding: 4px; background: var(--pst-card); border: 1px solid var(--pst-bd); border-radius: 14px; box-shadow: var(--pst-shadow); overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 20; }
#postingTab .pst-tabs::-webkit-scrollbar { display: none; }
#postingTab .pst-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: none; border-radius: 10px; background: transparent; color: var(--pst-mut); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
#postingTab .pst-tab .pst-ico svg { width: 18px; height: 18px; }
#postingTab .pst-tab:hover { background: var(--pst-soft2); color: var(--pst-ink); }
#postingTab .pst-tab.active { background: var(--pst-pri); color: var(--pst-pri-ink); font-weight: 600; box-shadow: 0 2px 8px rgba(7, 71, 131, 0.25); }
#postingTab .pst-tab-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pst-soft2); color: var(--pst-mut); font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
#postingTab .pst-tab-n:empty { display: none; }
#postingTab .pst-tab.active .pst-tab-n { background: rgba(255, 255, 255, 0.22); color: inherit; }
#postingTab .pst-tab-dot { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; }
#postingTab .pst-tab-dot[hidden] { display: none; }

/* панели — без старых отступов .adv-panel */
#postingTab .adv-panel { padding: 0; }
#postingTab .adv-panel.active { display: flex; flex-direction: column; gap: 16px; animation: pstFade .18s ease; }
@keyframes pstFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── кнопки и поля ── */
#postingTab .pst-btn,
#advModal .pst-editor .pst-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border: 1px solid var(--pst-bd2); border-radius: 10px; background: var(--pst-card); color: var(--pst-ink2); font: inherit; font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s, color .15s, box-shadow .15s; }
#postingTab .pst-btn:hover:not(:disabled),
#advModal .pst-editor .pst-btn:hover:not(:disabled) { border-color: var(--pst-pri); color: var(--pst-pri); }
#postingTab .pst-btn:disabled,
#advModal .pst-editor .pst-btn:disabled { opacity: .5; cursor: not-allowed; }
#postingTab .pst-btn-primary,
#advModal .pst-editor .pst-btn-primary { background: var(--pst-pri); border-color: var(--pst-pri); color: var(--pst-pri-ink); font-weight: 600; box-shadow: 0 2px 8px rgba(7, 71, 131, 0.22); }
#postingTab .pst-btn-primary:hover:not(:disabled),
#advModal .pst-editor .pst-btn-primary:hover:not(:disabled) { background: var(--pst-pri-h); border-color: var(--pst-pri-h); color: var(--pst-pri-ink); }
#postingTab .pst-btn-ghost,
#advModal .pst-editor .pst-btn-ghost { background: transparent; border-color: transparent; color: var(--pst-mut); }
#postingTab .pst-btn-ghost:hover:not(:disabled),
#advModal .pst-editor .pst-btn-ghost:hover:not(:disabled) { background: var(--pst-soft2); border-color: transparent; color: var(--pst-ink); }
#postingTab .pst-btn-danger:hover:not(:disabled),
#advModal .pst-editor .pst-btn-danger:hover:not(:disabled) { background: var(--pst-bad-bg); color: var(--pst-bad); }
#postingTab .pst-btn-sm,
#advModal .pst-editor .pst-btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
#postingTab .pst-btn-icon { width: 38px; padding: 0; }
#postingTab .pst-btn[hidden],
#advModal .pst-editor .pst-btn[hidden] { display: none; }
#postingTab .pst-iconbtn,
#advModal .pst-editor .pst-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: none; border-radius: 9px; background: transparent; color: var(--pst-mut); cursor: pointer; transition: background .15s, color .15s; }
#postingTab .pst-iconbtn:hover,
#advModal .pst-editor .pst-iconbtn:hover { background: var(--pst-soft2); color: var(--pst-ink); }
#postingTab .pst-iconbtn-danger:hover { background: var(--pst-bad-bg); color: var(--pst-bad); }
#postingTab .pst-linkbtn,
#advModal .pst-editor .pst-linkbtn { border: none; background: none; padding: 0; color: var(--pst-pri); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
#postingTab .pst-linkbtn:hover,
#advModal .pst-editor .pst-linkbtn:hover { text-decoration: underline; }
#postingTab .pst-input,
#postingTab .pst-select,
#advModal .pst-editor .pst-input { height: 40px; border: 1px solid var(--pst-bd2); border-radius: 10px; background: var(--pst-card); color: var(--pst-ink); font: inherit; font-size: 13.5px; box-sizing: border-box; }
#postingTab .pst-input,
#advModal .pst-editor .pst-input { padding: 0 12px; width: 100%; }
#postingTab .pst-select { padding: 0 10px; min-width: 150px; }
#postingTab .pst-input:focus,
#postingTab .pst-select:focus,
#advModal .pst-editor .pst-input:focus,
#postingTab .pst-textarea:focus,
#advModal .pst-editor .pst-textarea:focus { outline: none; border-color: var(--pst-pri); box-shadow: 0 0 0 3px var(--pst-pri-soft2); }
#postingTab .pst-textarea,
#advModal .pst-editor .pst-textarea { display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--pst-bd2); border-radius: 10px; background: var(--pst-card); color: var(--pst-ink); font: inherit; font-size: 14px; line-height: 1.55; resize: vertical; min-height: 44px; }
#postingTab .pst-textarea::placeholder,
#advModal .pst-editor .pst-textarea::placeholder,
#postingTab .pst-input::placeholder,
#advModal .pst-editor .pst-input::placeholder { color: var(--pst-meta); }
#postingTab .pst-mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 12.5px; }
#postingTab .pst-search { position: relative; display: flex; align-items: center; min-width: 0; }
#postingTab .pst-search .pst-ico { position: absolute; left: 12px; color: var(--pst-meta); pointer-events: none; }
#postingTab .pst-search .pst-ico svg { width: 17px; height: 17px; }
#postingTab .pst-search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 1px solid var(--pst-bd2); border-radius: 10px; background: var(--pst-card); color: var(--pst-ink); font: inherit; font-size: 13.5px; box-sizing: border-box; }
#postingTab .pst-search input:focus { outline: none; border-color: var(--pst-pri); box-shadow: 0 0 0 3px var(--pst-pri-soft2); }
#postingTab .pst-search input::placeholder { color: var(--pst-meta); }
#postingTab .pst-chip { height: 28px; padding: 0 11px; border: 1px solid var(--pst-bd); border-radius: 999px; background: var(--pst-card); color: var(--pst-ink2); font: inherit; font-size: 12.5px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
#postingTab .pst-chip:hover { border-color: var(--pst-pri); color: var(--pst-pri); background: var(--pst-pri-soft); }

/* текстовые помощники */
#postingTab .pst-h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--pst-ink); }
#postingTab .pst-hint,
#advModal .pst-editor .pst-hint { font-size: 12.5px; color: var(--pst-mut); }
#postingTab .pst-opt,
#advModal .pst-editor .pst-opt { font-size: 11.5px; font-weight: 400; color: var(--pst-meta); }
#postingTab .pst-count,
#advModal .pst-editor .pst-count { font-size: 12px; color: var(--pst-meta); font-weight: 500; }
#postingTab .pst-note { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 12.5px; color: var(--pst-mut); }

/* статусы и площадки */
#postingTab .pst-pill,
#advModal .pst-editor .pst-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--pst-soft2); color: var(--pst-ink2); }
#postingTab .pst-pill-published,
#postingTab .pst-pill-ok,
#advModal .pst-editor .pst-pill-published { background: var(--pst-ok-bg); color: var(--pst-ok); }
#postingTab .pst-pill-publishing,
#postingTab .pst-pill-warn,
#advModal .pst-editor .pst-pill-publishing { background: var(--pst-warn-bg); color: var(--pst-warn); }
#postingTab .pst-pill-failed,
#postingTab .pst-pill-bad,
#advModal .pst-editor .pst-pill-failed { background: var(--pst-bad-bg); color: var(--pst-bad); }
#postingTab .pst-pill-draft,
#postingTab .pst-pill-off,
#advModal .pst-editor .pst-pill-draft { background: var(--pst-soft2); color: var(--pst-mut); }
#postingTab .pst-pf,
#advModal .pst-editor .pst-pf { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; flex: none; text-decoration: none; }
#postingTab .pst-pf-instagram, #advModal .pst-editor .pst-pf-instagram { background: var(--pst-ig-bg); color: var(--pst-ig); }
#postingTab .pst-pf-fb_page, #advModal .pst-editor .pst-pf-fb_page { background: var(--pst-fb-bg); color: var(--pst-fb); }
#postingTab .pst-pf-threads, #advModal .pst-editor .pst-pf-threads { background: var(--pst-th-bg); color: var(--pst-th); }
#postingTab .pst-pf-telegram, #advModal .pst-editor .pst-pf-telegram { background: var(--pst-tg-bg); color: var(--pst-tg); }
#postingTab .pst-pf.is-off { background: transparent; color: var(--pst-meta); box-shadow: inset 0 0 0 1px var(--pst-bd); }
#postingTab a.pst-pf.is-on { transition: transform .12s, box-shadow .12s; }
#postingTab a.pst-pf.is-on:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px currentColor; }
/* Опубликовано, но ссылки нет — Meta поста не находит, обычно его удалили в соцсети (16.11.2026): значок площадки
   бледный и перечёркнут, перехода нет, причина — в подсказке */
#postingTab .pst-pf.is-gone { position: relative; background: transparent; color: var(--pst-meta); box-shadow: inset 0 0 0 1px var(--pst-bd); cursor: help; }
#postingTab .pst-pf.is-gone::after { content: ''; position: absolute; left: 20%; right: 20%; top: calc(50% - .75px); height: 1.5px; border-radius: 1px; background: currentColor; transform: rotate(-45deg); }
#postingTab .pst-pf-lg { width: 42px; height: 42px; border-radius: 12px; }

/* загрузка, пусто, ошибка */
#postingTab .pst-loading,
#advModal .pst-editor .pst-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 16px; color: var(--pst-mut); font-size: 13.5px; }
.pst-spin { display: inline-block; width: 15px; height: 15px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: pstSpin .7s linear infinite; vertical-align: -2px; flex: none; opacity: .8; }
@keyframes pstSpin { to { transform: rotate(360deg); } }
#postingTab .pst-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 48px 20px; background: var(--pst-card); border: 1px dashed var(--pst-bd2); border-radius: var(--pst-r); }
#postingTab .pst-empty-ico { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 16px; background: var(--pst-pri-soft); color: var(--pst-pri); }
#postingTab .pst-empty-bad .pst-empty-ico { background: var(--pst-bad-bg); color: var(--pst-bad); }
#postingTab .pst-empty-ok .pst-empty-ico { background: var(--pst-ok-bg); color: var(--pst-ok); }
#postingTab .pst-empty-t { font-size: 15.5px; font-weight: 700; color: var(--pst-ink); }
#postingTab .pst-empty-d { max-width: 460px; font-size: 13px; line-height: 1.55; color: var(--pst-mut); }
#postingTab .pst-empty-a { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
#postingTab .pst-skel { pointer-events: none; }
#postingTab .pst-skel-lines { display: flex; flex-direction: column; gap: 8px; flex: 1; }
#postingTab .pst-skel-lines i,
#postingTab .pst-skel .pst-card-media,
#postingTab .pst-skel .pst-th-ava { display: block; background: linear-gradient(90deg, var(--pst-soft2) 0%, var(--pst-bd) 50%, var(--pst-soft2) 100%); background-size: 200% 100%; animation: pstShimmer 1.2s ease-in-out infinite; }
#postingTab .pst-skel-lines i { height: 10px; border-radius: 6px; }
#postingTab .pst-skel-lines i:nth-child(2) { width: 85%; }
#postingTab .pst-skel-lines i:nth-child(3) { width: 60%; }
@keyframes pstShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
#postingTab .is-refreshing { opacity: .6; transition: opacity .2s; pointer-events: none; }

/* ── тулбар над лентой и аналитикой ── */
#postingTab .pst-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#postingTab .pst-toolbar-l { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
#postingTab .pst-toolbar-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#postingTab .pst-toolbar-r .pst-search { width: 260px; }
#postingTab .pst-seg { position: relative; display: inline-flex; gap: 2px; padding: 3px; background: var(--pst-soft2); border-radius: 11px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
#postingTab .pst-seg::-webkit-scrollbar { display: none; }
#postingTab .pst-seg-b { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: none; border-radius: 8px; background: transparent; color: var(--pst-mut); font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
#postingTab .pst-seg-b:hover { color: var(--pst-ink); }
#postingTab .pst-seg-b.active { background: var(--pst-card); color: var(--pst-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
#postingTab .pst-seg-n { min-width: 18px; padding: 0 5px; height: 18px; border-radius: 999px; background: var(--pst-bd); color: var(--pst-ink2); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
#postingTab .pst-seg-b.active .pst-seg-n { background: var(--pst-pri-soft2); color: var(--pst-pri); }
#postingTab .pst-seg-b.is-bad .pst-seg-n { background: var(--pst-bad-bg); color: var(--pst-bad); }

/* ── лента постов ── */
#postingTab .pst-feed { display: flex; flex-direction: column; gap: 22px; min-height: 120px; }
#postingTab .pst-month { display: flex; flex-direction: column; gap: 12px; }
#postingTab .pst-month-h { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--pst-ink); }
#postingTab .pst-month-h::after { content: ''; flex: 1; height: 1px; background: var(--pst-bd); }
#postingTab .pst-month-n { order: 2; font-size: 12px; font-weight: 500; color: var(--pst-meta); }
#postingTab .pst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
#postingTab .pst-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--pst-card); border: 1px solid var(--pst-bd); border-radius: var(--pst-r); box-shadow: var(--pst-shadow); overflow: hidden; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s; }
#postingTab .pst-card:hover { transform: translateY(-2px); box-shadow: var(--pst-shadow-h); border-color: var(--pst-bd2); }
#postingTab .pst-card:focus-visible { outline: 2px solid var(--pst-pri); outline-offset: 2px; }
#postingTab .pst-card-failed { border-color: var(--pst-bad-bd); }
#postingTab .pst-card-media { position: relative; aspect-ratio: 4 / 3; background: var(--pst-soft2); overflow: hidden; }
#postingTab .pst-card-media img,
#postingTab .pst-card-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
#postingTab .pst-card:hover .pst-card-media img,
#postingTab .pst-card:hover .pst-card-media video { transform: scale(1.03); }
#postingTab .pst-card-nomedia { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--pst-meta); font-size: 12px; background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(148, 163, 184, 0.07) 10px 20px); }
#postingTab .pst-card-media.is-broken::after { content: 'медиа недоступно'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--pst-meta); }
#postingTab .pst-card-top { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; pointer-events: none; }
#postingTab .pst-card-top .pst-pill { box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18); background-clip: padding-box; }
#postingTab .pst-card-top .pst-pill-published { background: #ecfdf5; color: #047857; }
#postingTab .pst-card-top .pst-pill-draft { background: #ffffff; color: #475569; }
#postingTab .pst-card-top .pst-pill-publishing { background: #fffbeb; color: #b45309; }
#postingTab .pst-card-top .pst-pill-failed { background: #fef2f2; color: #b91c1c; }
#postingTab .pst-card-badges { display: inline-flex; gap: 4px; }
#postingTab .pst-card-badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; background: rgba(15, 23, 42, 0.62); color: #fff; font-size: 11.5px; font-weight: 600; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
#postingTab .pst-card-badge-ai { background: linear-gradient(135deg, rgba(99, 102, 241, 0.92), rgba(139, 92, 246, 0.92)); }
#postingTab .pst-card-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 12px; flex: 1; min-width: 0; }
#postingTab .pst-card-text { font-size: 13.5px; line-height: 1.5; color: var(--pst-ink2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 3em; }
#postingTab .pst-card-err { display: flex; gap: 6px; align-items: flex-start; padding: 7px 9px; border-radius: 8px; background: var(--pst-bad-bg); color: var(--pst-bad); font-size: 12px; line-height: 1.4; }
#postingTab .pst-card-err span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#postingTab .pst-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
#postingTab .pst-card-pfs { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; min-width: 0; font-size: 12px; }
#postingTab .pst-card-pfs .pst-pf { width: 28px; height: 28px; }
#postingTab .pst-card-acts { display: flex; gap: 2px; opacity: .55; transition: opacity .15s; }
#postingTab .pst-card:hover .pst-card-acts,
#postingTab .pst-card:focus-within .pst-card-acts { opacity: 1; }
#postingTab .pst-card-date { display: flex; align-items: center; gap: 5px; padding-top: 9px; border-top: 1px solid var(--pst-bd); font-size: 12px; color: var(--pst-meta); }

/* ── комментирование Threads ── */
#postingTab .pst-comments { display: flex; flex-direction: column; gap: 14px; }
#postingTab .pst-hero { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-radius: var(--pst-r); background: linear-gradient(135deg, var(--pst-card) 0%, var(--pst-card) 55%, var(--pst-pri-soft) 100%); border: 1px solid var(--pst-bd); box-shadow: var(--pst-shadow); }
#postingTab .pst-hero-ico { width: 44px; height: 44px; border-radius: 13px; background: var(--pst-th); color: var(--pst-card); flex: none; }
#postingTab .pst-hero-ico svg { width: 22px; height: 22px; }
#postingTab .pst-hero-txt { min-width: 0; }
#postingTab .pst-hero-txt h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--pst-ink); }
#postingTab .pst-hero-txt p { margin: 0; max-width: 880px; font-size: 13.5px; line-height: 1.6; color: var(--pst-mut); }
#postingTab .pst-hero-txt b { color: var(--pst-ink); }
#postingTab .pst-searchbar { display: grid; grid-template-columns: minmax(220px, 1fr) 150px 150px minmax(160px, 220px) auto; gap: 8px; padding: 12px; background: var(--pst-card); border: 1px solid var(--pst-bd); border-radius: var(--pst-r); box-shadow: var(--pst-shadow); }
#postingTab .pst-searchbar .pst-select { min-width: 0; width: 100%; height: 44px; }
#postingTab .pst-searchbar .pst-input { height: 44px; }
#postingTab .pst-search-lg input { height: 44px; font-size: 14.5px; }
#postingTab .pst-search-go { height: 44px; padding: 0 22px; }
#postingTab .pst-quick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#postingTab .pst-quick:empty { display: none; }
#postingTab .pst-quick-l { font-size: 12.5px; color: var(--pst-meta); margin-right: 2px; }
#postingTab .pst-status-line { display: flex; align-items: center; gap: 7px; min-height: 18px; font-size: 13px; color: var(--pst-mut); }
#postingTab .pst-status-line:empty { display: none; }
#postingTab .pst-status-line svg { color: var(--pst-ok); }
#postingTab .pst-status-q { color: var(--pst-meta); }
#postingTab .pst-th-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; align-items: start; }
#postingTab .pst-th-list > .pst-empty { grid-column: 1 / -1; }
#postingTab .pst-th { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: var(--pst-card); border: 1px solid var(--pst-bd); border-radius: var(--pst-r); box-shadow: var(--pst-shadow); min-width: 0; transition: border-color .15s, box-shadow .15s; }
#postingTab .pst-th.is-replying { border-color: var(--pst-pri); box-shadow: 0 0 0 3px var(--pst-pri-soft); }
#postingTab .pst-th.is-replied { border-color: var(--pst-ok-bd); }
#postingTab .pst-th-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
#postingTab .pst-th-ava { width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; background: hsl(var(--pst-ava, 210) 55% 46%); }
#postingTab .pst-th-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
#postingTab .pst-th-who b { font-size: 14px; color: var(--pst-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#postingTab .pst-th-who span { font-size: 12px; color: var(--pst-meta); }
#postingTab .pst-th-text { font-size: 14px; line-height: 1.55; color: var(--pst-ink2); overflow-wrap: anywhere; }
#postingTab .pst-th-media { display: block; max-width: 100%; max-height: 300px; width: auto; border-radius: 10px; border: 1px solid var(--pst-bd); object-fit: cover; }
#postingTab .pst-th-video { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 5px 10px; border-radius: 8px; background: var(--pst-soft2); color: var(--pst-mut); font-size: 12.5px; }
#postingTab .pst-th-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--pst-bd); }
#postingTab .pst-th-id { font-size: 11.5px; color: var(--pst-meta); font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#postingTab .pst-th-reply { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 11px; background: var(--pst-soft); border: 1px solid var(--pst-bd); }
#postingTab .pst-th-reply[hidden] { display: none; }
#postingTab .pst-reply-head { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--pst-ink); flex-wrap: wrap; }
#postingTab .pst-reply-from { font-weight: 400; color: var(--pst-meta); font-size: 12px; }
#postingTab .pst-reply-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
#postingTab .pst-reply-actions { display: flex; gap: 6px; margin-left: auto; }
#postingTab .pst-reply-count { font-size: 12px; color: var(--pst-meta); font-variant-numeric: tabular-nums; }
#postingTab .pst-reply-count.is-over { color: var(--pst-bad); font-weight: 700; }
#postingTab .pst-reply-done { display: flex; align-items: flex-start; gap: 10px; color: var(--pst-ok); }
#postingTab .pst-reply-done > div { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
#postingTab .pst-reply-done b { font-size: 13px; }
#postingTab .pst-reply-done span { font-size: 13px; color: var(--pst-ink2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── аналитика ── */
#postingTab .pst-anal { display: flex; flex-direction: column; gap: 14px; }
#postingTab .pst-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
#postingTab .pst-kpi { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--pst-card); border: 1px solid var(--pst-bd); border-radius: var(--pst-r); box-shadow: var(--pst-shadow); min-width: 0; }
#postingTab .pst-kpi-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--pst-mut); }
#postingTab .pst-kpi-ico { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--pst-pri-soft); color: var(--pst-pri); flex: none; }
#postingTab .pst-kpi-ok .pst-kpi-ico { background: var(--pst-ok-bg); color: var(--pst-ok); }
#postingTab .pst-kpi-warn .pst-kpi-ico { background: var(--pst-warn-bg); color: var(--pst-warn); }
#postingTab .pst-kpi-bad .pst-kpi-ico { background: var(--pst-bad-bg); color: var(--pst-bad); }
#postingTab .pst-kpi-v { font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; color: var(--pst-ink); }
#postingTab .pst-kpi-s { font-size: 12px; color: var(--pst-mut); overflow: hidden; text-overflow: ellipsis; }
#postingTab .pst-kpi-warn .pst-kpi-s { color: var(--pst-warn); }
#postingTab .pst-kpi-bad .pst-kpi-s { color: var(--pst-bad); }
#postingTab .pst-anal-row { display: grid; gap: 14px; }
#postingTab .pst-anal-row-a { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
#postingTab .pst-anal-row-b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
#postingTab .pst-card-box { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; background: var(--pst-card); border: 1px solid var(--pst-bd); border-radius: var(--pst-r); box-shadow: var(--pst-shadow); min-width: 0; }
#postingTab .pst-box-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#postingTab .pst-box-h h3 { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--pst-ink); }
#postingTab .pst-anal-note { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 9px; background: var(--pst-soft); font-size: 12.5px; color: var(--pst-ink2); }
#postingTab .pst-anal-note svg { color: var(--pst-pri); }
#postingTab .pst-card-box > .pst-anal-note:last-child { margin-top: auto; }
/* столбики: тонкие, скругление 4px сверху, сетка приглушённая; значение — у максимума и в подсказке */
#postingTab .pst-chart { display: flex; gap: 8px; height: 200px; padding-bottom: 22px; }
#postingTab .pst-anal-wd .pst-chart { height: 150px; }
#postingTab .pst-chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--pst-meta); text-align: right; min-width: 18px; margin-top: -6px; margin-bottom: -6px; }
#postingTab .pst-chart-plot { position: relative; flex: 1; min-width: 0; }
#postingTab .pst-chart-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
#postingTab .pst-chart-grid i { display: block; height: 1px; background: var(--pst-bd); }
#postingTab .pst-chart-grid i:last-child { background: var(--pst-bd2); }
#postingTab .pst-chart-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 6px; }
#postingTab .pst-bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; min-width: 0; outline: none; cursor: default; }
#postingTab .pst-bar-col { position: relative; width: 100%; max-width: 30px; border-radius: 4px 4px 0 0; background: var(--pst-bar); transition: filter .15s; }
#postingTab .pst-bar.is-zero .pst-bar-col { background: transparent; }
#postingTab .pst-bar:hover .pst-bar-col,
#postingTab .pst-bar:focus .pst-bar-col { filter: brightness(1.12); }
#postingTab .pst-bar::before { content: ''; position: absolute; inset: 0 -3px; border-radius: 6px; background: transparent; transition: background .15s; }
#postingTab .pst-bar:hover::before,
#postingTab .pst-bar:focus::before { background: var(--pst-bar-soft); opacity: .4; }
#postingTab .pst-bar-col em { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -4px); font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--pst-ink); white-space: nowrap; }
#postingTab .pst-bar-x { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; font-size: 11px; color: var(--pst-meta); white-space: nowrap; }
#postingTab .pst-tip { position: absolute; z-index: 5; bottom: min(calc(var(--h, 0%) + 10px), calc(100% - 64px)); left: 50%; transform: translateX(-50%); display: none; flex-direction: column; gap: 2px; padding: 8px 10px; min-width: 120px; border-radius: 9px; background: #0f172a; color: #f8fafc; font-size: 12px; line-height: 1.4; white-space: nowrap; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25); pointer-events: none; }
#postingTab .pst-tip b { font-size: 12px; }
#postingTab .pst-tip small { font-size: 11px; color: #cbd5e1; }
#postingTab .pst-bar:hover .pst-tip,
#postingTab .pst-bar:focus .pst-tip { display: flex; }
#postingTab .pst-bar:first-child .pst-tip { left: 0; transform: none; }
#postingTab .pst-bar:last-child .pst-tip { left: auto; right: 0; transform: none; }
body[data-theme="dark"] #postingTab .pst-tip { background: #e2e8f0; color: #0f172a; }
body[data-theme="dark"] #postingTab .pst-tip small { color: #334155; }
/* горизонтальные полосы */
#postingTab .pst-hbars { display: flex; flex-direction: column; gap: 12px; }
#postingTab .pst-hbar { display: grid; grid-template-columns: minmax(118px, 150px) minmax(0, 1fr) auto; align-items: center; gap: 12px; }
#postingTab .pst-hbar-l { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pst-ink2); min-width: 0; }
#postingTab .pst-hbar-l > svg { color: var(--pst-mut); }
#postingTab .pst-hbar-l .pst-pf { width: 24px; height: 24px; border-radius: 7px; }
#postingTab .pst-hbar-track { height: 10px; border-radius: 999px; background: var(--pst-soft2); overflow: hidden; }
#postingTab .pst-hbar-track i { display: block; height: 100%; border-radius: 999px; background: var(--pst-bar); }
#postingTab .pst-hbar-v { display: flex; align-items: baseline; gap: 6px; min-width: 64px; justify-content: flex-end; font-size: 12px; color: var(--pst-meta); white-space: nowrap; }
#postingTab .pst-hbar-v b { font-size: 14px; color: var(--pst-ink); }
/* последние публикации */
#postingTab .pst-recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
#postingTab .pst-rec { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 11px; cursor: pointer; transition: background .15s; min-width: 0; }
#postingTab .pst-rec:hover { background: var(--pst-soft); }
#postingTab .pst-rec-thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; flex: none; background: var(--pst-soft2); color: var(--pst-meta); display: inline-flex; align-items: center; justify-content: center; }
#postingTab .pst-rec-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#postingTab .pst-rec-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
#postingTab .pst-rec-text { font-size: 13px; line-height: 1.4; color: var(--pst-ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#postingTab .pst-rec-meta { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--pst-meta); }
#postingTab .pst-rec-pfs { display: flex; gap: 4px; flex: none; }
#postingTab .pst-rec-pfs .pst-pf { width: 26px; height: 26px; }

/* ── настройки ── */
#postingTab .pst-section { display: flex; flex-direction: column; gap: 12px; }
#postingTab .pst-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
#postingTab .pst-section-head > div { display: flex; flex-direction: column; gap: 3px; }
#postingTab .pst-conn-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
#postingTab .pst-conn-grid > .pst-loading,
#postingTab .pst-conn-grid > .pst-empty { grid-column: 1 / -1; }
#postingTab .pst-conn { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--pst-card); border: 1px solid var(--pst-bd); border-radius: var(--pst-r); box-shadow: var(--pst-shadow); min-width: 0; }
#postingTab .pst-conn-bad { border-color: var(--pst-bad-bd); }
#postingTab .pst-conn-warn { border-color: var(--pst-warn-bd); }
#postingTab .pst-conn-top { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
#postingTab .pst-conn-top .pst-pf svg { width: 22px; height: 22px; }
#postingTab .pst-conn-name { display: flex; flex-direction: column; min-width: 0; flex: 1 1 130px; }
#postingTab .pst-conn-name b { font-size: 15px; color: var(--pst-ink); }
#postingTab .pst-conn-name { padding-top: 1px; }
#postingTab .pst-conn-name span { font-size: 12.5px; line-height: 1.35; color: var(--pst-mut); overflow-wrap: break-word; }
#postingTab .pst-conn-top .pst-pill { align-self: flex-start; }
#postingTab .pst-conn-what { font-size: 12.5px; color: var(--pst-mut); margin-top: -4px; }
#postingTab .pst-conn-life { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--pst-soft); }
#postingTab .pst-conn-life-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--pst-ink2); }
#postingTab .pst-conn-life-t span { display: inline-flex; align-items: center; gap: 6px; }
#postingTab .pst-conn-life-t svg { color: var(--pst-mut); }
#postingTab .pst-conn-life-t b { font-size: 12.5px; color: var(--pst-ink); }
#postingTab .pst-meter { height: 6px; border-radius: 999px; background: var(--pst-bd); overflow: hidden; }
#postingTab .pst-meter i { display: block; height: 100%; border-radius: 999px; background: var(--pst-ok); }
#postingTab .pst-meter-warn i { background: #f59e0b; }
#postingTab .pst-meter-bad i { background: #ef4444; }
#postingTab .pst-conn-check { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.45; }
#postingTab .pst-conn-check.is-ok { color: var(--pst-ok); }
#postingTab .pst-conn-check.is-bad { color: var(--pst-warn); }
#postingTab .pst-conn-acts { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--pst-bd); }
#postingTab .pst-conn-btns { display: flex; gap: 6px; flex-wrap: wrap; }
#postingTab .pst-conn-hint { margin: 0; font-size: 12px; line-height: 1.5; color: var(--pst-mut); }
#postingTab .pst-conn-hint b { color: var(--pst-ink2); }
#postingTab .pst-conn-more > summary { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--pst-pri); cursor: pointer; list-style: none; user-select: none; }
#postingTab .pst-conn-more > summary::-webkit-details-marker { display: none; }
#postingTab .pst-conn-more > summary::after { content: ''; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
#postingTab .pst-conn-more[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
#postingTab .pst-conn-form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
#postingTab .pst-conn-form label { font-size: 12.5px; font-weight: 600; color: var(--pst-ink); }
#postingTab .pst-conn-form-a { display: flex; justify-content: flex-end; }
#postingTab .pst-brand { display: flex; flex-direction: column; gap: 0; background: var(--pst-card); border: 1px solid var(--pst-bd); border-radius: var(--pst-r); box-shadow: var(--pst-shadow); overflow: hidden; }
#postingTab .pst-brand > .pst-loading,
#postingTab .pst-brand > .pst-empty { border: none; }
#postingTab .pst-brand-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; padding: 18px 20px; }
#postingTab .pst-brand-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
#postingTab .pst-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#postingTab .pst-field-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#postingTab .pst-field-h label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--pst-ink); }
#postingTab .pst-field-h label svg { color: var(--pst-pri); }
#postingTab .pst-field-hint { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--pst-mut); }
#postingTab .pst-field-style .pst-textarea { min-height: 220px; }
#postingTab .pst-logo-row { display: flex; align-items: center; gap: 10px; }
#postingTab .pst-logo-prev { width: 64px; height: 64px; flex: none; border-radius: 12px; border: 1px solid var(--pst-bd); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: var(--pst-meta); background: var(--pst-soft) repeating-conic-gradient(rgba(148, 163, 184, 0.14) 0% 25%, transparent 0% 50%) 50% / 12px 12px; }
#postingTab .pst-logo-prev img { max-width: 86%; max-height: 86%; object-fit: contain; display: block; }
#postingTab .pst-logo-prev.is-broken::after { content: 'нет'; font-size: 11px; color: var(--pst-bad); }
#postingTab .pst-brand-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--pst-bd); background: var(--pst-soft); }
#postingTab .pst-brand-state { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-size: 12.5px; color: var(--pst-ok); }
#postingTab .pst-brand-state.is-dirty { color: var(--pst-warn); }

/* ── окно редактора поста ── */
#advModal:has(.pst-editor) { padding: 24px 20px; }
#advModal .adv-modal-content.pst-editor { max-width: 1180px; padding: 0; border-radius: 18px; border: 1px solid var(--pst-bd); background: var(--pst-card); box-shadow: var(--pst-pop); overflow: visible; }
#advModal .pst-editor .pst-ed-form { display: flex; flex-direction: column; padding: 0; margin: 0; }   /* глобальное form { padding } в style-new.css */
#advModal .pst-editor .pst-ed-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 24px 14px; border-bottom: 1px solid var(--pst-bd); }
#advModal .pst-editor .pst-ed-head-main { min-width: 0; }
#advModal .pst-editor .pst-ed-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#advModal .pst-editor .pst-ed-title h3 { margin: 0; font-size: 20px; font-weight: 700; color: var(--pst-ink); }
#advModal .pst-editor .pst-ed-meta { margin-top: 4px; font-size: 12.5px; color: var(--pst-mut); }
#advModal .pst-editor .pst-ed-close { width: 36px; height: 36px; margin: -4px -6px 0 0; }
#advModal .pst-editor .pst-ed-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0; align-items: start; }
#advModal .pst-editor .pst-ed-main { display: flex; flex-direction: column; gap: 14px; padding: 18px 24px 22px; min-width: 0; }
#advModal .pst-editor .pst-ed-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 22px; border-left: 1px solid var(--pst-bd); background: var(--pst-soft); align-self: stretch; border-bottom-right-radius: 0; }
#advModal .pst-editor .pst-ed-sec { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--pst-bd); border-radius: 14px; background: var(--pst-card); }
#advModal .pst-editor .pst-ed-sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
#advModal .pst-editor .pst-ed-sec-h h4 { margin: 0; font-size: 15px; font-weight: 700; color: var(--pst-ink); flex: 1; }
#advModal .pst-editor .pst-ed-step { width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--pst-pri-soft); color: var(--pst-pri); font-size: 12.5px; font-weight: 700; flex: none; }
#advModal .pst-editor .pst-field-l { display: block; margin: 4px 0 0; font-size: 12.5px; font-weight: 600; color: var(--pst-ink2); }
#advModal .pst-editor .pst-field-l-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#advModal .pst-editor .pst-field-l-row label { font-weight: 600; }
#advModal .pst-editor .pst-field-l .pst-opt { font-weight: 400; }
#advModal .pst-editor .pst-ai-row { display: flex; gap: 8px; align-items: stretch; }
#advModal .pst-editor .pst-ai-row .pst-textarea { flex: 1; min-height: 64px; }
#advModal .pst-editor .btn-ai.pst-ai-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: none; width: 200px; padding: 8px 14px; border-radius: 10px; font-size: 13px; line-height: 1.3; white-space: normal; text-align: left; }
#advModal .pst-editor .pst-textarea-main { min-height: 190px; font-size: 14.5px; }
#advModal .pst-editor .pst-limits { display: flex; flex-direction: column; gap: 8px; }
#advModal .pst-editor .pst-lim-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
#advModal .pst-editor .pst-lim { display: grid; grid-template-columns: auto 74px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 12px; color: var(--pst-ink2); }
#advModal .pst-editor .pst-lim .pst-pf { width: 20px; height: 20px; border-radius: 6px; }
#advModal .pst-editor .pst-lim-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#advModal .pst-editor .pst-lim-bar { height: 5px; border-radius: 999px; background: var(--pst-soft2); overflow: hidden; }
#advModal .pst-editor .pst-lim-bar i { display: block; height: 100%; border-radius: 999px; background: var(--pst-ok); transition: width .15s; }
#advModal .pst-editor .pst-lim-n { font-size: 11.5px; color: var(--pst-mut); font-variant-numeric: tabular-nums; white-space: nowrap; }
#advModal .pst-editor .pst-lim.is-off { opacity: .5; }
#advModal .pst-editor .pst-lim.is-off .pst-lim-bar i { background: var(--pst-meta); }
#advModal .pst-editor .pst-lim.is-near .pst-lim-bar i { background: #f59e0b; }
#advModal .pst-editor .pst-lim.is-over .pst-lim-bar i { background: #ef4444; }
#advModal .pst-editor .pst-lim.is-over .pst-lim-n { color: var(--pst-bad); font-weight: 700; }
#advModal .pst-editor .pst-lim-warn { display: flex; align-items: flex-start; gap: 7px; padding: 8px 10px; border-radius: 9px; background: var(--pst-info-bg); color: var(--pst-info); font-size: 12.5px; line-height: 1.45; }
#advModal .pst-editor .pst-lim-warn.is-bad { background: var(--pst-bad-bg); color: var(--pst-bad); }
#advModal .pst-editor .pst-drop { position: relative; display: flex; align-items: center; justify-content: center; min-height: 180px; max-height: 380px; border: 1.5px dashed var(--pst-bd2); border-radius: 12px; background: var(--pst-soft); overflow: hidden; cursor: pointer; transition: border-color .15s, background .15s; }
#advModal .pst-editor .pst-drop:hover { border-color: var(--pst-pri); background: var(--pst-pri-soft); }
#advModal .pst-editor .pst-drop:focus-visible { outline: 2px solid var(--pst-pri); outline-offset: 2px; }
#advModal .pst-editor .pst-drop.adv-drop-over { border-style: solid; border-color: var(--pst-pri); background: var(--pst-pri-soft2); }
#advModal .pst-editor .pst-drop img,
#advModal .pst-editor .pst-drop video { display: block; max-width: 100%; max-height: 376px; object-fit: contain; }
#advModal .pst-editor .pst-drop.is-uploading::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent); background-size: 200% 100%; animation: pstShimmer 1.1s linear infinite; }
#advModal .pst-editor .pst-drop-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 24px 16px; text-align: center; font-size: 12.5px; color: var(--pst-mut); }
#advModal .pst-editor .pst-drop-empty b { font-size: 14px; color: var(--pst-ink); }
#advModal .pst-editor .pst-drop-empty.is-bad b { color: var(--pst-bad); }
#advModal .pst-editor .pst-drop-ico { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 4px; border-radius: 15px; background: var(--pst-card); color: var(--pst-pri); box-shadow: var(--pst-shadow); border: 1px solid var(--pst-bd); }
#advModal .pst-editor .pst-drop-ai { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--pst-ai1); }
#advModal .pst-editor .pst-media-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#advModal .pst-editor .pst-upload-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--pst-ok); }
#advModal .pst-editor .pst-url { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--pst-bd2); border-radius: 10px; background: var(--pst-card); color: var(--pst-meta); }
#advModal .pst-editor .pst-url:focus-within { border-color: var(--pst-pri); box-shadow: 0 0 0 3px var(--pst-pri-soft2); }
#advModal .pst-editor .pst-url input { flex: 1; min-width: 0; height: 100%; padding: 0; border: none; outline: none; background: transparent; color: var(--pst-ink); font: inherit; font-size: 13px; box-shadow: none; }
/* файлы поста: карусель до 10 (Сабина 18.11.2026) — плитки по порядку, первая — обложка */
#advModal .pst-editor .pst-media-count { font-size: 12px; font-weight: 600; color: var(--pst-mut); font-variant-numeric: tabular-nums; }
#advModal .pst-editor .pst-drop.has-items { display: block; min-height: 0; max-height: none; padding: 10px; cursor: default; }
#advModal .pst-editor .pst-drop.has-items:hover { border-color: var(--pst-bd2); background: var(--pst-soft); }
#advModal .pst-editor .pst-drop.has-items.adv-drop-over { border-style: solid; border-color: var(--pst-pri); background: var(--pst-pri-soft2); }
#advModal .pst-editor .pst-drop-empty { cursor: pointer; width: 100%; }
#advModal .pst-editor .pst-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
#advModal .pst-editor .pst-mtile { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--pst-soft2); border: 1px solid var(--pst-bd); }
#advModal .pst-editor .pst-mtile.is-cover { border-color: var(--pst-pri); box-shadow: 0 0 0 1px var(--pst-pri); }
#advModal .pst-editor .pst-drop .pst-mtile img,
#advModal .pst-editor .pst-drop .pst-mtile video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
#advModal .pst-editor .pst-mtile.is-broken img,
#advModal .pst-editor .pst-mtile.is-broken video { display: none; }
#advModal .pst-editor .pst-mtile.is-broken::after { content: 'файл недоступен'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center; font-size: 11.5px; color: var(--pst-bad); }
#advModal .pst-editor .pst-mtile-n { position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(15, 23, 42, 0.66); color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
#advModal .pst-editor .pst-mtile-cover { position: absolute; left: 6px; bottom: 6px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--pst-pri); color: var(--pst-pri-ink); font-size: 10.5px; font-weight: 600; line-height: 20px; }
#advModal .pst-editor .pst-mtile-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.6); color: #fff; pointer-events: none; }
#advModal .pst-editor .pst-mtile-acts { position: absolute; right: 5px; top: 5px; display: flex; gap: 3px; }
#advModal .pst-editor .pst-mtile-btn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: none; border-radius: 7px; background: rgba(15, 23, 42, 0.66); color: #fff; cursor: pointer; transition: background .15s, opacity .15s; }
#advModal .pst-editor .pst-mtile-btn:hover { background: rgba(15, 23, 42, 0.86); }
#advModal .pst-editor .pst-mtile-btn.is-del:hover { background: #dc2626; }
#advModal .pst-editor .pst-mtile-btn:disabled { opacity: .3; cursor: default; background: rgba(15, 23, 42, 0.66); }
#advModal .pst-editor .pst-mtile-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
#advModal .pst-editor .pst-mtile-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1.5px dashed var(--pst-bd2); background: var(--pst-card); color: var(--pst-pri); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
#advModal .pst-editor .pst-mtile-add small { font-size: 11px; font-weight: 400; color: var(--pst-meta); }
#advModal .pst-editor .pst-mtile-add:hover { border-color: var(--pst-pri); background: var(--pst-pri-soft); }
#advModal .pst-editor .pst-mtile-add:focus-visible { outline: 2px solid var(--pst-pri); outline-offset: 2px; }
#advModal .pst-editor .pst-media-hint { margin: 0; font-size: 12px; line-height: 1.45; color: var(--pst-mut); }
#advModal .pst-editor .pst-url-row { display: flex; gap: 6px; align-items: stretch; }
#advModal .pst-editor .pst-url-row .pst-url { flex: 1; min-width: 0; }
#advModal .pst-editor .pst-url-row .pst-btn-sm { height: 38px; }
/* превью карусели: стрелки, номер и точки */
#advModal .pst-editor .pst-pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; padding: 0; border: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.92); color: #0f172a; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25); cursor: pointer; }
#advModal .pst-editor .pst-pv-nav.is-prev { left: 8px; }
#advModal .pst-editor .pst-pv-nav.is-next { right: 8px; }
#advModal .pst-editor .pst-pv-nav:disabled { display: none; }
#advModal .pst-editor .pst-pv-count { position: absolute; top: 8px; right: 8px; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(15, 23, 42, 0.66); color: #fff; font-size: 11.5px; font-weight: 600; line-height: 22px; font-variant-numeric: tabular-nums; }
#advModal .pst-editor .pst-pv-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
#advModal .pst-editor .pst-pv-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 2px rgba(15, 23, 42, 0.35); }
#advModal .pst-editor .pst-pv-dots i.on { background: #fff; }
#advModal .pst-editor .pst-pf-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#advModal .pst-editor .pst-pf-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--pst-bd); border-radius: 12px; background: var(--pst-card); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; min-width: 0; }
#advModal .pst-editor .pst-pf-opt:hover { border-color: var(--pst-bd2); background: var(--pst-soft); }
#advModal .pst-editor .pst-pf-opt:has(input:checked) { border-color: var(--pst-pri); background: var(--pst-pri-soft); }
#advModal .pst-editor .pst-pf-opt input { margin: 0; flex: none; }
#advModal .pst-editor .pst-pf-opt .pst-pf { width: 32px; height: 32px; border-radius: 9px; }
#advModal .pst-editor .pst-pf-opt-t { display: flex; flex-direction: column; min-width: 0; }
#advModal .pst-editor .pst-pf-opt-t b { font-size: 13.5px; color: var(--pst-ink); }
#advModal .pst-editor .pst-pf-opt-t small { font-size: 11.5px; color: var(--pst-mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#advModal .pst-editor .pst-ed-published { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--pst-ok-bg); border: 1px solid var(--pst-ok-bd); }
#advModal .pst-editor .pst-ed-published-t { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--pst-ok); }
#advModal .pst-editor .pst-ed-links { display: flex; gap: 6px; flex-wrap: wrap; }
#advModal .pst-editor .pst-link-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 3px; border-radius: 9px; background: var(--pst-card); border: 1px solid var(--pst-bd); color: var(--pst-ink2); font-size: 12.5px; font-weight: 500; text-decoration: none; transition: border-color .15s; }
#advModal .pst-editor .pst-link-chip:hover { border-color: var(--pst-pri); color: var(--pst-pri); }
#advModal .pst-editor .pst-link-chip .pst-pf { width: 24px; height: 24px; border-radius: 7px; }
#advModal .pst-editor .pst-link-chip.is-gone { color: var(--pst-mut); border-style: dashed; cursor: help; }
#advModal .pst-editor .pst-link-chip.is-gone:hover { border-color: var(--pst-bd); color: var(--pst-mut); }
#advModal .pst-editor .pst-link-chip.is-gone .pst-pf { opacity: .5; }
#advModal .pst-editor .pst-link-chip.is-gone em { font-style: normal; font-size: 11.5px; font-weight: 400; color: var(--pst-meta); }
#advModal .pst-editor .pst-ed-error { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--pst-bad-bg); border: 1px solid var(--pst-bad-bd); color: var(--pst-bad); }
#advModal .pst-editor .pst-ed-error > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
#advModal .pst-editor .pst-ed-error b { font-size: 13px; }
/* превью */
#advModal .pst-editor .pst-pv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#advModal .pst-editor .pst-pv-title { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--pst-ink); }
#advModal .pst-editor .pst-pv-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--pst-soft2); }
#advModal .pst-editor .pst-pv-tab { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; border: none; border-radius: 7px; background: transparent; color: var(--pst-mut); cursor: pointer; }
#advModal .pst-editor .pst-pv-tab:hover { color: var(--pst-ink); }
#advModal .pst-editor .pst-pv-tab.is-off { opacity: .45; }
#advModal .pst-editor .pst-pv-tab.active { background: var(--pst-card); color: var(--pst-pri); opacity: 1; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14); }
#advModal .pst-editor .pst-pv { display: flex; }
#advModal .pst-editor .pst-pv-card { width: 100%; display: flex; flex-direction: column; background: var(--pst-card); border: 1px solid var(--pst-bd); border-radius: 16px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); overflow: hidden; }
#advModal .pst-editor .pst-pv-user { display: flex; align-items: center; gap: 10px; padding: 11px 13px; }
#advModal .pst-editor .pst-pv-ava { width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: cover; background: #074783; }
#advModal .pst-editor .pst-pv-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
#advModal .pst-editor .pst-pv-who b { font-size: 13px; color: var(--pst-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#advModal .pst-editor .pst-pv-who span { font-size: 11.5px; color: var(--pst-meta); }
#advModal .pst-editor .pst-pv-user .pst-pf { width: 24px; height: 24px; border-radius: 7px; }
#advModal .pst-editor .pst-pv-media { position: relative; background: var(--pst-soft2); aspect-ratio: 1 / 1; overflow: hidden; }
#advModal .pst-editor .pst-pv-media img,
#advModal .pst-editor .pst-pv-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
#advModal .pst-editor .pst-pv-media.is-empty,
#advModal .pst-editor .pst-pv-media.is-broken { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--pst-meta); font-size: 12px; text-align: center; padding: 16px; }
#advModal .pst-editor .pst-pv-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.6); color: #fff; }
#advModal .pst-editor .pst-pv[data-pf="telegram"] .pst-pv-media,
#advModal .pst-editor .pst-pv[data-pf="threads"] .pst-pv-media,
#advModal .pst-editor .pst-pv[data-pf="fb_page"] .pst-pv-media { aspect-ratio: auto; max-height: 300px; }
#advModal .pst-editor .pst-pv[data-pf="threads"] .pst-pv-media { margin: 0 13px 4px 57px; border-radius: 12px; border: 1px solid var(--pst-bd); }
#advModal .pst-editor .pst-pv[data-pf="threads"] .pst-pv-text { padding-left: 57px; padding-top: 0; }
#advModal .pst-editor .pst-pv[data-pf="telegram"] .pst-pv-card { background: var(--pst-tg-bg); border-color: transparent; padding: 10px; gap: 0; }
#advModal .pst-editor .pst-pv[data-pf="telegram"] .pst-pv-user { padding: 2px 2px 10px; }
#advModal .pst-editor .pst-pv[data-pf="telegram"] .pst-pv-media { border-radius: 12px 12px 0 0; }
#advModal .pst-editor .pst-pv[data-pf="telegram"] .pst-pv-text { background: var(--pst-card); border-radius: 0 0 12px 12px; }
#advModal .pst-editor .pst-pv[data-pf="telegram"] .pst-pv-user + .pst-pv-text { border-radius: 12px; }
#advModal .pst-editor .pst-pv-text { padding: 10px 13px 12px; font-size: 13px; line-height: 1.5; color: var(--pst-ink2); overflow-wrap: anywhere; max-height: 340px; overflow-y: auto; }
#advModal .pst-editor .pst-pv-text b { color: var(--pst-ink); }
#advModal .pst-editor .pst-pv-cut { display: block; margin-top: 6px; font-size: 11.5px; font-weight: 600; color: var(--pst-bad); }
#advModal .pst-editor .pst-pv-actions { display: flex; gap: 14px; padding: 4px 13px 12px; color: var(--pst-mut); }
#advModal .pst-editor .pst-pv[data-pf="instagram"] .pst-pv-actions { order: -0; padding-top: 10px; }
#advModal .pst-editor .pst-pv[data-pf="telegram"] .pst-pv-actions { display: none; }
#advModal .pst-editor .pst-pv-note { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--pst-meta); }
/* низ окна */
#advModal .pst-editor .pst-ed-foot { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--pst-bd); background: var(--pst-card); border-radius: 0 0 18px 18px; box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.05); }
#advModal .pst-editor .pst-ed-foot-l,
#advModal .pst-editor .pst-ed-foot-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#advModal .pst-editor .pst-ed-foot-r { margin-left: auto; }

/* ── адаптив ── */
@media (max-width: 1280px) {
    #postingTab .pst-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #postingTab .pst-conn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #postingTab .pst-searchbar { grid-template-columns: minmax(200px, 1fr) 140px 140px; }
    #postingTab .pst-searchbar .pst-input { grid-column: 1 / 3; }
}
@media (max-width: 1080px) {
    #postingTab .pst-anal-row-a,
    #postingTab .pst-anal-row-b { grid-template-columns: minmax(0, 1fr); }
    #postingTab .pst-brand-grid { grid-template-columns: minmax(0, 1fr); }
    #advModal .pst-editor .pst-ed-body { grid-template-columns: minmax(0, 1fr); }
    #advModal .pst-editor .pst-ed-side { position: static; border-left: none; border-top: 1px solid var(--pst-bd); }
    #advModal .pst-editor .pst-pv { max-width: 420px; }
}
@media (max-width: 760px) {
    #postingTab .pst { gap: 12px; padding-bottom: 32px; }
    #postingTab .pst-head { align-items: flex-start; }
    #postingTab .pst-head-ico { width: 40px; height: 40px; border-radius: 12px; }
    #postingTab .pst-title { font-size: 19px; }
    #postingTab .pst-sub { font-size: 12.5px; }
    #postingTab .pst-head-side { width: 100%; }
    #postingTab .pst-head-side .pst-btn-primary { flex: 1; }
    #postingTab .pst-tab { height: 40px; padding: 0 12px; font-size: 13.5px; justify-content: center; }
    #postingTab .pst-tab:not(.active) .pst-tab-t,
    #postingTab .pst-tab:not(.active) .pst-tab-n { display: none; }
    #postingTab .pst-tab.active { flex: 1 0 auto; }
    #postingTab .pst-tab:not(.active) { flex: 0 0 48px; padding: 0; position: relative; }
    #postingTab .pst-tab:not(.active) .pst-tab-dot { position: absolute; top: 8px; right: 9px; }
    #postingTab .pst-toolbar { align-items: stretch; }
    #postingTab .pst-toolbar-r { width: 100%; }
    #postingTab .pst-toolbar-r .pst-search { flex: 1 1 100%; width: auto; }
    #postingTab .pst-toolbar-r .pst-select { flex: 1; min-width: 0; }
    #postingTab .pst-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    #postingTab .pst-card-body { padding: 10px 11px; gap: 8px; }
    #postingTab .pst-card-text { font-size: 13px; -webkit-line-clamp: 3; }
    #postingTab .pst-card-acts { opacity: 1; }
    #postingTab .pst-card-pfs .pst-pf { width: 24px; height: 24px; border-radius: 7px; }
    #postingTab .pst-card-pfs .pst-pf svg { width: 12px; height: 12px; }
    #postingTab .pst-card-badge { height: 22px; padding: 0 6px; font-size: 11px; }
    #postingTab .pst-card-top { left: 8px; right: 8px; top: 8px; }
    #postingTab .pst-card-top .pst-pill { height: 22px; padding: 0 7px; font-size: 11px; }
    #postingTab .pst-hero { padding: 14px; gap: 12px; }
    #postingTab .pst-hero-ico { width: 38px; height: 38px; }
    #postingTab .pst-hero-txt p { font-size: 13px; }
    #postingTab .pst-searchbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px; }
    #postingTab .pst-searchbar .pst-search-lg,
    #postingTab .pst-searchbar .pst-input,
    #postingTab .pst-searchbar .pst-search-go { grid-column: 1 / -1; }
    #postingTab .pst-th-list { grid-template-columns: minmax(0, 1fr); }
    #postingTab .pst-th { padding: 12px; }
    #postingTab .pst-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    #postingTab .pst-kpi { padding: 12px; }
    #postingTab .pst-kpi-v { font-size: 22px; }
    #postingTab .pst-kpis .pst-kpi:last-child { grid-column: 1 / -1; }
    #postingTab .pst-card-box { padding: 14px; }
    #postingTab .pst-chart { height: 170px; }
    #postingTab .pst-chart-bars { gap: 3px; }
    #postingTab .pst-hbar { grid-template-columns: minmax(96px, 120px) minmax(0, 1fr) auto; gap: 8px; }
    #postingTab .pst-recs { grid-template-columns: minmax(0, 1fr); }
    #postingTab .pst-conn-grid { grid-template-columns: minmax(0, 1fr); }
    #postingTab .pst-brand-grid { padding: 14px; }
    #postingTab .pst-brand-foot { padding: 12px 14px; flex-wrap: wrap; }
    #postingTab .pst-brand-state { flex: 1 1 100%; }
    #postingTab .pst-section-head .pst-hint { font-size: 12px; }
    #advModal:has(.pst-editor) { padding: 0; }
    #advModal .adv-modal-content.pst-editor { border-radius: 0; border: none; min-height: 100%; }
    #advModal .pst-editor .pst-ed-head { padding: 14px 16px 12px; }
    #advModal .pst-editor .pst-ed-main { padding: 14px 12px 16px; gap: 12px; }
    #advModal .pst-editor .pst-ed-sec { padding: 12px; }
    #advModal .pst-editor .pst-ai-row { flex-direction: column; }
    #advModal .pst-editor .btn-ai.pst-ai-btn { width: 100%; justify-content: center; text-align: center; min-height: 40px; }
    #advModal .pst-editor .pst-lim-grid { grid-template-columns: minmax(0, 1fr); }
    #advModal .pst-editor .pst-pf-opts { grid-template-columns: minmax(0, 1fr); }
    #advModal .pst-editor .pst-ed-side { padding: 14px 12px 18px; }
    #advModal .pst-editor .pst-pv { max-width: none; }
    #advModal .pst-editor .pst-ed-foot { padding: 10px 12px; border-radius: 0; gap: 8px; }
    #advModal .pst-editor .pst-ed-foot-l { order: 2; width: 100%; justify-content: center; }
    #advModal .pst-editor .pst-ed-foot-r { width: 100%; margin: 0; }
    #advModal .pst-editor .pst-ed-foot-r .pst-btn { flex: 1; padding: 0 10px; }
    #advModal .pst-editor .pst-ed-foot-r #advPePublishBtn { flex: 1 1 100%; order: -1; }
}
@media (max-width: 420px) {
    #postingTab .pst-grid { grid-template-columns: minmax(0, 1fr); }
    #postingTab .pst-card-media { aspect-ratio: 16 / 10; }
    #postingTab .pst-seg-b { padding: 0 10px; font-size: 12.5px; }
}
