/* ==========================================================================
   UNIFIED BIBLE READER APP - STYLESHEET (ACADEMIC SCALE & 2-COLUMN LAYOUT)
   ========================================================================== */

:root {
    --kt-primary: var(--bri-primary);
    --kt-primary-hover: var(--bri-primary-hover);
    --kt-bg-light: var(--bri-surface-subtle);
    --kt-border: var(--bri-border);
    --kt-text-main: var(--bri-text-main);
    --kt-text-muted: var(--bri-text-muted);
    --kt-gold: #d97706;
}

/* Main Dashboard Container Layout: 2 Columns (280px Left Sidebar + 1fr Content) */
.kt-dashboard-main {
    padding: 24px 0 60px;
    background: #ffffff;
}

.kt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Sidebar styles removed, converted to Books Modal */

/* Search Box */
.kt-search-box {
    position: relative;
    margin-bottom: 14px;
}

.kt-pill-input {
    width: 100%;
    padding: 9px 36px 9px 12px;
    border: 1px solid var(--kt-border);
    border-radius: 8px;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.kt-pill-input:focus {
    border-color: var(--kt-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08);
}

.kt-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

/* 2 Tabs Navigation: Cựu Ước / Tân Ước */
.kt-testament-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}

.kt-tab-btn {
    flex: 1;
    padding: 8px 6px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--kt-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.kt-tab-btn:hover {
    color: var(--kt-primary);
}

.kt-tab-btn.active {
    background: var(--kt-primary);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Book List Panels */
.kt-book-list-panel {
    display: none;
}

.kt-book-list-panel.active {
    display: block;
}

.kt-book-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.92rem;
    color: #334155;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.kt-book-item:hover {
    background: #f1f5f9;
    color: var(--kt-primary);
}

.kt-book-item.active {
    background: var(--kt-primary);
    color: #ffffff;
    font-weight: 600;
}

.kt-book-item.active .kt-book-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.kt-book-badge {
    font-size: 0.75rem;
    color: #94a3b8;
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* Cột Phải: Center Reader Content Area */
.kt-content-center {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    position: relative;
    min-height: 650px;
}

.kt-doc-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.kt-doc-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.kt-mobile-toggle-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f1f5f9;
    border: 1px solid var(--kt-border);
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--kt-primary);
    cursor: pointer;
}

.kt-doc-title {
    font-family: 'Crimson Pro', serif !important;
    font-size: 30px !important;
    line-height: 1.3 !important;
    color: var(--kt-primary);
    margin: 0;
    font-weight: 700;
}

.kt-geo-subtitle {
    font-size: 0.88rem;
    color: var(--kt-text-muted);
    margin: 4px 0 16px 0;
    line-height: 1.5;
}

/* Single Chapter Picker Button */
.kt-chapter-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    border: 1.5px solid var(--kt-primary);
    border-radius: 8px;
    color: var(--kt-primary);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kt-chapter-picker-btn:hover {
    background: var(--kt-primary);
    color: #ffffff;
}

.kt-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.kt-toolbar-left, .kt-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kt-actions-bottom {
    display: flex !important;
    justify-content: center !important;
    margin: 20px 0 30px 0;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

/* Flat Minimalist Action Bar (No shadow, Flat modern layout) */
.kt-action-pill-bar {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 30px;
    padding: 2px 6px;
    box-shadow: none !important;
}

.kt-action-pill-bar:hover {
    box-shadow: none !important;
    border-color: #e2e8f0;
}

.kt-action-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.2s ease;
}

.kt-action-pill-btn svg {
    transition: transform 0.2s ease, color 0.2s ease;
    color: #64748b;
}

