/* Visual Fikr — المصحف المعلّم والتسميع (v32) */
.mu { position: fixed; inset: 0; z-index: 15; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: radial-gradient(120% 50% at 50% -10%, var(--bg2), var(--bg) 60%), var(--bg); color: var(--ink); font-family: inherit; }
.mu[hidden] { display: none; }
html.mu-open, html.mu-open body { overflow: hidden; }
html.mu-open .tabs, html.mu-open .player { visibility: hidden; }
.mu-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 14px 10px;
  background: linear-gradient(135deg, var(--deep), var(--em) 60%, var(--em3)); color: #fff; box-shadow: 0 6px 18px rgba(4,32,26,.25); border-bottom: 2px solid var(--gold); }
.mu-ic { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(227,199,125,.5); background: rgba(255,255,255,.08); color: var(--gold2); display: grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.mu-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mu-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mu-tt b { font-size: 18px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-tt small { font-size: 12px; color: var(--gold2); font-weight: 700; }
.mu-med { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: var(--deep);
  background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold2) 45%, var(--gold) 70%, var(--goldd)); box-shadow: inset 0 -2px 4px rgba(0,0,0,.25), 0 2px 6px rgba(0,0,0,.25); }
.mu-body { max-width: 640px; margin: 0 auto; padding: 14px 14px calc(env(safe-area-inset-bottom) + 40px); }
.mu-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin: 0 0 12px; box-shadow: 0 4px 16px rgba(11,74,58,.08); }
.mu-intro h2 { margin: 0 0 8px; font-size: 17px; color: var(--em); }
[data-theme="night"] .mu-intro h2 { color: var(--gold2); }
.mu-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mu-how li { display: grid; gap: 2px; padding: 8px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(201,162,74,.12), transparent); border-inline-start: 3px solid var(--gold); }
.mu-how b { color: var(--em); font-size: 15px; } [data-theme="night"] .mu-how b { color: var(--gold2); }
.mu-how span { font-size: 13px; color: var(--mut); line-height: 1.7; }
.mu-search input { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); margin: 0 0 10px; }
.mu-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg2); padding: 4px; border-radius: 14px; margin: 0 0 10px; }
.mu-seg button { font: inherit; font-weight: 700; font-size: 14px; border: 0; padding: 9px; border-radius: 11px; background: transparent; color: var(--mut); cursor: pointer; }
.mu-seg button.on { background: var(--em); color: #fff; box-shadow: inset 0 -2px 0 var(--gold); }
.mu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mu-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.mu-list a:active { transform: scale(.99); }
.mu-n { width: 38px; height: 38px; flex: none; display: grid; place-items: center; font-weight: 800; color: var(--deep); font-size: 14px;
  background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold2) 50%, var(--gold)); clip-path: polygon(50% 0, 64% 14%, 85% 15%, 86% 36%, 100% 50%, 86% 64%, 85% 85%, 64% 86%, 50% 100%, 36% 86%, 15% 85%, 14% 64%, 0 50%, 14% 36%, 15% 15%, 36% 14%); }
