:root {
  --mf-nav-h: calc(60px + env(safe-area-inset-bottom));
  --mf-fs: min(26px, 4.8vw);
  --mf-primary: #1a6069;
  --mf-primary-deep: #134a52;
  --mf-primary-2: #2a8089;
  --mf-primary-rgb: 26, 96, 105;
  --mf-link: #1a6069;
  --mf-link-deep: #134a52;
  --mf-gold: #d8b46a;
  --mf-on-gold: #1d2a26;
  --mf-gold-text: #8a6d2b;
  --mf-bg: #f5f2ea;
  --mf-surface: #fffefb;
  --mf-surface-2: #f4f4ee;
  --mf-surface-3: #e7efed;
  --mf-line: #dde5e1;
  --mf-ink: #1d2a2b;
  --mf-text: #444e4f;
  --mf-muted: #66797b;
  --mf-faint: #8d9c9e;
  --mf-paper: #fdf8ee;
  --mf-paper-line: #e8dcc4;
  --mf-frame: #1a6069;
  --mf-page-ink: #1b1b1b;
  --mf-ayah: #125f6a;
  --mf-ok: #14683c;
  --mf-warn: #8a4b00;
  --mf-bad: #a11812;
  --mf-irab: #7a0e35;
  --mf-ok-soft: #eef7ef;
  --mf-ok-line: #cfe6d2;
  --mf-warn-soft: #fff4e5;
  --mf-bad-soft: #fff1f2;
  --sh-bg: #0f3d44;
  --sh-bg-deep: #0b2f35;
}

html[data-theme="olive"] {
  --mf-primary: #55683a;
  --mf-primary-deep: #43532d;
  --mf-primary-2: #6c8249;
  --mf-primary-rgb: 85, 104, 58;
  --mf-link: #4a5c32;
  --mf-link-deep: #3a4927;
  --mf-gold-text: #6b5a24;
  --mf-bg: #e0e3c9;
  --mf-surface: #f5f6e6;
  --mf-surface-2: #ebedd8;
  --mf-surface-3: #e2e5cb;
  --mf-line: #cfd3b4;
  --mf-ink: #262c1a;
  --mf-text: #434a32;
  --mf-muted: #5f6950;
  --mf-faint: #7f8870;
  --mf-paper: #eff0dc;
  --mf-paper-line: #cfd3b4;
  --mf-frame: #55683a;
  --mf-page-ink: #141a0c;
  --mf-ayah: #4a5c32;
  --mf-ok-soft: #e3ecc9;
  --mf-ok-line: #c5d3a0;
  --mf-warn-soft: #f3e7c0;
  --mf-bad-soft: #f3dcc8;
  --sh-bg: #2c3a1c;
  --sh-bg-deep: #212c15;
}

html[data-theme="dusk"] {
  --mf-primary: #3f5f7f;
  --mf-primary-deep: #314b65;
  --mf-primary-2: #557898;
  --mf-primary-rgb: 63, 95, 127;
  --mf-link: #365673;
  --mf-link-deep: #2a445c;
  --mf-gold-text: #75602a;
  --mf-bg: #d9e3ea;
  --mf-surface: #f2f6f9;
  --mf-surface-2: #e7edf2;
  --mf-surface-3: #dde6ed;
  --mf-line: #c7d4de;
  --mf-ink: #1d2a36;
  --mf-text: #3c4b59;
  --mf-muted: #586a7c;
  --mf-faint: #788a9b;
  --mf-paper: #e9eff3;
  --mf-paper-line: #c7d4de;
  --mf-frame: #3f5f7f;
  --mf-page-ink: #0e1620;
  --mf-ayah: #365673;
  --mf-ok-soft: #dfeee6;
  --mf-ok-line: #b9d6c6;
  --mf-warn-soft: #f3e9cf;
  --mf-bad-soft: #f3dfdf;
  --sh-bg: #1c3147;
  --sh-bg-deep: #15263a;
}

html[data-theme="rose"] {
  --mf-primary: #8a4f52;
  --mf-primary-deep: #6f3e41;
  --mf-primary-2: #a3686b;
  --mf-primary-rgb: 138, 79, 82;
  --mf-link: #7d4548;
  --mf-link-deep: #633538;
  --mf-gold-text: #7a5c2e;
  --mf-bg: #efddd7;
  --mf-surface: #fbf3ef;
  --mf-surface-2: #f5e8e3;
  --mf-surface-3: #efe0da;
  --mf-line: #e0cbc4;
  --mf-ink: #33211f;
  --mf-text: #553f3c;
  --mf-muted: #765e5a;
  --mf-faint: #957f7b;
  --mf-paper: #f8ece7;
  --mf-paper-line: #e0cbc4;
  --mf-frame: #8a4f52;
  --mf-page-ink: #1e100f;
  --mf-ayah: #7d4548;
  --mf-ok-soft: #e6eed8;
  --mf-ok-line: #c7d6ae;
  --mf-warn-soft: #f6e7c8;
  --mf-bad-soft: #f6d9d6;
  --sh-bg: #452526;
  --sh-bg-deep: #361c1d;
}

html[data-theme="stone"] {
  --mf-primary: #5c5a52;
  --mf-primary-deep: #484740;
  --mf-primary-2: #76746a;
  --mf-primary-rgb: 92, 90, 82;
  --mf-link: #55534b;
  --mf-link-deep: #41403a;
  --mf-gold-text: #75602a;
  --mf-bg: #e2dfd6;
  --mf-surface: #f7f5ef;
  --mf-surface-2: #eeece5;
  --mf-surface-3: #e6e3da;
  --mf-line: #d3d0c5;
  --mf-ink: #29281f;
  --mf-text: #47463d;
  --mf-muted: #68665c;
  --mf-faint: #85837a;
  --mf-paper: #efede6;
  --mf-paper-line: #d3d0c5;
  --mf-frame: #5c5a52;
  --mf-page-ink: #12110c;
  --mf-ayah: #55534b;
  --mf-ok-soft: #e3ebd9;
  --mf-ok-line: #c4d3b4;
  --mf-warn-soft: #f2e7c9;
  --mf-bad-soft: #f3dfd8;
  --sh-bg: #33322b;
  --sh-bg-deep: #272620;
}

html[data-theme="night"] {
  color-scheme: dark;
  --mf-primary: #1f7c86;
  --mf-primary-deep: #186670;
  --mf-primary-2: #2a9aa5;
  --mf-primary-rgb: 88, 180, 191;
  --mf-link: #6cc3cd;
  --mf-link-deep: #8fd3da;
  --mf-gold-text: #d8b46a;
  --mf-bg: #0e1516;
  --mf-surface: #172123;
  --mf-surface-2: #1e2a2c;
  --mf-surface-3: #243436;
  --mf-line: #2e3f41;
  --mf-ink: #e8edeb;
  --mf-text: #c5cfcd;
  --mf-muted: #93a4a4;
  --mf-faint: #748585;
  --mf-paper: #12191a;
  --mf-paper-line: #2e3f41;
  --mf-frame: #2c5c62;
  --mf-page-ink: #ece5d3;
  --mf-ayah: #6cc3cd;
  --mf-ok: #5fd08f;
  --mf-warn: #f0b35c;
  --mf-bad: #ff8a80;
  --mf-irab: #ff8fb3;
  --mf-ok-soft: #173026;
  --mf-ok-line: #27503c;
  --mf-warn-soft: #332814;
  --mf-bad-soft: #3a1c1c;
  --sh-bg: #0d2b30;
  --sh-bg-deep: #0a2226;
}

html[data-theme] {
  --dm-teal: var(--mf-primary);
  --dm-teal-d: var(--mf-primary-deep);
  --dm-ink: var(--mf-ink);
  --dm-mut: var(--mf-muted);
  --dm-line: var(--mf-line);
  --dm-paper: var(--mf-paper);
  --dm-surface: var(--mf-surface);
  --dm-surface-2: var(--mf-surface-2);
  --dm-word: var(--mf-page-ink);
  --dm-ok-fg: var(--mf-ok);
  --dm-wr-fg: var(--mf-warn);
  --dm-ms-fg: var(--mf-bad);
  --dm-iraab-fg: var(--mf-irab);
}

html[data-theme="night"] #quran-page.mf-tajweed {
  --mf-paper: #f3ecdc;
  --mf-page-ink: #000;
  --mf-ayah: #125f6a;
  --mf-link: #1a6069;
  --mf-primary-rgb: 26, 96, 105;
}

html[data-theme="night"] #quran-page.mf-khazain .mf-kz-line .quran-word,
html[data-theme="night"] #quran-page.mf-khazain .quran-word[style*="--kz"] { color: #17201f; }

body.mf-reading { padding-top: 6px; padding-bottom: 10px; }
body.mf-reading #mf-controller,
body.mf-reading #mf-bottom-nav,
body.mf-reading #mf-sheet,
body.mf-reading #mf-ahkaam,
body.mf-reading #mf-hk-video { display: none !important; }
#mf-reading-exit {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 1060;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--sh-bg);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s, transform 0.2s;
}
#mf-reading-exit.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
#mf-zoom-reset {
  position: fixed;
  right: 16px;
  bottom: calc(var(--mf-nav-h) + 16px);
  z-index: 1040;
  display: none;
  align-items: center;
  gap: 5px;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--sh-bg);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
#mf-zoom-reset i { color: var(--mf-gold); font-size: 16px; }
body.mf-zoom-on:not(.mf-panel-sec) #mf-zoom-reset { display: flex; }
body.mf-reading #mf-zoom-reset { bottom: calc(16px + env(safe-area-inset-bottom)); }
#mf-reading-exit i { color: var(--mf-gold); }
#mf-theme-wrap { border-top: 1px solid var(--mf-line); padding-bottom: 10px; }
#mf-theme-wrap .mf-side-label { padding-top: 8px; }
.mf-theme-row { display: flex; justify-content: space-between; gap: 6px; margin: 0 18px; }
.mf-theme-btn { flex: 0 0 30px; width: 30px; height: 30px; padding: 0; border: 1px solid var(--mf-line); border-radius: 50%; cursor: pointer; }
.mf-theme-btn.active { outline: 2px solid var(--mf-ink); outline-offset: 2px; }
.mf-theme-btn[data-theme="light"] { background: #1a6069; }
.mf-theme-btn[data-theme="olive"] { background: #55683a; }
.mf-theme-btn[data-theme="dusk"] { background: #3f5f7f; }
.mf-theme-btn[data-theme="rose"] { background: #8a4f52; }
.mf-theme-btn[data-theme="stone"] { background: #5c5a52; }
.mf-theme-btn[data-theme="night"] { background: #0e1516; }
.mf-read-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid var(--mf-line);
  border-radius: 8px;
  background: var(--mf-surface);
  color: var(--mf-link);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  #mf-reading-exit { transition: none; }
}

@font-face {
  font-family: 'mfArabicUI';
  src: url('../../assets/fonts/marjan/kanz-al-marjaan-webfont.woff2') format('woff2'),
       url('../../assets/fonts/marjan/kanz-al-marjaan-webfont.ttf') format('truetype');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
  font-display: swap;
}

body {
  margin: 0;
  padding: 0.5rem 0.5rem calc(var(--mf-nav-h) + 20px);
  background: var(--mf-bg);
  font-family: 'mfArabicUI', 'Open Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--mf-text);
}

#talaqqi-app-container {
  max-width: 520px;
  margin: 0 auto;
}
@media (min-width: 600px) {
  :root {
    --mf-fs: clamp(18px, min((100vw - 16px) / 20, (100vh - var(--mf-nav-h) - 173px) / 28.5), 48px);
    --mf-fs: clamp(18px, min((100vw - 16px) / 20, (100dvh - var(--mf-nav-h) - 173px) / 28.5), 48px);
  }
  #talaqqi-app-container { max-width: max(520px, calc(var(--mf-fs) * 20)); }
  #quran-page.mushaf-page, #mf-sec-murajaat #dm-page { max-width: calc(var(--mf-fs) * 20); margin-left: auto; margin-right: auto; }
}

#mf-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  height: var(--mf-nav-h);
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  background: var(--mf-surface);
  border-top: 1px solid var(--mf-line);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1056;
}
.mf-sec-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0;
  border: 0;
  border-top: 3px solid transparent;
  background: none;
  color: var(--mf-faint);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.mf-sec-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}
.mf-sec-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mf-sec-btn { position: relative; z-index: 1; }
.mf-sec-btn.active { color: var(--mf-link); }
.mf-sec-btn.active svg { transform: translateY(-1px) scale(1.1); }
#mf-bottom-nav:not(.mf-lg-on) .mf-sec-btn.active { border-top-color: var(--mf-link); background: rgba(var(--mf-primary-rgb), 0.06); }
.mf-sec-btn:focus { outline: none; }
.mf-sec-btn:focus-visible { outline: 2px solid var(--mf-link); outline-offset: -5px; border-radius: 16px; }

.mf-lg {
  position: absolute;
  top: 5px;
  left: 0;
  width: var(--mf-lg-w, 60px);
  height: 50px;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.52s cubic-bezier(0.34, 1.4, 0.5, 1), width 0.3s ease, opacity 0.2s ease;
}
#mf-bottom-nav.mf-lg-on .mf-lg.ready { opacity: 1; }
.mf-lg-glass {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.05) 55%, rgba(255, 255, 255, 0.2) 100%),
    radial-gradient(120% 120% at 50% 100%, rgba(var(--mf-primary-rgb), 0.18) 0%, transparent 70%),
    rgba(var(--mf-primary-rgb), 0.15);
  border: 1px solid rgba(var(--mf-primary-rgb), 0.2);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -2px 5px rgba(var(--mf-primary-rgb), 0.12),
    0 6px 16px rgba(var(--mf-primary-rgb), 0.22),
    0 1px 2px rgba(0, 0, 0, 0.08);
  transition: scale 0.22s cubic-bezier(0.3, 1.5, 0.5, 1);
  will-change: transform;
}
.mf-lg-glass::before {
  content: '';
  position: absolute; left: 8%; right: 8%; top: 1px; height: 45%;
  border-radius: 16px 16px 50% 50%;
  background: radial-gradient(120% 100% at 50% 0%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
}
.mf-lg-glass::after {
  content: '';
  position: absolute; top: -20%; bottom: -20%; left: 0; width: 60%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.75) 50%, transparent 80%);
  transform: translateX(-140%) skewX(-12deg);
  opacity: 0;
}
.mf-lg.shine .mf-lg-glass::after { animation: mfLgShine 0.65s ease-out; }
@keyframes mfLgShine {
  0%   { transform: translateX(-140%) skewX(-12deg); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateX(260%) skewX(-12deg); opacity: 0; }
}
#mf-bottom-nav.mf-lg-press .mf-lg-glass { scale: 1.07; }
html[data-theme="night"] .mf-lg-glass {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 55%, rgba(255, 255, 255, 0.06) 100%),
    rgba(var(--mf-primary-rgb), 0.18);
  border-color: rgba(var(--mf-primary-rgb), 0.35);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 6px 16px rgba(0, 0, 0, 0.45);
}
html[data-theme="night"] .mf-lg-glass::before { opacity: 0.3; }
html[data-theme="night"] .mf-lg-glass::after { background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.25) 50%, transparent 80%); }
@media (prefers-reduced-motion: reduce) {
  .mf-lg, .mf-lg-glass { transition: none !important; }
  .mf-lg.shine .mf-lg-glass::after { animation: none !important; }
}

