/* WebBible 추가 스타일 v81
   원칙: 기존 app.min.css / bootstrap.min.css 를 덮어쓰지 않는다.
   언어별 폰트, 컬러세트, 모달, 가독성 조정만 담당.
*/

:root {
    --bible-font-size: 18px;
    --bible-original-size: calc(var(--bible-font-size) * 1.55);
    --bible-parse-size: calc(var(--bible-font-size) * 0.88);
    --bible-english-size: calc(var(--bible-font-size) * 0.92);
    /* 원어분해 wordBox 전용 — 본문보다 작게 */
    --wb-wordbox-original-size: calc(var(--bible-font-size) * 1.28);
    --wb-wordbox-parse-size: calc(var(--bible-font-size) * 0.72);
    --wb-wordbox-en-size: calc(var(--bible-font-size) * 0.68);
    --font-original: 'Times New Roman', 'David', 'Narkisim', 'Frank Ruhl', 'Noto Sans Hebrew', sans-serif;
    --wb-font-hebrew-greek: 'Times New Roman', 'David', 'Narkisim', 'Frank Ruhl', 'Noto Sans Hebrew', sans-serif;
    --bible-ui-font: 'Noto Serif KR', 'Noto Serif', 'Apple Myungjo', 'Batang', Georgia, serif;

    /* 컬러세트 변수 (JS가 bibleReaderApplySettings에서 설정) */
    --wb-bg: #ffffff;
    --wb-text: #222222;
    --wb-muted: #6c757d;
    --wb-header-bg: #f8f9fa;
    --wb-header-text: #222222;
    --wb-border: #e9ecef;
    --wb-accent-bg: #f8f9fa;
    --wb-hover-bg: #f1f4f8;
    --wb-verse-select-bg: #ffe2e2;
    --wb-card-bg: #f9f9f9;
    --wb-word-ko: #333333;
    --wb-word-en: #c0392b;
    --wb-word-parse: #27ae60;
    --wb-word-code: #8e44ad;
    --wb-word-original: #1565c0;
    --wb-more-bg: #eceff1;
    --wb-more-text: #546e7a;
    --wb-more-border: #cfd8dc;
    --wb-more-hover-bg: #546e7a;
    --wb-more-hover-text: #ffffff;
    --wb-more-hover-border: #455a64;
    --wb-worship-text: #2e7d32;
    --wb-divider-hover: #90a4ae;

    /* 키워드 강조 — 검색·본문 공통 */
    --wb-kw-bg: #e8f1fa;
    --wb-kw-color: #1a3558;
    --wb-kw-border: rgba(26, 53, 88, 0.12);
    --wb-kw-radius: 6px;
    --wb-kw-pad-y: 2px;
    --wb-kw-pad-x: 7px;

    /* 모달 — 화면 비율 고정 (내용 로드 시 크기 변동 방지) */
    --wb-modal-w-md: min(92vw, 560px);
    --wb-modal-h-md: min(82vh, 680px);
    --wb-modal-w-lg: min(94vw, 680px);
    --wb-modal-h-lg: min(85vh, 720px);
    --wb-modal-w-sm: min(88vw, 400px);
    --wb-modal-h-sm: min(70vh, 520px);
    --wb-modal-w-xs: min(80vw, 300px);
}

/* iPad·태블릿 가독성 */
@media (min-width: 768px) {
    :root {
        --bible-font-size: 19px;
    }
}

@media (min-width: 1024px) {
    :root {
        --bible-font-size: 20px;
    }
}

/* ── 성경 본문 (한글) ── */
.bible-verse-txt,
.version1-txt,
.version2-txt,
.book-content-body,
#book_contents .book-content-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
                 'Malgun Gothic', '맑은 고딕', sans-serif !important;
    font-size: var(--bible-font-size);
    line-height: 1.8;
    color: var(--wb-text);
}

/* ── 히브리어 · 헬라어 — 전역 고정 폰트 (설정 폰트로 덮어쓰기 금지) ── */
.lang-heb,
.lang-grc,
.hebrew-txt,
.greek-txt,
.wb-original-word,
.wordBox p.wb-original-word,
.dicFromStrongModal,
.dicstrongmodal_subject,
.dicstrongmodal_contents,
.ob-text.hebrew-txt,
.ob-text.greek-txt,
#biblecontents .hebrew-txt,
#biblecontents .greek-txt,
#biblecontents .wb-original-word,
#biblecontents .lang-heb,
#biblecontents .lang-grc,
#bibleDetailContents1 .wb-original-word,
#bibleDetailContents1 .lang-heb,
#bibleDetailContents1 .lang-grc,
#bibleDetailContents1_1 .wb-original-word,
#bibleDetailContents1_1 .lang-heb,
#bibleDetailContents1_1 .lang-grc,
#bibleDetailContents2 .ob-text.hebrew-txt,
#bibleDetailContents2 .ob-text.greek-txt,
#bibleDetailContents2_1 .ob-text.hebrew-txt,
#bibleDetailContents2_1 .ob-text.greek-txt,
.bible-panel .ob-text.hebrew-txt,
.bible-panel .ob-text.greek-txt,
.bible-panel .wb-original-word,
.bible-panel .lang-heb,
.bible-panel .lang-grc,
#book_contents .wb-script-heb,
#book_contents .wb-script-grc,
#book_contents .hebrew-txt,
#book_contents .greek-txt,
#book_contents .lang-heb,
#book_contents .lang-grc,
#book_contents .wb-original-word {
    font-family: 'Times New Roman', 'David', 'Narkisim', 'Frank Ruhl', 'Noto Sans Hebrew', sans-serif !important;
}

#book_contents .book-content-body .wb-script-heb,
#book_contents .book-content-body .hebrew-txt,
#book_contents .book-content-body .lang-heb {
    direction: rtl;
    unicode-bidi: embed;
}

#book_contents .book-content-body .lang-ja {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif !important;
}

#book_contents .book-content-body .lang-zh {
    font-family: 'Noto Sans SC', 'PingFang SC', 'SimHei', sans-serif !important;
}

#book_contents .book-content-body .lang-en {
    font-family: 'Noto Serif', Georgia, 'Times New Roman', serif !important;
    font-size: var(--bible-english-size) !important;
}

.lang-heb,
.hebrew-txt,
.ob-text.hebrew-txt {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

.lang-grc,
.greek-txt,
.ob-text.greek-txt {
    text-align: right;
}

/* 원어분해 카드 안 히브리/헬라 — 중앙 정렬 */
.wordBox .wb-original-word,
.wordHevContainer .wordBox .wb-original-word,
.wordContainer .wordBox .wb-original-word {
    text-align: center !important;
    direction: rtl;
    unicode-bidi: embed;
}

.lang-heb,
.hebrew-txt,
.lang-grc,
.greek-txt,
.wb-original-word,
#book_contents .wb-script-heb,
#book_contents .wb-script-grc {
    font-size: var(--bible-original-size) !important;
    line-height: 1.9;
}

/* ── 원어분해 wordBox ── */
.wordContainer,
.wordHevContainer {
    gap: 0.6rem;
}

.wordBox {
    background: transparent !important;
    border: 1px solid var(--wb-border) !important;
    border-radius: 6px;
    padding: 0.45rem 0.4rem;
    min-width: max-content;
    max-width: 200px;
    box-shadow: none !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* 원어분해 영역 — 섹션 배경은 부모와 동일 */
.bible-panel .accordion-body,
#bibleDetailContents1_1,
#bibleDetailContents1,
#bibleDetailContents1_1 > .row,
#bibleDetailContents1_1 .wordHevContainer,
#bibleDetailContents1_1 .wordContainer,
#bibleDetailContents1 > .row,
#bibleDetailContents1 .wordHevContainer,
#bibleDetailContents1 .wordContainer {
    background: transparent !important;
}

/* 원어분해 아코디언 제목 */
.bible-panel .accordion-button,
.wb-modal .accordion-button {
    font-weight: 700 !important;
}

.bible-panel .accordion-button .wb-acc-icon,
.wb-modal .accordion-button .wb-acc-icon {
    margin-right: 8px;
    font-size: 1.05em;
    line-height: 1;
    opacity: 0.9;
    vertical-align: -1px;
}

.wordBox p { margin: 0; }

.wb-original-word {
    font-family: var(--font-original) !important;
    font-weight: 600;
    color: var(--wb-word-original) !important;
    text-align: center;
    line-height: 1.85;
}

/* wordBox 안만 글자 축소 (BHS 본문 크기는 유지) */
.wordBox .wb-original-word,
.wordBox .lang-heb,
.wordBox .lang-grc,
#bibleDetailContents1_1 .wb-original-word,
#bibleDetailContents1_1 .lang-heb,
#bibleDetailContents1_1 .lang-grc {
    font-size: var(--wb-wordbox-original-size) !important;
    line-height: 1.55 !important;
    color: var(--wb-word-original) !important;
}

.wordBox .wb-parse-label {
    font-size: var(--wb-wordbox-parse-size) !important;
    line-height: 1.35 !important;
    margin-top: 1px !important;
}

.wordBox .wb-parse-nasb,
.wordBox .wb-parse-kjv {
    font-size: var(--wb-wordbox-en-size) !important;
}

.wb-parse-label {
    font-size: var(--bible-parse-size) !important;
    text-align: center;
    line-height: 1.45;
    margin-top: 2px !important;
}

.wb-parse-grammar { color: var(--wb-word-parse) !important; font-weight: 600; }
.wb-parse-code    { color: var(--wb-word-code) !important; font-weight: 600; }
.wb-parse-ko      { color: var(--wb-word-ko) !important; }
.wb-parse-nasb,
.wb-parse-kjv     {
    color: var(--wb-word-en) !important;
    font-family: 'Noto Serif', Georgia, 'Times New Roman', serif !important;
    font-size: var(--bible-english-size) !important;
}

/* ── 대역성경(더보기) 영역 ── */
.ob-item {
    border-bottom-color: var(--wb-border) !important;
}

.ob-text {
    font-size: var(--bible-font-size) !important;
    color: var(--wb-text) !important;
    line-height: 1.75;
}

/* 대역성경 영역 — BHS/헬라 본문만 1.3배 */
.ob-text.hebrew-txt,
.ob-text.greek-txt,
#bibleDetailContents2 .ob-text.hebrew-txt,
#bibleDetailContents2 .ob-text.greek-txt,
#bibleDetailContents2_1 .ob-text.hebrew-txt,
#bibleDetailContents2_1 .ob-text.greek-txt {
    font-size: calc(var(--bible-font-size) * 1.3) !important;
    line-height: 1.8;
}

.ob-badge {
    font-size: calc(var(--bible-font-size) * 0.68) !important;
    color: #fff !important;
    background: #546e7a !important;
}

.ob-badge-org {
    background: #7e57c2 !important;
    color: #fff !important;
}

/* ── Strong 사전 모달 — 세련된 UX ── */
#dicFromStrongModal .modal-content.ds-strong-modal {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(22, 58, 102, 0.22);
}

#dicFromStrongModal .modal-header {
    background: linear-gradient(135deg, #163a66 0%, #2f7fd1 100%) !important;
    border: none;
    padding: 14px 18px;
    align-items: center;
}

#dicFromStrongModal .modal-header .modal-title,
#dicFromStrongModal #dicstrongmodal_subject,
#dicFromStrongModal .ds-header-inner,
#dicFromStrongModal .ds-header-text,
#dicFromStrongModal .ds-header-lang,
#dicFromStrongModal .ds-header-code {
    color: #fff !important;
}

#dicFromStrongModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

#dicFromStrongModal .modal-dialog {
    max-width: min(94vw, 580px) !important;
}

#dicFromStrongModal .modal-body {
    padding: 0 !important;
    background: #f4f7fb;
}

.ds-header-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.ds-header-icon {
    font-size: 20px;
    opacity: 0.95;
    flex-shrink: 0;
}

.ds-header-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.ds-header-lang {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.88;
    margin-left: 2px;
}

.ds-header-code {
    margin-left: auto;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
}

.ds-strong-article {
    padding: 18px 18px 20px;
}

.ds-hero {
    text-align: center;
    padding: 22px 16px 18px;
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    border-radius: 14px;
    border: 1px solid #e3edf8;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(47, 127, 209, 0.08);
}

.ds-hero-word {
    font-family: 'Times New Roman', 'David', 'Narkisim', 'Frank Ruhl', 'Noto Sans Hebrew', sans-serif !important;
    font-size: calc(var(--bible-font-size, 18px) * 2.4);
    font-weight: 700;
    color: var(--wb-word-original, #1e5fb0) !important;
    line-height: 1.35;
    margin-bottom: 10px;
    word-break: break-word;
}

.ds-hero-lemma {
    margin: 6px 0 10px;
    font-size: calc(var(--bible-font-size, 18px) * 1.05);
    color: #607d8b;
    line-height: 1.5;
}

.ds-hero-lemma-label {
    display: inline-block;
    margin-right: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #90a4ae;
    letter-spacing: 0.03em;
}

.ds-hero-lemma-word {
    font-family: 'Times New Roman', 'David', 'Narkisim', 'Frank Ruhl', 'Noto Sans Hebrew', sans-serif !important;
    font-weight: 600;
    color: #546e7a;
}

.ds-hero-code {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    background: #e8f1fb;
    color: #1e5fb0;
    font-size: 13px;
    font-weight: 700;
}

.ds-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.ds-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    background: #fff;
    border: 1px solid #e0eaf5;
    border-radius: 10px;
    font-size: calc(var(--bible-font-size, 18px) * 0.82);
    box-shadow: 0 2px 6px rgba(38, 50, 56, 0.04);
}

.ds-chip em {
    font-style: normal;
    color: #607d8b;
    font-weight: 600;
}

.ds-chip span {
    color: #1a2b44;
    font-weight: 600;
}

.ds-section {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8eef5;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(38, 50, 56, 0.04);
}

.ds-section:last-child {
    margin-bottom: 0;
}

.ds-section-head {
    padding: 12px 14px 0;
}

.ds-section-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #163a66, #2f7fd1);
}

