html {
    scroll-behavior: smooth;
}

body {
    /*padding-bottom: 5rem;*/
    overflow-wrap: break-word; 
    word-wrap: break-word;
}

/* Disable decorative blurred primary/secondary page blobs globally. */
:where(
    [class*="fixed"][class*="-z-10"][class*="pointer-events-none"][class*="rounded-full"][class*="blur-"][class*="bg-primary/"],
    [class*="fixed"][class*="-z-10"][class*="pointer-events-none"][class*="rounded-full"][class*="blur-"][class*="bg-secondary/"]
) {
    display: none !important;
}

/* Hide scrollbars globally while preserving scrolling behavior across browsers */
html,
body {
    -ms-overflow-style: none; /* IE and legacy Edge */
    scrollbar-width: none; /* Firefox */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

*:focus-visible {
    outline: 2px solid var(--ui-color-primary, #007bff);
    outline-offset: 2px;
    border-radius: var(--rounded-btn, 0.5rem);
}

[x-cloak] {
    display: none !important;
}

/* Вводный тур: подсветка целевых элементов меню */
.tour-highlight {
    position: relative;
    z-index: 99965;
    border-radius: var(--rounded-btn, 0.75rem);
    box-shadow:
        0 0 0 3px hsl(var(--p) / 0.6),
        0 0 0 6px hsl(var(--p) / 0.15),
        0 12px 40px -12px hsl(var(--p) / 0.45);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.tour-highlight-soft {
    position: relative;
    z-index: 99965;
    border-radius: var(--rounded-btn, 0.75rem);
    transition: box-shadow 0.25s ease;
}

/* In-page TOC anchors: keep target heading visible below fixed header when clicking content links */
.prose [id],
article.docs-content [id] {
    scroll-margin-top: 6rem;
}

main.border-x {
    border-color: hsl(var(--b3));
}

/* Animations & Keyframes */
@keyframes highlight-and-fade {
    0% { background-color: hsla(var(--p) / 0.2); }
    100% { background-color: transparent; }
}

@keyframes slide-in-fade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.highlight-new,
.highlight-new-message {
    animation: highlight-and-fade 3s ease-out;
}

.new-comment-animate {
    animation: slide-in-fade 0.5s ease-out;
}

.animate-message-sent {
    animation: slideInFromRight 0.3s ease-out;
}

.animate-message-received {
    animation: slideInFromLeft 0.3s ease-out;
}

/* Component Styles */
.dropdown-content-glass {
    background-color: hsla(var(--b2) / 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid hsla(var(--b3) / 0.3);
}

/* Ширина выпадающего меню «Публикуется в» в модалке создания поста */
.create-post-community-dropdown {
    width: 24rem !important;
    min-width: 24rem !important;
    max-width: min(24rem, calc(100vw - 2rem));
}

.auth-left-pane {
    color: hsl(var(--pc));
    background: linear-gradient(45deg, hsl(var(--p)), hsl(var(--a)));
    padding: var(--ui-space-8, 2rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.auth-left-pane i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.chat-bubble {
    overflow: visible;
}

.lg-sidebar-scroll {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.lg-sidebar-scroll::-webkit-scrollbar {
    display: none;
}

/* Responsive Embed Container */
.embed-container {
    max-width: 100%;
    overflow-x: auto; 
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
}

.embed-container iframe,
.embed-container blockquote {
    max-width: 100% !important;
    width: 100% !important;
    min-width: 250px !important; 
    margin: auto !important; 
    border-radius: var(--rounded-box, 1rem) !important;
}

/* Utility Styles */
.break-words {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.aspect-w-16 {
    position: relative;
    padding-bottom: 56.25%;
}

.aspect-h-9 > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.prose-fade::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5rem;
    background: linear-gradient(to top, hsl(var(--b1)), transparent);
    pointer-events: none;
}

/* Prose (Markdown) Styles — шкала из ui-mvp-tokens.css (--ui-type-*) */
.prose {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    color: hsl(var(--bc));
    line-height: var(--ui-type-body-lh, 1.625);
    font-size: var(--ui-type-body-size, 1rem);
    max-width: 100%;
}

/* Читаемая колонка: посты, docs, длинный контент */
.eidoc-readable {
    max-width: min(100%, var(--ui-content-read-width, 42rem));
    margin-left: auto;
    margin-right: auto;
}

/* EiDOC UI Foundation v1 — public product layer over DaisyUI. */
body.eidoc-public:not(.eidoc-landing-page) {
    background-color: var(--ui-color-canvas, #f7f9fc);
    color: var(--ui-color-ink, #0f172a);
}

body.eidoc-public:not(.eidoc-landing-page) .eidoc-app-shell,
body.eidoc-public:not(.eidoc-landing-page) .eidoc-content-shell,
body.eidoc-public:not(.eidoc-landing-page) #page-component {
    background-color: var(--ui-color-canvas, #f7f9fc);
}

body.eidoc-public:not(.eidoc-landing-page) .eidoc-app-shell > .sticky header {
    background-color: color-mix(in srgb, var(--ui-color-surface, #ffffff) 92%, transparent) !important;
    border-color: color-mix(in srgb, var(--ui-color-border, #d9e3ee) 76%, transparent) !important;
    box-shadow: 0 10px 30px -28px oklch(20.77% 0.0398 265.75 / 0.48) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.eidoc-public:not(.eidoc-landing-page) .eidoc-app-shell > .sticky .navbar {
    color: var(--ui-color-ink, #0f172a);
}

/* Legacy light drawer — не Foundation navy sidebar (desktop + mobile) */
body.eidoc-public:not(.eidoc-landing-page) .eidoc-sidebar-aside:not(.eidoc-sidebar-aside--foundation) {
    border-color: color-mix(in srgb, var(--ui-color-border, #d9e3ee) 82%, transparent) !important;
    background-color: color-mix(in srgb, var(--ui-color-surface, #ffffff) 88%, transparent) !important;
    box-shadow: var(--ui-shadow-card, 0 18px 45px -32px rgba(15, 23, 42, 0.34)) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Legacy light drawer — не Foundation navy sidebar (ds.tsx) */
body.eidoc-public:not(.eidoc-landing-page) .eidoc-sidebar-aside:not(.eidoc-sidebar-aside--foundation) #left-sidebar {
    --sidebar-drawer-fg: var(--ui-color-ink, #0f172a);
    --sidebar-drawer-muted: color-mix(in srgb, var(--ui-color-ink, #0f172a) 68%, transparent);
    --sidebar-drawer-active-bg: color-mix(in srgb, var(--ui-color-primary, #1f6feb) 13%, white);
    --sidebar-drawer-hover-bg: color-mix(in srgb, var(--ui-color-primary, #1f6feb) 8%, transparent);
    --sidebar-drawer-hover-ring: color-mix(in srgb, var(--ui-color-primary, #1f6feb) 16%, transparent);
    --sidebar-toggle-border: color-mix(in srgb, var(--ui-color-border-strong, #c5d3e3) 84%, transparent);
    --sidebar-toggle-icon: var(--ui-color-primary, #1f6feb);
}

html[data-theme="dark"] body.eidoc-public:not(.eidoc-landing-page) .eidoc-sidebar-aside:not(.eidoc-sidebar-aside--foundation) #left-sidebar {
    --sidebar-drawer-active-bg: color-mix(in srgb, var(--ui-color-primary, #60a5fa) 18%, transparent);
    --sidebar-drawer-hover-bg: color-mix(in srgb, var(--ui-color-primary, #60a5fa) 12%, transparent);
    --sidebar-drawer-hover-ring: color-mix(in srgb, var(--ui-color-primary, #60a5fa) 24%, transparent);
}

body.eidoc-public:not(.eidoc-landing-page) #left-sidebar .sidebar-link {
    border-radius: var(--ui-radius-md, 0.75rem) !important;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body.eidoc-public:not(.eidoc-landing-page) .eidoc-sidebar-aside:not(.eidoc-sidebar-aside--foundation) #left-sidebar .sidebar-link.sidebar-link-active {
    box-shadow: inset 0 0 0 1px var(--sidebar-drawer-hover-ring, rgba(31, 111, 235, 0.16)) !important;
}

body.eidoc-public:not(.eidoc-landing-page) #left-sidebar .sidebar-icon-wrap {
    border-radius: var(--ui-radius-sm, 0.5rem) !important;
}

body.eidoc-public .ds-panel,
body.eidoc-public .ds-muted-surface {
    border: none;
    border-radius: var(--ui-radius-lg, 1rem);
    background-color: var(--ui-color-surface-muted, #eef3f8);
}

body.eidoc-public .ds-card,
body.eidoc-public .card.ds-card,
body.eidoc-public .card.bg-base-100.ds-card {
    background-color: var(--ui-color-surface, #ffffff) !important;
    border: none !important;
    border-radius: var(--ui-radius-lg, 1rem) !important;
    box-shadow: var(--ui-shadow-card, 0 18px 45px -32px rgba(15, 23, 42, 0.34));
}

body.eidoc-public .ds-card:hover {
    border: none !important;
}

body.eidoc-public:not(.eidoc-landing-page) .card.bg-base-100 {
    background-color: var(--ui-color-surface, #ffffff) !important;
}

body.eidoc-public .modal-box,
body.eidoc-public .dropdown-content,
body.eidoc-public .dropdown-content-glass {
    border-color: color-mix(in srgb, var(--ui-color-border, #d9e3ee) 82%, transparent) !important;
    background-color: color-mix(in srgb, var(--ui-color-surface, #ffffff) 94%, transparent) !important;
    box-shadow: var(--ui-shadow-float, 0 22px 60px -36px rgba(15, 23, 42, 0.42));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.eidoc-public .ds-btn.btn,
body.eidoc-public .btn.ds-btn {
    border-radius: var(--ui-radius-md, 0.75rem) !important;
    font-weight: 650;
    letter-spacing: 0;
    box-shadow: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body.eidoc-public .ds-btn.btn:hover,
body.eidoc-public .btn.ds-btn:hover {
    transform: translateY(-1px);
}

body.eidoc-public .ds-btn.btn:active,
body.eidoc-public .btn.ds-btn:active {
    transform: translateY(0);
}

body.eidoc-public .ds-btn.btn-primary,
body.eidoc-public .ds-btn--primary.btn,
body.eidoc-public .btn-primary.ds-btn {
    border-color: color-mix(in srgb, var(--ui-color-primary, #1f6feb) 88%, black) !important;
    background-color: var(--ui-color-primary, #1f6feb) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--ui-color-primary, #1f6feb) 72%, black);
}

body.eidoc-public .ds-btn.btn-primary:hover,
body.eidoc-public .ds-btn--primary.btn:hover,
body.eidoc-public .btn-primary.ds-btn:hover {
    background-color: color-mix(in srgb, var(--ui-color-primary, #1f6feb) 88%, black) !important;
    box-shadow: 0 18px 34px -18px color-mix(in srgb, var(--ui-color-primary, #1f6feb) 80%, black);
}

body.eidoc-public .ds-btn--ghost.btn,
body.eidoc-public .ds-btn.btn-ghost,
body.eidoc-public .ds-btn.btn-outline {
    border-color: color-mix(in srgb, var(--ui-color-border, #d9e3ee) 86%, transparent) !important;
    background-color: color-mix(in srgb, var(--ui-color-surface, #ffffff) 82%, transparent) !important;
    color: color-mix(in srgb, var(--ui-color-ink, #0f172a) 86%, transparent) !important;
}

body.eidoc-public .ds-btn--ghost.btn:hover,
body.eidoc-public .ds-btn.btn-ghost:hover,
body.eidoc-public .ds-btn.btn-outline:hover {
    border-color: color-mix(in srgb, var(--ui-color-primary, #1f6feb) 22%, var(--ui-color-border, #d9e3ee)) !important;
    background-color: color-mix(in srgb, var(--ui-color-primary, #1f6feb) 8%, var(--ui-color-surface, #ffffff)) !important;
    color: var(--ui-color-primary, #1f6feb) !important;
}

body.eidoc-public .ds-input.input,
body.eidoc-public .input.ds-input,
body.eidoc-public .ds-input.textarea,
body.eidoc-public .textarea.ds-input,
body.eidoc-public .ds-input.select,
body.eidoc-public .select.ds-input {
    border-color: color-mix(in srgb, var(--ui-color-border, #d9e3ee) 90%, transparent) !important;
    border-radius: var(--ui-radius-md, 0.75rem) !important;
    background-color: var(--ui-color-surface, #ffffff) !important;
    color: var(--ui-color-ink, #0f172a);
    box-shadow: var(--ui-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body.eidoc-public .ds-input.input:focus,
body.eidoc-public .input.ds-input:focus,
body.eidoc-public .ds-input.textarea:focus,
body.eidoc-public .textarea.ds-input:focus,
body.eidoc-public .ds-input.select:focus,
body.eidoc-public .select.ds-input:focus {
    border-color: color-mix(in srgb, var(--ui-color-primary, #1f6feb) 62%, var(--ui-color-border, #d9e3ee)) !important;
    box-shadow: var(--ui-shadow-focus, 0 0 0 4px rgba(31, 111, 235, 0.18));
    outline: none;
}

body.eidoc-public .badge {
    border-radius: var(--ui-radius-pill, 999px);
    font-weight: 650;
    letter-spacing: 0;
}

body.eidoc-public .badge-outline {
    border-color: color-mix(in srgb, currentColor 32%, transparent);
    background-color: color-mix(in srgb, currentColor 7%, transparent);
}

body.eidoc-public .tabs-boxed,
body.eidoc-public [role="tablist"]:not(.eidoc-cabinet-tabs) {
    /*border: 1px solid color-mix(in srgb, var(--ui-color-border, #d9e3ee) 78%, transparent);
    border-radius: var(--ui-radius-lg, 1rem);
    background-color: color-mix(in srgb, var(--ui-color-surface-muted, #eef3f8) 70%, transparent);*/
    padding: 0.25rem;
}

body.eidoc-public .tab,
body.eidoc-public [role="tab"] {
    /*border-radius: var(--ui-radius-md, 0.75rem);*/
    letter-spacing: 0;
}

body.eidoc-public .tab-active,
body.eidoc-public [role="tab"][aria-selected="true"] {
    background-color: var(--ui-color-surface, #ffffff) !important;
    color: var(--ui-color-primary, #1f6feb) !important;
    box-shadow: var(--ui-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}

body.eidoc-public .alert {
    border-color: color-mix(in srgb, var(--ui-color-border, #d9e3ee) 82%, transparent);
    border-radius: var(--ui-radius-lg, 1rem);
    box-shadow: var(--ui-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}

body.eidoc-public .ds-table-wrap,
body.eidoc-public .overflow-x-auto:has(> .table) {
    border-color: color-mix(in srgb, var(--ui-color-border, #d9e3ee) 82%, transparent) !important;
    border-radius: var(--ui-radius-lg, 1rem);
    background-color: var(--ui-color-surface, #ffffff);
}

body.eidoc-public .table :where(th) {
    color: color-mix(in srgb, var(--ui-color-ink, #0f172a) 72%, transparent);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0;
}

body.eidoc-public .prose,
body.eidoc-public article.docs-content {
    color: color-mix(in srgb, var(--ui-color-ink, #0f172a) 92%, transparent);
}

body.eidoc-public .prose blockquote {
    background-color: color-mix(in srgb, var(--ui-color-primary, #1f6feb) 7%, var(--ui-color-surface, #ffffff));
}

body.eidoc-public .eidoc-empty-state,
body.eidoc-public .empty-state {
    border: 1px dashed color-mix(in srgb, var(--ui-color-border-strong, #c5d3e3) 82%, transparent);
    border-radius: var(--ui-radius-xl, 1.25rem);
    background-color: color-mix(in srgb, var(--ui-color-surface, #ffffff) 78%, transparent);
}

html[data-theme="dark"] body.eidoc-public .ds-card,
html[data-theme="dark"] body.eidoc-public .card.ds-card,
html[data-theme="dark"] body.eidoc-public .modal-box,
html[data-theme="dark"] body.eidoc-public .dropdown-content,
html[data-theme="dark"] body.eidoc-public .dropdown-content-glass {
    box-shadow:
        0 22px 60px -38px oklch(0% 0 0 / 0.76),
        0 1px 0 oklch(100% 0 0 / 0.05) inset;
}

@media (max-width: 640px) {
    body.eidoc-public .ds-card,
    body.eidoc-public .card.ds-card {
        border-radius: var(--ui-radius-md, 0.75rem) !important;
    }

    body.eidoc-public .ds-btn.btn:hover,
    body.eidoc-public .btn.ds-btn:hover {
        transform: none;
    }
}

/**
 * Мотив «загиб листа» (логотип EiDOC) — только для карточек документации / превью.
 */
.eidoc-doc-dogear {
    position: relative;
    overflow: hidden;
}
.eidoc-doc-dogear::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 1.35rem;
    height: 1.35rem;
    pointer-events: none;
    background: linear-gradient(
        135deg,
        transparent 50%,
        color-mix(in srgb, var(--ui-color-primary, #007bff) 28%, transparent) 50%
    );
    border-bottom-left-radius: var(--rounded-btn, 0.75rem);
}

/* Логотип в шапке: читаемость тёмных букв на тёмной теме */
.eidoc-site-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Тёмная тема: контраст тёмных букв логотипа (шапка, админка, модалки, auth) */
html[data-theme="dark"] .eidoc-site-logo-wrap {
    background-color: color-mix(in srgb, hsl(var(--b1)) 92%, white);
    border-radius: 0.5rem;
    padding: 0.125rem 0.375rem;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    font-family: var(--ui-font-display, inherit);
    color: hsl(var(--bc));
    line-height: 1.3;
    margin-top: var(--ui-space-6, 1.5rem);
    margin-bottom: var(--ui-space-3, 0.75rem);
}

.prose h1 {
    font-size: var(--ui-type-h1, 2rem);
    font-weight: 800;
    padding-bottom: 0.3em;
    border-bottom: 2px solid hsl(var(--b3));
}

.prose h2 {
    font-size: var(--ui-type-h2, 1.5rem);
    font-weight: 700;
    padding-bottom: 0.3em;
    border-bottom: 1px solid hsl(var(--b3));
}

.prose h3 {
    font-size: var(--ui-type-h3, 1.25rem);
    font-weight: 600;
}

.prose h4 {
    font-size: var(--ui-type-h4, 1.125rem);
    font-weight: 600;
}

.prose h5, .prose h6 {
    font-size: var(--ui-type-h5, 1rem);
    font-weight: 600;
    color: hsla(var(--bc) / 0.85);
}

.prose h6 {
    font-size: var(--ui-type-h6, 0.875rem);
}

article.docs-content.prose h2,
article.docs-content.prose h3,
article.docs-content.prose h4,
article.docs-content.prose h5,
article.docs-content.prose h6 {
    position: relative;
    padding-bottom: 0.35em;
    margin-bottom: 0.75em;
}

article.docs-content.prose h2::after,
article.docs-content.prose h3::after,
article.docs-content.prose h4::after,
article.docs-content.prose h5::after,
article.docs-content.prose h6::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, currentColor 0%, transparent 100%);
}

.prose p {
    margin-top: 0;
    margin-bottom: var(--ui-space-5, 1.25rem);
}

.prose a {
    color: var(--ui-color-primary, #007bff);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s ease-in-out;
    font-weight: 500;
}

.prose a:hover {
    color: color-mix(in srgb, var(--ui-color-primary, #007bff) 82%, black);
}

html[data-theme="dark"] .prose a {
    color: var(--ui-color-accent, #7fbdff);
}

html[data-theme="dark"] .prose a:hover {
    color: color-mix(in srgb, var(--ui-color-accent, #7fbdff) 88%, white);
}

.prose strong {
    font-weight: 700;
    color: hsl(var(--bc));
}

.prose ul, .prose ol {
    margin-top: var(--ui-space-5, 1.25rem);
    margin-bottom: var(--ui-space-5, 1.25rem);
}

.prose ul {
    padding-left: var(--ui-space-7, 1.75rem);
}

.prose ul { list-style-type: disc; }
.prose ol {
    list-style-type: decimal;
    padding-left: 0;
}
.prose li { margin-top: var(--ui-space-2, 0.5rem); margin-bottom: var(--ui-space-2, 0.5rem); }

.prose blockquote {
    background-color: color-mix(in srgb, var(--ui-color-accent, #7fbdff) 12%, #f3f4f6);
    color: #374151;
    padding: var(--ui-space-4, 1rem) var(--ui-space-5, 1.25rem) !important;
    margin: var(--ui-space-4, 1rem) 0 !important;
    border-radius: var(--rounded-btn, 0.75rem) !important;
    border-left: 4px solid var(--ui-color-primary, #007bff) !important;
    border-right: none !important;
    font-style: italic;
}

.prose blockquote p {
    margin: 0;
}

html[data-theme="dark"] .prose blockquote {
    background-color: color-mix(in srgb, var(--ui-color-accent, #7fbdff) 14%, #2f3136) !important;
    color: #ffffff !important;
}

html[dir="rtl"] .prose blockquote {
    border-left: none !important;
    border-right: 4px solid var(--ui-color-primary, #007bff) !important;
}

.prose pre {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
    border: 1px solid #d1d5db !important;
    border-radius: var(--rounded-btn, 0.75rem) !important;
    padding: var(--ui-space-4, 1rem) !important;
    overflow-x: auto !important;
    font-size: 0.875rem;
    line-height: 1.71;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.prose code {
    background-color: #e5e7eb !important;
    color: #be123c !important;
    padding: 3px 6px !important;
    border-radius: 3px !important;
    font-family: Consolas, "Liberation Mono", Courier, monospace !important;
    font-weight: 600;
}
.prose code::before, .prose code::after { content: ""; }

.prose pre code {
    background-color: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    font-weight: normal;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace !important;
}

.prose kbd {
    background-color: #e5e7eb !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 2px 0 0 #9ca3af !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-family: sans-serif !important;
    font-size: 0.9em !important;
    white-space: nowrap !important;
}

html[data-theme="dark"] .prose pre {
    background-color: #282c34 !important;
    color: #abb2bf !important;
    border: 1px solid #3e4451 !important;
}

html[data-theme="dark"] .prose code {
    background-color: #3e4451 !important;
    color: #d19a66 !important;
}

html[data-theme="dark"] .prose pre code {
    background-color: transparent !important;
    color: inherit !important;
}

html[data-theme="dark"] .prose kbd {
    background-color: #3e4451 !important;
    color: #abb2bf !important;
    border: 1px solid #5a6272 !important;
    box-shadow: 0 2px 0 0 #5a6272 !important;
}

.prose table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin-top: var(--ui-space-8, 2rem);
    margin-bottom: var(--ui-space-8, 2rem);
    font-size: 0.875rem;
    line-height: 1.625;
}

.prose thead {
    border-bottom: 2px solid hsl(var(--b3));
    color: hsl(var(--bc));
    font-weight: 600;
}

.prose tbody tr {
    border-bottom: 1px solid hsl(var(--b3));
}

.prose th, .prose td {
    padding: var(--ui-space-2, 0.5rem) var(--ui-space-4, 1rem);
}

.prose-sm {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Содержание (TOC) в теле статьи скрыто только на опубликованной странице; при редактировании остаётся видимым */
.docs-view-published .mce-toc {
    display: none !important;
}

.modal-box-glass {
    background-color: hsla(var(--b2) / 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid hsla(var(--b3) / 0.4);
}

/*
 * Единый стиль модальных окон (эталон: /adp/dev/changelog «Добавить запись»):
 * — оболочка: class="modal modal-bottom sm:modal-middle" на <dialog> или div.modal
 * — панель: modal-box + relative bg-base-100 shadow-xl rounded-2xl border border-base-content/5
 *   + flex flex-col max-h-[90vh] overflow-hidden p-6 pt-14 (+ нужный max-w)
 * — закрыть: btn btn-sm btn-circle btn-ghost absolute right-4 top-4 z-10 + <i class="fas fa-times">
 * — подложка: form.modal-backdrop (внутри <dialog>) или div.modal-backdrop без лишних bg-*
 */

/*
 * DaisyUI 4: закрытый .modal (без .modal-open / :target / [open]) остаётся в потоке с opacity:0,
 * pointer-events:none на самом контейнере, но потомки (.modal-box, оболочка из shell) по умолчанию
 * pointer-events:auto и перехватывают клики по странице. Гасим hit-testing у содержимого закрытой модалки.
 * Исключение: паттерн «checkbox + .modal» из DaisyUI — восстанавливаем ниже.
 */
.modal:not(.modal-open):not(:target):not([open]) > div.relative,
.modal:not(.modal-open):not(:target):not([open]) > div.relative *,
.modal:not(.modal-open):not(:target):not([open]) .modal-box,
.modal:not(.modal-open):not(:target):not([open]) .modal-box *,
.modal:not(.modal-open):not(:target):not([open]) .modal-backdrop {
    pointer-events: none !important;
}

/* DaisyUI: открытие через input.modal-toggle:checked + .modal (без класса modal-open на панели) */
.modal-toggle:checked + .modal > div.relative,
.modal-toggle:checked + .modal > div.relative *,
.modal-toggle:checked + .modal .modal-box,
.modal-toggle:checked + .modal .modal-box *,
.modal-toggle:checked + .modal .modal-backdrop {
    pointer-events: auto !important;
}

/*
 * Native <dialog class="modal">: всегда по центру viewport.
 * modal-bottom на <dialog> растягивает top-layer на весь экран, а .modal-box уезжает вниз —
 * сверху остаётся тёмная полоса (подложка). См. /adp/dev/roadmap, changelog.
 */
dialog.modal[open] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: var(--ui-space-4, 1rem) !important;
    border: none !important;
    background: transparent !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

dialog.modal::backdrop {
    background-color: oklch(0 0 0 / 0.45);
}

/* Клик по подложке закрывает dialog; затемнение только у ::backdrop */
dialog.modal > form.modal-backdrop {
    position: fixed;
    inset: 0;
    margin: 0;
    width: auto;
    height: auto;
    border: none;
    background: transparent !important;
}

/* Мобильные: div.modal (не native dialog) по центру экрана */
@media (max-width: 1023px) {
    .modal.modal-open,
    .modal[open]:not(dialog) {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: var(--ui-space-4, 1rem) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* --- Tooltips on Small Screens --- */
.tooltip {
    max-width: 100%;
}

.tooltip::before {
    max-width: 100vw !important; 
    width: auto !important;
    white-space: normal !important; 
} 

@media (max-width: 640px) {
    .tooltip::before {
        left: 0 !important; 
        right: 0 !important;
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
        max-width: calc(100vw - 1rem) !important; 
    }
}

/* --- Blok: визуальные размеры заголовков по уровню --- */
#blok-changelog-holder [data-level="1"],
#blok-roadmap-holder [data-level="1"]{
    font-family: var(--ui-font-display, inherit);
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 700;
}
#blok-changelog-holder [data-level="2"],
#blok-roadmap-holder [data-level="2"]{
    font-family: var(--ui-font-display, inherit);
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 600;
}
#blok-changelog-holder [data-level="3"],
#blok-roadmap-holder [data-level="3"]{
    font-family: var(--ui-font-display, inherit);
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 600;
}
#blok-changelog-holder [data-level="4"],
#blok-roadmap-holder [data-level="4"]{
    font-family: var(--ui-font-display, inherit);
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 600;
}
#blok-changelog-holder [data-level="5"],
#blok-roadmap-holder [data-level="5"]{
    font-family: var(--ui-font-display, inherit);
    font-size: 1rem;
    line-height: 1.45;
    font-weight: 600;
}
#blok-changelog-holder [data-level="6"],
#blok-roadmap-holder [data-level="6"]{
    font-family: var(--ui-font-display, inherit);
    font-size: 0.875rem;
    line-height: 1.45;
    font-weight: 600;
}

/* Модалки «Создать/редактировать пост»: ширина контента */
#edit-post-modal > .relative {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
}

/* Превью поста: сгладить отступы блока рендера Blok */
#create-post-modal .eidoc-readable,
.submit-post-preview .eidoc-readable {
    font-size: 0.9375rem;
}

/* Создание поста: компактная модалка и базовые элементы композера */
#create-post-modal {
    --post-composer-blue: #2358e6;
    --post-composer-blue-hover: #1d4ed8;
    --post-composer-blue-light: #eef4ff;
    --post-composer-blue-mid: #cbd9ff;
    --post-composer-text: #111827;
    --post-composer-muted: #667085;
    --post-composer-soft: #f6f8fc;
    --post-composer-border: #d8e1ef;
    --post-composer-border-strong: #c7d4e8;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(7px);
}

#create-post-modal .eidoc-post-composer {
    overflow: visible;
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 18px;
    background: #fff;
    color: var(--post-composer-text);
    box-shadow: 0 28px 80px -28px rgba(15, 23, 42, 0.52);
}

#create-post-modal .eidoc-post-composer__header {
    min-height: 92px;
    padding: 23px 34px;
    border-color: var(--post-composer-border);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

#create-post-modal .eidoc-post-composer__brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2f67ff 0%, #174be4 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 10px 22px -14px rgba(35, 88, 230, 0.9);
}

#create-post-modal .eidoc-post-composer__brand-icon i {
    font-size: 18px;
}

#create-post-modal-title {
    font-size: 24px;
    line-height: 1.18;
    letter-spacing: 0;
    font-weight: 700;
    color: #111827;
}

#create-post-modal .custom-scrollbar {
    padding: 28px 42px 0;
    background: #fff;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    overflow-x: hidden;
}

#create-post-modal .eidoc-post-composer__close:hover,
#create-post-modal .eidoc-post-composer__close:focus-visible {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

#create-post-modal .eidoc-post-composer__close {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 999px;
    border-color: var(--post-composer-border);
    background: #fff;
    color: #667085;
    font-size: 14px;
    box-shadow: 0 10px 22px -14px rgba(15, 23, 42, 0.32);
}

#create-post-modal .eidoc-post-composer__stepper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 26px;
    color: var(--post-composer-muted);
}

#create-post-modal .eidoc-post-composer__step-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    min-height: 92px;
    padding: 17px 18px;
    border: 1px solid var(--post-composer-border);
    border-radius: 10px;
    background: #fff;
    color: #526078;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

#create-post-modal .eidoc-post-composer__step-card:hover {
    border-color: var(--post-composer-blue-mid);
    background: #fbfdff;
}

#create-post-modal .eidoc-post-composer__step-card:focus-visible {
    outline: 2px solid rgba(35, 88, 230, 0.24);
    outline-offset: 3px;
}

#create-post-modal .eidoc-post-composer__step-card:active {
    transform: scale(0.99);
}

#create-post-modal .eidoc-post-composer__step-dot {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #e5edf7;
    background: #f8fafc;
    color: var(--post-composer-muted);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 auto;
}

#create-post-modal .eidoc-post-composer__step-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
}

#create-post-modal .eidoc-post-composer__step-title {
    color: #111827;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}

#create-post-modal .eidoc-post-composer__step-subtitle {
    color: #69758a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
}

#create-post-modal .eidoc-post-composer__step-meta {
    display: inline-flex;
    min-height: 18px;
    align-items: center;
    gap: 8px;
    color: var(--post-composer-blue);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

#create-post-modal .eidoc-post-composer__step-arrow {
    color: #667085;
    font-size: 16px;
    flex: 0 0 auto;
}

#create-post-modal .eidoc-post-composer__step-card.is-active {
    border-color: #8badff;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    box-shadow: 0 14px 30px -26px rgba(35, 88, 230, 0.7), inset 0 0 0 1px rgba(35, 88, 230, 0.08);
}

#create-post-modal .eidoc-post-composer__step-card.is-active .eidoc-post-composer__step-dot {
    border-color: rgba(35, 88, 230, 0.18);
    background: var(--post-composer-blue);
    color: #fff;
    box-shadow: 0 0 0 7px rgba(35, 88, 230, 0.12), 0 12px 24px -14px rgba(35, 88, 230, 0.95);
}

#create-post-modal .eidoc-post-composer__step-card.is-complete .eidoc-post-composer__step-dot {
    border-color: #d1fae5;
    background: #ecfdf5;
    color: #059669;
}

#create-post-modal .eidoc-post-composer__step-card.is-complete .eidoc-post-composer__step-meta {
    color: #059669;
}

#create-post-modal .eidoc-post-composer__step-card.is-complete .eidoc-post-composer__step-dot {
    border-color: #d1fae5;
    background: #ecfdf5;
    color: #059669;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08);
}

#create-post-modal .eidoc-post-composer__step-card.is-error .eidoc-post-composer__step-dot {
    border-color: #fed7aa;
    background: #fffbeb;
    color: #d97706;
}

#create-post-modal .eidoc-post-composer__step-card.is-error .eidoc-post-composer__step-meta {
    color: #d97706;
}

#create-post-modal .eidoc-post-composer__step-card.is-disabled {
    opacity: 0.55;
}

#create-post-modal .eidoc-post-composer__step-card.is-disabled:hover {
    border-color: var(--post-composer-border);
    background: #fff;
}

#create-post-modal #post-kind-control-label,
#create-post-modal #post-format-control-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#create-post-modal .eidoc-post-composer__controls {
    margin-bottom: 28px;
    grid-template-columns: minmax(0, 1.1fr) 32px minmax(22rem, 0.88fr);
    gap: 18px;
    align-items: center;
}

#create-post-modal .eidoc-post-composer__controls > span[aria-hidden="true"] {
    position: relative;
    width: 1px;
    height: 68px;
    margin: 0 auto;
    background: var(--post-composer-border);
}

#create-post-modal .eidoc-post-composer__controls > span[aria-hidden="true"]::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #9ca9bd;
    transform: translate(-50%, -50%);
}

#create-post-modal .eidoc-post-composer__segments {
    display: flex;
    min-width: 0;
    min-height: 50px;
    gap: 0;
    overflow-x: auto;
    padding: 0;
    border: 1px solid var(--post-composer-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    scrollbar-width: none;
}

#create-post-modal .eidoc-post-composer__segments::-webkit-scrollbar {
    display: none;
}

#create-post-modal .eidoc-post-composer__segment {
    position: relative;
    display: inline-flex;
    flex: 1 0 auto;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 0 26px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #46556d;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

#create-post-modal .eidoc-post-composer__segment + .eidoc-post-composer__segment::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 1px;
    background: rgba(216, 225, 239, 0.75);
}

#create-post-modal .eidoc-post-composer__segment i {
    min-width: 19px;
    color: currentColor;
    font-size: 19px;
}

#create-post-modal .eidoc-post-composer__segment:hover {
    background: #f8fbff;
    color: var(--post-composer-text);
}

#create-post-modal .eidoc-post-composer__segment:focus-visible {
    outline: 2px solid var(--post-composer-blue);
    outline-offset: 2px;
}

#create-post-modal .eidoc-post-composer__segment:active {
    transform: scale(0.98);
}

#create-post-modal .eidoc-post-composer__segment.is-active {
    color: var(--post-composer-blue);
    box-shadow: inset 0 -2px 0 var(--post-composer-blue), inset 0 0 0 0 rgba(35, 88, 230, 0.08);
}

#create-post-modal .eidoc-post-composer__segment:disabled {
    cursor: not-allowed;
    opacity: 0.42;
    transform: none;
}

#create-post-modal form.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 24px;
}

#create-post-modal .eidoc-post-composer__field .label,
#create-post-modal [role="tabpanel"] > .label,
#create-post-modal [role="tabpanel"] > .flex:first-child {
    margin-bottom: 10px;
    padding: 0;
    min-height: 0;
}

#create-post-modal .eidoc-post-composer__field .label-text,
#create-post-modal [role="tabpanel"] .label-text {
    color: #526078;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 600;
}

#create-post-modal .eidoc-post-composer__input {
    height: 50px;
    border-color: var(--post-composer-border);
    border-radius: 9px;
    background: #fff;
    color: #111827;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 400;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

#create-post-modal .eidoc-post-composer__input.is-success {
    border-color: #d1fae5;
}

#create-post-modal .eidoc-post-composer__input.is-warning {
    border-color: #fef3c7;
}

#create-post-modal .eidoc-post-composer__input.is-error {
    border-color: #fecaca;
}

#create-post-modal .eidoc-post-composer__input:focus {
    border-color: var(--post-composer-blue);
    box-shadow: 0 0 0 3px rgba(35, 88, 230, 0.12);
}

#create-post-modal .eidoc-post-composer__input::placeholder {
    color: #98a2b3;
    font-weight: 400;
}

#create-post-modal .eidoc-post-composer__field .fa-heading {
    display: none;
}

#create-post-modal .eidoc-post-composer__field .fa-heading + input {
    padding-left: 24px;
}

#create-post-modal .eidoc-post-composer__field .pointer-events-none {
    right: 27px;
    color: #8793a8;
    font-size: 15px;
    font-weight: 500;
}

#create-post-modal .eidoc-post-composer__view-toggle {
    display: none;
    gap: 3px;
    padding: 4px;
    border: 1px solid var(--post-composer-border);
    border-radius: 10px;
    background: var(--post-composer-surface);
}

#create-post-modal .eidoc-post-composer__view-toggle button {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--post-composer-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__view-toggle button.is-active {
    background: #fff;
    color: var(--post-composer-blue);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

#create-post-modal .eidoc-post-composer__view-toggle button:focus-visible {
    outline: 2px solid var(--post-composer-blue);
    outline-offset: 2px;
}

#create-post-modal .eidoc-post-composer__editor + .label {
    display: none;
}

#create-post-modal .eidoc-post-composer__editor {
    position: relative;
    overflow: visible;
    min-height: 410px;
    padding: 0 !important;
    border: 1px solid transparent !important;
    border-radius: 10px;
    background: #fff;
    background-clip: padding-box;
    box-shadow: inset 0 0 0 1px var(--post-composer-border), 0 1px 2px rgba(15, 23, 42, 0.025);
}

#create-post-modal .eidoc-post-composer__body-counter,
#edit-post-modal .eidoc-post-composer__body-counter {
    position: absolute;
    right: 22px;
    bottom: 88px;
    z-index: 4;
    color: #8a95a8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
}

#create-post-modal .eidoc-post-composer__body-counter.is-over,
#edit-post-modal .eidoc-post-composer__body-counter.is-over {
    color: #dc2626;
}

#create-post-modal .eidoc-post-composer__preview {
    overflow-wrap: anywhere;
}

#create-post-modal .eidoc-post-composer__publish-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 372px);
    gap: 28px;
    align-items: stretch;
}

#create-post-modal .eidoc-post-composer__publish-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 12px;
}

#create-post-modal .eidoc-post-composer__publish-card,
#create-post-modal .eidoc-post-composer__publish-preview-panel {
    border: 1px solid var(--post-composer-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

#create-post-modal .eidoc-post-composer__publish-card + .eidoc-post-composer__publish-card {
    margin-top: 0;
}

#create-post-modal .eidoc-post-composer__publish-label,
#create-post-modal .eidoc-post-composer__publish-card .label-text {
    color: #344054;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

#create-post-modal .eidoc-post-composer__publish-location {
    padding: 16px 18px 13px;
}

#create-post-modal .eidoc-post-composer__publish-place {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
    border: 0;
    background: transparent;
    color: #111827;
    text-align: left;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__publish-place.is-locked {
    cursor: default;
}

#create-post-modal .eidoc-post-composer__publish-avatar {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(216, 225, 239, 0.9);
    background: #eef2f8;
}

#create-post-modal .eidoc-post-composer__publish-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#create-post-modal .eidoc-post-composer__publish-place-title {
    display: block;
    overflow: hidden;
    color: #111827;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#create-post-modal .eidoc-post-composer__publish-place .fa-chevron-down,
#create-post-modal .eidoc-post-composer__publish-place .fa-lock {
    color: #111827;
    font-size: 13px;
    transition: transform 0.18s ease;
}

#create-post-modal .eidoc-post-composer__publish-help {
    position: relative;
    display: inline-flex;
    margin-top: 4px;
}

#create-post-modal .eidoc-post-composer__publish-help button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #7a869a;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__publish-help button:hover,
#create-post-modal .eidoc-post-composer__publish-help button:focus-visible {
    color: var(--post-composer-blue);
}

#create-post-modal .eidoc-post-composer__publish-help button:focus-visible {
    outline: 2px solid rgba(35, 88, 230, 0.22);
    outline-offset: 3px;
    border-radius: 6px;
}

#create-post-modal .eidoc-post-composer__publish-help-popover {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 90;
    width: min(340px, calc(100vw - 64px));
    padding: 12px 13px;
    border: 1px solid var(--post-composer-border);
    border-radius: 10px;
    background: #fff;
    color: #526078;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    box-shadow: 0 18px 44px -24px rgba(15, 23, 42, 0.45);
    transform-origin: top left;
}

#create-post-modal .eidoc-post-composer__publish-help-popover::before {
    content: "";
    position: absolute;
    left: 18px;
    top: -6px;
    width: 10px;
    height: 10px;
    border-left: 1px solid var(--post-composer-border);
    border-top: 1px solid var(--post-composer-border);
    background: #fff;
    transform: rotate(45deg);
}

#create-post-modal .eidoc-post-composer__publish-tags,
#create-post-modal .eidoc-post-composer__publish-theme {
    padding: 16px 18px;
}

#create-post-modal .eidoc-post-composer__publish-tags .label,
#create-post-modal .eidoc-post-composer__publish-theme .label {
    margin: 0 0 10px;
    padding: 0;
    min-height: 0;
}

#create-post-modal .eidoc-post-composer__publish-tags > div.grid {
    display: flex;
    min-height: 40px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 7px 11px;
    border-color: var(--post-composer-border);
    border-radius: 8px;
}

#create-post-modal .eidoc-post-composer__publish-tags > div.grid > span {
    border: 1px solid #d7dee9;
    background: #f2f5fa;
    color: #344054;
    font-size: 14px;
    font-weight: 500;
}

#create-post-modal .eidoc-post-composer__publish-tags input {
    flex: 1 0 220px;
    margin-top: 0 !important;
    color: #344054;
    font-size: 15px;
}

#create-post-modal .eidoc-post-composer__publish-card .label-text-alt {
    color: #7a869a;
    font-size: 13px;
    opacity: 1;
}

#create-post-modal .eidoc-post-composer__publish-theme button[x-ref="themeDropdownBtn"] {
    height: 38px;
    border-color: var(--post-composer-border);
    border-radius: 8px;
    box-shadow: none;
}

#create-post-modal .eidoc-post-composer__theme-menu {
    padding: 6px;
    border: 1px solid var(--post-composer-border);
    border-radius: 10px;
    box-shadow: 0 18px 44px -24px rgba(15, 23, 42, 0.45);
    scrollbar-width: thin;
    scrollbar-color: rgba(122, 134, 154, 0.36) transparent;
}

#create-post-modal .eidoc-post-composer__theme-menu::-webkit-scrollbar {
    width: 8px;
}

#create-post-modal .eidoc-post-composer__theme-menu::-webkit-scrollbar-thumb {
    border: 2px solid #fff;
    border-radius: 999px;
    background: rgba(122, 134, 154, 0.32);
}

#create-post-modal .eidoc-post-composer__theme-menu ul {
    margin: 0;
    padding: 0;
}

#create-post-modal .eidoc-post-composer__theme-option {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #344054;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

#create-post-modal .eidoc-post-composer__theme-option:hover,
#create-post-modal .eidoc-post-composer__theme-option:focus-visible {
    background: #f8fbff;
    color: var(--post-composer-blue);
}

#create-post-modal .eidoc-post-composer__theme-option.is-active {
    background: var(--post-composer-blue-light);
    color: var(--post-composer-blue);
    font-weight: 700;
}

#create-post-modal .eidoc-post-composer__publish-settings {
    overflow: hidden;
    margin-top: 0;
}

#create-post-modal .eidoc-post-composer__publish-settings-head {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px;
    border: 0;
    border-bottom: 1px solid var(--post-composer-border);
    background: transparent;
    color: #111827;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__publish-settings-head .fa-sliders-h {
    color: #667085;
}

#create-post-modal .eidoc-post-composer__publish-settings-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 38px;
    row-gap: 12px;
    padding: 12px 18px 16px;
}

#create-post-modal .eidoc-post-composer__monetization-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px 38px;
    margin-top: 2px;
    padding: 12px;
    border: 1px solid rgba(216, 225, 239, 0.82);
    border-radius: 8px;
    background: #fbfcff;
}

#create-post-modal .eidoc-post-composer__monetization-options {
    display: contents;
}

#create-post-modal .eidoc-post-composer__price-row {
    display: flex;
    min-height: 35px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#create-post-modal .eidoc-post-composer__price-row label {
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

#create-post-modal .eidoc-post-composer__price-row .join {
    width: min(180px, 50%);
}

#create-post-modal .eidoc-post-composer__price-row .input {
    width: 100%;
    height: 32px;
    border-color: var(--post-composer-border);
    border-radius: 7px 0 0 7px;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
}

#create-post-modal .eidoc-post-composer__price-row .btn {
    min-height: 32px;
    height: 32px;
    border-color: var(--post-composer-border);
    border-radius: 0 7px 7px 0;
    color: #7a869a;
    font-weight: 700;
}

#create-post-modal .eidoc-post-composer__setting-row {
    display: flex;
    min-height: 35px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#create-post-modal .eidoc-post-composer__setting-row strong {
    display: block;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

#create-post-modal .eidoc-post-composer__setting-row small {
    display: block;
    margin-top: 2px;
    color: #7a869a;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
}

#create-post-modal .eidoc-post-composer__setting-row .toggle {
    min-width: 38px;
}

#create-post-modal .eidoc-post-composer__setting-row .select {
    min-height: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #344054;
    font-size: 13px;
    font-weight: 500;
}

#create-post-modal .eidoc-post-composer__schedule-input {
    position: relative;
    max-width: 322px;
}

#create-post-modal .eidoc-post-composer__schedule-input input {
    width: 100%;
    height: 36px;
    padding: 0 40px 0 12px;
    border: 1px solid var(--post-composer-border);
    border-radius: 7px;
    background: #fff;
    color: #344054;
    font-size: 13px;
}

#create-post-modal .eidoc-post-composer__schedule-input input:disabled {
    background: #fbfcff;
    color: #98a2b3;
}

#create-post-modal .eidoc-post-composer__schedule-input i {
    position: absolute;
    right: 12px;
    top: 50%;
    color: #7a869a;
    font-size: 14px;
    transform: translateY(-50%);
    pointer-events: none;
}

#create-post-modal .eidoc-post-composer__legacy-advanced {
    display: none !important;
}

#create-post-modal .eidoc-post-composer__publish-preview-panel {
    min-height: 100%;
    padding: 18px 19px;
}

#create-post-modal .eidoc-post-composer__publish-preview-panel h3 {
    margin: 0 0 18px;
    color: #344054;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

#create-post-modal .eidoc-post-composer__publish-preview-card {
    min-height: 262px;
    padding: 22px 18px;
    border: 1px solid var(--post-composer-border);
    border-radius: 12px;
    background: #fff;
}

#create-post-modal .eidoc-post-composer__publish-preview-type {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--post-composer-blue);
    font-size: 15px;
    font-weight: 700;
}

#create-post-modal .eidoc-post-composer__publish-preview-type i {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: var(--post-composer-blue-light);
    font-size: 11px;
}