.mu-st { flex: 1; display: flex; flex-direction: column; min-width: 0; } .mu-st b { font-size: 16px; color: var(--em); } [data-theme="night"] .mu-st b { color: var(--gold2); }
.mu-st small { color: var(--mut); font-size: 12px; }
.mu-dots { display: flex; gap: 3px; } .mu-dots i { width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: 11px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--mut); }
.mu-dots i.on { background: var(--em); color: var(--gold2); border-color: var(--gold); }
.mu-empty { text-align: center; color: var(--mut); padding: 20px; }
.mu-load, .mu-err { text-align: center; color: var(--mut); padding: 40px 10px; }
/* الخطوات */
.mu-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 12px; position: sticky; top: calc(env(safe-area-inset-top) + 64px); z-index: 2; background: var(--bg); padding: 4px 0; }
.mu-steps a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 14px; text-decoration: none; color: var(--mut); background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 13px; text-align: center; }
.mu-steps a i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; border: 1.5px solid var(--gold); color: var(--goldd); }
.mu-steps a.on { background: linear-gradient(160deg, var(--em3), var(--em) 60%, var(--deep)); color: #fff; border-color: var(--gold); box-shadow: 0 6px 14px rgba(11,74,58,.3), inset 0 -3px 0 var(--gold); }
.mu-steps a.on i { background: var(--gold2); color: var(--deep); border-color: #fff3c4; }
.mu-steps a.done:not(.on) i { background: var(--em); color: var(--gold2); }
/* القرّاء والخيارات */
.mu-rc { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 10px; }
.mu-rc button { font: inherit; text-align: start; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.mu-rc button b { font-size: 14.5px; color: var(--em); } [data-theme="night"] .mu-rc button b { color: var(--gold2); }
.mu-rc button small { font-size: 12px; color: var(--mut); line-height: 1.6; }
.mu-rc button.on { border-color: var(--gold); background: linear-gradient(160deg, rgba(201,162,74,.18), rgba(11,74,58,.06)); box-shadow: 0 0 0 3px rgba(201,162,74,.2); }
.mu-opts, .mu-range { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; font-size: 14px; margin: 4px 0; }
.mu-opts select, .mu-range select { font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); margin-inline-start: 6px; }
.mu-sw { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; margin: 6px 0; line-height: 1.6; }
.mu-sw input { width: 20px; height: 20px; accent-color: var(--em); flex: none; }
.mu-note, .mu-honest { font-size: 12.5px; color: var(--mut); line-height: 1.8; margin: 8px 0 0; }
.mu-honest { background: rgba(201,162,74,.1); border-radius: 12px; padding: 10px 12px; border-inline-start: 3px solid var(--gold); }
/* الأزرار */
.mu-ctl { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.mu-btn { font: inherit; font-weight: 800; font-size: 15px; padding: 11px 20px; border-radius: 999px; border: 0; cursor: pointer; color: #fff;
  background: linear-gradient(160deg, var(--em3), var(--em) 55%, var(--deep)); box-shadow: 0 6px 14px rgba(11,74,58,.3), inset 0 -3px 0 var(--goldd), inset 0 1px 0 rgba(255,255,255,.2); min-height: 44px; }
.mu-btn.on { background: linear-gradient(160deg, var(--gold2), var(--gold) 60%, var(--goldd)); color: var(--deep); box-shadow: 0 6px 14px rgba(163,127,44,.35), inset 0 -3px 0 rgba(0,0,0,.15); }
.mu-btn.ghost { background: var(--card); color: var(--em); border: 1px solid var(--line); box-shadow: none; font-weight: 700; padding: 9px 14px; }
[data-theme="night"] .mu-btn.ghost { color: var(--gold2); }
.mu-btn:disabled { opacity: .4; cursor: default; }
.mu-ctl.sm .mu-btn { font-size: 13.5px; min-height: 40px; }
.mu-btn.mic { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; padding: 14px 26px; }
.mu-mi { width: 22px; height: 22px; border-radius: 11px 11px 11px 11px / 13px 13px 9px 9px; border: 3px solid currentColor; box-sizing: border-box; position: relative; }
.mu-btn.mic.on .mu-mi { animation: mu-pulse 1s ease-in-out infinite; }
@keyframes mu-pulse { 50% { transform: scale(1.25); } }
.mu-stat { text-align: center; font-size: 14px; color: var(--mut); min-height: 1.6em; margin: 4px 0 10px; line-height: 1.7; }
.mu-stat.ok { color: var(--em); font-weight: 700; } [data-theme="night"] .mu-stat.ok { color: var(--gold2); }
.mu-stat.bad { color: #a8322d; font-weight: 700; } [data-theme="night"] .mu-stat.bad { color: #ff9c8f; }
.mu-stat.rec { color: var(--goldd); font-weight: 700; }
/* النص */
.mu-text { font-family: 'Amiri Quran', 'Amiri', serif; font-size: var(--mu-fs, 25px); line-height: 2.25; text-align: justify; text-align-last: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 16px 16px 20px; box-shadow: inset 0 0 0 4px rgba(201,162,74,.08); }
.mu-text.tap .mu-ay { cursor: pointer; }
.mu-bsm { text-align: center; margin: 0 0 6px; color: var(--em); font-family: 'Amiri Quran', 'Amiri', serif; font-size: 1em; } [data-theme="night"] .mu-bsm { color: var(--gold2); }
.mu-ay { border-radius: 10px; transition: background .25s, box-shadow .25s; padding: 0 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mu-ay.on, .mu-bsm.on { background: linear-gradient(180deg, rgba(227,199,125,.35), rgba(201,162,74,.22)); box-shadow: 0 0 0 2px rgba(201,162,74,.35); }
.mu-num { color: var(--goldd); font-size: .8em; white-space: nowrap; } [data-theme="night"] .mu-num { color: var(--gold); }
.mu-text .w.hit { color: var(--em); text-shadow: 0 0 1px rgba(201,162,74,.6); } [data-theme="night"] .mu-text .w.hit { color: var(--gold2); }
.mu-ring { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 14px); margin: 12px auto 0; width: min(320px, 90%); border-radius: 999px; background: var(--deep); color: var(--gold2); overflow: hidden; text-align: center; padding: 10px; font-weight: 800; box-shadow: 0 8px 22px rgba(0,0,0,.25); position: sticky; }
.mu-ring i { position: absolute; inset: 0 auto 0 0; background: rgba(201,162,74,.35); width: 100%; }
.mu-ring b { position: relative; }
/* التسميع */
.mu-score { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.mu-sc { text-align: center; padding: 10px 6px; border-radius: 16px; background: linear-gradient(160deg, var(--em3), var(--em) 60%, var(--deep)); color: #fff; box-shadow: inset 0 -3px 0 var(--gold); }
.mu-sc b { display: block; font-size: 22px; color: var(--gold2); } .mu-sc small { font-size: 12px; opacity: .9; }
.mu-pips { grid-column: 1 / -1; list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.mu-pips button { font: inherit; font-size: 12px; min-width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--mut); cursor: pointer; }
.mu-pips button.ok { background: var(--em); color: var(--gold2); border-color: var(--gold); }
.mu-pips button.bad { background: #fbe7e3; color: #a8322d; border-color: #e9b4ab; }
.mu-pips button.cur { outline: 2.5px solid var(--gold); outline-offset: 1px; }
.mu-vh { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; } .mu-vh b { color: var(--em); } [data-theme="night"] .mu-vh b { color: var(--gold2); }
.mu-vh span { font-weight: 800; font-size: 15px; } .mu-vh span.ok { color: var(--em); } .mu-vh span.bad { color: #a8322d; }
.mu-vbox { font-family: 'Amiri Quran', 'Amiri', serif; font-size: var(--mu-fs, 27px); line-height: 2.5; text-align: center; padding: 10px 4px; min-height: 120px; border-radius: 14px;
  background: repeating-linear-gradient(0deg, transparent 0 calc(2.5em - 1px), rgba(201,162,74,.18) calc(2.5em - 1px) 2.5em), var(--bg); }
.mu-vbox .w { display: inline-block; border-radius: 10px; padding: 0 4px; transition: color .35s, background .35s, transform .35s; position: relative; }
.mu-vbox .w.hid, .mu-vbox .w.bad:not(.rev) { color: transparent; background: rgba(201,162,74,.2); box-shadow: inset 0 -3px 0 rgba(201,162,74,.45); user-select: none; }
.mu-vbox .w.hid[data-h]::before { content: attr(data-h); position: absolute; inset: 0; color: rgba(163,127,44,.75); font-size: .8em; display: grid; place-items: center; }
.mu-vbox .w.ok { color: var(--goldd); text-shadow: 0 1px 0 rgba(255,243,196,.8), 0 0 10px rgba(201,162,74,.35); animation: mu-pop .45s ease-out; }
[data-theme="night"] .mu-vbox .w.ok { color: var(--gold2); text-shadow: 0 0 12px rgba(227,199,125,.45); }
.mu-vbox .w.bad { background: rgba(200,60,50,.14); box-shadow: inset 0 -3px 0 #c8473a; }
.mu-vbox .w.bad::after { content: '✕'; position: absolute; top: -.55em; inset-inline-end: -.3em; font: 800 11px/18px Tajawal, sans-serif; width: 18px; height: 18px; border-radius: 50%; background: #c8473a; color: #fff; text-align: center; }
.mu-vbox .w.bad.rev { color: #a8322d; } [data-theme="night"] .mu-vbox .w.bad.rev { color: #ff9c8f; }
.mu-vbox .w.say { animation: mu-say 1.2s ease-in-out infinite; }
.mu-vbox .w.peek { color: var(--mut); }
@keyframes mu-pop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: none; opacity: 1; } }
@keyframes mu-say { 50% { background: rgba(227,199,125,.45); } }
.mu-heard { font-size: 13px; color: var(--mut); background: var(--bg2); border-radius: 10px; padding: 6px 10px; margin: 8px 0 0; line-height: 1.8; }
/* بطاقة الدخول */
.mu-entry { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; background: linear-gradient(135deg, var(--deep), var(--em) 55%, var(--em3)) !important; border: 1.5px solid var(--gold) !important; }
.mu-e-ic { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 24px; color: var(--deep); background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold2) 45%, var(--gold) 70%, var(--goldd)); box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.mu-e-t { flex: 1; display: flex; flex-direction: column; gap: 2px; } .mu-e-t b { color: #fff; font-size: 16.5px; } .mu-e-t small { color: var(--gold2); font-size: 12.5px; line-height: 1.6; }
.mu-e-go { color: var(--gold2); font-size: 26px; }
/* نافذة إذن الميكروفون */
.mu-ask { position: fixed; inset: 0; z-index: 25; display: flex; align-items: flex-end; justify-content: center; background: rgba(4,20,17,.6); }
.mu-ask-c { background: var(--card); width: min(520px, 100%); border-radius: 22px 22px 0 0; padding: 20px 18px calc(env(safe-area-inset-bottom) + 18px); text-align: center; border-top: 3px solid var(--gold); }
.mu-ask-i { font-size: 34px; } .mu-ask-c h3 { margin: 6px 0; color: var(--em); } [data-theme="night"] .mu-ask-c h3 { color: var(--gold2); }
.mu-ask-c p { font-size: 14.5px; line-height: 1.8; margin: 6px 0; } .mu-ask-s { color: var(--mut); font-size: 13px !important; }
.mu-conf { position: fixed; inset: 0; pointer-events: none; z-index: 26; overflow: hidden; }
.mu-conf i { position: absolute; top: -20px; width: 10px; height: 14px; background: var(--gold2); border-radius: 2px; animation: mu-fall 2.4s ease-in forwards; }
.mu-conf i:nth-child(odd) { background: var(--em3); }
.mu-conf i:nth-child(1) { left: 5%; } .mu-conf i:nth-child(2) { left: 12%; animation-delay: .2s; } .mu-conf i:nth-child(3) { left: 20%; animation-delay: .1s; } .mu-conf i:nth-child(4) { left: 28%; animation-delay: .35s; }
.mu-conf i:nth-child(5) { left: 36%; } .mu-conf i:nth-child(6) { left: 44%; animation-delay: .25s; } .mu-conf i:nth-child(7) { left: 52%; animation-delay: .05s; } .mu-conf i:nth-child(8) { left: 60%; animation-delay: .3s; }
.mu-conf i:nth-child(9) { left: 68%; animation-delay: .15s; } .mu-conf i:nth-child(10) { left: 76%; } .mu-conf i:nth-child(11) { left: 84%; animation-delay: .4s; } .mu-conf i:nth-child(12) { left: 92%; animation-delay: .2s; }
.mu-conf i:nth-child(13) { left: 16%; animation-delay: .5s; } .mu-conf i:nth-child(14) { left: 40%; animation-delay: .45s; } .mu-conf i:nth-child(15) { left: 64%; animation-delay: .55s; } .mu-conf i:nth-child(16) { left: 88%; animation-delay: .6s; } .mu-conf i:nth-child(17) { left: 72%; animation-delay: .65s; }
@keyframes mu-fall { to { transform: translateY(110vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .mu-vbox .w.ok, .mu-vbox .w.say, .mu-btn.mic.on .mu-mi, .mu-conf i { animation: none; } }
@media (min-width: 700px) { .mu-text { font-size: 28px; } .mu-vbox { font-size: 31px; } }