.mf-sec-panel { display: none; }
body.mf-sec-murajaat #mf-sec-murajaat,
body.mf-sec-ikhtebaar #mf-sec-ikhtebaar { display: block; }
body.mf-panel-sec #mf-prev-btn,
body.mf-panel-sec #mf-play-btn,
body.mf-panel-sec #mf-next-btn { display: none; }
.mf-ctrl-tools { display: none; grid-column: 2 / 5; gap: 4px; min-width: 0; }
#mf-menu-btn { grid-column: 1; }
#mf-user-btn { grid-column: 5; }
body.mf-sec-murajaat #mf-tools-murajaat,
body.mf-sec-ikhtebaar #mf-tools-ik { display: flex; }
.mf-ctrl-tools button {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 4px;
  border: 1px solid var(--mf-link);
  border-radius: 8px;
  background: var(--mf-surface);
  color: var(--mf-link);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.mf-ctrl-tools button:disabled { opacity: 0.45; cursor: default; }
.mf-ctrl-tools #dm-hide-toggle[aria-pressed="false"] { background: var(--mf-primary); color: #fff; }
.mf-ctrl-tools .dm-rec-btn { background: var(--mf-gold); border-color: var(--mf-gold); color: var(--mf-on-gold); }
.mf-ctrl-tools .dm-rec-btn.recording { background: #d9342b; border-color: #d9342b; color: #fff; }
.mf-ctrl-tools .dm-mic-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.mf-ctrl-tools .dm-rec-btn.recording .dm-mic-dot { animation: mfIkDot 1.1s ease-in-out infinite; }
@keyframes mfIkDot { 50% { opacity: 0.25; } }
#mf-sec-murajaat #dm-controller { position: static; }
#mf-sec-murajaat .dm-nav-row,
#mf-sec-murajaat .dm-tool-row { display: none; }
#mf-sec-murajaat #dm-page { touch-action: pan-y pinch-zoom; }
#mf-sec-murajaat #dm-controller { background: transparent; box-shadow: none; border: 0; padding: 0 4px; margin-bottom: 6px; }
#mf-sec-murajaat #dm-status:empty { display: none; }

#mf-mj-home, #mf-mj-bar { display: none; }
body.mf-sec-murajaat.mf-mj-menu #mf-mj-home { display: flex; }
body.mf-sec-murajaat.mf-mj-menu #dm-app,
body.mf-sec-murajaat.mf-mj-menu #mf-sec-murajaat > .mf-sec-empty,
body.mf-sec-murajaat.mf-mj-menu #mf-tools-murajaat,
body.mf-sec-murajaat.mf-mj-self #mf-tools-murajaat #dm-rec,
body.mf-sec-murajaat.mf-mj-self #dm-scorebar { display: none; }
body.mf-sec-murajaat:not(.mf-mj-menu) #mf-mj-bar { display: flex; }
#mf-mj-home { flex-direction: column; gap: 10px; max-width: 520px; margin: 8px auto 0; padding: 0 4px; }
.mf-mj-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; text-align: center; }
.mf-mj-head strong { font-size: 19px; color: var(--mf-ink); }
.mf-mj-head small { font-size: 13px; color: var(--mf-muted); }
.mf-mj-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--mf-line);
  border-radius: 14px;
  background: var(--mf-surface);
  color: var(--mf-ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.mf-mj-card:active { transform: scale(0.98); }
.mf-mj-card:hover { background: var(--mf-surface-2); }
.mf-mj-card > i:first-child {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--mf-primary), var(--mf-primary-2));
}
.mf-mj-card > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mf-mj-card strong { font-size: 16px; }
.mf-mj-card small { font-size: 12.5px; color: var(--mf-muted); line-height: 1.35; }
.mf-mj-card .mf-mj-go { color: var(--mf-muted); font-size: 18px; }
.mf-mj-card.mf-locked > i:first-child { background: var(--mf-surface-3); color: var(--mf-muted); }
#mf-mj-bar { align-items: center; justify-content: space-between; gap: 8px; max-width: calc(var(--mf-fs) * 20); margin: 0 auto 6px; padding: 0 4px; }
.mf-mj-where { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; font-size: 13px; font-weight: 700; color: var(--mf-link); }
#mf-mj-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mf-mj-bar .mf-ik-pgbtn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
#mf-mj-pggrid .mf-mj-cell { height: 36px; font-size: 13px; }
.mf-mj-cell.mf-mj-off { opacity: 0.3; cursor: default; transform: none; }
.mf-mj-cell.mf-mj-rng { background: rgba(var(--mf-primary-rgb), 0.16); border-color: rgba(var(--mf-primary-rgb), 0.45); }
.mf-mj-pgsep { grid-column: 1 / -1; padding: 6px 2px 0; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mf-muted); }
.mf-mj-pghint { grid-column: 1 / -1; padding: 10px 0; text-align: center; font-size: 13px; color: var(--mf-muted); }
body.mf-panel-sec #quran-page,
body.mf-panel-sec #mf-sheet,
body.mf-panel-sec #word-info-card,
body.mf-panel-sec #mf-ahkaam,
body.mf-panel-sec #mf-hk-video { display: none !important; }


#mf-sidebar-backdrop { z-index: 1080; bottom: var(--mf-nav-h); }
#mf-sidebar {
  position: fixed;
  top: 0;
  bottom: var(--mf-nav-h);
  left: 0;
  width: 280px;
  max-width: 82vw;
  display: flex;
  flex-direction: column;
  background: var(--mf-surface);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  transform: translateX(-105%);
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
  z-index: 1090;
}
#mf-sidebar.open { transform: translateX(0); }
body.mf-reading #mf-sidebar,
body.mf-reading #mf-sidebar-backdrop { bottom: 0; }
body.mf-reading #mf-sidebar { padding-bottom: env(safe-area-inset-bottom); }
.mf-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 14px 14px 18px;
  background: var(--mf-primary);
  color: #fff;
}
#mf-splash {
  position: fixed;
  inset: 0;
  z-index: 300000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mf-primary-deep);
  transition: opacity 0.4s ease;
}
#mf-splash img { width: min(72vw, 320px); height: auto; }
#mf-splash.out { opacity: 0; pointer-events: none; }
.mf-side-logo { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--mf-primary-deep); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.mf-side-title { flex: 1; min-width: 0; }
.mf-side-head strong { display: block; font-size: 18px; }
.mf-side-head span { font-size: 13px; opacity: 0.8; }
.mf-side-head .mf-set-close { background: rgba(255, 255, 255, 0.15); color: #fff; }
.mf-side-menu { flex: 1; overflow-y: auto; padding: 8px 0; }
.mf-side-foot { border-top: 1px solid var(--mf-line); padding: 8px 0; }
.mf-side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  background: none;
  color: var(--mf-ink);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
a.mf-side-item { text-decoration: none; }
.mf-side-item:hover { background: var(--mf-surface-2); }
.mf-side-item i { font-size: 18px; color: var(--mf-link); width: 20px; text-align: center; }
.mf-side-empty { padding: 14px 18px; font-size: 13px; color: var(--mf-muted); }

#mf-sec-murajaat #dm-app { max-width: none; padding: 0; }
.mf-sec-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  background: var(--mf-surface);
  border: 1px solid var(--mf-line);
  border-radius: 8px;
  padding: 40px 20px;
  color: var(--mf-muted);
}
.mf-sec-empty i { font-size: 30px; color: var(--mf-link); }
.mf-sec-empty strong { font-size: 17px; color: var(--mf-ink); }

html, body { overscroll-behavior-x: none; }
#quran-page { touch-action: pan-y; }
#quran-page.mf-zoomed .quran-line { flex-wrap: wrap; justify-content: center !important; column-gap: calc(6px * var(--mf-zoom, 1)); }

#mf-controller {
  position: sticky;
  top: 0;
  z-index: 1002;
  display: grid;
  grid-template-columns: 2fr 2fr 3fr 2fr 2fr;
  gap: 4px;
  background: var(--mf-surface);
  border-radius: 8px;
  padding: 5px;
  margin-bottom: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.mf-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  background: var(--mf-primary);
  border: none;
  color: #fff;
  border-radius: 8px;
  height: 34px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.mf-ctrl-btn:hover { background: var(--mf-primary-deep); }
.mf-ctrl-btn:disabled { cursor: default; background: var(--mf-surface-3); color: var(--mf-faint); }
.mf-ctrl-btn i { font-size: 16px; }
#mf-play-btn { background: var(--mf-gold); color: var(--mf-on-gold); }
#mf-play-btn:hover { filter: brightness(1.05); }

:where(#quran-page.mf-khazain) .mf-kz-line { background-color: var(--kz); }
:where(#quran-page.mf-khazain) .quran-word:not(.mf-in-band) { background-color: var(--kz, transparent); }
:where(#quran-page.mf-khazain) .mf-kz-mixed .quran-word { flex-grow: 1; text-align: center; }
.mf-view-group {
  display: inline-flex;
  flex-shrink: 0;
  background: var(--mf-surface);
  border: 1px solid var(--mf-line);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}
.mf-view-group button {
  border: 0;
  background: transparent;
  color: var(--mf-link);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mf-view-group button.active { background: var(--mf-primary); color: #fff; }
.mf-view-group button.mf-checking { opacity: 0.5; cursor: progress; }
.mf-set-note { margin: -6px 0 10px; padding: 8px 10px; border-radius: 8px; background: var(--mf-warn-soft); color: var(--mf-warn); font-size: 12px; }

#mf-pop-backdrop { z-index: 1052; }
.mf-pop {
  position: fixed;
  left: 50%;
  bottom: var(--mf-nav-h);
  width: 100%;
  max-width: 520px;
  max-height: calc(85vh - var(--mf-nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  transform: translate(-50%, calc(100% + var(--mf-nav-h) + 40px));
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
  z-index: 1055;
  background: var(--mf-surface);
  border-radius: 20px 20px 0 0;
  padding: 0 18px 18px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
}
.mf-pop.open { transform: translate(-50%, 0); }

@keyframes mfPopIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes mfBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}
@keyframes mfPulse {
  0%   { box-shadow: 0 0 0 0 rgba(216, 180, 106, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(216, 180, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(216, 180, 106, 0); }
}
.mf-pop.open .mf-pop-anim { animation: mfPopIn 0.4s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--d, 0) * 60ms + 80ms); }

.mf-go-sec { padding: 14px 0 4px; }
.mf-go-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mf-muted);
  margin-bottom: 8px;
}

.mf-go-page { display: flex; align-items: center; gap: 8px; }
.mf-go-step {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--mf-surface-3);
  color: var(--mf-link);
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.mf-go-step:active { transform: scale(0.88); background: var(--mf-surface-3); }
.mf-go-num { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.mf-go-num input {
  width: 100%;
  border: 0;
  background: none;
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--mf-ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.mf-go-num input::-webkit-outer-spin-button,
.mf-go-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mf-go-num input:focus { outline: none; }
.mf-go-num input.mf-bump { animation: mfBump 0.25s ease; }
.mf-go-num small {
  max-width: 100%;
  font-size: 12px;
  color: var(--mf-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mf-go-btn {
  order: -1;
  flex-shrink: 0;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 20px;
  background: var(--mf-gold);
  color: var(--mf-on-gold);
  font-weight: 800;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.2s, transform 0.15s;
}
.mf-go-btn.ready { opacity: 1; animation: mfPulse 1.6s infinite; }
.mf-go-btn:active { transform: scale(0.92); }

.mf-go-range {
  --p: 0%;
  width: 100%;
  height: 6px;
  margin: 14px 0 4px;
  border-radius: 3px;
  background: linear-gradient(to left, var(--mf-primary) var(--p), var(--mf-surface-3) var(--p));
  direction: rtl;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
}
.mf-go-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mf-gold);
  border: 3px solid var(--mf-surface);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.mf-go-range:active::-webkit-slider-thumb { transform: scale(1.25); }
.mf-go-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--mf-gold);
  border: 3px solid var(--mf-surface);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

#mf-goto [hidden] { display: none !important; }
.mf-go-tabs { display: flex; width: 100%; }
.mf-go-tabs button { flex: 1; padding: 7px 4px; }
.mf-go-pane { min-height: 236px; }

.mf-go-juz {
  display: grid;
  direction: rtl;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px 6px;
  justify-items: center;
  padding: 4px 2px 8px;
}
.mf-go-chip {
  width: 42px;
  height: 42px;
  border: 1px solid var(--mf-line);
  border-radius: 50%;
  background: var(--mf-surface);
  color: var(--mf-link);
  font-size: 14px;
  font-weight: 700;
  scroll-snap-align: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.2,.8,.2,1), background 0.2s, color 0.2s, box-shadow 0.2s;
}
.mf-go-chip:active { transform: scale(0.88); }
.mf-go-chip.active {
  background: linear-gradient(135deg, var(--mf-primary), var(--mf-primary-2));
  border-color: transparent;
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 4px 10px rgba(var(--mf-primary-rgb), 0.35);
}

.mf-go-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 20px;
  background: var(--mf-surface-2);
  color: var(--mf-muted);
  transition: box-shadow 0.2s, background 0.2s;
}
.mf-go-search:focus-within { background: var(--mf-surface); box-shadow: 0 0 0 2px var(--mf-link); }
.mf-go-search input { flex: 1; min-width: 0; border: 0; background: none; font-size: 14px; color: var(--mf-ink); outline: none; }
.mf-go-surahs {
  max-height: 32vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: 8px;
}
.mf-go-surah {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.mf-go-surah:hover { background: var(--mf-surface-2); }
.mf-go-surah:active { transform: scale(0.98); }
.mf-go-surah.active { background: var(--mf-surface-3); box-shadow: inset -3px 0 0 var(--mf-link); }
.mf-go-surah b {
  order: 3;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--mf-surface-3);
  color: var(--mf-link);
  font-size: 12px;
  transform: rotate(45deg);
}
.mf-go-surah b span { transform: rotate(-45deg); }
.mf-go-surah.active b { background: var(--mf-primary); color: #fff; }
.mf-go-surah-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mf-go-surah-txt strong { font-size: 14px; color: var(--mf-ink); }
.mf-go-surah-txt small { font-size: 11px; color: var(--mf-muted); }
.mf-go-surah-ar { font-size: 18px; color: var(--mf-link); direction: rtl; }
.mf-go-none { padding: 14px; text-align: center; font-size: 13px; color: var(--mf-muted); }
#mf-go-searchbox + .mf-go-surahs { max-height: 168px; }

.mf-wheels { display: flex; gap: 10px; justify-content: center; }
.mf-wheel-col {
  flex: 1 1 0;
  min-width: 0;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 4px;
  border: 1px solid var(--mf-line);
  border-radius: 16px;
  background: var(--mf-surface);
}
.mf-wheel-col.mf-wheel-ayah { flex: 0 0 96px; }
.mf-wheel-col .mf-go-label { margin: 0; }
.mf-wh-arrow {
  width: 100%;
  height: 26px;
  border: 0;
  background: none;
  color: var(--mf-link);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.mf-wh-arrow:active { transform: scale(0.85); }
.mf-wheel-box { position: relative; width: 100%; }
.mf-wheel-box::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 36px;
  height: 36px;
  border-top: 1px solid var(--mf-line);
  border-bottom: 1px solid var(--mf-line);
  pointer-events: none;
}
.mf-wheel {
  height: 108px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  outline: none;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}
.mf-wheel::-webkit-scrollbar { display: none; }
.mf-wheel::before, .mf-wheel::after { content: ''; display: block; height: 36px; }
.mf-wheel:focus-visible { box-shadow: inset 0 0 0 2px var(--mf-link); border-radius: 8px; }
.mf-wh-item {
  height: 36px;
  line-height: 36px;
  padding: 0 8px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  scroll-snap-align: center;
  font-size: 15px;
  color: var(--mf-muted);
  cursor: pointer;
  transition: color 0.15s;
}
.mf-wh-item.sel { color: var(--mf-ink); font-weight: 600; font-size: 16px; }
.mf-wh-n { font-size: 11px; opacity: 0.6; margin-right: 6px; }
.mf-wh-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.mf-wh-foot small { flex: 1; text-align: center; font-size: 13px; color: var(--mf-muted); }
.mf-wh-foot .mf-go-btn.ready { animation: none; }
#quran-page .quran-word.mf-go-flash { background: rgba(216, 180, 106, 0.55); border-radius: 4px; transition: background 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .mf-pop, .mf-pop.open .mf-pop-anim, .mf-go-btn.ready, .mf-go-num input.mf-bump { animation: none !important; transition: none !important; }
}
.mf-set-handle { display: flex; justify-content: center; padding: 10px 0 6px; }
.mf-set-handle span { width: 36px; height: 4px; border-radius: 2px; background: var(--mf-line); }
.mf-set-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--mf-line);
}
.mf-set-head strong { font-size: 17px; color: var(--mf-ink); }
.mf-set-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--mf-surface-2);
  color: var(--mf-link);
  font-size: 18px;
  cursor: pointer;
}
.mf-go-views { display: flex; width: 100%; }
.mf-go-views button { flex: 1; padding: 7px 6px; }
.mf-go-sec .mf-set-note { margin: 8px 0 0; }