#create-post-modal .eidoc-post-composer__publish-preview-card h4 {
    margin: 16px 0 8px;
    color: #111827;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
}

#create-post-modal .eidoc-post-composer__publish-preview-card p {
    margin: 0;
    color: #667085;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

#create-post-modal .eidoc-post-composer__publish-preview-divider {
    height: 1px;
    margin: 26px 0 20px;
    background: var(--post-composer-border);
}

#create-post-modal .eidoc-post-composer__publish-preview-destination {
    display: flex;
    align-items: center;
    gap: 12px;
}

#create-post-modal .eidoc-post-composer__publish-preview-destination strong,
#create-post-modal .eidoc-post-composer__publish-preview-destination small {
    display: block;
}

#create-post-modal .eidoc-post-composer__publish-preview-destination strong {
    color: #344054;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
}

#create-post-modal .eidoc-post-composer__publish-preview-destination small {
    margin-top: 3px;
    color: #667085;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
}

#create-post-modal .eidoc-post-composer__footer {
    min-height: 112px;
    margin: 30px -42px 0;
    padding: 26px 42px;
    border-top: 0;
    border-radius: 0 0 18px 18px;
    background: #fff;
    backdrop-filter: none;
}

#create-post-modal .eidoc-post-composer__status {
    max-width: min(44vw, 26rem);
    color: #748199;
    font-size: 16px;
    font-weight: 600;
}

