/* v32 — «عرض الصفحة كاملة»: صفحة مصحف المدينة ملء الشاشة */
.mpv { --mfs: 22px; --mrh: 50px; --mpw: 360px; --pbg: #fff8e7; --pink: #1d1406; --pgold: #a37f2c; --pbar: rgba(255,248,231,.94);
  position: fixed; inset: 0; z-index: 15; background: var(--pbg); color: var(--pink); overflow: hidden; touch-action: none; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.mpv[hidden] { display: none; }
[data-theme="night"] .mpv { --pbg: #14110b; --pink: #ece3cc; --pgold: #d4b062; --pbar: rgba(20,17,11,.94); }
body.mpv-on { overflow: hidden; }
body.mpv-on .tabs, body.mpv-on > .app, body.mpv-on > .sky { display: none; } /* لا تُعاد صياغة صفحة الآيات تحت الصفحة الكاملة (أخفّ وأنعم في التقليب) */
.mpv-stage { position: absolute; inset: calc(env(safe-area-inset-top) + 50px) 0 calc(env(safe-area-inset-bottom) + 46px); overflow: hidden; }
.mpv-track { position: absolute; inset: 0; transform: translate3d(0,0,0); backface-visibility: hidden; }
.mpv .pg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; contain: strict; backface-visibility: hidden; background: var(--pbg); }
.mpv .pin { position: relative; width: var(--mpw); height: calc(var(--mrh) * 15); display: grid; grid-template-rows: repeat(15, var(--mrh)); font-size: var(--mfs); line-height: 1; direction: rtl;
  font-feature-settings: normal; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
.mpv .ml { display: flex; align-items: center; white-space: nowrap; font-size: calc(var(--mfs) * var(--k, 1)); min-width: 0; }
.mpv .ml.j { justify-content: space-between; }
.mpv .ml.c { justify-content: center; gap: .16em; }
.mpv .w { display: inline-block; padding: .08em 0; border-radius: .18em; transition: background-color .2s; }
.mpv .w.e { color: var(--pgold); }
.mpv .w.on { background: rgba(201,162,74,.28); box-shadow: 0 0 0 .06em rgba(201,162,74,.28); }
.mpv .w.pl { background: rgba(18,102,82,.16); }
[data-theme="night"] .mpv .w.pl { background: rgba(212,176,98,.2); }
.mpv .bsm { font-size: calc(var(--mfs) * .98); }
.mpv .sh { justify-content: center; }
.mpv .shf { position: relative; width: 100%; height: calc(var(--mrh) * .86); display: flex; align-items: center; justify-content: center; color: var(--pgold); }
.mpv .shf-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mpv .shf b { position: relative; font: 700 calc(var(--mfs) * .92)/1 'Amiri', 'Amiri Quran', serif; color: var(--pink); padding: 0 1.6em; background: var(--pbg); }
.mpv .pno { margin-top: auto; height: 24px; display: flex; align-items: center; padding: 0; font: 800 13px/1 'Tajawal', sans-serif; color: var(--pgold); }
/* الصفحتان الأولى والثانية: الأسطر في وسط الصفحة داخل إطار كالمطبوع */
.mpv .p12 .pin { grid-template-rows: repeat(8, calc(var(--mrh) * 1.22)); align-content: center; font-size: calc(var(--mfs) * 1.16); }
.mpv .p12 .pin::before { content: ""; position: absolute; inset: calc(50% - var(--mrh) * 5.4) -4px; border: 2px solid var(--pgold); border-radius: 50% / 9%; opacity: .5; pointer-events: none; }
.mpv .p12 .pin::after { content: ""; position: absolute; inset: calc(50% - var(--mrh) * 5.6) -9px; border: 1px solid var(--pgold); border-radius: 50% / 9%; opacity: .35; pointer-events: none; }
.mpv .p12 .ml { font-size: calc(var(--mfs) * 1.16 * var(--k, 1)); }
/* أثناء تحميل خط الصفحة */
.mpv .pg:not(.ok) .pin { visibility: hidden; }
.mpv .pg:not(.ok)::before { content: "جارٍ تحميل الصفحة…"; position: absolute; top: 40%; left: 0; right: 0; text-align: center; font: 700 14px 'Tajawal', sans-serif; color: var(--pgold); }
.mpv .pg.bad::before { content: "تحتاج هذه الصفحة اتصالًا بالإنترنت أول مرة — ثم تبقى محفوظة"; padding: 0 24px; }
/* الشريطان العلوي والسفلي (يختفيان بلمسة) */
.mpv-top, .mpv-bot { position: absolute; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--pbar);
  transition: transform .22s ease, opacity .22s ease; }
.mpv-top { top: 0; padding-top: calc(env(safe-area-inset-top) + 6px); height: calc(env(safe-area-inset-top) + 50px); box-sizing: border-box; }
.mpv-bot { bottom: 0; height: calc(env(safe-area-inset-bottom) + 46px); box-sizing: border-box; padding-top: 4px; padding-bottom: calc(env(safe-area-inset-bottom) + 4px); box-shadow: 0 -1px 0 rgba(163,127,44,.18); }
.mpv.nobars .mpv-top { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.mpv.nobars .mpv-bot { transform: translateY(100%); opacity: 0; pointer-events: none; }
.mpv-sp { flex: 1; }
.mpv-ic { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--pgold); cursor: pointer; }
.mpv-ic svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mpv-ic:active { background: rgba(201,162,74,.18); }
.mpv-bm.on svg { fill: currentColor; }
.mpv-tj.on { background: rgba(201,162,74,.2); }
.mpv-pill { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1.5px solid rgba(163,127,44,.55); background: rgba(255,255,255,.35);
  color: var(--pink); font: 800 14px/1 'Tajawal', sans-serif; cursor: pointer; }
[data-theme="night"] .mpv-pill { background: rgba(255,255,255,.05); }
.mpv-pill i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--pgold); color: var(--pbg); }
.mpv-pill i svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.mpv-jz { cursor: default; font-size: 12.5px; height: 28px; }
.mpv-sn b { font-size: 15px; }
body.mpv-on .player { z-index: 17; bottom: calc(env(safe-area-inset-bottom) + 58px); }
body.mpv-on .mpv.nobars ~ .player, body.mpv-on .toast { z-index: 31; }
/* قائمة الآية (ضغط مطوّل) */
.mpv-act { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.22); }
.mpv-act[hidden], .mpv-sheet[hidden] { display: none; }
.mpv-ac { width: min(520px, 100%); margin: 0 8px calc(env(safe-area-inset-bottom) + 10px); padding: 14px; border-radius: 20px; background: var(--card, #fffdf7); color: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.25); font-family: 'Tajawal', sans-serif; }
.mpv-ac > b { display: block; text-align: center; margin-bottom: 10px; font-size: 15px; }
.mpv-ab { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mpv-ab .btn { justify-content: center; min-height: 42px; }
.mpv-ab .ghost { grid-column: span 3; } .mpv-ab [data-a="x"] { grid-column: span 3; }
@media (min-width: 420px) { .mpv-ab .ghost { grid-column: auto; } .mpv-ab { grid-template-columns: repeat(5, 1fr); } .mpv-ab [data-a="x"] { grid-column: auto; } }
/* الفهرس والبحث */
.mpv-sheet { position: absolute; inset: 0; z-index: 6; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.3); touch-action: pan-y; }
.mpv-sc { width: min(560px, 100%); height: min(82vh, 720px); display: flex; flex-direction: column; gap: 8px; padding: 12px 12px calc(env(safe-area-inset-bottom) + 10px); border-radius: 22px 22px 0 0; background: var(--card, #fffdf7); color: var(--ink); font-family: 'Tajawal', sans-serif; -webkit-user-select: text; user-select: text; }
.mpv-sh { display: flex; align-items: center; gap: 8px; } .mpv-sh .seg3 { flex: 1; margin: 0; grid-template-columns: repeat(3, 1fr); }
.mpv-sh .mpv-ic { color: var(--mut); }
.mpv-in { margin: 0; }
.mpv-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; margin: 0; padding: 0; list-style: none; touch-action: pan-y; }
.mpv-list li button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 10px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: 700 15px/1.5 'Tajawal', sans-serif; text-align: right; cursor: pointer; }
.mpv-list li button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpv-list li button small { flex: none; color: var(--mut); font-size: 12.5px; }
.mpv-list li.cur button { background: rgba(201,162,74,.14); border-radius: 10px; }
.mpv-no { padding: 20px 8px; text-align: center; color: var(--mut); }
.mpv-foot { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; } .mpv-foot small { color: var(--mut); font-size: 11px; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .mpv-top, .mpv-bot { transition: none; } }
/* زر الدخول في شريط القراءة */
.rbar .r-pv[aria-pressed="true"] { background: rgba(201,162,74,.2); }
.rbar .r-pv svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mpv-tj .tjd { display: inline-flex; gap: 3px; } .mpv-tj .tjd i { width: 7px; height: 7px; border-radius: 50%; background: #c0392b; opacity: .55; }
.mpv-tj .tjd i:nth-child(2) { background: #169777; } .mpv-tj .tjd i:nth-child(3) { background: #2f6fc0; } .mpv-tj.on .tjd i { opacity: 1; }

/* v65: إن وقعت الآية المسموعة تحت الشريط يُنقل الشريط إلى أعلى الصفحة */
body.mpv-on .player.pl-top { bottom: auto; top: calc(env(safe-area-inset-top) + 8px); }
body.mpv-on .player.pl-top .pl-set { order: 2; border-bottom: 0; border-top: 1px solid rgba(227,199,125,.25); margin: 6px 0 0; padding-top: 8px; }
body.mpv-on .player.pl-top { display: flex; flex-direction: column; }

/* v65: تكبير الخط (٥ درجات) — الدرجة الأولى = الصفحة كما هي؛ فوقها تتدفّق كلمات الصفحة نفسها بخط أكبر مع تمرير عمودي */
.mpv { --mz: 1; }
.mpv-zw { display: inline-flex; align-items: center; gap: 2px; margin-inline-start: 4px; }
.mpv-z { min-width: 40px; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 1px; border: 1.5px solid rgba(163,127,44,.55); border-radius: 12px; background: rgba(255,255,255,.35); color: var(--pink); cursor: pointer; padding: 0 6px; }
[data-theme="night"] .mpv-z { background: rgba(255,255,255,.05); }
.mpv-z b { font: 800 15px/1 'Tajawal', sans-serif; } .mpv-zp b { font-size: 21px; } .mpv-z i { font: 900 14px/1 'Tajawal', sans-serif; font-style: normal; color: var(--pgold); }
.mpv-z:disabled { opacity: .35; cursor: default; } .mpv-z:active:not(:disabled) { background: rgba(201,162,74,.22); }
.mpv-zl { min-width: 16px; text-align: center; font: 800 13px/1 'Tajawal', sans-serif; color: var(--pgold); }
.mpv.zm { touch-action: pan-y; }
.mpv.zm .mpv-stage, .mpv.zm .mpv-track { touch-action: pan-y; }
.mpv.zm .pg { display: block; overflow-y: auto; overflow-x: hidden; contain: layout paint; touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 10px 16px 130px; box-sizing: border-box; }
.mpv.zm .pin, .mpv.zm .p12 .pin { display: block; width: auto; height: auto; font-size: calc(var(--mfs) * var(--mz)); line-height: 2.05; text-align: justify; text-align-last: center; }
.mpv.zm .p12 .pin::before, .mpv.zm .p12 .pin::after { display: none; }
.mpv.zm .ml, .mpv.zm .p12 .ml { display: inline; white-space: normal; font-size: inherit; }
.mpv.zm .ml .w { display: inline-block; margin: 0 .1em; padding: .12em .04em; }
.mpv.zm .ml.sh, .mpv.zm .ml.bsm { display: flex; justify-content: center; flex-wrap: wrap; gap: .16em; margin: .2em 0; }
.mpv.zm .ml.sh { margin: .5em 0 .2em; } .mpv.zm .shf { height: calc(var(--mfs) * var(--mz) * 1.9); }
.mpv.zm .pno { margin: 14px auto 0; justify-content: center; font-size: calc(13px * min(var(--mz), 1.6)); }
/* أزرار أكبر في الشريطين عند الدرجات الكبيرة */
.mpv[data-z="3"] .mpv-ic, .mpv[data-z="4"] .mpv-ic { width: 44px; height: 44px; }
.mpv[data-z="3"] .mpv-z, .mpv[data-z="4"] .mpv-z { height: 44px; min-width: 46px; }
.mpv[data-z="3"] .mpv-bot, .mpv[data-z="4"] .mpv-bot { height: calc(env(safe-area-inset-bottom) + 54px); }
.mpv[data-z="3"] .mpv-stage, .mpv[data-z="4"] .mpv-stage { bottom: calc(env(safe-area-inset-bottom) + 54px); }
.mpv.zm .ml.bsm { padding: 0 .5em; } .mpv.zm .ml.bsm .w { margin: 0 .22em; }
.mpv-act.top { align-items: flex-start; } .mpv-act.top .mpv-ac { margin-top: calc(env(safe-area-inset-top) + 64px); } /* v73: لا تغطّي الآية المحددة */
