﻿:root {
    --sermon-pane-width: 620px;
    --sermon-accent: #29b6f6;
    --sermon-bg: rgba(7, 14, 24, 0.92);
    --sermon-panel: rgba(250, 250, 252, 0.98);
    --sermon-border: rgba(15, 23, 42, 0.12);
    --sermon-muted: #667085;
    --sermon-text: #111827;
}

.app {
    --sermon-pane-width-local: var(--sermon-pane-width);
}

.content {
    position: relative;
}

.sermonDock {
    position: fixed;
    left: 18px;
    top: 120px;
    transform: none;
    z-index: 999999;
    pointer-events: none;
    opacity: 1;
}

.sermonDockBtn {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: rgba(8,17,29,.32) !important;
    color: #eeebebbf;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

    .sermonDockBtn:hover {
        filter: brightness(.98);
    }

    .sermonDockBtn:active {
        transform: scale(.97);
    }

.app.sermon-open .sermonDockBtn {
    background: rgba(255,255,255,0.12);
}
.sermonLaunchBtn .sermonLaunchGlyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 1;
}


.sermonLaunchBtn.active {
    border-color: rgba(0, 172, 193, .75);
    box-shadow: 0 0 0 2px rgba(0, 172, 193, .18) inset;
}

.sermonDivider {
    cursor: col-resize;
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    position: relative;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    background: linear-gradient(180deg, #02111d 0%, #041b2d 50%, #02111d 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
    z-index: 2;
}

.sermonDividerModeBtn {
    position: relative;
    width: 45px;
    height: 28px;
    margin: 8px auto 6px;
    border-radius: 6px;
    border: 1px solid rgba(120, 220, 255, 0.45);
    background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
    color: #dff7ff;
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    pointer-events: auto;
    z-index: 5;
}

    .sermonDividerModeBtn:hover {
        filter: brightness(1.06);
    }

.sermonDividerGrip {
    cursor: col-resize;
    position: absolute;
    left: 50%;
    top: 52%;
    width: 6px;
    height: 20%;
    transform: translate(-50%, -50%);
    border-radius: 99px;
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.38), rgba(255,255,255,.10));
    opacity: .65;
    pointer-events: none;
}

.sermonVerseRangeBox {
    border: 1px solid rgba(120, 220, 255, 0.45);
    border-radius: 8px;
    background-color: #1f2b36;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 45px;
    padding: 6px 6px 14px;
}


.sermonDividerLabel {
    font-size: 7px;
    font-weight: 500;
    color: #7ee7ff;
    letter-spacing: .1px;
    text-align: center;
    margin-bottom: 2px;
}

.sermonDividerSelect {
    width: 35px;
    min-width: 35px;
    max-width: 35px;
    height: 25px;
    padding: 0 2px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.14);
    background: linear-gradient(180deg, #f9fafb, #e5e7eb);
    color: #0f172a;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    text-align-last: center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0,0,0,.16);
    margin-top: -10px;
}

