
.quran-tajweed-legend {
    display: none;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.68rem;
    direction: ltr;
}
.quran-page.quran-tajweed-on .quran-tajweed-legend { display: flex; }
.quran-tajweed-legend span { display: inline-flex; align-items: center; gap: 5px; color: #475569; }
.quran-tajweed-legend i {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    font-style: normal;
}
.quran-book .tjw { border-radius: 2px; padding: 0 1px; }
.quran-book .tjw-h, .quran-book .tjw-s { color: #64748b; }
.quran-book .tjw-n, .quran-book .tjw-g { color: #15803d; font-weight: 600; }
.quran-book .tjw-m { color: #b91c1c; font-weight: 700; }
.quran-book .tjw-p, .quran-book .tjw-l, .quran-book .tjw-q, .quran-book .tjw-o, .quran-book .tjw-i, .quran-book .tjw-c { color: #1d4ed8; }
.quran-book .tjw-b { color: #7c3aed; }
#qtpRailHead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.72rem;
}
#qtpRailHead strong { color: #1e3a5f; font-size: 0.78rem; flex: 1 1 100%; }
#qtpTafsirSource {
    flex: 1 1 140px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.72rem;
}
.qtp-tafsir {
    font-size: 0.76rem;
    color: #475569;
    line-height: 1.55;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    max-height: 120px;
    overflow: auto;
}
.qtp-tafsir.loading { color: #94a3b8; font-style: italic; }
.qtp-tafsir a { color: #1d4ed8; }
.qtp-open-tafsir {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #1e3a5f;
    text-decoration: none;
}
.qtp-open-tafsir:hover { text-decoration: underline; }
