/* ============================================================
   Quran Reader — Immersive Reading Experience
   ============================================================ */

/* ---- Arabic Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Amiri+Quran&family=Amiri:ital,wght@0,400;0,700;1,400&family=Scheherazade+New:wght@400;700&display=swap');

/* ---- Mushaf Page (Left) ---- */
.mushaf-page {
    background: linear-gradient(135deg, #fdf8f0 0%, #f9f3e8 50%, #fdf8f0 100%);
    border: 1px solid rgba(180, 160, 120, 0.3);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow:
        inset 2px 0 8px rgba(0, 0, 0, 0.04),
        4px 4px 20px rgba(0, 0, 0, 0.08),
        -2px 0 6px rgba(0, 0, 0, 0.03);
    padding: 30px 25px;
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.mushaf-page::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #d4a855 0%, #c49a45 50%, #d4a855 100%);
    border-radius: 3px 0 0 3px;
}

/* ---- Arabic Text Display ---- */
.arabic-verse-text {
    font-family: 'Amiri Quran', 'Scheherazade New', 'Amiri', 'Traditional Arabic', serif;
    font-size: 2.2rem;
    line-height: 2.4;
    direction: rtl;
    text-align: center;
    color: #1a1a2e;
    padding: 20px 15px;
    letter-spacing: 0.02em;
    word-spacing: 0.15em;
}

.bismillah-text {
    font-family: 'Amiri Quran', 'Scheherazade New', 'Amiri', serif;
    font-size: 1.6rem;
    line-height: 2;
    direction: rtl;
    text-align: center;
    color: #8B7355;
    padding: 8px 0 15px;
    border-bottom: 1px solid rgba(180, 160, 120, 0.25);
    margin-bottom: 15px;
}

.verse-ornament {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #DAA520);
    color: #1a1a2e;
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0 8px;
    box-shadow: 0 2px 6px rgba(218, 165, 32, 0.3);
    font-family: 'Inter', sans-serif;
    vertical-align: middle;
    flex-shrink: 0;
}

.translation-text {
    font-family: 'Georgia', 'Cambria', 'Times New Roman', serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #3d3d3d;
    font-style: italic;
    text-align: center;
    padding: 15px 20px;
    border-top: 1px solid rgba(180, 160, 120, 0.2);
    margin-top: 10px;
}

.translator-attribution {
    text-align: center;
    font-size: 0.75rem;
    color: #9B8D7B;
    margin-top: 5px;
    font-style: normal;
}

/* ---- Insight Page (Right) ---- */
.insight-page {
    background: #ffffff;
    border: 1px solid rgba(0, 74, 173, 0.1);
    border-radius: 12px;
    box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.06);
    padding: 0;
    min-height: 500px;
    overflow: hidden;
}

/* ---- Layer Tabs ---- */
.layer-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.layer-tab {
    flex: 1;
    padding: 8px 5px;
    text-align: center;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.25s ease;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    outline: none;
    white-space: nowrap;
}

.layer-tab i {
    font-size: 0.72rem;
}

.layer-tab .tab-label {
    font-size: 0.68rem;
}

.tab-divider {
    width: 1px;
    background: #dee2e6;
    margin: 6px 0;
    flex-shrink: 0;
}

.layer-tab:hover {
    color: #004aad;
    background: rgba(0, 74, 173, 0.04);
}

.layer-tab.active {
    color: #004aad;
    border-bottom-color: #004aad;
    background: white;
    font-weight: 600;
}

.layer-content {
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- WBW Table ---- */
.wbw-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
    direction: rtl;
}

.wbw-table th {
    text-align: center;
    font-size: 0.65rem;
    color: #9B8D7B;
    padding: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    direction: ltr;
}

.wbw-table td {
    text-align: center;
    padding: 6px 4px;
    vertical-align: middle;
}

.wbw-arabic {
    font-family: 'Amiri', 'Scheherazade New', serif;
    font-size: 1.4rem;
    color: #1a1a2e;
    line-height: 1.8;
    direction: rtl;
}

.wbw-translit {
    font-size: 0.72rem;
    color: #8E44AD;
    font-style: italic;
    direction: ltr;
}