#create-post-modal .eidoc-post-composer__status.text-success {
    color: #70809a;
}

#create-post-modal .eidoc-post-composer__status.text-error {
    color: #dc2626;
}

#create-post-modal .eidoc-post-composer__status.text-warning {
    color: #d97706;
}

#create-post-modal .eidoc-post-composer__status > i {
    display: inline-flex;
    width: 31px;
    height: 31px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px solid #86efac;
    color: #22c55e;
    font-size: 13px !important;
}

#create-post-modal .eidoc-post-composer__status.text-warning > i {
    border-color: #fed7aa;
    color: #ea580c;
}

#create-post-modal .eidoc-post-composer__status.text-error > i {
    border-color: #fecaca;
    color: #dc2626;
}

#create-post-modal .eidoc-post-composer__footer .btn-outline:not(.eidoc-post-composer__schedule-btn):not(.eidoc-post-composer__cancel) {
    display: none !important;
}

#create-post-modal .eidoc-post-composer__schedule-btn {
    border-color: var(--post-composer-border-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--post-composer-blue);
    font-size: 17px;
    font-weight: 700;
}

#create-post-modal .eidoc-post-composer__schedule-btn:hover,
#create-post-modal .eidoc-post-composer__schedule-btn:focus-visible {
    border-color: var(--post-composer-blue-mid);
    background: var(--post-composer-blue-light);
}

