/* ============================================================
   Carousel Maker – Powerful Visual Themes
   Matching real Arabic carousel examples
   ============================================================ */

.cm-wrap {
    max-width: 1480px;
    margin: 20px auto;
    font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

.cm-main-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 24px;
}

.cm-main-title .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #e67e22;
}

.cm-badge {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-right: auto;
}

.cm-app {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}

.cm-panel { padding: 32px; }

.cm-panel-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
}

.cm-panel-header p {
    margin: 0 0 24px;
    color: #666;
    font-size: 15px;
}

.cm-tabs { display: flex; gap: 8px; margin-bottom: 16px; }

.cm-tab {
    background: #f1f5f9;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cm-tab.active { background: #e67e22; color: #fff; }

.cm-mode-help {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #9a3412;
}

.cm-mode-help pre {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    direction: ltr;
    text-align: left;
    overflow-x: auto;
    margin-top: 8px;
}

.cm-textarea {
    width: 100%;
    min-height: 280px;
    padding: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    resize: vertical;
    transition: border-color 0.2s;
    direction: rtl;
}

.cm-textarea:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

.cm-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.cm-control label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.cm-control select {
    min-width: 200px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
}

.cm-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.cm-actions-bottom {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
    margin-top: 32px;
}

.cm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.cm-btn-primary {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: #fff;
    box-shadow: 0 4px 14px rgba(230, 126, 34, 0.35);
}

.cm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.45);
}

.cm-btn-secondary {
    background: #f1f5f9;
    color: #334155;
}

.cm-btn-secondary:hover { background: #e2e8f0; }

.cm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.cm-slides-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.cm-slide-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 10px;
    border: 3px solid transparent;
    overflow: hidden;
    cursor: pointer;
    background: #f8fafc;
    position: relative;
    transition: all 0.2s;
}

.cm-slide-thumb.active {
    border-color: #e67e22;
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.3);
}

.cm-slide-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cm-slide-thumb .num {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.cm-editor-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 1100px) {
    .cm-editor-layout { grid-template-columns: 1fr; }
}

.cm-preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cm-slide-wrapper {
    width: 440px;
    height: 440px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.18);
    border-radius: 12px;
    overflow: hidden;
    background: #111;
}

/* ============================================================
   THE SLIDE (1080×1080 scaled)
   ============================================================ */

.cm-slide {
    width: 1080px;
    height: 1080px;
    position: relative;
    overflow: hidden;
    transform: scale(0.4074);
    transform-origin: top right;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    direction: rtl;
    box-sizing: border-box;
}