.wbw-english {
    font-size: 0.72rem;
    color: #3498DB;
    direction: ltr;
}

.wbw-root {
    font-size: 0.65rem;
    color: #95A5A6;
    font-family: monospace;
    direction: ltr;
}

.wbw-pos {
    font-size: 0.6rem;
    color: white;
    background: #27AE60;
    padding: 1px 5px;
    border-radius: 3px;
    display: inline-block;
    direction: ltr;
}

/* ── Translation Picker ── */
.tp-container {
    position: relative;
}
.tp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 6px;
}
.tp-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #8B7355;
}
.tp-add-lang {
    font-size: 0.62rem;
    padding: 3px 8px;
    border-radius: 10px;
    background: none;
    border: 1px dashed rgba(139, 115, 85, 0.4);
    color: #8B7355;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
    position: relative;
}
.tp-add-lang:hover {
    background: rgba(139, 115, 85, 0.08);
    border-style: solid;
}
.tp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}
.tp-chip {
    font-size: 0.6rem;
    padding: 3px 8px;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    transition: all 0.15s;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 3px;
}
.tp-chip.on {
    background: var(--chip-color, #3498DB);
    color: #fff;
}
.tp-chip.off {
    background: rgba(0,0,0,0.04);
    color: #aaa;
    border-color: rgba(0,0,0,0.08);
}
.tp-chip.off:hover {
    background: rgba(0,0,0,0.07);
    color: #777;
}
.tp-lang-group {
    margin-bottom: 4px;
}
.tp-lang-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #b0a080;
    margin: 6px 0 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.tp-lang-name {
    flex: 1;
}
.tp-remove-lang {
    font-size: 0.55rem;
    color: #d0a0a0;
    cursor: pointer;
    transition: color 0.15s;
    padding: 2px 4px;
}
.tp-remove-lang:hover {
    color: #c00;
}
.tp-trans-row {
    transition: all 0.2s ease;
}
.tp-trans-row[style*="display: none"] {
    height: 0;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
}
/* Language dropdown */
.tp-lang-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 50;
    background: #fffdf7;
    border: 1px solid rgba(139, 115, 85, 0.15);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    max-height: 260px;
    overflow-y: auto;
    min-width: 200px;
    padding: 4px 0;
    scrollbar-width: thin;
}
.tp-lang-dropdown .tp-lang-opt {
    padding: 6px 12px;
    font-size: 0.72rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.1s;
    color: #444;
}
.tp-lang-dropdown .tp-lang-opt:hover {
    background: rgba(139, 115, 85, 0.08);
}
.tp-lang-dropdown .tp-lang-count {
    font-size: 0.6rem;
    color: #bbb;
}
.tp-lang-dropdown .tp-lang-opt.disabled {
    color: #ddd;
    cursor: default;
}
.tp-lang-dropdown .tp-lang-opt.disabled:hover {
    background: none;
}

/* ---- Sura Sidebar ---- */
.sura-sidebar {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 74, 173, 0.3) transparent;
}

.sura-sidebar::-webkit-scrollbar {
    width: 5px;
}

.sura-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 74, 173, 0.3);
    border-radius: 3px;
}

.sura-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: 2px;
}

.sura-item:hover {
    background: rgba(0, 74, 173, 0.06);
    border-color: rgba(0, 74, 173, 0.1);
}

.sura-item.active {
    background: rgba(0, 74, 173, 0.1);
    border-color: #004aad;
    box-shadow: 0 2px 8px rgba(0, 74, 173, 0.12);
}

.sura-item .sura-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f4ff, #e8eef8);
    font-size: 0.75rem;
    font-weight: 600;
    color: #004aad;
    margin-right: 10px;
    flex-shrink: 0;
}

.sura-item.active .sura-number {
    background: linear-gradient(135deg, #004aad, #0056cc);
    color: white;
}

.sura-item .sura-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: #2C3E50;
    line-height: 1.3;
}

.sura-item .sura-verses {
    font-size: 0.65rem;
    color: #95A5A6;
}