.ds-section-badge-en {
    background: linear-gradient(135deg, #607d8b, #90a4ae);
}

#dicFromStrongModal .ds-section-body {
    padding: 12px 16px 16px;
    line-height: 1.78;
    white-space: pre-wrap;
    color: var(--wb-text, #263238) !important;
    font-family: var(--bible-ui-font) !important;
    font-size: calc(var(--bible-font-size, 18px) * 0.96) !important;
}

.ds-section-body-en {
    font-family: 'Noto Serif', Georgia, 'Times New Roman', serif !important;
    font-size: calc(var(--bible-font-size, 18px) * 0.92) !important;
    color: #455a64 !important;
    white-space: normal !important;
}

.ds-usage-list {
    margin: 4px 0 0;
}

.ds-usage-line {
    margin: 0;
    padding: 3px 0;
    line-height: 1.65;
}

.ds-usage-d0 {
    padding-left: 0;
    font-weight: 600;
    color: #37474f;
    margin-top: 6px;
}

.ds-usage-d0:first-child {
    margin-top: 0;
}

.ds-usage-d1 {
    padding-left: 1.15em;
}

.ds-usage-d2 {
    padding-left: 2.3em;
    color: #546e7a;
}

.ds-usage-prose {
    margin: 0 0 10px;
    line-height: 1.7;
}

.ds-strong-loading,
.ds-strong-empty {
    padding: 44px 20px;
    text-align: center;
    color: #90a4ae;
    font-size: 14px;
}

.ds-strong-loading p,
.ds-strong-empty p {
    margin: 0;
}

.ds-strong-empty i {
    display: block;
    font-size: 36px;
    margin-bottom: 10px;
    color: #b0bec5;
}

.ds-strong-error i {
    color: #ef9a9a;
}

/* 더보기/접기 버튼 — 컬러세트 연동 */
.wb-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: calc(var(--bible-font-size) * 0.86) !important;
    font-weight: 600;
    color: var(--wb-more-text) !important;
    background: var(--wb-more-bg) !important;
    border: 1px solid var(--wb-more-border) !important;
    border-radius: 20px;
    padding: 6px 18px !important;
    text-decoration: none;
    transition: all 0.18s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.wb-more-btn:hover {
    color: var(--wb-more-hover-text) !important;
    background: var(--wb-more-hover-bg) !important;
    border-color: var(--wb-more-hover-border) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.commentaryToggleRow td {
    padding-top: 10px;
    padding-bottom: 6px;
}

/* ── 성경 패널 상단 — 자료 path-bar 톤 ── */
.wb-panel-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 8px 14px !important;
    background: var(--wb-path-bg, #f4f6fb) !important;
    border-bottom: 1px solid var(--wb-path-border, #d8e2f0) !important;
    flex-shrink: 0;
}

.wb-panel-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--wb-path-text, #243b55) !important;
    line-height: 1.35 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#transName1.wb-panel-label {
    color: var(--wb-path-accent, #1a56a8) !important;
}

.wb-panel-prefix {
    color: var(--wb-path-muted, #5a6a7a) !important;
    font-weight: 500 !important;
}

.wb-panel-value,
#transName1,
#transName2 {
    color: var(--wb-path-accent, #1a56a8) !important;
    font-weight: 600 !important;
}

/* ── 찬송가 콤보 (좌측 패널) ── */
.wb-worship-select {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 46%;
}

.wb-worship-combo {
    font-size: 13px !important;
    padding: 5px 10px !important;
    height: 32px !important;
    line-height: 1.25 !important;
    border: 1px solid var(--wb-path-border, #d8e2f0) !important;
    border-radius: 8px !important;
    background: var(--wb-bg, #fff) !important;
    color: var(--wb-worship-text) !important;
    font-weight: 600;
    max-width: 100%;
    width: 100%;
    min-width: 92px;
    outline: none;
    cursor: pointer;
}

.wb-worship-combo:hover,
.wb-worship-combo:focus {
    border-color: var(--wb-worship-text) !important;
}

.wb-panel-header .wb-worship-select select option {
    color: #222;
    background: #fff;
}

/* ── 모든 모달: 화면 가운데 + 가로·세로 고정 ── */
.modal {
    --bs-modal-margin: 0;
}

.modal.show,
.modal.fade.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: max(10px, 1.5vh) max(10px, 2vw) !important;
}

.modal .modal-dialog,
.wb-modal .modal-dialog {
    margin: 0 auto !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: var(--wb-modal-w-md) !important;
    max-width: var(--wb-modal-w-md) !important;
    height: var(--wb-modal-h-md) !important;
    max-height: var(--wb-modal-h-md) !important;
    min-height: var(--wb-modal-h-md) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    pointer-events: none;
}

.modal .modal-dialog > .modal-content {
    pointer-events: auto;
}

/* Bootstrap fullscreen — PC만 고정 박스, 좁은 화면은 전체화면 허용 */
@media (min-width: 768px) {
    .modal .modal-dialog.modal-fullscreen,
    .modal .modal-dialog.modal-fullscreen-sm-down,
    .modal .modal-dialog.modal-fullscreen-md-down {
        width: var(--wb-modal-w-md) !important;
        max-width: var(--wb-modal-w-md) !important;
        height: var(--wb-modal-h-md) !important;
        max-height: var(--wb-modal-h-md) !important;
        min-height: var(--wb-modal-h-md) !important;
        margin: 0 auto !important;
        border-radius: 0;
    }
}

@media (min-width: 992px) {
    .modal .modal-dialog.modal-fullscreen-lg-down {
        width: var(--wb-modal-w-md) !important;
        max-width: var(--wb-modal-w-md) !important;
        height: var(--wb-modal-h-md) !important;
        max-height: var(--wb-modal-h-md) !important;
        min-height: var(--wb-modal-h-md) !important;
        margin: 0 auto !important;
        border-radius: 0;
    }
}

.modal .modal-content,
.wb-modal .modal-content {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

.modal .modal-header,
.modal .modal-footer,
.wb-modal .modal-header,
.wb-modal .modal-footer {
    flex: 0 0 auto;
}

.modal .modal-body,
.wb-modal .modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

/* 모달 저장/닫기 버튼 — 메인 블루 컬러 */
.wb-modal .modal-footer .btn-primary,
#bibleSettingModal .modal-footer .btn-primary,
#bibleSettingModal .btn-primary,
#readerSettingsModal .btn-primary,
.modal-footer .wb-btn-save {
    background: linear-gradient(135deg, #163a66, #2f7fd1) !important;
    border-color: #163a66 !important;
    color: #fff !important;
}

.wb-modal .modal-footer .btn-primary:hover,
#bibleSettingModal .btn-primary:hover,
#readerSettingsModal .btn-primary:hover,
.modal-footer .wb-btn-save:hover {
    background: linear-gradient(135deg, #0c2647, #163a66) !important;
    border-color: #0c2647 !important;
    color: #fff !important;
}

.wb-modal .modal-footer .btn-outline-secondary,
#bibleSettingModal .btn-outline-secondary {
    border-color: #2f7fd1 !important;
    color: #163a66 !important;
}

.wb-modal .modal-footer .btn-outline-secondary:hover,
#bibleSettingModal .btn-outline-secondary:hover {
    background: #e8f1fb !important;
    color: #0c2647 !important;
}

/* 설정 모달 — 화면 설정과 동일 타이틀바 */
#bibleSettingModal .modal-header,
#readerSettingsModal .modal-header {
    background: linear-gradient(135deg, #163a66, #2f7fd1) !important;
    border-bottom: none !important;
    padding: 12px 16px !important;
}

#bibleSettingModal .modal-title,
#readerSettingsModal .modal-title {
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

#bibleSettingModal .btn-close,
#readerSettingsModal .btn-close {
    filter: brightness(0) invert(1) !important;
}

/* 설정 모달 — 라벨·입력 글자 크기 확대 */
#bibleSettingModal .modal-body,
#readerSettingsModal .modal-body {
    font-size: 16px !important;
}

.bs-label,
.rs-label {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #555 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin-bottom: 10px !important;
}

/* 설정 모달 — 레이블 왼쪽 · 입력 오른쪽 (공간 절약) */
.bs-row-field,
.rs-row-field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.bs-row-field .bs-label,
.rs-row-field .rs-label {
    flex: 0 0 auto;
    min-width: 92px;
    max-width: 38%;
    margin-bottom: 0 !important;
    white-space: nowrap;
}

.bs-row-field .form-select,
.bs-row-field .bs-size-row,
.rs-row-field .rs-font-btns,
.rs-row-field .rs-size-row {
    flex: 1 1 auto;
    min-width: 0;
}

.bs-row-field .bs-size-row,
.rs-row-field .rs-size-row {
    justify-content: flex-start;
}

#bibleSettingModal .form-select,
#readerSettingsModal .form-select,
#readerSettingsModal .rs-font-btns select {
    font-size: 15px !important;
    padding: 10px 12px !important;
}

#bibleSettingModal .nav-tabs .nav-link {
    font-size: 15px !important;
    padding: 10px 18px !important;
}

#rsCurrentSize,
#bsCurrentSize {
    display: inline-block;
    flex: 0 0 auto;
    flex-shrink: 0;
    min-width: 56px;
    font-size: 18px !important;
    font-weight: 700;
    color: #333 !important;
    line-height: 1.4;
    visibility: visible !important;
    opacity: 1 !important;
}

.rs-size-row,
.bs-size-row {
    flex-wrap: nowrap;
}

/* 큰 모달 (상세·검색·사전) */
#bibleDetailModal .modal-dialog,
#bibleSearchModal .modal-dialog,
#bookSearchModal .modal-dialog,
#dicFromStrongModal .modal-dialog,
#dicDetailModal .modal-dialog,
#bookDetailModal .modal-dialog {
    width: var(--wb-modal-w-lg) !important;
    max-width: var(--wb-modal-w-lg) !important;
    height: auto !important;
    max-height: var(--wb-modal-h-lg) !important;
    min-height: 0 !important;
}

#bookSearchModal .modal-content {
    min-height: min(85vh, 720px);
    max-height: var(--wb-modal-h-lg);
    display: flex;
    flex-direction: column;
}

/* 자료 검색 모달 — 좁은 화면 진짜 전체화면 (상·하단 여백 없음) */
@media (max-width: 991.98px) {
    #bookSearchModal {
        padding: 0 !important;
    }

    #bookSearchModal.modal.show,
    #bookSearchModal.modal.fade.show {
        align-items: stretch !important;
        justify-content: stretch !important;
    }

    #bookSearchModal .modal-dialog,
    #bookSearchModal .modal-dialog.modal-fullscreen-lg-down {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        align-self: stretch !important;
    }

    #bookSearchModal .modal-content {
        width: 100% !important;
        min-height: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    #bookSearchModal .modal-body {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
    }
}

#bookSearchModal .modal-header {
    flex: 0 0 auto;
    padding: 16px 20px !important;
    min-height: 56px;
}

#bookSearchModal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

#bookSearchModal .bsm-search-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

#bookSearchModal .bsm-search-actions {
    flex-shrink: 0;
}

#bookSearchModal .bsm-input-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

#bookSearchModal #bsmKeyword {
    padding: 12px 14px 12px 42px;
    border-radius: 12px;
    font-size: 16px;
    min-height: 48px;
    border: 1px solid #cfd8dc;
}

#bookSearchModal .bsm-search-btn {
    flex: 0 0 auto;
    min-width: 72px;
    min-height: 48px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    padding: 0 18px;
    white-space: nowrap;
}

#bookSearchModal .modal-footer.bsm-modal-footer {
    flex: 0 0 auto;
    border-top: 1px solid #e8eef4;
    background: #f8fafc;
    justify-content: center;
    padding: 10px 16px !important;
}

#bookSearchModal #bsmPaging {
    width: 100%;
}

#bookSearchModal .bsm-paging-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

#bookSearchModal .bsm-paging-meta {
    font-size: 13px;
    color: #51647a;
    font-weight: 500;
}

#bookSearchModal .bsm-paging-meta strong {
    color: #163a66;
    font-weight: 700;
}

#bookSearchModal .bsm-paging-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

#bookSearchModal .bsm-paging-nav .btn {
    min-width: 34px;
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 600;
}

#bookSearchModal .bsm-paging-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    color: #90a4ae;
    font-weight: 700;
    user-select: none;
}

#bookSearchModal .bsm-paging-jump {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

#bookSearchModal .bsm-paging-jump-label {
    font-size: 13px;
    color: #51647a;
    margin: 0;
    font-weight: 600;
}

#bookSearchModal #bsmJumpInput {
    width: 64px;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    color: #163a66;
}

#bookSearchModal .bsm-paging-jump .btn-primary {
    min-width: 52px;
    border-radius: 8px;
    font-weight: 700;
}

/* 자료 라이브러리 모달 — 탭 고정, 목록만 스크롤 */
#booksLibraryModal .modal-dialog {
    width: min(96vw, 880px) !important;
    max-width: min(96vw, 880px) !important;
    height: min(75vh, 680px) !important;
    max-height: min(75vh, 680px) !important;
    min-height: 320px !important;
}

#booksLibraryModal .modal-body {
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    min-height: 0 !important;
}

#booksLibraryModal .nav-tabs {
    flex: 0 0 auto !important;
    overflow: visible !important;
    overflow-x: visible !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#booksLibraryModal .nav-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

#booksLibraryModal .tab-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#booksLibraryModal #libModalContent:not(.wb-state-hosting) {
    display: block !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 12px 16px !important;
    box-sizing: border-box;
}

#booksLibraryModal #libModalContent.wb-state-hosting {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 200px !important;
    width: 100% !important;
    padding: 24px 16px !important;
    box-sizing: border-box;
}

#booksLibraryModal #libModalContent > .tab-pane {
    width: 100%;
}

#booksLibraryModal #libModalContent > .tab-pane.active {
    display: block !important;
}

#booksLibraryModal .lib-books-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    padding: 0;
}

#booksLibraryModal .lib-book-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e4eaf3;
    background: #fff;
    color: #2b3a44;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}

#booksLibraryModal .lib-book-item:hover {
    background: #eaf1fb;
    border-color: #c5d8f0;
    color: #163a66;
}

#booksLibraryModal .lib-book-item.lib-active {
    background: #ddeeff;
    border-color: #aacde8;
    color: #163a66;
    font-weight: 700;
}

#booksLibraryModal .lib-book-item i {
    font-size: 20px;
    color: #2f7fd1;
    flex-shrink: 0;
}

#booksLibraryModal .lib-book-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

@media (max-width: 720px) {
    #booksLibraryModal .lib-books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 420px) {
    #booksLibraryModal .lib-books-grid {
        grid-template-columns: 1fr;
    }
}

/* 탭 있는 모달 — 탭 바 스크롤바 제거 */
.wb-modal .nav-tabs[data-dropdown-tabs],
.wb-modal #bookItemTabs,
.wb-modal #libModalTabs {
    overflow: visible !important;
    overflow-x: visible !important;
    flex-wrap: wrap !important;
}

/* 설정 모달 — 내용 높이에 맞춤 (스크롤 최소화) */
#bibleSettingModal .modal-dialog,
#readerSettingsModal .modal-dialog {
    width: var(--wb-modal-w-md) !important;
    max-width: var(--wb-modal-w-md) !important;
    height: auto !important;
    max-height: min(92vh, 680px) !important;
    min-height: unset !important;
}

/* 성경 선택 모달 — 데스크톱 */
#bibleOpenModal .modal-dialog,
#bibleOpenModal .wb-bible-open-dialog {
    width: var(--wb-modal-w-lg) !important;
    max-width: var(--wb-modal-w-lg) !important;
    height: var(--wb-modal-h-lg) !important;
    max-height: var(--wb-modal-h-lg) !important;
    min-height: var(--wb-modal-h-lg) !important;
}