#create-post-modal .eidoc-post-composer__actions .btn-primary {
    border-radius: 11px;
    background: var(--post-composer-blue);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 16px 28px -18px rgba(35, 88, 230, 0.95);
}

#create-post-modal .eidoc-post-composer__actions .btn-primary:hover {
    background: var(--post-composer-blue-hover);
}

#create-post-modal .eidoc-post-composer__actions .btn-primary:active {
    transform: scale(0.98);
}

@media (max-width: 767px) {
    #create-post-modal {
        align-items: stretch;
        justify-content: stretch;
    }

    #create-post-modal .eidoc-post-composer {
        width: 100vw;
        max-height: 100dvh;
        min-height: 100dvh;
        border-radius: 0;
    }

    #create-post-modal .eidoc-post-composer__close {
        width: 40px;
        height: 40px;
        top: 0.875rem !important;
        right: 0.875rem !important;
    }

    #create-post-modal .eidoc-post-composer__header {
        position: sticky;
        top: 0;
        z-index: 40;
        border-radius: 0;
        min-height: 74px;
        padding: 16px;
    }

    #create-post-modal .eidoc-post-composer__brand-icon {
        width: 40px;
        height: 40px;
    }

    #create-post-modal-title {
        font-size: 20px;
    }

    #create-post-modal .custom-scrollbar {
        padding: 18px 16px 0;
    }

    #create-post-modal .eidoc-post-composer__stepper {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 18px;
    }

    #create-post-modal .eidoc-post-composer__step-card {
        min-height: 82px;
        padding: 14px 15px;
    }

    #create-post-modal .eidoc-post-composer__step-dot {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    #create-post-modal .eidoc-post-composer__controls {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #create-post-modal .eidoc-post-composer__controls > span[aria-hidden="true"] {
        display: none;
    }

    #create-post-modal .eidoc-post-composer__segments {
        min-height: 50px;
    }

    #create-post-modal .eidoc-post-composer__segment {
        min-height: 50px;
        padding: 0 16px;
        font-size: 15px;
    }

    #create-post-modal .eidoc-post-composer__segment i {
        font-size: 16px;
    }

    #create-post-modal .eidoc-post-composer__input {
        height: 50px;
        font-size: 17px;
    }

    #create-post-modal .eidoc-post-composer__editor {
        min-height: 300px;
    }

    #create-post-modal .eidoc-post-composer__publish-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #create-post-modal .eidoc-post-composer__publish-settings-body {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #create-post-modal .eidoc-post-composer__monetization-panel {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #create-post-modal .eidoc-post-composer__price-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    #create-post-modal .eidoc-post-composer__price-row .join {
        width: 100%;
    }

    #create-post-modal .eidoc-post-composer__publish-preview-panel {
        min-height: 0;
        padding: 16px;
    }

    #create-post-modal .eidoc-post-composer__publish-preview-card {
        min-height: 0;
    }

    #create-post-modal .eidoc-post-composer__footer {
        flex-direction: column;
        align-items: stretch;
        border-radius: 0 0 18px 18px;
        min-height: 0;
        padding: 16px;
    }

    #create-post-modal .eidoc-post-composer__actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    #create-post-modal .eidoc-post-composer__schedule-btn,
    #create-post-modal .eidoc-post-composer__actions .btn-primary {
        font-size: 15px;
    }

    #create-post-modal .eidoc-post-composer__status {
        max-width: 100%;
    }
}


/* Редактирование: высота по контенту iframe, не растягивать пустое место */
#edit-post-modal .modal-box {
    height: auto;
    min-height: 0;
    max-height: min(90vh, calc(100dvh - 2rem));
}

#edit-post-modal .edit-post-modal-body {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
}

#edit-post-modal #edit-post-iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    flex: none;
}

/* Embed-страница редактирования в iframe: те же правила Blok, что в модалке «Создать пост» */
html.eidoc-embed-modal-root #post-body-blok-holder-edit-modal,
html.eidoc-embed-modal-root #post-body-blok-holder {
    --eidoc-post-modal-toolbar-btn: 1.625rem;
    --eidoc-post-modal-toolbar-gap: 0.375rem;
    box-sizing: border-box;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Модалка «Создать/редактировать пост»: Blok — «+» сразу слева от текста */
#create-post-modal #post-body-blok-holder-modal,
#edit-post-modal #post-body-blok-holder-modal,
#edit-post-modal #post-body-blok-holder-edit-modal {
    --eidoc-post-modal-toolbar-btn: 1.625rem;
    --eidoc-post-modal-toolbar-gap: 0.375rem;
    box-sizing: border-box;
    padding-left: 1rem;
    padding-right: 1rem;
}

#create-post-modal #post-body-blok-holder-modal {
    --eidoc-post-modal-toolbar-btn: 2.125rem;
    --eidoc-post-modal-toolbar-gap: 0.5rem;
    --eidoc-post-modal-toolbar-gutter: 6rem;
    --eidoc-post-modal-toolbar-left: -2.25rem;
    min-height: 330px !important;
    position: relative;
    padding: 22px 12px 4px !important;
    border: 0 !important;
    border-radius: inherit;
    background: transparent;
}

#create-post-modal #post-body-blok-holder-modal::before {
    display: none;
}

#create-post-modal .eidoc-post-composer__add-block {
    display: inline-flex;
    width: calc(100% - 28px);
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 14px 14px;
    border: 1px dashed var(--post-composer-border);
    border-radius: 9px;
    background: #fff;
    color: #71809a;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

#create-post-modal .eidoc-post-composer__add-block:hover,
#create-post-modal .eidoc-post-composer__add-block:focus-visible {
    border-color: var(--post-composer-blue-mid);
    background: #f8fbff;
    color: var(--post-composer-blue);
}

/* Создание поста: раскладка «редактор, а не форма».
   Окно фиксированного размера (760×640), уменьшается только если экран меньше.
   Шапка и футер всегда видны, прокручивается только область контента. */
#create-post-modal {
    align-items: center;
    justify-content: center;
    padding: 12px;
}

#create-post-modal .eidoc-post-composer {
    width: min(760px, calc(100vw - 24px));
    height: min(640px, calc(100dvh - 24px));
    min-height: 0;
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
}

/* Шапка */
#create-post-modal .eidoc-post-composer__header {
    min-height: 0;
    padding: 14px 22px;
    border-radius: 14px 14px 0 0;
}

#create-post-modal .eidoc-post-composer__brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

#create-post-modal .eidoc-post-composer__brand-icon i {
    font-size: 14px;
}

#create-post-modal-title {
    font-size: 20px;
}

/* Кнопка закрытия — круг на внешнем углу окна */
#create-post-modal .eidoc-post-composer__close {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    top: -10px !important;
    right: -10px !important;
    font-size: 12px;
}

#create-post-modal .custom-scrollbar {
    min-height: 0;
    padding: 14px 22px 0;
    border-radius: 0 0 14px 14px;
}

/* Скрываем то, что заменено компактными элементами */
#create-post-modal .eidoc-post-composer__stepper,
#create-post-modal .eidoc-post-composer__controls > span[aria-hidden="true"],
#create-post-modal .eidoc-post-composer__controls > section:last-child,
#create-post-modal #post-kind-control-label,
#create-post-modal .eidoc-post-composer__editor-footer,
#create-post-modal .eidoc-post-composer__preview-btn {
    display: none !important;
}

/* Индикатор шагов */
#create-post-modal .eidoc-post-composer__progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--post-composer-text);
    white-space: nowrap;
}

#create-post-modal .eidoc-post-composer__progress-dot {
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--post-composer-blue);
    box-shadow: 0 0 0 4px var(--post-composer-blue-light);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

#create-post-modal .eidoc-post-composer__progress-step,
#create-post-modal .eidoc-post-composer__progress-current {
    font-weight: 600;
}

#create-post-modal .eidoc-post-composer__progress-sep {
    color: #a0aabb;
}

#create-post-modal .eidoc-post-composer__progress-line {
    width: 36px;
    height: 1px;
    margin: 0 4px;
    background: var(--post-composer-border);
}

#create-post-modal .eidoc-post-composer__progress-next,
#create-post-modal .eidoc-post-composer__progress-back {
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--post-composer-muted);
}

#create-post-modal .eidoc-post-composer__progress-back {
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__progress-back:hover {
    color: var(--post-composer-blue);
}

/* Тип публикации — одна строка из 4 равных вкладок */
#create-post-modal .eidoc-post-composer__controls {
    display: block;
    margin-bottom: 14px;
}

#create-post-modal .eidoc-post-composer__segments {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 40px;
    border-radius: 9px;
}

#create-post-modal .eidoc-post-composer__segment {
    min-height: 38px;
    justify-content: center;
    padding: 0 8px;
    gap: 8px;
    font-size: 14px;
}

#create-post-modal .eidoc-post-composer__segment i {
    font-size: 14px;
}

#create-post-modal form.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 12px;
}

#create-post-modal .eidoc-post-composer__field .label-text,
#create-post-modal [role="tabpanel"] .label-text {
    font-size: 13px;
}

/* Заголовок + «Предложить» */
#create-post-modal .eidoc-post-composer__input {
    height: 42px;
    padding: 0 64px 0 14px;
    border-radius: 9px;
    font-size: 15px;
}

#create-post-modal .eidoc-post-composer__field .fa-heading.absolute {
    display: none;
}

#create-post-modal .eidoc-post-composer__suggest {
    position: absolute;
    top: 50%;
    right: 64px;
    display: inline-flex;
    height: 28px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 7px;
    background: var(--post-composer-blue-light);
    color: var(--post-composer-blue);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__suggest:hover:not(:disabled) {
    background: var(--post-composer-blue-mid);
}

#create-post-modal .eidoc-post-composer__suggest:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#create-post-modal .eidoc-post-composer__title-counter {
    right: 14px;
    font-size: 12px;
}

/* Редактор */
#create-post-modal .eidoc-post-composer__editor {
    position: relative;
    min-height: 230px;
    border: 1px solid var(--post-composer-border) !important;
    border-radius: 10px;
}

#create-post-modal #post-body-blok-holder-modal {
    min-height: 228px !important;
    padding-top: 12px !important;
}

#create-post-modal #post-body-blok-holder-modal .cursor-text {
    min-height: 120px !important;
}

/* Пустое состояние редактора */
#create-post-modal .eidoc-post-composer__empty {
    position: absolute;
    inset: 48px 16px 16px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    pointer-events: none;
    text-align: center;
}

#create-post-modal .eidoc-post-composer__empty-icon {
    margin-bottom: 6px;
    color: #a6b1c2;
    font-size: 28px;
}

#create-post-modal .eidoc-post-composer__empty-title {
    color: #475467;
    font-size: 16px;
    font-weight: 700;
}

#create-post-modal .eidoc-post-composer__empty-hint {
    color: var(--post-composer-muted);
    font-size: 12px;
}

#create-post-modal .eidoc-post-composer__empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    pointer-events: auto;
}

#create-post-modal .eidoc-post-composer__empty-actions button {
    display: inline-flex;
    height: 30px;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid #e7ecf3;
    border-radius: 7px;
    background: #f6f8fb;
    color: #475467;
    font-size: 12px;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__empty-actions button:hover {
    border-color: var(--post-composer-blue-mid);
    color: var(--post-composer-blue);
}

/* Быстрые действия под редактором */
#create-post-modal .eidoc-post-composer__quick {
    display: flex;
    align-items: center;
    gap: 8px;
}

#create-post-modal .eidoc-post-composer__quick-btn {
    display: inline-flex;
    height: 30px;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid var(--post-composer-border);
    border-radius: 7px;
    background: #fff;
    color: #344054;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__quick-btn:hover:not(:disabled),
#create-post-modal .eidoc-post-composer__quick-btn.is-active {
    border-color: var(--post-composer-blue-mid);
    background: var(--post-composer-blue-light);
    color: var(--post-composer-blue);
}

#create-post-modal .eidoc-post-composer__quick-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#create-post-modal .eidoc-post-composer__quick-caret {
    font-size: 9px;
    opacity: 0.6;
}

#create-post-modal .eidoc-post-composer__quick-menu {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    z-index: 60;
    min-width: 180px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--post-composer-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 36px -16px rgba(15, 23, 42, 0.35);
}

#create-post-modal .eidoc-post-composer__quick-menu button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: #344054;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__quick-menu button i {
    width: 14px;
    color: #8a95a8;
}

#create-post-modal .eidoc-post-composer__quick-menu button:hover {
    background: var(--post-composer-blue-light);
    color: var(--post-composer-blue);
}

#create-post-modal .eidoc-post-composer__quick-counter {
    margin-left: auto;
    color: #98a2b3;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

#create-post-modal .eidoc-post-composer__quick-counter.is-over {
    color: #d92d20;
}

/* Футер */
#create-post-modal .eidoc-post-composer__footer {
    min-height: 0;
    margin: 14px -22px 0;
    padding: 12px 22px;
    border-top: 1px solid var(--post-composer-border);
    border-radius: 0 0 14px 14px;
}

#create-post-modal .eidoc-post-composer__status {
    font-size: 13px;
}

#create-post-modal .eidoc-post-composer__footer [aria-controls="create-post-version-panel"] {
    height: 28px;
    min-height: 28px;
    margin-left: 6px;
    padding: 0 8px 0 14px;
    border-left: 1px solid var(--post-composer-border);
    border-radius: 0;
    color: var(--post-composer-blue);
    font-size: 13px;
    font-weight: 500;
}

#create-post-modal .eidoc-post-composer__footer [aria-controls="create-post-version-panel"] i {
    font-size: 12px;
}

/* Активный тип публикации — карточка с рамкой */
#create-post-modal .eidoc-post-composer__segment.is-active {
    border: 1px solid #8fb0f7;
    border-radius: 8px;
    background: var(--post-composer-blue-light);
    box-shadow: none;
}

#create-post-modal .eidoc-post-composer__actions .btn {
    height: 36px;
    min-height: 36px;
    padding: 0 18px;
    border-radius: 9px;
    font-size: 13px;
}

#create-post-modal .eidoc-post-composer__footer {
    flex-wrap: nowrap;
}

#create-post-modal .eidoc-post-composer__footer > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

#create-post-modal .eidoc-post-composer__actions {
    flex: 0 0 auto;
}

#create-post-modal .eidoc-post-composer__actions .eidoc-post-composer__delete-draft {
    width: 36px;
    padding: 0;
    color: #98a2b3;
}

#create-post-modal .eidoc-post-composer__actions .eidoc-post-composer__delete-draft:hover {
    color: #d92d20;
}

#create-post-modal .eidoc-post-composer__cancel {
    border-color: var(--post-composer-border);
    background: #fff;
    color: var(--post-composer-blue);
}

#create-post-modal .eidoc-post-composer__cancel:hover {
    border-color: var(--post-composer-blue-mid);
    background: var(--post-composer-blue-light);
    color: var(--post-composer-blue);
}