/* ====== READER NAV WRAPPER (flush with mushaf) ====== */
.reader-nav-wrapper {
    background: linear-gradient(135deg, #fdf8f0 0%, #f7f0e4 100%);
    border: 1px solid rgba(180, 160, 120, 0.3);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 0;
    margin-top: 0;
    overflow: hidden;
}

/* ====== ROW 1: VERSE SELECTOR ====== */
.nav-row-verse {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px 6px;
}

.reader-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(180, 160, 120, 0.5);
    background: rgba(255, 255, 255, 0.6);
    color: #8B7355;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    flex-shrink: 0;
    padding: 0;
}

.reader-nav-btn:hover {
    background: rgba(201, 168, 76, 0.15);
    border-color: #c9a84c;
    color: #6B5635;
    transform: scale(1.06);
}

.reader-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* Connected verse selector pill */
.nav-verse-pill {
    display: flex;
    align-items: center;
    direction: ltr;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(180, 160, 120, 0.35);
    border-radius: 24px;
    padding: 2px 4px;
    gap: 0;
    flex: 1;
    max-width: 340px;
    min-width: 0;
}

.nav-colon {
    font-weight: 700;
    color: #b4a078;
    font-size: 1rem;
    padding: 0 2px;
    flex-shrink: 0;
    line-height: 1;
}

/* Sura dropdown inside pill — takes ~80% */
.nav-sura-dd {
    flex: 4 1 0;
    min-width: 0;
    overflow: hidden;
}

/* Aya dropdown inside pill — takes ~20% */
.nav-aya-dd {
    flex: 0 0 56px;
    max-width: 56px;
    min-width: 40px;
}

/* Dropdown overrides for pill context */
.nav-verse-pill .dash-dropdown > div {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 30px;
}

.nav-verse-pill .dash-dropdown > div > div {
    color: #5a4a3a !important;
}

.nav-verse-pill .dash-dropdown .Select-control {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 30px;
}

.nav-verse-pill .Select-placeholder,
.nav-verse-pill .Select-value-label {
    color: #5a4a3a !important;
    font-size: 0.78rem;
}

.nav-verse-pill .Select-arrow-zone {
    padding: 0 4px;
}

.nav-verse-pill .Select-menu-outer {
    border-color: rgba(180, 160, 120, 0.3);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* ====== ROW 2: ACTIONS + AUTOPLAY ====== */
.nav-row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 16px 8px;
    flex-wrap: nowrap;
}

.nav-actions-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Action buttons (bookmark, random, explorer, globe) */
.nav-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(180, 160, 120, 0.35);
    background: rgba(255, 255, 255, 0.5);
    color: #8B7355;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    text-decoration: none;
    padding: 0;
    flex-shrink: 0;
    outline: none;
}

.nav-action-btn:hover {
    background: rgba(201, 168, 76, 0.15);
    border-color: #c9a84c;
    color: #6B5635;
}

/* Bookmarked state */
.nav-action-bookmarked {
    color: #c9a84c !important;
    background: rgba(201, 168, 76, 0.15) !important;
    border-color: #c9a84c !important;
}

/* Globe toggle active state */
.nav-action-active {
    color: #c9a84c !important;
    background: rgba(201, 168, 76, 0.2) !important;
    border-color: #c9a84c !important;
}

/* Vertical divider between actions and autoplay */
.nav-divider {
    width: 1px;
    height: 20px;
    background: rgba(180, 160, 120, 0.3);
    margin: 0 4px;
    flex-shrink: 0;
}

/* Autoplay group */
.nav-autoplay-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-autoplay-label {
    font-size: 0.72rem;
    color: #8B7355;
    cursor: pointer;
    white-space: nowrap;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.nav-autoplay-label i {
    font-size: 0.7rem;
}

.nav-autoplay-switch {
    margin-bottom: 0;
}

.nav-autoplay-switch .form-check-input:checked {
    background-color: #0d5c3a;
    border-color: #0d5c3a;
}

/* ====== ROW 3: LANGUAGE / TRANSLATOR ====== */
.nav-row-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 10px;
    border-top: 1px solid rgba(180, 160, 120, 0.15);
}