#bibleOpenModal .wb-bible-open-header {
    background: linear-gradient(135deg, #163a66 0%, #2f7fd1 100%);
    border-bottom: none;
    padding: 12px 16px;
    flex-shrink: 0;
}

#bibleOpenModal .wb-bible-open-header .modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

#bibleOpenModal .wb-bible-open-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

/* 성경 선택 모달 본문 — 검색 고정 + 목록만 스크롤 */
#bibleOpenModal .wb-bible-open-body {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px !important;
    overflow: hidden !important;
    min-height: 0 !important;
}

#bibleOpenModal .wb-bible-open-search {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

#bibleOpenModal .wb-bible-open-search-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

#bibleOpenModal .wb-bible-open-input {
    min-width: 0;
    font-size: 15px;
}

#bibleOpenModal .wb-bible-open-list,
#bibleOpenModal #bible_books_list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

/* 성경 선택 — 책·장·절 반응형 그리드 */
.wb-bible-pick-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    margin-bottom: 8px;
}

.wb-bible-pick-grid .bible-book-btn {
    margin-bottom: 0;
    padding: 10px 4px;
    font-size: 14px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 성경 선택 · 좁은 가로 — 전체화면 + 터치 최적화 */
@media (max-width: 991.98px),
       ((hover: none) and (pointer: coarse) and (max-width: 1366px)) {
    #bibleOpenModal.modal.show,
    #bibleOpenModal.modal.fade.show {
        padding: 0 !important;
        align-items: stretch !important;
    }

    #bibleOpenModal .wb-bible-open-dialog,
    #bibleOpenModal .modal-dialog {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 100% !important;
        margin: 0 !important;
    }

    #bibleOpenModal .wb-bible-open-content,
    #bibleOpenModal .modal-content {
        border-radius: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
    }

    #bibleOpenModal.wb-modal .modal-body,
    #bibleOpenModal .wb-bible-open-body {
        padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom)) !important;
    }

    #bibleOpenModal .wb-bible-open-search {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #bibleOpenModal .wb-bible-open-search-btns {
        width: 100%;
    }

    #bibleOpenModal .wb-bible-open-search-btns .btn {
        flex: 1 1 0;
        min-height: 44px;
        font-size: 15px;
    }

    #bibleOpenModal .wb-bible-open-input {
        min-height: 44px;
        font-size: 16px;
    }

    .wb-bible-pick-grid {
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
        gap: 6px;
    }

    .wb-bible-pick-grid .bible-book-btn {
        min-height: 44px;
        font-size: 15px;
        border-radius: 8px;
    }
}

@media (max-width: 575.98px) {
    .wb-bible-pick-grid {
        grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .wb-bible-pick-grid {
        grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    }

    #bibleOpenModal .wb-bible-open-search {
        grid-template-columns: 1fr auto;
    }

    #bibleOpenModal .wb-bible-open-search-btns {
        width: auto;
    }

    #bibleOpenModal .wb-bible-open-search-btns .btn {
        flex: 0 0 auto;
        min-width: 72px;
    }
}

/* 작은 모달 (로딩) */
#loadingModak .modal-dialog,
.modal-dialog.modal-sm {
    width: var(--wb-modal-w-xs) !important;
    max-width: var(--wb-modal-w-xs) !important;
    height: auto !important;
    min-height: unset !important;
    max-height: none !important;
}

#loadingModak .modal-content {
    height: auto !important;
}

/* MP3 플레이어 — 컴팩트 */
#mp3PlayerModal .modal-dialog {
    width: var(--wb-modal-w-sm) !important;
    max-width: var(--wb-modal-w-sm) !important;
    height: auto !important;
    min-height: unset !important;
    max-height: min(50vh, 380px) !important;
}

#mp3PlayerModal .modal-content {
    height: auto !important;
}

.wb-modal .modal-body {
    font-size: calc(var(--bible-font-size) * 0.88);
}

/* 모바일·태블릿 — 설정·성경선택·검색 전체화면 + 그리드 최적화 */
@media (max-width: 767.98px) {
    :root {
        --wb-modal-w-md: 100vw;
        --wb-modal-h-md: 100vh;
        --wb-modal-w-lg: 100vw;
        --wb-modal-h-lg: 100vh;
        --wb-modal-h-sm: 100vh;
    }

    .modal.show,
    .modal.fade.show {
        padding: 0 !important;
        align-items: stretch !important;
    }

    #bibleSettingModal .modal-dialog,
    #readerSettingsModal .modal-dialog,
    #bibleOpenModal .modal-dialog,
    #bibleSearchModal .modal-dialog,
    #booksLibraryModal .modal-dialog,
    .modal .modal-dialog.modal-fullscreen-sm-down {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 100% !important;
        margin: 0 !important;
    }

    #bibleSettingModal .modal-content,
    #readerSettingsModal .modal-content,
    #bibleOpenModal .modal-content,
    #bibleSearchModal .modal-content,
    #booksLibraryModal .modal-content {
        border-radius: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
    }

    #bibleSettingModal .modal-body,
    #readerSettingsModal .modal-body {
        max-height: none !important;
    }

    .bs-row-field,
    .rs-row-field {
        flex-wrap: wrap;
        gap: 6px;
    }

    .bs-row-field .bs-label,
    .rs-row-field .rs-label {
        min-width: 72px;
        max-width: none;
    }

    #bibleSearchModal .modal-body {
        min-height: 0 !important;
    }
}

@media (max-width: 575.98px) {
    :root {
        --wb-modal-w-md: 100vw;
        --wb-modal-h-md: 100vh;
        --wb-modal-w-lg: 100vw;
        --wb-modal-h-lg: 100vh;
        --wb-modal-h-sm: 100vh;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    :root {
        --wb-modal-w-md: min(90vw, 560px);
        --wb-modal-h-md: min(84vh, 680px);
        --wb-modal-w-lg: min(92vw, 680px);
        --wb-modal-h-lg: min(86vh, 720px);
    }
}

/* 글자 크기 설정 UI */
.bs-size-row button,
.rs-size-row button {
    width: 42px;
    height: 42px;
    font-size: 18px;
}

/* 일본어·중국어·영문 */
.lang-ja {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif !important;
}

.lang-zh {
    font-family: 'Noto Sans SC', 'PingFang SC', 'SimHei', sans-serif !important;
}

.lang-en {
    font-family: 'Noto Serif', Georgia, serif !important;
    font-size: var(--bible-english-size);
}

/* wordBox 호버 */
.wordBox:hover {
    border-color: #e94e77 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 성경 구절 표시 (절번호·관주 참조) */
.bible-verse-number,
.bible-verse-rows .bible-verse-number,
.bible-verse-rows-etc .bible-verse-number,
.bible-version-verse-rows .bible-verse-number,
#biblecontents tr td.bible-verse-number,
.bible-verse-table-body tr td.bible-verse-number {
    font-weight: 700 !important;
}

/* 패널 분리자 — 손가락 조절 영역 확대 */
.bible-divider {
    width: 16px !important;
    min-width: 16px !important;
    background: #b0bec5 !important;
    cursor: col-resize;
    touch-action: none;
    z-index: 10;
    position: relative;
    flex-shrink: 0;
}

.bible-divider::after {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #546e7a !important;
    letter-spacing: -2px;
}

.bible-divider:hover,
.bible-divider.dragging {
    background: var(--wb-divider-hover) !important;
}

.bible-divider:hover::after,
.bible-divider.dragging::after {
    color: #fff !important;
}

/* 좌측 패널 기본 너비 — 드래그로 조절 가능 (!important 금지) */
.bible-layout {
    --bible-panel-left-pct: 42%;
}

#bible-panel-left {
    width: var(--bible-panel-left-pct, 42%);
    flex: 0 0 auto;
    max-width: 80%;
    min-width: 20%;
}

/* 패널 헤더 — path-bar 변수 (위 규칙과 동일, 컬러세트 연동) */

/* 구절 행 hover — 컬러세트 연동 */
.bible-verse-rows:hover,
.bible-verse-rows-etc:hover,
.bible-version-verse-rows:hover,
#biblecontents tbody tr:hover,
#biblecontents tbody tr:hover td,
.bible-verse-table-body tr:hover,
.bible-verse-table-body tr:hover td {
    background-color: var(--wb-hover-bg) !important;
}

/* 선택된 구절 (왼쪽 패널) — reader 설정 배경보다 우선 */
#biblecontents tbody tr.bible-verse-rows.select,
#biblecontents tbody tr.bible-verse-rows.select td,
.bible-verse-table-body tr.bible-verse-rows.select,
.bible-verse-table-body tr.bible-verse-rows.select td,
.bible-verse-rows.select {
    background-color: var(--wb-verse-select-bg, #ffe2e2) !important;
}

#biblecontents tbody tr.bible-verse-rows.select:hover,
#biblecontents tbody tr.bible-verse-rows.select:hover td,
.bible-verse-table-body tr.bible-verse-rows.select:hover,
.bible-verse-table-body tr.bible-verse-rows.select:hover td {
    background-color: var(--wb-verse-select-bg, #ffe2e2) !important;
}

/* 스크롤바 */
.bible-layout ::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.wb-modal .modal-body::-webkit-scrollbar {
    width: 5px;
}

.bible-layout ::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.wb-modal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.bible-layout ::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.wb-modal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

/* ── 상단바: 좁은 화면 햄버거 서브메뉴 ── */
.wb-top-actions {
    gap: 2px;
    flex-shrink: 0;
}

.wb-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.wb-top-btn i { font-size: 17px; line-height: 1; }

.wb-top-btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.wb-top-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.wb-top-btn-solid {
    background: #fff;
    color: #1565c0;
}

.wb-top-btn-solid:hover {
    background: #e9f0fb;
    color: #0c2647;
}

.wb-top-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.12s;
}

.wb-top-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.wb-top-icon i { font-size: 20px; line-height: 1; }

.wb-top-actions-desktop {
    gap: 2px;
}

.wb-top-menu {
    min-width: 210px;
    padding: 6px 0;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    margin-top: 6px !important;
}

.wb-top-menu .dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #263238;
}

.wb-top-menu .dropdown-item i {
    font-size: 18px;
    color: #546e7a;
    width: 22px;
}

.wb-top-menu .dropdown-item:hover,
.wb-top-menu .dropdown-item:focus {
    background: #eaf1fb;
    color: #163a66;
}

.wb-top-menu .dropdown-divider {
    margin: 4px 0;
}

/* 로그인 시 메뉴 토글 — 넓은 화면: 프로필 / 좁은 화면: 햄버거 (bootstrap img{width:100%} 무력화) */
#page-topbar .wb-top-menu-toggle--auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: min(180px, 36vw);
    height: 40px;
    padding: 0 6px;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
    transition: background 0.12s;
}

#page-topbar .wb-top-menu-toggle--auth:hover,
#page-topbar .wb-top-menu-toggle--auth[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

#page-topbar .wb-top-menu-toggle-profile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

#page-topbar .wb-top-menu-toggle-burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

#page-topbar .wb-top-menu-toggle-burger i {
    font-size: 20px;
    line-height: 1;
}

#page-topbar .wb-top-menu-toggle--auth .header-profile-user,
#page-topbar .wb-top-menu-toggle--auth img {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    min-width: 32px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
}

#page-topbar .wb-top-profile-trigger-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 96px;
}

#page-topbar .wb-top-profile-trigger-chevron {
    font-size: 18px;
    line-height: 1;
    color: #fff;
    opacity: 0.85;
    flex-shrink: 0;
}

/* 스마트폰 — 프로필 대신 햄버거 아이콘 (태블릿 768px~ 은 데스크톱 헤더) */
@media (max-width: 767.98px) {
    #page-topbar .wb-top-menu-toggle--auth {
        width: 40px;
        max-width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
    }

    #page-topbar .wb-top-menu-toggle-profile {
        display: none !important;
    }

    #page-topbar .wb-top-menu-toggle-burger {
        display: inline-flex !important;
    }
}

.wb-top-menu-profile {
    list-style: none;
    padding: 12px 14px 10px;
    margin: 0;
}

.wb-top-menu-profile-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wb-top-menu-profile-avatar {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e3eaf5;
}

.wb-top-menu-profile-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wb-top-menu-profile-name {
    font-size: 15px;
    font-weight: 700;
    color: #163a66;
    line-height: 1.3;
}

.wb-top-menu-profile-id,
.wb-top-menu-profile-email {
    font-size: 12px;
    color: #607d8b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-top-menu-profile-service {
    display: block;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
    border: 1px solid #cfe3f5;
    text-decoration: none;
    color: inherit;
}

.wb-top-menu-profile-service:hover {
    background: linear-gradient(135deg, #dceefb 0%, #e8f2fc 100%);
    color: inherit;
}

.wb-top-menu-profile-service--empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f5f7fa;
    font-size: 12px;
    color: #607d8b;
}

.wb-top-menu-profile-service--empty a {
    font-size: 12px;
    font-weight: 600;
    color: #1565c0;
    text-decoration: none;
    white-space: nowrap;
}

.wb-top-menu-profile-service-type {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 4px;
}

.wb-top-menu-profile-service-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.wb-top-menu-profile-service-name {
    font-size: 13px;
    font-weight: 700;
    color: #163a66;
    line-height: 1.3;
    min-width: 0;
}

.wb-top-menu-profile-service-remain {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: #2e7d32;
    white-space: nowrap;
}

.wb-top-menu-profile-service-period {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #607d8b;
}

.wb-top-menu-profile-links {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
}

.wb-top-menu-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 8px;
    background: #f0f4fa;
    color: #37474f !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.wb-top-menu-profile-link:hover {
    background: #e3ecf8;
    color: #163a66 !important;
}

.wb-top-menu-profile-link i {
    font-size: 15px;
    color: #546e7a !important;
}

#page-topbar .wb-top-menu .wb-top-menu-profile-name,
#page-topbar .wb-top-menu .wb-top-menu-profile-id,
#page-topbar .wb-top-menu .wb-top-menu-profile-email {
    color: inherit;
}

/* ── 헤더 글로벌 네비 · PC 전체화면 ── */
.wb-topbar-page-tools:empty {
    display: none !important;
}

.wb-global-nav {
    gap: 2px;
    margin-right: 4px;
}

.wb-global-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
}

.wb-global-nav-link i {
    font-size: 17px;
    line-height: 1;
}

.wb-global-nav-link:hover,
.wb-global-nav-link.is-active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.wb-fs-pc-only {
    display: none !important;
}

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
    .wb-fs-pc-only {
        display: inline-flex !important;
    }
}

#page-topbar .wb-topbar-auth-desktop .user-name-text,
#page-topbar .wb-topbar-auth-desktop .header-profile-user {
    color: #fff;
}