.quran-word.mf-sel-start { background: rgba(var(--mf-primary-rgb), 0.25); border-radius: 3px; }
#quran-page.mf-drag-mode { touch-action: none; user-select: none; -webkit-user-select: none; }
#quran-page.mf-drag-mode .quran-word { cursor: crosshair; }
#mf-select-bar {
  display: none;
  position: sticky;
  top: var(--mf-select-top, 64px);
  z-index: 1001;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  background: var(--sh-bg);
  color: #fff;
  border-radius: 14px;
  padding: 10px 10px 10px 14px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
@media (min-width: 600px) {
  #mf-select-bar {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 8px;
    border-radius: 999px;
    padding: 8px 8px 8px 16px;
  }
}
#mf-select-bar.active { display: flex; }
#mf-select-bar i { color: var(--mf-gold); flex: none; }
#mf-select-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#mf-select-cancel {
  flex: none;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}

.mf-lessons-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  align-items: center;
  justify-content: center;
}
.mf-lessons-overlay.active { display: flex; }
.mf-lessons-panel {
  background: var(--mf-surface);
  border-radius: 8px;
  width: 92%;
  max-width: 480px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.mf-lessons-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--mf-primary);
  color: #fff;
  flex-shrink: 0;
}
.mf-lessons-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.mf-lessons-body {
  overflow-y: auto;
  padding: 8px 14px;
}
.mf-ll-juz-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--mf-link);
  margin-top: 8px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--mf-line);
  cursor: pointer;
}
.mf-ll-juz:first-child .mf-ll-juz-header { margin-top: 0; }
.mf-ll-juz-header:hover,
.mf-ll-page-header:hover { background: rgba(var(--mf-primary-rgb), 0.08); }
.mf-ll-juz-header.mf-ll-current,
.mf-ll-page-header.mf-ll-current {
  color: var(--mf-link);
  background: rgba(var(--mf-primary-rgb), 0.12);
  border-radius: 4px;
}
.mf-ll-juz-pages { padding-left: 6px; }
.mf-ll-page-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
  color: var(--mf-text);
  margin: 4px 0;
  padding: 5px 4px;
  border-radius: 4px;
  cursor: pointer;
  scroll-margin-top: 10px;
}
.mf-ll-page-lessons { padding-left: 16px; }
.mf-ll-toggle-icon {
  display: inline-block;
  width: 10px;
  font-size: 10px;
  transition: transform 0.15s;
}
.mf-ll-juz-header.mf-ll-expanded .mf-ll-toggle-icon,
.mf-ll-page-header.mf-ll-expanded .mf-ll-toggle-icon {
  transform: rotate(90deg);
}
.mf-ll-count { color: var(--mf-faint); font-weight: 400; }
.mf-ll-lesson {
  font-size: 12px;
  color: var(--mf-link-deep);
  padding: 5px 0 5px 20px;
  cursor: pointer;
}
.mf-ll-lesson:hover { background: rgba(var(--mf-primary-rgb), 0.08); border-radius: 4px; }
.mf-ll-desc { color: var(--mf-faint); }

.mf-download-panel { max-width: 340px; }
.mf-download-body p { font-size: 13px; color: var(--mf-text); margin: 0 0 6px; }
.mf-dl-logo { display: block; width: 96px; height: 96px; margin: 10px auto 4px; border-radius: 50%; background: var(--mf-primary-deep); }
.mf-progress-track {
  background: var(--mf-surface-3);
  border-radius: 6px;
  overflow: hidden;
  height: 10px;
  margin-top: 10px;
}
.mf-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--mf-primary);
  transition: width 0.15s;
}
.mf-download-actions { display: flex; gap: 8px; margin-top: 14px; }
.mf-download-btn {
  flex: 1;
  background: var(--mf-primary);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 8px 0;
  font-weight: 700;
  cursor: pointer;
}
.mf-download-btn:hover { background: var(--mf-primary-deep); }
.mf-download-btn.mf-cancel { background: #999; }
.mf-download-btn.mf-cancel:hover { background: #777; }
.mf-download-btn:disabled { opacity: 0.6; cursor: default; }

:root {
  --sh-gold: #d8b46a;
  --sh-gold-ink: #1d2a26;
  --sh-text: #ffffff;
  --sh-muted: rgba(255, 255, 255, 0.62);
  --sh-line: rgba(255, 255, 255, 0.14);
  --sh-pill-border: rgba(255, 255, 255, 0.22);
}
.mf-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 26, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mf-sheet-backdrop.active { opacity: 1; pointer-events: auto; }

#mf-sheet {
  margin-top: 6px;
  background: var(--sh-bg);
  color: var(--sh-text);
  border-radius: 20px;
  padding: 14px 16px 10px;
}
#mf-sheet .mf-sh-controls { margin: 6px 0 10px; }
#mf-sheet #mf-playpause-btn { width: 60px; height: 60px; font-size: 26px; }
#mf-sheet #mf-np-seek { margin-top: 12px; }

.mf-runhead, .mf-pagefoot, .mf-surah-head { cursor: pointer; -webkit-tap-highlight-color: transparent; }

.mf-sh-head { display: flex; align-items: center; gap: 10px; }
.mf-sh-head-text { flex: 1; min-width: 0; }
.mf-sh-kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sh-gold);
  margin-bottom: 4px;
}
.mf-sh-title {
  font-size: 19px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mf-sh-title .mf-sh-surah { font-size: 14px; color: var(--sh-muted); }
.mf-sh-title .mf-sh-dot { color: var(--sh-muted); margin: 0 6px; font-size: 12px; }
.mf-sh-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--sh-text);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.mf-sh-icon:hover { background: rgba(255, 255, 255, 0.08); }

#mf-np-update {
  display: none;
  font-size: 11px;
  color: var(--sh-gold);
  cursor: pointer;
  text-decoration: underline;
  margin-top: 6px;
}