.nav-lang-dd .Select-control,
.nav-translator-dd .Select-control {
    min-height: 30px;
    border-color: rgba(180, 160, 120, 0.3) !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: 8px;
    font-size: 0.78rem;
}

.nav-lang-dd .dash-dropdown > div,
.nav-translator-dd .dash-dropdown > div {
    border-color: rgba(180, 160, 120, 0.3) !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: 8px;
    min-height: 30px;
}

.nav-lang-dd .Select-placeholder,
.nav-translator-dd .Select-placeholder,
.nav-lang-dd .Select-value-label,
.nav-translator-dd .Select-value-label {
    color: #5a4a3a !important;
    font-size: 0.78rem;
}

.nav-lang-dd .dash-dropdown > div > div,
.nav-translator-dd .dash-dropdown > div > div {
    color: #5a4a3a !important;
}

.nav-lang-dd .Select-control:hover,
.nav-translator-dd .Select-control:hover {
    border-color: #c9a84c !important;
}

.nav-lang-dd .Select-menu-outer,
.nav-translator-dd .Select-menu-outer {
    border-color: rgba(180, 160, 120, 0.3);
    border-radius: 8px;
}

/* Globe toggle button (hidden on desktop, shown on mobile) */
.nav-lang-toggle-btn {
    display: none;
}

/* ---- Sura Info Strip ---- */
.sura-info-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(0, 74, 173, 0.04), rgba(203, 108, 230, 0.04));
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(0, 74, 173, 0.08);
}

.sura-info-strip .sura-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #004aad;
}

.sura-info-strip .sura-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.3rem;
    color: #8E44AD;
}

/* ---- Character Chips ---- */
.character-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin: 2px;
}

.character-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* (bookmark styles moved to .nav-action-btn / .nav-action-bookmarked above) */

/* ---- Famous Verse Pills ---- */
.famous-pill {
    font-size: 0.72rem;
    border-radius: 15px;
    padding: 4px 12px;
    margin: 2px;
    border: 1px solid rgba(155, 89, 182, 0.3);
    color: #9B59B6;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.famous-pill:hover {
    background: rgba(155, 89, 182, 0.1);
    border-color: #9B59B6;
}

/* ---- Need Badge (Layer 1) ---- */
.need-indicator-bar {
    height: 6px;
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* ---- Semantic Gauge Dots ---- */
.gauge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
}

/* ---- Character Detail Cards (Tab 4) ---- */
.reader-char-card {
    border-left: 3px solid #95A5A6;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fafbfc;
    transition: box-shadow 0.2s ease;
}

.reader-char-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* ---- Relationship Cards (Tab 5) ---- */
.reader-rel-card {
    background: rgba(52, 152, 219, 0.04);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

/* ---- Act Cards (Tab 7) ---- */
.reader-act-card {
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .arabic-verse-text {
        font-size: 1.8rem;
        line-height: 2;
    }
    .mushaf-page, .insight-page {
        min-height: 350px;
    }
}

@media (max-width: 991px) {
    .layer-tab .tab-label {
        display: none;
    }
    .layer-tab {
        padding: 8px 4px;
    }
    .layer-tab i {
        margin-right: 0 !important;
    }
}

@media (max-width: 767px) {
    .arabic-verse-text {
        font-size: 1.5rem;
        line-height: 1.8;
        padding: 10px 8px;
    }
    .mushaf-page {
        padding: 15px 12px;
    }
    .sura-info-strip {
        flex-wrap: wrap;
        gap: 8px;
    }
    .wbw-arabic {
        font-size: 1.1rem;
    }
    .wbw-translit, .wbw-english {
        font-size: 0.65rem;
    }
    .layer-tab {
        font-size: 0.65rem;
        padding: 6px 3px;
    }
}

/* ---- Mushaf Audio Section ---- */
.mushaf-audio-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0 0;
    border-top: 1px solid rgba(180, 160, 120, 0.2);
    margin-top: 10px;
}

.mushaf-audio-btn {
    border: 1px solid rgba(180, 160, 120, 0.4) !important;
    color: #8B7355 !important;
    background: rgba(253, 248, 240, 0.8) !important;
    font-size: 0.82rem !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    transition: all 0.25s ease;
}