/* 홈 헤더 — 로고 항상 표시 · 세로 가운데 정렬 */
#page-topbar:has(.wb-home-navbar) .layout-width {
    display: flex;
    align-items: center;
    min-height: var(--wb-header-h, 56px);
    padding-left: max(14px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
    box-sizing: border-box;
}

.wb-home-navbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    width: 100%;
    min-height: var(--wb-header-h, 56px);
    padding: 0 !important;
    box-sizing: border-box;
}

.wb-home-navbar-left,
#page-topbar .wb-home-navbar .navbar-brand-box.horizontal-logo {
    flex-shrink: 0;
}

.wb-home-navbar-left {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    height: 100%;
}

#page-topbar .wb-home-navbar .navbar-brand-box.horizontal-logo {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0 !important;
}

#page-topbar .wb-home-navbar a.logo,
#page-topbar .wb-home-navbar .logo-sm {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0 !important;
}

#page-topbar .wb-home-navbar .logo-sm img {
    display: block;
    height: 33px;
    width: auto;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
}

/* 스마트폰 — 홈: 로고 + 햄버거만 */
@media (max-width: 767.98px) {
    #page-topbar .wb-top-auth-guest-btns {
        display: none !important;
    }

    #page-topbar .wb-top-globe-link {
        display: none !important;
    }

    .wb-home-navbar {
        align-items: center !important;
        min-height: var(--wb-header-h, 56px);
    }

    .wb-home-navbar-left {
        display: flex !important;
        align-items: center !important;
    }

    #page-topbar .wb-home-navbar .navbar-brand-box.horizontal-logo {
        display: flex !important;
        align-items: center !important;
        line-height: 0;
    }

    #page-topbar .wb-home-navbar .logo-sm img {
        display: block;
        height: 33px;
        width: auto;
        max-width: 160px;
        object-fit: contain;
    }
}

/* iPad·태블릿(768~1366) — 헤더 전체 폭·검색·도구 표시 */
@media (min-width: 768px) and (max-width: 1366px) {
    #page-topbar .layout-width {
        max-width: 100%;
        width: 100%;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    #page-topbar .wb-home-navbar .navbar-brand-box.horizontal-logo {
        display: flex !important;
        align-items: center !important;
        line-height: 0;
    }

    #page-topbar .wb-home-navbar .logo-sm img {
        height: 33px;
        width: auto;
        max-width: 180px;
        object-fit: contain;
    }

    .wb-bible-navbar-center #bible-topbar-biblename {
        width: 110px;
        min-width: 96px;
    }

    .wb-bible-navbar-center #search-topbar {
        width: 140px;
        min-width: 120px;
    }

    .wb-books-navbar-main .wb-header-search,
    .wb-books-navbar-main .wb-books-navbar-center.wb-header-search,
    .wb-books-navbar-detail .wb-header-search,
    .wb-books-navbar-detail .wb-books-navbar-center.wb-header-search {
        display: block !important;
        width: min(400px, 44vw);
    }

    .wb-books-navbar-detail {
        grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
    }

    .wb-books-navbar-detail .wb-books-category-badge {
        display: inline-flex;
    }

    .wb-topbar-page-tools {
        display: flex !important;
        flex-wrap: nowrap;
        gap: 2px;
    }

    #page-topbar:has(.wb-books-navbar) .wb-fs-pc-only {
        display: inline-flex !important;
    }
}

/* 스마트폰 — 성경 헤더 축소 */
@media (max-width: 767.98px) {
    #page-topbar .navbar-header.wb-bible-navbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }

    .wb-bible-navbar-left {
        display: none !important;
    }

    .wb-bible-navbar-center {
        flex: 1 1 auto;
        justify-self: auto;
        justify-content: flex-start;
        min-width: 0;
        max-width: none;
    }

    .wb-bible-navbar-right {
        flex: 0 0 auto;
        justify-self: auto;
    }

    .wb-bible-navbar-center .header-item.d-none.d-md-flex {
        display: flex !important;
    }

    .wb-bible-navbar-center #bible-topbar-biblename {
        width: 88px;
        min-width: 72px;
    }

    .wb-bible-navbar-center #search-topbar {
        width: 88px;
        min-width: 64px;
    }
}

/* 자료 헤더 — 공통 그리드 (좌·중앙검색·우 대칭) */
.wb-books-navbar {
    display: grid;
    grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
}

.wb-books-navbar-left {
    justify-self: start;
    min-width: 0;
    max-width: 100%;
}

.wb-books-navbar-center.wb-header-search {
    justify-self: center;
    width: min(420px, 46vw);
    max-width: 100%;
    margin: 0;
}

.wb-books-navbar-right {
    justify-self: end;
    min-width: 0;
}

.wb-books-navbar-main .wb-header-search,
.wb-books-navbar-main .wb-books-navbar-center.wb-header-search {
    justify-self: center;
}

.wb-books-title-btn {
    min-width: 0;
    max-width: 100%;
}

.wb-books-title-text {
    font-size: 1.15em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 36vw;
}

.wb-books-navbar-detail .wb-books-title-text {
    font-size: 1.05em;
    max-width: min(200px, 22vw);
}

.wb-books-navbar-detail .wb-header-search-pill {
    width: 100%;
    justify-content: center;
}

.wb-books-toc-header-btn {
    flex-shrink: 0;
}

.wb-top-actions > .wb-books-toc-header-btn {
    order: 10;
}

.wb-top-actions > .wb-fs-toggle {
    order: 11;
}

.wb-top-actions > .dropdown:last-child {
    order: 12;
}

/* 자료 본문(detail) — 중앙 검색 숨김 시 우측 검색 아이콘 */
.wb-books-search-mobile-btn {
    display: none !important;
}

@media (max-width: 767.98px) {
    .wb-books-navbar-detail .wb-books-search-mobile-btn {
        display: inline-flex !important;
    }
}

/* 자료 본문(detail) · 스마트폰 */
@media (max-width: 767.98px) {
    .wb-books-navbar-detail {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .wb-books-navbar-detail .wb-header-search {
        display: none !important;
    }

    .wb-books-navbar-detail .wb-books-title-text {
        max-width: 100%;
    }

    .wb-books-navbar-detail .wb-books-category-badge {
        display: none;
    }

    .wb-books-navbar-detail .wb-books-title-btn .bx-book {
        display: none;
    }

    .wb-books-navbar-detail .wb-books-title-text {
        font-size: 1em;
    }

    .wb-books-navbar-main {
        grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
    }

    .wb-books-navbar-main .wb-books-title-text {
        max-width: min(180px, 28vw);
    }

    .wb-books-navbar-main .wb-books-category-badge {
        display: none;
    }
}

/* 자료 메인 — 가로 부족 시 헤더 요소 축소·숨김 */
@media (max-width: 1199.98px) {
    .wb-books-navbar-main .wb-books-category-badge {
        display: none;
    }

    .wb-books-navbar-main .wb-books-title-text {
        max-width: min(150px, 24vw);
        font-size: 1em;
    }

    .wb-books-navbar-main .wb-books-navbar-center.wb-header-search {
        width: min(260px, 34vw);
    }
}

@media (max-width: 991.98px) {
    .wb-books-navbar-main .wb-books-title-text {
        max-width: min(110px, 20vw);
    }

    .wb-books-navbar-main .wb-books-navbar-center.wb-header-search {
        width: min(200px, 30vw);
    }

    .wb-books-navbar-main .wb-header-search-pill {
        padding: 5px 12px;
        font-size: 12px;
    }

    .wb-books-toc-header-btn span {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .wb-books-navbar-main {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .wb-books-navbar-main .wb-header-search,
    .wb-books-navbar-main .wb-books-navbar-center.wb-header-search {
        display: none !important;
    }

    .wb-books-navbar-main .wb-books-title-text {
        max-width: 100%;
    }
}

/* 푸터 자료 모달 — 좁은 화면 전체화면 + 자동 열 */
@media (max-width: 767.98px),
       ((hover: none) and (pointer: coarse) and (max-width: 1366px)) {
    #booksLibraryModal .modal-dialog {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 100% !important;
        margin: 0 !important;
    }

    #booksLibraryModal .modal-content {
        border-radius: 0 !important;
        height: 100% !important;
    }

    #booksLibraryModal .lib-books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
    }

    #booksLibraryModal .lib-book-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* 찬양 · 좁은 가로 — 좌측 대분류 세로 목록 + 우측 찬송 목록 */
@media (max-width: 991.98px),
       ((hover: none) and (pointer: coarse) and (max-width: 1366px)) {
    .wb-praise-layout {
        grid-template-columns: minmax(108px, 30%) minmax(0, 1fr) !important;
        gap: 8px !important;
        margin-top: 8px;
        min-height: calc(100dvh - var(--wb-header-h, 70px) - 180px);
    }

    .wb-praise-tags {
        position: sticky;
        top: calc(var(--wb-header-h, 70px) + 8px);
        max-height: calc(100dvh - var(--wb-header-h, 70px) - 24px);
        align-self: start;
    }

    .wb-praise-tag-list {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        gap: 4px !important;
        padding: 6px !important;
    }

    .wb-praise-tag {
        flex: 0 0 auto !important;
        width: 100% !important;
        white-space: normal !important;
        text-align: left;
        font-size: 13px !important;
        padding: 9px 10px !important;
    }
}

@media (max-width: 767.98px) {
    .navbar-header {
        gap: 4px;
    }
}

/* ── 성경 서비스 헤더: 말씀·검색·찬양(오디오) 중앙 정렬 ── */
#page-topbar .navbar-header.wb-bible-navbar {
    display: grid;
    grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
    align-items: center;
    gap: 8px;
}

.wb-bible-navbar-left {
    justify-self: start;
    min-width: 0;
}

.wb-bible-navbar-center {
    justify-self: center;
    flex-wrap: nowrap;
    gap: 6px;
    max-width: 100%;
}

.wb-bible-navbar-center .header-item {
    margin-left: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.wb-bible-navbar-center .wb-audio-topbar-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
}

.wb-bible-navbar-center .wb-audio-topbar-icon {
    line-height: 1;
    display: block;
}

.wb-bible-navbar-center #bible-topbar-biblename {
    width: 100px;
    min-width: 84px;
}

.wb-bible-navbar-center #search-topbar {
    width: 120px;
    min-width: 88px;
}

.wb-bible-navbar-right {
    justify-self: end;
    min-width: 0;
}

.wb-bible-navbar-right .wb-top-actions {
    margin-left: 0 !important;
}

@media (max-width: 767.98px) {
    #page-topbar .navbar-header.wb-bible-navbar {
        grid-template-columns: auto 1fr auto;
        gap: 4px;
    }

    .wb-bible-navbar-center #search-topbar {
        width: 96px;
        min-width: 72px;
    }

    .wb-bible-navbar-left .user-name-text {
        display: none !important;
    }
}

/* ── 오디오 성경 (레코드 플레이어 · 붉은색 계열) ── */
:root {
    --wb-audio-red-deep: #5c1010;
    --wb-audio-red-mid: #b71c1c;
    --wb-audio-red-bright: #e53935;
    --wb-audio-red-soft: #ffcdd2;
    --wb-audio-bg-dark: #2a1212;
    --wb-audio-bg-mid: #1a0c0c;
}

/* 미니 플레이어 표시 시 우측 패널 — 스크롤 맨 끝(하단) 흰 여백 */
body.wb-audio-mini-on #bible-panel-right {
    padding-bottom: 80px;
    box-sizing: border-box;
}

body.wb-audio-mini-on #bible-panel-right #bible_detail_contents_1,
body.wb-audio-mini-on #bible-panel-right #bible_detail_loading_1 {
    padding-bottom: 8px;
}

#audioBibleModal.wb-modal .modal-dialog,
#audioBibleModal .wb-audio-modal-dialog {
    width: min(92vw, 380px) !important;
    max-width: min(92vw, 380px) !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    pointer-events: auto !important;
}

#audioBibleModal.wb-modal .modal-dialog.wb-audio-modal-dragged,
#audioBibleModal .wb-audio-modal-dialog.wb-audio-modal-dragged {
    position: fixed !important;
    margin: 0 !important;
    transform: none !important;
    pointer-events: auto !important;
}

#audioBibleModal .wb-audio-modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(92, 16, 16, 0.38);
    height: auto !important;
    max-height: none !important;
}

#audioBibleModal .wb-audio-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: linear-gradient(135deg, var(--wb-audio-red-deep), var(--wb-audio-red-mid)) !important;
    border-bottom: none !important;
    padding: 10px 12px 10px 14px !important;
    cursor: move;
    user-select: none;
    flex-shrink: 0;
    touch-action: none;
    -webkit-user-select: none;
}

#audioBibleModal .wb-audio-modal-header .modal-title {
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#audioBibleModal .wb-audio-modal-header .modal-title i {
    color: #fff !important;
}

.wb-audio-win-btns {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.wb-audio-win-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.wb-audio-win-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

#audioBibleModal .wb-audio-modal-body {
    background: linear-gradient(165deg, var(--wb-audio-bg-dark) 0%, var(--wb-audio-bg-mid) 55%, #3d1818 100%);
    padding: 14px 16px 16px !important;
    color: #e8edf5;
    flex: 0 0 auto !important;
    overflow: visible !important;
}

.wb-audio-topbar-btn.is-playing {
    position: relative;
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.55);
}

.wb-audio-topbar-btn.is-playing .wb-audio-topbar-icon {
    color: #ff8a80 !important;
    animation: wb-audio-icon-pulse 1.4s ease-in-out infinite;
}

.wb-audio-topbar-btn.is-paused .wb-audio-topbar-icon {
    color: #ef9a9a !important;
}

@keyframes wb-audio-icon-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(1.08); }
}