/* ===== Шаг 2 «Публикация»: две колонки 60/40, живой предпросмотр ===== */
#create-post-modal .eidoc-post-composer.is-step-publish {
    width: min(1120px, calc(100vw - 24px));
    height: min(760px, calc(100dvh - 24px));
}

#create-post-modal .eidoc-post-composer__header > div {
    gap: 14px;
}

/* Степпер в шапке */
#create-post-modal .eidoc-post-composer__header-steps {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 auto;
    padding: 0 40px 0 0;
    list-style: none;
}

#create-post-modal .eidoc-post-composer__header-steps > li:not(.eidoc-post-composer__header-step-line) {
    display: flex;
    align-items: center;
    gap: 10px;
}

#create-post-modal .eidoc-post-composer__header-step-dot {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

#create-post-modal .is-done .eidoc-post-composer__header-step-dot {
    border: 1px solid var(--post-composer-border);
    background: #fff;
    color: var(--post-composer-blue);
}

#create-post-modal .is-current .eidoc-post-composer__header-step-dot {
    background: var(--post-composer-blue);
    box-shadow: 0 0 0 4px var(--post-composer-blue-light);
    color: #fff;
}

#create-post-modal .eidoc-post-composer__header-step-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

#create-post-modal .eidoc-post-composer__header-step-copy strong {
    font-size: 13px;
    color: var(--post-composer-text);
}

#create-post-modal .eidoc-post-composer__header-step-copy small {
    font-size: 11px;
    color: var(--post-composer-muted);
}

#create-post-modal .eidoc-post-composer__header-step-copy button {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    color: var(--post-composer-blue);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__header-step-line {
    width: 56px;
    height: 2px;
    border-radius: 2px;
    background: var(--post-composer-blue);
}

/* Сетка шага */
#create-post-modal .is-step-publish .custom-scrollbar {
    padding: 16px 22px 0;
    background: #f8fafc;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-main {
    gap: 12px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-card {
    margin: 0 !important;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-label,
#create-post-modal .is-step-publish .eidoc-post-composer__publish-card > .label .label-text {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--post-composer-text);
}

/* Место · тема+теги · обложка */
#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-rows: auto;
    gap: 12px 0;
}

#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__publish-location {
    grid-column: 1 / -1;
    grid-row: 1;
}

#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__publish-theme {
    grid-column: 1;
    grid-row: 2;
    border-right: 0;
    border-radius: 12px 0 0 12px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__publish-tags {
    grid-column: 2;
    grid-row: 2;
    border-left: 0;
    border-radius: 0 12px 12px 0;
}

#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__publish-tags:only-of-type,
#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__publish-theme[style*="display: none"] + * {
    grid-column: 1 / -1;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags .label-text-alt {
    display: none;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > div {
    display: flex;
    flex-wrap: wrap;
    min-height: 40px;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 9px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > div > input {
    width: auto;
    min-width: 120px;
    flex: 1 1 120px;
    margin: 0;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-theme button[x-ref="themeDropdownBtn"] {
    height: 40px;
    border-radius: 9px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__cover {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    gap: 6px 16px;
    contain: none;
    height: auto;
    padding: 14px 16px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__cover-heading {
    grid-column: 1 / -1;
    margin-bottom: 2px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__cover-frame {
    grid-column: 1;
    grid-row: 2 / 5;
    aspect-ratio: 16 / 9;
    flex: none;
    border-radius: 10px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__cover-frame .eidoc-post-composer__cover-image {
    object-fit: cover;
}

#create-post-modal .is-step-publish .eidoc-post-composer__cover > .btn {
    grid-column: 2;
    width: auto;
    justify-self: start;
    height: 34px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 9px;
    font-size: 13px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__cover > .btn-ghost {
    height: 28px;
    min-height: 28px;
    color: #98a2b3;
}

/* Место публикации */
#create-post-modal .is-step-publish .eidoc-post-composer__publish-place {
    min-height: 56px;
    padding: 8px 12px;
    border-radius: 10px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-place-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

#create-post-modal .eidoc-post-composer__publish-place-sub {
    display: block;
    font-size: 12px;
    color: var(--post-composer-muted);
}

/* Основные настройки */
#create-post-modal .eidoc-post-composer__basic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#create-post-modal .eidoc-post-composer__basic-cell {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
    padding: 0 14px;
    cursor: default;
}

#create-post-modal .eidoc-post-composer__basic-cell:first-child {
    padding-left: 0;
}

#create-post-modal .eidoc-post-composer__basic-cell + .eidoc-post-composer__basic-cell {
    border-left: 1px solid var(--post-composer-border);
}

#create-post-modal .eidoc-post-composer__basic-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--post-composer-text);
}

#create-post-modal .eidoc-post-composer__basic-title i {
    width: 14px;
    color: #667085;
}

#create-post-modal .eidoc-post-composer__basic-select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--post-composer-border);
    border-radius: 9px;
    background: #fff;
    font-size: 13px;
}

#create-post-modal .eidoc-post-composer__basic-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__basic-toggle small {
    font-size: 11px;
    line-height: 1.3;
    color: var(--post-composer-muted);
}

/* Дополнительные настройки */
#create-post-modal .eidoc-post-composer__publish-extra {
    padding: 0 !important;
}

#create-post-modal .eidoc-post-composer__publish-extra-head {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__publish-extra-head > i:first-child {
    color: #667085;
}

#create-post-modal .eidoc-post-composer__publish-extra-head span {
    display: flex;
    flex: 1;
    flex-direction: column;
}

#create-post-modal .eidoc-post-composer__publish-extra-head strong {
    font-size: 13px;
    color: var(--post-composer-text);
}

#create-post-modal .eidoc-post-composer__publish-extra-head small {
    font-size: 12px;
    color: var(--post-composer-muted);
}

#create-post-modal .eidoc-post-composer__publish-extra-caret {
    color: #98a2b3;
    transition: transform 0.15s ease;
}

#create-post-modal .eidoc-post-composer__publish-extra .eidoc-post-composer__publish-settings-body {
    padding: 0 16px 12px;
}

/* Живой предпросмотр */
#create-post-modal .eidoc-post-composer__live-preview {
    position: sticky;
    top: 0;
    padding: 14px 16px 16px;
    border: 1px solid var(--post-composer-border);
    border-radius: 12px;
    background: #fff;
}

#create-post-modal .eidoc-post-composer__live-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

#create-post-modal .eidoc-post-composer__live-preview-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

#create-post-modal .eidoc-post-composer__live-preview-head p {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--post-composer-muted);
}

#create-post-modal .eidoc-post-composer__live-preview-modes {
    display: flex;
    gap: 4px;
}

#create-post-modal .eidoc-post-composer__live-preview-modes button {
    display: inline-flex;
    height: 28px;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid var(--post-composer-border);
    border-radius: 7px;
    background: #fff;
    color: #667085;
    font-size: 11px;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__live-preview-modes button.is-active {
    border-color: #8fb0f7;
    background: var(--post-composer-blue-light);
    color: var(--post-composer-blue);
    font-weight: 600;
}

#create-post-modal .eidoc-post-composer__live-card {
    margin: 0 auto;
    padding: 14px;
    border: 1px solid #edf1f6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 20px -14px rgba(15, 23, 42, 0.25);
    transition: max-width 0.2s ease;
}

#create-post-modal .eidoc-post-composer__live-card.is-mobile {
    max-width: 300px;
}

#create-post-modal .eidoc-post-composer__live-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

#create-post-modal .eidoc-post-composer__live-card-author img {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
}

#create-post-modal .eidoc-post-composer__live-card-author span {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

#create-post-modal .eidoc-post-composer__live-card-author strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#create-post-modal .eidoc-post-composer__live-card-author small {
    font-size: 11px;
    color: var(--post-composer-muted);
}

#create-post-modal .eidoc-post-composer__live-card-author > i {
    color: #98a2b3;
}

#create-post-modal .eidoc-post-composer__live-card-kind {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--post-composer-blue-light);
    color: var(--post-composer-blue);
    font-size: 11px;
    font-weight: 600;
}

#create-post-modal .eidoc-post-composer__live-card h4 {
    display: -webkit-box;
    margin: 8px 0 6px;
    overflow: hidden;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--post-composer-text);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#create-post-modal .eidoc-post-composer__live-card.is-mobile h4 {
    font-size: 15px;
}

#create-post-modal .eidoc-post-composer__live-card p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.5;
    color: #667085;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

#create-post-modal .eidoc-post-composer__live-card-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 10px;
    border-radius: 9px;
    object-fit: cover;
}

#create-post-modal .eidoc-post-composer__live-card-actions {
    display: flex;
    gap: 18px;
    color: #667085;
    font-size: 12px;
}

#create-post-modal .eidoc-post-composer__live-card-actions span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#create-post-modal .eidoc-post-composer__live-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

#create-post-modal .eidoc-post-composer__live-card-tags span {
    padding: 3px 8px;
    border-radius: 6px;
    background: #f2f4f7;
    color: #475467;
    font-size: 11px;
}

/* Футер шага 2: планирование рядом с кнопками */
#create-post-modal .eidoc-post-composer__schedule-inline {
    display: inline-flex;
    height: 36px;
    align-items: center;
    gap: 6px;
    padding: 0 6px 0 10px;
    border: 1px solid var(--post-composer-border);
    border-radius: 9px;
    color: var(--post-composer-blue);
    font-size: 13px;
}

#create-post-modal .eidoc-post-composer__schedule-inline input {
    border: 0;
    background: transparent;
    color: var(--post-composer-text);
    font-size: 13px;
    outline: none;
}

#create-post-modal .eidoc-post-composer__schedule-inline button {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: #98a2b3;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__schedule-inline button:hover {
    background: #f2f4f7;
    color: #d92d20;
}

#create-post-modal .is-step-publish .eidoc-post-composer__actions .btn-ghost:not(.eidoc-post-composer__delete-draft) {
    border: 1px solid var(--post-composer-border);
    background: #fff;
}

/* Шаг 2: компактные размеры, чтобы всё помещалось без прокрутки */
#create-post-modal .is-step-publish .eidoc-post-composer__publish-main,
#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover {
    gap: 10px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover {
    row-gap: 10px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-card {
    padding: 10px 14px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-label,
#create-post-modal .is-step-publish .eidoc-post-composer__publish-card > .label {
    min-height: 0;
    margin-bottom: 6px;
    padding: 0;
    font-size: 13px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-place {
    min-height: 46px;
    padding: 5px 10px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-avatar,
#create-post-modal .is-step-publish .eidoc-post-composer__publish-place .eidoc-post-composer__publish-avatar img {
    width: 34px;
    height: 34px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > div {
    min-height: 38px;
    padding: 4px 6px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > div > span {
    padding-top: 2px;
    padding-bottom: 2px;
    font-size: 11px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > div > input {
    font-size: 12px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-theme button[x-ref="themeDropdownBtn"] {
    height: 38px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__cover {
    grid-template-columns: 180px minmax(0, 1fr);
    padding: 10px 14px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__cover-heading {
    margin-bottom: 0;
}

#create-post-modal .eidoc-post-composer__basic-cell {
    gap: 6px;
}

#create-post-modal .eidoc-post-composer__basic-select {
    height: 34px;
}

#create-post-modal .eidoc-post-composer__publish-extra-head {
    padding: 9px 14px;
}

#create-post-modal .is-step-publish form.space-y-4 > .eidoc-post-composer__publish-grid {
    margin-top: 0 !important;
}

#create-post-modal .is-step-publish .custom-scrollbar {
    padding-top: 12px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__footer {
    margin-top: 0;
}

#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__cover {
    grid-template-columns: 150px minmax(0, 1fr);
}

#create-post-modal .eidoc-post-composer__basic-title {
    white-space: nowrap;
}

/* ===== Визуальная сверка с референсами (оба шага) ===== */

/* Футер всегда прижат к низу окна: контент растягивается на всю высоту */
#create-post-modal .custom-scrollbar {
    display: flex;
    flex-direction: column;
}

#create-post-modal .custom-scrollbar > div[x-show] {
    display: flex;
    min-height: 100%;
    flex: 1 0 auto;
    flex-direction: column;
}

#create-post-modal .custom-scrollbar > div[x-show] > form {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
}

#create-post-modal .custom-scrollbar > div[x-show] > form > * + * {
    margin-top: 12px;
}

#create-post-modal .eidoc-post-composer__footer {
    margin-top: auto !important;
}

#create-post-modal .custom-scrollbar > div[x-show] > form + .eidoc-post-composer__footer,
#create-post-modal .custom-scrollbar > div[x-show] > .eidoc-post-composer__footer {
    margin-top: 14px !important;
}

#create-post-modal .is-step-publish .custom-scrollbar > div[x-show] > .eidoc-post-composer__footer {
    margin-top: 12px !important;
}

/* Шаг 1: редактор забирает свободную высоту */
#create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__body-panel:not([style*="display: none"]) {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__body-panel:not([style*="display: none"]) > .eidoc-post-composer__editor {
    flex: 1 1 auto;
}

/* Шаг 2: колонки одной высоты, предпросмотр тянется до низа */
#create-post-modal .is-step-publish .custom-scrollbar > div[x-show] > form > .eidoc-post-composer__publish-grid {
    flex: 1 0 auto;
    align-items: stretch;
}

#create-post-modal .is-step-publish .eidoc-post-composer__live-preview {
    position: static;
    display: flex;
    flex-direction: column;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-extra {
    margin-top: auto !important;
}

#create-post-modal button:focus:not(:focus-visible) {
    outline: none;
}

#create-post-modal .eidoc-post-composer__publish-extra:focus-within {
    border-color: var(--post-composer-border);
}

/* Шапка как на референсе */
#create-post-modal .eidoc-post-composer__header {
    padding: 14px 22px;
}

#create-post-modal .eidoc-post-composer__brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

#create-post-modal .eidoc-post-composer__brand-icon i {
    font-size: 16px;
}

#create-post-modal-title {
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}

#create-post-modal .eidoc-post-composer__header-steps {
    margin-left: auto;
    margin-right: auto;
    padding-right: 0;
}

#create-post-modal .eidoc-post-composer__header-step-dot {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    padding: 0;
    border: 1px solid transparent;
    font-size: 14px;
}

#create-post-modal .is-upcoming .eidoc-post-composer__header-step-dot {
    border-color: var(--post-composer-border);
    background: #fff;
    color: #98a2b3;
    cursor: pointer;
}

#create-post-modal .is-upcoming .eidoc-post-composer__header-step-copy strong {
    color: #667085;
}

#create-post-modal .eidoc-post-composer__header-step-copy strong {
    font-size: 14px;
}

#create-post-modal .eidoc-post-composer__header-step-copy small {
    font-size: 12px;
}

#create-post-modal .eidoc-post-composer__header-step-line {
    width: 64px;
    background: var(--post-composer-border);
}

#create-post-modal .eidoc-post-composer__header-step-line.is-done {
    background: var(--post-composer-blue);
}

/* Шаг 1: размеры элементов */
#create-post-modal .eidoc-post-composer:not(.is-step-publish) {
    height: min(680px, calc(100dvh - 24px));
}

#create-post-modal .eidoc-post-composer__controls {
    margin-bottom: 4px;
}

#create-post-modal .eidoc-post-composer__segments {
    min-height: 46px;
    border-radius: 10px;
}

#create-post-modal .eidoc-post-composer__segment {
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
}

#create-post-modal .eidoc-post-composer__field .label-text,
#create-post-modal [role="tabpanel"] .label-text {
    font-size: 14px;
    font-weight: 600;
}

#create-post-modal .eidoc-post-composer__input {
    height: 46px;
    font-size: 15px;
    font-weight: 400;
}

#create-post-modal .eidoc-post-composer__editor {
    min-height: 260px;
}

#create-post-modal #post-body-blok-holder-modal {
    min-height: 258px !important;
}

#create-post-modal .eidoc-post-composer__quick-btn {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
}

#create-post-modal .eidoc-post-composer__actions .btn {
    height: 40px;
    min-height: 40px;
    padding: 0 20px;
    font-size: 14px;
}

/* Статус черновика */
#create-post-modal .eidoc-post-composer__status {
    gap: 10px;
    font-size: 13px;
}

#create-post-modal .eidoc-post-composer__status > i {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 11px !important;
}