.sermonInsertBtn {
    position: relative;
    z-index: 3;
    width: 35px;
    height: 46px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.16);
    color: #fff;
    background: linear-gradient(180deg, #11bdf5, #0284c7);
    box-shadow: 0 8px 18px rgba(2, 132, 199, 0.34);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.app.sermon-open.sermon-divider-half .bookBG {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.app.sermon-open.sermon-divider-editor-only .bookBG {
    display: none !important;
}

.app.sermon-open.sermon-divider-editor-only .sermonDivider {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
}

.app.sermon-open.sermon-divider-editor-only .sermonPane {
    width: calc(100vw - 56px);
    max-width: none;
}

.app.sermon-open.sermon-divider-editor-only .sermonEditorShell {
    padding: 10px 14px;
}

.sermonPane {
    display: none;
    width: var(--sermon-pane-width-local);
    flex-direction: column;
    min-width: 0;
    height: 100%;
    min-height: 0;
    background: var(--sermon-panel);
    color: var(--sermon-text);
    border-left: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: -18px 0 32px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    z-index: 4;
    align-self: stretch;
    margin-left: auto;
    flex: 0 0 auto;
    position: relative;
    right: 0;
}

.sermonTabs {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sermonTabs::-webkit-scrollbar,
.sermonToolbar::-webkit-scrollbar,
.sermonFooterActions::-webkit-scrollbar,
.sermonPaneHeadActions::-webkit-scrollbar {
    display: none;
}

.sermonTab {
    flex: 0 0 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
    padding: 10px 14px;
    border-radius: 10px 10px 0 0;
    border: 1px solid transparent;
    background: #e5e7eb;
    color: #111827;
    overflow: hidden;
}

.sermonTab.active {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.2);
    box-shadow: inset 0 -3px 0 rgba(14,165,233,.9);
}

.sermonTabLabel {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
}

.sermonTabDot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f97316;
    flex: 0 0 auto;
}

.sermonTabClose {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 16px;
    font-weight: 700;
    opacity: .72;
}

.sermonPaneHeadActions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sermonPane > .sermonPaneHead,
.sermonPane > .sermonToolbarWrap,
.sermonPane > .sermonFindBar,
.sermonPane > .sermonFooter {
    min-height: 0;
}

.sermonHeadBtn {
    height: 38px;
    min-width: 38px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    color: #0f172a;
    font-weight: 800;
}

.sermonInsertMobile {
    display: none;
    color: #fff;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.98), rgba(2, 132, 199, 0.98));
}

.sermonToolbarWrap {
    display: flex;
    flex-direction: column;
    background: #f3f4f6;
    border-bottom: 1px solid var(--sermon-border);
}

.sermonToolbarRow {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

    .sermonToolbarRow::-webkit-scrollbar {
        display: none;
    }

.sermonToolbarRowTop {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.sermonToolbarRowBottom {
    border-bottom: 0;
}

.sermonToolbarGroup {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding-right: 10px;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
}

    .sermonToolbarGroup:last-child {
        border-right: 0;
        padding-right: 0;
    }

.sermonToolBtn,
.sermonSelect,
.sermonFindBtn,
.sermonActionBtn {
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    color: #111827;
    flex: 0 0 auto;
}

.sermonToolBtn {
    min-width: 38px;
    padding: 0 9px;
    font-weight: 700;
}

.sermonSelect {
    min-width: 0;
    padding: 0 10px;
    flex: 0 0 auto;
}

.sermonSelectStyle {
    width: 96px;
    min-width: 96px;
}

.sermonSelectFont {
    width: 128px;
    min-width: 128px;
}

.sermonSelectSize {
    width: 82px;
    min-width: 82px;
}

.sermonSelectLine {
    width: 68px;
    min-width: 68px;
}

.sermonColorWrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    overflow: hidden;
    flex: 0 0 auto;
}

    .sermonColorWrap input {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
    }

.sermonColorGlyph {
    padding-bottom: 3px;
    position: relative;
    z-index: 1;
    font-size: 23px;
    font-weight: 600;
    line-height: 1;
    color: #111827;
    transform: translateY(-3px);
}

.sermonHiliteGlyph {
    position: relative;
    z-index: 1;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    color: #111827;
    transform: translateY(-4px);
    letter-spacing: -1px;
}

.sermonPageGlyph {
    position: relative;
    z-index: 1;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    color: #111827;
    transform: translateY(-4px);
}

.sermonColorChip {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 5px;
    height: 6px;
    border-radius: 4px;
    background: #111827;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

.sermonColorWrapHilite::before {
    content: '';
    position: absolute;
    z-index: 1;
    width: 16px;
    height: 6px;
    border-radius: 3px;
    background: #6b7280;
    right: 6px;
    top: 12px;
    transform: rotate(-42deg);
    opacity: .95;
}



.sermonEditorSurface {
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
    padding: 22px 24px 36px;
}

.sermonEditor {
    min-height: 100%;
    width: 100%;
    padding-bottom: 8px;
    color: #111827;
    outline: none;
    line-height: 1.6;
    font-size: 16px;
    font-family: Arial, Helvetica, sans-serif;
    overflow-wrap: anywhere;
}

.sermonEditor h1,
.sermonEditor h2,
.sermonEditor h3 {
    margin-top: 0;
    color: #0f172a;
}

.sermonEditor h1 { font-size: 28px; }
.sermonEditor h2 { font-size: 22px; }
.sermonEditor h3 { font-size: 18px; }

.sermonEditor p,
.sermonEditor li,
.sermonEditor blockquote {
    color: #111827;
}

.sermonVerseBlock {
    margin: 16px 0;
    padding: 14px 16px;
    border-left: 4px solid rgba(14, 165, 233, 0.95);
    border-radius: 14px;
    background: rgba(226, 244, 255, 0.8);
}

.sermonVerseBlockRef {
    margin-bottom: 10px;
    color: #0f172a;
    font-weight: 800;
}

.sermonVerseLine {
    margin-bottom: 8px;
}

.sermonVerseLine sup {
    margin-right: 6px;
    color: #0f766e;
    font-weight: 800;
}

.sermonPresenterExit {
    position: absolute;
    right: 28px;
    top: 24px;
    z-index: 3;
    display: none;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    box-shadow: 0 12px 26px rgba(0,0,0,.25);
}

.sermonFindCloseBtn {
    flex: 0 0 auto;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    color: #111827;
    font-weight: 800;
    cursor: pointer;
}

.sermonFindInput {
    flex: 1 1 auto;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
}

.sermonFindBtn {
    min-width: 38px;
    padding: 0 12px;
}

.sermonFindCount {
    flex: 0 0 auto;
    min-width: 48px;
    text-align: center;
    font-size: 13px;
    color: var(--sermon-muted);
    font-weight: 700;
}

.sermonFooter {
    flex: 0 0 auto;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-top: 1px solid var(--sermon-border);
    position: relative;
    z-index: 5;
}

.sermonFooterMeta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--sermon-muted);
    font-size: 12px;
}

.sermonFooterActions {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: visible;
}

.sermonActionBtn {
    flex: 0 0 auto;
    padding: 0 12px;
    font-weight: 700;
}

.sermonPrimary {
    color: #fff;
    background: #111827;
}

.app.sermon-open .sermonDivider {
    display: flex;
}

.app.sermon-open .sermonPane {
    display: grid;
}

.app.sermon-open .sermonDockBtn {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
}

.app.sermon-open:not(.sermon-mobile-active) .bookBG {
    flex: 1 1 auto;
    min-width: 0;
}

.app.sermon-open.sermon-mobile-active .bookBG {
    display: none;
}

.app.sermon-open.sermon-mobile-active .sermonDock {
    top: auto;
    bottom: 74px;
    transform: none;
}

.app.sermon-open.sermon-mobile-active .sermonPane {
    position: fixed;
    left: 56px;
    right: 0;
    top: calc(var(--titlebarH) + var(--toolbarH));
    bottom: 0;
    width: auto;
    max-width: none;
    height: auto;
    min-height: 0;
    box-shadow: none;
    z-index: 99990;
}



.app.sermon-open.sermon-mobile-active #hint {
    display: none !important;
}