.wb-audio-top-row {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.wb-audio-ver-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #e8edf5 !important;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px !important;
    padding: 6px 14px !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wb-audio-ver-btn:hover,
.wb-audio-ver-btn:focus {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
}

.wb-audio-ver-menu .dropdown-item {
    font-size: 13px;
    font-weight: 600;
    padding: 9px 14px;
}

.wb-audio-ver-menu .wb-audio-ver-item.active {
    background: #ffebee;
    color: var(--wb-audio-red-deep);
}

.wb-audio-select-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.wb-audio-book-select,
.wb-audio-ch-select {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.wb-audio-book-select option,
.wb-audio-ch-select option {
    color: #222;
    background: #fff;
}

.wb-vinyl-stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 148px;
    margin-bottom: 12px;
}

.wb-vinyl-arm {
    position: absolute;
    top: 12px;
    right: calc(50% - 86px);
    width: 7px;
    height: 58px;
    background: linear-gradient(90deg, #8a9ab0, #c5d0de);
    border-radius: 4px;
    transform-origin: top center;
    transform: rotate(-28deg);
    transition: transform 0.5s ease;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.wb-vinyl-arm::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    background: #546e7a;
    border-radius: 50%;
}

.wb-vinyl-stage.is-playing .wb-vinyl-arm {
    transform: rotate(-6deg);
}

.wb-vinyl-disc {
    position: relative;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle at center, #111 0 2px, #1a1a1a 2px 4px),
        radial-gradient(circle at center, #2a2a2a 0%, #0a0a0a 70%);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
    animation: none;
}

.wb-vinyl-disc.is-playing {
    animation: wb-vinyl-spin 4s linear infinite;
}

@keyframes wb-vinyl-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wb-vinyl-grooves {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.wb-vinyl-label {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 58px;
    height: 58px;
    margin: -29px 0 0 -29px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wb-audio-red-bright), var(--wb-audio-red-deep));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
    padding: 4px;
}

.wb-vinyl-label span {
    display: block;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wb-audio-progress-wrap {
    margin-bottom: 10px;
}

.wb-audio-seek {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.wb-audio-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--wb-audio-red-bright);
    box-shadow: 0 0 8px rgba(229, 57, 53, 0.55);
}

.wb-audio-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 4px;
}

.wb-audio-ctrl-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wb-audio-ctrl {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #e8edf5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
}

.wb-audio-ctrl:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.06);
}

.wb-audio-ctrl-main {
    width: 50px;
    height: 50px;
    font-size: 26px;
    background: linear-gradient(135deg, var(--wb-audio-red-bright), var(--wb-audio-red-deep));
    box-shadow: 0 4px 16px rgba(183, 28, 28, 0.45);
}

.wb-audio-ctrl-main:hover {
    background: linear-gradient(135deg, #ef5350, #8b1515);
}

.wb-audio-error {
    margin: 10px 0 0;
    font-size: 12px;
    color: #ff8a80;
    text-align: center;
}

/* 미니 플레이어 (− 버튼으로만 표시) */
.wb-audio-mini-bar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%) translateY(120%);
    z-index: 1040;
    width: min(92vw, 400px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.wb-audio-mini-bar.is-positioned {
    left: auto;
    bottom: auto;
    transform: translateY(120%);
}

.wb-audio-mini-bar.is-visible:not(.is-positioned) {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.wb-audio-mini-bar.is-visible.is-positioned {
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

.wb-audio-mini-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 8px;
    background: linear-gradient(135deg, var(--wb-audio-red-deep), var(--wb-audio-red-mid));
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(92, 16, 16, 0.38);
    color: #fff;
}

.wb-audio-mini-drag {
    flex-shrink: 0;
    width: 28px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.wb-audio-mini-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wb-audio-mini-info span:first-child {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-audio-mini-ver {
    font-size: 11px;
    opacity: 0.75;
}

.wb-audio-mini-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.wb-audio-mini-controls button {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-audio-mini-controls button:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* ── 홈·자료·사전 공통 히어로 검색 (알약형) ── */
.wb-home,
.wb-dic-wrap,
.wb-praise-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px 24px;
}

.wb-hero {
    position: relative;
    margin-top: 18px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, #e4eefb 0%, #d3e3f6 100%);
    border: 1px solid #cdddf0;
}

.wb-hero-inner {
    position: relative;
    z-index: 1;
    padding: 28px 28px 30px;
    text-align: center;
    color: #2b3a44;
}

.wb-hero-sub {
    font-size: clamp(13px, 1.6vw, 16px);
    color: #51647a;
    font-weight: 500;
    margin: 0 0 22px;
}

.wb-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 620px;
    margin: 0 auto;
    background: #fff;
    border-radius: 999px;
    padding: 5px 5px 5px 20px;
    border: 1px solid #dbe6f3;
    box-shadow: 0 6px 18px rgba(47, 127, 209, 0.12);
}

.wb-search i.bx {
    color: #90a4ae;
    font-size: 20px;
    align-self: center;
}

.wb-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
    min-width: 0;
    color: #263238;
}

.wb-search input::placeholder {
    color: #b0bec5;
}

.wb-search button,
.wb-search .wb-sr-submit,
.wb-search #dictionary_submit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #163a66, #2f7fd1);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 11px 30px;
    border-radius: 999px;
    min-height: 44px;
    min-width: 72px;
    line-height: 1.2;
    box-sizing: border-box;
    transition: filter 0.15s, transform 0.1s;
}

.wb-search button:hover,
.wb-search .wb-sr-submit:hover,
.wb-search #dictionary_submit:hover {
    filter: brightness(1.12);
}

.wb-search button:active,
.wb-search .wb-sr-submit:active,
.wb-search #dictionary_submit:active {
    transform: scale(0.97);
}

.wb-search-combo-wrap {
    padding-left: 8px;
    align-items: center;
}

.wb-search-combo-wrap .wb-search-combo {
    flex-shrink: 0;
    border: none;
    border-right: 1px solid #e3ebf5;
    background: transparent;
    color: #37474f;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 28px 6px 10px;
    min-width: 96px;
    max-width: 110px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237986cb' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.wb-search-combo-wrap .wb-search-combo:focus {
    color: #1a237e;
}

.wb-search-combo-wrap input {
    padding-left: 12px;
}

.wb-dic-wrap .wb-search {
    max-width: 780px;
}

.wb-dic-wrap .wb-search-combo-wrap .wb-search-combo {
    min-width: 132px;
    max-width: 168px;
    font-size: 12px;
    line-height: 1.25;
    padding-right: 24px;
}

.wb-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #37474f;
    margin: 30px 4px 14px;
}

.wb-section-title::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: #2f7fd1;
}

.wb-dic-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 18px auto 0;
    max-width: 760px;
}

.wb-dic-tabs .wb-dic-tab {
    border: 1px solid #e3ebf5;
    border-radius: 999px;
    padding: 7px 16px;
    font-weight: 600;
    font-size: 13px;
    color: #51647a;
    background: #f4f7fb;
    cursor: pointer;
    transition: all 0.18s ease;
}

.wb-dic-tabs .wb-dic-tab:hover,
.wb-dic-tabs .wb-dic-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #163a66, #2f7fd1);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(47, 127, 209, 0.22);
}

.wb-dic-recent-card {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #eceff3;
    border-radius: 14px;
    padding: 12px 16px;
}

.wb-dic-recent-card .label {
    font-size: 12px;
    font-weight: 700;
    color: #607d8b;
    margin-bottom: 8px;
}

#dictionary_recent_keyword {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

@media (max-width: 768px) {
    .wb-hero-inner {
        padding: 22px 16px 24px;
    }

    .wb-search {
        padding-left: 14px;
    }
}

