/* =====================================================================
   نور القرآن — mushaf.html (E‑Mushaf reader)
   ===================================================================== */
.mushaf-wrap { padding: calc(var(--header-h) + 22px) 0 60px; position: relative; }
@media (min-width: 1200px) { .mushaf-wrap { padding-top: calc(var(--header-h) + 10px); } }
.mu-top { display: flex; align-items: end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.mu-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0; }
.mu-title i { color: var(--accent); }
.mu-info { display: flex; flex-wrap: wrap; gap: 8px; }
.mu-info span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-family: var(--font-head); font-weight: 700; font-size: .84rem; color: var(--heading); }
.mu-info i { color: var(--accent-strong); }

/* toolbar */
.mu-toolbar { position: sticky; top: calc(var(--header-h-compact) + 8px); z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 20px; background: var(--glass); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom: 18px; }
@media (max-width: 1199.98px) { .mu-toolbar { top: 80px; } }
.mu-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mu-toolbar .icon-btn { width: 40px; height: 40px; font-size: 1rem; }
.mu-toolbar select.input-nq { height: 40px; padding-block: 0; width: auto; max-width: 170px; border-radius: 999px; font-size: .9rem; }
.mu-page-input { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 700; color: var(--muted); font-size: .9rem; }
.mu-page-input input { width: 74px; height: 40px; text-align: center; border-radius: 999px; padding: 4px 8px; font-weight: 800; }
.mu-listen .btn-nq.is-on { background: var(--nq-gold-400); color: var(--nq-green-950); }
@media (max-width: 991.98px) {
  .mu-toolbar { justify-content: center; }
  .mu-selects { order: 3; width: 100%; justify-content: center; }
  .mu-selects select.input-nq { flex: 1 1 0; max-width: none; min-width: 0; }
  .mu-listen { order: 4; width: 100%; justify-content: center; }
  .mu-listen select.input-nq { flex: 1; max-width: none; }
}
@media (max-width: 575.98px) { .mu-toolbar { position: static; } .mu-tools .icon-btn { width: 36px; height: 36px; } }
.mu-bm-menu { min-width: 240px; max-height: 320px; overflow-y: auto; }
.mu-bm-menu .dropdown-item { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.mu-bm-menu .dropdown-item small { color: var(--muted); }

/* reader themes (scoped to the book) */
.mu-book { --mu-paper: #fdf8ea; --mu-paper-2: #f6ecd2; --mu-ink: #1a2a22; --mu-frame: #c3a05a; --mu-soft: rgba(195,160,90,.16); --mu-active: rgba(195,160,90,.28); --mu-head: #0e3b2e; }
[data-theme="dark"] .mu-book.theme-auto, .mu-book.theme-night { --mu-paper: #0f211b; --mu-paper-2: #0b1a15; --mu-ink: #ecdfbf; --mu-frame: #a8823a; --mu-soft: rgba(214,184,120,.12); --mu-active: rgba(214,184,120,.22); --mu-head: #e6cf9c; }
.mu-book.theme-sepia { --mu-paper: #f3e3bf; --mu-paper-2: #e8d2a3; --mu-ink: #3b2a12; --mu-frame: #8f6c2c; --mu-soft: rgba(143,108,44,.15); --mu-active: rgba(143,108,44,.25); --mu-head: #5b3a1e; }

/* stage */
.mu-stage { position: relative; display: flex; align-items: stretch; gap: 10px; }
.mu-book { flex: 1; display: grid; grid-template-columns: 1fr; gap: 0; min-width: 0; --mu-fs: 1.42rem; touch-action: pan-y; }
.mu-book.is-spread { grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .mu-book { --mu-fs: 1.62rem; } }
.mu-side { flex: none; width: 48px; border: 0; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); color: var(--accent-strong); font-size: 1.8rem; cursor: pointer; display: grid; place-items: center; transition: all .25s var(--ease); }
.mu-side:hover { background: var(--accent-soft); color: var(--heading); }
.mu-side:disabled { opacity: .35; cursor: default; }
@media (max-width: 767.98px) { .mu-side { display: none; } }
/* the mushaf is an RTL book in every UI language: "next" sits on the left, "previous" on the right */
.mu-stage, .mu-nav { direction: ltr; }
.mu-nav { direction: rtl; }

.mu-page { position: relative; background: radial-gradient(120% 100% at 50% 0%, var(--mu-paper) 0%, var(--mu-paper-2) 100%); color: var(--mu-ink); padding: clamp(26px, 4vw, 54px) clamp(18px, 3.5vw, 50px) clamp(22px, 3vw, 40px); box-shadow: var(--shadow); min-height: min(78vh, 900px); display: flex; flex-direction: column; transition: background .4s, color .4s; border: 1px solid var(--border); }
.mu-book:not(.is-spread) .mu-page { border-radius: 18px; }
.mu-book.is-spread .mu-page:first-child { border-radius: 0 18px 18px 0; box-shadow: inset 18px 0 24px -20px rgba(0,0,0,.35), var(--shadow); }
.mu-book.is-spread .mu-page:last-child { border-radius: 18px 0 0 18px; box-shadow: inset -18px 0 24px -20px rgba(0,0,0,.35), var(--shadow); }
.mu-page::before { content: ""; position: absolute; inset: 12px; border: 2px solid var(--mu-frame); border-radius: 10px; pointer-events: none; opacity: .75; }
.mu-page::after { content: ""; position: absolute; inset: 17px; border: 1px solid var(--mu-frame); border-radius: 7px; pointer-events: none; opacity: .4; }
.mu-ph { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: .82rem; color: var(--mu-head); opacity: .85; padding: 0 6px 10px; border-bottom: 1px solid var(--mu-soft); margin-bottom: 12px; position: relative; z-index: 1; }
.mu-text { flex: 1; font-family: var(--font-quran); font-size: var(--mu-fs); line-height: 2.25; text-align: justify; text-align-last: center; position: relative; z-index: 1; word-spacing: .04em; }
.mu-page.is-short .mu-text { text-align: center; display: flex; flex-direction: column; justify-content: center; }
.mu-pf { text-align: center; margin-top: 12px; position: relative; z-index: 1; }
.mu-pn { display: inline-grid; place-items: center; min-width: 44px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--mu-frame); font-family: var(--font-head); font-weight: 800; font-size: .85rem; color: var(--mu-head); }
.mu-sh { position: relative; margin: 12px 0 6px; padding: 8px 10px; text-align: center; text-align-last: center; border: 1.5px solid var(--mu-frame); border-radius: 12px; background: linear-gradient(90deg, transparent, var(--mu-soft), transparent); font-family: var(--font-display); font-weight: 700; font-size: calc(var(--mu-fs) * .9); color: var(--mu-head); line-height: 1.6; }
.mu-sh::before, .mu-sh::after { content: "۞"; position: absolute; top: 50%; transform: translateY(-50%); color: var(--mu-frame); font-size: .9em; }
.mu-sh::before { right: 14px; } .mu-sh::after { left: 14px; }
.mu-sh small { display: block; font-family: var(--font-head); font-size: .55em; font-weight: 600; opacity: .8; }
.mu-basmala { text-align: center; text-align-last: center; margin: 2px 0 6px; color: var(--mu-head); }
.m-ayah { cursor: pointer; border-radius: 8px; transition: background-color .25s; padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.m-ayah:hover, .m-ayah:focus-visible { background: var(--mu-soft); outline: none; }
.m-ayah.is-active { background: var(--mu-active); box-shadow: 0 0 0 2px var(--mu-active); }
.m-ayah.is-hl { animation: muHl 2.4s ease-out 2; }
@keyframes muHl { 0%, 100% { background: transparent; } 30% { background: var(--mu-active); } }
.mu-text .ayah-num { color: var(--mu-frame); font-size: .58em; width: 2em; height: 2em; }
.mu-page.is-loading .mu-text { display: grid; gap: 14px; align-content: start; padding-top: 10px; }
.mu-page.is-loading .skeleton { height: 1.3em; opacity: .6; }
.mu-error { text-align: center; padding: 60px 10px; font-family: var(--font-body); font-size: 1rem; }
.mu-error i { font-size: 2.2rem; color: var(--danger); display: block; margin-bottom: 10px; }
.mu-book.turn-next .mu-page { animation: muTurnN .45s var(--ease-out); }
.mu-book.turn-prev .mu-page { animation: muTurnP .45s var(--ease-out); }
@keyframes muTurnN { from { opacity: 0; transform: translateX(-26px); } }
@keyframes muTurnP { from { opacity: 0; transform: translateX(26px); } }
.mu-slider { margin: 18px 8px 6px; }
.mu-hint { text-align: center; font-size: .86rem; }

/* full screen */
.mu-stage:fullscreen { background: var(--bg); padding: 20px; overflow-y: auto; }
.mu-stage:fullscreen .mu-page { min-height: calc(100vh - 40px); }

/* panels */
.mu-panel { width: min(440px, 92vw) !important; }
.mu-panel .offcanvas-header h2 { color: #f4ead2; }
.mu-a-text { font-family: var(--font-quran); font-size: 1.6rem; line-height: 2.2; color: var(--quran-ink); text-align: right; direction: rtl; padding: 18px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.mu-a-sec { margin-top: 18px; }
.mu-a-sec h3 { font-size: .95rem; color: var(--accent-strong); display: flex; align-items: center; gap: 8px; }
.mu-a-sec p { color: var(--text-2); line-height: 1.95; margin: 0; }
.mu-a-sec .ltr-p { direction: ltr; text-align: left; }
.mu-a-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mu-res { display: block; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 8px; color: var(--text); transition: all .2s; }
.mu-res:hover { border-color: var(--accent); background: var(--surface-2); color: var(--text); }
.mu-res .r-t { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.9; direction: rtl; text-align: right; display: block; }
.mu-res .r-t mark { background: var(--nq-gold-300); color: var(--nq-green-950); border-radius: 4px; padding: 0 2px; }
.mu-res small { color: var(--accent-strong); font-family: var(--font-head); font-weight: 700; }