.app.sermon-presenter-mode .sermonToolbar,
.app.sermon-presenter-mode .sermonFindBar,
.app.sermon-presenter-mode .sermonFooter,
.app.sermon-presenter-mode .sermonPaneHead {
    display: none;
}

.app.sermon-presenter-mode .sermonPresenterExit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app.sermon-presenter-mode .sermonEditorShell {
    padding: 0;
    background: #0b1220;
}

.app.sermon-presenter-mode .sermonEditorSurface {
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, #0b1220, #0f172a) !important;
    box-shadow: none;
    padding: 84px 56px 56px;
}

.app.sermon-presenter-mode .sermonEditor {
    color: #f8fafc;
    font-size: 26px !important;
    line-height: 1.8 !important;
}

.app.sermon-presenter-mode .sermonEditor h1,
.app.sermon-presenter-mode .sermonEditor h2,
.app.sermon-presenter-mode .sermonEditor h3,
.app.sermon-presenter-mode .sermonEditor p,
.app.sermon-presenter-mode .sermonEditor li,
.app.sermon-presenter-mode .sermonVerseBlockRef,
.app.sermon-presenter-mode .sermonVerseLine {
    color: #f8fafc;
}

.app.sermon-presenter-mode .sermonVerseBlock {
    background: rgba(14, 165, 233, 0.18);
    border-left-color: rgba(125, 211, 252, 0.95);
}

body.sermon-resizing {
    cursor: col-resize;
    user-select: none;
}

.sermonModalOverlay {
    z-index: 100020;
}

.sermonSaveModal,
.sermonTemplateModal {
    width: min(760px, calc(100vw - 24px));
}

.sermonSavePreviewText {
    white-space: pre-wrap;
    color: #1f2937;
}

.sermonTemplateList {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 24px 0;
}

.sermonTemplateItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    text-align: left;
}

.sermonTemplateName {
    font-weight: 800;
    color: #111827;
}

.sermonTemplateMeta,
.sermonLibraryExcerpt {
    color: var(--sermon-muted);
    font-size: 12px;
}