.kt-action-pill-btn:hover {
    background: #ffffff;
    color: var(--bri-primary, #0f172a);
}

.kt-action-pill-btn:hover svg {
    transform: scale(1.12);
    color: var(--bri-primary, #0f172a);
}

.kt-action-divider {
    width: 1px;
    height: 16px;
    background: #e2e8f0;
    margin: 0 2px;
}

/* Share Wrapper & Inline Popover Menu */
.kt-share-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.kt-share-popover {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    display: flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    white-space: nowrap;
}

.kt-share-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.kt-share-wrapper:hover .kt-share-popover,
.kt-share-popover.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.kt-popover-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none !important;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.kt-popover-fb { color: #1877f2 !important; }
.kt-popover-fb:hover { background: #e7f3ff; }

.kt-popover-msg { color: #0084ff !important; }
.kt-popover-msg:hover { background: #e5f2ff; }

.kt-popover-zalo { color: #0068ff !important; }
.kt-popover-zalo:hover { background: #e6f0ff; }

.kt-popover-x { color: #0f1419 !important; }
.kt-popover-x:hover { background: #f1f5f9; }

.kt-popover-copy { color: #475569 !important; }
.kt-popover-copy:hover { background: #f1f5f9; color: #0f172a !important; }

@media (max-width: 600px) {
    .kt-action-label {
        display: none;
    }
    .kt-action-pill-btn {
        padding: 8px 12px;
    }
    .kt-popover-label {
        display: none;
    }
    .kt-popover-item {
        padding: 6px 8px;
    }
}

/* Academic Typographic Scale for Bible Text */
.kt-main-text {
    font-family: 'Lora', serif !important;
    font-size: 17px !important;
    line-height: 1.7 !important;
    color: #1e293b;
}

.kt-reader-single .kt-verse-row {
    margin-bottom: 12px;
    line-height: 1.7 !important;
    font-size: 17px !important;
    color: var(--kt-text-main);
}

.kt-reader-single .v-num {
    font-weight: 700;
    color: var(--kt-primary);
    margin-right: 6px;
    font-size: 0.85em;
}

.kt-verse-highlight {
    background-color: rgba(254, 240, 138, 0.6) !important;
    transition: background-color 1s ease;
    border-radius: 4px;
    padding: 2px 4px;
}

h3.kt-section-heading {
    color: var(--kt-primary) !important;
    font-size: 19px !important;
    font-family: 'Crimson Pro', serif !important;
    font-weight: 700 !important;
    margin: 8px 0 4px 0 !important;
    line-height: 1.35 !important;
    text-transform: uppercase !important;
}

/* Reduce margin between consecutive headings */
h3.kt-section-heading + h3.kt-section-heading {
    margin-top: 4px !important;
}

/* Chapter Navigation Footer */
.kt-chapter-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
}

.kt-btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid var(--kt-border);
    background: #ffffff;
    color: var(--kt-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.kt-btn-nav:hover {
    background: var(--kt-primary);
    color: #ffffff;
}

/* Floating Navigation Buttons Fixed */
.kt-nav-left-wrapper {
    position: absolute;
    right: 100%;
    top: 0;
    bottom: 0;
    width: 44px;
    margin-right: 15px;
    z-index: 999;
}

.kt-nav-right-wrapper {
    position: absolute;
    left: 100%;
    top: 0;
    bottom: 0;
    width: 44px;
    margin-left: 15px;
    z-index: 999;
}

#kt-prev-chap, #kt-next-chap {
    position: sticky !important;
    top: 50vh !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #1e3a8a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

#kt-prev-chap:hover, #kt-next-chap:hover {
    background: #1e3a8a !important;
    color: #ffffff !important;
    border-color: #1e3a8a !important;
    cursor: pointer;
}

@media (max-width: 1500px) {
    .kt-nav-left-wrapper, .kt-nav-right-wrapper {
        position: fixed;
        bottom: 20px;
        top: auto;
        height: 44px;
        z-index: 9999;
    }
    .kt-nav-left-wrapper {
        left: 15px;
        right: auto;
        margin: 0;
    }
    .kt-nav-right-wrapper {
        right: 15px;
        left: auto;
        margin: 0;
    }
    #kt-prev-chap, #kt-next-chap {
        position: static !important;
        transform: none !important;
    }
}

/* Remove all verse and block borders */
.kt-reader-parallel-cols .kt-verse-row-wrapper,
.kt-parallel-row,
.kt-verse-row,
.kt-inter-verse-block,
.kt-footnotes-section,
.kt-actions-bottom,
.kt-chapter-nav {
    border: none !important;
}

#kt-chap-indicator {
    font-family: 'Crimson Pro', serif !important;
    font-size: 18px !important;
    font-weight: 700;
    color: #334155;
}

/* ==========================================================================
   Chapter Picker & Cite Modal Popup (Centered Viewport Alignment)
   ========================================================================== */
.bri-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-sizing: border-box;
    padding: 16px;
}

.bri-modal.active {
    display: block !important;
}

#kt-chapter-modal .kt-chapter-modal-content,
#bri-cite-modal .bri-modal-content,
.kt-chapter-modal-content,
.bri-modal-content {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    background: #ffffff !important;
    width: 92% !important;
    max-width: 520px !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1) !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

/* Modal Chapter Grid */
.kt-modal-chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.kt-modal-chap-item {
    padding: 10px;
    background: #f1f5f9;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.kt-modal-chap-item:hover {
    background: #e2e8f0;
    border-color: var(--kt-primary);
}
.kt-modal-chap-item.active {
    background: var(--kt-primary);
    color: #ffffff;
}

@media (max-width: 480px) {
    .kt-modal-chapter-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 8px;
    }
    .kt-modal-chap-item {
        padding: 8px;
        font-size: 0.9rem;
    }
}

.bri-modal-close {
    position: absolute;
    right: 18px;
    top: 18px;
    font-size: 24px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    transition: color 0.15s ease;
}

.bri-modal-close:hover {
    color: var(--kt-primary);
}

.bri-cite-tabs {
    display: flex;
    gap: 6px;
    margin: 16px 0;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
}

.cite-tab {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.cite-tab:hover {
    color: var(--kt-primary);
    background: #f1f5f9;
}

.cite-tab.active {
    background: var(--kt-primary);
    color: #ffffff;
}

.cite-text-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1e293b;
    margin-bottom: 16px;
    min-height: 60px;
}

.kt-chapter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--kt-primary);
}

.kt-chapter-modal-header h3 {
    font-family: 'Crimson Pro', serif !important;
    font-size: 22px !important;
    color: var(--kt-primary);
    margin: 0;
}

.kt-modal-chapter-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding: 4px;
}

.kt-modal-chap-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    min-height: 44px;
    border: 1px solid var(--kt-border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: #ffffff;
    color: #334155;
    transition: all 0.15s ease;
}

.kt-modal-chap-item:hover, .kt-modal-chap-item.active {
    background: var(--kt-primary);
    color: #ffffff;
    border-color: var(--kt-primary);
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}

/* Loading Overlay & Tooltips */
.kt-loading-overlay {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(2px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.kt-spinner {
    animation: kt-spin 1s linear infinite;
    color: var(--kt-primary);
}

@keyframes kt-spin { 100% { transform: rotate(360deg); } }

/* Floating Navigation Bar Fixed on Right Edge (Vertically Centered) */
.kt-right-floating-nav {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    pointer-events: none;
}

.kt-float-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--kt-primary);
    color: #ffffff;
    border: none;
    border-radius: 20px 0 0 20px;
    box-shadow: -2px 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kt-float-btn:hover {
    background: var(--kt-primary-hover);
    transform: translateX(-4px);
    box-shadow: -4px 6px 16px rgba(0, 0, 0, 0.25);
}

.kt-float-btn-books {
    background: #0f172a;
}

.kt-float-btn-books:hover {
    background: #1e293b;
}

/* Bible Footnotes Section with Collapsible Toggle */
.kt-footnotes-section {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 2px dashed #cbd5e1;
}

.kt-toggle-fn-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--kt-primary);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.kt-toggle-fn-btn:hover {
    background: transparent;
    opacity: 0.8;
}

.kt-fn-toggle-icon {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.kt-footnotes-body {
    margin-top: 14px;
    padding: 10px 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.kt-footnotes-list {
    margin: 0;
    padding-left: 20px;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.6;
}

.kt-footnotes-list li {
    margin-bottom: 8px;
}

.kt-footnotes-list li:last-child {
    margin-bottom: 0;
}

.kt-fn-badge {
    color: #d97706;
    font-weight: 700;
    cursor: pointer;
    padding: 0 2px;
}

.kt-tooltip {
    position: absolute;
    background: #1e293b;
    color: #f8fafc;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    max-width: 300px;
    z-index: 99999;
}

/* ==========================================================================
   Responsive & Mobile-First Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
    .kt-dashboard-main {
        padding: 16px 0 40px;
    }

    .kt-container {
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    .kt-container {
        padding: 0 12px;
    }

    .kt-content-center {
        padding: 18px 14px;
        border-radius: 10px;
    }

    .kt-doc-title {
        font-size: 22px !important;
    }

    .kt-geo-subtitle {
        font-size: 0.82rem;
        margin-bottom: 12px;
    }

    .kt-toolbar-modes {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 10px !important;
    }

    .kt-view-mode-selector {
        display: flex;
        width: 100%;
        gap: 4px;
    }

    .kt-mode-btn {
        flex: 1;
        text-align: center;
        padding: 8px 4px;
        font-size: 0.78rem;
    }

    .kt-lang-controls {
        width: 100%;
        justify-content: space-between;
    }

    .kt-lang-select {
        flex: 1;
        font-size: 0.82rem;
        padding: 6px 8px;
    }

    .kt-main-text, .kt-reader-single .kt-verse-row {
        font-size: 16px !important;
        line-height: 1.65 !important;
    }

    .kt-modal-chapter-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 480px) {
    .kt-float-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        border-radius: 14px 0 0 14px;
    }

    .kt-modal-chapter-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .kt-modal-chap-item {
        height: 44px;
        min-height: 44px;
        font-size: 0.9rem;
    }

    #kt-chapter-modal .kt-chapter-modal-content {
        padding: 18px 14px !important;
        width: 95% !important;
    }

    .kt-chapter-modal-header h3 {
        font-size: 19px !important;
    }

    .kt-chapter-nav {
        padding-top: 14px;
        margin-top: 24px;
    }

    .kt-btn-nav {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    #kt-chap-indicator {
        font-size: 0.95rem !important;
    }
}

/* ==========================================================================
   2-Column Bilingual / Multilingual & Toolbar Layout Styles
   ========================================================================== */
.kt-select-btn {
    padding: 8px 12px;
    border: 1px solid var(--kt-border);
    border-radius: 8px;
    background-color: #f8fafc;
    font-size: 0.9rem;
    color: var(--kt-text-main);
    cursor: pointer;
    outline: none;
}
.kt-select-btn:focus {
    border-color: var(--kt-primary);
    box-shadow: 0 0 0 2px rgba(30,58,138,0.1);
}
.kt-lang-selectors {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

/* Parallel Cols Layout */
.kt-reader-parallel-cols .kt-verse-row-wrapper {
    display: flex;
    gap: 24px;
    padding-bottom: 6px !important;
    margin-bottom: 8px !important;
}
.kt-reader-parallel-cols .kt-verse-col {
    flex: 1;
}
.kt-reader-parallel-cols .kt-verse-row {
    margin-bottom: 0; /* Remove margin inside the flex container */
}

@media (max-width: 768px) {
    .kt-reader-parallel-cols .kt-verse-row-wrapper {
        flex-direction: column;
        gap: 4px !important;
    }
    
    .kt-reader-parallel-cols .col-secondary .kt-heading-roman {
        display: none !important;
    }
    
    .kt-reader-parallel-cols .col-secondary h3.kt-section-heading {
        font-size: 13px !important;
        font-style: italic !important;
        color: #64748b !important;
        text-transform: none !important;
    }
    .kt-toolbar-left {
        flex-direction: row;
        align-items: center;
        gap: 4px;
    }
    .kt-lang-selectors {
        flex-direction: row;
        gap: 4px;
    }
    .kt-select-btn {
        padding: 4px 6px;
        font-size: 0.8rem;
    }
    .kt-layout-toggles .kt-layout-btn {
        padding: 4px 6px !important;
    }
}

/* Modal Books Grid */
.kt-modal-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

/* Modal Categories Formatting */
.kt-book-category {
    margin-bottom: 20px;
}
.kt-book-cat-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--kt-primary);
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--kt-border);
}
.kt-book-note {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--kt-border);
}
@media (max-width: 768px) {
    .kt-book-item {
        padding: 6px 8px;
        font-size: 0.85rem;
    }
    .kt-book-badge {
        font-size: 0.7rem;
    }
    .kt-modal-books-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    
    /* Move floating nav down on mobile to avoid overlapping main text */
    .kt-right-floating-nav {
        top: 75%;
    }
}

/* ==========================================================================
   Poetry Formatting Adjustments
   ========================================================================== */
.kt-verse-row.kt-is-poetry {
    line-height: 1.45 !important;
}

.kt-reader-single .kt-verse-row.kt-is-poetry {
    margin-bottom: 8px !important;
}

.kt-reader-parallel-cols .kt-verse-row-wrapper.kt-is-poetry {
    padding-bottom: 8px !important;
    margin-bottom: 8px !important;
}

.kt-parallel-row.kt-is-poetry {
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
}