.mushaf-audio-btn:hover {
    background: rgba(180, 160, 120, 0.15) !important;
    border-color: #8B7355 !important;
    transform: scale(1.04);
}

.mushaf-audio-btn.audio-active {
    background: rgba(180, 160, 120, 0.2) !important;
    border-color: #8B7355 !important;
    color: #6B5635 !important;
}

.mushaf-speaker-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #9B8D7B;
}

/* Translation audio button */
.mushaf-trans-audio-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0 0;
}

.mushaf-trans-audio-btn {
    border: 1px solid rgba(52, 152, 219, 0.4) !important;
    color: #2980B9 !important;
    background: rgba(52, 152, 219, 0.06) !important;
    font-size: 0.78rem !important;
    padding: 5px 14px !important;
    border-radius: 18px !important;
    transition: all 0.25s ease;
}

.mushaf-trans-audio-btn:hover {
    background: rgba(52, 152, 219, 0.15) !important;
    border-color: #2980B9 !important;
    transform: scale(1.04);
}

.mushaf-trans-audio-btn.audio-active {
    background: rgba(52, 152, 219, 0.2) !important;
    border-color: #2471A3 !important;
    color: #1A5276 !important;
}

/* Translation audio verse sync indicator */
/* (autoplay styles moved to .nav-autoplay-* above) */

/* ====== DESKTOP (>767px) ====== */
@media (min-width: 768px) {
    .nav-lang-toggle-btn {
        display: none !important;
    }
    .nav-row-lang {
        display: flex !important;
    }
    .reader-nav-btn {
        width: 38px;
        height: 38px;
    }
    .nav-action-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    .nav-verse-pill {
        max-width: 360px;
    }
    .nav-sura-dd {
        min-width: 140px;
        flex: 4;
    }
    .nav-aya-dd {
        width: 65px;
    }
}

/* ====== MOBILE (<=767px) ====== */
@media (max-width: 767px) {
    .mushaf-audio-section {
        flex-direction: column;
        gap: 8px;
    }
    .nav-row-verse {
        padding: 8px 10px 4px;
        gap: 6px;
    }
    .reader-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    .nav-verse-pill {
        max-width: none;
        flex: 1;
    }
    .nav-sura-dd .Select-value-label,
    .nav-sura-dd .Select-placeholder {
        font-size: 0.72rem !important;
    }
    .nav-aya-dd {
        width: 50px;
    }
    .nav-row-actions {
        padding: 4px 10px 6px;
        gap: 5px;
    }
    .nav-action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    .nav-divider {
        height: 16px;
    }
    .nav-autoplay-label {
        font-size: 0.65rem;
    }
    /* Language row: visible by default on mobile, toggle to collapse */
    .nav-row-lang {
        display: flex;
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 6px;
    }
    .nav-row-lang.nav-lang-closed {
        display: none;
    }
    @keyframes navLangSlide {
        from { opacity: 0; transform: translateY(-4px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .nav-row-lang > .fas.fa-globe {
        display: none;
    }
    .nav-row-lang > div {
        flex: 1;
        min-width: 0;
    }
    .nav-lang-dd .Select-control,
    .nav-translator-dd .Select-control {
        min-height: 28px;
        font-size: 0.72rem;
    }
    .nav-lang-dd .dash-dropdown > div,
    .nav-translator-dd .dash-dropdown > div {
        min-height: 28px;
    }
    /* Globe toggle button visible on mobile */
    .nav-lang-toggle-btn {
        display: flex !important;
        margin-left: auto;
    }
}

/* ====== TINY SCREENS (<=400px) ====== */
@media (max-width: 400px) {
    .nav-row-verse {
        padding: 6px 6px 3px;
        gap: 4px;
    }
    .reader-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    .nav-sura-dd .Select-value-label {
        font-size: 0.68rem !important;
    }
    .nav-aya-dd {
        width: 44px;
    }
    .nav-action-btn {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
    }
    .nav-autoplay-label small {
        display: none;
    }
}

/* ---- Print Styles ---- */
@media print {
    .sura-sidebar, .reader-nav-wrapper, .layer-tabs {
        display: none !important;
    }
    .mushaf-page {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