#create-post-modal .eidoc-post-composer__status-text {
    display: inline-flex;
    min-width: 0;
    align-items: baseline;
    gap: 6px;
}

#create-post-modal .eidoc-post-composer__status-title {
    font-weight: 600;
}

#create-post-modal .eidoc-post-composer__status-time {
    color: inherit;
}

#create-post-modal .is-step-publish .eidoc-post-composer__status > i {
    width: 32px;
    height: 32px;
    font-size: 14px !important;
}

#create-post-modal .is-step-publish .eidoc-post-composer__status-text {
    flex-direction: column;
    gap: 0;
}

#create-post-modal .is-step-publish .eidoc-post-composer__status-time {
    color: var(--post-composer-muted);
    font-size: 12px;
}

/* Шаг 2: карточки */
#create-post-modal .is-step-publish .custom-scrollbar {
    background: #fff;
}

#create-post-modal .eidoc-post-composer__label-help {
    margin-left: 6px;
    color: #98a2b3;
    font-size: 13px;
    font-weight: 400;
    cursor: help;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-location .eidoc-post-composer__publish-help {
    top: 8px;
    right: auto;
    left: 148px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-place {
    border: 1px solid var(--post-composer-border);
    background: #fff;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-avatar img {
    border-radius: 8px;
}

/* Тема и теги — одна карточка с общим заголовком */
#create-post-modal .is-step-publish .eidoc-post-composer__publish-theme,
#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags {
    position: relative;
    padding-top: 40px !important;
}

#create-post-modal .eidoc-post-composer__group-title {
    position: absolute;
    top: 10px;
    left: 14px;
    z-index: 3;
    white-space: nowrap;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-theme > .label .label-text,
#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > .label .label-text {
    font-size: 12px;
    font-weight: 500;
    color: #344054;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-theme > .label,
#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > .label {
    margin-bottom: 4px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-theme {
    padding-right: 10px !important;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags {
    padding-left: 10px !important;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-theme button[x-ref="themeDropdownBtn"] {
    border: 1px solid var(--post-composer-border);
    color: var(--post-composer-text);
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > div {
    border: 0 !important;
    padding: 0 !important;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > div > span {
    height: 28px;
    padding: 0 6px 0 10px !important;
    border: 1px solid #e4e7ec;
    border-radius: 7px;
    background: #f2f4f7 !important;
    color: #344054 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > div > input {
    height: 28px;
    padding: 0 8px;
    border: 1px dashed var(--post-composer-border);
    border-radius: 7px;
}

/* Обложка: превью + действие + подпись */
#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__cover--v2 {
    display: block;
}

#create-post-modal .eidoc-post-composer__cover-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
    gap: 14px;
    align-items: stretch;
}

#create-post-modal .eidoc-post-composer__cover--v2 .eidoc-post-composer__cover-frame {
    position: relative;
    height: 80px;
    aspect-ratio: auto;
    border-radius: 10px;
    background: #f2f4f7;
}

#create-post-modal .eidoc-post-composer__cover--v2 .eidoc-post-composer__cover-frame .eidoc-post-composer__cover-image {
    object-fit: cover;
}

#create-post-modal .eidoc-post-composer__cover-overlay {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    gap: 6px;
}

#create-post-modal .eidoc-post-composer__cover-overlay button {
    display: inline-flex;
    height: 30px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 7px;
    background: rgba(17, 24, 39, 0.72);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__cover-action {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #dfe8fb;
    border-radius: 10px;
    background: #f3f7ff;
    text-align: left;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__cover-action:hover:not(:disabled) {
    border-color: var(--post-composer-blue-mid);
}

#create-post-modal .eidoc-post-composer__cover-action > i {
    margin-top: 2px;
    color: var(--post-composer-blue);
    font-size: 18px;
}

#create-post-modal .eidoc-post-composer__cover-action span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#create-post-modal .eidoc-post-composer__cover-action strong {
    color: var(--post-composer-blue);
    font-size: 13px;
}

#create-post-modal .eidoc-post-composer__cover-action small {
    color: var(--post-composer-muted);
    font-size: 12px;
    line-height: 1.35;
}

#create-post-modal .eidoc-post-composer__cover-note {
    margin: 6px 0 0;
    color: var(--post-composer-muted);
    font-size: 11px;
}

/* Основные настройки */
#create-post-modal .eidoc-post-composer__basic-select-wrap {
    position: relative;
    display: block;
}

#create-post-modal .eidoc-post-composer__basic-select-wrap > i {
    position: absolute;
    top: 50%;
    left: 12px;
    color: #667085;
    font-size: 13px;
    transform: translateY(-50%);
    pointer-events: none;
}

#create-post-modal .eidoc-post-composer__basic-select {
    width: 100%;
    height: 38px;
    padding-left: 34px;
}

/* Предпросмотр */
#create-post-modal .eidoc-post-composer__live-card {
    flex: 1 0 auto;
    padding: 16px;
}

#create-post-modal .eidoc-post-composer__live-card h4 {
    font-size: 19px;
}

#create-post-modal .eidoc-post-composer__live-card p {
    font-size: 13px;
}

#create-post-modal .eidoc-post-composer__live-card-actions {
    gap: 22px;
    font-size: 13px;
}

#create-post-modal .eidoc-post-composer__live-card-actions span:nth-child(3) {
    margin-left: 0;
}

#create-post-modal .eidoc-post-composer__live-card-tags span {
    padding: 4px 10px;
    font-size: 12px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__actions .btn {
    height: 42px;
    min-height: 42px;
    padding: 0 22px;
}

#create-post-modal .is-step-publish .eidoc-post-composer__cover--v2 .eidoc-post-composer__cover-frame {
    grid-column: auto;
    grid-row: auto;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-theme button[x-ref="themeDropdownBtn"] {
    border: 1px solid var(--post-composer-border) !important;
    padding: 0 12px !important;
    background: #fff !important;
}

/* ===== Шаг 1: две колонки (редактор + ИИ-помощник) ===== */
#create-post-modal .eidoc-post-composer:not(.is-step-publish) {
    width: min(1120px, calc(100vw - 24px));
    height: min(760px, calc(100dvh - 24px));
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar > div[x-show] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    column-gap: 22px;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar > div[x-show] > * {
    grid-column: 1;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar > div[x-show] > .eidoc-post-composer__controls {
    grid-row: 1;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar > div[x-show] > form {
    grid-row: 2;
    margin-top: 6px;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar > div[x-show] > .eidoc-post-composer__assist {
    grid-column: 2;
    grid-row: 1 / 3;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar > div[x-show] > .eidoc-post-composer__footer {
    grid-column: 1 / -1;
    grid-row: 3;
}

/* Строка типов: отдельные кнопки + «Шаблоны» справа */
#create-post-modal .eidoc-post-composer__controls:not([style*="display: none"]) {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

#create-post-modal .eidoc-post-composer__controls > section:first-child {
    flex: 1 1 auto;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__segments {
    display: flex;
    gap: 8px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__segment {
    flex: 0 0 auto;
    min-width: 108px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--post-composer-border);
    border-radius: 9px;
    background: #fff;
    color: var(--post-composer-text);
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__segment::before {
    display: none !important;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__segment.is-active {
    border-color: #6f97f2;
    background: #f5f8ff;
    color: var(--post-composer-blue);
}

#create-post-modal .eidoc-post-composer__templates {
    position: relative;
    margin-left: auto;
}

#create-post-modal .eidoc-post-composer__templates-btn {
    display: inline-flex;
    height: 44px;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--post-composer-border);
    border-radius: 9px;
    background: #fff;
    color: var(--post-composer-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__templates-btn:hover {
    border-color: var(--post-composer-blue-mid);
    background: var(--post-composer-blue-light);
}

#create-post-modal .eidoc-post-composer__templates-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 60;
    width: 260px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--post-composer-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 36px -16px rgba(15, 23, 42, 0.35);
}

#create-post-modal .eidoc-post-composer__templates-menu button {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: none;
    text-align: left;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__templates-menu button:hover {
    background: var(--post-composer-blue-light);
}

#create-post-modal .eidoc-post-composer__templates-menu strong {
    font-size: 13px;
    color: var(--post-composer-text);
}

#create-post-modal .eidoc-post-composer__templates-menu small {
    font-size: 11px;
    color: var(--post-composer-muted);
}

/* Заголовок: поле + «Улучшить» + иконка */
#create-post-modal .eidoc-post-composer__title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

#create-post-modal .eidoc-post-composer__title-input {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

#create-post-modal .eidoc-post-composer__title-input .eidoc-post-composer__input {
    padding-right: 64px !important;
}

#create-post-modal .eidoc-post-composer__field > .relative > .eidoc-post-composer__suggest {
    position: static;
    height: 46px;
    padding: 0 16px;
    transform: none;
    border: 1px solid var(--post-composer-border);
    border-radius: 9px;
    background: #fff;
    color: #344054;
    font-size: 14px;
}

#create-post-modal .eidoc-post-composer__field > .relative > .eidoc-post-composer__suggest i {
    color: var(--post-composer-blue);
}

#create-post-modal .eidoc-post-composer__suggest-icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--post-composer-border);
    border-radius: 9px;
    background: #fff;
    color: #475467;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__suggest-icon:hover:not(:disabled),
#create-post-modal .eidoc-post-composer__field > .relative > .eidoc-post-composer__suggest:hover:not(:disabled) {
    border-color: var(--post-composer-blue-mid);
    background: var(--post-composer-blue-light);
}

#create-post-modal .eidoc-post-composer__suggest-icon:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Правая колонка */
#create-post-modal .eidoc-post-composer__assist {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

#create-post-modal .eidoc-post-composer__assist-card {
    border: 1px solid var(--post-composer-border);
    border-radius: 12px;
    background: #fff;
}

#create-post-modal .eidoc-post-composer__assist-head {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    background: none;
    color: var(--post-composer-text);
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__assist-head > span {
    flex: 1;
}

#create-post-modal .eidoc-post-composer__assist-head-icon {
    font-size: 17px;
}

#create-post-modal .eidoc-post-composer__assist-head-icon.is-ai {
    color: var(--post-composer-blue);
}

#create-post-modal .eidoc-post-composer__assist-head-icon.is-tip {
    color: #f59e0b;
}

#create-post-modal .eidoc-post-composer__assist-caret {
    color: #344054;
    font-size: 12px;
    transition: transform 0.15s ease;
}

#create-post-modal .eidoc-post-composer__assist-list {
    padding: 4px 8px;
}

#create-post-modal .eidoc-post-composer__assist-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    background: none;
    text-align: left;
    cursor: pointer;
}

#create-post-modal .eidoc-post-composer__assist-item:last-child {
    border-bottom: 0;
}

#create-post-modal .eidoc-post-composer__assist-item:hover:not(:disabled) {
    border-radius: 8px;
    background: #f8fafc;
}

#create-post-modal .eidoc-post-composer__assist-item:disabled {
    cursor: not-allowed;
}

#create-post-modal .eidoc-post-composer__assist-item:disabled .eidoc-post-composer__assist-copy {
    opacity: 0.6;
}

#create-post-modal .eidoc-post-composer__assist-item > .fa-chevron-right {
    color: #667085;
    font-size: 11px;
}

#create-post-modal .eidoc-post-composer__assist-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 14px;
}

#create-post-modal .eidoc-post-composer__assist-icon.is-blue { background: #eaf1ff; color: #2358e6; }
#create-post-modal .eidoc-post-composer__assist-icon.is-purple { background: #f3edff; color: #8b5cf6; }
#create-post-modal .eidoc-post-composer__assist-icon.is-orange { background: #fff4e5; color: #f59e0b; }
#create-post-modal .eidoc-post-composer__assist-icon.is-green { background: #e8f8ef; color: #16a34a; }

#create-post-modal .eidoc-post-composer__assist-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

#create-post-modal .eidoc-post-composer__assist-copy strong {
    font-size: 13px;
    color: var(--post-composer-text);
}

#create-post-modal .eidoc-post-composer__assist-copy small {
    font-size: 12px;
    color: var(--post-composer-muted);
}

#create-post-modal .eidoc-post-composer__assist-upsell {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    color: #667085;
    font-size: 12px;
}

#create-post-modal .eidoc-post-composer__assist-upsell:hover {
    color: var(--post-composer-blue);
}

#create-post-modal .eidoc-post-composer__tips {
    margin: 0;
    padding: 8px 16px 12px;
    list-style: none;
}

#create-post-modal .eidoc-post-composer__tips li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    color: #344054;
    font-size: 13px;
}

#create-post-modal .eidoc-post-composer__tips li > i {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #c7ced9;
    border-radius: 999px;
}

#create-post-modal .eidoc-post-composer__tips li.is-done > i {
    border-color: #16a34a;
    background: #16a34a;
}

#create-post-modal .eidoc-post-composer__tips li.is-done > i::before {
    content: "";
    width: 5px;
    height: 9px;
    margin-top: -2px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Футер шага 1 */
#create-post-modal .eidoc-post-composer__save-close {
    color: #475467 !important;
    font-weight: 600;
}

#create-post-modal .eidoc-post-composer__status > i {
    width: 32px;
    height: 32px;
    font-size: 14px !important;
}

#create-post-modal .eidoc-post-composer__status-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

#create-post-modal .eidoc-post-composer__status-time {
    color: var(--post-composer-muted);
    font-size: 12px;
}

/* ===== Тултипы ===== */
#create-post-modal .eidoc-post-composer__tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    outline: none;
    vertical-align: middle;
}

#create-post-modal .eidoc-post-composer__tip .eidoc-post-composer__label-help {
    margin-left: 0;
}

#create-post-modal .eidoc-post-composer__tip::after {
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 8px);
    left: -10px;
    z-index: 90;
    width: max-content;
    max-width: 260px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #111827;
    box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.5);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    text-transform: none;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    pointer-events: none;
}

#create-post-modal .eidoc-post-composer__tip:hover::after,
#create-post-modal .eidoc-post-composer__tip:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#create-post-modal .eidoc-post-composer__tip:hover .eidoc-post-composer__label-help,
#create-post-modal .eidoc-post-composer__tip:focus-visible .eidoc-post-composer__label-help {
    color: var(--post-composer-blue);
}

/* Тултип «Где публикуется» — в том же стиле, открывается вправо */
#create-post-modal .eidoc-post-composer__publish-help .eidoc-post-composer__cover-tooltip {
    top: calc(100% + 6px);
    right: auto;
    left: -10px;
    width: 260px;
    border: 0;
    background: #111827;
    color: #fff;
    font-size: 12px;
}

#create-post-modal .eidoc-post-composer__publish-help:hover .eidoc-post-composer__cover-tooltip {
    display: block !important;
}

#create-post-modal .is-step-publish .eidoc-post-composer__publish-card,
#create-post-modal .is-step-publish .eidoc-post-composer__destination-cover {
    overflow: visible;
}

/* Без горизонтального сдвига при фокусе: clip запрещает и программную прокрутку по X */
#create-post-modal .custom-scrollbar {
    overflow-x: clip !important;
    overflow-anchor: none;
}

#create-post-modal .eidoc-post-composer__field > label.label {
    justify-content: flex-start;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__editor {
    min-height: 200px;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) #post-body-blok-holder-modal {
    min-height: 198px !important;
}

/* Без синей обводки карточек при клике */
#create-post-modal .eidoc-post-composer__publish-card:focus-within,
#create-post-modal .eidoc-post-composer__publish-extra:focus-within,
#create-post-modal .eidoc-post-composer__publish-extra-head:focus,
#create-post-modal .eidoc-post-composer__assist-head:focus {
    border-color: var(--post-composer-border) !important;
    outline: none !important;
    box-shadow: none !important;
}

#create-post-modal .eidoc-post-composer__publish-extra-head:focus-visible,
#create-post-modal .eidoc-post-composer__assist-head:focus-visible {
    outline: 2px solid var(--post-composer-blue-mid) !important;
    outline-offset: -2px;
}

/* Дополнительные настройки — строки в одну колонку, без вылезания за край */
#create-post-modal .eidoc-post-composer__publish-extra .eidoc-post-composer__publish-settings-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 24px;
}

#create-post-modal .eidoc-post-composer__publish-extra .eidoc-post-composer__monetization-panel {
    grid-column: 1 / -1;
}

