/* ============================================================
   Article Constructor — Editor UI Styles
   ============================================================ */

@font-face {
    font-family: 'Inter';
    src: url('InterSans-Regular.woff?v=1.0.3') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter Bold';
    src: url('InterSans-SemiBold.woff?v=1.0.3') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif; font-size: 14px; color: #1a1a1a; background: #f0f2f5; }

/* --- Header --- */
.header {
    display: flex; align-items: center; gap: 12px;
    height: 56px; padding: 0 14px;
    background: #fff; border-bottom: 1px solid #ddd; z-index: 100;
}
.header-title { font-size: 16px; font-weight: 700; white-space: nowrap; color: #333; }
.header-left { width: 220px; min-width: 220px; display: flex; align-items: center; gap: 10px; }
.header-brand { min-width: 0; }
.header-meta { font-size: 11px; font-style: italic; color: #999; margin-top: -2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.build-indicator {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border: 1px solid #d8deea;
    border-radius: 999px;
    background: #f7f9fc;
    color: #667085;
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.header-center { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center; }
.header-title-input {
    flex: 1; min-width: 0; padding: 0 8px; border: none; background: transparent;
    font-size: 14px; outline: none; height: 100%; box-sizing: border-box;
}
.header-title-input:focus { color: #333; }

/* --- Title & Domain hint wrappers --- */
.hint-wrapper--title {
    display: flex; align-items: center;
    flex: 1; min-width: 120px;
    border: 1px solid #ccc; border-radius: 6px;
    background: #fff; transition: border-color .2s;
    overflow: hidden;
    height: 36px; box-sizing: border-box;
}
.hint-wrapper--title:focus-within { border-color: #4a90d9; }

.hint-wrapper--domain {
    display: flex; align-items: center;
    width: 230px;
    border: 1px solid #ccc; border-radius: 6px;
    background: #fff; transition: border-color .2s;
    overflow: hidden;
    height: 36px; box-sizing: border-box;
}
.hint-wrapper--domain:focus-within { border-color: #4a90d9; }

.header-slug-input {
    flex: 1; min-width: 0; padding: 0 8px; border: none; background: transparent;
    font-size: 13px; color: #666; outline: none; height: 100%; box-sizing: border-box;
}
.header-slug-input:focus { color: #333; }

/* --- Slug wrapper with hint & copy --- */
.slug-wrapper {
    display: flex; align-items: center;
    width: 155px; border: 1px solid #ccc; border-radius: 6px;
    background: #fff; transition: border-color .2s;
    overflow: hidden;
    height: 36px; box-sizing: border-box;
}
.slug-wrapper:focus-within { border-color: #4a90d9; }

.slug-hint {
    flex-shrink: 0; padding: 0 7px;
    color: #aaa; font-size: 13px; cursor: default;
    position: relative;
}
.slug-hint:hover { color: #4a90d9; }

/* Tooltip */
.slug-hint::after {
    content: attr(title);
    position: absolute; top: calc(100% + 8px); left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e; color: #fff;
    font-size: 11px; line-height: 1.4;
    padding: 7px 10px; border-radius: 6px;
    width: 240px; white-space: normal; text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    pointer-events: none; opacity: 0;
    transition: opacity .15s;
    z-index: 9999;
}
.slug-hint::before {
    content: '';
    position: absolute; top: calc(100% + 3px); left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent; border-bottom-color: #1a1a2e;
    pointer-events: none; opacity: 0;
    transition: opacity .15s;
    z-index: 9999;
}
.slug-hint:hover::after,
.slug-hint:hover::before { opacity: 1; }

.slug-copy-btn {
    flex-shrink: 0; padding: 0 8px; height: 100%;
    background: transparent; border: none; border-left: 1px solid #e8e8e8;
    color: #aaa; font-size: 13px; cursor: pointer;
    transition: color .15s, background .15s;
    display: flex; align-items: center;
}
.slug-copy-btn:hover { color: #4a90d9; background: #f0f6ff; }
.slug-copy-btn.copied { color: #27272a; }
.header-domain-input {
    flex: 1; min-width: 0; padding: 0 8px; border: none; background: transparent;
    font-size: 13px; color: #666; outline: none; height: 100%; box-sizing: border-box;
}
.header-domain-input:focus { color: #333; }
.header-right { display: flex; flex-shrink: 0; gap: 5px; }
.header-right .btn { padding: 0 12px; min-width: 36px; }
.mobile-actions { display: none; position: relative; }
.mobile-actions-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
    padding: 6px;
    display: none;
    z-index: 1200;
}
.mobile-actions.open .mobile-actions-menu { display: block; }
.mobile-actions-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #333;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}
.mobile-actions-item:hover { background: #f3f6fb; }
.mobile-actions-item i {
    width: 16px;
    text-align: center;
    color: #666;
}
.btn-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f0f2f5;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    flex-shrink: 0;
}
.btn-hamburger:hover { background: #e8ecf1; border-color: #cdd5df; }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 16px; border: 1px solid transparent; border-radius: 6px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    box-sizing: border-box;
    transition: background .15s, border-color .15s, transform .1s;
}
.btn:active { transform: scale(0.97); }
.btn-mobile-fields { display: none; }
.btn-primary { background: #4a90d9; color: #fff; }
.btn-primary:hover { background: #3a7bc8; }
.btn-secondary { background: #e8ecf1; color: #333; border-color: transparent; }
.btn-secondary:hover { background: #d5dbe3; }
.btn-icon { font-family: monospace; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }

/* Green theme buttons */
#btnCopyHTML,
#downloadDropdown > .btn {
    background: #27272a;
    border-color: #27272a;
    color: #fff;
}
#btnCopyHTML:hover,
#downloadDropdown > .btn:hover {
    background: #18181b;
    border-color: #18181b;
}

.btn-sm {
    height: 28px; padding: 0 10px; font-size: 12px; border-radius: 4px;
}
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-ghost { background: transparent; color: #666; border: 1px solid #ddd; }
.btn-ghost:hover { background: #f5f5f5; }

/* --- Main Layout --- */
.main {
    display: flex; height: calc(100vh - 56px); overflow: hidden;
}

/* --- Left Panel --- */
.panel-left {
    width: 220px; min-width: 220px; background: #fff;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.panel-preview-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: #999;
}
.block-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
}
.panel-support {
    padding: 12px 10px;
    border-top: 1px solid #eee;
    background: #fff;
}
.panel-theme {
    padding: 12px 10px;
    border-top: 1px solid #eee;
    background: #fff;
}
.panel-theme-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #888;
    margin-bottom: 8px;
}
.theme-select {
    width: 100%;
    font-family: Consolas, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
    font-size: 12px;
    font-weight: 500;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fafafa;
    color: #333;
    outline: none;
    cursor: pointer;
}
.theme-select:focus {
    border-color: #4a90d9;
}
.theme-custom-colors {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fdfdfd;
    padding: 8px;
    border: 1px dashed #ddd;
    border-radius: 4px;
}
.color-picker-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #555;
}
.color-picker-group input[type="color"] {
    width: 32px;
    height: 22px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    background: none;
}
.palette-group-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #888;
    margin-top: 15px;
    margin-bottom: 6px;
    padding: 0 4px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 3px;
}
.palette-group-title:first-child,
.palette-group-title:first-of-type {
    margin-top: 0;
}
.block-btn {
    display: flex; align-items: center; gap: 8px;
    width: 100%; min-height: 34px; padding: 5px 8px; border: 1px solid #e0e0e0;
    border-radius: 6px; background: #fafafa; cursor: pointer;
    font-size: 12px; color: #333; transition: all .15s; text-align: left;
}
.block-btn:hover { background: #e8f0fe; border-color: #4a90d9; color: #4a90d9; }
.block-btn-icon {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 4px;
    background: #e8ecf1; font-weight: 700; font-size: 12px; color: #555;
    flex-shrink: 0;
}
.block-btn:hover .block-btn-icon { background: #4a90d9; color: #fff; }
.block-btn-label {
    flex: 1;
    min-width: 0;
    white-space: normal;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

/* --- Workspace --- */
.workspace {
    flex: 1; overflow-y: auto; padding: 24px; background: #f0f2f5;
}
.workspace-empty {
    display: flex; align-items: center; justify-content: center;
    height: 200px; color: #aaa; font-size: 15px; border: 2px dashed #ddd;
    border-radius: 10px; margin-bottom: 16px;
}
.blocks-container { display: flex; flex-direction: column; gap: 12px; }

/* --- Block Card --- */
.block-card {
    background: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
    overflow: hidden; transition: box-shadow .15s, border-color .15s;
}
.block-card:hover { border-color: #4a90d9; box-shadow: 0 2px 8px rgba(74,144,217,.12); }
.block-card.dragging { opacity: .4; border-style: dashed; }
.block-card.drag-over { border-color: #4a90d9; box-shadow: 0 0 0 2px rgba(74,144,217,.25); }

/* --- Import Animation --- */
.animate-fade .block-card {
    opacity: 0;
    animation: blockCardFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-fade .block-card:nth-child(1) { animation-delay: 0.02s; }
.animate-fade .block-card:nth-child(2) { animation-delay: 0.05s; }
.animate-fade .block-card:nth-child(3) { animation-delay: 0.08s; }
.animate-fade .block-card:nth-child(4) { animation-delay: 0.11s; }
.animate-fade .block-card:nth-child(5) { animation-delay: 0.14s; }
.animate-fade .block-card:nth-child(6) { animation-delay: 0.17s; }
.animate-fade .block-card:nth-child(7) { animation-delay: 0.20s; }
.animate-fade .block-card:nth-child(8) { animation-delay: 0.23s; }
.animate-fade .block-card:nth-child(9) { animation-delay: 0.26s; }
.animate-fade .block-card:nth-child(10) { animation-delay: 0.29s; }
.animate-fade .block-card:nth-child(11) { animation-delay: 0.32s; }
.animate-fade .block-card:nth-child(12) { animation-delay: 0.35s; }
.animate-fade .block-card:nth-child(n+13) { animation-delay: 0.38s; }

@keyframes blockCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.block-header {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; background: #f8f9fa; border-bottom: 1px solid #eee;
}
.drag-handle {
    cursor: grab; color: #bbb; font-size: 16px; user-select: none;
    padding: 2px 4px; line-height: 1;
}
.drag-handle:active { cursor: grabbing; }
.block-type-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: #888; flex: 1;
}
.block-actions { display: flex; gap: 4px; }
.block-action-btn {
    display: flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border: none; border-radius: 4px;
    background: transparent; cursor: pointer; font-size: 14px; color: #888;
    transition: all .15s;
}
.block-action-btn:hover { background: #e8ecf1; color: #333; }
.block-action-btn.delete:hover { background: #fde8e8; color: #e74c3c; }

.block-body { padding: 12px; }

/* --- Block Content Preview (in workspace) --- */
.block-preview { font-size: 13px; line-height: 1.6; color: #444; }
.block-preview h1 { font-size: 20px; margin: 0; }
.block-preview h2 { font-size: 17px; margin: 0; }
.block-preview h3 { font-size: 15px; margin: 0; }
.block-preview p { margin: 0; }
.block-preview blockquote {
    border-left: 3px solid #4a90d9; padding: 8px 12px; margin: 0;
    background: #f4f4f5; border-radius: 0 4px 4px 0; font-style: italic; color: #555;
}
.block-preview .table-responsive { overflow-x: auto; }
.block-preview table { width: 100%; border-collapse: collapse; font-size: 12px; }
.block-preview th, .block-preview td { border: 1px solid #ddd; padding: 5px 8px; text-align: left; }
.block-preview th { background: #f5f5f5; font-weight: 600; }

/* Bootstrap 3 Table Styles inside cards */
.block-preview table.table-striped tbody tr:nth-of-type(odd) td {
    background-color: #f9f9f9;
}
.block-preview table.table-bordered th,
.block-preview table.table-bordered td {
    border: 1px solid #ddd;
}
.block-preview table.table-hover tbody tr:hover td {
    background-color: #f5f5f5;
}
.block-preview table.table-condensed th,
.block-preview table.table-condensed td {
    padding: 3px 5px;
}
.block-preview ul, .block-preview ol { padding-left: 20px; margin: 0; }
.block-preview img.img-responsive { max-width: 100%; max-height: 120px; border-radius: 4px; }
.block-preview .link-preview { color: #4a90d9; text-decoration: underline; }
.block-preview details { border: 1px solid #d4d4d8; border-radius: 0; padding: 0; overflow: hidden; }
.block-preview summary { cursor: pointer; font-weight: 600; padding: 10px 14px; background: #f4f4f5; list-style: none; }
.block-preview details > *:not(summary) { padding: 8px 14px; margin: 0; }
.block-preview .menu-content-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.block-preview .ogli3 { list-style-type: disc; padding-left: 16px; }
.block-preview a.anchor { color: #4a90d9; text-decoration: none; }

.grid-workspace { display: flex; flex-direction: column; gap: 10px; }
.grid-workspace-help {
    background: #f7fbff; border: 1px solid #d7e8fb; border-radius: 6px;
    color: #45627d; font-size: 12px; line-height: 1.45; padding: 8px 10px;
}
.grid-workspace-row { margin-left: -6px; margin-right: -6px; }
.grid-workspace-row > [class*="col-"] { padding-left: 6px; padding-right: 6px; }
.grid-column-drop {
    min-height: 86px; border: 1px dashed #cfd8e3; border-radius: 6px;
    background: #fbfcfe; padding: 8px; transition: border-color .15s, background .15s;
}
.grid-column-drop.grid-column-over { border-color: #4a90d9; background: #edf6ff; }
.grid-column-head,
.grid-child-head {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    color: #7b8794; font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.grid-column-remove,
.grid-child-remove {
    border: none; background: transparent; color: #aaa; cursor: pointer;
    font-size: 16px; line-height: 1; padding: 0 2px;
}
.grid-column-remove:hover,
.grid-child-remove:hover { color: #e74c3c; }
.grid-column-empty {
    color: #a5b0bb; font-size: 12px; text-align: center;
    padding: 18px 6px;
}
.grid-child-card {
    background: #fff; border: 1px solid #e5e9ef; border-radius: 5px;
    margin-top: 8px; padding: 7px; cursor: grab;
}
.grid-child-card.dragging { opacity: .45; }
.grid-child-preview {
    margin-top: 6px; max-height: 160px; overflow: hidden;
    color: #444; font-size: 12px;
}
.grid-help {
    background: #f7fbff; border: 1px solid #d7e8fb; border-radius: 6px;
    color: #45627d; font-size: 12px; line-height: 1.45; padding: 8px 10px;
}

.row {
    margin-left: -15px;
    margin-right: -15px;
}
.row:before,
.row:after {
    content: " ";
    display: table;
}
.row:after { clear: both; }
[class*="col-xs-"],
[class*="col-md-"] {
    position: relative;
    min-height: 1px;
    padding-left: 15px;
    padding-right: 15px;
}
.col-xs-6,
.col-xs-12 { float: left; }
.col-xs-6 { width: 50%; }
.col-xs-12 { width: 100%; }
@media (min-width: 992px) {
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-md-9,
    .col-md-12 { float: left; }
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.33333333%; }
    .col-md-6 { width: 50%; }
    .col-md-8 { width: 66.66666667%; }
    .col-md-9 { width: 75%; }
    .col-md-12 { width: 100%; }
}

/* --- Edit Form (inside block) --- */
.edit-form { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; gap: 8px; align-items: flex-start; }
.form-group { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.form-group label { font-size: 11px; font-weight: 600; color: #888; text-transform: uppercase; }
.form-group input,
.form-group textarea,
.form-group select {
    padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px;
    font-size: 13px; font-family: inherit; outline: none; transition: border-color .15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: #4a90d9; }
.form-group textarea { resize: vertical; min-height: 60px; }
.form-group select { cursor: pointer; }

.textarea-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -2px 0 6px;
}
.textarea-tools input {
    width: 54px;
    padding: 3px 6px;
    font-size: 11px;
}
.textarea-tools .btn {
    padding: 3px 8px;
    font-size: 11px;
    line-height: 1.4;
}
.textarea-tools-hint {
    color: #777;
    font-size: 11px;
}

.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 4px; }

/* --- Table editor --- */
.table-editor { width: 100%; }
.table-editor table { width: 100%; border-collapse: collapse; }
.table-editor th, .table-editor td { border: 1px solid #ddd; padding: 2px; }
.table-editor input {
    width: 100%; border: none; padding: 4px 6px; font-size: 12px;
    outline: none; background: transparent;
}
.table-editor input:focus { background: #f4f4f5; }
.table-editor .th-input { font-weight: 600; background: #f8f9fa; }

/* Table editor Bootstrap 3 styling choices live preview */
.table-editor table.table-striped tbody tr:nth-of-type(odd) td {
    background-color: #f9f9f9;
}
.table-editor table.table-bordered th,
.table-editor table.table-bordered td {
    border: 1px solid #ccc;
}
.table-editor table.table-hover tbody tr:hover td {
    background-color: #f5f5f5;
}
.table-editor table.table-condensed th,
.table-editor table.table-condensed td {
    padding: 0px;
}

.table-editor-actions { display: flex; gap: 6px; margin-top: 6px; }

/* --- Tabs editor --- */
.tabs-editor { display: flex; flex-direction: column; gap: 8px; }
.tab-editor-item {
    border: 1px solid #eee; border-radius: 4px; padding: 8px;
    display: flex; flex-direction: column; gap: 6px;
}
.tab-editor-header { display: flex; gap: 6px; align-items: center; }
.tab-editor-header input { flex: 1; }

/* --- FAQ editor --- */
.faq-editor { display: flex; flex-direction: column; gap: 10px; }
.faq-editor-item {
    border: 1px solid #e8e8e8; border-radius: 6px; padding: 10px;
    display: flex; flex-direction: column; gap: 6px;
    background: #fdfdfd;
}
.faq-editor-header { display: flex; gap: 6px; align-items: center; }
.faq-editor-header input { flex: 1; }
.faq-editor-num {
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: #27272a; color: #fff; font-size: 11px; font-weight: 700;
    flex-shrink: 0;
}

/* --- Drop indicator --- */
.drop-indicator {
    height: 3px; background: #4a90d9; border-radius: 2px;
    margin: -6px 0; transition: opacity .15s;
}

/* --- Right Panel: Preview --- */
.panel-right {
    width: 450px; min-width: 450px; background: #fff;
    border-left: 1px solid #ddd; overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column; padding: 0;
}
body.preview-hidden .panel-right {
    display: none;
}
body.preview-hidden .workspace {
    max-width: none;
}
.panel-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky; top: 0; z-index: 10;
    flex-shrink: 0;
}
.panel-action-btn:hover {
    color: #27272a !important;
}
.btn-preview-toggle {
    white-space: nowrap;
}

.preview-toggle-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: none; border: 1px solid #ddd; border-radius: 5px;
    color: #888; cursor: pointer; font-size: 12px; font-weight: 500;
    padding: 3px 9px; transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
}
.preview-toggle-btn:hover {
    color: #27272a !important; border-color: #27272a; background: #f4f4f5;
}
.preview-toggle-btn.is-hidden {
    color: #27272a !important; border-color: #27272a; background: #f0faf5;
}
.preview-toggle-btn.is-hidden:hover {
    color: #18181b !important; border-color: #18181b; background: #e0f5ea;
}
.preview-content {
    font-size: 14px; line-height: 1.6; color: #333;
    padding: 16px; flex: 1;
}
.preview-empty { color: #aaa; font-style: italic; }

/* Fullscreen Mode for Preview */
.panel-right.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    min-width: 100vw;
    background: #fff;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: none;
}
.panel-right.fullscreen .panel-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    flex-shrink: 0;
    position: sticky; top: 0; z-index: 10;
}
.panel-right.fullscreen .preview-content {
    flex: 1;
    overflow-y: auto;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 20px 60px 20px;
}

/* Preview article styles (mirror of exported CSS) */
.preview-content {
    --description-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --description-font-bold: 'Inter Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --background_main_color: #f4f4f5;
    --background_additional_color: #fafafa;
    --accent_background_color: #27272a;
    --main_color: #1A1A1A;
    --additional_color: #3e3e3e;
}

/* TOC Container */
.preview-content .blog-content {
    background-color: var(--background_main_color, #f4f4f5);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 25px;
}
.preview-content .blog-content .menu-content-title {
    font-family: var(--description-font-bold), sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--main_color, #1A1A1A);
    margin: 0px;
    padding: 0px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.preview-content .blog-content ul {
    list-style-type: disc;
    padding: 0px 0px 0px 25px;
    margin: 15px 0px 10px;
}
.preview-content .blog-content ul li {
    margin-bottom: 5px;
}
.preview-content .blog-content ul li a.anchor {
    color: var(--main_color, #1A1A1A);
    text-decoration: none;
    font-family: var(--description-font), sans-serif;
    font-size: 14px;
    transition: color 0.2s;
}
.preview-content .blog-content ul li a.anchor:hover {
    color: var(--accent_background_color, #27272a);
    text-decoration: underline;
}
.preview-content .blog-content .ogli3 {
    list-style-type: circle;
    padding: 0px 0px 0px 25px;
    margin: 15px 0px 0px;
}

/* Description container */
.preview-content .description {
    font-family: var(--description-font), sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--main_color, #1A1A1A);
    text-align: justify;
}
.preview-content .description h1 {
    font-family: var(--description-font-bold), sans-serif;
    font-size: 32px;
    font-weight: 500;
    margin: 0 0 20px 0;
    color: #2c2c2c;
    line-height: 1.2;
}
.preview-content .description h2 {
    font-family: var(--description-font-bold), sans-serif;
    font-size: 27px;
    font-weight: 500;
    margin: 20px 0px 25px;
    color: #2c2c2c;
    line-height: 1.2;
    padding-bottom: 0;
    border-bottom: none;
    text-align: left;
}
.preview-content .description h3 {
    font-family: var(--description-font-bold), sans-serif;
    font-size: 21px;
    font-weight: 500;
    margin: 20px 0px 10px;
    color: #2c2c2c;
    line-height: 1.2;
    text-align: left;
}
.preview-content .description p {
    margin: 0 0 10px 0;
    text-indent: 15px;
    line-height: 1.5;
}
.preview-content .description .article-grid-row {
    margin-top: 20px;
    margin-bottom: 20px;
}
.preview-content .description .article-grid-row p:first-child {
    margin-top: 0;
}
.preview-content .description b, 
.preview-content .description strong {
    font-family: var(--description-font-bold), sans-serif;
    font-weight: 500;
}
.preview-content .description blockquote {
    font-family: var(--description-font), sans-serif;
    font-size: 16px;
    margin: 30px 0px;
    padding: 10px 20px;
    border-left: 5px solid var(--accent_background_color, #27272a);
    background: transparent;
    border-top: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0;
    font-style: normal;
    color: var(--main_color, #1A1A1A);
}
.preview-content .description .table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
}
.preview-content .description table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    text-align: left;
    line-height: 1.3;
    margin-bottom: 30px;
}
.preview-content .description th, 
.preview-content .description td {
    border: 1px solid var(--background_main_color, #f4f4f5);
    padding: 8px 10px;
    text-align: left;
    font-size: 16px;
}
.preview-content .description th {
    background: var(--background_main_color, #f4f4f5);
    font-family: var(--description-font-bold), sans-serif;
    font-weight: 500;
}
.preview-content .description td {
    background: #ffffff;
}

/* Bootstrap 3 Table Styles */
.preview-content .description table.table-striped tbody tr:nth-of-type(odd) td {
    background-color: #f9f9f9;
}
.preview-content .description table.table-bordered {
    border: 1px solid #ddd;
}
.preview-content .description table.table-bordered th,
.preview-content .description table.table-bordered td {
    border: 1px solid #ddd;
}
.preview-content .description table.table-hover tbody tr:hover td {
    background-color: #f5f5f5;
}
.preview-content .description table.table-condensed th,
.preview-content .description table.table-condensed td {
    padding: 5px;
}
.preview-content .description ul, 
.preview-content .description ol {
    margin: 0 0 10px 0;
    padding-left: 40px;
}
.preview-content .description li {
    margin-bottom: 0px;
    text-indent: 0px;
}
.preview-content .description img.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
}
.preview-content .description a {
    color: var(--accent_background_color, #27272a);
    text-decoration: underline;
}
.preview-content .description a:hover {
    color: var(--accent_background_color, #27272a);
    text-decoration: underline;
}

/* Details / Spoiler */
.preview-content .description details {
    margin-bottom: 5px;
    border: 1px solid var(--background_main_color, #f4f4f5);
    border-radius: 5px;
    background: var(--background_additional_color, #fafafa);
}
.preview-content .description details:last-child {
    margin-bottom: 0px;
}
.preview-content .description details summary {
    font-family: var(--description-font-bold), sans-serif;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    padding: 10px 30px;
    transition: color 0.2s;
    position: relative;
    list-style: none;
    background: transparent;
    border-bottom: none;
}
.preview-content .description details summary::-webkit-details-marker {
    display: none;
}
.preview-content .description details summary::after {
    content: "▶";
    font-size: 0.8em;
    left: 10px;
    color: var(--accent_background_color, #27272a);
    transition: transform 0.2s;
    position: absolute;
    top: 13px;
}
.preview-content .description details[open] summary::after {
    content: "▼";
}
.preview-content .description details summary + p,
.preview-content .description details > *:not(summary) {
    padding: 5px 30px;
    background: rgb(255, 255, 255);
    margin: 0px;
    text-indent: 0px !important;
}
.preview-content .description details > p:last-child,
.preview-content .description details > ul:last-child,
.preview-content .description details > ol:last-child,
.preview-content .description details > dl:last-child {
    padding-bottom: 10px;
}

/* --- FAQ --- */
.block-preview {
    --description-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --description-font-bold: 'Inter Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --background_main_color: #f4f4f5;
    --background_additional_color: #fafafa;
    --accent_background_color: #27272a;
    --main_color: #1A1A1A;
    --additional_color: #3e3e3e;
}

.preview-content .article-faq,
.block-preview .article-faq {
    margin: 20px 0;
}
.preview-content .article-faq-title,
.block-preview .article-faq-title {
    font-family: var(--description-font-bold), sans-serif;
    font-size: 27px;
    font-weight: 500;
    margin: 20px 0 15px;
    color: #2c2c2c;
    line-height: 1.2;
}
.preview-content .article-faq-list,
.block-preview .article-faq-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.preview-content .article-faq-item,
.block-preview .article-faq-item {
    border: none;
    border-bottom: 1px solid #eaeaea;
    overflow: visible;
    transition: border-color 0.2s;
}
.preview-content .article-faq-item:hover,
.block-preview .article-faq-item:hover {
    border-color: #cfd8dc;
}
.preview-content .article-faq-question,
.block-preview .article-faq-question {
    font-family: var(--description-font-bold), sans-serif;
    font-weight: 500;
    font-size: 16px !important;
    padding: 10px 40px 10px 12px !important;
    cursor: pointer;
    outline: none;
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    transition: color 0.2s;
    background: transparent;
    position: relative !important;
    color: #2c2c2c;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: left;
}
.preview-content .article-faq-question:hover,
.block-preview .article-faq-question:hover {
    background: transparent;
    color: #1a1a1a;
}
.preview-content .article-faq-question::before,
.block-preview .article-faq-question::before {
    content: "?";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #cfd8dc;
    color: #78909c;
    font-size: 12px;
    font-weight: 400;
    flex-shrink: 0;
    box-sizing: border-box;
}
.preview-content .article-faq-question::after,
.block-preview .article-faq-question::after {
    content: "" !important;
    position: absolute !important;
    right: 20px !important;
    left: auto !important;
    top: 50% !important;
    width: 8px !important;
    height: 8px !important;
    border-right: 1.5px solid #a0aab2 !important;
    border-bottom: 1.5px solid #a0aab2 !important;
    transform: translateY(-50%) rotate(45deg) !important;
    transition: transform 0.2s, border-color 0.2s;
}
.preview-content .article-faq-question:not(.collapsed)::after,
.block-preview .article-faq-question:not(.collapsed)::after {
    transform: translateY(-50%) rotate(-135deg) !important;
}
.preview-content .collapse,
.block-preview .collapse {
    display: none;
}
.preview-content .collapse.in,
.block-preview .collapse.in {
    display: block !important;
}
.preview-content .article-faq-answer,
.block-preview .article-faq-answer {
    padding: 0px 12px 12px 50px;
    background: transparent;
    font-size: 16px !important;
    line-height: 1.6;
    color: #555;
    border-top: none;
}
.preview-content .article-faq-answer p,
.block-preview .article-faq-answer p {
    margin: 0 0 8px 0;
    text-indent: 0 !important;
}
.preview-content .article-faq-answer p:last-child,
.block-preview .article-faq-answer p:last-child {
    margin-bottom: 0;
}

/* --- Вкладки (Tabs) --- */
.article-tabs {
    margin: 20px 0;
}
.article-tabs-nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #eee;
}
.article-tabs-nav button {
    padding: 10px 20px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all .15s;
}
.article-tabs-nav button.active {
    background: #fff;
    color: #4a90d9;
    border-color: #ddd;
    border-bottom-color: #fff;
    margin-bottom: -2px;
}
.article-tabs-panels {
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
}
.article-tabs-panel {
    padding: 16px 20px;
}

/* --- Кнопки / Ссылки попапа OpenCart --- */
.preview-content .btn-popup-action {
    display: inline-block;
    background: var(--accent_background_color, #27272a);
    color: #fff;
    padding: 10px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-family: var(--description-font-bold), sans-serif;
    font-weight: 500;
    transition: background 0.2s, transform 0.1s;
}
.preview-content .btn-popup-action:hover {
    background: #18181b !important;
    color: #fff !important;
    text-decoration: none !important;
}
.preview-content .btn-popup-action:active {
    transform: scale(0.98);
}
.preview-content .link-popup-action {
    color: var(--accent_background_color, #27272a);
    text-decoration: underline;
    font-family: var(--description-font-bold), sans-serif;
    font-weight: 500;
}
.preview-content .link-popup-action:hover {
    color: var(--accent_background_color, #27272a);
    text-decoration: underline;
}

/* --- Modal Overlay & Window --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; transition: opacity 0.2s ease;
}
.modal-window {
    background: #fff; width: 750px; max-width: 90vw; max-height: 85vh;
    border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    display: flex; flex-direction: column; overflow: hidden;
    animation: modalShow 0.25s ease-out;
}
@keyframes modalShow {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #eee;
    background: #fdfdfd;
}
.modal-header h2 { font-size: 16px; font-weight: 700; color: #333; margin: 0; }
.modal-close {
    background: none; border: none; font-size: 24px; color: #aaa;
    cursor: pointer; transition: color 0.15s; line-height: 1;
}
.modal-close:hover { color: #333; }
.modal-body {
    padding: 24px; overflow-y: auto; font-size: 14px; line-height: 1.6; color: #444; text-align: left;
}
.modal-body h3 { font-size: 15px; font-weight: 700; margin: 24px 0 10px; }
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin-bottom: 12px; text-indent: 0 !important; }
.modal-body ul, .modal-body ol { margin-bottom: 16px; padding-left: 20px; }
.modal-body li { margin-bottom: 8px; }
.modal-body code { background: #f5f5f5; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 13px; color: #c7254e; }
.modal-body blockquote {
    background: #f4f4f5; border-left: 4px solid #27272a; padding: 12px 18px; margin: 16px 0; border-radius: 4px; font-size: 13.5px;
    border-top: none; border-bottom: none; border-right: none; text-indent: 0 !important;
}
.modal-body blockquote strong { color: #27272a; }
.modal-body .download-box {
    background: #f8f9fa; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px 18px; margin: 12px 0 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.modal-body .download-box-text { flex: 1; }
.modal-body .download-box-title { font-weight: 700; font-size: 13px; color: #333; margin-bottom: 4px; }
.modal-body .download-box-desc { font-size: 11px; color: #777; }
.modal-body .btn-download-xml {
    background: #27272a; color: #fff; padding: 8px 14px; border-radius: 6px; border: none; font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.15s; white-space: nowrap; display: flex; align-items: center; gap: 6px;
}
.modal-body .btn-download-xml:hover { background: #219653; }

/* --- Donate button in panel left --- */
.donate-btn {
    background: #fff5f5 !important;
    border-color: #feb2b2 !important;
    color: #c53030 !important;
}
.donate-btn .block-btn-icon {
    background: #fed7d7 !important;
    color: #e53e3e !important;
}
.donate-btn:hover {
    background: #fff0f0 !important;
    border-color: #fc8181 !important;
    color: #9b2c2c !important;
}
.donate-btn:hover .block-btn-icon {
    background: #e53e3e !important;
    color: #fff !important;
}

/* --- Donate Modal Custom Styles --- */
.donate-modal-window {
    width: 500px;
    max-width: 95vw;
}

.donate-modal-body {
    padding: 20px;
}

.donate-intro {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f0 100%);
    border: 1px dashed #feb2b2;
    padding: 14px;
    border-radius: 8px;
}

.donate-icon-wrapper {
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(229, 62, 98, 0.12);
    flex-shrink: 0;
}

.donate-heart-pulse {
    font-size: 20px;
    color: #e53e3e;
    animation: heartPulse 1.4s infinite;
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.donate-text {
    font-size: 13px;
    line-height: 1.45;
    color: #4a5568;
    margin: 0 !important;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.payment-card {
    display: flex;
    align-items: center;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.payment-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e0;
}

.payment-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    margin-right: 14px;
    flex-shrink: 0;
}

.card-color-yoomoney {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.card-color-yoomoney-wallet {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

.card-color-paypal {
    background: linear-gradient(135deg, #0079c1 0%, #00457c 100%);
}

.payment-card-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.payment-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #718096;
}

.payment-value-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.payment-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    word-break: break-all;
}

.btn-copy-payment {
    background: #f4f4f5;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.btn-copy-payment:hover {
    background: #e2e8f0;
    color: #1a202c;
}

.btn-copy-payment.copied {
    background: #c6f6d5;
    color: #22543d;
}

.payment-action-link {
    font-size: 11px;
    color: #27272a;
    text-decoration: none;
    margin-top: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
    font-weight: 600;
}
.payment-action-link:hover {
    color: #18181b;
    text-decoration: underline;
}

.donate-footer-note {
    font-size: 11px;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #f4f4f5;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* --- Help Modal Tabs & Structure --- */
.help-modal-window {
    width: 756px;
    max-width: 95vw;
}

.help-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 10px 12px;
}

.help-tab-btn {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.help-tab-btn:hover {
    color: #4a90d9;
    background: #f1f5f9;
    border-color: #94a3b8;
}

.help-tab-btn.active {
    color: #fff;
    background: #4a90d9;
    border-color: #4a90d9;
    box-shadow: 0 2px 4px rgba(74, 144, 217, 0.2);
}

.help-modal-body {
    padding: 20px 24px;
    height: 480px;
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.help-steps-list {
    margin-bottom: 16px;
    padding-left: 20px;
}

.help-steps-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.help-table-guide {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 12px 0 16px;
    font-size: 12.5px;
}


.help-table-guide th, 
.help-table-guide td {
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    text-align: left;
    word-break: break-word;
    overflow-wrap: break-word;
}

.help-table-guide code {
    white-space: pre-wrap;
    word-break: break-all;
}

.help-table-guide th {
    background: #f7fafc;
    font-weight: 700;
    color: #4a5568;
}

.help-example-box {
    background: #f7fafc;
    border: 1px solid #f4f4f5;
    border-radius: 6px;
    padding: 12px;
    margin: 10px 0;
}

.help-example-input {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.help-example-output {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    border-radius: 4px;
}

/* ============================================================
   Mobile Responsive Styles
   ============================================================ */
@media (max-width: 991px) {
    .header {
        height: auto;
        min-height: 56px;
        padding: 8px 10px;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 8px;
    }

    .header-left {
        width: auto;
        min-width: 0;
        flex: 1;
    }

    .header-brand {
        overflow: hidden;
    }

    .header-title {
        font-size: 14px;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-meta {
        font-size: 10px;
        margin-top: 0;
        gap: 6px;
    }

    .build-indicator {
        font-size: 9px;
        padding: 1px 5px;
    }

    .btn-hamburger {
        display: inline-flex;
    }

    .header-right {
        order: 2;
        width: 100%;
        margin-left: 0;
        gap: 4px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow: visible;
        padding-bottom: 2px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .header-right::-webkit-scrollbar {
        display: none;
    }

    .header-right .btn {
        min-width: 34px;
        padding: 0 8px;
        flex: 0 0 auto;
    }

    .btn-mobile-fields {
        display: inline-flex;
    }

    #btnCopyHTML,
    #btnExportTXT,
    #btnExportZIP,
    #btnExportHTML,
    #btnExportCSS,
    #btnImportJSON,
    #btnExportJSON,
    #btnClipboardPasteJSON,
    #btnClipboardCopyJSON {
        display: none !important;
    }
    
    .btn-help-header .btn-text {
        display: none !important;
    }

    .mobile-actions {
        display: block;
    }

    .header-center {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
        display: none;
    }

    body.mobile-header-fields-open .header-center {
        display: flex;
    }

    .hint-wrapper--title {
        order: 1;
        flex: 1 1 100%;
    }

    .slug-wrapper {
        order: 2;
        flex: 1 1 140px;
        width: auto;
    }

    .hint-wrapper--domain {
        order: 3;
        flex: 1 1 170px;
        width: auto;
    }

    .main {
        height: calc(100vh - var(--mobile-header-height, 116px));
    }

    .panel-left {
        position: fixed;
        top: var(--mobile-header-height, 116px);
        left: 0;
        bottom: 0;
        width: 250px;
        min-width: 250px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
        border-right: 1px solid #ddd;
        box-shadow: 4px 0 15px rgba(0, 0, 0, .1);
    }

    .panel-left.open {
        transform: translateX(0);
    }

    .palette-overlay {
        position: fixed;
        top: var(--mobile-header-height, 116px);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, .4);
        z-index: 999;
        display: none;
        opacity: 0;
        transition: opacity .25s ease;
    }

    .palette-overlay.open {
        display: block;
        opacity: 1;
    }

    .workspace {
        padding: 12px;
        width: 100vw;
    }

    .workspace-empty {
        height: 120px;
        font-size: 13px;
    }

    .block-card {
        margin-bottom: 8px;
    }

    .block-header {
        padding: 6px 10px;
    }

    .block-body {
        padding: 8px;
    }

    .panel-right {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        z-index: 2000 !important;
        border-left: none !important;
        margin: 0 !important;
        display: none !important;
        flex-direction: column !important;
        background: #fff !important;
    }

    body.preview-mobile-open .panel-right {
        display: flex !important;
    }

    #btnOpenNewWindow,
    #btnToggleFullscreen {
        display: none !important;
    }

    .panel-title-container {
        padding: 12px 14px !important;
        background: #fafafa !important;
    }

    .preview-toggle-btn {
        background: #4a90d9 !important;
        color: #fff !important;
        border-color: #4a90d9 !important;
        padding: 6px 12px !important;
        font-weight: 600 !important;
        font-size: 13px !important;
        border-radius: 6px !important;
    }

    .preview-toggle-btn:hover {
        background: #3a7bc8 !important;
    }

    .preview-toggle-btn i {
        margin-right: 4px;
    }

    .article-tabs-nav [data-tab] {
        flex: 1 1 auto;
        text-align: center;
        padding: 8px 12px;
        font-size: 13px !important;
    }

    .preview-content .article-faq-answer {
        padding: 0 16px 16px 20px !important;
    }
}

@media (max-width: 420px) {
    .mobile-actions-menu {
        left: 0;
        min-width: 200px;
        max-width: calc(100vw - 20px);
    }

    .slug-wrapper,
    .hint-wrapper--domain {
        flex: 1 1 100%;
    }
}

/* --- Инфо-блок (Callout) --- */
.preview-content .article-callout,
.block-preview .article-callout {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 6px;
    box-sizing: border-box;
}

/* Стили плашек */
.preview-content .article-callout.style-well,
.block-preview .article-callout.style-well {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
}
.preview-content .article-callout.style-info,
.block-preview .article-callout.style-info {
    background: #f0f7ff;
    border: 1px solid #d0e7ff;
    border-left: 5px solid #3182ce;
}
.preview-content .article-callout.style-success,
.block-preview .article-callout.style-success {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-left: 5px solid #38a169;
}
.preview-content .article-callout.style-warning,
.block-preview .article-callout.style-warning {
    background: #fffaf0;
    border: 1px solid #feebc8;
    border-left: 5px solid #dd6b20;
}

/* Внутренняя сетка */
.preview-content .article-callout-row,
.block-preview .article-callout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.preview-content .article-callout-text-col,
.block-preview .article-callout-text-col {
    flex: 1;
    min-width: 250px;
}
.preview-content .article-callout-btn-col,
.block-preview .article-callout-btn-col {
    flex-shrink: 0;
}

/* Заголовок и текст */
.preview-content .article-callout-title,
.block-preview .article-callout-title {
    font-family: var(--description-font-bold), sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.3;
    text-align: left;
}
.preview-content .article-callout.style-well .article-callout-title,
.block-preview .article-callout.style-well .article-callout-title { color: #2c3e50; }
.preview-content .article-callout.style-info .article-callout-title,
.block-preview .article-callout.style-info .article-callout-title { color: #2b6cb0; }
.preview-content .article-callout.style-success .article-callout-title,
.block-preview .article-callout.style-success .article-callout-title { color: #2f855a; }
.preview-content .article-callout.style-warning .article-callout-title,
.block-preview .article-callout.style-warning .article-callout-title { color: #c05621; }

.preview-content .article-callout-desc,
.block-preview .article-callout-desc {
    margin: 0 !important;
    font-size: 13px;
    line-height: 1.45;
    color: #4a5568;
    text-indent: 0 !important;
    text-align: left;
}

/* Кнопка */
.preview-content .article-callout-btn,
.block-preview .article-callout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-family: var(--description-font-bold), sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
}
.preview-content .article-callout-btn:active,
.block-preview .article-callout-btn:active {
    transform: scale(0.97);
}

.preview-content .article-callout.style-well .article-callout-btn,
.block-preview .article-callout.style-well .article-callout-btn { background: #4a90d9; color: #fff; }
.preview-content .article-callout.style-well .article-callout-btn:hover,
.block-preview .article-callout.style-well .article-callout-btn:hover { background: #3a7bc8; }

.preview-content .article-callout.style-info .article-callout-btn,
.block-preview .article-callout.style-info .article-callout-btn { background: #3182ce; color: #fff; }
.preview-content .article-callout.style-info .article-callout-btn:hover,
.block-preview .article-callout.style-info .article-callout-btn:hover { background: #2b6cb0; }

.preview-content .article-callout.style-success .article-callout-btn,
.block-preview .article-callout.style-success .article-callout-btn { background: #38a169; color: #fff; }
.preview-content .article-callout.style-success .article-callout-btn:hover,
.block-preview .article-callout.style-success .article-callout-btn:hover { background: #2f855a; }

.preview-content .article-callout.style-warning .article-callout-btn,
.block-preview .article-callout.style-warning .article-callout-btn { background: #dd6b20; color: #fff; }
.preview-content .article-callout.style-warning .article-callout-btn:hover,
.block-preview .article-callout.style-warning .article-callout-btn:hover { background: #c05621; }

@media (max-width: 991px) {
    .preview-content .article-callout-row,
    .block-preview .article-callout-row {
        display: block !important;
    }
    .preview-content .article-callout-btn-col,
    .block-preview .article-callout-btn-col {
        margin-top: 15px;
    }
    .preview-content .article-callout-btn,
    .block-preview .article-callout-btn {
        display: flex;
        justify-content: center;
        width: 100%;
    }
}
.btn-help-header {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 7px 12px !important;
    background: #e0f0ff !important;
    border-color: #4a90d9 !important;
    color: #4a90d9 !important;
    font-weight: 600;
}
.btn-help-header:hover {
    background: #cce5ff !important;
    color: #004085 !important;
}

/* --- Alert Box Block --- */
.description .alert,
.preview-content .alert,
.block-preview .alert {
    padding: 15px 20px;
    margin-bottom: 22px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: var(--description-font), sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    border-left: 4px solid transparent;
}
.description .alert-info,
.preview-content .alert-info,
.block-preview .alert-info {
    background-color: #ebf5ff;
    border-color: #d0e7ff;
    border-left-color: #3182ce;
    color: #2b6cb0;
}
.description .alert-success,
.preview-content .alert-success,
.block-preview .alert-success {
    background-color: #f0fdf4;
    border-color: #dcfce7;
    border-left-color: #22c55e;
    color: #15803d;
}
.description .alert-warning,
.preview-content .alert-warning,
.block-preview .alert-warning {
    background-color: #fffbeb;
    border-color: #fef3c7;
    border-left-color: #f59e0b;
    color: #b45309;
}
.description .alert-danger,
.preview-content .alert-danger,
.block-preview .alert-danger {
    background-color: #fef2f2;
    border-color: #fee2e2;
    border-left-color: #ef4444;
    color: #b91c1c;
}

/* --- Responsive Video Block --- */
.article-video-wrapper {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.embed-responsive {
    position: relative;
    display: block;
    height: 0;
    padding: 0;
    overflow: hidden;
}
.embed-responsive-16by9 {
    padding-bottom: 56.25%;
}
.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Image Gallery Carousel Block --- */
.carousel,
.preview-content .carousel,
.block-preview .carousel {
    position: relative;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.carousel-inner,
.preview-content .carousel-inner,
.block-preview .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.carousel-inner > .item,
.preview-content .carousel-inner > .item,
.block-preview .carousel-inner > .item {
    position: relative;
    display: none;
    transition: .6s ease-in-out left;
}
.carousel-inner > .item > img,
.preview-content .carousel-inner > .item > img,
.block-preview .carousel-inner > .item > img {
    line-height: 1;
}
.carousel-inner > .active,
.preview-content .carousel-inner > .active,
.block-preview .carousel-inner > .active {
    display: block;
}
.carousel-indicators,
.preview-content .carousel-indicators,
.block-preview .carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    z-index: 15;
    width: 60%;
    padding-left: 0;
    margin-left: -30%;
    text-align: center;
    list-style: none;
    margin-bottom: 0;
}
.carousel-indicators li,
.preview-content .carousel-indicators li,
.block-preview .carousel-indicators li {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 1px;
    text-indent: -999px;
    cursor: pointer;
    background-color: rgba(0,0,0,0);
    border: 1px solid #fff;
    border-radius: 10px;
    transition: background-color .15s;
}
.carousel-indicators .active,
.preview-content .carousel-indicators .active,
.block-preview .carousel-indicators .active {
    width: 12px;
    height: 12px;
    margin: 0;
    background-color: #fff;
}
.carousel-control,
.preview-content .carousel-control,
.block-preview .carousel-control {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 15%;
    font-size: 20px;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,.6);
    background-color: rgba(0,0,0,0);
    filter: alpha(opacity=50);
    opacity: .5;
    transition: opacity .15s;
    cursor: pointer;
}
.carousel-control:hover,
.preview-content .carousel-control:hover,
.block-preview .carousel-control:hover {
    color: #fff;
    text-decoration: none;
    filter: alpha(opacity=90);
    opacity: .9;
}
.carousel-control .glyphicon-chevron-left,
.carousel-control .glyphicon-chevron-right,
.preview-content .carousel-control .glyphicon-chevron-left,
.preview-content .carousel-control .glyphicon-chevron-right,
.block-preview .carousel-control .glyphicon-chevron-left,
.block-preview .carousel-control .glyphicon-chevron-right {
    display: none !important;
}
.carousel-control::before,
.preview-content .carousel-control::before,
.block-preview .carousel-control::before {
    content: '';
    position: absolute;
    top: 50%;
    margin-top: -10px;
    width: 20px;
    height: 20px;
    border-top: 3px solid #fff;
    border-left: 3px solid #fff;
}
.carousel-control.left::before,
.preview-content .carousel-control.left::before,
.block-preview .carousel-control.left::before {
    left: 50%;
    margin-left: -10px;
    transform: rotate(-45deg);
}
.carousel-control.right::before,
.preview-content .carousel-control.right::before,
.block-preview .carousel-control.right::before {
    right: 50%;
    margin-right: -10px;
    transform: rotate(135deg);
}
.carousel-control.right,
.preview-content .carousel-control.right,
.block-preview .carousel-control.right {
    right: 0;
    left: auto;
}
.carousel-caption,
.preview-content .carousel-caption,
.block-preview .carousel-caption {
    position: absolute;
    right: 15%;
    bottom: 20px;
    left: 15%;
    z-index: 10;
    padding-top: 20px;
    padding-bottom: 20px;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.carousel-caption h3,
.preview-content .carousel-caption h3,
.block-preview .carousel-caption h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.4);
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
}

/* --- Interactive Before/After Image Slider Block --- */
.article-ba-slider,
.preview-content .article-ba-slider,
.block-preview .article-ba-slider {
    position: relative;
    width: 100%;
    height: 380px;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    user-select: none;
}
.ba-image,
.preview-content .ba-image,
.block-preview .ba-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}
.ba-before-img,
.preview-content .ba-before-img,
.block-preview .ba-before-img {
    width: 50%;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}
.ba-after-img,
.preview-content .ba-after-img,
.block-preview .ba-after-img {
    z-index: 1;
}
.ba-label,
.preview-content .ba-label,
.block-preview .ba-label {
    position: absolute;
    bottom: 12px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 4;
}
.ba-label-before,
.preview-content .ba-label-before,
.block-preview .ba-label-before {
    left: 12px;
}
.ba-label-after,
.preview-content .ba-label-after,
.block-preview .ba-label-after {
    right: 12px;
}
.ba-handle-slider,
.preview-content .ba-handle-slider,
.block-preview .ba-handle-slider {
    position: absolute;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    margin: 0;
    z-index: 5;
    cursor: ew-resize;
}
.ba-handle-slider::-webkit-slider-thumb,
.preview-content .ba-handle-slider::-webkit-slider-thumb,
.block-preview .ba-handle-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #27272a;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: ew-resize;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%2327272a' d='M16 17.01V14h-8v3.01L4 13l4-4.01V12h8V8.99L20 13l-4 4.01z'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px;
}
.ba-handle-slider::-moz-range-thumb,
.preview-content .ba-handle-slider::-moz-range-thumb,
.block-preview .ba-handle-slider::-moz-range-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #27272a;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: ew-resize;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%2327272a' d='M16 17.01V14h-8v3.01L4 13l4-4.01V12h8V8.99L20 13l-4 4.01z'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px;
}
.ba-handle-bar,
.preview-content .ba-handle-bar,
.block-preview .ba-handle-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #fff;
    margin-left: -1px;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

/* --- Messenger Quick Buttons Block --- */
.article-messengers-row,
.preview-content .article-messengers-row,
.block-preview .article-messengers-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    font-family: var(--description-font), sans-serif;
}
.messenger-btn,
.preview-content .messenger-btn,
.block-preview .messenger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #fff !important;
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 130px;
    cursor: pointer;
}
.messenger-btn:hover,
.preview-content .messenger-btn:hover,
.block-preview .messenger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    color: #fff !important;
}
.messenger-btn:active,
.preview-content .messenger-btn:active,
.block-preview .messenger-btn:active {
    transform: translateY(0);
}
.messenger-btn i,
.preview-content .messenger-btn i,
.block-preview .messenger-btn i {
    font-size: 16px;
}
.messenger-wa,
.preview-content .messenger-wa,
.block-preview .messenger-wa {
    background: #25d366;
}
.messenger-wa:hover,
.preview-content .messenger-wa:hover,
.block-preview .messenger-wa:hover {
    background: #20ba5a;
}
.messenger-tg,
.preview-content .messenger-tg,
.block-preview .messenger-tg {
    background: #0088cc;
}
.messenger-tg:hover,
.preview-content .messenger-tg:hover,
.block-preview .messenger-tg:hover {
    background: #0077b5;
}
.messenger-viber,
.preview-content .messenger-viber,
.block-preview .messenger-viber {
    background: #71717a;
}
.messenger-viber:hover,
.preview-content .messenger-viber:hover,
.block-preview .messenger-viber:hover {
    background: #27272a;
}
.messenger-phone,
.preview-content .messenger-phone,
.block-preview .messenger-phone {
    background: #2d3e50;
}
.messenger-phone:hover,
.preview-content .messenger-phone:hover,
.block-preview .messenger-phone:hover {
    background: #212f3d;
}

/* --- OpenCart Product Card Block --- */
.article-product-card,
.preview-content .article-product-card,
.block-preview .article-product-card {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    padding: 16px;
    margin-bottom: 25px;
    gap: 16px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.25s;
    font-family: var(--description-font), sans-serif;
}
.article-product-card:hover,
.preview-content .article-product-card:hover,
.block-preview .article-product-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.product-card-img-wrap,
.preview-content .product-card-img-wrap,
.block-preview .product-card-img-wrap {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card-img-wrap img,
.preview-content .product-card-img-wrap img,
.block-preview .product-card-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.product-card-info,
.preview-content .product-card-info,
.block-preview .product-card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.product-card-title,
.preview-content .product-card-title,
.block-preview .product-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    font-family: var(--description-font-bold), sans-serif;
}
.product-card-title a,
.preview-content .product-card-title a,
.block-preview .product-card-title a {
    color: #1a1a1a;
    text-decoration: none;
}
.product-card-title a:hover,
.preview-content .product-card-title a:hover,
.block-preview .product-card-title a:hover {
    color: var(--accent_background_color, #27272a);
}
.product-card-footer,
.preview-content .product-card-footer,
.block-preview .product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.product-card-price,
.preview-content .product-card-price,
.block-preview .product-card-price {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
}
.product-card-btn,
.preview-content .product-card-btn,
.block-preview .product-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent_background_color, #27272a);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    transition: filter 0.15s, background 0.15s;
    cursor: pointer;
}
.product-card-btn:hover,
.preview-content .product-card-btn:hover,
.block-preview .product-card-btn:hover {
    filter: brightness(90%);
}

@media (max-width: 991px) {
    .article-product-card,
    .preview-content .article-product-card,
    .block-preview .article-product-card {
        flex-direction: column;
        align-items: stretch;
    }
    .product-card-img-wrap,
    .preview-content .product-card-img-wrap,
    .block-preview .product-card-img-wrap {
        width: 100%;
        height: 140px;
    }
    .product-card-footer,
    .preview-content .product-card-footer,
    .block-preview .product-card-footer {
        flex-direction: row;
        width: 100%;
    }
}

/* ── Start Screen Overlay ─────────────────────────────────── */
.start-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    z-index: 9999;
    overflow-y: auto;
}
.start-screen-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.10);
    padding: 36px 40px;
    max-width: 600px;
    width: 100%;
    animation: startFadeIn 0.35s ease;
    box-sizing: border-box;
    text-align: left;
    margin: auto;
}
@keyframes startFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.start-screen-header {
    text-align: center;
    margin-bottom: 28px;
}
.start-screen-icon {
    font-size: 36px;
    color: #27272a;
    margin-bottom: 10px;
    display: block;
}
.start-screen-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}
.start-screen-header p {
    font-size: 13px;
    color: #888;
    margin: 0;
}
.start-field-group {
    margin-bottom: 20px;
}
.start-field-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.start-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.start-input:focus {
    border-color: #27272a;
    box-shadow: 0 0 0 3px rgba(84,70,248,0.10);
}
.start-url-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
.start-url-row .start-input {
    flex: 1;
}
.start-remember-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    font-weight: normal;
    margin-bottom: 0 !important;
}
.start-remember-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}
.start-theme-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.start-theme-card {
    flex: 1 1 70px;
    min-width: 70px;
    max-width: 110px;
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 12px 4px 8px;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s;
    text-align: center;
    background: #fafafa;
    box-sizing: border-box;
}
.start-theme-card:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.start-theme-card.active {
    border-color: var(--card-accent, #27272a);
    box-shadow: 0 0 0 3px rgba(84,70,248,0.15);
}
.start-theme-card-preview {
    height: 32px;
    border-radius: 6px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.start-theme-card-btn {
    height: 16px;
    border-radius: 4px;
    width: 16px;
}
.start-theme-card-name {
    font-size: 10px;
    color: #555;
    font-weight: 500;
}
.start-theme-card[data-theme="dark"] {
    background: #1e272e;
    border-color: #2f3640;
}
.start-theme-card[data-theme="dark"] .start-theme-card-name {
    color: #dcdde1;
}
.start-theme-card[data-theme="dark"] .start-theme-card-preview {
    background: #2f3640 !important;
}
.start-theme-card[data-theme="dark"]:hover {
    border-color: #00d2d3;
}
.start-theme-card[data-theme="dark"].active {
    border-color: #00d2d3;
    box-shadow: 0 0 0 3px rgba(0, 210, 211, 0.25);
}
.start-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}
.start-btn-primary {
    flex: 1;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    background: #27272a;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.start-btn-primary:hover {
    background: #18181b;
}
.start-btn-skip {
    background: none;
    border: none;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}
.start-btn-skip:hover {
    color: #666;
}

/* ── Mobile Start Screen & Table Guide Overrides ──────────────── */
@media (max-width: 480px) {
    .start-screen-overlay {
        padding: 12px;
    }
    .start-screen-card {
        padding: 24px 20px;
        border-radius: 12px;
    }
    .start-screen-header {
        margin-bottom: 20px;
    }
    .start-screen-header h2 {
        font-size: 18px;
    }
    .start-url-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .start-remember-label {
        margin-top: 2px;
        align-self: flex-start;
    }
    .start-theme-card {
        flex: 1 1 calc(50% - 6px);
        max-width: none;
        min-width: 100px;
        padding: 10px 6px;
    }
    .start-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 20px;
    }
    .start-btn-primary {
        width: 100%;
        font-size: 14px;
        padding: 10px;
    }
    .start-btn-skip {
        text-align: center;
        padding: 8px;
    }
    .help-modal-body {
        padding: 12px 14px;
    }
    .help-table-guide {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        table-layout: auto;
    }
}

/* ── Landscape Mobile viewport optimizations (height-based) ───── */
@media (max-height: 520px) and (min-width: 480px) and (max-width: 991px) {
    .start-screen-overlay {
        padding: 12px;
        align-items: flex-start;
    }
    .start-screen-card {
        max-width: 720px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 10px 24px;
        padding: 16px 24px;
        border-radius: 12px;
        margin: 12px auto;
    }
    .start-screen-header {
        grid-column: 1 / span 2;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-align: left;
    }
    .start-screen-icon {
        margin-bottom: 0;
        font-size: 24px;
        display: inline;
    }
    .start-screen-header h2 {
        font-size: 18px;
        margin: 0;
        display: inline-block;
    }
    .start-screen-header p {
        display: none;
    }
    .start-field-group.start-field-title {
        grid-column: 1;
        grid-row: 2;
        margin-bottom: 0;
    }
    .start-field-group.start-field-url {
        grid-column: 1;
        grid-row: 3;
        margin-bottom: 0;
    }
    .start-field-group.start-field-theme {
        grid-column: 2;
        grid-row: 2 / span 2;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    .start-theme-cards {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 4px;
    }
    .start-theme-card {
        flex: 1 1 calc(33.33% - 6px);
        max-width: none;
        min-width: 70px;
        padding: 8px 4px;
    }
    .start-actions {
        grid-column: 1 / span 2;
        margin-top: 6px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 16px;
    }
}

@media (max-height: 520px) and (max-width: 479px) {
    .start-screen-overlay {
        padding: 12px;
        align-items: flex-start;
    }
    .start-screen-card {
        padding: 12px 16px;
        border-radius: 8px;
        margin: 12px auto;
    }
    .start-screen-header {
        margin-bottom: 8px;
    }
    .start-screen-header h2 {
        font-size: 16px;
    }
    .start-screen-header p,
    .start-screen-icon {
        display: none;
    }
    .start-field-group {
        margin-bottom: 8px;
    }
    .start-field-group label {
        font-size: 11px;
        margin-bottom: 4px;
    }
    .start-input {
        padding: 6px 10px;
        font-size: 13px;
    }
    .start-theme-cards {
        gap: 6px;
    }
    .start-theme-card {
        padding: 6px 4px;
        flex: 1 1 calc(33.33% - 4px);
        min-width: 65px;
    }
    .start-actions {
        margin-top: 10px;
        gap: 10px;
    }
}

/* ── Recovery Banner ──────────────────────────────────────── */
.recovery-banner {
    background: #f0f9ff;
    border-bottom: 1px solid #bae6fd;
    padding: 10px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 10001;
    font-size: 13px;
    box-sizing: border-box;
    flex-wrap: wrap;
    font-family: sans-serif;
}
.recovery-text {
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.recovery-text i {
    font-size: 15px;
    color: #0284c7;
}
.recovery-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.recovery-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
}

@media (max-width: 991px) {
    .recovery-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        text-align: center;
        padding: 8px 12px;
    }
    .recovery-text {
        justify-content: center;
    }
    .recovery-actions {
        justify-content: center;
    }
}

/* ── Custom Toast Notification ────────────────────────────── */
.custom-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 100px);
    background: #2d3748;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 99999;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    pointer-events: none;
    font-family: sans-serif;
}
.custom-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* ── Comparison Block Table ───────────────────────────────── */
.article-comparison-wrapper {
    margin: 20px 0;
}
.article-comparison-title {
    font-family: var(--description-font-bold), sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: left;
}
.article-comparison-wrapper table {
    width: 100%;
    margin-bottom: 10px;
}
.article-comparison-wrapper table tbody tr.row-different td {
    background-color: #fff5f5 !important;
    font-weight: 600;
}
.compare-diff-toggle-wrapper {
    margin-bottom: 12px;
    text-align: right;
}
.compare-diff-toggle-wrapper label {
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

/* ── Export Dropdown ───────────────────────────────────────── */
.header-dropdown {
    position: relative;
    display: inline-block;
}
.header-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #ffffff;
    min-width: 260px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.15);
    z-index: 10002;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    margin-top: 5px;
    padding: 6px 0;
}
.header-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}
.header-dropdown:hover .header-dropdown-menu,
.header-dropdown.active .header-dropdown-menu {
    display: block;
}
.header-dropdown-item {
    color: #2d3748;
    padding: 10px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}
.header-dropdown-item:hover {
    background-color: #f7fafc;
    color: #27272a;
}
.header-dropdown-item i {
    width: 16px;
    text-align: center;
    color: #718096;
}
.header-dropdown-item:hover i {
    color: #27272a;
}

/* ── Wide Dropdown Menu and Sections ───────────────────────── */
.header-dropdown-menu.wide-menu {
    min-width: 420px;
    padding: 0;
}
.dropdown-section {
    border-bottom: 1px solid #f4f4f5;
    padding: 8px 0;
}
.dropdown-section:last-child {
    border-bottom: none;
}
.dropdown-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #a0aec0;
    padding: 8px 16px 4px 16px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.header-dropdown-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 16px;
    gap: 12px;
}
.header-dropdown-item i, 
.header-dropdown-item .css-icon-dropdown {
    margin-top: 3px;
    flex-shrink: 0;
}
.header-dropdown-item .item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.header-dropdown-item .item-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.3;
}
.header-dropdown-item .item-desc {
    font-size: 11px;
    color: #718096;
    line-height: 1.4;
    font-weight: 400;
}
.header-dropdown-item:hover .item-title {
    color: #27272a;
}
.header-dropdown-item:hover .item-desc {
    color: #4a5568;
}
.css-icon-dropdown {
    font-weight: bold;
    font-family: monospace;
    font-size: 13px;
    width: 16px;
    text-align: center;
    display: inline-block;
    color: #718096;
}
.header-dropdown-item:hover .css-icon-dropdown {
    color: #27272a;
}

/* === Missing Bootstrap button overrides === */
.btn-outline-primary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border: 1px solid #27272a;
    background: transparent; color: #27272a;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-outline-primary:hover { background: #27272a; color: #fff; }

.btn-demo {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border: 1px solid #71717a;
    background: transparent; color: #71717a;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-demo:hover { background: #f4f4f5; color: #27272a; }

/* === Fix: Accordion / Spoiler padding and borders === */
.preview-content .description details {
    margin-bottom: 8px;
    border: 1px solid #d4d4d8;
    border-radius: 0;
    background: #fafafa;
    overflow: hidden;
}
.preview-content .description details summary {
    padding: 14px 30px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    position: relative;
    list-style: none;
    background: #f4f4f5;
    border-bottom: none;
}
.preview-content .description details summary::-webkit-details-marker {
    display: none;
}
.preview-content .description details summary::after {
    content: "▶";
    font-size: 0.75em;
    left: 12px;
    color: #71717a;
    transition: transform 0.2s;
    position: absolute;
    top: 16px;
}
.preview-content .description details[open] summary::after {
    content: "▼";
}
.preview-content .description details > *:not(summary) {
    padding: 12px 30px;
    margin: 0;
    background: #fff;
}
.preview-content .description details > p:last-child,
.preview-content .description details > ul:last-child,
.preview-content .description details > ol:last-child {
    padding-bottom: 16px;
}
.preview-content .description details p {
    margin: 0 0 8px;
    line-height: 1.6;
}
.preview-content .description details p:last-child {
    margin-bottom: 0;
}
.preview-content .description details ul,
.preview-content .description details ol {
    padding-left: 20px;
    margin: 0 0 8px;
}
.preview-content .description details li {
    margin-bottom: 4px;
    line-height: 1.5;
}
