    /* Premium Editor.js Aesthetics */
    #editorjs .codex-editor {
        font-family: 'Inter', system-ui, sans-serif;
    }
    #editorjs .ce-block__content {
        max-width: 800px;
        margin-left: 28px !important;
        margin-right: auto;
    }
    #editorjs .ce-toolbar__content {
        max-width: 800px;
        margin: 0 auto;
    }
    #editorjs .ce-toolbar {
        left: 0 !important;
        right: auto !important;
        z-index: 200 !important;
    }
    #editorjs .ce-toolbar__actions {
        padding-right: 0 !important;
        left: 0px !important;
        right: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 1px !important;
        transition: transform 0.1s ease !important;
        transform: none !important;
        margin-top: -3px !important;
        z-index: 200 !important;
        width: 24px !important;
    }
    #editorjs .ce-toolbar__plus,
    #editorjs .ce-toolbar__settings-btn {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        border-radius: 6px !important;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        position: static !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        color: #71717a !important;
        cursor: pointer !important;
    }
    #editorjs .ce-toolbar__settings-btn {
        order: 1 !important;
        margin: 0 !important;
    }
    #editorjs .ce-toolbar__plus {
        order: 2 !important;
        margin: 0 !important;
    }
    #editorjs .ce-toolbar__plus:hover,
    #editorjs .ce-toolbar__settings-btn:hover,
    #editorjs .ce-toolbar__plus:active,
    #editorjs .ce-toolbar__settings-btn:active {
        background-color: #f4f4f5 !important;
        color: #18181b !important;
    }
    #editorjs .ce-toolbar__plus svg,
    #editorjs .ce-toolbar__settings-btn svg {
        width: 18px !important;
        height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
    }
    #editorjs .ce-popover,
    .ce-popover {
        z-index: 300 !important;
    }
    #editorjs .ce-inline-toolbar,
    .ce-inline-toolbar {
        margin-top: 0 !important;
        transform: none !important;
        z-index: 300 !important;
    }

    /* Ensure EditorJS popovers are always positioned below target button and never fixed to top behind header */
    .ce-popover:not(.ce-popover--nested):not(.ce-popover--inline) > .ce-popover__container,
    .ce-popover:not(.ce-popover--nested):not(.ce-popover--inline) > .ce-popover-container,
    #editorjs .ce-popover:not(.ce-popover--nested):not(.ce-popover--inline) > .ce-popover__container,
    #editorjs .ce-popover:not(.ce-popover--nested):not(.ce-popover--inline) > .ce-popover-container {
        width: 200px !important;
        min-width: 200px !important;
        max-width: 200px !important;
        position: absolute !important;
        top: calc(100% + 4px) !important;
        bottom: auto !important;
        left: 0 !important;
        right: auto !important;
        transform: none !important;
        max-height: min(320px, calc(100vh - 140px)) !important;
    }

    /* Sub dropdown (Nested popover, e.g. "Convert to" tools) */
    .ce-popover--nested,
    #editorjs .ce-popover--nested {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: visible !important;
        z-index: 310 !important;
    }

    .ce-popover--nested > .ce-popover__container,
    #editorjs .ce-popover--nested > .ce-popover__container,
    .ce-popover--nested .ce-popover__container,
    #editorjs .ce-popover--nested .ce-popover__container {
        width: 200px !important;
        min-width: 200px !important;
        max-width: 200px !important;
        position: absolute !important;
        top: var(--trigger-item-top, 0px) !important;
        left: 196px !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
        z-index: 320 !important;
        max-height: min(320px, calc(100vh - 140px)) !important;
    }

    /* Open nested popover to the left if near right edge */
    .ce-popover--nested.ce-popover--open-left > .ce-popover__container,
    #editorjs .ce-popover--nested.ce-popover--open-left > .ce-popover__container,
    .ce-popover--open-left .ce-popover--nested .ce-popover__container,
    #editorjs .ce-popover--open-left .ce-popover--nested .ce-popover__container {
        left: -196px !important;
        right: auto !important;
    }

    /* Open nested popover to the top if near bottom edge */
    .ce-popover--nested.ce-popover--open-top > .ce-popover__container,
    #editorjs .ce-popover--nested.ce-popover--open-top > .ce-popover__container,
    .ce-popover--open-top .ce-popover--nested .ce-popover__container,
    #editorjs .ce-popover--open-top .ce-popover--nested .ce-popover__container {
        top: auto !important;
        bottom: max(0px, calc(100% - var(--trigger-item-top, 0px) - 34px)) !important;
    }

    .ce-popover:not(.ce-popover--inline) .ce-popover__items,
    #editorjs .ce-popover:not(.ce-popover--inline) .ce-popover__items {
        max-height: min(280px, calc(100vh - 180px)) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Inline Toolbar / Popover: Fully expand width to encompass all tools with clean background */
    .ce-inline-toolbar,
    #editorjs .ce-inline-toolbar,
    .ce-popover--inline,
    #editorjs .ce-popover--inline,
    .ce-popover.ce-popover--inline,
    #editorjs .ce-popover.ce-popover--inline {
        width: max-content !important;
        max-width: none !important;
        min-width: max-content !important;
        overflow: visible !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    .ce-popover--inline > .ce-popover__container,
    #editorjs .ce-popover--inline > .ce-popover__container,
    .ce-popover.ce-popover--inline > .ce-popover__container,
    #editorjs .ce-popover.ce-popover--inline > .ce-popover__container {
        width: max-content !important;
        min-width: max-content !important;
        max-width: none !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: none !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: auto !important;
        overflow: visible !important;
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
        padding: 3px 6px !important;
        background: #ffffff !important;
        border: 1px solid #e4e4e7 !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
        border-radius: 8px !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    .ce-popover--inline .ce-popover__items,
    #editorjs .ce-popover--inline .ce-popover__items,
    .ce-popover.ce-popover--inline .ce-popover__items,
    #editorjs .ce-popover.ce-popover--inline .ce-popover__items {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        width: max-content !important;
        min-width: max-content !important;
        max-width: none !important;
        height: 100% !important;
        max-height: none !important;
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        gap: 2px !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .ce-popover--inline .ce-popover__items::-webkit-scrollbar,
    #editorjs .ce-popover--inline .ce-popover__items::-webkit-scrollbar,
    .ce-popover--inline > .ce-popover__container::-webkit-scrollbar,
    #editorjs .ce-popover--inline > .ce-popover__container::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    .ce-popover--inline .ce-popover-item,
    #editorjs .ce-popover--inline .ce-popover-item,
    .ce-popover.ce-popover--inline .ce-popover-item,
    #editorjs .ce-popover.ce-popover--inline .ce-popover-item {
        flex-shrink: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        padding: 0 4px !important;
        margin: 0 !important;
        border-radius: 6px !important;
    }
    .ce-popover--inline .ce-popover-item svg,
    #editorjs .ce-popover--inline .ce-popover-item svg {
        width: 20px !important;
        height: 20px !important;
    }
    .ce-popover--inline .ce-popover-item .ce-popover-item__icon--chevron-right svg,
    #editorjs .ce-popover--inline .ce-popover-item .ce-popover-item__icon--chevron-right svg {
        width: 14px !important;
        height: 14px !important;
    }
    .ce-popover--inline .ce-popover-item-separator,
    #editorjs .ce-popover--inline .ce-popover-item-separator {
        padding: 0 3px !important;
        height: 20px !important;
        display: inline-flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }
    .ce-popover--inline .ce-popover-item-separator__line,
    #editorjs .ce-popover--inline .ce-popover-item-separator__line {
        width: 1px !important;
        height: 20px !important;
        background-color: #e4e4e7 !important;
    }

    /* Compact & responsive EditorJS Popovers (Block tunes, actions menu) */
    @media (max-width: 768px) {
        #editorjs {
            padding-left: 10px !important;
            padding-right: 10px !important;
        }
        #editorjs .ce-block__content {
            margin-left: 24px !important;
        }
        #editorjs .ce-block:has(.tc-wrap) .ce-block__content {
            width: calc(100% - 24px) !important;
            margin-left: 24px !important;
        }
        #editorjs .ce-toolbar__actions {
            gap: 1px !important;
            left: 0px !important;
            width: 22px !important;
            margin-top: -3px !important;
        }
        #editorjs .ce-toolbar__plus,
        #editorjs .ce-toolbar__settings-btn {
            width: 22px !important;
            height: 22px !important;
            min-width: 22px !important;
            min-height: 22px !important;
            padding: 0 !important;
            margin: 0 !important;
        }
        #editorjs .ce-toolbar__settings-btn {
            order: 1 !important;
            margin: 0 !important;
        }
        #editorjs .ce-toolbar__plus {
            order: 2 !important;
            margin: 0 !important;
        }
        #editorjs .ce-toolbar__plus svg,
        #editorjs .ce-toolbar__settings-btn svg {
            width: 16px !important;
            height: 16px !important;
        }

        .ce-popover:not(.ce-popover--inline),
        .tc-popover,
        #editorjs .ce-popover:not(.ce-popover--inline),
        #editorjs .tc-popover {
            --popover-width: 155px;
            width: 155px !important;
            max-width: 160px !important;
            min-width: 0 !important;
        }

        .ce-popover:not(.ce-popover--nested):not(.ce-popover--inline) > .ce-popover__container,
        .ce-popover:not(.ce-popover--nested):not(.ce-popover--inline) > .ce-popover-container,
        #editorjs .ce-popover:not(.ce-popover--nested):not(.ce-popover--inline) > .ce-popover__container,
        #editorjs .ce-popover:not(.ce-popover--nested):not(.ce-popover--inline) > .ce-popover-container {
            width: 155px !important;
            max-width: 160px !important;
            min-width: 0 !important;
            position: absolute !important;
            top: calc(100% + 4px) !important;
            bottom: auto !important;
            left: 0 !important;
            right: auto !important;
            transform: none !important;
            padding: 4px !important;
            border-radius: 8px !important;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
            max-height: min(300px, calc(100vh - 140px)) !important;
        }

        .ce-popover--nested,
        #editorjs .ce-popover--nested {
            position: absolute !important;
            top: 0 !important;
            left: 0 !important;
            width: 0 !important;
            height: 0 !important;
            overflow: visible !important;
            z-index: 310 !important;
        }

        .ce-popover--nested > .ce-popover__container,
        #editorjs .ce-popover--nested > .ce-popover__container,
        .ce-popover--nested .ce-popover__container,
        #editorjs .ce-popover--nested .ce-popover__container {
            width: 155px !important;
            max-width: 160px !important;
            min-width: 0 !important;
            position: absolute !important;
            top: var(--trigger-item-top, 0px) !important;
            left: 151px !important;
            right: auto !important;
            bottom: auto !important;
            transform: none !important;
            padding: 4px !important;
            border-radius: 8px !important;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
            max-height: min(300px, calc(100vh - 140px)) !important;
            z-index: 320 !important;
        }

        .ce-popover--nested.ce-popover--open-left > .ce-popover__container,
        #editorjs .ce-popover--nested.ce-popover--open-left > .ce-popover__container,
        .ce-popover--open-left .ce-popover--nested .ce-popover__container,
        #editorjs .ce-popover--open-left .ce-popover--nested .ce-popover__container {
            left: -151px !important;
            right: auto !important;
        }

        .ce-popover--nested.ce-popover--open-top > .ce-popover__container,
        #editorjs .ce-popover--nested.ce-popover--open-top > .ce-popover__container,
        .ce-popover--open-top .ce-popover--nested .ce-popover__container,
        #editorjs .ce-popover--open-top .ce-popover--nested .ce-popover__container {
            top: auto !important;
            bottom: max(0px, calc(100% - var(--trigger-item-top, 0px) - 30px)) !important;
        }

        .ce-popover:not(.ce-popover--inline) .ce-popover__items,
        #editorjs .ce-popover:not(.ce-popover--inline) .ce-popover__items {
            max-height: min(260px, calc(100vh - 180px)) !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch;
        }

        .ce-popover-item,
        .ce-popover__item,
        #editorjs .ce-popover-item,
        #editorjs .ce-popover__item {
            padding: 3px 6px !important;
            min-height: 28px !important;
            height: auto !important;
            border-radius: 5px !important;
            gap: 6px !important;
        }

        .ce-popover-item__icon,
        .ce-popover__item-icon,
        #editorjs .ce-popover-item__icon,
        #editorjs .ce-popover__item-icon {
            width: 20px !important;
            height: 20px !important;
            min-width: 20px !important;
            min-height: 20px !important;
            margin-right: 6px !important;
            border-radius: 4px !important;
        }

        .ce-popover-item__icon svg,
        .ce-popover__item-icon svg,
        #editorjs .ce-popover-item__icon svg,
        #editorjs .ce-popover__item-icon svg {
            width: 14px !important;
            height: 14px !important;
            max-width: 14px !important;
            max-height: 14px !important;
        }

        .ce-popover-item__title,
        .ce-popover-item__label,
        .ce-popover__item-label,
        #editorjs .ce-popover-item__title,
        #editorjs .ce-popover-item__label,
        #editorjs .ce-popover__item-label {
            font-size: 12px !important;
            font-weight: 500 !important;
            line-height: 1.3 !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }

        .ce-popover-item__secondary-title,
        .ce-popover__item-secondary-label,
        #editorjs .ce-popover-item__secondary-title,
        #editorjs .ce-popover__item-secondary-label {
            font-size: 11px !important;
            margin-left: auto !important;
        }

        .ce-popover-item__icon--chevron-right svg,
        #editorjs .ce-popover-item__icon--chevron-right svg {
            width: 12px !important;
            height: 12px !important;
        }

        .cdx-search-field,
        .ce-popover__search,
        .ce-popover-search,
        #editorjs .cdx-search-field,
        #editorjs .ce-popover__search {
            height: 26px !important;
            min-height: 26px !important;
            padding: 2px 6px !important;
            margin-bottom: 4px !important;
            border-radius: 5px !important;
        }

        .cdx-search-field__input,
        .ce-popover__search-input,
        #editorjs .cdx-search-field__input {
            font-size: 11.5px !important;
            height: 22px !important;
        }

        .cdx-search-field__icon svg,
        #editorjs .cdx-search-field__icon svg {
            width: 12px !important;
            height: 12px !important;
        }

        .ce-popover-header,
        #editorjs .ce-popover-header {
            padding: 6px 8px !important;
            margin-bottom: 6px !important;
            min-height: 28px !important;
            border-radius: 6px !important;
            cursor: pointer !important;
            user-select: none !important;
            display: flex !important;
            align-items: center !important;
            gap: 6px !important;
            transition: background-color 0.15s ease !important;
            background-color: transparent !important;
        }

        .ce-popover-header:hover,
        .ce-popover-header:active,
        #editorjs .ce-popover-header:hover,
        #editorjs .ce-popover-header:active {
            background-color: #f4f4f5 !important;
        }

        .ce-popover-header__text,
        #editorjs .ce-popover-header__text {
            font-size: 0 !important;
            cursor: pointer !important;
            flex: 1 !important;
            display: inline-flex !important;
            align-items: center !important;
        }

        .ce-popover-header__text::before,
        #editorjs .ce-popover-header__text::before {
            content: "Back" !important;
            font-size: 13px !important;
            font-weight: 600 !important;
            color: #18181b !important;
        }

        .ce-popover-header__back-button,
        #editorjs .ce-popover-header__back-button {
            width: 22px !important;
            height: 22px !important;
            min-width: 22px !important;
            cursor: pointer !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            border: none !important;
            background: transparent !important;
            padding: 0 !important;
            margin: 0 !important;
            color: #52525b !important;
            border-radius: 4px !important;
        }

        .ce-popover-header__back-button svg,
        #editorjs .ce-popover-header__back-button svg {
            width: 16px !important;
            height: 16px !important;
        }

        .ce-popover-item-separator,
        #editorjs .ce-popover-item-separator {
            margin: 2px 0 !important;
        }
    }
    
    /* Center-align toolbar actions for headings in Editor.js */
    #editorjs .codex-editor:has(.ce-block--focused h1.ce-header) .ce-toolbar__actions {
        transform: translateY(0) !important;
    }
    #editorjs .codex-editor:has(.ce-block--focused h2.ce-header) .ce-toolbar__actions {
        transform: translateY(0) !important;
    }
    #editorjs .codex-editor:has(.ce-block--focused h3.ce-header) .ce-toolbar__actions {
        transform: translateY(0) !important;
    }
    #editorjs .codex-editor:has(.ce-block--focused h4.ce-header) .ce-toolbar__actions {
        transform: translateY(0) !important;
    }
    
    #editorjs .ce-block {
        margin-bottom: 0.15em !important;
    }
    #editorjs .codex-editor__redactor > .ce-block:first-child {
        padding-top: 0 !important;
        margin-top: -2px !important;
    }
    #editorjs .ce-block:has(.ce-header) {
        margin-top: 0.5em !important;
        margin-bottom: 0.15em !important;
    }
    #editorjs .ce-paragraph {
        font-size: 15px;
        line-height: 1.25 !important;
        min-height: 1.25em;
        color: #18181b;
        letter-spacing: -0.011em;
        margin: 0 !important;
        padding: 0 !important;
    }
    #editorjs .ce-header {
        font-family: 'Space Grotesk', sans-serif;
        font-weight: 700;
        color: #09090b;
        margin: 0 !important;
        line-height: 1.25 !important;
    }
    #editorjs h1.ce-header { font-size: 1.875rem; line-height: inherit; }
    #editorjs h2.ce-header { font-size: 1.5rem; line-height: inherit; }
    #editorjs h3.ce-header { font-size: 1.25rem; line-height: inherit; }
    #editorjs h4.ce-header { font-size: 1.125rem; line-height: inherit; }
    
    /* Code tool styling */
    #editorjs .ce-code__textarea {
        font-family: 'Space Mono', monospace !important;
        background-color: #fafafa !important;
        border: 1px solid #e4e4e7 !important;
        border-radius: 6px !important;
        color: #18181b !important;
        padding: 1rem !important;
        font-size: 13px !important;
        line-height: 1.6 !important;
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.02) !important;
    }

    /* List styling */
    #editorjs .cdx-list {
        padding-left: 1.5rem;
        margin-bottom: 0.8em;
        list-style-type: decimal;
    }
    #editorjs ul.cdx-list {
        list-style-type: disc;
    }
    #editorjs .cdx-list__item {
        padding: 0.25rem 0;
        line-height: 1.6;
        font-size: 15px;
        color: #18181b;
    }

    /* Checklist tool styling */
    #editorjs .cdx-checklist {
        margin-bottom: 0.8em;
    }
    #editorjs .cdx-checklist__item {
        display: flex;
        align-items: flex-start;
        padding: 0.35rem 0;
    }
    #editorjs .cdx-checklist__item-checkbox {
        width: 16px;
        height: 16px;
        border-radius: 4px;
        border: 1px solid #d4d4d8;
        margin-right: 10px;
        margin-top: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
    }
    #editorjs .cdx-checklist__item-checkbox--checked {
        background: #18181b;
        border-color: #18181b;
    }
    #editorjs .cdx-checklist__item-text {
        font-size: 15px;
        color: #18181b;
        outline: none;
    }
    #editorjs .cdx-checklist__item--checked .cdx-checklist__item-text {
        color: #71717a;
        text-decoration: line-through;
    }

    /* Image tool styling */
    #editorjs .image-tool {
        margin: 0.75rem 0;
    }
    #editorjs .image-tool__image {
        border-radius: 8px;
        overflow: hidden;
        background: #f8fafc;
        border: 1px solid #e4e4e7;
    }
    #editorjs .image-tool__image-picture {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    #editorjs .image-tool__caption {
        font-size: 13px;
        color: #71717a;
        text-align: center;
        margin-top: 6px;
        outline: none;
    }
    #editorjs .image-tool .cdx-button {
        background-color: #f4f4f5;
        border: 1px solid #e4e4e7;
        border-radius: 8px;
        padding: 10px 16px;
        font-size: 13px;
        font-weight: 500;
        color: #3f3f46;
        cursor: pointer;
        transition: all 0.15s ease;
    }
    #editorjs .image-tool .cdx-button:hover {
        background-color: #e4e4e7;
        color: #18181b;
    }

    /* Table styling and column resize */
    #editorjs .ce-block:has(.tc-wrap) .ce-block__content {
        width: calc(100% - 28px);
        max-width: none;
        margin-left: 28px !important;
        margin-right: 0 !important;
    }
    #editorjs .ce-block:has(.tc-wrap) .tc-wrap {
        width: 100%;
    }
    #editorjs .tc-wrap {
        position: relative;
        z-index: auto;
        margin: 1.5rem 0;
        max-width: 100%;
        overflow: visible;
        padding-bottom: 4px;
        grid-template-columns: 100% !important;
    }
    #editorjs .tc-toolbox {
        z-index: 100 !important;
    }
    #editorjs .tc-popover {
        z-index: 105 !important;
    }
    #editorjs .tc-table {
        position: relative;
        display: block;
        width: 100%;
        min-width: 100%;
        border: 1px solid #e4e4e7;
        overflow-x: auto;
        overflow-y: hidden;
    }
    #editorjs .tc-wrap .tc-add-column {
        position: absolute !important;
        top: -28px !important;
        right: 0 !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: 24px !important;
        height: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 4px !important;
        border: 1px solid #e4e4e7 !important;
        background-color: #f4f4f5 !important;
        color: #71717a !important;
        transition: all 0.15s ease !important;
        cursor: pointer !important;
        z-index: 10 !important;
    }
    #editorjs .tc-wrap .tc-add-column:hover {
        background-color: #e4e4e7 !important;
        color: #18181b !important;
        border-color: #d4d4d8 !important;
    }
    #editorjs .tc-wrap .tc-add-column svg {
        width: 14px !important;
        height: 14px !important;
        padding: 0 !important;
        fill: currentColor !important;
    }
    #editorjs .tc-wrap .tc-add-row {
        position: absolute !important;
        top: auto !important;
        right: auto !important;
        bottom: -28px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 24px !important;
        height: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 4px !important;
        border: 1px solid #e4e4e7 !important;
        background-color: #f4f4f5 !important;
        color: #71717a !important;
        transition: all 0.15s ease !important;
        cursor: pointer !important;
        z-index: 10 !important;
        margin-top: 0 !important;
        padding-left: 0 !important;
    }
    #editorjs .tc-wrap .tc-add-row:before {
        display: none !important;
    }
    #editorjs .tc-wrap .tc-add-row:hover {
        background-color: #e4e4e7 !important;
        color: #18181b !important;
        border-color: #d4d4d8 !important;
    }
    #editorjs .tc-wrap .tc-add-row svg {
        width: 14px !important;
        height: 14px !important;
        padding: 0 !important;
        fill: currentColor !important;
    }
    #editorjs .tc-row {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(var(--tc-column-count, 1), minmax(0, 1fr));
        border-bottom: 1px solid #e4e4e7;
    }
    #editorjs .tc-row:last-child {
        border-bottom: 0;
    }
    #editorjs .tc-cell {
        position: relative;
        min-width: 80px;
        box-sizing: border-box;
        border-right: 1px solid #e4e4e7;
        padding: 10px 14px;
        font-size: 14px;
        color: #18181b;
        overflow-wrap: anywhere;
    }
    #editorjs .tc-cell:last-child {
        border-right: 0;
    }
    #editorjs .tc-column-resize-handle {
        position: absolute;
        z-index: 3;
        top: 0;
        right: -4px;
        width: 8px;
        height: 100%;
        box-sizing: border-box;
        cursor: col-resize;
        touch-action: none;
    }
    #editorjs .tc-column-resize-handle::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 2px;
        background: transparent;
        transform: translateX(-50%);
    }
    #editorjs .tc-column-resize-handle:hover::after,
    #editorjs .tc-column-resize-handle.is-resizing::after {
        background: #2563eb;
    }
    #editorjs.tc-is-resizing,
    #editorjs.tc-is-resizing * {
        user-select: none !important;
    }

    /* Inline elements styling */
    #editorjs .cdx-marker {
        background: rgba(253, 224, 71, 0.4);
        padding: 1px 4px;
        border-radius: 3px;
    }
    #editorjs .ce-inline-code {
        background: #f4f4f5;
        color: #09090b;
        font-family: 'Space Mono', monospace;
        font-size: 0.9em;
        padding: 2px 5px;
        border-radius: 4px;
    }

    /* Override EditorJS default narrow mode right margin */
    @media (min-width: 651px) {
        #editorjs .codex-editor--narrow .codex-editor__redactor {
            margin-right: 0 !important;
        }
    }

    /* Notion-style Note AI Chatbox Styling */
    .note-ai-context-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.2rem 0.5rem;
        font-size: 11px;
        font-weight: 500;
        line-height: 1.25;
        border-radius: 6px;
        max-width: 100%;
        transition: all 0.15s ease;
        user-select: none;
    }
    .note-ai-context-chip.is-default {
        background-color: #f4f4f5;
        color: #52525b;
        border: 1px solid #e4e4e7;
    }
    .note-ai-context-chip.is-custom {
        background-color: #eff6ff;
        color: #1d4ed8;
        border: 1px solid #bfdbfe;
        box-shadow: 0 1px 2px rgba(37, 99, 235, 0.05);
    }
    .note-ai-context-chip.is-tune {
        background-color: #fdf4ff;
        color: #a21caf;
        border: 1px solid #f5d0fe;
    }
    .note-ai-context-chip-remove {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        color: #93c5fd;
        margin-left: 2px;
        transition: all 0.1s ease;
        cursor: pointer;
        flex-shrink: 0;
    }
    .note-ai-context-chip-remove:hover {
        background-color: #dbeafe;
        color: #ef4444;
    }

    .note-ai-prompt-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.32rem 0.65rem;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.25rem;
        background-color: #ffffff;
        color: #3f3f46;
        border: 1px solid #e4e4e7;
        border-radius: 0.5rem;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
        transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        user-select: none;
        white-space: nowrap;
        text-align: left;
    }
    .note-ai-prompt-chip i {
        font-size: 11px;
        flex-shrink: 0;
        transition: transform 0.15s ease;
    }
    .note-ai-prompt-chip:hover {
        background-color: #f8fafc;
        border-color: #cbd5e1;
        color: #0f172a;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
        transform: translateY(-0.5px);
    }
    .note-ai-prompt-chip:hover i {
        transform: scale(1.1);
    }
    .note-ai-prompt-chip:active {
        transform: translateY(0) scale(0.98);
        background-color: #f1f5f9;
    }
    #noteAiChatbox,
    #noteAiChatbox * {
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
        text-rendering: optimizeLegibility !important;
    }

    #noteAiChatbox {
        transform: none !important;
    }

    #noteAiModelBar {
        border-top: 1px solid #e4e4e7 !important;
    }

    #noteAiChatbox.open {
        display: flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
    }

    #noteAiChatbox.is-left {
        left: 0.75rem !important;
        right: auto !important;
    }

    #noteAiChatbox.is-compact {
        top: auto !important;
        bottom: 0.75rem !important;
        height: 480px !important;
        max-height: calc(100% - 1.5rem) !important;
    }

    .note-ai-msg-user {
        background: linear-gradient(135deg, #2563eb, #3b82f6);
        color: #ffffff;
        border-radius: 14px 14px 2px 14px;
        padding: 9px 13px;
        max-width: 85%;
        margin-left: auto;
        font-size: 13.5px;
        line-height: 1.5;
        box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
        word-break: break-word;
    }

    .note-ai-msg-quote {
        background: rgba(255, 255, 255, 0.15);
        border-left: 2.5px solid rgba(255, 255, 255, 0.85);
        border-radius: 4px;
        padding: 4px 8px;
        margin-bottom: 6px;
        font-size: 12px;
        line-height: 1.35;
        color: rgba(255, 255, 255, 0.95);
        display: flex;
        align-items: flex-start;
        gap: 5px;
    }

    .note-ai-msg-quote-text {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-style: italic;
    }

    .note-ai-msg-ai {
        background: #ffffff;
        color: #18181b;
        border: 1px solid #e4e4e7;
        border-radius: 14px 14px 14px 2px;
        padding: 11px 14px;
        max-width: 92%;
        margin-right: auto;
        font-size: 13.5px;
        line-height: 1.55;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        word-break: break-word;
    }

    .note-ai-msg-ai pre {
        background: #f4f4f5;
        border-radius: 6px;
        padding: 8px;
        margin: 6px 0;
        overflow-x: auto;
        font-family: 'Space Mono', monospace;
        font-size: 12px;
    }

    .note-ai-msg-ai code {
        background: #f4f4f5;
        padding: 1px 4px;
        border-radius: 4px;
        font-family: 'Space Mono', monospace;
        font-size: 12px;
    }

    .note-ai-msg-ai ul, .note-ai-msg-ai ol {
        margin: 4px 0 4px 16px;
        padding: 0;
    }

    .note-ai-msg-ai table {
        border-collapse: collapse;
        width: 100%;
        margin: 6px 0;
        font-size: 12.5px;
    }
    .note-ai-msg-ai th, .note-ai-msg-ai td {
        border: 1px solid #e4e4e7;
        padding: 5px 9px;
        text-align: left;
    }
    .note-ai-msg-ai th {
        background: #f8fafc;
        font-weight: 600;
    }