.cm-slide-header {
    position: absolute;
    z-index: 5;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.cm-slide-box {
    position: absolute;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cm-slide-content {
    width: 100%;
    font-weight: 600;
    line-height: 1.55;
}

.cm-slide-image-wrap {
    position: absolute;
    overflow: hidden;
    z-index: 2;
}

.cm-slide-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cm-slide-number {
    position: absolute;
    bottom: 40px;
    left: 50px;
    font-size: 28px;
    font-weight: 800;
    z-index: 6;
}

/* ========== THEME: TORN PAPER ========== */
.cm-slide[data-theme="torn-paper"] {
    background: #0d3b4c;
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(255,255,255,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(0,0,0,0.2) 0%, transparent 50%);
}

.cm-slide[data-theme="torn-paper"] .cm-slide-header {
    top: 60px;
    right: 70px;
    left: 70px;
    background: #ffffff;
    color: #111;
    font-size: 42px;
    padding: 36px 48px;
    clip-path: polygon(
        0% 8%, 3% 0%, 8% 6%, 12% 1%, 18% 7%, 25% 0%, 32% 5%,
        40% 1%, 48% 6%, 55% 0%, 62% 5%, 70% 1%, 78% 7%,
        85% 0%, 92% 6%, 97% 1%, 100% 5%,
        100% 100%, 0% 100%
    );
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.cm-slide[data-theme="torn-paper"] .cm-slide-box {
    top: 320px;
    right: 90px;
    left: 90px;
    background: #8B5A2B;
    color: #fff;
    border-radius: 28px;
    padding: 40px 44px;
    min-height: 260px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.cm-slide[data-theme="torn-paper"] .cm-slide-content {
    font-size: 32px;
    color: #fff;
}

.cm-slide[data-theme="torn-paper"] .cm-slide-image-wrap {
    bottom: 70px;
    right: 140px;
    left: 140px;
    height: 260px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.cm-slide[data-theme="torn-paper"] .cm-slide-number {
    color: rgba(255,255,255,0.7);
}

/* ========== THEME: SOLID BOLD ========== */
.cm-slide[data-theme="solid-bold"] {
    background: #F5A623;
}

.cm-slide[data-theme="solid-bold"] .cm-slide-header {
    top: 80px;
    right: 60px;
    left: 60px;
    color: #111;
    font-size: 62px;
    font-weight: 900;
}

.cm-slide[data-theme="solid-bold"] .cm-slide-box {
    top: 280px;
    right: 80px;
    left: 80px;
    background: transparent;
    padding: 0;
}

.cm-slide[data-theme="solid-bold"] .cm-slide-content {
    font-size: 36px;
    font-weight: 700;
    color: #111;
}

.cm-slide[data-theme="solid-bold"] .cm-slide-image-wrap {
    bottom: 80px;
    right: 120px;
    left: 120px;
    height: 420px;
}

.cm-slide[data-theme="solid-bold"] .cm-slide-image-wrap img {
    object-fit: contain;
}

.cm-slide[data-theme="solid-bold"] .cm-slide-number {
    color: rgba(0,0,0,0.35);
}

/* ========== THEME: BURN HOLE ========== */
.cm-slide[data-theme="burn-hole"] {
    background: #1a1a1a;
}

/* Pure outer burn ring — transparent center so the image is fully visible */
.cm-slide[data-theme="burn-hole"]::before {
    content: '';
    position: absolute;
    top: 55px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: transparent;
    box-shadow:
        0 0 0 10px #2a1a0a,
        0 0 28px 14px rgba(255,80,0,0.55),
        0 0 55px 28px rgba(255,120,0,0.28),
        inset 0 0 40px rgba(255,60,0,0.25);
    z-index: 1;
    pointer-events: none;
}

.cm-slide[data-theme="burn-hole"] .cm-slide-header {
    display: none;
}

.cm-slide[data-theme="burn-hole"] .cm-slide-box {
    top: 370px;
    right: 90px;
    left: 90px;
    background: #FFD600;
    color: #111;
    border-radius: 28px;
    padding: 40px 44px;
    min-height: 200px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 5px rgba(255,214,0,0.12);
}

.cm-slide[data-theme="burn-hole"] .cm-slide-content {
    font-size: 38px;
    font-weight: 800;
    color: #111;
    line-height: 1.45;
}

.cm-slide[data-theme="burn-hole"] .cm-slide-image-wrap {
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 230px;
    height: 230px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 4;
    box-shadow:
        0 0 0 8px #1a0f08,
        0 0 20px 6px rgba(255,90,0,0.45),
        0 8px 32px rgba(0,0,0,0.6);
}

.cm-slide[data-theme="burn-hole"] .cm-slide-image-wrap img {
    object-fit: cover;
}

.cm-slide[data-theme="burn-hole"] .cm-slide-number {
    color: #FFD600;
    bottom: 36px;
    left: 48px;
    font-size: 26px;
}

/* ========== THEME: DARK STICK ========== */
.cm-slide[data-theme="dark-stick"] {
    background: #0d0d0d;
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(255,214,0,0.03) 0%, transparent 40%);
}

.cm-slide[data-theme="dark-stick"] .cm-slide-header {
    top: 55px;
    right: 60px;
    left: 60px;
    color: #FFD600;
    font-size: 56px;
    font-weight: 900;
    line-height: 1.3;
}

.cm-slide[data-theme="dark-stick"] .cm-slide-box {
    top: 220px;
    right: 70px;
    left: 70px;
    bottom: 480px;
    background: transparent;
    padding: 0;
    min-height: 0;
    align-items: flex-start;
    justify-content: flex-start;
}

.cm-slide[data-theme="dark-stick"] .cm-slide-content {
    font-size: 40px;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.5;
}

.cm-slide[data-theme="dark-stick"] .cm-slide-image-wrap {
    bottom: 50px;
    right: 100px;
    left: 100px;
    height: 400px;
}

.cm-slide[data-theme="dark-stick"] .cm-slide-image-wrap img {
    object-fit: contain;
}

.cm-slide[data-theme="dark-stick"] .cm-slide-number {
    color: #FFD600;
    font-size: 32px;
}

/* ========== THEME: TEAL POWER ========== */
.cm-slide[data-theme="teal-power"] {
    background: #0a3d4a;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(0,0,0,0.25) 0%, transparent 50%);
}

.cm-slide[data-theme="teal-power"] .cm-slide-header {
    top: 80px;
    right: 70px;
    left: 70px;
    color: #ffffff;
    font-size: 52px;
    font-weight: 900;
}

.cm-slide[data-theme="teal-power"] .cm-slide-box {
    top: 320px;
    right: 80px;
    left: 80px;
    background: transparent;
    padding: 0;
}

.cm-slide[data-theme="teal-power"] .cm-slide-content {
    font-size: 34px;
    color: #e0f2f1;
    font-weight: 600;
}

.cm-slide[data-theme="teal-power"] .cm-slide-image-wrap {
    bottom: 70px;
    right: 160px;
    left: 160px;
    height: 380px;
}

.cm-slide[data-theme="teal-power"] .cm-slide-image-wrap img {
    object-fit: contain;
}

.cm-slide[data-theme="teal-power"] .cm-slide-number {
    color: #FFD600;
}

/* ========== THEME: YELLOW BOX ========== */
.cm-slide[data-theme="yellow-box"] {
    background: #111111;
    background-image:
        radial-gradient(ellipse at 50% 30%, rgba(255,214,0,0.05) 0%, transparent 50%);
}

.cm-slide[data-theme="yellow-box"] .cm-slide-header {
    display: none;
}

.cm-slide[data-theme="yellow-box"] .cm-slide-box {
    top: 50%;
    transform: translateY(-50%);
    right: 90px;
    left: 90px;
    background: #FFD600;
    color: #111;
    border-radius: 36px;
    padding: 60px 50px;
    min-height: 280px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 8px rgba(255,214,0,0.12);
}

.cm-slide[data-theme="yellow-box"] .cm-slide-content {
    font-size: 48px;
    font-weight: 900;
    color: #111;
    line-height: 1.4;
}

.cm-slide[data-theme="yellow-box"] .cm-slide-image-wrap {
    top: 70px;
    right: 120px;
    left: 120px;
    height: 280px;
    border-radius: 24px;
    overflow: hidden;
    z-index: 2;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.cm-slide[data-theme="yellow-box"] .cm-slide-image-wrap img {
    object-fit: cover;
}

.cm-slide[data-theme="yellow-box"] .cm-slide-box {
    top: auto;
    bottom: 80px;
    transform: none;
    right: 90px;
    left: 90px;
    min-height: 240px;
    padding: 40px 44px;
}

.cm-slide[data-theme="yellow-box"] .cm-slide-number {
    color: #FFD600;
}

/* ========== THEME: ORANGE CLEAN ========== */
.cm-slide[data-theme="orange-clean"] {
    background: #ffffff;
}

.cm-slide[data-theme="orange-clean"] .cm-slide-header {
    top: 70px;
    right: 70px;
    left: 70px;
    color: #1a1a1a;
    font-size: 52px;
    font-weight: 800;
}

.cm-slide[data-theme="orange-clean"] .cm-slide-box {
    top: 340px;
    right: 90px;
    left: 90px;
    background: #fff;
    border: 10px solid #e67e22;
    border-radius: 28px;
    padding: 40px 48px;
    min-height: 180px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.cm-slide[data-theme="orange-clean"] .cm-slide-content {
    font-size: 34px;
    color: #333;
}

.cm-slide[data-theme="orange-clean"] .cm-slide-image-wrap {
    bottom: 100px;
    right: 90px;
    left: 90px;
    height: 300px;
    border-radius: 20px;
}

.cm-slide[data-theme="orange-clean"] .cm-slide-number {
    color: #e67e22;
}

/* ========== THEME: DARK BLUE ========== */
.cm-slide[data-theme="dark-blue"] {
    background: #0f172a;
}

.cm-slide[data-theme="dark-blue"] .cm-slide-header {
    top: 70px;
    right: 70px;
    left: 70px;
    color: #f8fafc;
    font-size: 52px;
    font-weight: 800;
}

.cm-slide[data-theme="dark-blue"] .cm-slide-box {
    top: 340px;
    right: 90px;
    left: 90px;
    background: #1e293b;
    border: 10px solid #3b82f6;
    border-radius: 28px;
    padding: 40px 48px;
    min-height: 180px;
}

.cm-slide[data-theme="dark-blue"] .cm-slide-content {
    font-size: 34px;
    color: #e2e8f0;
}

.cm-slide[data-theme="dark-blue"] .cm-slide-image-wrap {
    bottom: 100px;
    right: 90px;
    left: 90px;
    height: 300px;
    border-radius: 20px;
}

.cm-slide[data-theme="dark-blue"] .cm-slide-number {
    color: #60a5fa;
}

/* ========== THEME: CREATOR BLUEPRINT ========== */
.cm-slide[data-theme="creator-blueprint"] {
    background: #edf4f7;
    background-image: radial-gradient(circle at 8% 8%, rgba(80,190,188,.22) 0 75px, transparent 76px), radial-gradient(circle at 92% 92%, rgba(80,190,188,.16) 0 90px, transparent 91px);
}
.cm-slide[data-theme="creator-blueprint"] .cm-slide-header {
    top: 58px; right: 70px; left: 70px; color: #07151d; font-size: 52px; font-weight: 900;
}
.cm-slide[data-theme="creator-blueprint"] .cm-slide-box {
    top: 190px; right: 82px; left: 82px; bottom: 72px; min-height: 0; padding: 430px 54px 70px; background: #1f6b7a; color: #fff; border-radius: 0; box-shadow: 0 16px 28px rgba(22,58,68,.22);
}
.cm-slide[data-theme="creator-blueprint"] .cm-slide-content { font-size: 35px; line-height: 1.45; color: #fff; font-weight: 700; }
.cm-slide[data-theme="creator-blueprint"] .cm-slide-image-wrap { top: 245px; right: 142px; left: 142px; height: 330px; border-radius: 18px; z-index: 5; background: rgba(255,255,255,.16); box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.cm-slide[data-theme="creator-blueprint"] .cm-slide-image-wrap { overflow: hidden !important; }
.cm-slide[data-theme="creator-blueprint"] .cm-slide-number { color: #1f6b7a; }
.cm-slide[data-theme="creator-hook"], .cm-slide[data-theme="creator-engage"], .cm-slide[data-theme="creator-educate"], .cm-slide[data-theme="creator-inspire"] { background: #edf4f7; background-image: radial-gradient(circle at 8% 8%, rgba(80,190,188,.22) 0 75px, transparent 76px), radial-gradient(circle at 92% 92%, rgba(80,190,188,.16) 0 90px, transparent 91px); }
.cm-slide[data-theme="creator-hook"] .cm-slide-header, .cm-slide[data-theme="creator-engage"] .cm-slide-header, .cm-slide[data-theme="creator-educate"] .cm-slide-header, .cm-slide[data-theme="creator-inspire"] .cm-slide-header { top: 58px; right: 70px; left: 70px; color: #07151d; font-size: 52px; font-weight: 900; }
.cm-slide[data-theme="creator-inspire"] .cm-slide-header { color: #07151d; }
.cm-slide[data-theme="creator-hook"] .cm-slide-box, .cm-slide[data-theme="creator-engage"] .cm-slide-box, .cm-slide[data-theme="creator-educate"] .cm-slide-box, .cm-slide[data-theme="creator-inspire"] .cm-slide-box { top: 190px; right: 82px; left: 82px; bottom: 72px; min-height: 0; padding: 430px 54px 70px; border-radius: 0; box-shadow: 0 16px 28px rgba(22,58,68,.22); }
.cm-slide[data-theme="creator-hook"] .cm-slide-box { background: #1f6b7a; color: #fff; }
.cm-slide[data-theme="creator-engage"] .cm-slide-box { background: #a9dceb; color: #07151d; }
.cm-slide[data-theme="creator-educate"] .cm-slide-box { background: #f79a88; color: #07151d; }
.cm-slide[data-theme="creator-inspire"] .cm-slide-box { background: #7b35a8; color: #fff; }
.cm-slide[data-theme="creator-hook"] .cm-slide-content, .cm-slide[data-theme="creator-inspire"] .cm-slide-content { color: #fff; }
.cm-slide[data-theme="creator-engage"] .cm-slide-content, .cm-slide[data-theme="creator-educate"] .cm-slide-content { color: #07151d; }
.cm-slide[data-theme="creator-hook"] .cm-slide-image-wrap, .cm-slide[data-theme="creator-engage"] .cm-slide-image-wrap, .cm-slide[data-theme="creator-educate"] .cm-slide-image-wrap, .cm-slide[data-theme="creator-inspire"] .cm-slide-image-wrap { top: 245px; right: 142px; left: 142px; height: 330px; border-radius: 18px; z-index: 5; overflow: hidden !important; }

/* ========== NEW SPECIALIZED LAYOUTS (screenshot-matched) ========== */

/* Motivation Dark – tips layout: number circle + text left + image right */
.cm-slide[data-theme="motivation-dark"] {
    background: #0a0a0a;
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(255,214,0,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(255,214,0,0.03) 0%, transparent 40%);
}
.cm-slide[data-theme="motivation-dark"] .cm-slide-header {
    top: 50px; right: 60px; left: 160px;
    color: #FFD600; font-size: 52px; font-weight: 900; text-align: right;
    line-height: 1.3;
}
.cm-slide[data-theme="motivation-dark"] .cm-slide-box {
    top: 200px; right: 460px; left: 60px; bottom: 80px;
    background: transparent; padding: 0; min-height: 0; height: auto;
    align-items: flex-start; justify-content: flex-start; text-align: right;
}
.cm-slide[data-theme="motivation-dark"] .cm-slide-content {
    font-size: 42px; color: #ffffff; font-weight: 700; line-height: 1.55;
}
.cm-slide[data-theme="motivation-dark"] .cm-slide-image-wrap {
    top: 180px; right: 50px; left: auto; bottom: 60px; width: 400px; height: auto;
    border-radius: 24px;
}
.cm-slide[data-theme="motivation-dark"] .cm-slide-image-wrap img { object-fit: cover; object-position: center top; }
.cm-slide[data-theme="motivation-dark"] .cm-slide-number {
    top: 45px; left: 45px; bottom: auto; width: 90px; height: 90px;
    border-radius: 50%; background: #FFD600; color: #0a0a0a;
    font-size: 36px; font-weight: 900; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(255,214,0,0.35);
}

/* Nexora Lime – agency layout */
.cm-slide[data-theme="nexora-lime"] {
    background: #0d0d0d;
    background-image:
        radial-gradient(ellipse at 25% 15%, rgba(200,255,0,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 85%, rgba(200,255,0,0.03) 0%, transparent 40%);
}
.cm-slide[data-theme="nexora-lime"] .cm-slide-header {
    top: 60px; right: 70px; left: 70px;
    color: #c8ff00; font-size: 58px; font-weight: 900; text-align: center;
}
.cm-slide[data-theme="nexora-lime"] .cm-slide-box {
    top: 220px; right: 70px; left: 70px;
    background: transparent; padding: 0; min-height: 120px;
}
.cm-slide[data-theme="nexora-lime"] .cm-slide-content {
    font-size: 30px; color: #ffffff; font-weight: 600;
}
.cm-slide[data-theme="nexora-lime"] .cm-slide-image-wrap {
    bottom: 80px; right: 80px; left: 80px; top: auto; height: 520px;
    border-radius: 20px;
}
.cm-slide[data-theme="nexora-lime"] .cm-slide-image-wrap img { object-fit: cover; }
.cm-slide[data-theme="nexora-lime"] .cm-slide-number {
    bottom: 40px; left: 50px; font-size: 24px; opacity: 0.7; color: #c8ff00;
}

/* Netroots Blue – digital layout */
.cm-slide[data-theme="netroots-blue"] {
    background: #0b5fff;
}
.cm-slide[data-theme="netroots-blue"] .cm-slide-header {
    top: 70px; right: 70px; left: 70px;
    color: #ffffff; font-size: 52px; font-weight: 800; text-align: center;
}
.cm-slide[data-theme="netroots-blue"] .cm-slide-box {
    top: 300px; right: 80px; left: 80px;
    background: #ffffff;
    border: 8px solid #00d4ff;
    border-radius: 24px;
    padding: 36px 40px;
    min-height: 160px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.cm-slide[data-theme="netroots-blue"] .cm-slide-content {
    font-size: 32px; color: #0a2540;
}
.cm-slide[data-theme="netroots-blue"] .cm-slide-image-wrap {
    bottom: 90px; right: 100px; left: 100px; height: 340px; border-radius: 18px;
}
.cm-slide[data-theme="netroots-blue"] .cm-slide-number { color: #00d4ff; }

/* Academy Express – story layout */
.cm-slide[data-theme="academy-express"] {
    background: #ffffff;
}
.cm-slide[data-theme="academy-express"] .cm-slide-header {
    top: 50px; right: 60px; left: 60px;
    color: #1a1a1a; font-size: 52px; font-weight: 900; text-align: right;
    line-height: 1.3;
}
.cm-slide[data-theme="academy-express"] .cm-slide-box {
    top: 180px; right: 460px; left: 60px; bottom: 90px;
    background: transparent; padding: 0; min-height: 0; height: auto;
    align-items: flex-start; justify-content: flex-start; text-align: right;
}
.cm-slide[data-theme="academy-express"] .cm-slide-content {
    font-size: 40px; color: #1a1a1a; font-weight: 700; line-height: 1.55;
}
.cm-slide[data-theme="academy-express"] .cm-slide-image-wrap {
    top: 160px; right: 50px; left: auto; bottom: 70px; width: 400px; height: auto;
    border-radius: 28px; background: #f0f0f0;
}
.cm-slide[data-theme="academy-express"] .cm-slide-image-wrap img { object-fit: contain; object-position: center bottom; }
.cm-slide[data-theme="academy-express"] .cm-slide-number { color: #ff6b35; font-size: 28px; }

/* Speed Purple – action layout */
.cm-slide[data-theme="speed-purple"] {
    background: #f8fafc;
}
.cm-slide[data-theme="speed-purple"] .cm-slide-header {
    top: 55px; right: 70px; left: 160px;
    color: #1e1b4b; font-size: 48px; font-weight: 800; text-align: right;
}
.cm-slide[data-theme="speed-purple"] .cm-slide-box {
    top: 180px; right: 70px; left: 70px;
    background: transparent; padding: 0; min-height: 140px;
    align-items: flex-start; justify-content: flex-start; text-align: right;
}
.cm-slide[data-theme="speed-purple"] .cm-slide-content {
    font-size: 32px; color: #1e1b4b;
}
.cm-slide[data-theme="speed-purple"] .cm-slide-image-wrap {
    bottom: 60px; right: 70px; left: 70px; top: auto; height: 580px;
    border-radius: 20px;
}
.cm-slide[data-theme="speed-purple"] .cm-slide-image-wrap img { object-fit: cover; }
.cm-slide[data-theme="speed-purple"] .cm-slide-number {
    top: 50px; left: 50px; bottom: auto; font-size: 72px; font-weight: 900;
    color: #7c3aed; opacity: 0.9; line-height: 1;
}

/* Photo Split (Diptych) – one photo across 2 slides */
.cm-slide[data-theme="photo-split"] {
    background: #0a0a0a;
}
.cm-slide[data-theme="photo-split"] .cm-slide-header {
    top: 70px; right: 60px; left: 60px;
    color: #ffffff; font-size: 42px; font-weight: 900; text-align: center;
    text-shadow: 0 4px 20px rgba(0,0,0,0.7); z-index: 5;
}
.cm-slide[data-theme="photo-split"] .cm-slide-box {
    bottom: 100px; top: auto; right: 50px; left: 50px;
    background: rgba(0,0,0,0.55); color: #fff;
    border-radius: 20px; padding: 28px 36px; min-height: 120px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 4;
}
.cm-slide[data-theme="photo-split"] .cm-slide-content {
    font-size: 30px; color: #ffffff; font-weight: 600;
}
.cm-slide[data-theme="photo-split"] .cm-slide-image-wrap {
    top: 0; right: 0; left: 0; bottom: 0; height: auto;
    border-radius: 0; z-index: 1; overflow: hidden;
}
.cm-slide[data-theme="photo-split"] .cm-slide-image-wrap img {
    width: 200%; height: 100%; max-width: none; object-fit: cover;
}
.cm-slide[data-theme="photo-split"] .cm-slide-number {
    top: 40px; left: 40px; bottom: auto; font-size: 22px; font-weight: 800;
    color: #ffffff; opacity: 0.85; text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}

.cm-slide[data-theme="photo-split"] .cm-swipe-hint { color: #ffffff; }

/* Preview actions */
.cm-preview-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

#slide-indicator {
    font-weight: 700;
    font-size: 15px;
    color: #64748b;
    min-width: 60px;
    text-align: center;
}

.cm-edit-form {
    background: #f8fafc;
    border-radius: 14px;
    padding: 24px;
}

.cm-field { margin-bottom: 18px; }

.cm-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.cm-field textarea,
.cm-field input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    direction: rtl;
    resize: vertical;
}

.cm-field textarea:focus,
.cm-field input:focus {
    outline: none;
    border-color: #e67e22;
}

.cm-image-search { display: flex; gap: 8px; }
.cm-image-search input { flex: 1; }

.cm-image-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0;
    max-height: 220px;
    overflow-y: auto;
}

.cm-image-results img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.15s;
}

.cm-image-results img:hover,
.cm-image-results img.selected {
    border-color: #e67e22;
}

.cm-current-image {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cm-current-image img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

#current-attribution {
    font-size: 12px;
    color: #94a3b8;
}

.cm-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.cm-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #fed7aa;
    border-top-color: #e67e22;
    border-radius: 50%;
    animation: cm-spin 0.8s linear infinite;
}

@keyframes cm-spin {
    to { transform: rotate(360deg); }
}

#loading-text {
    margin-top: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #9a3412;
}

/* ========== Frontend-specific overrides ========== */
.cm-front {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 60px;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    direction: rtl;
}

.cm-front-header {
    text-align: center;
    margin-bottom: 32px;
}

.cm-front-header h1 {
    font-size: 36px;
    font-weight: 900;
    margin: 0 0 8px;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cm-front-header p {
    color: #64748b;
    font-size: 16px;
    margin: 0;
}

.cm-front-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

.cm-mode-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.cm-mode-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.cm-mode-btn.active {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
}

.cm-ai-toggle {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #065f46;
}

.cm-ai-toggle input {
    margin-left: 8px;
    transform: scale(1.2);
}

.cm-ai-notice {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #9a3412;
}

.cm-front-textarea {
    width: 100%;
    min-height: 240px;
    padding: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.7;
    resize: vertical;
    direction: rtl;
}

.cm-front-textarea:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230,126,34,0.15);
}

.cm-front-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0;
}

.cm-ctrl label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
}

.cm-ctrl select {
    min-width: 160px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
}

.cm-front-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.cm-front-btn.primary {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: #fff;
    box-shadow: 0 6px 20px rgba(230,126,34,0.35);
    width: 100%;
    margin-top: 8px;
}

.cm-front-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(230,126,34,0.45);
}

.cm-front-btn.secondary {
    background: #f1f5f9;
    color: #334155;
}

.cm-front-btn.secondary:hover {
    background: #e2e8f0;
}

.cm-front-editor {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .cm-front-editor { grid-template-columns: 1fr; }
}

.cm-slide-frame {
    width: 400px;
    height: 400px;
    margin: 0 auto;
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
    border-radius: 12px;
    overflow: hidden;
}

.cm-slide {
    transform: scale(0.3704); /* 400/1080 */
    transform-origin: top right;
}

.cm-nav-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.cm-edit-col .cm-field {
    margin-bottom: 14px;
}

.cm-edit-col label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.cm-edit-col textarea,
.cm-edit-col input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    direction: rtl;
}

.cm-search-row {
    display: flex;
    gap: 8px;
}

.cm-search-row input { flex: 1; }

.cm-front-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.cm-front-loading {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.cm-front-loading .cm-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid #fed7aa;
    border-top-color: #e67e22;
    border-radius: 50%;
    animation: cm-spin 0.8s linear infinite;
}

/* ========== Swipe arrow hint ========== */
.cm-swipe-hint {
    position: absolute;
    bottom: 36px;
    right: 50px;
    z-index: 7;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: 22px;
    opacity: 0.85;
    animation: cm-pulse 1.6s ease-in-out infinite;
}

.cm-swipe-arrow {
    font-size: 28px;
    line-height: 1;
}

.cm-swipe-text {
    font-size: 18px;
    letter-spacing: 0.5px;
}

@keyframes cm-pulse {
    0%, 100% { opacity: 0.55; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(6px); }
}

/* Hide swipe on last slide via JS */
.cm-slide.is-last .cm-swipe-hint {
    display: none;
}

/* Full-image policy: theme-specific crop rules must not cut off selected art. */
.cm-slide-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center center;
    display: block;
    background: rgba(0, 0, 0, 0.08);
}

.cm-slide-image-wrap {
    overflow: visible !important;
}

.cm-slide[data-theme="burn-hole"] .cm-slide-image-wrap {
    overflow: hidden !important;
    border-radius: 50%;
}

.cm-slide[data-theme="burn-hole"] .cm-slide-image-wrap img {
    clip-path: circle(50% at 50% 50%);
}

/* Theme-aware swipe colors */
.cm-slide[data-theme="torn-paper"] .cm-swipe-hint { color: rgba(255,255,255,0.85); }
.cm-slide[data-theme="solid-bold"] .cm-swipe-hint { color: rgba(0,0,0,0.55); }
.cm-slide[data-theme="burn-hole"] .cm-swipe-hint { color: #FFD600; }
.cm-slide[data-theme="dark-stick"] .cm-swipe-hint { color: #FFD600; }
.cm-slide[data-theme="teal-power"] .cm-swipe-hint { color: #FFD600; }
.cm-slide[data-theme="yellow-box"] .cm-swipe-hint { color: #FFD600; }
.cm-slide[data-theme="orange-clean"] .cm-swipe-hint { color: #e67e22; }
.cm-slide[data-theme="dark-blue"] .cm-swipe-hint { color: #60a5fa; }
.cm-slide[data-theme="motivation-dark"] .cm-swipe-hint { color: #FFD600; }
.cm-slide[data-theme="nexora-lime"] .cm-swipe-hint { color: #c8ff00; }
.cm-slide[data-theme="netroots-blue"] .cm-swipe-hint { color: #00d4ff; }
.cm-slide[data-theme="academy-express"] .cm-swipe-hint { color: #ff6b35; }
.cm-slide[data-theme="speed-purple"] .cm-swipe-hint { color: #7c3aed; }

/* Rich text inside content */
.cm-slide-content strong,
.cm-slide-content b {
    font-weight: 900;
}

.cm-hl-yellow { color: #FFD600; font-weight: 800; }
.cm-hl-orange { color: #f97316; font-weight: 800; }
.cm-hl-green  { color: #22c55e; font-weight: 800; }
.cm-hl-blue   { color: #3b82f6; font-weight: 800; }
.cm-hl-red    { color: #ef4444; font-weight: 800; }

.cm-slide-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.cm-slide-content ul li {
    position: relative;
    padding-right: 28px;
    margin-bottom: 10px;
}

.cm-slide-content ul li::before {
    content: '•';
    position: absolute;
    right: 0;
    font-weight: 900;
    font-size: 1.2em;
}

/* Direction for Arabic content detection */
.cm-slide.is-rtl {
    direction: rtl;
}
.cm-slide.is-ltr {
    direction: ltr;
}
.cm-slide.is-ltr .cm-slide-content ul {
    text-align: left;
}
.cm-slide.is-ltr .cm-slide-content ul li {
    padding-right: 0;
    padding-left: 28px;
}
.cm-slide.is-ltr .cm-slide-content ul li::before {
    right: auto;
    left: 0;
}

.cm-upload-row { display:flex; gap:8px; align-items:center; }


/* Extra media buttons */
.cm-extra-search {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cm-extra-search .cm-front-btn {
    flex: 1;
    min-width: 110px;
    padding: 10px 12px;
    font-size: 13px;
}

/* Texture overlays on slides */
.cm-slide.cm-bg-custom {
    background-size: cover !important;
    background-repeat: no-repeat !important;
}
.cm-slide[data-texture="noise-dark"] {
    background-image:
        radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px) !important;
    background-size: 4px 4px, 7px 7px !important;
    background-position: 0 0, 2px 2px !important;
}
.cm-slide[data-texture="paper"] {
    background-image:
        repeating-linear-gradient(0deg, rgba(0,0,0,0.03) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(0,0,0,0.02) 0 1px, transparent 1px 4px) !important;
}
.cm-slide[data-texture="carbon"] {
    background-image:
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%),
        linear-gradient(-45deg, #0a0a0a 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #0a0a0a 75%),
        linear-gradient(-45deg, transparent 75%, #121212 75%) !important;
    background-size: 12px 12px !important;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0 !important;
}

/* Rich text bullets & highlights */
.cm-slide-content ul.cm-bullets,
.cm-slide-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: right;
    width: 100%;
}
.cm-slide-content ul.cm-bullets li,
.cm-slide-content ul li {
    position: relative;
    padding: 6px 0;
    padding-right: 28px;
    font-weight: 700;
    line-height: 1.4;
}
.cm-slide-content ul.cm-bullets li::before,
.cm-slide-content ul li::before {
    content: '•';
    position: absolute;
    right: 0;
    top: 6px;
    font-weight: 900;
    font-size: 1.15em;
}
.cm-slide-content strong { font-weight: 900; }
.cm-hl-yellow { color: #FFD600; background: rgba(0,0,0,0.15); padding: 0 4px; border-radius: 4px; }
.cm-hl-orange { color: #ff8c00; }
.cm-hl-green { color: #22c55e; }
.cm-hl-blue { color: #3b82f6; }
.cm-hl-red { color: #ef4444; }

.cm-slide[data-theme="burn-hole"] .cm-slide-content ul li,
.cm-slide[data-theme="yellow-box"] .cm-slide-content ul li {
    padding: 8px 0;
    padding-right: 32px;
    font-size: 0.95em;
}


/* ============================================================
   Per-slide typography / gradient controls
   ============================================================ */
.cm-style-panel {
    margin-top: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
    padding: 18px;
    box-shadow: 0 8px 26px rgba(15,23,42,.07);
}
.cm-style-panel-title { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.cm-style-panel-title strong { font-size:16px; color:#0f172a; }
.cm-style-panel-title span { font-size:12px; color:#64748b; }
.cm-style-section { border-top:1px solid #e5e7eb; padding-top:15px; margin-top:15px; }
.cm-style-section:first-of-type { border-top:0; padding-top:0; margin-top:0; }
.cm-style-section-title { font-weight:800; font-size:13px; color:#334155; margin-bottom:10px; }
.cm-style-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:10px; }
.cm-style-control { display:block; min-width:0; }
.cm-style-control > span { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:11px; font-weight:700; color:#64748b; margin-bottom:5px; }
.cm-style-select, .cm-color-row input[type=text], .cm-gradient-row select {
    width:100%; min-height:36px; border:1px solid #dbe2ea; border-radius:8px; background:#fff; padding:7px 9px; font-size:12px;
}
.cm-range-control input[type=range] { width:100%; accent-color:#e67e22; }
.cm-range-control output { font-weight:800; color:#e67e22; }
.cm-color-row { display:grid; grid-template-columns:42px 1fr; gap:7px; }
.cm-color-row input[type=color], .cm-gradient-row input[type=color] { width:42px; height:36px; padding:2px; border:1px solid #dbe2ea; border-radius:8px; background:#fff; cursor:pointer; }
.cm-gradient-row { display:grid; grid-template-columns:minmax(120px,1fr) 42px 42px minmax(100px,1fr); gap:7px; align-items:center; margin-top:8px; }
.cm-gradient-row label { font-size:11px; font-weight:700; color:#475569; }
.cm-gradient-row select { min-height:36px; }
.cm-palette { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.cm-palette button { width:31px; height:31px; padding:0; border:2px solid #fff; border-radius:50%; cursor:pointer; box-shadow:0 0 0 1px #cbd5e1; }
.cm-palette button:nth-child(1){background:linear-gradient(135deg,#111,#FFD600)}
.cm-palette button:nth-child(2){background:linear-gradient(135deg,#0f172a,#3b82f6)}
.cm-palette button:nth-child(3){background:linear-gradient(135deg,#7f1d1d,#f97316)}
.cm-palette button:nth-child(4){background:linear-gradient(135deg,#064e3b,#10b981)}
.cm-palette button:nth-child(5){background:linear-gradient(135deg,#4c1d95,#ec4899)}
.cm-palette button:nth-child(6){background:linear-gradient(135deg,#0e7490,#22d3ee)}
.cm-palette button:nth-child(7){background:linear-gradient(135deg,#111827,#6b7280)}
.cm-palette button:nth-child(8){background:linear-gradient(135deg,#fff7ed,#fb923c)}
.cm-style-upload { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.cm-style-upload > div { flex:1; min-width:180px; }
.cm-style-upload strong { display:block; font-size:13px; }
.cm-style-upload small { display:block; color:#64748b; font-size:10px; line-height:1.4; margin-top:3px; }
#cm-font-name { font-size:11px; color:#16a34a; max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media(max-width:700px){ .cm-style-grid{grid-template-columns:1fr}.cm-gradient-row{grid-template-columns:1fr 42px 42px 1fr}.cm-style-panel{padding:13px} }


/* Smart whole-carousel optimizer */
#btn-smart-optimize { min-width: 190px; font-weight: 800; }
#btn-smart-optimize:disabled { opacity: .65; cursor: wait; }