/* Шаг 1: сетка заполняет окно; длинный текст прокручивает тело окна.
   Редактор НЕ должен быть scroll-контейнером: меню блоков Blok внутри него меняло
   высоту прокрутки, Blok пересчитывал позицию — бесконечный цикл и зависание. */
#create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar {
    overflow-y: auto;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar > div[x-show] {
    height: auto;
    min-height: 100%;
    flex: 0 0 auto;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar > div[x-show] > form {
    min-height: 0;
    overflow: visible;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__editor {
    min-height: 140px;
    flex: 1 0 auto !important;
    overflow: visible !important;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) #post-body-blok-holder-modal {
    min-height: 0 !important;
}

#create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__assist {
    align-self: start;
    overflow: visible;
}

#create-post-modal .eidoc-post-composer__assist {
    padding-bottom: 2px;
}

#create-post-modal .eidoc-post-composer__assist-head {
    padding: 12px 14px;
}

#create-post-modal .eidoc-post-composer__assist-item {
    padding: 8px 6px;
}

#create-post-modal .eidoc-post-composer__assist-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
}

#create-post-modal .eidoc-post-composer__tips {
    padding: 6px 14px 10px;
}

#create-post-modal .eidoc-post-composer__tips li {
    padding: 5px 0;
}

#create-post-modal .eidoc-post-composer__assist-upsell {
    margin: 0 14px 10px;
    padding: 6px 10px;
}

#create-post-modal .eidoc-post-composer__live-preview-head h3 {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* Тултипы поверх соседних карточек без :has(:hover) — он вызывал пересчёт стилей
   всего редактора при каждом движении мыши. Карточки шага 2 идут в обратном z-порядке. */
#create-post-modal .is-step-publish .eidoc-post-composer__publish-location { position: relative; z-index: 6; }
#create-post-modal .is-step-publish .eidoc-post-composer__publish-theme { position: relative; z-index: 5; }
#create-post-modal .is-step-publish .eidoc-post-composer__publish-tags { position: relative; z-index: 4; }
#create-post-modal .is-step-publish .eidoc-post-composer__cover { position: relative; z-index: 3; }
#create-post-modal .is-step-publish .eidoc-post-composer__publish-basic { position: relative; z-index: 2; }
#create-post-modal .is-step-publish .eidoc-post-composer__live-preview-head { position: relative; z-index: 2; }

/* Подсказка пустого редактора не перекрывает меню блоков Blok */
#create-post-modal .eidoc-post-composer__editor:focus-within .eidoc-post-composer__empty {
    display: none !important;
}

#create-post-modal .eidoc-post-composer__empty {
    z-index: 1;
}

@media (max-width: 900px) {
    #create-post-modal .is-step-publish .eidoc-post-composer__publish-grid {
        grid-template-columns: 1fr;
    }

    #create-post-modal .eidoc-post-composer__header-steps {
        display: none;
    }
}

@media (max-width: 640px) {
    #create-post-modal {
        padding: 8px;
    }

    #create-post-modal .eidoc-post-composer {
        width: 100%;
        height: calc(100dvh - 16px);
        max-height: none;
        border-radius: 12px;
    }

    #create-post-modal .eidoc-post-composer__close {
        top: 8px !important;
        right: 8px !important;
    }

    #create-post-modal .eidoc-post-composer__segment span {
        display: none;
    }

    #create-post-modal .eidoc-post-composer__progress-line,
    #create-post-modal .eidoc-post-composer__progress-next {
        display: none;
    }

    #create-post-modal .eidoc-post-composer__quick {
        flex-wrap: wrap;
    }

    #create-post-modal .eidoc-post-composer__cancel {
        display: none;
    }
}

/* ===== Создание поста: планшет и телефон ===== */
#create-post-modal .eidoc-post-composer__assist-sheet-head,
#create-post-modal .eidoc-post-composer__assist-backdrop,
#create-post-modal .eidoc-post-composer__m-only,
#create-post-modal .eidoc-post-composer__tips-count {
    display: none !important;
}

/* Планшет: правая колонка уходит под редактор */
@media (max-width: 1023px) {
    #create-post-modal .eidoc-post-composer:not(.is-step-publish) {
        width: min(760px, calc(100vw - 32px));
    }

    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar {
        overflow-y: auto;
    }

    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar > div[x-show] {
        display: flex;
        height: auto;
        min-height: 100%;
        flex-direction: column;
    }

    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar > div[x-show] > form {
        overflow: visible;
    }

    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__editor {
        min-height: 280px;
        flex: 1 0 auto !important;
    }

    #create-post-modal .eidoc-post-composer__assist {
        margin-top: 14px;
        overflow: visible;
    }

    #create-post-modal .eidoc-post-composer__header-steps {
        margin-right: 24px;
    }
}

/* Телефон: почти полноэкранное окно, шторки для ИИ и советов */
@media (max-width: 640px) {
    #create-post-modal {
        align-items: stretch;
        padding: 8px;
    }

    #create-post-modal .eidoc-post-composer,
    #create-post-modal .eidoc-post-composer:not(.is-step-publish),
    #create-post-modal .eidoc-post-composer.is-step-publish {
        width: 100%;
        height: calc(100dvh - 16px);
        min-height: 0;
        max-height: none;
        border-radius: 20px;
    }

    /* Шапка: иконка, заголовок, крестик внутри; степпер строкой ниже */
    #create-post-modal .eidoc-post-composer__header {
        padding: 14px 16px 12px;
        border-radius: 20px 20px 0 0;
    }

    #create-post-modal .eidoc-post-composer__header > div {
        flex-wrap: wrap;
        row-gap: 14px;
        padding-right: 44px;
    }

    #create-post-modal .eidoc-post-composer__brand-icon {
        width: 38px;
        height: 38px;
    }

    #create-post-modal-title {
        font-size: 20px;
    }

    #create-post-modal .eidoc-post-composer__close {
        top: 14px !important;
        right: 14px !important;
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
        border: 0;
        background: #f2f4f7;
        box-shadow: none;
        font-size: 15px;
    }

    #create-post-modal .eidoc-post-composer__close {
        z-index: 60 !important;
    }

    #create-post-modal .eidoc-post-composer__footer {
        flex-direction: row !important;
        align-items: center !important;
    }

    #create-post-modal .eidoc-post-composer__footer > div:first-child {
        min-width: 0;
    }

    #create-post-modal .eidoc-post-composer__close::after {
        content: "";
        position: absolute;
        inset: -4px;
    }

    #create-post-modal .eidoc-post-composer__header-steps {
        display: flex !important;
        width: calc(100% + 44px);
        flex: 0 0 auto;
        justify-content: space-between;
        gap: 8px;
        margin: 0;
        padding: 0;
    }

    #create-post-modal .eidoc-post-composer__header-steps > li:not(.eidoc-post-composer__header-step-line) {
        min-width: 0;
        gap: 8px;
    }

    #create-post-modal .eidoc-post-composer__header-step-line {
        width: auto;
        min-width: 20px;
        flex: 1 1 auto;
    }

    #create-post-modal .eidoc-post-composer__header-step-dot {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    #create-post-modal .eidoc-post-composer__header-step-copy {
        min-width: 0;
    }

    #create-post-modal .eidoc-post-composer__header-step-copy strong,
    #create-post-modal .eidoc-post-composer__header-step-copy small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #create-post-modal .eidoc-post-composer__header-step-copy small {
        font-size: 11px;
    }

    /* Тело — единственная прокручиваемая область */
    #create-post-modal .custom-scrollbar,
    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar {
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 14px 16px 0;
    }

    /* Типы публикации — горизонтальная прокрутка */
    #create-post-modal .eidoc-post-composer__templates,
    #create-post-modal .eidoc-post-composer__field > .relative > .eidoc-post-composer__suggest,
    #create-post-modal .eidoc-post-composer__suggest-icon,
    #create-post-modal .eidoc-post-composer__empty-actions,
    #create-post-modal .eidoc-post-composer__save-close,
    #create-post-modal .eidoc-post-composer__d-only {
        display: none !important;
    }

    #create-post-modal .eidoc-post-composer__m-only {
        display: inline !important;
    }

    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__segments {
        margin: 0 -16px;
        padding: 0 16px 2px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__segments::-webkit-scrollbar {
        display: none;
    }

    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__segment {
        min-width: 0;
        height: 42px;
        padding: 0 14px;
    }

    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__segment span {
        display: inline !important;
    }

    /* Редактор — центральная часть экрана */
    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__editor {
        min-height: max(240px, 38dvh);
    }

    #create-post-modal .eidoc-post-composer__empty {
        inset: 56px 12px 12px;
    }

    #create-post-modal .eidoc-post-composer__quick {
        flex-wrap: nowrap;
        gap: 8px;
    }

    #create-post-modal .eidoc-post-composer__quick > *,
    #create-post-modal .eidoc-post-composer__quick-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    #create-post-modal .eidoc-post-composer__quick .dropdown > .eidoc-post-composer__quick-btn {
        width: 100%;
    }

    #create-post-modal .eidoc-post-composer__quick-btn {
        height: 42px;
        justify-content: center;
        padding: 0 8px;
        font-size: 14px;
    }

    #create-post-modal .eidoc-post-composer__quick-btn:last-child {
        flex: 0 0 52px;
    }

    #create-post-modal .eidoc-post-composer__quick-btn:last-child span,
    #create-post-modal .eidoc-post-composer__quick-caret {
        display: none;
    }

    /* ИИ-помощник и советы — строки, открывают шторку снизу */
    #create-post-modal .eidoc-post-composer__assist {
        gap: 10px;
        margin: 16px 0 4px;
    }

    #create-post-modal .eidoc-post-composer__assist-head {
        padding: 16px;
        border-bottom: 0;
        font-size: 16px;
    }

    #create-post-modal .eidoc-post-composer__assist-head-icon.is-tip {
        display: inline-flex;
        width: 30px;
        height: 30px;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        background: #fff7e6;
    }

    #create-post-modal .eidoc-post-composer__assist-caret {
        transform: rotate(90deg) !important;
    }

    #create-post-modal .eidoc-post-composer__tips-count {
        display: inline !important;
        color: var(--post-composer-muted);
        font-size: 13px;
        font-weight: 600;
    }

    #create-post-modal .eidoc-post-composer__assist-backdrop {
        position: fixed;
        inset: 0;
        z-index: 120;
        display: block !important;
        background: rgba(15, 23, 42, 0.45);
    }

    #create-post-modal .eidoc-post-composer__assist-backdrop[style*="display: none"] {
        display: none !important;
    }

    #create-post-modal .eidoc-post-composer__assist-body {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 121;
        max-height: 75dvh;
        overflow-y: auto !important;
        padding-bottom: env(safe-area-inset-bottom);
        border-radius: 20px 20px 0 0;
        background: #fff;
        box-shadow: 0 -16px 40px -18px rgba(15, 23, 42, 0.45);
        height: auto !important;
    }

    #create-post-modal .eidoc-post-composer__assist-sheet-head {
        position: relative;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 22px 16px 8px;
        font-size: 17px;
        font-weight: 700;
    }

    #create-post-modal .eidoc-post-composer__assist-sheet-head::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        border-radius: 4px;
        background: #d0d5dd;
    }

    #create-post-modal .eidoc-post-composer__assist-sheet-head button {
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 999px;
        background: #f2f4f7;
        color: #475467;
    }

    #create-post-modal .eidoc-post-composer__assist-item {
        padding: 12px 6px;
    }

    #create-post-modal .eidoc-post-composer__tips li {
        padding: 9px 0;
        font-size: 14px;
    }

    /* Футер: статус + главная кнопка, отступ под системную полосу */
    #create-post-modal .eidoc-post-composer__footer,
    #create-post-modal .is-step-publish .eidoc-post-composer__footer {
        flex-wrap: nowrap;
        gap: 10px;
        margin-left: -16px !important;
        margin-right: -16px !important;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        border-radius: 0 0 20px 20px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
    }

    #create-post-modal .eidoc-post-composer__status-time {
        display: none;
    }

    #create-post-modal .eidoc-post-composer__actions {
        gap: 8px;
    }

    #create-post-modal .eidoc-post-composer__actions .btn,
    #create-post-modal .is-step-publish .eidoc-post-composer__actions .btn {
        width: auto;
        height: 48px;
        min-height: 48px;
        padding: 0 22px;
        border-radius: 12px;
        font-size: 16px;
    }

    /* Шаг 2: одна колонка, «Назад» и «Запланировать» — иконками */
    #create-post-modal .is-step-publish .eidoc-post-composer__status-text {
        display: none;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__footer > div:first-child {
        flex: 0 0 auto;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__actions {
        flex: 1 1 auto;
        flex-wrap: nowrap !important;
        justify-content: flex-end;
        min-width: 0;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__actions .btn[x-show="formStep === 2"]:not([type="submit"]),
    #create-post-modal .is-step-publish .eidoc-post-composer__actions .eidoc-post-composer__schedule-btn {
        flex: 0 0 48px;
        width: 48px !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__actions button[type="submit"] {
        width: auto !important;
        min-width: 0;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__actions button[type="submit"] {
        padding: 0 10px !important;
        white-space: nowrap;
        font-size: 14px !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__actions button[type="submit"] .fa-paper-plane {
        display: none;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__footer > div:first-child {
        display: none;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__actions .btn[x-show="formStep === 2"]:not([type="submit"]),
    #create-post-modal .is-step-publish .eidoc-post-composer__schedule-btn {
        width: 48px;
        padding: 0 !important;
        font-size: 0 !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__actions .btn[x-show="formStep === 2"]:not([type="submit"]) i,
    #create-post-modal .is-step-publish .eidoc-post-composer__schedule-btn i {
        font-size: 16px;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__schedule-btn span {
        display: none;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__actions button[type="submit"] {
        flex: 1 1 auto;
        padding: 0 14px !important;
        font-size: 15px !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__schedule-inline {
        position: absolute;
        right: 16px;
        bottom: calc(100% + 8px);
        left: 16px;
        height: 44px;
        background: #fff;
        box-shadow: 0 10px 24px -14px rgba(15, 23, 42, 0.4);
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__schedule-inline input {
        flex: 1;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__publish-grid {
        grid-template-columns: 1fr;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__destination-cover {
        grid-template-columns: 1fr;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__publish-theme,
    #create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__publish-tags {
        grid-column: 1;
        border: 1px solid var(--post-composer-border);
        border-radius: 12px;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__publish-theme {
        grid-row: 2;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__publish-tags {
        grid-row: 3;
        padding-top: 12px !important;
        padding-left: 14px !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__destination-cover > .eidoc-post-composer__cover {
        grid-row: 4;
    }

    #create-post-modal .eidoc-post-composer__cover-row,
    #create-post-modal .eidoc-post-composer__basic-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #create-post-modal .eidoc-post-composer__basic-cell {
        padding: 0;
    }

    #create-post-modal .eidoc-post-composer__basic-cell + .eidoc-post-composer__basic-cell {
        padding-top: 12px;
        border-top: 1px solid var(--post-composer-border);
        border-left: 0;
    }

    #create-post-modal .eidoc-post-composer__publish-extra .eidoc-post-composer__publish-settings-body {
        grid-template-columns: 1fr;
    }

    #create-post-modal .eidoc-post-composer__live-preview-head {
        flex-direction: column;
    }

    #create-post-modal .eidoc-post-composer__tip::after {
        max-width: min(260px, calc(100vw - 64px));
    }
}

/* ===== Шаг 2 на телефоне: «Настройки / Предпросмотр», карточки строками ===== */
#create-post-modal .eidoc-post-composer__m-panes,
#create-post-modal .eidoc-post-composer__publish-when,
#create-post-modal .eidoc-post-composer__tag-add,
#create-post-modal .eidoc-post-composer__m-tip,
#create-post-modal .eidoc-post-composer__basic-sub,
#create-post-modal .eidoc-post-composer__step-count {
    display: none !important;
}

@media (max-width: 640px) {
    /* Степпер шага 2: «✓ Контент —— ② Публикация / Шаг 2 из 2» */
    #create-post-modal .is-step-publish .is-done .eidoc-post-composer__header-step-copy small,
    #create-post-modal .is-step-publish .is-done .eidoc-post-composer__header-step-copy button,
    #create-post-modal .is-step-publish .is-current .eidoc-post-composer__header-step-copy small:not(.eidoc-post-composer__step-count) {
        display: none !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__step-count {
        display: block !important;
    }

    #create-post-modal .is-step-publish .is-done .eidoc-post-composer__header-step-copy strong {
        font-weight: 500;
    }

    /* Переключатель панелей */
    #create-post-modal .eidoc-post-composer__m-panes {
        display: grid !important;
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    #create-post-modal .eidoc-post-composer__m-panes button {
        display: inline-flex;
        height: 42px;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid var(--post-composer-border);
        border-radius: 10px;
        background: #fff;
        color: #344054;
        font-size: 14px;
        font-weight: 500;
    }

    #create-post-modal .eidoc-post-composer__m-panes button.is-active {
        border-color: #6f97f2;
        background: #f5f8ff;
        color: var(--post-composer-blue);
        font-weight: 600;
    }

    #create-post-modal .is-pane-settings > .eidoc-post-composer__live-preview,
    #create-post-modal .is-pane-preview > .eidoc-post-composer__publish-main {
        display: none !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__publish-grid {
        gap: 12px;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__publish-card {
        padding: 14px 16px;
        border-radius: 14px;
    }

    /* Тема и теги — отдельные карточки со своими заголовками */
    #create-post-modal .eidoc-post-composer__group-title {
        display: none !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__publish-theme,
    #create-post-modal .is-step-publish .eidoc-post-composer__publish-tags {
        padding: 14px 16px !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__publish-theme > .label .label-text,
    #create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > .label .label-text {
        font-size: 15px;
        font-weight: 700;
        color: var(--post-composer-text);
    }

    #create-post-modal .eidoc-post-composer__m-tip {
        display: inline-flex !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__publish-theme > .label,
    #create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > .label {
        justify-content: flex-start;
    }

    #create-post-modal .is-pane-preview .eidoc-post-composer__live-preview-head {
        gap: 0;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > div {
        position: relative;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__publish-tags > div > input {
        order: -1;
        width: 100%;
        height: 42px;
        flex: 1 0 100%;
        margin-bottom: 4px;
        padding: 0 52px 0 12px;
        border-style: solid;
        border-radius: 10px;
        font-size: 14px;
    }

    #create-post-modal .eidoc-post-composer__tag-add {
        position: absolute;
        top: 0;
        right: 0;
        display: inline-flex !important;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        border: 0;
        border-left: 1px solid var(--post-composer-border);
        border-radius: 0 10px 10px 0;
        background: none;
        color: #344054;
    }

    #create-post-modal .eidoc-post-composer__tag-add:disabled {
        color: #c0c7d2;
    }

    /* Обложка: вертикально, кнопка под превью */
    #create-post-modal .eidoc-post-composer__cover--v2 .eidoc-post-composer__cover-frame {
        height: 110px;
    }

    #create-post-modal .eidoc-post-composer__cover-action {
        align-items: center;
        justify-content: center;
        padding: 12px;
        background: #fff;
        border-color: var(--post-composer-border);
    }

    #create-post-modal .eidoc-post-composer__cover-action > i {
        margin: 0;
        color: #344054;
    }

    #create-post-modal .eidoc-post-composer__cover-action strong {
        color: var(--post-composer-text);
        font-size: 14px;
    }

    #create-post-modal .eidoc-post-composer__cover-action small {
        display: none;
    }

    #create-post-modal .eidoc-post-composer__cover-row {
        gap: 0;
    }

    #create-post-modal .eidoc-post-composer__cover--v2 .eidoc-post-composer__cover-frame {
        border-radius: 10px 10px 0 0;
    }

    #create-post-modal .eidoc-post-composer__cover-action {
        border-radius: 0 0 10px 10px;
    }

    /* Основные настройки — строки: иконка · текст · переключатель */
    #create-post-modal .eidoc-post-composer__basic-grid {
        gap: 0;
    }

    #create-post-modal .eidoc-post-composer__basic-cell,
    #create-post-modal .eidoc-post-composer__basic-cell + .eidoc-post-composer__basic-cell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 12px;
        row-gap: 2px;
        padding: 12px 0;
        border-top: 0;
    }

    #create-post-modal .eidoc-post-composer__basic-title {
        grid-column: 1;
        grid-row: 1;
        gap: 12px;
        font-size: 14px;
        white-space: normal;
    }

    #create-post-modal .eidoc-post-composer__basic-title i {
        width: 18px;
        font-size: 16px;
    }

    #create-post-modal .eidoc-post-composer__basic-title .eidoc-post-composer__tip {
        display: none;
    }

    #create-post-modal .eidoc-post-composer__basic-sub {
        display: block !important;
        grid-column: 1;
        grid-row: 2;
        padding-left: 30px;
        color: var(--post-composer-muted);
        font-size: 12px;
    }

    #create-post-modal .eidoc-post-composer__basic-select-wrap {
        grid-column: 2;
        grid-row: 1 / 3;
        width: 120px;
    }

    #create-post-modal .eidoc-post-composer__basic-select-wrap > i {
        display: none;
    }

    #create-post-modal .eidoc-post-composer__basic-select {
        height: 42px;
        padding-left: 12px;
        font-size: 14px;
    }

    #create-post-modal .eidoc-post-composer__basic-toggle {
        display: contents;
    }

    #create-post-modal .eidoc-post-composer__basic-toggle input {
        grid-column: 2;
        grid-row: 1 / 3;
    }

    #create-post-modal .eidoc-post-composer__basic-toggle small {
        grid-column: 1;
        grid-row: 2;
        padding-left: 30px;
        font-size: 12px;
    }

    /* Когда опубликовать */
    #create-post-modal .eidoc-post-composer__publish-when {
        display: block !important;
        margin-bottom: 4px !important;
    }

    #create-post-modal .eidoc-post-composer__publish-when[style*="display: none"] {
        display: none !important;
    }

    #create-post-modal .eidoc-post-composer__when-opt {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 12px;
        border-radius: 10px;
        cursor: pointer;
    }

    #create-post-modal .eidoc-post-composer__when-opt.is-active {
        background: #f5f8ff;
    }

    #create-post-modal .eidoc-post-composer__when-opt input {
        width: 20px;
        height: 20px;
        accent-color: var(--post-composer-blue);
    }

    #create-post-modal .eidoc-post-composer__when-opt > i {
        width: 18px;
        color: #475467;
        font-size: 16px;
    }

    #create-post-modal .eidoc-post-composer__when-opt.is-active > i,
    #create-post-modal .eidoc-post-composer__when-opt.is-active strong {
        color: var(--post-composer-blue);
    }

    #create-post-modal .eidoc-post-composer__when-opt span {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    #create-post-modal .eidoc-post-composer__when-opt strong {
        font-size: 14px;
        color: var(--post-composer-text);
    }

    #create-post-modal .eidoc-post-composer__when-opt small {
        font-size: 12px;
        color: var(--post-composer-muted);
    }

    #create-post-modal .eidoc-post-composer__when-date {
        width: 100%;
        height: 44px;
        margin-top: 8px;
        padding: 0 12px;
        border: 1px solid var(--post-composer-border);
        border-radius: 10px;
        font-size: 14px;
    }

    /* Предпросмотр на телефоне */
    #create-post-modal .is-pane-preview > .eidoc-post-composer__live-preview {
        padding: 0;
        border: 0;
    }

    #create-post-modal .is-pane-preview .eidoc-post-composer__live-preview-head > div:first-child {
        display: none;
    }

    #create-post-modal .eidoc-post-composer__live-preview-modes {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
    }

    #create-post-modal .eidoc-post-composer__live-preview-modes button {
        height: 40px;
        justify-content: center;
        font-size: 13px;
    }

    /* Футер шага 2: статус сверху, «Назад» + «Опубликовать» */
    #create-post-modal .is-step-publish .eidoc-post-composer__footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__footer > div:first-child {
        display: flex !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__status-text {
        display: inline-flex !important;
        flex-direction: column;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__status-time {
        display: block !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__schedule-btn,
    #create-post-modal .is-step-publish .eidoc-post-composer__schedule-inline {
        display: none !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__actions .btn[x-show="formStep === 2"]:not([type="submit"]) {
        flex: 0 0 auto;
        width: auto !important;
        padding: 0 18px !important;
        font-size: 15px !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__actions button[type="submit"] {
        flex: 1 1 auto;
        font-size: 15px !important;
    }

    #create-post-modal .is-step-publish .eidoc-post-composer__actions button[type="submit"] .fa-paper-plane {
        display: inline-block;
    }
}

/* Планшет/телефон: содержимое не сжимается, футер и значок статуса — фиксированного размера */
@media (max-width: 1023px) {
    #create-post-modal .custom-scrollbar > div[x-show],
    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .custom-scrollbar > div[x-show] {
        flex: 0 0 auto !important;
    }

    #create-post-modal .eidoc-post-composer__footer {
        flex-shrink: 0;
    }

    #create-post-modal .eidoc-post-composer__status > i,
    #create-post-modal .eidoc-post-composer__status > .loading {
        flex: 0 0 auto;
    }
}