/* ── 사전 서비스 UI (dictionary) — 목록·결과 ── */
.wb-dic-search-bar {
    background: var(--wb-bg, #fff);
    border: 1px solid var(--wb-border, #e9ecef);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
}

.wb-dic-search-bar .form-control,
.wb-dic-search-bar .form-select {
    border-color: var(--wb-path-border, #d8e2f0) !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
}

.wb-dic-search-bar .form-control:focus,
.wb-dic-search-bar .form-select:focus {
    border-color: var(--wb-path-accent, #1a56a8) !important;
    box-shadow: 0 0 0 0.15rem rgba(26, 86, 168, 0.12) !important;
}

.wb-dic-search-bar .btn-primary {
    border-radius: 10px !important;
    background: var(--wb-path-accent, #1a56a8) !important;
    border-color: var(--wb-path-accent, #1a56a8) !important;
    font-weight: 600;
}

.wb-dic-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--wb-path-bg, #f4f6fb) !important;
    border-bottom: 1px solid var(--wb-path-border, #d8e2f0) !important;
    padding: 0.85rem 1.25rem !important;
}

.wb-dic-section-header .wb-dic-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--wb-path-text, #243b55);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wb-dic-section-header .wb-dic-title i {
    color: var(--wb-path-accent, #1a56a8);
    font-size: 1.25rem;
}

.wb-dic-section-header .wb-dic-meta {
    font-size: 0.82rem;
    color: var(--wb-path-muted, #5a6a7a);
    font-weight: 500;
}

.wb-dic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    padding: 4px 0;
}

.wb-dic-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 1rem 1.1rem;
    border: 1px solid var(--wb-path-border, #d8e2f0);
    border-radius: 12px;
    background: var(--wb-bg, #fff);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
    min-height: 88px;
}

.wb-dic-card:hover {
    border-color: var(--wb-path-accent, #1a56a8);
    box-shadow: 0 4px 14px rgba(26, 86, 168, 0.1);
    transform: translateY(-1px);
}

.wb-dic-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
}

.wb-dic-card-icon.cat-heb { background: linear-gradient(135deg, #5c6bc0, #3949ab); }
.wb-dic-card-icon.cat-hel { background: linear-gradient(135deg, #7e57c2, #5e35b1); }
.wb-dic-card-icon.cat-en  { background: linear-gradient(135deg, #1a56a8, #0d3d7a); }
.wb-dic-card-icon.cat-ko  { background: linear-gradient(135deg, #2e7d32, #1b5e20); }
.wb-dic-card-icon.cat-default { background: linear-gradient(135deg, #546e7a, #37474f); }

.wb-dic-card-body h3 {
    margin: 0 0 4px;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--wb-path-text, #243b55);
    line-height: 1.35;
}

.wb-dic-card-body p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--wb-path-muted, #5a6a7a);
    line-height: 1.4;
}

.wb-dic-recent {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--wb-path-border, #d8e2f0);
}

.wb-dic-recent-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--wb-path-muted, #5a6a7a);
    margin-bottom: 8px;
}

.wb-dic-chip {
    display: inline-block;
    padding: 5px 14px;
    margin: 3px 6px 3px 0;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--wb-path-border, #d8e2f0);
    background: var(--wb-path-bg, #f4f6fb);
    color: var(--wb-path-accent, #1a56a8);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.wb-dic-chip:hover {
    background: var(--wb-path-accent, #1a56a8);
    border-color: var(--wb-path-accent, #1a56a8);
    color: #fff;
}

.wb-dic-result-card {
    border: 1px solid var(--wb-path-border, #d8e2f0);
    border-radius: 12px;
    background: var(--wb-bg, #fff);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.wb-dic-result-card:hover {
    box-shadow: 0 3px 12px rgba(36, 59, 85, 0.08);
}

.wb-dic-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0.7rem 1rem;
    background: var(--wb-path-bg, #f4f6fb);
    border-bottom: 1px solid var(--wb-path-border, #d8e2f0);
}

.wb-dic-result-head .dic-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--wb-path-accent, #1a56a8);
    margin: 0;
}

.wb-dic-result-head .dic-count {
    font-size: 0.78rem;
    color: var(--wb-path-muted, #5a6a7a);
}

.wb-dic-result-body {
    padding: 0.85rem 1rem 1rem;
}

.wb-dic-entry {
    display: grid;
    grid-template-columns: minmax(120px, 22%) 1fr;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--wb-border, #e9ecef);
    align-items: start;
}

.wb-dic-entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.wb-dic-word-col {
    font-family: var(--font-original);
}

.wb-dic-word-col .wb-dic-word-main {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--wb-path-accent, #1a56a8);
    margin: 0 0 4px;
    line-height: 1.3;
}

.wb-dic-word-col .wb-dic-word-sub {
    font-size: 0.88rem;
    color: var(--wb-path-muted, #5a6a7a);
    margin: 2px 0;
    line-height: 1.35;
}

.wb-dic-mean-col {
    font-size: 0.95rem;
    color: var(--wb-text, #222);
    line-height: 1.65;
}

.wb-dic-mean-col .wb-dic-preview {
    color: var(--wb-muted, #6c757d);
    margin-bottom: 8px;
}

.wb-dic-btn-detail {
    font-size: 0.82rem !important;
    padding: 4px 12px !important;
    border-radius: 8px !important;
    border-color: var(--wb-path-accent, #1a56a8) !important;
    color: var(--wb-path-accent, #1a56a8) !important;
}

.wb-dic-btn-detail:hover {
    background: var(--wb-path-accent, #1a56a8) !important;
    color: #fff !important;
}

.wb-dic-preview-link {
    display: block;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s;
}

.wb-dic-preview-link:hover {
    background: var(--wb-path-bg, #f4f6fb);
}

.wb-dic-preview-link .preview-word {
    font-weight: 700;
    color: var(--wb-path-accent, #1a56a8);
    font-size: 0.92rem;
}

.wb-dic-preview-link .preview-mean {
    margin: 4px 0 0 12px;
    font-size: 0.84rem;
    color: var(--wb-path-muted, #5a6a7a);
    line-height: 1.5;
}

.wb-dic-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--wb-border, #e9ecef);
}

.wb-dic-pager .btn {
    min-width: 36px;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
}

.wb-dic-pager .btn-primary {
    background: var(--wb-path-accent, #1a56a8) !important;
    border-color: var(--wb-path-accent, #1a56a8) !important;
}

.wb-dic-pager-info {
    font-size: 0.84rem;
    color: var(--wb-path-muted, #5a6a7a);
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--wb-path-bg, #f4f6fb);
    border-radius: 8px;
    border: 1px solid var(--wb-path-border, #d8e2f0);
}

.wb-dic-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: var(--wb-path-bg, #f4f6fb);
    border: 1px solid var(--wb-path-border, #d8e2f0);
    border-radius: 10px;
}

.wb-dic-filter-bar label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wb-path-muted, #5a6a7a);
    margin: 0;
}

.wb-dic-filter-bar .form-select {
    width: auto;
    min-width: 200px;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
}

.wb-dic-empty,
.wb-dic-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 3rem 1rem;
    color: var(--wb-path-muted, #5a6a7a);
    font-size: 0.95rem;
}

.wb-dic-modal .modal-content {
    border-radius: 12px;
    border: 1px solid var(--wb-path-border, #d8e2f0);
}

.wb-dic-modal .modal-header {
    background: var(--wb-path-bg, #f4f6fb);
    border-bottom: 1px solid var(--wb-path-border, #d8e2f0);
}

.wb-dic-modal .modal-title {
    font-weight: 700;
    color: var(--wb-path-text, #243b55);
    font-family: var(--font-original);
}

.wb-dic-modal .modal-body {
    font-size: var(--bible-font-size);
    line-height: 1.75;
    color: var(--wb-text, #222);
}

@media (max-width: 768px) {
    .wb-dic-grid {
        grid-template-columns: 1fr;
    }

    .wb-dic-entry {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .wb-dic-search-bar {
        padding: 1rem;
    }
}

/* ── 성경 찬송가 모달 (블루 테마 · 찬송 서비스 레이아웃) ── */
#mp3PlayerModal.wb-praise-modal .modal-dialog {
    width: min(96vw, 560px) !important;
    max-width: min(96vw, 560px) !important;
    height: min(94vh, 720px) !important;
    max-height: min(94vh, 720px) !important;
    min-height: min(94vh, 720px) !important;
    margin: 0 auto !important;
}

#mp3PlayerModal.wb-praise-modal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
    height: 100%;
    display: flex;
    flex-direction: column;
}

#mp3PlayerModal .bp-header {
    background: linear-gradient(135deg, #163a66 0%, #2f7fd1 60%, #4a9ae8 100%);
    padding: 14px 16px 10px;
    flex-shrink: 0;
    position: relative;
}

#mp3PlayerModal .bp-num {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

#mp3PlayerModal .bp-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
}

#mp3PlayerModal .bp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

#mp3PlayerModal .bp-badge {
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    padding: 2px 9px;
    display: inline-block;
}

#mp3PlayerModal .bp-badge-cat {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

#mp3PlayerModal .bp-badge-bible {
    background: #bbdefb;
    color: #0d47a1;
}

#mp3PlayerModal .btn-close-bp {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    padding: 0;
}

#mp3PlayerModal .btn-close-bp:hover {
    opacity: 1;
}

#mp3PlayerModal .bp-player {
    background: #eef4fb;
    padding: 10px 14px 6px;
    flex-shrink: 0;
    border-bottom: 1px solid #d0e3f5;
}

#mp3PlayerModal #bible-praise-waveform {
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

#mp3PlayerModal .bp-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 6px 0 4px;
}

#mp3PlayerModal .bp-controls .btn {
    min-width: 44px;
    padding: 5px 12px;
}

#mp3PlayerModal .bp-controls .btn-primary {
    background: linear-gradient(135deg, #163a66, #2f7fd1);
    border-color: #163a66;
}

#mp3PlayerModal .bp-controls .btn-outline-primary {
    color: #1a56a8;
    border-color: #90caf9;
}

#mp3PlayerModal .bp-time {
    font-size: 11px;
    color: #546e7a;
    min-width: 80px;
    text-align: center;
}

#mp3PlayerModal .bp-tabs {
    display: flex;
    gap: 0;
    background: #f0f6fc;
    flex-shrink: 0;
    border-bottom: 2px solid #90caf9;
}

#mp3PlayerModal .bp-tab {
    flex: 1;
    padding: 8px 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #1a56a8;
    cursor: pointer;
    border: none;
    background: none;
    transition: background 0.12s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

#mp3PlayerModal .bp-tab.active {
    color: #163a66;
    border-bottom-color: #2f7fd1;
    background: #fff;
}

#mp3PlayerModal .bp-tab:hover {
    background: #e3f0fb;
}

#mp3PlayerModal .bp-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 14px;
    -webkit-overflow-scrolling: touch;
}

#mp3PlayerModal .bp-body::-webkit-scrollbar {
    width: 3px;
}

#mp3PlayerModal .bp-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

#mp3PlayerModal .bp-tab-pane {
    display: none;
}

#mp3PlayerModal .bp-tab-pane.active {
    display: block;
}

#mp3PlayerModal .bp-lyric {
    font-size: 14px;
    line-height: 2;
    color: #333;
    white-space: pre-wrap;
    word-break: keep-all;
}

#mp3PlayerModal .bp-info-section {
    background: #f0f6fc;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-left: 3px solid #64b5f6;
}

#mp3PlayerModal .bp-info-section h6 {
    font-size: 11px;
    font-weight: 700;
    color: #1a56a8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 5px;
}

#mp3PlayerModal .bp-info-section p {
    font-size: 13px;
    line-height: 1.7;
    color: #444;
    margin: 0;
    white-space: pre-wrap;
    word-break: keep-all;
}

#mp3PlayerModal .bp-info-section.dev2 {
    border-left-color: #90caf9;
    background: #e8f2fc;
}

#mp3PlayerModal .bp-info-section.content {
    border-left-color: #42a5f5;
    background: #fff;
}

#mp3PlayerModal .bp-info-section.etc {
    border-left-color: #64b5f6;
    background: #f5faff;
}

/* ══════════════════════════════════════════════
   찬양 서비스 페이지 (v36)
   ══════════════════════════════════════════════ */

.wb-praise-search-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding: 10px 14px;
    background: #f4f7fb;
    border: 1px solid #e3ebf5;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #37474f;
}

.wb-praise-clear-btn {
    border: none;
    background: #fff;
    color: #2f7fd1;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #dbe6f3;
    cursor: pointer;
}

.wb-praise-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    margin-top: 16px;
    min-height: calc(100vh - 280px);
}

.wb-praise-tags {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8eaf6;
    box-shadow: 0 4px 20px rgba(26, 35, 126, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 240px);
    position: sticky;
    top: calc(var(--wb-header-h, 70px) + 12px);
}

.wb-praise-tags-head {
    padding: 14px 16px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #3949ab;
    border-bottom: 1px solid #e8eaf6;
    flex-shrink: 0;
}

.wb-praise-filter-tabs {
    display: flex;
    border-bottom: 1px solid #e8eaf6;
    flex-shrink: 0;
}

.wb-praise-filter-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: none;
    background: #f5f6fc;
    color: #5c6bc0;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 8px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.wb-praise-filter-tab + .wb-praise-filter-tab {
    border-left: 1px solid #e8eaf6;
}

.wb-praise-filter-tab:hover {
    background: #e8eaf6;
    color: #1a237e;
}

.wb-praise-filter-tab.active {
    background: #fff;
    color: #1a237e;
    font-weight: 700;
    box-shadow: inset 0 -3px 0 #3949ab;
}

.wb-praise-filter-panel {
    display: none;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.wb-praise-filter-panel.active {
    display: flex;
    flex-direction: column;
}

.wb-praise-range-list {
    overflow-y: auto;
    padding: 8px;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
}

.wb-praise-range {
    white-space: nowrap;
}

.wb-praise-tag-list {
    overflow-y: auto;
    padding: 8px;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.wb-praise-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: #37474f;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    gap: 8px;
}

.wb-praise-tag:hover {
    background: #e8eaf6;
    color: #1a237e;
}

.wb-praise-tag.active {
    background: linear-gradient(135deg, #3949ab, #5c6bc0);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(57, 73, 171, 0.35);
}

.wb-praise-tag-count {
    font-size: 11px;
    opacity: 0.75;
    flex-shrink: 0;
}

.wb-praise-list-wrap {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8eaf6;
    box-shadow: 0 4px 20px rgba(26, 35, 126, 0.06);
    display: flex;
    flex-direction: column;
}

.wb-praise-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e8eaf6;
    font-weight: 700;
    color: #1a237e;
    flex-shrink: 0;
}

.wb-praise-list-count {
    font-size: 13px;
    font-weight: 600;
    color: #7986cb;
}

.wb-praise-list {
    padding: 8px;
}

.wb-praise-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 12px 14px;
    border-radius: 12px;
    transition: background 0.12s;
    cursor: pointer;
}

.wb-praise-item:hover {
    background: linear-gradient(90deg, #e8eaf6 0%, #f5f5ff 100%);
}

.wb-praise-item:hover .wb-praise-item-title {
    color: #3949ab;
}

.wb-praise-item-num {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3949ab, #7986cb);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-praise-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wb-praise-item-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.wb-praise-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #212121;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.wb-praise-item-cat {
    flex-shrink: 0;
    font-size: 11px;
    color: #7986cb;
    font-weight: 600;
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(121, 134, 203, 0.12);
}

.wb-praise-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.wb-praise-act {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #c5cae9;
    background: #fff;
    color: #3949ab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.wb-praise-act:hover {
    background: #e8eaf6;
    border-color: #7986cb;
    color: #1a237e;
}

.wb-praise-empty {
    text-align: center;
    padding: 48px 20px;
    color: #9fa8da;
}

.wb-praise-empty i {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

/* ── 찬양 플레이어 모달 (v36) ── */
.wb-praise-player-modal.modal {
    z-index: 1060 !important;
}
.wb-praise-player-modal.modal.show {
    display: flex !important;
}
.wb-praise-player-modal .modal-dialog {
    width: min(96vw, 680px) !important;
    max-width: min(96vw, 680px) !important;
    height: min(94vh, 820px) !important;
    max-height: min(94vh, 820px) !important;
    min-height: min(94vh, 820px) !important;
    margin: 0 auto !important;
}

.wb-praise-player-modal .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
}

.wpp-shell .wpp-header {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 55%, #5c6bc0 100%);
    padding: 16px 20px 12px;
    flex-shrink: 0;
}

.wpp-shell .wpp-num {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.wpp-shell .wpp-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding-right: 36px;
}

.wpp-shell .wpp-title {
    font-size: clamp(1.25rem, 3.5vw, 1.55rem);
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    flex: 1 1 auto;
    min-width: 0;
}

.wpp-shell .wpp-title-row .wpp-badge-cat {
    flex-shrink: 0;
    font-size: 12px;
    padding: 4px 11px;
    margin: 0;
}

.wpp-shell .wpp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.wpp-shell .wpp-badge {
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    padding: 3px 10px;
}

.wpp-shell .wpp-badge-cat {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.wpp-shell .wpp-badge-bible {
    background: #ffd54f;
    color: #1a237e;
}

.wpp-shell .wpp-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}

.wpp-shell .wpp-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.wpp-shell .wpp-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
}

body.wb-praise-player-standalone {
    margin: 0;
    background: #e4e7ec;
    min-height: 100vh;
}

.wb-praise-player-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px 28px;
    box-sizing: border-box;
}

.wb-praise-page-wrap {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wb-praise-page-topbar {
    flex-shrink: 0;
}

.wb-praise-page-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #c8cdd6;
    color: #3949ab;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: background 0.12s, border-color 0.12s;
}

.wb-praise-page-back:hover {
    background: #f5f7ff;
    border-color: #7986cb;
    color: #1a237e;
}

.wb-praise-page-back i {
    font-size: 18px;
}

.wb-praise-page-card {
    background: #fff;
    border: 1px solid #b8bec8;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(26, 35, 126, 0.1);
    max-height: min(86vh, 720px);
    max-height: min(86dvh, 720px);
    display: flex;
    flex-direction: column;
}

.wb-praise-player-standalone .wpp-shell {
    width: 100%;
    max-width: none;
    min-height: 0;
    max-height: min(86vh, 720px);
    max-height: min(86dvh, 720px);
    height: auto;
    display: flex;
    flex-direction: column;
    border-radius: 0;
}

.wb-praise-player-standalone .wpp-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(38vh, 320px);
    max-height: min(38dvh, 320px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid #e0e4ea;
}

.wb-praise-player-standalone .wpp-player {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.wb-praise-player-standalone .wpp-title {
    padding-right: 8px;
}

.wb-praise-page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.wb-praise-page-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    min-width: 96px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #c8cdd6;
    color: #3949ab;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: background 0.12s, border-color 0.12s;
}

.wb-praise-page-nav:hover {
    background: #f5f7ff;
    border-color: #7986cb;
    color: #1a237e;
}

.wb-praise-page-nav-next {
    margin-left: auto;
    justify-content: flex-end;
}

.wb-praise-page-nav.is-disabled {
    visibility: hidden;
    pointer-events: none;
}

.wb-praise-seo-h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (min-width: 769px) and (min-height: 700px) {
    .wb-praise-page-wrap {
        max-width: 540px;
    }

    .wb-praise-player-standalone .wpp-body {
        max-height: min(42vh, 340px);
    }
}

/* 세로: 핸드폰·태블릿·iPad — 플레이어 전체화면 */
@media (orientation: portrait) and (max-width: 1024px) {
    body.wb-praise-player-standalone {
        background: #fff;
    }

    .wb-praise-player-page {
        align-items: stretch;
        justify-content: flex-start;
        padding: 0;
        min-height: 100dvh;
    }

    .wb-praise-page-wrap {
        width: 100%;
        max-width: none;
        min-height: 100dvh;
        gap: 0;
        flex: 1;
    }

    .wb-praise-page-topbar {
        flex-shrink: 0;
        padding: max(10px, env(safe-area-inset-top)) 14px 8px;
        background: #f4f5f7;
        border-bottom: 1px solid #e0e4ea;
    }

    .wb-praise-page-back {
        border: none;
        box-shadow: none;
        background: transparent;
        padding: 6px 2px;
    }

    .wb-praise-page-card {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .wb-praise-player-standalone .wpp-shell {
        flex: 1;
        min-height: 0;
        max-height: none;
        height: 100%;
    }

    .wb-praise-player-standalone .wpp-body {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }

    .wb-praise-page-footer {
        flex-shrink: 0;
        padding: 10px 12px max(10px, env(safe-area-inset-bottom));
        background: #f4f5f7;
        border-top: 1px solid #e0e4ea;
        gap: 8px;
    }

    .wb-praise-page-nav {
        flex: 1;
        justify-content: center;
        min-height: 44px;
    }

    .wb-praise-page-nav-next {
        margin-left: 0;
    }
}

/* 가로: 핸드폰·태블릿 — PC처럼 중앙 카드 */
@media (orientation: landscape) and (max-width: 1024px) {
    body.wb-praise-player-standalone {
        background: #e4e7ec;
    }

    .wb-praise-player-page {
        align-items: center;
        justify-content: center;
        padding: 16px 20px;
    }

    .wb-praise-page-wrap {
        max-width: min(560px, 94vw);
        gap: 10px;
    }

    .wb-praise-page-card {
        max-height: min(92vh, 680px);
        max-height: min(92dvh, 680px);
        border: 1px solid #b8bec8;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(26, 35, 126, 0.1);
    }

    .wb-praise-player-standalone .wpp-shell {
        max-height: min(92vh, 680px);
        max-height: min(92dvh, 680px);
    }

    .wb-praise-player-standalone .wpp-body {
        max-height: min(36vh, 260px);
        max-height: min(36dvh, 260px);
        flex: 1 1 auto;
    }
}

.wpp-shell .wpp-player {
    background: linear-gradient(165deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 16px 18px 14px;
    flex-shrink: 0;
}

.wpp-shell #wpp-waveform {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.wpp-shell .wpp-seek {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.wpp-shell .wpp-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffd54f;
    box-shadow: 0 0 8px rgba(255, 213, 79, 0.55);
}

.wpp-shell .wpp-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin: 4px 0 10px;
}

.wpp-shell .wpp-ctrl-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.wpp-shell .wpp-ctrl {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #e8eaf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
}

.wpp-shell .wpp-ctrl:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.06);
}

.wpp-shell .wpp-ctrl:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.wpp-shell .wpp-ctrl-main {
    width: 54px;
    height: 54px;
    font-size: 28px;
    background: linear-gradient(135deg, #ffd54f, #ff8f00);
    color: #1a237e;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.4);
}

.wpp-shell .wpp-ppt-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 16px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.wpp-shell .wpp-ppt-open-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.22);
}

.wpp-shell .wpp-ppt-open-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

.wpp-shell .wpp-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: #fafbff;
    -webkit-overflow-scrolling: touch;
}

.wpp-shell .wpp-loading {
    text-align: center;
    padding: 40px 20px;
    color: #7986cb;
}

.wpp-shell .wpp-section {
    padding: 18px 20px;
}

.wpp-shell .wpp-section-lyric {
    border-bottom: 1px solid #e8eaf6;
    background: #fff;
}

.wpp-shell .wpp-section-info {
    background: #f5f7ff;
}

.wpp-shell .wpp-section-title {
    font-size: 13px;
    font-weight: 800;
    color: #3949ab;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
}

.wpp-shell .wpp-lyric {
    font-size: 15px;
    line-height: 2.1;
    color: #212121;
    white-space: pre-wrap;
    word-break: keep-all;
}

.wpp-shell .wpp-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wpp-shell .wpp-info-wide {
    grid-column: 1 / -1;
}

.wpp-shell .wpp-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    border-left: 3px solid #7986cb;
    box-shadow: 0 2px 8px rgba(26, 35, 126, 0.06);
}

.wpp-shell .wpp-info-card.wpp-info-empty {
    opacity: 0.5;
}

.wpp-shell .wpp-info-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #7986cb;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.wpp-shell .wpp-info-text {
    font-size: 13px;
    line-height: 1.75;
    color: #37474f;
    margin: 0;
    white-space: pre-wrap;
    word-break: keep-all;
}

/* 악보 PPT 전체화면 (F11) */
.wpp-ppt-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 10060;
    background: #000;
    display: block;
    outline: none;
    width: 100vw;
    height: 100vh;
}

.wpp-ppt-fullscreen:fullscreen,
.wpp-ppt-fullscreen:-webkit-full-screen {
    width: 100%;
    height: 100%;
    background: #000;
}

.wpp-ppt-fs-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 6;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.wpp-ppt-fs-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.wpp-ppt-fs-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wpp-ppt-fs-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.wpp-ppt-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 56px;
    height: 80px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 2.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.wpp-ppt-arrow-left {
    left: 12px;
}

.wpp-ppt-arrow-right {
    right: 12px;
}

.wpp-ppt-arrow:hover:not(:disabled) {
    background: rgba(21, 101, 192, 0.75);
}

.wpp-ppt-arrow:disabled {
    opacity: 0.2;
    cursor: default;
}

/* 하단 오버레이 — PPT 내장 버튼 가림 */
.wpp-ppt-fs-bar {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 5;
    width: min(88vw, 920px);
    padding: 10px 14px 16px;
    pointer-events: auto;
}

.wpp-ppt-fs-bar::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100vw;
    height: calc(100% + 28px);
    background: linear-gradient(
        to top,
        rgba(18, 24, 38, 0.96) 0%,
        rgba(18, 24, 38, 0.88) 55%,
        rgba(18, 24, 38, 0.45) 85%,
        rgba(18, 24, 38, 0) 100%
    );
    z-index: -1;
    pointer-events: none;
}

.wpp-ppt-fs-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.wpp-ppt-tab {
    min-width: 0;
    padding: 9px 10px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(30, 40, 60, 0.82);
    color: rgba(255, 255, 255, 0.95);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    cursor: pointer;
    text-align: center;
    word-break: keep-all;
    white-space: normal;
}

.wpp-ppt-tab:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.5);
}

