.cm-button-wrapper {
    text-align: center;
    margin: 20px 0;
}
.cm-view-clipping-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #106688;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.cm-view-clipping-btn:hover {
    background-color: #0c4d28;
}

.cm-custom-header {
    background-color: #f9f9f9;
    padding: 15px 30px;
    border-bottom: 1px solid #ddd;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
.cm-custom-header a {
    color: #222;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    font-family: Arial, sans-serif;
}
.cm-custom-header a:hover {
    color: #0073aa;
}

body {
    margin: 0;
    padding: 0;
    background: #f0f0f0;
    --cm-column-count: 2;
}

.cm-page-wrapper {
    background-color: var(--cm-clip-bg, #ffffff);
    margin: 20px auto;
    padding: 30px 25px;
    border: none;
    width: 920px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
    position: relative;
    border-radius: 8px;
    box-sizing: border-box;
    min-height: 80vh;
}

.cm-page-wrapper::before {
    content: "";
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    border: 8px solid var(--cm-outer-border, #2f4f4f);
    border-radius: 10px;
    pointer-events: none;
    z-index: -1;
}

.cm-clipping-style {
    position: relative;
    background-color: var(--cm-clip-bg, #ffffff);
    padding: 15px;
    border: 3px solid var(--cm-clip-border, #060b8b);
    font-family: var(--cm-content-font) !important;
    font-weight: 400;
    color: var(--cm-content-color, #000000);
    overflow: hidden;
    box-sizing: border-box;
}

/* Watermark Layer Inside Clip */
.cm-watermark-layer {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--cm-watermark-size, 45%);
    opacity: var(--cm-watermark-opacity, 0.12);
    pointer-events: none;
    z-index: 1;
    text-align: center;
}
.cm-watermark-layer img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.cm-clip-inner-content {
    position: relative;
    z-index: 2;
}

.cm-header {
    border-bottom: 1px solid #ddd;
    padding-bottom: 0;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cm-header img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    image-rendering: -webkit-optimize-contrast;
}

.cm-details-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--cm-details-bg, #2F4F4F);
    color: var(--cm-details-text, #ffffff);
    padding: 6px 10px;
    font-size: 18px;
    font-family: var(--cm-content-font) !important;
    width: 100%;
    box-sizing: border-box;
}

.cm-date, .cm-editor {
    display: inline-block;
    white-space: nowrap;
    text-align: left;
    margin: 0;
}

.cm-clipping-title,
.cm-clipping-title font {
    font-family: var(--cm-title-font) !important;
    font-weight: 900 !important;
    text-align: center !important;
    color: var(--cm-title-color, #ff0000) !important;
    line-height: 1.25;
    margin: 15px 0 25px 0;
    font-size: var(--cm-title-size, 52px) !important;
    word-break: break-word;
    letter-spacing: 0px !important;
    text-shadow: 0px 0px 1px currentColor;
}

.cm-featured-image-wrapper {
    text-align: center !important;
    margin: 0 0 15px 0;
    border: 1px solid #ccc;
    padding: 5px;
    box-sizing: border-box;
    float: none;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    background: #fff;
    break-inside: avoid;
    page-break-inside: avoid;
}
.cm-featured-image-wrapper img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* STRICT JUSTIFICATION FOR SCREEN & HTML2CANVAS DOWNLOAD */
.cm-article-body {
    min-height: calc(5 * 1.2em);
    column-count: var(--cm-column-count, 2);
    column-gap: 30px;
    column-fill: balance;
    font-family: var(--cm-content-font) !important;
    font-size: var(--cm-content-size, 20px) !important;
    text-align: justify !important;
    text-justify: inter-word !important;
    letter-spacing: 0px !important;
    word-spacing: normal !important;
    font-kerning: normal;
    hyphens: none !important;
    color: var(--cm-content-color, #000000);
    margin-top: 15px;
}

.cm-article-body p,
.cm-article-body li,
.cm-article-body div:not(.cm-featured-image-wrapper) {
    font-family: var(--cm-content-font) !important;
    font-size: var(--cm-content-size, 20px) !important;
    line-height: 1.38;
    letter-spacing: 0px !important;
    word-spacing: normal !important;
    text-align: justify !important;
    text-justify: inter-word !important;
    text-align-last: left;
    margin: 0 0 10px 0;
    padding: 0;
}

.cm-article-body p {
    text-indent: 32px;
}

.cm-article-body span,
.cm-article-body font,
.cm-jword {
    font-family: inherit !important;
    letter-spacing: 0px !important;
    word-spacing: normal !important;
    text-indent: 0 !important;
    display: inline !important;
}

.cm-article-body img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 12px auto;
    object-fit: contain;
    break-inside: avoid;
}

.cm-footer {
    border-top: 1px solid #aaa;
    margin-top: 15px;
    padding-top: 12px;
    text-align: left;
    font-size: 18px;
    color: #444;
    column-span: all;
    -webkit-column-span: all;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.cm-footer .cm-printer-marks {
    display: flex;
    align-items: center;
}

.cm-dot {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-left: 4px;
}

.cm-actions-float {
    position: fixed;
    display: flex;
    flex-wrap: wrap;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}
.cm-actions-float select,
.cm-actions-float button {
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    margin: 5px;
    transition: background-color 0.2s;
    height: 42px;
}
.cm-actions-float button:hover {
    background-color: #000;
}

.cm-mobile-buttons .cm-actions-float {
    bottom: 10px;
    right: 10px;
    left: 10px;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
}
.cm-mobile-buttons .cm-actions-float select,
.cm-mobile-buttons .cm-actions-float button {
    padding: 12px 15px;
    font-size: 16px;
    margin: 4px;
    height: 48px;
    min-width: 115px;
    flex: 1;
}

@media print {
    .cm-custom-header,
    .cm-actions-float { display: none !important; }
    .cm-page-wrapper {
        margin: 0 !important;
        box-shadow: none !important;
        max-width: none !important;
        width: 100% !important;
        padding: 20px !important;
        border-radius: 0 !important;
    }
    .cm-page-wrapper::before { display: none !important; }
}