@media (max-width: 640px) {
    /* Мобильная панель Blok («+ ⠿») встаёт над строкой — даём ей место внутри рамки */
    #create-post-modal .eidoc-post-composer:not(.is-step-publish) #post-body-blok-holder-modal {
        padding: 46px 10px 4px !important;
    }

    #create-post-modal .eidoc-post-composer:not(.is-step-publish) .eidoc-post-composer__editor {
        overflow: visible;
    }

    #create-post-modal .eidoc-post-composer__empty {
        inset: 84px 12px 12px;
    }
}

/* Телефон: шапка окна по референсу (оба шага) */
@media (max-width: 640px) {
    #create-post-modal .eidoc-post-composer__header {
        padding: 18px 18px 14px;
    }

    #create-post-modal .eidoc-post-composer__header > div {
        row-gap: 18px;
        padding-right: 48px;
    }

    #create-post-modal .eidoc-post-composer__brand-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    #create-post-modal .eidoc-post-composer__brand-icon i {
        font-size: 17px;
    }

    #create-post-modal-title {
        font-size: 22px;
        font-weight: 700;
    }

    #create-post-modal .eidoc-post-composer__close {
        top: 18px !important;
        right: 18px !important;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        border: 1px solid #e4e7ec !important;
        background: #fff !important;
        box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.12) !important;
        color: #344054 !important;
        font-size: 17px;
    }

    /* Степпер: подписи скрыты, у активного шага — «Шаг N из 2» */
    #create-post-modal .eidoc-post-composer__header-step-copy small,
    #create-post-modal .eidoc-post-composer__header-step-copy button {
        display: none !important;
    }

    #create-post-modal .is-current .eidoc-post-composer__step-count {
        display: block !important;
        margin-top: 2px;
        color: var(--post-composer-muted);
        font-size: 13px;
    }

    #create-post-modal .is-current .eidoc-post-composer__step-count[style*="display: none"] {
        display: none !important;
    }

    #create-post-modal .eidoc-post-composer__header-steps {
        align-items: center;
        gap: 14px;
    }

    #create-post-modal .eidoc-post-composer__header-steps > li:not(.eidoc-post-composer__header-step-line) {
        gap: 12px;
    }

    #create-post-modal .eidoc-post-composer__header-step-dot {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        font-size: 16px;
    }

    #create-post-modal .is-done .eidoc-post-composer__header-step-dot,
    #create-post-modal .is-upcoming .eidoc-post-composer__header-step-dot {
        border: 1px solid #e4e7ec;
        background: #fff;
        box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.12);
    }

    #create-post-modal .is-current .eidoc-post-composer__header-step-dot {
        box-shadow: 0 6px 16px -6px rgba(35, 88, 230, 0.7);
    }

    #create-post-modal .eidoc-post-composer__header-step-copy strong {
        font-size: 16px;
        font-weight: 500;
    }

    #create-post-modal .is-current .eidoc-post-composer__header-step-copy strong {
        font-weight: 700;
    }

    #create-post-modal .eidoc-post-composer__header-step-line {
        height: 2px;
        min-width: 28px;
    }

    /* «Настройки / Предпросмотр» — слитный переключатель */
    #create-post-modal .eidoc-post-composer__m-panes {
        gap: 0 !important;
        padding: 0;
        border: 1px solid #edf0f5;
        border-radius: 14px;
        background: #fff;
    }

    #create-post-modal .eidoc-post-composer__m-panes button {
        height: 48px;
        border: 1px solid transparent;
        border-radius: 13px;
        font-size: 15px;
    }

    #create-post-modal .eidoc-post-composer__m-panes button.is-active {
        border-color: #8fb0f7;
        background: #f3f7ff;
        box-shadow: 0 2px 8px -4px rgba(35, 88, 230, 0.35);
    }
}

/* Основные настройки: третья колонка шире, чтобы ⓘ у «Уведомить подписчиков» не выпадал */
@media (min-width: 641px) {
    #create-post-modal .eidoc-post-composer__basic-grid {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1.25fr);
    }

    #create-post-modal .eidoc-post-composer__basic-title {
        min-width: 0;
    }

    #create-post-modal .eidoc-post-composer__basic-title .eidoc-post-composer__tip {
        flex: 0 0 auto;
        margin-left: 2px;
    }
}

/* Модалка «Создать пост»: страница позади не прокручивается.
   Класс ставит x-effect в _create_post_modal.php; страница прокручивается через #page-component.
   #page-component повторён дважды: правило в ui-shell.css задаёт overflow с !important и высокой специфичностью. */
body.eidoc-create-post-modal-open,
html body.eidoc-create-post-modal-open #page-component#page-component {
    overflow: hidden !important;
    overflow: clip !important;
    overscroll-behavior: none;
}

/* Подложка окна — сама контейнер прокрутки с contain: колесо над непрокручиваемыми
   частями окна (вкладки меню, шапка, футер) не уходит к странице позади. */
#create-post-modal {
    overflow: hidden;
    overscroll-behavior: contain;
}

/* Прокрутка внутри окна (тело, правая колонка, список меню Blok) не передаётся наружу */
#create-post-modal .custom-scrollbar,
#create-post-modal .eidoc-post-composer__assist,
#create-post-modal .eidoc-post-composer__assist-body,
#create-post-modal [data-blok-popover-items],
#create-post-modal .eidoc-post-composer__theme-menu,
#create-post-modal .eidoc-post-composer__quick-menu,
#create-post-modal .eidoc-post-composer__templates-menu,
.create-post-community-dropdown {
    overscroll-behavior: contain;
}

/* Уведомления (toast) поверх всех модальных окон */
#global-toast-container,
.toast:has(#global-message-box) {
    z-index: 100000 !important;
}
#global-message-box {
    z-index: 100000 !important;
}

/* Область с прокруткой без отображения полосы (модальные окна с редактором) */
/* Элегантный тонкий скроллбар — видимый, но ненавязчивый */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: hsl(var(--bc) / 0.15) transparent;
}
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: hsl(var(--bc) / 0.12);
    border-radius: 3px;
    transition: background 0.2s;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--bc) / 0.25);
}

/* Payment modal card entrance animation */
#payment-modal.modal-open .modal-box {
    animation: modal-card-enter 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modal-card-enter {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(16px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.scroll-no-scrollbar {
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scroll-no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Landing: единый шрифт по всей странице (различается только размер/вес) */
.landing-root {
    font-family: "Roboto", ui-sans-serif, system-ui, sans-serif;
}

.landing-root h1,
.landing-root h2,
.landing-root h3,
.landing-root h4,
.landing-root h5,
.landing-root h6,
.landing-root h7,
.landing-root .font-display {
    font-family: "Roboto", ui-sans-serif, system-ui, sans-serif;
}

.landing-root h1,
.landing-root h2,
.landing-root h3,
.landing-root h4,
.landing-root h5,
.landing-root h6,
.landing-root h7 {
    overflow-wrap: normal;
    word-wrap: normal;
    word-break: normal;
    hyphens: none;
}

/* Public pages: unify top-level content width to 1200px */
body.eidoc-public #page-component > .container,
body.eidoc-public #page-component > [class*=" max-w-"]:not([class*="max-w-none"]),
body.eidoc-public #page-component > [class^="max-w-"]:not([class^="max-w-none"]) {
    max-width: 1200px !important;
}

/**
 * Десктоп + левый сайдбар: верхний зазор — ui-enforce.css
 * (#page-component.eidoc-main-with-sidebar + --ui-page-gap-top).
 */