.wpp-ppt-tab.active {
    background: #1565c0;
    border-color: #42a5f5;
    color: #fff;
    font-weight: 700;
}

@media (max-width: 767px) {
    .wb-praise-layout {
        grid-template-columns: 1fr;
    }

    .wpp-shell .wpp-info-grid {
        grid-template-columns: 1fr;
    }

    .wpp-shell .wpp-ctrl-row {
        gap: 8px;
    }

    .wpp-shell .wpp-ppt-open-btn {
        width: 100%;
        justify-content: center;
    }

    .wpp-ppt-arrow {
        width: 44px;
        height: 64px;
        font-size: 1.8rem;
    }

    .wpp-ppt-arrow-left { left: 6px; }
    .wpp-ppt-arrow-right { right: 6px; }
}

/* ── 찬양 서비스 · 스마트기기 (가로·세로 동일, 터치·태블릿 폭 기준) ── */
@media (hover: none) and (pointer: coarse) and (max-width: 991.98px),
       (max-width: 767.98px) {
    .wb-praise-fluid {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }

    .wb-praise-page {
        max-width: none !important;
        width: 100%;
        margin: 0;
        padding: 0 0 12px;
    }

    .wb-hero {
        margin-top: 8px;
        border-radius: 12px;
    }

    .wb-hero-inner {
        padding: 14px 14px 16px;
    }

    .wb-hero-sub {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .wb-search {
        max-width: min(620px, 100%);
        padding: 5px 5px 5px 14px;
    }

    .wb-search input {
        font-size: 16px;
    }

    .wb-search input::placeholder {
        font-size: 14px;
    }

    .wb-search-combo-wrap .wb-search-combo {
        font-size: 14px;
        min-width: 84px;
    }

    .wb-search button,
    .wb-search .wb-sr-submit {
        font-size: 15px;
        padding: 11px 24px;
        min-height: 44px;
    }

    .wb-praise-search-banner {
        margin-top: 8px;
        padding: 12px;
        font-size: 16px;
        border-radius: 10px;
    }

    .wb-praise-clear-btn {
        font-size: 14px;
        padding: 8px 12px;
        min-height: 40px;
    }

    .wb-praise-list-wrap,
    .wb-praise-tags {
        border-radius: 12px;
    }

    .wb-praise-list-head {
        padding: 12px 14px;
        font-size: 17px;
    }

    .wb-praise-list-count {
        font-size: 15px;
    }

    .wb-praise-list {
        padding: 4px 6px;
    }

    .wb-praise-item {
        padding: 13px 10px;
        gap: 10px;
    }

    .wb-praise-item-num {
        width: 48px;
        height: 48px;
        font-size: 17px;
        border-radius: 10px;
    }

    .wb-praise-item-title {
        font-size: 17px;
        line-height: 1.4;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .wb-praise-item-cat {
        font-size: 13px;
        padding: 3px 10px;
    }

    .wb-praise-act {
        width: 44px;
        height: 44px;
        font-size: 21px;
        border-radius: 10px;
    }

    .wb-praise-layout {
        grid-template-columns: minmax(160px, 22%) 1fr;
        gap: 8px;
        margin-top: 8px;
        min-height: calc(100dvh - var(--wb-header-h, 70px) - 200px);
    }

    .wb-praise-tags {
        position: sticky;
        top: calc(var(--wb-header-h, 70px) + 8px);
        max-height: calc(100dvh - var(--wb-header-h, 70px) - 24px);
    }

    .wb-praise-tags-head {
        padding: 12px 14px;
        font-size: 15px;
    }

    .wb-praise-filter-tab {
        font-size: 14px;
        padding: 11px 6px;
        min-height: 44px;
    }

    .wb-praise-tag-list,
    .wb-praise-range-list {
        display: block;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 6px;
    }

    .wb-praise-tag {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* 스마트기기 · 좁은 폭 (폰) — 가로·세로 동일: 좌측 분류 목록 유지 */
@media (max-width: 767px) {
    .wb-praise-layout {
        grid-template-columns: minmax(100px, 32%) minmax(0, 1fr) !important;
        gap: 8px;
        margin-top: 8px;
        min-height: calc(100dvh - var(--wb-header-h, 70px) - 180px);
    }

    .wb-praise-tags {
        max-height: calc(100dvh - var(--wb-header-h, 70px) - 24px);
        position: sticky;
        top: calc(var(--wb-header-h, 70px) + 8px);
    }

    .wb-praise-tag-list,
    .wb-praise-range-list {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        gap: 4px;
        padding: 6px;
    }

    .wb-praise-filter-tab {
        font-size: 13px;
        padding: 10px 4px;
    }

    .wb-praise-tag {
        flex: 0 0 auto !important;
        width: 100% !important;
        white-space: normal !important;
        font-size: 14px;
        padding: 9px 10px;
    }

    .wb-praise-tag-count {
        font-size: 12px;
    }

    .wb-hero-inner {
        padding: 14px 10px 16px;
    }
}

/* iPad·태블릿 — 검색바 적정 폭 유지 */
@media (min-width: 768px) and (max-width: 1366px) {
    .wb-search {
        max-width: min(560px, 92%);
    }

    .wb-hero-inner {
        padding: 18px 14px 20px;
    }

    .wb-praise-layout {
        grid-template-columns: minmax(180px, 22%) 1fr;
    }

    .wb-praise-item-title {
        font-size: 18px;
    }

    .wb-praise-tag {
        font-size: 15px;
        padding: 11px 12px;
    }

    .wb-hero-sub {
        font-size: 16px;
    }
}

/* PC — 마우스·넓은 화면은 기존 1080px 중앙 레이아웃 유지 */
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
    .wb-praise-page {
        max-width: 1080px;
        margin: 0 auto;
        padding: 0 16px 24px;
    }
}

/* 찬양 모달 · 스마트기기 (가로·세로 동일 → 전체화면) */
@media (hover: none) and (pointer: coarse),
       (max-width: 1366px) {
    .wb-praise-player-modal.modal.show {
        align-items: stretch !important;
        padding: 0 !important;
    }

    .wb-praise-player-modal .modal-dialog,
    .wb-praise-player-modal .modal-dialog.modal-dialog-centered {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        align-items: stretch !important;
    }

    .wb-praise-player-modal .modal-content {
        border-radius: 0;
        height: 100dvh;
        max-height: 100dvh;
        box-shadow: none;
    }

    .wpp-shell .wpp-body {
        flex: 1;
        min-height: 0;
        max-height: none;
    }

    .wpp-shell .wpp-num {
        font-size: 15px;
    }

    .wpp-shell .wpp-title {
        font-size: 1.4rem;
    }

    .wpp-shell .wpp-lyric {
        font-size: 17px;
        line-height: 2;
    }

    .wpp-shell .wpp-section-title {
        font-size: 14px;
    }

    .wpp-shell .wpp-info-text {
        font-size: 15px;
    }
}

/* ── 미디어(PPT) 자료 — 통합 파일 목록 ── */
.wb-media-file-list-wrap {
    padding: 4px 0 24px;
}

.wb-media-file-list-desc {
    color: #607d8b;
    font-size: 14px;
    margin: 0 0 16px;
    font-family: system-ui, -apple-system, 'Noto Sans KR', sans-serif;
}

.wb-media-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.wb-media-file-item {
    border: 1px solid #e3eaf3;
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.wb-media-file-item:hover {
    border-color: #b6cce8;
    box-shadow: 0 4px 14px rgba(47, 127, 209, 0.12);
}

.wb-media-file-item.is-active {
    border-color: #2f7fd1;
    background: #f0f7ff;
    box-shadow: 0 4px 16px rgba(47, 127, 209, 0.18);
}

.wb-media-file-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: #1a2b44;
    text-decoration: none !important;
}

.wb-media-file-link:hover {
    color: #163a66;
}

.wb-media-file-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #163a66, #2f7fd1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.wb-media-file-icon i[class*="bx"] {
    font-family: boxicons !important;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    color: #fff;
    speak: never;
    -webkit-font-smoothing: antialiased;
}

.wb-media-file-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.wb-media-file-text strong {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.wb-media-fname {
    font-size: 13px;
    color: #78909c;
    word-break: break-all;
}

@media (max-width: 575.98px) {
    .wb-media-file-link {
        padding: 12px;
        gap: 10px;
    }

    .wb-media-file-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .wb-media-file-text strong {
        font-size: 15px;
    }
}

/* ── 미디어(PPT) 챕터별 다운로드 배너 ── */
.wb-ppt-download-bar {
    margin: 0 0 20px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid #b6cce8;
    background: linear-gradient(135deg, #eef4fc 0%, #e3eefb 100%);
    box-shadow: 0 6px 20px rgba(47, 127, 209, 0.12);
}

.wb-ppt-download-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.wb-ppt-download-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #163a66, #2f7fd1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.wb-ppt-download-icon i[class*="bx"] {
    font-family: boxicons !important;
    font-style: normal;
    line-height: 1;
    color: #fff !important;
}

#book_contents .book-content-body .wb-ppt-download-icon,
#book_contents .book-content-body .wb-ppt-download-icon i,
#book_contents .book-content-body .wb-media-video-icon,
#book_contents .book-content-body .wb-media-video-icon i {
    color: #fff !important;
}

.wb-ppt-download-info {
    flex: 1 1 180px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wb-ppt-download-label {
    font-size: 12px;
    font-weight: 700;
    color: #1e5fb0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wb-ppt-download-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2b44;
    line-height: 1.35;
}

.wb-ppt-download-fname {
    font-size: 13px;
    color: #607d8b;
    word-break: break-all;
}

.wb-ppt-download-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #163a66, #2f7fd1);
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(47, 127, 209, 0.28);
    transition: filter 0.15s, transform 0.1s;
    white-space: nowrap;
}
.wb-ppt-download-btn,
.wb-ppt-download-btn span,
.wb-ppt-download-btn:hover,
.wb-ppt-download-btn:hover span,
.wb-ppt-download-btn:visited,
.wb-ppt-download-btn:visited span {
    color: #fff !important;
}

.wb-ppt-download-btn i[class*="bx"] {
    font-family: boxicons !important;
    font-size: 20px;
    line-height: 1;
    color: #fff !important;
}

.wb-ppt-download-btn:hover {
    filter: brightness(1.1);
    color: #fff !important;
    transform: translateY(-1px);
}

.wb-ppt-download-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: #78909c;
    font-family: system-ui, -apple-system, 'Noto Sans KR', sans-serif;
}

@media (max-width: 575.98px) {
    .wb-ppt-download-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .wb-ppt-download-btn {
        justify-content: center;
        width: 100%;
    }
}

/* ── 미디어 동영상 플레이어 ── */
.wb-media-video-block {
    margin: 0 0 20px;
}

.wb-media-video {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: min(70vh, 540px);
    border-radius: 12px;
    background: #0f172a;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
}

.wb-media-video-bar {
    margin-top: 14px;
    margin-bottom: 0;
}

.wb-media-video-icon {
    background: linear-gradient(135deg, #0f4c81, #1e88e5);
}

/* ── 도서 상세 — 하위 목차 블록 ── */
.wb-book-child-nav {
    margin: 28px 0 0;
    padding: 18px 18px 20px;
    border: 1px solid #dbe6f3;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
    font-family: system-ui, -apple-system, 'Noto Sans KR', sans-serif;
}

.wb-book-child-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e3eaf3;
}

.wb-book-child-nav-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1a3a5c;
}

.wb-book-child-nav-count {
    font-size: 13px;
    font-weight: 600;
    color: #607d8b;
    background: #eef4fb;
    border-radius: 999px;
    padding: 3px 12px;
}