.sermonLibraryPanel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sermonLibraryItem {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.sermonLibrarySearch {
    flex: 0 0 auto !important;
    width: calc(100% - 8px);
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    margin: 0 4px 8px;
    padding: 0 14px;
    line-height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: #fff;
    outline: none;
    box-sizing: border-box;
}
    .sermonLibraryPanel .favInput,
    .studyPanel .sermonLibrarySearch,
    .sermonLibrarySearch.favInput {
        flex: 0 0 auto !important;
        height: 46px !important;
        min-height: 46px !important;
        max-height: 46px !important;
    }

    .sermonLibrarySearch::placeholder {
        color: rgba(255,255,255,.72);
        opacity: 1;
    }

    .sermonLibrarySearch:focus {
        border-color: rgba(90, 200, 250, .9);
        box-shadow: 0 0 0 2px rgba(90, 200, 250, .18);
    }

.sermonLibraryItem .studyTitleRefs,
.sermonLibraryItem .sermonLibraryExcerpt {
    text-align: left;
}

@media (max-width: 600px) {
    .sermonLibrarySearch {
        height: 42px;
        min-height: 42px;
        max-height: 42px;
        line-height: 42px;
        padding: 0 12px;
        border-radius: 10px;
    }
}

@media (max-width: 1280px) {
    .sermonSelectStyle {
        width: 90px;
        min-width: 90px;
    }

    .sermonSelectFont {
        width: 118px;
        min-width: 118px;
    }

    .sermonSelectSize {
        width: 78px;
        min-width: 78px;
    }

    .sermonSelectLine {
        width: 64px;
        min-width: 64px;
    }
}

@media (max-width: 700px) {
    .sermonToolbarRow {
        padding: 7px 8px;
        gap: 6px;
    }

    .sermonToolBtn,
    .sermonSelect,
    .sermonColorWrap {
        height: 36px;
    }
}

@media (max-width: 1024px) {
    .sermonInsertMobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sermonPaneHead,
    .sermonToolbar,
    .sermonFindBar,
    .sermonFooter {
        padding-left: 10px;
        padding-right: 10px;
    }

    .sermonEditorShell {
        padding: 10px;
    }

    .sermonEditorSurface {
        padding: 18px 16px 28px;
        border-radius: 14px;
    }

    .sermonFooter {
        flex-direction: column;
        align-items: stretch;
    }

    .sermonFooterActions {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .sermonDock {
        left: 10px;
        top: auto;
        bottom: 84px;
        right: auto;
        transform: none;
        opacity: 1 !important;
    }

    .sermonDockBtn {
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 50%;
        font-size: 20px;
    }

    .sermonPaneHead {
        gap: 8px;
    }

    .sermonTabsBar {
        min-width: 0;
        gap: 6px;
    }

    .sermonTab {
        max-width: 160px;
        padding: 9px 10px;
    }

    
    .sermonTabAddBtn,
    .sermonHeadBtn {
        width: 38px;
        min-width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .sermonToolBtn,
    .sermonSelect,
    .sermonFindBtn,
    .sermonActionBtn,
    .sermonHeadBtn,
    .sermonColorWrap {
        height: 36px;
        border-radius: 9px;
    }

    .sermonToolBtn {
        min-width: 36px;
        padding: 0 8px;
    }

    .sermonActionBtn {
        padding: 0 10px;
    }

    .sermonSelectStyle {
        width: 86px;
        min-width: 86px;
    }

    .sermonSelectFont {
        width: 108px;
        min-width: 108px;
    }

    .sermonSelectSize {
        width: 72px;
        min-width: 72px;
    }

    .sermonSelectLine {
        width: 60px;
        min-width: 60px;
    }

    .sermonFindBar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .sermonFindInput {
        flex: 1 1 100%;
        min-width: 0;
    }

    .sermonFindBtn {
        flex: 0 0 44px;
        min-width: 44px;
    }
    .sermonFindCloseBtn {
        flex: 0 0 44px;
        min-width: 44px;
        height: 36px;
    }
    .sermonFindCount {
        margin-left: auto;
    }

    .sermonFooter {
        gap: 10px;
    }

    .sermonFooterActions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sermonMoreMenu {
        right: 0;
        left: auto;
        min-width: 190px;
    }

    .app.sermon-presenter-mode .sermonEditorSurface {
        padding: 72px 18px 30px;
    }

    .app.sermon-presenter-mode .sermonEditor {
        font-size: 22px !important;
    }

}
@media (max-width: 720px) {
    .sermonMiniToolbar {
        padding: 8px 10px;
        border-radius: 16px;
    }

    .sermonMiniBtn,
    .sermonMiniColorWrap {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

        .sermonMiniBtn strong,
        .sermonMiniBtn em,
        .sermonMiniBtn u {
            font-size: 24px;
        }

    .sermonMiniColorGlyph {
        font-size: 22px;
    }

    .sermonMiniHiliteGlyph {
        font-size: 17px;
    }
}
/* ===== Ajustes modal Guardar sermón ===== */
.sermonSaveModal {
    max-height: min(82vh, 720px);
}

    .sermonSaveModal .favSaveBody {
        min-height: 0;
        overflow-y: auto;
    }

    .sermonSaveModal .favInput,
    .sermonSaveModal .favSelect {
        flex: 0 0 auto;
        width: 100%;
    }

#sermonSaveName {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    line-height: 1.2;
}

.sermonSaveModal .favSavePreview {
    flex: 0 0 auto;
    max-height: 170px;
    overflow: auto;
}

.sermonSaveModal .favFooter {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 2;
    border-top: 1px solid rgba(0,0,0,.08);
}
.sermonSavePreviewText {
    display: block;
    color: #1f2937;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
}

    .sermonSavePreviewText p,
    .sermonSavePreviewText h1,
    .sermonSavePreviewText h2,
    .sermonSavePreviewText h3,
    .sermonSavePreviewText h4,
    .sermonSavePreviewText h5,
    .sermonSavePreviewText h6,
    .sermonSavePreviewText blockquote,
    .sermonSavePreviewText ul,
    .sermonSavePreviewText ol {
        margin: 0 0 10px;
    }

    .sermonSavePreviewText ul,
    .sermonSavePreviewText ol {
        padding-left: 22px;
    }

    .sermonSavePreviewText blockquote {
        margin: 8px 0;
        padding: 8px 12px;
        border-left: 4px solid rgba(0, 180, 255, 0.7);
        background: rgba(0, 180, 255, 0.08);
        border-radius: 8px;
    }

    .sermonSavePreviewText .sermonVerseBlock {
        margin: 8px 0;
    }

.sermonPreviewEmpty {
    opacity: .7;
    font-style: italic;
}
.sermonTabsBar {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.sermonTabAddBtn {
    flex: 0 0 auto;
    width: 42px;
    min-width: 42px;
    height: 38px;
    border-radius: 50px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    color: #0f172a;
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}
.sermonTabs {
    --sermon-tab-gap: 6px;
    --sermon-tab-count: 1;
}

    .sermonTabs.has-many .sermonTab {
        flex: 1 1 calc((100% - ((var(--sermon-tab-count) - 1) * var(--sermon-tab-gap))) / var(--sermon-tab-count));
        width: calc((100% - ((var(--sermon-tab-count) - 1) * var(--sermon-tab-gap))) / var(--sermon-tab-count));
        max-width: none;
        min-width: 0;
    }

    .sermonTabs.has-too-many .sermonTab {
        padding-left: 10px;
        padding-right: 10px;
    }

    .sermonTabs.has-too-many 
    .sermonTabs.has-ultra-many .sermonTab {
        min-width: 118px;
    }

    .sermonTabs.has-ultra-many {
        overflow-x: auto;
    }

.sermonToolbar > * {
    flex: 0 0 auto;
}

.sermonToolbarGroup > * {
    flex: 0 0 auto;
}
.sermonMoreWrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    z-index: 80;
}
.sermonMoreMenu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    min-width: 220px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .sermonMoreMenu[hidden] {
        display: none !important;
    }


.sermonMoreItem {
    appearance: none;
    border: 0;
    background: transparent;
    color: #111827;
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    font: inherit;
    cursor: pointer;
}

    .sermonMoreItem:hover,
    .sermonMoreItem:focus {
        background: rgba(37, 99, 235, 0.08);
        outline: none;
    }

@media (max-width: 700px) {
    .sermonMoreMenu {
        left: auto;
        right: 0;
        min-width: 200px;
    }
}
.sermonToolbarRow {
    cursor: grab;
}

    .sermonToolbarRow.is-dragging {
        cursor: grabbing;
    }

.sermonToolBtn,
.sermonSelect,
.sermonColorWrap,
.sermonActionBtn,
.sermonFindBtn {
    cursor: pointer;
}
.sermonLibraryItemWrap {
    position: relative;
}

.sermonLibraryItemMain {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: inherit;
    padding-right: 56px;
}

.sermonLibraryDeleteBtn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: .92;
}

    .sermonLibraryDeleteBtn:hover,
    .sermonLibraryDeleteBtn:focus {
        background: rgba(220, 38, 38, .18);
        border-color: rgba(220, 38, 38, .45);
        outline: none;
    }
.sermonConfirmOverlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483646 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(3, 7, 18, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto !important;
    isolation: isolate;
}

    .sermonConfirmOverlay[hidden] {
        display: none !important;
    }

.sermonConfirmModal {
    position: relative;
    z-index: 2147483647;
    width: min(460px, calc(100vw - 24px));
    border-radius: 22px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 24px 80px rgba(0,0,0,.30);
    overflow: hidden;
    animation: sermonConfirmIn .18s ease-out;
    pointer-events: auto;
}

@keyframes sermonConfirmIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sermonConfirmHead {
    padding: 22px 24px 8px;
}

.sermonConfirmTitle {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
}

.sermonConfirmMessage {
    padding: 0 24px 22px;
    font-size: 17px;
    line-height: 1.5;
    color: #334155;
}

.sermonConfirmActions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 24px 24px;
}

.sermonConfirmBtn {
    min-width: 128px;
    height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.10);
    background: #e2e8f0;
    color: #0f172a;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

    .sermonConfirmBtn:hover,
    .sermonConfirmBtn:focus {
        outline: none;
        filter: brightness(.98);
    }

.sermonConfirmBtnDanger {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}
body.sermon-confirm-open .favOverlay,
body.sermon-confirm-open .cmpOverlay,
body.sermon-confirm-open .studyOverlay,
body.sermon-confirm-open #flipLockLayer,
body.sermon-confirm-open .navPanelBackdrop {
    pointer-events: none !important;
}
.sermonMiniToolbar {
    position: fixed;
    z-index: 2147483645;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 10px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    color: #5f6368;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
    border: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

    .sermonMiniToolbar[hidden] {
        display: none !important;
    }

    .sermonMiniToolbar::before,
    .sermonMiniToolbar::after {
        content: '';
        display: none;
    }

.sermonMiniBtn,
.sermonMiniColorWrap {
    position: relative;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #5f6368;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease, transform .08s ease;
}

    .sermonMiniBtn:hover,
    .sermonMiniBtn:focus,
    .sermonMiniColorWrap:hover,
    .sermonMiniColorWrap:focus-within {
        outline: none;
        background: rgba(15, 23, 42, 0.06);
        color: #202124;
    }

    .sermonMiniBtn:active,
    .sermonMiniColorWrap:active {
        transform: scale(.98);
    }

    .sermonMiniBtn strong,
    .sermonMiniBtn em,
    .sermonMiniBtn u {
        font-size: 28px;
        line-height: 1;
        color: inherit;
    }

    .sermonMiniBtn em {
        font-style: italic;
    }

    .sermonMiniBtn u {
        text-underline-offset: 3px;
    }

.sermonMiniColorWrap {
    overflow: visible;
}

    .sermonMiniColorWrap input {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
    }

.sermonMiniColorGlyph {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
    color: inherit;
    transform: translateY(-3px);
}

.sermonMiniHiliteGlyph {
    position: relative;
    z-index: 1;
    font-size: 19px;
    font-weight: 500;
    line-height: 1;
    color: inherit;
    transform: translateY(-3px);
    letter-spacing: -1px;
}

.sermonMiniColorChip {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 7px;
    height: 8px;
    border-radius: 4px;
    background: #1f2937;
}

.sermonMiniColorWrapHilite::before {
    content: '';
    position: absolute;
    z-index: 1;
    width: 18px;
    height: 6px;
    border-radius: 4px;
    background: #8b8f94;
    right: 7px;
    top: 13px;
    transform: rotate(-42deg);
    opacity: .92;
}
.sermonQuickColorMenu {
    position: fixed;
    z-index: 2147483646;
    display: grid;
    grid-template-columns: repeat(5, 34px);
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 18px 40px rgba(0,0,0,.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .sermonQuickColorMenu[hidden] {
        display: none !important;
    }

.sermonQuickColor {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,.25);
    cursor: pointer;
}

    .sermonQuickColor:hover,
    .sermonQuickColor:focus {
        outline: none;
        transform: scale(1.06);
    }

.sermonQuickMore {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}
.sermonListIconBtn {
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sermonListIcon {
    width: 22px;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.sermonListRow {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 4px;
}

.sermonListIconBullets .sermonListRow i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    flex: 0 0 4px;
}

.sermonListIconNumbers .sermonListRow em {
    width: 6px;
    font-style: normal;
    font-size: 7px;
    line-height: 1;
    font-weight: 600;
    color: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 6px;
}

.sermonListRow b {
    display: inline-block;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    flex: 1 1 auto;
    min-width: 12px;
}
.sermonMiniToolbar > * + * {
    margin-left: 4px;
}

.sermonMiniToolbar > .sermonMiniColorWrap {
    margin-left: 6px;
}

.sermonMiniToolbar > .sermonMiniBtn[data-action="font-down"] {
    margin-left: 10px;
}

    .sermonMiniToolbar > .sermonMiniBtn[data-action="font-down"]::before {
        content: '';
        position: absolute;
        left: -7px;
        top: 8px;
        bottom: 8px;
        width: 1px;
        background: rgba(15, 23, 42, 0.12);
    }
.sermonMiniBtn[data-action="font-down"],
.sermonMiniBtn[data-action="font-up"] {
    font-size: 22px;
    font-weight: 800;
}
@media (max-width: 1024px) {
    .sermonVerseRangeBox {
        padding-top: 12px;
    }
}
.sermonVerseCanDrag {
    cursor: grab !important;
}

    .sermonVerseCanDrag:active {
        cursor: grabbing !important;
    }

body.sermon-verse-dragging .sermonEditorSurface.sermonDropReady {
    box-shadow: 0 0 0 2px rgba(41, 182, 246, 0.22), 0 18px 42px rgba(15, 23, 42, 0.12);
    transition: box-shadow .15s ease, transform .15s ease;
}

body.sermon-verse-dragging .sermonEditorSurface.sermonDropHover {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.45), 0 20px 48px rgba(2, 132, 199, 0.22);
}

body.sermon-verse-dragging .sermonEditor {
    background-image: linear-gradient( to bottom, rgba(14, 165, 233, 0.04), rgba(14, 165, 233, 0.01) );
}
.sermonMiniColorWrapBlock .sermonMiniBlockGlyph {
    font-size: 16px;
    font-weight: 700;
}

.sermonQuickVerseBlockColor {
    border: 1px solid rgba(255,255,255,.22);
}
.sermonPageGlyphIconWrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.sermonPageGlyphBg {
    position: absolute;
    inset: 3px;
    border-radius: 6px;
    background: #fffdf8;
    z-index: 1;
}

.sermonPageGlyphIcon {
    position: relative;
    z-index: 2;
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;
}

.sermonColorWrapPage {
    gap: 8px;
}



/* Mostrar divisor cuando el editor esté abierto en escritorio */
.app.sermon-open .sermonDivider {
    display: flex;
}

/* ===== FIX ÚNICO FINAL: editor alto completo + divisor siempre visible ===== */

.sermonPane {
    display: none;
    width: var(--sermon-pane-width-local);
    flex-direction: column;
    min-width: 0;
    height: 100%;
    min-height: 0;
    background: var(--sermon-panel);
    color: var(--sermon-text);
    border-left: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: -18px 0 32px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    z-index: 4;
    align-self: stretch;
    margin-left: auto;
    flex: 0 0 auto;
    position: relative;
    right: 0;
}

    .sermonPane > .sermonPaneHead,
    .sermonPane > .sermonToolbarWrap,
    .sermonPane > .sermonFindBar,
    .sermonPane > .sermonFooter {
        min-height: 0;
    }

    .sermonPane > .sermonEditorShell {
        position: relative;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 14px 14px 0;
        background: linear-gradient(180deg, rgba(226, 232, 240, 0.55), rgba(226, 232, 240, 0.2));
    }

        .sermonPane > .sermonEditorShell > .sermonEditorSurface {
            flex: 1 1 auto;
            min-height: 0;
            height: 100%;
            max-height: 100%;
            overflow-x: hidden;
            overflow-y: auto;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
            /* scrollbar visible sólo entre toolbar y footer */
            scrollbar-gutter: stable;
        }

    .sermonPane > .sermonFooter {
        min-height: 0;
        margin-top: 0;
        position: relative;
        bottom: auto;
        z-index: 5;
    }

/* divisor visible siempre que el editor esté abierto */
.app.sermon-open .sermonDivider {
    display: flex;
}

.app:not(.sermon-open) .sermonDivider {
    display: none !important;
}

/* en mobile-active el panel debe dejar espacio al divisor */
.app.sermon-open.sermon-mobile-active .sermonPane {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 56px;
    width: auto;
    box-shadow: none;
    height: 100%;
}

/* el divisor sigue visible también en mobile-active */
.app.sermon-open.sermon-mobile-active .sermonDivider {
    display: flex !important;
}
.sermonEditorShell {
    border-top: 0;
}

.sermonEditorSurface {
    padding-right: 12px;
}

.sermonEditor {
    min-height: calc(100% - 2px);
}
.app.sermon-open:not(.sermon-mobile-active) .sermonPane {
    margin-left: auto;
    flex: 0 0 auto;
    right: 0;
}

/* ===== MODO PREDICADOR LIMPIO (solamente oculta la app y la Biblia normal) ===== */
.app.sermon-presenter-mode {
    overflow: hidden !important;
}

.app.sermon-presenter-mode .header,
.app.sermon-presenter-mode .footer,
.app.sermon-presenter-mode #hint,
.app.sermon-presenter-mode .bookBG,
.app.sermon-presenter-mode .sermonDivider,
.app.sermon-presenter-mode .sermonDock,
.app.sermon-presenter-mode .navPanel,
.app.sermon-presenter-mode .navBackdrop {
    display: none !important;
}

.app.sermon-presenter-mode .content {
    position: fixed !important;
    inset: 0 !important;
    display: block !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 100000 !important;
    background: #f8fafc !important;
}

.app.sermon-presenter-mode .sermonPane {
    position: fixed !important;
    inset: 0 !important;
    display: grid !important;
    grid-template-rows: auto auto minmax(0,1fr) auto auto !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    border-left: 0 !important;
    box-shadow: none !important;
    z-index: 100001 !important;
}

.app.sermon-presenter-mode .sermonPresenterExit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.app.sermon-presenter-mode .sermonEditorShell {
    padding: 14px 14px 0 !important;
    background: linear-gradient(180deg, rgba(226,232,240,0.55), rgba(226,232,240,0.2)) !important;
}

.app.sermon-presenter-mode .sermonEditorSurface {
    background: #fffdf8 !important;
    border: 1px solid rgba(15,23,42,0.08) !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 42px rgba(15,23,42,0.12) !important;
    padding: 22px 24px 36px !important;
}

.app.sermon-presenter-mode .sermonEditor,
.app.sermon-presenter-mode .sermonEditor h1,
.app.sermon-presenter-mode .sermonEditor h2,
.app.sermon-presenter-mode .sermonEditor h3,
.app.sermon-presenter-mode .sermonEditor p,
.app.sermon-presenter-mode .sermonEditor li,
.app.sermon-presenter-mode .sermonVerseBlockRef,
.app.sermon-presenter-mode .sermonVerseLine {
    color: #111827 !important;
}

.app.sermon-presenter-mode .sermonVerseBlock {
    background: rgba(226, 244, 255, 0.8) !important;
    border-left-color: rgba(14, 165, 233, 0.95) !important;
}
    .app.sermon-presenter-mode .sermonToolbarRow {
        display: none !important;
    }

    /* Ocultar botones flotantes de lectura/zoom en modo predicador */
    .app.sermon-presenter-mode #btnReadingMax,
    .app.sermon-presenter-mode #btnFontPlus,
    .app.sermon-presenter-mode #btnFontMinus {
        display: none !important;
    }
/* Dar separación real a listas dentro del editor */
.sermonEditor ul,
.sermonEditor ol {
    margin: 0 0 1em 0 !important;
    padding-left: 32px !important;
    list-style-position: outside !important;
}

.sermonEditor li {
    margin-left: 0 !important;
    padding-left: 4px !important;
}
.app.sermon-presenter-mode .sermonEditor ul,
.app.sermon-presenter-mode .sermonEditor ol {
    padding-left: 36px !important;
}
.sermonEditor ul,
.sermonEditor ol {
    padding-left: 40px !important;
}
/* =========================================================
   RESPONSIVE MOVIL - MODULO SERMONES / MENSAJES
   ========================================================= */
@media (max-width: 768px) {

    /* Contenedor general del editor */
    .sermonEditorDock,
    .sermonEditorPanel,
    .sermonEditorWrap,
    #sermonEditorPanel,
    #sermonDock {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        z-index: 9999 !important;
    }

    /* Layout interno */
    .sermonEditorShell,
    .sermonEditorBody {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    /* Cabecera del mensaje */
    .sermonTabsBar,
    .sermonHeader,
    .sermonTopBar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 10px 12px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        flex-wrap: nowrap !important;
    }

    .sermonTab,
    .sermonTabActive,
    .tabSermon {
        min-width: 0 !important;
        max-width: calc(100% - 70px) !important;
        flex: 1 1 auto !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Botones cerrar / estado */
    .sermonTabClose,
    .sermonCloseBtn,
    .sermonTabActions {
        flex: 0 0 auto !important;
    }

    /* Barra de herramientas */
    .sermonToolbar,
    .sermonToolbarRow {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 8px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        align-items: center !important;
        justify-content: flex-start !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

        /* Botones de toolbar */
        .sermonToolbar button,
        .sermonToolbarRow button,
        .sermonToolBtn,
        .editorToolbar button {
            min-width: 44px !important;
            height: 44px !important;
            padding: 0 10px !important;
            border-radius: 12px !important;
            flex: 0 0 auto !important;
        }

        /* Selects en toolbar */
        .sermonToolbar select,
        .sermonToolbarRow select,
        .editorToolbar select,
        #sermonBlockFormat,
        #sermonFontFamily,
        #sermonFontSize {
            height: 44px !important;
            min-width: 0 !important;
            max-width: 100% !important;
            flex: 1 1 140px !important;
        }

    /* Fila de acciones principales */
    .sermonActionBar,
    .sermonFooterBar,
    .sermonBottomBar {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 12px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

        .sermonActionBar .btn,
        .sermonFooterBar .btn,
        .sermonBottomBar .btn {
            min-height: 44px !important;
        }

    /* Botón guardar: que no se corte */
    #btnSaveSermon,
    #btnSaveMessage,
    .btnSaveSermon {
        flex: 1 1 160px !important;
        min-width: 140px !important;
        max-width: 100% !important;
        white-space: nowrap !important;
    }

    /* Área editable */
    .sermonEditorContentWrap,
    .sermonEditorScroller,
    .sermonEditorMain,
    .sermonEditorCanvas {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow: auto !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }

    #sermonEditor,
    .sermonEditor,
    .note-editable,
    .messageEditorArea,
    [contenteditable="true"].sermonEditable {
        width: 100% !important;
        min-height: 280px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 20px !important;
        border-radius: 24px !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }

    /* Pie del editor */
    .sermonStatusBar,
    .sermonInfoBar {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 12px !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
    }

    /* Botones flotantes laterales */
    .sermonFloatingTools,
    .sermonMiniFabGroup,
    .editorZoomButtons {
        position: fixed !important;
        right: 10px !important;
        bottom: 88px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        z-index: 10010 !important;
    }

        .sermonFloatingTools button,
        .sermonMiniFabGroup button,
        .editorZoomButtons button {
            width: 52px !important;
            height: 52px !important;
        }

    /* Boton X flotante inferior izquierdo */
    .sermonFloatingClose,
    .sermonCloseFloating,
    #btnCloseSermonFloating {
        left: 10px !important;
        bottom: 96px !important;
        width: 52px !important;
        height: 52px !important;
        z-index: 10010 !important;
    }

    /* Ocultar o reducir elementos secundarios que cargan mucho el móvil */
    .sermonDivider,
    #sermonDivider {
        display: none !important;
    }
}

/* Extra pequeño */
@media (max-width: 480px) {

    .sermonToolbar,
    .sermonToolbarRow {
        gap: 6px !important;
        padding: 6px !important;
    }

        .sermonToolbar button,
        .sermonToolbarRow button,
        .sermonToolBtn,
        .editorToolbar button {
            min-width: 40px !important;
            height: 40px !important;
            border-radius: 10px !important;
        }

        .sermonToolbar select,
        .sermonToolbarRow select,
        .editorToolbar select,
        #sermonBlockFormat,
        #sermonFontFamily,
        #sermonFontSize {
            flex: 1 1 100% !important;
        }

    #sermonEditor,
    .sermonEditor,
    .note-editable,
    .messageEditorArea,
    [contenteditable="true"].sermonEditable {
        padding: 16px !important;
        border-radius: 20px !important;
        font-size: 16px !important;
    }

    .sermonStatusBar,
    .sermonInfoBar {
        font-size: 12px !important;
    }
}
.app.sermon-open.sermon-mobile-active .sermonDivider {
    position: fixed;
    left: 0;
    top: calc(var(--titlebarH) + var(--toolbarH));
    bottom: 0;
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    z-index: 99991;
}
@media (max-width: 1024px) {

    .app.sermon-open.sermon-mobile-active .sermonDivider {
        position: fixed;
        left: 0;
        top: calc(var(--titlebarH) + var(--toolbarH));
        bottom: 0;
        width: 56px;
        min-width: 56px;
        max-width: 56px;
        z-index: 99991;
    }

    .app.sermon-open.sermon-mobile-active .sermonPane {
        position: fixed;
        left: 52px;
        right: 0;
        top: calc(var(--titlebarH) + var(--toolbarH));
        bottom: 0;
        width: auto !important;
        max-width: none !important;
        height: auto;
        min-height: 0;
        box-shadow: none;
        z-index: 99990;
    }

    .app.sermon-open.sermon-mobile-active .sermonVerseRangeBox {
        width: 42px;
        padding: 6px 4px 10px;
        gap: 8px;
    }

    .app.sermon-open.sermon-mobile-active .sermonDividerSelect {
        width: 32px;
        min-width: 32px;
        max-width: 32px;
        height: 24px;
        font-size: 11px;
    }

    .app.sermon-open.sermon-mobile-active .sermonInsertBtn {
        width: 32px;
        height: 42px;
        font-size: 22px;
    }

    .app.sermon-open.sermon-mobile-active .sermonDividerModeBtn {
        width: 40px;
        height: 26px;
        font-size: 15px;
        margin: 6px auto 4px;
    }

    .app.sermon-open.sermon-mobile-active .sermonDividerGrip {
        height: 16%;
    }
}
/* =========================================================
   MÓVIL - Mejor aprovechamiento de la barra superior del editor
   ========================================================= */
@media (max-width: 720px) {

    .sermonToolbarRow {
        display: flex;
        align-items: stretch;
        gap: 8px;
        padding: 8px;
        overflow-x: hidden;
        overflow-y: visible;
        flex-wrap: wrap;
        white-space: normal;
        -webkit-overflow-scrolling: auto;
        scroll-behavior: auto;
    }

    .sermonToolbarGroup {
        flex: 1 1 100%;
        display: grid;
        align-items: stretch;
        gap: 6px;
        padding-right: 0;
        border-right: 0;
    }

    .sermonToolbarRowTop .sermonToolbarGroup:first-child {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .sermonToolbarRowTop .sermonToolbarGroup:last-child {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .sermonToolbarRowBottom .sermonToolbarGroup {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
}