#mf-np-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
  outline: none;
  cursor: pointer;
  margin: 18px 0 0;
  display: block;
}
#mf-np-seek::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: transparent; }
#mf-np-seek::-moz-range-track { height: 6px; border-radius: 3px; background: transparent; }
#mf-np-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sh-gold);
  cursor: pointer;
  margin-top: -6px;
}
#mf-np-seek::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sh-gold);
  border: none;
  cursor: pointer;
}
.mf-sh-times {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--sh-muted);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.mf-sh-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 14px;
}
.mf-sh-ctrl {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  color: var(--sh-text);
  font-size: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.mf-sh-ctrl:disabled { opacity: 0.35; cursor: default; }
.mf-sh-ctrl.active { color: var(--sh-gold); }
#mf-sh-speed { font-size: 16px; }
#mf-playpause-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: var(--sh-gold);
  color: var(--sh-gold-ink);
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
#mf-playpause-btn:disabled { opacity: 0.5; cursor: default; }

#mf-page-lessons .mf-pl-tilawat { font-weight: 700; color: var(--mf-link); background: rgba(var(--mf-primary-rgb), 0.06); }
#mf-page-lessons .mf-pl-create { font-weight: 700; color: var(--mf-gold-text); background: rgba(216, 180, 106, 0.12); }
#mf-speed-menu {
  position: fixed;
  z-index: 1065;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 248px;
  padding: 10px;
  border-radius: 16px;
  background: var(--sh-bg-deep);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.18s, transform 0.18s, visibility 0s 0.18s;
}
#mf-speed-menu.open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.18s, transform 0.18s; }
.mf-speed-opt {
  border: 0;
  border-radius: 999px;
  padding: 8px 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mf-speed-opt:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.mf-speed-opt.active { background: var(--mf-gold); color: var(--mf-on-gold); }
#mf-sh-speed.active { background: rgba(255, 255, 255, 0.12); }

.quran-word.mf-word-active {
  background: rgba(46, 140, 60, 0.45);
  border-radius: 3px;
}
#talaqqi-app-container { transition: padding-bottom 0.3s ease; }


.mushaf-page,
#mf-sec-murajaat #dm-page {
  width: 100%;
  padding: clamp(12px, 4%, 28px) clamp(10px, 3.5%, 24px);
  background-color: var(--mf-paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .16 .2 0 0 0 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  border: 4px solid var(--mf-frame) !important;
  border-radius: 2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  position: relative;
}
.mushaf-page::after,
#mf-sec-murajaat #dm-page::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--mf-frame);
  opacity: 0.55;
  pointer-events: none;
}
.mushaf-page::before,
#mf-sec-murajaat #dm-page::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--mf-frame);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='translate(0 0)'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M1.5 23V9.5a8 8 0 0 1 8-8H23' stroke-width='1.6'/%3E%3Cpath d='M5 23V12a7 7 0 0 1 7-7h11' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='5.2' cy='5.2' r='1.5'/%3E%3Cpath d='M11 8.4l2.6 2.6-2.6 2.6-2.6-2.6z'/%3E%3C/g%3E%3C/svg%3E") left top / 20px 20px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M1.5 23V9.5a8 8 0 0 1 8-8H23' stroke-width='1.6'/%3E%3Cpath d='M5 23V12a7 7 0 0 1 7-7h11' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='5.2' cy='5.2' r='1.5'/%3E%3Cpath d='M11 8.4l2.6 2.6-2.6 2.6-2.6-2.6z'/%3E%3C/g%3E%3C/svg%3E") right top / 20px 20px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='translate(0 24) scale(1 -1)'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M1.5 23V9.5a8 8 0 0 1 8-8H23' stroke-width='1.6'/%3E%3Cpath d='M5 23V12a7 7 0 0 1 7-7h11' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='5.2' cy='5.2' r='1.5'/%3E%3Cpath d='M11 8.4l2.6 2.6-2.6 2.6-2.6-2.6z'/%3E%3C/g%3E%3C/svg%3E") left bottom / 20px 20px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='translate(24 24) scale(-1 -1)'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M1.5 23V9.5a8 8 0 0 1 8-8H23' stroke-width='1.6'/%3E%3Cpath d='M5 23V12a7 7 0 0 1 7-7h11' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='5.2' cy='5.2' r='1.5'/%3E%3Cpath d='M11 8.4l2.6 2.6-2.6 2.6-2.6-2.6z'/%3E%3C/g%3E%3C/svg%3E") right bottom / 20px 20px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='translate(0 0)'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M1.5 23V9.5a8 8 0 0 1 8-8H23' stroke-width='1.6'/%3E%3Cpath d='M5 23V12a7 7 0 0 1 7-7h11' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='5.2' cy='5.2' r='1.5'/%3E%3Cpath d='M11 8.4l2.6 2.6-2.6 2.6-2.6-2.6z'/%3E%3C/g%3E%3C/svg%3E") left top / 20px 20px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='translate(24 0) scale(-1 1)'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M1.5 23V9.5a8 8 0 0 1 8-8H23' stroke-width='1.6'/%3E%3Cpath d='M5 23V12a7 7 0 0 1 7-7h11' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='5.2' cy='5.2' r='1.5'/%3E%3Cpath d='M11 8.4l2.6 2.6-2.6 2.6-2.6-2.6z'/%3E%3C/g%3E%3C/svg%3E") right top / 20px 20px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='translate(0 24) scale(1 -1)'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M1.5 23V9.5a8 8 0 0 1 8-8H23' stroke-width='1.6'/%3E%3Cpath d='M5 23V12a7 7 0 0 1 7-7h11' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='5.2' cy='5.2' r='1.5'/%3E%3Cpath d='M11 8.4l2.6 2.6-2.6 2.6-2.6-2.6z'/%3E%3C/g%3E%3C/svg%3E") left bottom / 20px 20px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='translate(24 24) scale(-1 -1)'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round'%3E%3Cpath d='M1.5 23V9.5a8 8 0 0 1 8-8H23' stroke-width='1.6'/%3E%3Cpath d='M5 23V12a7 7 0 0 1 7-7h11' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='5.2' cy='5.2' r='1.5'/%3E%3Cpath d='M11 8.4l2.6 2.6-2.6 2.6-2.6-2.6z'/%3E%3C/g%3E%3C/svg%3E") right bottom / 20px 20px no-repeat;
  pointer-events: none;
}
.mushaf-page.mf-pg-odd,
#mf-sec-murajaat #dm-page.mf-pg-odd { background-image: linear-gradient(to right, rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0) 7%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .16 .2 0 0 0 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.mushaf-page.mf-pg-even,
#mf-sec-murajaat #dm-page.mf-pg-even { background-image: linear-gradient(to left, rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0) 7%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .16 .2 0 0 0 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.mushaf-page.mf-pg-odd.mf-edge-1,
#mf-sec-murajaat #dm-page.mf-pg-odd.mf-edge-1 { box-shadow: 2px 1px 0 -1px var(--mf-paper), 2px 1px 0 0 var(--mf-paper-line), 0 2px 10px rgba(0, 0, 0, 0.12); }
.mushaf-page.mf-pg-even.mf-edge-1,
#mf-sec-murajaat #dm-page.mf-pg-even.mf-edge-1 { box-shadow: -2px 1px 0 -1px var(--mf-paper), -2px 1px 0 0 var(--mf-paper-line), 0 2px 10px rgba(0, 0, 0, 0.12); }
.mushaf-page.mf-pg-odd.mf-edge-2,
#mf-sec-murajaat #dm-page.mf-pg-odd.mf-edge-2 { box-shadow: 2px 1px 0 -1px var(--mf-paper), 2px 1px 0 0 var(--mf-paper-line), 4px 2px 0 -1px var(--mf-paper), 4px 2px 0 0 var(--mf-paper-line), 0 2px 10px rgba(0, 0, 0, 0.12); }
.mushaf-page.mf-pg-even.mf-edge-2,
#mf-sec-murajaat #dm-page.mf-pg-even.mf-edge-2 { box-shadow: -2px 1px 0 -1px var(--mf-paper), -2px 1px 0 0 var(--mf-paper-line), -4px 2px 0 -1px var(--mf-paper), -4px 2px 0 0 var(--mf-paper-line), 0 2px 10px rgba(0, 0, 0, 0.12); }
.mushaf-page.mf-pg-odd.mf-edge-3,
#mf-sec-murajaat #dm-page.mf-pg-odd.mf-edge-3 { box-shadow: 2px 1px 0 -1px var(--mf-paper), 2px 1px 0 0 var(--mf-paper-line), 4px 2px 0 -1px var(--mf-paper), 4px 2px 0 0 var(--mf-paper-line), 6px 3px 0 -1px var(--mf-paper), 6px 3px 0 0 var(--mf-paper-line), 0 2px 10px rgba(0, 0, 0, 0.12); }
.mushaf-page.mf-pg-even.mf-edge-3,
#mf-sec-murajaat #dm-page.mf-pg-even.mf-edge-3 { box-shadow: -2px 1px 0 -1px var(--mf-paper), -2px 1px 0 0 var(--mf-paper-line), -4px 2px 0 -1px var(--mf-paper), -4px 2px 0 0 var(--mf-paper-line), -6px 3px 0 -1px var(--mf-paper), -6px 3px 0 0 var(--mf-paper-line), 0 2px 10px rgba(0, 0, 0, 0.12); }
.mf-runhead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  direction: rtl;
  min-height: 22px;
  padding: 0 14px 3px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(var(--mf-primary-rgb), 0.22);
  font-family: 'kanzalmarjan', 'Amiri', 'Traditional Arabic', serif;
  font-size: min(20px, 4.9vw);
  line-height: 1.4;
  color: var(--mf-frame);
}
.mf-rh-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(var(--mf-primary-rgb), 0.25);
  border-radius: 50%;
  background: transparent;
  color: var(--mf-frame);
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}
.mf-rh-eye.off { background: var(--mf-primary); border-color: var(--mf-primary); color: #fff; }
body.mf-ayat-hidden #quran-page .quran-word:not(.ayah-end):not(.mf-peek):not(.mf-word-active) { color: transparent; -webkit-text-fill-color: transparent; text-shadow: none; }
body.mf-ayat-hidden #quran-page.mf-tajweed .quran-word:not(.ayah-end):not(.mf-peek):not(.mf-word-active) { opacity: 0; }
body.mf-ayat-hidden #quran-page .quran-word.mf-peek { background: rgba(76, 175, 80, 0.2); border-radius: 3px; }
.mf-rh-surah { justify-self: start; }
.mf-rh-juz { justify-self: end; }
.mf-rh-start { padding: 0 8px; border: 1px solid var(--mf-frame); border-radius: 999px; }
.mf-pagefoot { display: flex; justify-content: center; margin-top: 4px; }
.mf-pgmed {
  font-family: 'kanzalmarjan', 'Amiri', 'Traditional Arabic', serif;
  font-size: 19px;
  line-height: 1.4;
  color: var(--mf-frame);
}
:is(.mf-surah-head, #dm-page .dm-line:has(> .dm-surah-name), #mf-ik-card .mf-ik-line:has(> .surah-name-text)) {
  position: relative;
  --mf-ch: calc(var(--mf-fs) * var(--mf-zoom, 1) * 1.55);
  --mf-cw: calc(var(--mf-ch) * 0.8);
}
:is(.mf-surah-head, #dm-page .dm-line:has(> .dm-surah-name), #mf-ik-card .mf-ik-line:has(> .surah-name-text))::before,
:is(.mf-surah-head, #dm-page .dm-line:has(> .dm-surah-name), #mf-ik-card .mf-ik-line:has(> .surah-name-text))::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
:is(.mf-surah-head, #dm-page .dm-line:has(> .dm-surah-name), #mf-ik-card .mf-ik-line:has(> .surah-name-text))::before {
  left: 11%;
  right: 11%;
  height: var(--mf-ch);
  background: var(--mf-frame);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 40' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23000'%3E%3Cpath d='M32 3H15L3 20l12 17h17' stroke-width='1.6'/%3E%3Cpath d='M32 7H17.5L8 20l9.5 13H32' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='3.2' cy='20' r='2.3'/%3E%3C/svg%3E") left center / var(--mf-cw) 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 40' preserveAspectRatio='none'%3E%3Cg transform='translate(32 0) scale(-1 1)'%3E%3Cg fill='none' stroke='%23000'%3E%3Cpath d='M32 3H15L3 20l12 17h17' stroke-width='1.6'/%3E%3Cpath d='M32 7H17.5L8 20l9.5 13H32' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='3.2' cy='20' r='2.3'/%3E%3C/g%3E%3C/svg%3E") right center / var(--mf-cw) 100% no-repeat,
    linear-gradient(#000, #000) center 7.5% / calc(100% - 2 * var(--mf-cw) + 2px) 1.6px no-repeat,
    linear-gradient(#000, #000) center 17.5% / calc(100% - 2 * var(--mf-cw) + 2px) 0.8px no-repeat,
    linear-gradient(#000, #000) center 82.5% / calc(100% - 2 * var(--mf-cw) + 2px) 0.8px no-repeat,
    linear-gradient(#000, #000) center 92.5% / calc(100% - 2 * var(--mf-cw) + 2px) 1.6px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 40' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23000'%3E%3Cpath d='M32 3H15L3 20l12 17h17' stroke-width='1.6'/%3E%3Cpath d='M32 7H17.5L8 20l9.5 13H32' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='3.2' cy='20' r='2.3'/%3E%3C/svg%3E") left center / var(--mf-cw) 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 40' preserveAspectRatio='none'%3E%3Cg transform='translate(32 0) scale(-1 1)'%3E%3Cg fill='none' stroke='%23000'%3E%3Cpath d='M32 3H15L3 20l12 17h17' stroke-width='1.6'/%3E%3Cpath d='M32 7H17.5L8 20l9.5 13H32' stroke-width='.8'/%3E%3C/g%3E%3Ccircle cx='3.2' cy='20' r='2.3'/%3E%3C/g%3E%3C/svg%3E") right center / var(--mf-cw) 100% no-repeat,
    linear-gradient(#000, #000) center 7.5% / calc(100% - 2 * var(--mf-cw) + 2px) 1.6px no-repeat,
    linear-gradient(#000, #000) center 17.5% / calc(100% - 2 * var(--mf-cw) + 2px) 0.8px no-repeat,
    linear-gradient(#000, #000) center 82.5% / calc(100% - 2 * var(--mf-cw) + 2px) 0.8px no-repeat,
    linear-gradient(#000, #000) center 92.5% / calc(100% - 2 * var(--mf-cw) + 2px) 1.6px no-repeat;
}
:is(.mf-surah-head, #dm-page .dm-line:has(> .dm-surah-name), #mf-ik-card .mf-ik-line:has(> .surah-name-text))::after {
  left: calc(11% + var(--mf-cw) * 0.5);
  right: calc(11% + var(--mf-cw) * 0.5);
  height: calc(var(--mf-ch) * 0.62);
  background: rgba(var(--mf-primary-rgb), 0.07);
}
:is(.mf-surah-head, #dm-page .dm-line:has(> .dm-surah-name), #mf-ik-card .mf-ik-line:has(> .surah-name-text)) :is(.surah-name-text, .dm-surah-name) { position: relative; z-index: 1; }
#mf-sec-murajaat .dm-surah-name { font-size: calc(var(--mf-fs) * var(--mf-zoom, 1)); font-weight: 700; letter-spacing: 0; line-height: 1.9; color: var(--mf-link); }
#mf-sec-murajaat #dm-page { padding: clamp(12px, 4%, 28px) clamp(10px, 3.5%, 24px); }
#mf-sec-murajaat .dm-word { font-size: var(--mf-fs); padding: 0; }
#mf-sec-murajaat .dm-bismillah { font-size: var(--mf-fs); }
body:not(.mf-reading):not(.mf-panel-sec) #mf-book {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--mf-nav-h) - 96px);
  min-height: calc(100dvh - var(--mf-nav-h) - 96px);
}
.quran-line {
  direction: rtl;
  line-height: 1;
}
.quran-word {
  font-size: calc(var(--mf-fs) * var(--mf-zoom, 1));
  line-height: 1.9;
  cursor: pointer;
  color: var(--mf-page-ink);
  padding: 0;
  transition: background 0.1s;
  position: relative;
  z-index: 1;
}
.quran-word:hover {
  background: rgba(var(--mf-primary-rgb), 0.12);
  border-radius: 3px;
}
.quran-word.ayah-end { color: var(--mf-ayah); }
.quran-word.highlighted {
  background: rgba(76, 175, 80, 0.2);
  border-radius: 3px;
}
.quran-word.highlighted.mf-in-band { background: transparent; }
.mf-band {
  position: absolute;
  z-index: 0;
  background: rgba(76, 175, 80, 0.2);
  border-radius: 4px;
  pointer-events: none;
}
#quran-page .quran-word.mf-word-active { background: rgba(46, 140, 60, 0.45); border-radius: 3px; }
#quran-page .quran-word.mf-hk.mf-word-active { box-shadow: 0 0 0 2px var(--mf-hk, rgb(46, 140, 60)); }
.bismillah-text {
  font-family: 'Amiri', 'Traditional Arabic', 'Arabic Typesetting', serif;
  font-size: calc(var(--mf-fs) * var(--mf-zoom, 1));
  line-height: 1.9;
  direction: rtl;
  color: var(--mf-page-ink);
  cursor: default;
}
.bismillah-text.qc-bism {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.3em;
  font-size: calc(var(--mf-fs) * var(--mf-zoom, 1) * 1.35);
  line-height: 1.45;
}
.surah-name-text {
  font-family: 'kanzalmarjan', 'Amiri', 'Traditional Arabic', 'Arabic Typesetting', serif;
  font-size: calc(var(--mf-fs) * var(--mf-zoom, 1));
  line-height: 1.9;
  color: var(--mf-link);
}
#word-info-card {
  position: fixed;
  z-index: 9999;
  background: var(--mf-surface);
  border: 2px solid var(--mf-link);
  border-radius: 4px;
  padding: 4px 6px 4px 10px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
#word-info-close {
  background: none;
  border: none;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  color: var(--mf-faint);
  padding: 0 0 0 8px;
  vertical-align: middle;
}
#word-info-close:hover { color: var(--mf-text); }
#word-info-body { display: inline-flex; align-items: center; vertical-align: middle; }
.mf-wc-btn {
  border: 0;
  background: none;
  color: var(--mf-link);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.mf-wc-btn:hover { background: rgba(var(--mf-primary-rgb), 0.08); }
.mf-wc-btn i { font-size: 14px; vertical-align: -2px; }
.mf-wc-sep { width: 1px; height: 16px; background: var(--mf-line); margin: 0 2px; }
.mf-wc-loop { color: var(--mf-faint); }
.mf-wc-loop.active, .mf-wc-loop.active:hover { color: #fff; background: var(--mf-primary); }

#mf-controller .mf-acct-btn {
  height: 34px;
  box-sizing: border-box;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mf-surface);
  border: 1px solid var(--mf-link);
  color: var(--mf-link);
  border-radius: 8px;
  padding: 0;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
}
#mf-controller .mf-acct-btn:hover { background: var(--mf-surface-3); color: var(--mf-link-deep); text-decoration: none; }
.mf-acct-btn img { width: 20px; height: 20px; max-height: 20px; border-radius: 4px; }
#mf-user-btn svg { width: 22px; height: 22px; fill: var(--mf-link); }
#mf-user-btn .mf-pc-logo { width: 22px; height: 22px; max-height: 22px; border-radius: 3px; object-fit: contain; }
html[data-theme="night"] #mf-user-btn .mf-pc-logo { background: #fff; padding: 1px; }

.mf-dl-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mf-dl-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: var(--mf-surface-2);
  border: 1px solid var(--mf-line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--mf-link-deep);
  transition: background 0.15s, border-color 0.15s;
}
.mf-dl-choice:hover { background: var(--mf-surface-3); border-color: var(--mf-link); }
.mf-dl-choice:disabled { opacity: 0.55; cursor: default; }
.mf-dl-choice i { font-size: 20px; color: var(--mf-link); }
.mf-dl-choice strong { display: block; font-size: 14px; }
.mf-dl-choice small { color: var(--mf-muted); font-size: 12px; }
.mf-off-choices { margin-top: 0; }
.mf-dl-choice.done { background: var(--mf-ok-soft); border-color: var(--mf-ok-line); }
.mf-dl-choice.done i { color: var(--mf-ok); }
.mf-off-item, .mf-off-item:hover { cursor: default; background: var(--mf-surface-2); border-color: var(--mf-line); }
.mf-off-item > span { flex: 1; min-width: 0; }
.mf-off-dl, .mf-rebuild-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--mf-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.mf-off-dl:hover, .mf-rebuild-btn:hover { background: var(--mf-primary-deep); }
.mf-off-dl:disabled, .mf-rebuild-btn:disabled { opacity: 0.4; cursor: default; }
.mf-off-dl i, .mf-dl-choice .mf-rebuild-btn i, .mf-dl-choice .mf-off-dl i { font-size: 18px; color: #fff; }
.mf-off-item.done, .mf-off-item.done:hover { background: var(--mf-ok-soft); border-color: var(--mf-ok-line); }
.mf-off-item.done .mf-off-dl, .mf-off-item.done .mf-off-later { display: none; }
.mf-spin { display: inline-block; animation: mfSpin 0.9s linear infinite; }
@keyframes mfSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mf-spin { animation-duration: 3s; } }
.mf-off-later {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--mf-line);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mf-off-later:disabled { opacity: 0.4; cursor: default; }
.mf-off-later i, .mf-dl-choice .mf-off-later i { font-size: 18px; color: var(--mf-primary); }
.mf-off-item.sched .mf-off-later { background: var(--mf-primary); border-color: var(--mf-primary); }
.mf-off-item.sched .mf-off-later i, .mf-dl-choice.sched .mf-off-later i { color: #fff; }
.mf-hold {
  position: fixed;
  inset: 0;
  z-index: 200000;
  padding: 16px;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}
.mf-hold-box {
  width: 100%;
  max-width: 360px;
  padding: 20px;
  border-radius: 14px;
  background: var(--mf-surface);
  color: var(--mf-text);
}
.mf-hold-box strong { display: block; font-size: 16px; color: var(--mf-ink); }
.mf-hold-box p { margin: 8px 0 16px; font-size: 13px; line-height: 1.5; color: var(--mf-muted); }
.mf-hold-btns { display: flex; flex-direction: column; gap: 8px; }
.mf-hold-btns button { min-height: 42px; padding: 8px 12px; border-radius: 10px; font-size: 14px; cursor: pointer; }
.mf-hold-main { border: 0; background: var(--mf-primary); color: #fff; }
.mf-hold-alt { border: 1px solid var(--mf-line); background: transparent; color: var(--mf-ink); }
.mf-off-progress { margin-top: 10px; }
.mf-off-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.mf-off-row small { font-size: 12px; color: var(--mf-muted); }
.mf-dl-later {
  display: block;
  margin: 12px auto 0;
  background: none;
  border: none;
  color: var(--mf-faint);
  font-size: 13px;
  cursor: pointer;
}
.mf-dl-later:hover { color: var(--mf-text); }

.mf-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(11, 47, 42, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.mf-auth-overlay.active { opacity: 1; pointer-events: auto; }
.mf-auth-card {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: var(--mf-surface);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1);
}
.mf-auth-overlay.active .mf-auth-card { transform: perspective(1200px) rotateY(0); }
.mf-auth-overlay.active .mf-auth-card.mf-flip-out { transform: perspective(1200px) rotateY(90deg); transition: transform 0.18s ease-in; }
.mf-auth-overlay.active .mf-auth-card.mf-flip-in { transform: perspective(1200px) rotateY(-90deg); transition: none; }
.mf-auth-top {
  background: linear-gradient(135deg, var(--mf-primary) 0%, var(--sh-bg) 100%);
  color: #fff;
  text-align: center;
  padding: 22px 20px 18px;
}
.mf-auth-badge {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: rgba(216, 180, 106, 0.18);
  border: 1px solid rgba(216, 180, 106, 0.55);
  color: var(--mf-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.mf-auth-logo { display: block; width: 92px; height: 92px; margin: 0 auto 10px; border-radius: 50%; background: var(--mf-primary-deep); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.mf-auth-top h5 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; }
.mf-auth-top p { margin: 4px 0 0; font-size: 12px; color: rgba(255, 255, 255, 0.72); }
.mf-auth-x {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.mf-auth-body { padding: 18px 20px 20px; }
.mf-auth-field { position: relative; margin-bottom: 12px; }
.mf-auth-field > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mf-link);
  font-size: 16px;
}
.mf-auth-field input {
  width: 100%;
  padding: 11px 40px 11px 40px;
  border: 1.5px solid var(--mf-line);
  border-radius: 12px;
  background: var(--mf-surface-2);
  font-size: 14px;
  color: var(--mf-ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.mf-auth-field input:focus { background: var(--mf-surface); border-color: var(--mf-link); box-shadow: 0 0 0 4px rgba(var(--mf-primary-rgb), 0.12); }
.mf-auth-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--mf-faint);
  font-size: 15px;
  cursor: pointer;
  padding: 4px;
}
.mf-auth-msg { display: none; font-size: 12px; font-weight: 600; border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; }
.mf-auth-msg.err { display: block; background: var(--mf-bad-soft); color: var(--mf-bad); }
.mf-auth-msg.info { display: block; background: var(--mf-surface-2); color: var(--mf-link-deep); }
.mf-auth-submit {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 11px 0;
  background: var(--mf-gold);
  color: var(--mf-on-gold);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(216, 180, 106, 0.35);
  transition: filter 0.2s;
}
.mf-auth-submit:hover { filter: brightness(1.05); }
.mf-auth-submit:disabled { opacity: 0.6; cursor: default; }
.mf-auth-switch { text-align: center; font-size: 12px; color: var(--mf-faint); margin: 14px 0 0; }
.mf-auth-switch a { color: var(--mf-link); font-weight: 700; cursor: pointer; }
.mf-auth-done { text-align: center; padding: 6px 0 4px; }
.mf-auth-done i { font-size: 40px; color: var(--mf-link); }
.mf-auth-done p { font-size: 13px; color: var(--mf-text); margin: 10px 0 16px; }

#mf-page-lessons { padding-bottom: 6px; border-bottom: 1px solid var(--mf-line); }
.mf-side-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mf-muted);
}
.mf-side-link {
  border: 0;
  background: var(--mf-surface-3);
  color: var(--mf-link);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
#mf-page-lessons .mf-ll-lesson { display: flex; align-items: center; gap: 4px; padding: 6px 16px; font-size: 13px; line-height: 1.3; border-bottom: 1px solid var(--mf-line); }
#mf-page-lessons .mf-ll-lesson:last-child { border-bottom: none; }
#mf-page-lessons .mf-ll-lesson i { font-size: 16px; }
#mf-page-lessons .mf-pl-empty { padding: 10px 18px; }
#mf-pl-all { padding: 0 10px 8px; }
#mf-pl-all .mf-ll-juz-header, #mf-pl-all .mf-ll-page-header { font-size: 14px; }
#mf-page-lessons #mf-pl-all .mf-ll-lesson { padding: 6px 10px; font-size: 13px; }
.mf-pl-empty { font-size: 12px; color: var(--mf-faint); padding: 10px 12px; }
.mf-header-link {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.5);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  padding: 2px 8px;
  cursor: pointer;
}
.mf-header-link:hover { background: rgba(255,255,255,.3); }

.mf-ik-btn {
  border: 1px solid var(--mf-line);
  background: var(--mf-surface);
  color: var(--mf-link);
  border-radius: 22px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, opacity 0.15s;
}
.mf-ik-btn:active { transform: scale(0.95); }
.mf-ik-btn.primary { background: var(--mf-primary); border-color: var(--mf-link); color: #fff; }
.mf-ik-btn:disabled { opacity: 0.45; cursor: default; }
.mf-ik-btn.wide { display: block; width: 100%; margin-top: 12px; }
.mf-ik-row { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
#mf-ik-idle .mf-ik-btn { margin-top: 8px; }

.mf-ik-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mf-ik-label .mf-go-label { margin: 0; }
.mf-ik-juzgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mf-ik-juz, .mf-mj-cell {
  height: 40px;
  border: 1px solid var(--mf-line);
  border-radius: 10px;
  background: var(--mf-surface);
  color: var(--mf-link);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.mf-ik-juz:active, .mf-mj-cell:active { transform: scale(0.9); }
.mf-ik-juz.sel, .mf-mj-cell.sel { background: linear-gradient(135deg, var(--mf-primary), var(--mf-primary-2)); border-color: transparent; color: #fff; }
.mf-ik-pers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mf-ik-per {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  border: 1px solid var(--mf-line);
  border-radius: 12px;
  background: var(--mf-surface);
  color: var(--mf-link);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mf-ik-per b { font-size: 20px; line-height: 1; }
.mf-ik-per small { font-size: 11px; color: var(--mf-muted); }
.mf-ik-per.active { background: var(--mf-primary); border-color: var(--mf-link); color: #fff; }
.mf-ik-per.active small { color: rgba(255, 255, 255, 0.8); }
.mf-ik-startrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0 6px; }
#mf-ik-total { font-size: 14px; font-weight: 600; color: var(--mf-ink); }

.mf-ik-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--mf-line); border-top-color: var(--mf-link); animation: mfIkSpin 0.8s linear infinite; }
@keyframes mfIkSpin { to { transform: rotate(360deg); } }
.mf-ik-dl-track { width: 100%; height: 6px; border-radius: 3px; background: var(--mf-surface-3); overflow: hidden; margin-top: 6px; }
#mf-ik-dl-bar { width: 0; height: 100%; background: var(--mf-primary); transition: width 0.2s; }

.mf-ik-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.mf-ik-head strong { display: block; font-size: 16px; color: var(--mf-ink); }
.mf-ik-head small { font-size: 12px; color: var(--mf-muted); }
.mf-ik-quit { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--mf-surface-2); color: var(--mf-link); font-size: 17px; cursor: pointer; }
.mf-ik-progress { height: 4px; border-radius: 2px; background: var(--mf-surface-3); overflow: hidden; margin-bottom: 10px; }
#mf-ik-progress { height: 100%; width: 0; background: linear-gradient(90deg, var(--mf-primary), var(--mf-gold)); transition: width 0.4s ease; }

.mf-ik-card {
  position: relative;
  background: var(--mf-paper);
  border: 6px solid var(--mf-frame);
  border-radius: 2px;
  padding: clamp(10px, 3%, 20px) clamp(8px, 3%, 18px);
}
.mf-ik-line { display: flex; justify-content: space-between; direction: rtl; line-height: 1; }
.mf-ik-line.center { justify-content: center; }
.mf-ik-word {
  font-size: var(--mf-fs);
  line-height: 1.9;
  color: transparent;
  border-radius: 3px;
}
.mf-ik-word:not(.ayah-end) { background-image: linear-gradient(transparent 78%, rgba(var(--mf-primary-rgb), 0.12) 78%); }
.mf-ik-word.ayah-end { color: var(--mf-ayah); }
.mf-ik-word.given { color: var(--mf-link); background: rgba(var(--mf-primary-rgb), 0.08); }
.mf-ik-word.ok { color: var(--mf-ok); background: rgba(38, 166, 91, 0.22); }
.mf-ik-word.wr, .mf-ik-word.ms { color: var(--mf-bad); background: rgba(217, 52, 43, 0.16); }
.mf-ik-word.wr { text-decoration: underline wavy currentColor; }
.mf-ik-word.ir { color: var(--mf-irab); background: rgba(190, 18, 70, 0.3); text-decoration: underline dashed currentColor; }
.mf-ik-word.cursor { box-shadow: 0 0 0 2px var(--mf-link) inset; }
.mf-ik-word.nr { outline: 1px dashed var(--mf-faint); outline-offset: 1px; }
.mf-ik-passage.reveal .mf-ik-word { color: var(--mf-page-ink); }
.mf-ik-passage.reveal .mf-ik-word.ok { color: var(--mf-ok); }
.mf-ik-passage.reveal .mf-ik-word.wr, .mf-ik-passage.reveal .mf-ik-word.ms { color: var(--mf-bad); }
.mf-ik-passage.reveal .mf-ik-word.ir { color: var(--mf-irab); }
.mf-ik-passage.reveal .mf-ik-word.ayah-end { color: var(--mf-ayah); }

.mf-ik-listen { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); display: none; gap: 3px; align-items: flex-end; height: 22px; padding: 4px 10px; border-radius: 12px; background: var(--mf-primary); }
.mf-ik-listen span { width: 3px; background: var(--mf-gold); border-radius: 2px; animation: mfIkBar 0.9s ease-in-out infinite; }
.mf-ik-listen span:nth-child(2) { animation-delay: 0.15s; }
.mf-ik-listen span:nth-child(3) { animation-delay: 0.3s; }
.mf-ik-listen span:nth-child(4) { animation-delay: 0.45s; }
.mf-ik-listen span:nth-child(5) { animation-delay: 0.6s; }
@keyframes mfIkBar { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.mf-ik-card.listening .mf-ik-listen { display: flex; }

.mf-ik-scores { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 2px; font-size: 12px; color: var(--mf-muted); }
.mf-ik-scores b { font-size: 14px; }
.mf-ik-scores .ok b { color: var(--mf-ok); }
.mf-ik-scores .wr b { color: var(--mf-warn); }
.mf-ik-scores .ms b { color: var(--mf-bad); }
.mf-ik-status { min-height: 18px; text-align: center; font-size: 13px; color: var(--mf-ink); margin: 4px 0; }
.mf-ik-status.err { color: var(--mf-bad); }
.mf-ik-result { text-align: center; padding: 8px 0 4px; animation: mfPopIn 0.35s cubic-bezier(.2,.8,.2,1); }
.mf-ik-r-score { font-size: 34px; font-weight: 800; color: var(--mf-link); line-height: 1.1; }
.mf-ik-r-line { font-size: 12px; color: var(--mf-muted); margin-bottom: 8px; }

.mf-ik-sumhead { text-align: center; background: linear-gradient(135deg, var(--mf-primary), var(--mf-primary-2)); color: #fff; border-radius: 14px; padding: 16px; margin-bottom: 10px; }
.mf-ik-sumhead small { opacity: 0.8; text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
.mf-ik-sumhead .big { font-size: 44px; font-weight: 800; line-height: 1.1; }
.mf-ik-sumhead span { font-size: 13px; opacity: 0.9; }
.mf-ik-sumlist { background: var(--mf-surface); border: 1px solid var(--mf-line); border-radius: 12px; overflow: hidden; }
.mf-ik-sumrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--mf-line); }
.mf-ik-sumrow:last-child { border-bottom: 0; }
.mf-ik-sumrow .n { width: 26px; height: 26px; border-radius: 50%; background: var(--mf-surface-3); color: var(--mf-link); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mf-ik-sumrow .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mf-ik-sumrow .t strong { font-size: 13px; color: var(--mf-ink); }
.mf-ik-sumrow .t small { font-size: 11px; color: var(--mf-muted); }
.mf-ik-sumrow .s { font-size: 15px; font-weight: 800; }
.mf-ik-sumrow .s.hi { color: var(--mf-ok); }
.mf-ik-sumrow .s.mid { color: var(--mf-warn); }
.mf-ik-sumrow .s.lo { color: var(--mf-bad); }
.mf-ik-sumrow .s.skip { color: var(--mf-faint); }
.mf-ik-note { text-align: center; font-size: 11px; color: var(--mf-muted); margin: 8px 0 0; }

.mf-ik-headbtns { display: flex; gap: 6px; flex-shrink: 0; }
.mf-ik-headbtns button:disabled { opacity: 0.4; }
.mf-ik-pagebar { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--mf-link); }
.mf-ik-pgbtn { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--mf-surface-3); color: var(--mf-link); font-size: 15px; cursor: pointer; display: none; }
.mf-ik-word.out:not(.ayah-end) { background-image: linear-gradient(transparent 78%, rgba(var(--mf-primary-rgb), 0.06) 78%); }
.mf-ik-word.out.ayah-end { opacity: 0.45; }
.mf-ik-word.peek { color: var(--mf-page-ink); background: rgba(76, 175, 80, 0.3); }
.mf-ik-passage.reveal .mf-ik-word.out { color: var(--mf-faint); }
@keyframes mfIkTurn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.mf-ik-passage.mf-ik-turn { animation: mfIkTurn 0.35s ease; }
#mf-ik-card.mushaf-page { padding: clamp(12px, 4%, 28px) clamp(10px, 3.5%, 24px); }

@font-face {
  font-family: 'kanzalmarjan';
  src: url('../../assets/fonts/marjan/kanz-al-marjaan-webfont.woff2') format('woff2'),
       url('../../assets/fonts/marjan/kanz-al-marjaan-webfont.ttf') format('truetype');
  font-display: swap;
}

body.mf-tl-learn #mf-sec-learn,
body.mf-tl-practice #mf-sec-practice,
body.mf-tl-recite #mf-sec-murajaat { display: block; }
body.mf-tl-recite #mf-tools-murajaat,
body.mf-tl-practice #mf-tools-pr { display: flex; }
body.mf-tl-recite #mf-tools-murajaat #dm-hide-toggle,
body.mf-tl-recite #mf-tools-murajaat #dm-peek-btn { display: none; }

.mf-side-list .mf-side-item span { display: flex; flex-direction: column; min-width: 0; }
.mf-side-list .mf-side-item strong { font-size: 14px; line-height: 1.25; }
.mf-side-list .mf-side-item small { font-size: 11.5px; line-height: 1.25; font-weight: 400; color: var(--mf-muted); }
#mf-install-wrap { border-top: 1px solid var(--mf-line); padding: 4px 0; }
#mf-help-wrap { border-top: 1px solid var(--mf-line); padding: 4px 0 8px; }
.mf-pop-help { margin-left: auto; margin-right: 8px; }
.mf-st-chips { display: flex; gap: 6px; padding: 12px 0 0; overflow-x: auto; scrollbar-width: none; }
.mf-st-chips::-webkit-scrollbar { display: none; }
.mf-st-chip { flex: 0 0 auto; padding: 6px 12px; border: 1px solid var(--mf-line); border-radius: 999px; background: var(--mf-surface); color: var(--mf-text); font-size: 12px; font-weight: 600; cursor: pointer; }
.mf-st-chip b { margin-left: 2px; color: var(--mf-link); }
.mf-st-chip.active { border-color: var(--mf-primary); background: var(--mf-primary); color: #fff; }
.mf-st-chip.active b { color: #fff; }
.mf-st-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 0 6px; }
.mf-st-stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 10px; background: var(--mf-surface-2); text-align: center; }
.mf-st-stats strong { font-size: 16px; color: var(--mf-ink); }
.mf-st-stats small { font-size: 11px; color: var(--mf-muted); }
.mf-st-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.mf-st-head strong { font-size: 15px; color: var(--mf-ink); }
.mf-st-nav:disabled { opacity: 0.35; cursor: default; }
.mf-st-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; justify-items: center; }
.mf-st-dow { margin-bottom: 4px; font-size: 11px; font-weight: 600; color: var(--mf-muted); }
.mf-st-day { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; font-size: 13px; color: var(--mf-text); }
.mf-st-day.on { background: var(--mf-primary); color: #fff; font-weight: 600; }
button.mf-st-day { padding: 0; border: 0; cursor: pointer; }
.mf-st-day.today { box-shadow: 0 0 0 2px var(--mf-gold); }
.mf-st-day.sel { box-shadow: 0 0 0 2px var(--mf-surface), 0 0 0 4px var(--mf-primary); }
.mf-st-dayview { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--mf-line); }
.mf-st-dayhead { font-size: 14px; font-weight: 700; color: var(--mf-ink); }
.mf-st-dayview .mf-st-stats { padding: 10px 0 2px; }
.mf-st-hint { padding: 6px 0; font-size: 12px; color: var(--mf-muted); }
.mf-st-sec { margin-top: 10px; }
.mf-st-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--mf-line); }
.mf-st-row:last-child { border-bottom: 0; }
.mf-st-row span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mf-st-row strong { font-size: 13px; color: var(--mf-ink); }
.mf-st-row small { font-size: 11px; line-height: 1.35; color: var(--mf-muted); }
.mf-st-row b { flex: 0 0 auto; font-size: 14px; color: var(--mf-link); }
.mf-st-note { margin-top: 12px; font-size: 12px; line-height: 1.4; color: var(--mf-muted); text-align: center; }
.driver-popover.mf-help-pop { width: min(330px, calc(100vw - 24px)); max-width: none; padding: 16px; border-radius: 12px; background: var(--mf-surface); color: var(--mf-text); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); }
.mf-help-pop .driver-popover-title { padding-right: 22px; color: var(--mf-link); font-size: 16px; font-weight: 700; line-height: 1.3; }
.mf-help-pop .driver-popover-description { margin-top: 6px; color: var(--mf-text); font-size: 14px; line-height: 1.5; }
.mf-help-pop .driver-popover-description b { color: var(--mf-ink); }
.mf-help-pop .driver-popover-footer { margin-top: 14px; }
.mf-help-pop .driver-popover-progress-text { color: var(--mf-muted); font-size: 12px; }
.mf-help-pop .driver-popover-close-btn { top: 6px; right: 6px; width: 30px; height: 30px; color: var(--mf-muted); font-size: 20px; }
.mf-help-pop .driver-popover-close-btn:hover, .mf-help-pop .driver-popover-close-btn:focus { color: var(--mf-ink); }
.mf-help-pop .driver-popover-close-btn:focus { outline: none; }
.mf-help-pop .driver-popover-close-btn:focus-visible { outline: 2px solid var(--mf-line); border-radius: 6px; }
.mf-help-pop .driver-popover-footer button { padding: 7px 14px; border: 1px solid var(--mf-line); border-radius: 8px; background: var(--mf-surface-2); color: var(--mf-ink); font-size: 13px; font-weight: 600; text-shadow: none; }
.mf-help-pop .driver-popover-footer button:hover, .mf-help-pop .driver-popover-footer button:focus { background: var(--mf-surface-3); }
.mf-help-pop .driver-popover-footer .driver-popover-next-btn { border-color: var(--mf-primary); background: var(--mf-primary); color: #fff; }
.mf-help-pop .driver-popover-footer .driver-popover-next-btn:hover, .mf-help-pop .driver-popover-footer .driver-popover-next-btn:focus { background: var(--mf-primary-deep); color: #fff; }
.mf-help-pop .driver-popover-arrow-side-left { border-left-color: var(--mf-surface); }
.mf-help-pop .driver-popover-arrow-side-right { border-right-color: var(--mf-surface); }
.mf-help-pop .driver-popover-arrow-side-top { border-top-color: var(--mf-surface); }
.mf-help-pop .driver-popover-arrow-side-bottom { border-bottom-color: var(--mf-surface); }
.mf-side-list .mf-side-item.active { background: rgba(var(--mf-primary-rgb), 0.08); box-shadow: inset 3px 0 0 var(--mf-link); }
.mf-side-list .mf-side-item.active strong { color: var(--mf-link); }

.mf-ln-head { display: flex; align-items: center; gap: 10px; margin: 2px 2px 8px; }
.mf-ln-head strong { display: block; font-size: 16px; color: var(--mf-ink); }
.mf-ln-head small { font-size: 12px; color: var(--mf-muted); }
#mf-ln-stick { position: sticky; top: var(--mf-ctrl-h, 52px); z-index: 1001; margin: 0 0 8px; padding: 5px 6px 6px; background: var(--mf-surface); border-radius: 8px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); }
#mf-ln-stick .mf-ln-head { margin: 0 0 6px; }
.mf-ln-tabs { display: flex; width: 100%; }
.mf-ln-tabs button { flex: 1; min-height: 34px; padding: 6px 4px; }
.mf-ln-tabs button:disabled { opacity: 0.4; cursor: default; }
.mf-ln-tabs small { margin-left: 4px; font-size: 11px; font-weight: 700; opacity: 0.75; }
.mf-ln-pane[hidden] { display: none !important; }
.mf-ln-head .mf-ik-quit { flex-shrink: 0; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.mf-ln-title { flex: 1; min-width: 0; text-align: center; }
.mf-ln-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mf-ln-body, #mf-ht-body { background: var(--mf-surface); border: 1px solid var(--mf-line); border-radius: 8px; overflow: hidden; }
.mf-ln-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--mf-line);
  background: none;
  text-align: left;
  cursor: pointer;
}
a.mf-ln-item { text-decoration: none; }
.mf-ln-item:last-child { border-bottom: 0; }
.mf-ln-item:hover { background: var(--mf-surface-2); }
.mf-ln-item:disabled { opacity: 0.5; cursor: default; }
.mf-ln-item b {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--mf-surface-3);
  color: var(--mf-link);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mf-ln-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mf-ln-txt strong { font-size: 15px; font-weight: 700; color: var(--mf-ink); }
.mf-ln-txt small { font-size: 12px; color: var(--mf-muted); }
.mf-ln-item i { flex-shrink: 0; font-size: 16px; color: var(--mf-faint); }
.mf-ln-item.done b { background: var(--mf-primary); color: #fff; }
.mf-ln-item.done i { color: var(--mf-ok); }
.mf-ln-pad { width: 34px; flex-shrink: 0; }
#mf-ln-pages, #mf-ln-pages * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#mf-ln-scroll { overflow-x: auto; overflow-y: hidden; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
#mf-ln-pages { width: calc(var(--z, 1) * 100%); }
.mf-ln-page { position: relative; width: 100%; margin: 0 auto 10px; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15); }
.mf-ln-page::before {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--mf-faint);
  font-size: 28px;
  transform: translateY(-50%);
}
.mf-ln-page canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
#mf-ln-pages.mf-ln-hidden canvas { filter: blur(25px); }
#mf-ln-shield {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  color: #fff;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
#mf-ln-shield.show { display: flex; }
@media print {
  body.mf-ln-reading * { visibility: hidden !important; }
  body.mf-ln-reading::after {
    content: 'Printing this lesson is not allowed.';
    visibility: visible;
    position: fixed;
    top: 40%;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 24px;
  }
}

.mf-pr-levels { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; direction: rtl; }
.mf-pr-level {
  font-family: 'kanzalmarjan', serif;
  font-size: 18px;
  padding: 4px 14px;
  border: 1px solid var(--mf-link);
  border-radius: 20px;
  background: var(--mf-surface);
  color: var(--mf-link);
  cursor: pointer;
}
.mf-pr-level.active { background: var(--mf-primary); color: #fff; }
.mf-pr-card { background: var(--mf-paper); border: 1px solid var(--mf-paper-line); border-radius: 10px; padding: 16px 14px; text-align: center; }
#mf-pr-question {
  font-family: 'kanzalmarjan', serif;
  direction: rtl;
  font-size: 76px;
  line-height: 1.3;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 2px;
  color: var(--mf-ink);
}
.mf-pr-sakin { position: relative; display: inline-block; line-height: 1.3; }
.mf-pr-sakin::after { content: ''; position: absolute; left: 50%; top: -0.06em; width: 0.15em; height: 0.15em; margin-left: -0.075em; box-sizing: border-box; border: 0.03em solid currentColor; border-radius: 50%; }
#mf-pr-cat { font-family: 'kanzalmarjan', serif; font-size: 16px; color: var(--mf-muted); min-height: 22px; margin-bottom: 6px; }
#mf-pr-tip { font-size: 12px; color: var(--mf-link-deep); background: rgba(var(--mf-primary-rgb), 0.08); border-radius: 6px; padding: 5px 8px; margin-bottom: 8px; }
#mf-pr-tip:empty { display: none; }
#mf-pr-status { font-size: 13px; color: var(--mf-muted); min-height: 18px; margin-bottom: 6px; }
#mf-pr-status.ok { color: var(--mf-ok); font-weight: 700; }
#mf-pr-status.err { color: var(--mf-bad); font-weight: 600; }
#mf-pr-feedback { min-height: 22px; }
.mf-pr-syms { direction: rtl; }
.mf-pr-sym { font-family: 'kanzalmarjan', serif; display: inline-block; padding: 2px 8px; margin: 0 2px; border-radius: 6px; font-size: 26px; }
.mf-pr-sym.correct { background: rgba(38, 166, 91, 0.16); color: var(--mf-ok); }
.mf-pr-sym.iraab { background: rgba(230, 145, 30, 0.18); color: var(--mf-warn); }
.mf-pr-sym.missing { background: rgba(217, 52, 43, 0.14); color: var(--mf-bad); text-decoration: line-through; }
.mf-pr-said { font-size: 12px; color: var(--mf-muted); margin-top: 6px; }
.mf-pr-score { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--mf-ink); }
#mf-pr-score.hit { color: var(--mf-ok); }
#mf-pr-dl-bar { width: 0; height: 100%; background: var(--mf-primary); transition: width 0.2s; }

#mf-ln-res { margin-top: 6px; }
.mf-ln-res-head { font-size: 16px; font-weight: 700; color: var(--mf-ink); margin: 14px 2px 8px; }
#mf-ln-hw { margin-top: 6px; }
.mf-ln-hw-topic { font-family: 'kanzalmarjan', serif; font-size: 20px; font-weight: 400; color: var(--mf-link); }
.mf-ln-hw { font-family: 'kanzalmarjan', serif; background: var(--mf-surface); border: 1px solid var(--mf-line); border-radius: 10px; padding: 12px 14px; color: var(--mf-ink); }
.mf-ln-hw-steps { margin: 0 0 12px; padding: 0 22px 0 0; font-size: 19px; line-height: 1.9; }
.mf-ln-hw-steps li { margin-bottom: 4px; }
.mf-ln-hw-words { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.mf-ln-hw-words span { padding: 4px 14px; border-radius: 8px; background: rgba(var(--mf-primary-rgb), 0.06); border: 1px solid var(--mf-line); font-size: 28px; line-height: 1.7; }
.mf-ln-hw-notes { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(216, 180, 106, 0.14); font-size: 19px; line-height: 1.9; }
.mf-ln-hw-notes > i { flex-shrink: 0; margin-top: 8px; font-size: 16px; color: #b8913f; }
.mf-ln-hw-notes p { margin: 0; }
.mf-ln-vid { margin-bottom: 14px; background: #000; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15); -webkit-user-select: none; user-select: none; }
.mf-ln-vid-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.mf-ln-vid-frame iframe, .mf-ln-vid-yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.mf-ln-vid-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mf-ln-vid.started .mf-ln-vid-cover { display: none; }
.mf-ln-vid-shield { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mf-ln-vid-big {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(var(--mf-primary-rgb), 0.9);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.mf-ln-vid.playing .mf-ln-vid-big { opacity: 0; }
.mf-ln-vid-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #1d2a26; color: #fff; }
.mf-ln-vid-bar button { flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 15px; cursor: pointer; }
.mf-ln-vid-seek { flex: 1; min-width: 0; accent-color: #d8b46a; }
.mf-ln-vid-time { flex-shrink: 0; font-size: 12px; opacity: 0.85; min-width: 74px; text-align: right; }
.mf-ln-vid:fullscreen { display: flex; flex-direction: column; justify-content: center; border-radius: 0; }
.mf-ln-vid:fullscreen .mf-ln-vid-frame { width: 100%; max-height: calc(100vh - 44px); margin: auto 0; }

.mf-pr-row { margin-top: 8px; }
.mf-pr-row small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mf-muted); margin-bottom: 4px; }
.mf-pr-sym.heard { background: var(--mf-surface-3); color: var(--mf-link-deep); }
.mf-pr-none { font-size: 14px; color: var(--mf-bad); }
.mf-pr-next { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.mf-pr-next .mf-ik-btn { display: inline-flex; align-items: center; gap: 6px; }
.mf-pr-live #mf-pr-status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #d9342b;
  vertical-align: middle;
  animation: mfIkDot 1.1s ease-in-out infinite;
}

.mf-locked .mf-lock-ico { margin-left: auto; flex-shrink: 0; font-size: 14px; color: var(--mf-primary); }
.mf-ll-lesson.mf-locked { display: flex; align-items: center; padding-right: 8px; }
.mf-sec-btn { position: relative; }
.mf-sec-btn.mf-locked .mf-lock-ico { position: absolute; top: 4px; right: calc(50% - 20px); margin: 0; font-size: 10px; }
#mf-gate .mf-gate-body { padding: 6px 4px 4px; text-align: center; }
.mf-gate-ico { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 10px; border-radius: 50%; background: rgba(var(--mf-primary-rgb), 0.12); color: var(--mf-primary); font-size: 26px; }
#mf-gate-text { margin: 0 auto 8px; max-width: 34ch; font-size: 15px; line-height: 1.5; color: var(--mf-ink); }
.mf-gate-body > small { display: block; margin-bottom: 14px; font-size: 12px; color: var(--mf-muted); }
.mf-gate-body .mf-ik-btn { flex: 1; min-height: 44px; }

.mf-ln-head .mf-ht-manage { margin-left: auto; flex-shrink: 0; padding: 5px 12px; font-size: 12px; }
#mf-ht-edit { background: var(--mf-surface); border: 1px solid var(--mf-line); border-radius: 8px; padding: 10px; }
.mf-ht-row { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--mf-line); }
.mf-ht-row:first-child { padding-top: 0; }
.mf-ht-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mf-ht-fields input,
.mf-ht-addadmin input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--mf-line);
  border-radius: 8px;
  background: var(--mf-surface-2);
  color: var(--mf-ink);
  font-size: 14px;
}
.mf-ht-fields input:focus,
.mf-ht-addadmin input:focus { outline: none; border-color: var(--mf-link); background: var(--mf-surface); }
.mf-ht-fields .mf-ht-title { font-weight: 600; }
.mf-ht-fields .mf-ht-link { font-size: 12px; color: var(--mf-muted); }
.mf-ht-btns { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.mf-ht-btns button,
.mf-ht-admin button {
  width: 30px;
  height: 24px;
  border: 1px solid var(--mf-line);
  border-radius: 6px;
  background: var(--mf-surface);
  color: var(--mf-link);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mf-ht-btns .mf-ht-del, .mf-ht-admin .mf-ht-admin-del { color: var(--mf-bad); }
#mf-ht-add { margin: 10px 0 4px; }
.mf-ht-msg { min-height: 18px; margin: 4px 0; font-size: 12px; color: var(--mf-muted); text-align: center; }
.mf-ht-msg.err { color: var(--mf-bad); }
.mf-ht-admins { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--mf-line); }
.mf-ht-admin { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--mf-ink); }
.mf-ht-admin small { font-size: 11px; color: var(--mf-muted); }
.mf-ht-addadmin { display: flex; gap: 8px; margin-top: 6px; }
.mf-ht-addadmin .mf-ik-btn { flex-shrink: 0; }
.mf-ht-item i.ft-chevron-right { color: var(--mf-faint); }
.mf-ht-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  overflow: clip;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.mf-ht-frame iframe {
  position: absolute;
  left: 0;
  top: -54px;
  width: 100%;
  height: calc(100% + 54px + 600px);
  border: 0;
}

body.mf-sec-understand #mf-sec-understand,
body.mf-sec-topics #mf-sec-topics,
body.mf-sec-tltopic #mf-sec-topics { display: block; }
body.mf-sec-tltopic #mf-tp-topics { display: none; }
#mf-un-side { padding-bottom: 6px; border-top: 1px solid var(--mf-line); }
#mf-un-side .mf-ln-item { padding: 10px 14px; }
#mf-un-side .mf-pl-empty { padding: 10px 18px; }

.mf-fh-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.mf-fh-chips::-webkit-scrollbar { display: none; }
.mf-fh-chip { flex-shrink: 0; padding: 6px 12px; border: 1px solid var(--mf-line); border-radius: 16px; background: var(--mf-surface); color: var(--mf-muted); font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.mf-fh-chip small { margin-left: 3px; font-size: 11px; opacity: 0.7; }
.mf-fh-chip.active { border-color: var(--mf-link); background: var(--mf-primary); color: #fff; }

.mf-fh-list, .mf-fh-grid { background: var(--mf-surface); border: 1px solid var(--mf-line); border-radius: 8px; overflow: hidden; }
.mf-fh-row, .mf-fh-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--mf-line);
  background: var(--mf-surface);
  text-align: left;
  cursor: pointer;
}
.mf-fh-row:last-child, .mf-fh-card:last-child { border-bottom: 0; }
.mf-fh-row:hover, .mf-fh-card:hover { background: var(--mf-surface-2); }
.mf-fh-row > i { flex-shrink: 0; font-size: 16px; color: var(--mf-faint); }
.mf-fh-card { align-items: flex-start; }
.mf-fh-card-txt {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--mf-ink);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mf-fh-thumb { position: relative; display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 56px; height: 70px; overflow: hidden; border-radius: 8px; background: var(--mf-surface-3); }
.mf-fh-card .mf-fh-thumb { width: 80px; height: 100px; }
.mf-fh-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mf-fh-nothumb { background: linear-gradient(135deg, var(--mf-primary), var(--mf-primary-2)); }
.mf-fh-nothumb i { color: rgba(255, 255, 255, 0.85); font-size: 20px; }
body.mf-sec-unpage #quran-page .ayah-end.mf-un-has {
  background: radial-gradient(circle closest-side, rgba(var(--mf-primary-rgb), 0.16) 0 86%, var(--mf-primary) 88% 98%, transparent 100%);
  color: var(--mf-link);
  cursor: pointer;
}
#quran-page .quran-word.mf-un-flash { background: rgba(216, 180, 106, 0.3); transition: background 0.4s; }

body.mf-fh-open { overflow: hidden; }
.mf-fh-modal {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(10, 30, 34, 0.6);
}
.mf-fh-mbox {
  width: 100%;
  max-width: 460px;
  max-height: 100%;
  overflow-y: auto;
  padding: 10px 12px 12px;
  border-radius: 14px;
  background: var(--mf-surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.mf-fh-mbox .mf-ln-title small { display: block; font-size: 12px; color: var(--mf-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-fh-mbox .mf-ht-frame { width: min(100%, calc((100dvh - 230px) * 0.8)); }
.mf-fh-credit { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--mf-muted); }
.mf-fh-credit strong { color: var(--mf-ink); }
.mf-fh-credit .ft-instagram { vertical-align: -1px; }
.mf-fh-follow { flex-shrink: 0; padding: 5px 14px; border-radius: 999px; background: #0095f6; color: #fff !important; font-weight: 600; text-decoration: none !important; }
.mf-fh-follow:hover { background: #1877f2; }
.mf-fh-mnav { display: flex; gap: 6px; flex-shrink: 0; }
.mf-fh-mnav .mf-ik-quit { display: flex; align-items: center; justify-content: center; }
.mf-fh-mnav .mf-ik-quit:disabled { opacity: 0.35; cursor: default; }
.mf-fh-mdesc { margin-top: 10px; max-height: 30vh; overflow-y: auto; font-size: 13px; line-height: 1.5; color: var(--mf-ink); white-space: pre-line; }

.mf-ht-frame.is-post { aspect-ratio: auto; max-height: calc(100dvh - 190px); overflow-y: auto; background: #fff; }
.mf-fh-mbox .mf-ht-frame.is-post { width: 100%; }
.mf-ht-frame.is-post iframe { position: static; display: block; width: 100%; height: 520px; }

.mf-user-id { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--mf-line); }
.mf-user-id span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mf-user-id strong { font-size: 15px; color: var(--mf-ink); overflow-wrap: anywhere; }
.mf-user-id small { font-size: 12px; color: var(--mf-muted); }
.mf-user-avatar { flex: 0 0 44px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--mf-surface-2); }
.mf-user-avatar svg { width: 26px; height: 26px; fill: var(--mf-link); }
#mf-user .mf-side-item { width: 100%; }
.mf-lb-me { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 0; }
.mf-lb-me strong { font-size: 30px; line-height: 1.1; color: var(--mf-link); }
.mf-lb-me small { font-size: 13px; color: var(--mf-muted); }
.mf-lb-list { display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; }
.mf-lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--mf-surface-2); font-size: 13px; color: var(--mf-text); }
.mf-lb-row b { flex: 0 0 auto; min-width: 34px; text-align: right; color: var(--mf-ink); }
.mf-lb-rank { flex: 0 0 38px; font-weight: 600; color: var(--mf-muted); }
.mf-lb-bar { flex: 1 1 auto; min-width: 0; height: 6px; border-radius: 3px; background: rgba(var(--mf-primary-rgb), 0.12); overflow: hidden; }
.mf-lb-bar i { display: block; height: 100%; border-radius: 3px; background: rgba(var(--mf-primary-rgb), 0.45); }
.mf-lb-row.me { background: var(--mf-primary); color: #fff; }
.mf-lb-row.me .mf-lb-rank, .mf-lb-row.me b, .mf-lb-you { color: #fff; font-weight: 700; }
.mf-lb-row.me .mf-lb-bar { background: rgba(255, 255, 255, 0.25); }
.mf-lb-row.me .mf-lb-bar i { background: var(--mf-gold); }
.mf-lb-gap { text-align: center; line-height: 1; color: var(--mf-muted); }
.mf-lb-how { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding-top: 8px; }
.mf-lb-how div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; background: var(--mf-surface-2); text-align: center; }
.mf-lb-how strong { font-size: 15px; color: var(--mf-ink); }
.mf-lb-how small { font-size: 10px; line-height: 1.25; color: var(--mf-muted); }

#mf-streak-toast {
  position: fixed;
  top: 56px;
  left: 50%;
  z-index: 1060;
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  max-width: 360px;
  box-sizing: border-box;
  padding: 12px 16px;
  border: 1px solid var(--mf-line);
  border-radius: 14px;
  background: var(--mf-surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -16px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(.2,.8,.2,1);
}
#mf-streak-toast.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0) scale(1); }
.mf-stt-flame { flex: 0 0 46px; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(216, 180, 106, 0.18); }
.mf-stt-flame svg { width: 28px; height: 28px; fill: var(--mf-gold); transform-origin: 50% 90%; }
#mf-streak-toast.show .mf-stt-flame svg { animation: mfFlame 1.1s ease-in-out infinite alternate; }
#mf-streak-toast.done .mf-stt-flame { animation: mfPulse 1s ease-out 1; }
.mf-stt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mf-stt-text strong { font-size: 15px; color: var(--mf-ink); }
.mf-stt-text strong b { display: inline-block; min-width: 1ch; font-size: 20px; color: var(--mf-gold-text); }
#mf-streak-toast.done .mf-stt-text strong b { animation: mfBump 0.4s ease-out 1; }
.mf-stt-text small { font-size: 12px; color: var(--mf-muted); }
.mf-stt-dots { display: flex; gap: 5px; margin-top: 4px; }
.mf-stt-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--mf-line); }
#mf-streak-toast.show .mf-stt-dots i.on { animation: mfDotOn 0.3s ease-out both; animation-delay: calc(var(--i) * 110ms + 300ms); }
#mf-nudge {
  position: fixed;
  top: 56px;
  left: 50%;
  z-index: 1060;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 360px;
  box-sizing: border-box;
  padding: 10px 8px 10px 12px;
  border: 1px solid var(--mf-line);
  border-radius: 14px;
  background: var(--mf-surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -16px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(.2,.8,.2,1);
}
#mf-nudge.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0) scale(1); }
body.mf-reading #mf-nudge { display: none; }
.mf-ng-icon { flex: 0 0 38px; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(var(--mf-primary-rgb), 0.1); color: var(--mf-link); font-size: 18px; }
.mf-ng-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mf-ng-text strong { font-size: 14px; color: var(--mf-ink); }
.mf-ng-text small { font-size: 11.5px; line-height: 1.25; color: var(--mf-muted); }
.mf-ng-go { flex: 0 0 auto; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--mf-primary); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.mf-ng-go:disabled { opacity: 0.6; cursor: default; }
.mf-ng-x { flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 0; background: none; color: var(--mf-faint); font-size: 22px; line-height: 1; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { #mf-nudge { transition: none; } }
#mf-ios-overlay .mf-lessons-body, #mf-man-overlay .mf-lessons-body { max-height: 75vh; overflow-y: auto; }
.mf-ios-lead { margin: 0 0 12px; font-size: 13px; line-height: 1.4; color: var(--mf-muted); }
.mf-ios-steps { counter-reset: mfios; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mf-ios-steps li { counter-increment: mfios; position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 10px 46px; border: 1px solid var(--mf-line); border-radius: 12px; background: var(--mf-surface-2); font-size: 14px; line-height: 1.35; color: var(--mf-ink); }
.mf-ios-steps li::before { content: counter(mfios); position: absolute; left: 12px; top: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--mf-primary); color: #fff; font-size: 13px; font-weight: 700; line-height: 24px; text-align: center; }
.mf-ios-steps small { font-size: 12px; color: var(--mf-muted); }
.mf-ios-steps .mf-ik-btn { align-self: flex-start; margin-top: 4px; }
.mf-ios-ico { width: 20px; height: 20px; vertical-align: -4px; fill: none; stroke: #0a84ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mf-ios-app { width: 22px; height: 22px; vertical-align: -5px; border-radius: 5px; }
.mf-ios-done { width: 100%; margin-top: 14px; }
.mf-dev-wrap { border-top: 1px solid var(--mf-line); }
#mf-dev-overlay .mf-lessons-body { max-height: 70vh; overflow-y: auto; }
.mf-dev-list .mf-dl-choice { padding-top: 8px; padding-bottom: 8px; }
.mf-dev-head { margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mf-faint); }
.mf-dev-head:first-child { margin-top: 0; }
.mf-dev-msg { display: block; margin-top: 8px; font-size: 12px; color: var(--mf-link); }
.mf-dev-msg:empty { display: none; }
@keyframes mfFlame {
  from { transform: scale(1) rotate(-3deg); }
  to   { transform: scale(1.08) rotate(3deg); }
}
@keyframes mfDotOn {
  from { background: var(--mf-line); transform: scale(0.6); }
  60%  { transform: scale(1.3); }
  to   { background: var(--mf-gold); transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #mf-streak-toast { transition: none; }
  #mf-streak-toast .mf-stt-flame, #mf-streak-toast .mf-stt-flame svg, #mf-streak-toast .mf-stt-text strong b { animation: none !important; }
  #mf-streak-toast .mf-stt-dots i.on { animation: none !important; background: var(--mf-gold); }
}

.mf-glass-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 18px 0; cursor: pointer; }
.mf-glass-row span { display: flex; flex-direction: column; min-width: 0; }
.mf-glass-row strong { font-size: 13px; color: var(--mf-ink); }
.mf-glass-row small { font-size: 11px; color: var(--mf-muted); }
.mf-switch {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 40px;
  width: 40px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  background: var(--mf-line);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}
.mf-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.mf-switch:checked { background: var(--mf-primary); }
.mf-switch:checked::after { transform: translateX(18px); }
.mf-switch:focus { outline: none; }
.mf-switch:focus-visible { outline: 2px solid var(--mf-link); outline-offset: 2px; }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-glass="on"] body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
      radial-gradient(60% 45% at 0% 0%, rgba(var(--mf-primary-rgb), 0.16) 0%, transparent 70%),
      radial-gradient(55% 40% at 100% 35%, rgba(216, 180, 106, 0.16) 0%, transparent 70%),
      radial-gradient(70% 45% at 30% 100%, rgba(var(--mf-primary-rgb), 0.12) 0%, transparent 70%);
  }
  html[data-glass="on"] #mf-controller,
  html[data-glass="on"] #mf-bottom-nav,
  html[data-glass="on"] #mf-sidebar,
  html[data-glass="on"] .mf-pop,
  html[data-glass="on"] #mf-nudge,
  html[data-glass="on"] #word-info-card,
  html[data-glass="on"] #mf-ln-stick {
    background: color-mix(in srgb, var(--mf-surface) 70%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    backdrop-filter: blur(18px) saturate(170%);
  }
  html[data-glass="on"] #mf-controller {
    border: 1px solid color-mix(in srgb, #fff 60%, transparent);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(var(--mf-primary-rgb), 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }
  html[data-glass="on"] .mf-ctrl-btn { border-radius: 11px; }
  html[data-glass="on"] #mf-bottom-nav {
    border-top: 1px solid color-mix(in srgb, #fff 55%, transparent);
    box-shadow: 0 -6px 24px rgba(var(--mf-primary-rgb), 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
  html[data-glass="on"] #mf-sidebar {
    border-right: 1px solid color-mix(in srgb, #fff 50%, transparent);
    box-shadow: 8px 0 32px rgba(var(--mf-primary-rgb), 0.18);
  }
  html[data-glass="on"] .mf-pop {
    border: 1px solid color-mix(in srgb, #fff 55%, transparent);
    border-bottom: 0;
    box-shadow: 0 -10px 34px rgba(var(--mf-primary-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }
  html[data-glass="on"] #mf-sheet {
    background: color-mix(in srgb, var(--sh-bg) 80%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
  html[data-glass="on"] #mf-nudge {
    border: 1px solid color-mix(in srgb, #fff 60%, transparent);
    box-shadow: 0 10px 30px rgba(var(--mf-primary-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }
  html[data-glass="on"] #word-info-card { border-radius: 10px; }
  html[data-glass="on"][data-theme="night"] #mf-controller,
  html[data-glass="on"][data-theme="night"] #mf-bottom-nav,
  html[data-glass="on"][data-theme="night"] #mf-sidebar,
  html[data-glass="on"][data-theme="night"] .mf-pop,
  html[data-glass="on"][data-theme="night"] #mf-nudge {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}
.mf-ahkaam { margin-top: 10px; padding: 10px; background: var(--mf-paper); border: 1px solid var(--mf-paper-line); border-radius: 8px; }
#quran-page .quran-word.mf-hk { background: rgba(46, 140, 60, 0.18); background: color-mix(in srgb, var(--mf-hk, rgb(46, 140, 60)) 20%, transparent); border-radius: 3px; }
.mf-ahk-head { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 30px; padding: 0 2px; border: 0; background: transparent; font-size: 13px; font-weight: 700; }
.mf-ahk-head i { font-size: 16px; transition: transform .2s; }
.mf-ahkaam.mf-collapsed .mf-ahk-head i { transform: rotate(-90deg); }
.mf-ahkaam:not(.mf-collapsed) .mf-ahk-head { margin-bottom: 6px; }
.mf-ahkaam.mf-collapsed .mf-ahk-body { display: none; }
.mf-hk-video { margin-top: 8px; font-family: 'mfArabicUI', system-ui, 'Segoe UI', 'Noto Sans Arabic', Tahoma, sans-serif; color: var(--mf-ink); }
.mf-hk-know { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px 8px 8px; border: 1px solid color-mix(in srgb, var(--mf-hk, rgb(46, 140, 60)) 40%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--mf-hk, rgb(46, 140, 60)) 9%, var(--mf-paper)); color: inherit; text-decoration: none; transition: background .15s; }
.mf-hk-know:hover, .mf-hk-know:focus-visible { background: color-mix(in srgb, var(--mf-hk, rgb(46, 140, 60)) 16%, var(--mf-paper)); color: inherit; text-decoration: none; }
.mf-hk-know:focus-visible, .mf-hk-close:focus-visible { outline: 2px solid var(--mf-hk, rgb(46, 140, 60)); outline-offset: 2px; }
.mf-hk-play { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--mf-hk, rgb(46, 140, 60)); color: #fff; font-size: 16px; }
.mf-hk-play i { margin-left: 2px; }
.mf-hk-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mf-hk-lbl { font-size: 12px; opacity: .7; }
.mf-hk-name { display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 15px; }
.mf-hk-name .ar { font-size: 17px; }
.mf-hk-bar { display: flex; align-items: center; gap: 8px; padding: 0 2px 6px; }
.mf-hk-bar .mf-tjk-dot { background: var(--mf-hk, rgb(46, 140, 60)); }
.mf-hk-bar .mf-hk-name { flex: 1; min-width: 0; }
.mf-hk-close { display: grid; place-items: center; width: 36px; height: 36px; margin: -4px -6px -4px 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 18px; cursor: pointer; }
.mf-hk-close:hover { background: color-mix(in srgb, var(--mf-ink) 8%, transparent); }
.mf-hk-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.mf-hk-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#quran-page.mf-khazain .quran-word.mf-hk { outline: 2px dotted #000; outline-offset: -1px; }
.mf-tjk-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; }
.mf-tjk-dot.none { background: transparent; border: 1.5px solid var(--mf-line); }
.mf-ahkaam button { font-family: 'mfArabicUI', system-ui, 'Segoe UI', 'Noto Sans Arabic', Tahoma, sans-serif; color: var(--mf-ink); cursor: pointer; }
.mf-ahkaam small { font-size: 11px; font-weight: 700; opacity: 0.6; }
.mf-ahkaam .active { background: rgba(46, 140, 60, 0.22) !important; border-color: rgb(46, 140, 60) !important; }
.mf-ahkaam .active { background: color-mix(in srgb, var(--mf-hk, rgb(46, 140, 60)) 20%, transparent) !important; border-color: var(--mf-hk, rgb(46, 140, 60)) !important; }
.mf-tjk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mf-tjk-chip { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; min-height: 30px; padding: 2px 11px; border: 1px solid var(--mf-line); border-radius: 999px; background: transparent; font-size: 14px; font-weight: 600; white-space: nowrap; }
.mf-tjk-sep { height: 1px; margin: 8px 0; background: var(--mf-paper-line); }
.mf-tjk-a-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mf-tjk-a-row { display: grid; grid-template-columns: 10px 1fr auto; grid-template-rows: auto auto; column-gap: 7px; align-items: center; min-height: 30px; padding: 4px 9px; border: 1px solid var(--mf-line); border-radius: 8px; background: transparent; text-align: start; }
.mf-tjk-a-row .mf-tjk-dot { grid-row: 1 / 3; }
.mf-tjk-a-row .ar { font-size: 14px; font-weight: 600; line-height: 1.3; text-align: start; }
.mf-tjk-a-row .en { grid-column: 2; font-size: 11px; line-height: 1.2; color: var(--mf-text); }
.mf-tjk-a-row small { grid-column: 3; grid-row: 1 / 3; }
.mf-tjk-key { font-family: 'mfArabicUI', system-ui, 'Segoe UI', 'Noto Sans Arabic', Tahoma, sans-serif; color: var(--mf-ink); cursor: default; }
.driver-popover *, .tooltip, .popover { font-family: 'mfArabicUI', Helvetica, Arial, sans-serif; }