.wb-book-child-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wb-book-child-item {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wb-book-child-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 0;
    padding: 12px 14px;
    border: 1px solid #e3eaf3;
    border-radius: 12px;
    background: #fff;
    color: #1a3a5c;
    text-decoration: none;
    text-align: left;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.wb-book-child-card:hover {
    border-color: #2f7fd1;
    box-shadow: 0 6px 20px rgba(47, 127, 209, 0.15);
    transform: translateY(-2px);
    color: #163a66;
}

.wb-book-child-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    background: transparent;
}

.wb-book-child-icon-branch i {
    font-size: 18px;
    color: #2f7fd1;
}

.wb-book-child-icon-leaf i {
    font-size: 10px;
    color: #90a4ae;
}

.wb-book-child-card:hover .wb-book-child-icon-branch i {
    color: #163a66;
}

.wb-book-child-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    word-break: keep-all;
    white-space: normal;
}

@media (max-width: 575.98px) {
    .wb-book-child-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════
   통합 상태 패널 — 검색( search ) vs 불러오기( load ) 구분
   ═══════════════════════════════════════════════════════════ */
.wb-state-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 24px;
    border-radius: 16px;
    min-height: 160px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* 검색·결과 표시 영역 — 로딩 시에만 패널, 결과는 카드만 표시 */
.wb-search-results-host {
    background: transparent;
    border: none;
    border-radius: 0;
    min-height: 0;
    padding: 0;
    margin-top: 8px;
    box-sizing: border-box;
    box-shadow: none;
}

.wb-search-results-host.wb-state-hosting {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff;
    border: 1px solid #dbe6f2;
    border-radius: 16px;
    min-height: 400px;
    padding: 28px 24px;
    margin-top: 16px;
    box-shadow: 0 2px 12px rgba(22, 58, 102, 0.04);
}

/* 검색 바 — 검색 버튼 + 도움말 */
.wb-sr-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wb-sr-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #c5d8f0;
    border-radius: 50%;
    background: #f4f8fd;
    color: #2f7fd1;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    flex-shrink: 0;
}

.wb-sr-help-btn:hover,
.wb-sr-help-btn:focus {
    background: #eaf1fb;
    border-color: #2f7fd1;
    color: #163a66;
    outline: none;
}

.wb-search-actions .wb-sr-help-btn,
.wb-search .wb-sr-help-btn,
.bk-search .wb-sr-help-btn {
    width: 44px;
    height: 44px;
    font-size: 22px;
    border: none;
    background: linear-gradient(135deg, #163a66, #2f7fd1);
    color: #fff;
}

.wb-search-actions .wb-sr-help-btn i,
.wb-search .wb-sr-help-btn i,
.bk-search .wb-sr-help-btn i {
    color: #fff;
}

.wb-search-actions .wb-sr-help-btn:hover,
.wb-search-actions .wb-sr-help-btn:focus,
.wb-search .wb-sr-help-btn:hover,
.wb-search .wb-sr-help-btn:focus,
.bk-search .wb-sr-help-btn:hover,
.bk-search .wb-sr-help-btn:focus {
    background: linear-gradient(135deg, #163a66, #2f7fd1);
    color: #fff;
    filter: brightness(1.12);
    outline: none;
}

.wb-search-actions .wb-sr-help-btn:hover i,
.wb-search-actions .wb-sr-help-btn:focus i,
.wb-search .wb-sr-help-btn:hover i,
.wb-search .wb-sr-help-btn:focus i,
.bk-search .wb-sr-help-btn:hover i,
.bk-search .wb-sr-help-btn:focus i {
    color: #fff;
}

.bk-search .wb-sr-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 성경 모바일 검색 오프캔버스 */
#mobileMenuOffcanvas .wb-sr-help-btn {
    width: 44px;
    height: 44px;
    font-size: 22px;
    border: none;
    background: linear-gradient(135deg, #163a66, #2f7fd1);
    color: #fff;
    flex-shrink: 0;
}

#mobileMenuOffcanvas .wb-sr-help-btn i {
    color: #fff;
}

#bibleSearchModal .wb-sr-help-btn {
    width: 44px;
    height: 44px;
    font-size: 22px;
    border: none;
    background: linear-gradient(135deg, #163a66, #2f7fd1);
    color: #fff;
    flex-shrink: 0;
}

#bibleSearchModal .wb-sr-help-btn i {
    color: #fff;
}

#wbSearchHelpModal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

#wbSearchHelpModal .modal-header {
    background: linear-gradient(135deg, #163a66, #2f7fd1);
    color: #fff;
    border: none;
}

#wbSearchHelpModal .modal-header .btn-close {
    filter: invert(1);
}

#wbSearchHelpModal .modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
}

.wb-search-help-lead {
    color: #51647a;
    font-size: 14px;
    margin-bottom: 18px;
}

.wb-search-help-section {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef3f8;
}

.wb-search-help-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wb-search-help-section h6 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #163a66;
    margin: 0 0 8px;
}

.wb-search-help-section p {
    font-size: 13px;
    color: #546e7a;
    margin: 0 0 8px;
    line-height: 1.55;
}

.wb-search-help-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wb-search-help-ex {
    display: inline-block;
    background: #eaf1fb;
    color: #1e5fb0;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
}

.wb-search-help-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.wb-search-help-table th {
    width: 88px;
    text-align: left;
    color: #607d8b;
    font-weight: 600;
    padding: 4px 8px 4px 0;
    vertical-align: top;
    white-space: nowrap;
}

.wb-search-help-table td {
    color: #37474f;
    padding: 4px 0;
    vertical-align: top;
}

.wb-search-help-table code {
    background: #f4f8fc;
    color: #1a56a8;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 12px;
}

.wb-search-help-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #455a64;
    line-height: 1.65;
}

.wb-search-help-list li + li {
    margin-top: 6px;
}

.wb-search-help-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 14px;
    background: #f4f8fd;
    border: 1px solid #d8e6f4;
    border-radius: 10px;
    font-size: 12px;
    color: #546e7a;
    line-height: 1.55;
}

.wb-search-help-note i {
    color: #2f7fd1;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.wb-search-help-close {
    border-radius: 999px;
    padding: 8px 24px;
    font-weight: 700;
}

@media (max-width: 576px) {
    .wb-sr-bar-actions {
        width: 100%;
    }

    .wb-sr-bar .wb-sr-submit,
    .wb-search .wb-sr-submit {
        flex: 1;
        min-width: 0;
    }
}

/* 도서 본문 호스트 */
#book_contents,
#book_detail_contents {
    width: 100%;
    box-sizing: border-box;
}

#book_contents.wb-state-hosting,
#book_detail_contents.wb-state-hosting {
    padding: 0 !important;
    margin: 0 !important;
}

/* 불러오는 중 — 화면 가운데 (검색 로딩과 동일한 fill 패턴) */
.wb-state-load-fill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: calc(100vh - var(--wb-header-h, 70px) - 44px - 80px);
    padding: 48px 24px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #f4f8fd 0%, #e8f0fa 100%);
}

.wb-state-load-fill > .wb-state-panel {
    width: 100%;
    max-width: 420px;
    margin: 0;
    flex-shrink: 0;
}

#book_contents > .wb-state-load-fill,
#book_detail_contents > .wb-state-load-fill {
    min-height: calc(100vh - var(--wb-header-h, 70px) - 44px - 80px);
}

/* 성경 상세 — 모달·우측 패널 로딩 가운데 */
#bible_detail_loading.wb-state-hosting,
#bible_detail_loading_1.wb-state-hosting,
.wb-bible-panel-loading.wb-state-hosting {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 300px !important;
    padding: 40px 24px !important;
    box-sizing: border-box;
    background: transparent !important;
}

.wb-state-load-fill--modal {
    background: transparent !important;
    min-height: 0 !important;
    padding: 0 !important;
}

.wb-state-load--modal {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 24px 16px !important;
    min-height: 0 !important;
}

.wb-state-spinner--lg {
    width: 3.5rem !important;
    height: 3.5rem !important;
    border-width: 0.25em !important;
}

/* 검색 중 — 가운데 패널 (배경 없음) */
.wb-state-search-fill {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    box-shadow: none;
}

.wb-state-search-fill--plain {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.wb-state-search-fill--centered {
    min-height: 0;
}

.wb-state-search-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px 20px 22px;
    flex-shrink: 0;
}

.wb-state-search-head--plain {
    background: transparent !important;
    border: none !important;
    padding: 24px 16px;
    gap: 14px;
}

.wb-state-search-icon--lg {
    width: 88px;
    height: 88px;
}

.wb-state-search-icon--lg i {
    font-size: 44px !important;
    color: #2f7fd1 !important;
}

.wb-state-search-icon--lg .wb-state-search-ring {
    border-width: 3px;
}

.wb-state-title--lg {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #163a66 !important;
}

.wb-state-sub--lg {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #51647a !important;
}

.wb-state-search-head--plain .wb-state-dots span {
    width: 7px;
    height: 7px;
    margin: 0 4px;
}

.wb-state-search-fill-body {
    flex: 1;
    padding: 14px 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wb-state-skeleton-card {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 12px;
    padding: 14px 16px;
}

.wb-state-skeleton-bar {
    height: 11px;
    border-radius: 6px;
    margin-bottom: 9px;
    background: linear-gradient(90deg, #eef3f8 25%, #e2eaf3 50%, #eef3f8 75%);
    background-size: 200% 100%;
    animation: wbShimmer 1.2s infinite;
}

.wb-state-skeleton-bar.title {
    width: 38%;
    height: 13px;
    margin-bottom: 11px;
    opacity: 0.9;
}

.wb-state-skeleton-bar:not(.title):not(.short) {
    width: 92%;
}

.wb-state-skeleton-bar.short {
    width: 64%;
    margin-bottom: 0;
    opacity: 0.75;
}

@keyframes wbShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.wb-state-compact {
    padding: 28px 16px;
    min-height: 140px;
    border-radius: 12px;
}

.wb-state-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #163a66;
    line-height: 1.45;
}

.wb-state-sub {
    margin: 0;
    font-size: 13px;
    color: #607d8b;
    line-height: 1.5;
}

/* ── 검색 중: 돋보기 + 파란 배경 (모달·인라인 호스트는 배경 없음) ── */
.wb-state-search {
    background: linear-gradient(180deg, #eef4fc 0%, #e3edf8 100%);
    border: 1px solid #cdddf0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#bsmResults .wb-state-search,
#bookSearchStatsBody .wb-state-search,
#bible_detail_loading .wb-state-search,
#bible_detail_loading_1 .wb-state-search,
#book_detail_contents .wb-state-search,
#libModalContent .wb-state-search,
#categoryBooksList .wb-state-search {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.wb-state-search-icon {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-state-compact .wb-state-search-icon {
    width: 48px;
    height: 48px;
}

.wb-state-search-icon i {
    font-size: 28px;
    color: #2f7fd1;
    z-index: 1;
}

.wb-state-compact .wb-state-search-icon i {
    font-size: 22px;
}

.wb-state-search-ring {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: #2f7fd1;
    border-right-color: #5ba3e8;
    border-radius: 50%;
    animation: wbSearchSpin 0.95s linear infinite;
}

@keyframes wbSearchSpin {
    to { transform: rotate(360deg); }
}

.wb-state-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #2f7fd1;
    border-radius: 50%;
    margin: 0 3px;
    animation: wbDotPulse 1.2s infinite ease-in-out;
}

.wb-state-dots span:nth-child(2) { animation-delay: 0.2s; }
.wb-state-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes wbDotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* ── 불러오기: 스피너 + 중립 배경 ── */
.wb-state-load {
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fc 100%);
    border: 1px solid #cdddf0;
    box-shadow: 0 4px 16px rgba(22, 58, 102, 0.06);
    padding: 52px 32px;
}

.wb-state-spinner {
    width: 2.5rem;
    height: 2.5rem;
    color: #2f7fd1;
    border-width: 0.2em;
}

.wb-state-compact .wb-state-spinner {
    width: 2rem;
    height: 2rem;
}

/* ── 빈 상태 ── */
.wb-state-empty {
    background: #fff;
    border: 1px dashed #d5e0ef;
}

.wb-state-empty-icon {
    font-size: 40px;
    color: #b0bec5;
    opacity: 0.65;
    line-height: 1;
}

.wb-state-empty .wb-state-title {
    color: #78909c;
    font-weight: 600;
}

/* 기존 사전 로딩 — 불러오기 패턴과 통일 */
.wb-dic-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 3rem 1rem;
    color: var(--wb-path-muted, #5a6a7a);
    font-size: 0.95rem;
    background: #f8fafc;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    min-height: 160px;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   검색 결과 — 제목·본문·키워드 하이라이트
   ═══════════════════════════════════════════════════════════ */
.wb-sr-hit-path,
.bsm-result-path {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #163a66 !important;
    margin-bottom: 6px !important;
    line-height: 1.5 !important;
    word-break: keep-all;
}

.wb-sr-hit-path .wb-sr-path-sep,
.bsm-result-path .wb-sr-path-sep {
    color: #90a4ae !important;
    margin: 0 4px;
    font-weight: 400 !important;
}

.wb-sr-excerpt,
.bsm-result-excerpt {
    font-size: 14px !important;
    color: #37474f !important;
    line-height: 1.65 !important;
    margin: 0;
}

.wb-sr-bible-ref {
    font-weight: 800 !important;
    color: #1a56a8 !important;
    font-size: 15px !important;
}

.wb-sr-hit-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a56a8 !important;
}

/* Bootstrap mark,.mark 노란 기본색 전역 덮어쓰기 */
mark,
.mark,
.wb-sr-mark,
mark.wb-sr-mark,
.wb-search-page mark,
.wb-search-results-host mark,
.wb-sr-card mark,
.wb-sr-hit-path mark,
.bsm-result-path mark,
.wb-sr-excerpt mark,
.wb-sr-hit mark,
.wb-sr-book-body mark,
.bsm-result-excerpt mark,
.bsm-result-title mark,
#bookSearchModal mark,
#book_contents mark,
#book_contents .book-content-body mark,
#book_contents .book-content-title mark,
#bible_contents mark,
#books_result mark,
#bsmResults mark,
.modal mark {
    background-color: var(--wb-kw-bg) !important;
    background: var(--wb-kw-bg) !important;
    color: var(--wb-kw-color) !important;
    font-weight: 600 !important;
    font-style: normal !important;
    padding: var(--wb-kw-pad-y) var(--wb-kw-pad-x) !important;
    border-radius: var(--wb-kw-radius) !important;
    border: 1px solid var(--wb-kw-border) !important;
    box-shadow: 0 1px 2px rgba(26, 53, 88, 0.06);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.wb-sr-more-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 6px 0 4px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #1565c0 !important;
    background: #eaf1fb;
    border: 1px solid #bcd4ef;
    border-radius: 999px;
    text-decoration: none !important;
    transition: background .15s, border-color .15s;
}

.wb-sr-more-link:hover {
    background: #d6e8fa;
    border-color: #90b8e8;
}