/* نور v28.6 — تنسيقات حِفظ القرآن (كل الأسماء بادئة بـ hf- فلا تتعارض مع أي ملف آخر)
   خفيفة عمدًا: بلا backdrop-filter ولا will-change ولا حركات متواصلة (تفاديًا للّاج الذي أُصلح في v28.5). */
.hf-wrap{--hf-gold:#f0cf7a;--hf-gold2:#d4ab4a;--hf-em:#3fd5a8;--hf-fs:27px;padding-bottom:18px}
.hf-i{flex:none;vertical-align:middle}
.hf-wrap button{font-family:inherit;-webkit-tap-highlight-color:transparent}
.hf-wrap button:disabled{opacity:.5}

/* ---------- الشريط العلوي ---------- */
.hf-bar{display:flex;align-items:center;gap:12px;padding:6px 2px 14px}
.hf-back{width:42px;height:42px;flex:none;border-radius:14px;border:1px solid var(--line);background:var(--card);color:var(--text);display:grid;place-items:center}
.hf-bar-t h1{margin:0;font-size:24px;font-weight:800;line-height:1.2}
.hf-bar-t small{display:block;margin-top:3px;font-size:11.5px;color:var(--muted)}

/* ---------- البطاقة الرئيسية ---------- */
.hf-hero{display:flex;align-items:center;gap:16px;padding:18px;border-radius:26px;margin:0 0 12px;color:#e8f3ee;
 background:linear-gradient(155deg,#0f3d33,#082a23 72%);border:1px solid color-mix(in srgb,var(--hf-gold) 28%,transparent);box-shadow:0 14px 30px -16px rgba(0,0,0,.6)}
.hf-ring{position:relative;flex:none;display:grid;place-items:center}
.hf-ring-c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15}
.hf-ring-c b{font-size:20px;font-weight:800;color:var(--hf-gold)}
.hf-ring-c small{font-size:10.5px;color:#a9c9bd}
.hf-hero-tx{min-width:0;flex:1}
.hf-big{font-size:30px;font-weight:900;color:#fff;line-height:1.1}
.hf-big small{font-size:12px;font-weight:600;color:#a9c9bd}
.hf-sub{margin-top:4px;font-size:12.5px;color:#b9d7cb}
.hf-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.hf-chips span{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:99px;font-size:11px;font-weight:700;color:var(--hf-gold);background:rgba(240,207,122,.1);border:1px solid rgba(240,207,122,.25)}

/* ---------- بطاقات عامة ---------- */
.hf-card{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:15px;margin:0 0 12px;box-shadow:var(--shadow)}
.hf-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.hf-h{font-size:14px;font-weight:800;margin-bottom:9px}
.hf-row .hf-h{margin-bottom:3px}
.hf-muted{font-size:12px;color:var(--muted);line-height:1.7}
.hf-pct{font-size:20px;font-weight:900;color:var(--hf-gold)}
.hf-sec{margin:18px 2px 9px;font-size:14px;font-weight:800;color:var(--hf-gold)}
.hf-tip{margin:14px 4px 4px;font-size:11px;line-height:1.8;color:var(--muted);text-align:center}
.hf-pbar{display:block;height:8px;border-radius:99px;background:color-mix(in srgb,var(--line) 85%,transparent);overflow:hidden;margin:11px 0 6px}
.hf-pbar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--hf-em),var(--hf-gold))}
.hf-pbar.s{height:5px;margin:7px 0 0}

/* ---------- الأزرار ---------- */
.hf-btn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;margin-top:10px;padding:12px 14px;border:0;border-radius:18px;font-weight:800;font-size:14px;color:#2a1d05;text-align:start;
 background:linear-gradient(150deg,#f6e2a0,#d4ab4a 60%,#b78a2c);box-shadow:0 12px 22px -12px rgba(214,170,70,.7),inset 0 1px 0 rgba(255,255,255,.5);transition:transform .15s}
.hf-btn:active{transform:scale(.98)}
.hf-btn.sec{color:var(--hf-gold);background:rgba(240,207,122,.07);border:1px solid rgba(240,207,122,.3);box-shadow:none}
.hf-btn.sm{padding:10px 12px;font-size:13px;border-radius:15px}
.hf-btn.danger{color:var(--danger);border-color:color-mix(in srgb,var(--danger) 45%,transparent);background:color-mix(in srgb,var(--danger) 8%,transparent)}
.hf-btn.go{margin:12px 0 0}
.hf-bic{width:36px;height:36px;border-radius:12px;flex:none;display:grid;place-items:center;background:rgba(40,28,6,.16)}
.hf-btn.sec .hf-bic{background:rgba(240,207,122,.12)}
.hf-btx{display:flex;flex-direction:column;min-width:0;flex:1}
.hf-btx b{font-size:14.5px;font-weight:800}
.hf-btx small{font-size:11.5px;font-weight:600;opacity:.78;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hf-badge{min-width:26px;height:26px;padding:0 8px;border-radius:99px;display:grid;place-items:center;font-size:12px;font-weight:900;color:#2a1d05;background:var(--hf-gold);flex:none}
.hf-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hf-two .hf-btn{margin-top:10px}
.hf-stack .hf-btn{margin-top:10px}
.hf-link{display:block;margin:14px auto 0;border:0;background:none;color:var(--muted);font-size:12px;text-decoration:underline}
.hf-resume{display:flex;align-items:center;gap:11px;width:100%;margin:0 0 12px;padding:11px 13px;border:1px solid rgba(240,207,122,.35);border-radius:19px;color:var(--text);background:rgba(240,207,122,.08);text-align:start}
.hf-ric{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;color:#2a1d05;background:linear-gradient(150deg,#f6e2a0,#d4ab4a);flex:none}
.hf-rtx{display:flex;flex-direction:column;flex:1;min-width:0}.hf-rtx b{font-size:14px}.hf-rtx small{font-size:11.5px;color:var(--muted)}

/* ---------- الشبكة والقوائم ---------- */
.hf-grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 4px}
.hf-tile{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:14px;border-radius:20px;border:1px solid var(--line);background:var(--card);color:var(--text);text-align:start;box-shadow:var(--shadow)}
.hf-tile .hf-i{color:var(--hf-gold);margin-bottom:5px}
.hf-tile b{font-size:14px}.hf-tile small{font-size:11px;color:var(--muted)}
.hf-tile:active,.hf-srow:active{transform:scale(.985)}
.hf-list{display:flex;flex-direction:column;gap:8px}
.hf-urow{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:18px;background:var(--card);border:1px solid var(--line)}
.hf-un{width:38px;height:38px;border-radius:12px;flex:none;display:grid;place-items:center;font-size:13px;font-weight:800;color:var(--hf-gold);background:rgba(240,207,122,.08);border:1px solid rgba(240,207,122,.25)}
.hf-ut{flex:1;min-width:0;display:flex;flex-direction:column}.hf-ut b{font-size:15px}.hf-ut small{font-size:11px;color:var(--muted)}
.hf-due{font-size:11px;font-weight:700;color:var(--muted);white-space:nowrap}.hf-due.now{color:var(--hf-gold)}
.hf-empty{display:flex;flex-direction:column;align-items:center;gap:7px;padding:24px 18px;margin:10px 0;text-align:center;border:1px dashed color-mix(in srgb,var(--hf-gold) 35%,var(--line));border-radius:22px;color:var(--muted);font-size:12.5px;line-height:1.8}
.hf-empty b{color:var(--text);font-size:15px}.hf-empty .hf-i{color:var(--hf-gold)}
.hf-empty.big{padding:34px 18px}
.hf-empty .hf-btn{width:auto;min-width:170px}

/* ---------- اختيار السورة ---------- */
.hf-search{position:relative;margin:0 0 10px}
.hf-search .pi{position:absolute;inset-inline-start:16px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.hf-search .search{margin:0;padding:14px 16px;padding-inline-start:46px;border-radius:18px}
.hf-seg{display:flex;gap:6px;padding:4px;margin:0 0 12px;border-radius:16px;background:color-mix(in srgb,var(--card) 90%,#000 10%);border:1px solid var(--line)}
.hf-card .hf-seg{margin:0}
.hf-seg button{flex:1;padding:9px 4px;border:0;border-radius:12px;background:none;color:var(--muted);font-size:12px;font-weight:700}
.hf-seg button.on{color:#2a1d05;background:linear-gradient(150deg,#f6e2a0,#d4ab4a)}
.hf-srow{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;border-radius:18px;border:1px solid var(--line);background:var(--card);color:var(--text);text-align:start}
.hf-st{flex:1;min-width:0;display:flex;flex-direction:column}
.hf-st b{font-family:"Amiri","Noto Naskh Arabic",serif;font-size:20px;font-weight:700;line-height:1.3}
.hf-st small{font-size:11px;color:var(--muted)}
.hf-done{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;color:#06281f;background:var(--hf-em);flex:none}

/* ---------- إعداد الجلسة ---------- */
.hf-map{display:flex;gap:2px;height:14px;border-radius:7px;overflow:hidden}
.hf-map i{display:block;background:color-mix(in srgb,var(--line) 90%,transparent)}
.hf-map i.on{background:linear-gradient(180deg,var(--hf-em),#1fa883)}
.hf-legend{display:flex;gap:14px;margin-top:9px;font-size:11px;color:var(--muted)}
.hf-legend span{display:inline-flex;align-items:center;gap:6px}
.hf-legend i{width:10px;height:10px;border-radius:3px;background:color-mix(in srgb,var(--line) 90%,transparent)}
.hf-legend i.on,.hf-legend i.n{background:var(--hf-em)}.hf-legend i.r{background:var(--hf-gold)}
.hf-range{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hf-fld label{display:block;margin-bottom:6px;font-size:11.5px;color:var(--muted)}
.hf-step{display:flex;align-items:center;border:1px solid var(--line);border-radius:15px;overflow:hidden;background:var(--bg)}
.hf-step button{width:40px;height:44px;border:0;background:color-mix(in srgb,var(--hf-gold) 10%,transparent);color:var(--hf-gold);font-size:20px;font-weight:800}
.hf-step input{flex:1;min-width:0;width:100%;height:44px;border:0;background:none;color:var(--text);text-align:center;font-size:17px;font-weight:800;font-family:inherit;outline:none;-moz-appearance:textfield}
.hf-step input::-webkit-outer-spin-button,.hf-step input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.hf-chiprow{display:flex;flex-wrap:wrap;gap:8px;margin-top:11px}.hf-chiprow.c{justify-content:center}
.hf-h+.hf-chiprow{margin-top:0}
.hf-chip{padding:8px 13px;border-radius:99px;border:1px solid var(--line);background:var(--bg);color:var(--text);font-size:12.5px;font-weight:700}
.hf-chip.on{color:#2a1d05;border-color:transparent;background:linear-gradient(150deg,#f6e2a0,#d4ab4a)}
.hf-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin-top:12px;padding:10px 2px 0;border:0;border-top:1px solid var(--line);background:none;color:var(--text);text-align:start}
.hf-toggle span:first-child{display:flex;flex-direction:column}.hf-toggle b{font-size:13.5px}.hf-toggle small{font-size:11px;color:var(--muted)}
.hf-sel{width:100%;padding:13px;border-radius:15px;border:1px solid var(--line);background:var(--bg);color:var(--text);font-family:inherit;font-size:14px}

/* ---------- الجلسة ---------- */
.hf-stop{display:flex;align-items:center;gap:10px;padding:4px 0 12px}
.hf-x{display:inline-flex;align-items:center;gap:4px;padding:8px 11px;border-radius:13px;border:1px solid var(--line);background:var(--card);color:var(--muted);font-size:12px;font-weight:700}
.hf-prog{flex:1;height:8px;border-radius:99px;background:color-mix(in srgb,var(--line) 85%,transparent);overflow:hidden}
.hf-prog i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--hf-em),var(--hf-gold));transition:width .3s}
.hf-cnt{font-size:12px;font-weight:800;color:var(--hf-gold);min-width:42px;text-align:end}
.hf-sess-t{text-align:center;margin:2px 0 10px}.hf-sess-t small{display:block;font-size:11.5px;color:var(--muted)}.hf-sess-t b{font-size:18px;font-weight:800}
.hf-phases{display:flex;justify-content:center;gap:8px;margin:0 0 12px;flex-wrap:wrap}
.hf-phases span{display:inline-flex;align-items:center;gap:6px;padding:5px 12px 5px 10px;border-radius:99px;font-size:11.5px;font-weight:700;color:var(--muted);border:1px solid var(--line)}
.hf-phases i{width:18px;height:18px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:10.5px;background:var(--line);color:var(--text)}
.hf-phases span.on{color:#2a1d05;border-color:transparent;background:linear-gradient(150deg,#f6e2a0,#d4ab4a)}.hf-phases span.on i{background:rgba(40,28,6,.2);color:#2a1d05}

.hf-text{padding:18px 16px;margin:0 0 10px;border-radius:24px;direction:rtl;text-align:center;
 font-family:var(--ayah-font,"Amiri","Noto Naskh Arabic",serif);font-size:var(--hf-fs);line-height:2.15;
 color:var(--ayah-fg,var(--text));background:var(--ayah-bg,var(--card));border:1px solid var(--ayah-border,var(--line));box-shadow:var(--shadow)}
.hf-ay{margin:2px 0}
.hf-qlabel{margin:8px 0 2px;font-family:Tajawal,system-ui,sans-serif;font-size:11.5px;color:var(--muted)}
.hf-w{display:inline-block;border-radius:8px;padding:0 3px;transition:background .2s,color .2s}
.hf-w.hid{color:transparent;text-shadow:none;background:color-mix(in srgb,var(--hf-gold) 16%,transparent);box-shadow:inset 0 -2px 0 color-mix(in srgb,var(--hf-gold) 55%,transparent);cursor:pointer;user-select:none;-webkit-user-select:none}
.hf-w.ok{color:#58d9a8;background:rgba(63,213,168,.1)}
.hf-w.miss{color:#ff9f9f;background:rgba(255,120,120,.12)}
.hf-num{display:inline-grid;place-items:center;width:1.25em;height:1.25em;margin-inline-start:2px;border-radius:50%;font-family:Tajawal,system-ui,sans-serif;font-size:.5em;font-weight:800;vertical-align:middle;color:var(--hf-gold);border:1px solid color-mix(in srgb,var(--hf-gold) 55%,transparent)}
.hf-num i{font-style:normal}
#hfCtl,.hf-sticky{position:sticky;bottom:calc(88px + env(safe-area-inset-bottom,0px));z-index:3;padding:8px 0 6px;background:linear-gradient(0deg,var(--bg) 72%,transparent)}
.hf-hintline{min-height:20px;margin:0 6px 10px;text-align:center;font-size:12.5px;line-height:1.8;color:var(--muted)}
.hf-dots{display:flex;justify-content:center;flex-wrap:wrap;gap:7px;margin:2px 0 14px}
.hf-dots i{width:11px;height:11px;border-radius:50%;background:var(--line)}.hf-dots i.on{background:var(--hf-em);box-shadow:0 0 8px rgba(63,213,168,.5)}
.hf-ctl{display:flex;align-items:center;justify-content:center;gap:22px;margin:0 0 12px}
.hf-cb{width:50px;height:50px;border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--text);display:grid;place-items:center}
.hf-play{width:78px;height:78px;border-radius:50%;border:0;display:grid;place-items:center;color:#2a1d05;background:linear-gradient(150deg,#f6e2a0,#d4ab4a 60%,#b78a2c);box-shadow:0 14px 26px -10px rgba(214,170,70,.75),inset 0 1px 0 rgba(255,255,255,.55)}
.hf-play:active{transform:scale(.96)}

/* ---------- التقييم والنتائج ---------- */
.hf-grades{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:6px}.hf-grades.g3{grid-template-columns:repeat(3,1fr)}
.hf-g{display:flex;flex-direction:column;align-items:center;gap:3px;padding:11px 4px;border-radius:16px;border:1px solid var(--line);background:var(--card);color:var(--text)}
.hf-g b{font-size:13.5px}.hf-g small{font-size:10.5px;color:var(--muted);text-align:center;line-height:1.5}
.hf-g.g0 b{color:#ff9f9f}.hf-g.g1 b{color:#ffc98a}.hf-g.g2 b{color:var(--hf-gold)}.hf-g.g3 b{color:#58d9a8}
.hf-g.sug{border-color:var(--hf-gold);box-shadow:0 0 0 2px rgba(240,207,122,.3)}
.hf-result{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;padding:26px 16px 18px;margin-top:8px;border-radius:26px;background:linear-gradient(155deg,#0f3d33,#082a23 72%);border:1px solid rgba(240,207,122,.28);color:#e8f3ee}
.hf-result.weak{background:linear-gradient(155deg,#2c2314,#17120a 72%)}
.hf-rico{width:68px;height:68px;border-radius:50%;display:grid;place-items:center;margin-bottom:8px;color:#2a1d05;background:linear-gradient(150deg,#f6e2a0,#d4ab4a)}
.hf-result h2{margin:0;font-size:22px;font-weight:800;color:#fff}.hf-result p{margin:4px 0 8px;font-size:13px;line-height:1.8;color:#b9d7cb}
.hf-result .hf-btn{max-width:360px}
.hf-stats3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:100%;margin:6px 0 4px}
.hf-stats3 div,.hf-stats4 div{padding:10px 4px;border-radius:15px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08)}
.hf-stats3 b,.hf-stats4 b{display:block;font-size:16px;font-weight:800;color:var(--hf-gold)}.hf-stats3 small,.hf-stats4 small{font-size:10.5px;color:#a9c9bd}
.hf-stats4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;width:100%;margin:6px 0 4px}
.hf-stats4 .g0 b{color:#ff9f9f}.hf-stats4 .g1 b{color:#ffc98a}.hf-stats4 .g3 b{color:#58d9a8}
.hf-wrongs{width:100%;margin:6px 0}.hf-wrongs .hf-h{color:#fff}.hf-wrongs .hf-chip{margin:3px}

/* ---------- الخطة والإحصاءات ---------- */
.hf-eta{margin-top:12px;padding:11px 12px;border-radius:15px;font-size:12.5px;line-height:1.8;background:rgba(240,207,122,.07);border:1px solid rgba(240,207,122,.22)}
.hf-eta b{color:var(--hf-gold)}.hf-eta small{display:block;font-size:11px;color:var(--muted)}
.hf-days{display:flex;align-items:flex-end;gap:5px;height:104px}
.hf-day{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;height:100%}
.hf-day .b{flex:1;width:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}
.hf-day .b i{display:block;width:72%;min-height:0}.hf-day .b i.n{background:var(--hf-em);border-radius:5px 5px 0 0}.hf-day .b i.r{background:var(--hf-gold);border-radius:5px 5px 0 0}
.hf-day small{font-size:9.5px;color:var(--muted)}
.hf-juz{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}
.hf-jz{position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;aspect-ratio:1;border-radius:14px;border:1px solid var(--line);background:linear-gradient(0deg,rgba(63,213,168,.32) var(--p),transparent var(--p)),var(--bg)}
.hf-jz b{font-size:14px;font-weight:800}.hf-jz small{font-size:9px;color:var(--muted);min-height:11px}
.hf-jz.full{border-color:var(--hf-em);background:rgba(63,213,168,.28)}
.hf-dist{display:flex;align-items:center;gap:10px;margin:8px 0;font-size:12.5px}.hf-dist>span:first-child{width:56px;color:var(--muted)}.hf-dist .hf-pbar{flex:1;margin:0}.hf-dist b{min-width:24px;text-align:end}

/* ---------- زر «حفظ القرآن» داخل شاشة المصحف ---------- */
.hf-entry{display:flex;align-items:center;gap:12px;width:100%;margin-top:10px;padding:10px 12px;border-radius:19px;color:#e8f3ee;text-align:start;
 background:linear-gradient(135deg,rgba(63,213,168,.16),rgba(63,213,168,.05));border:1px solid rgba(63,213,168,.38);font-family:inherit;transition:transform .15s}
.hf-entry:active{transform:scale(.98)}
.hf-eic{width:38px;height:38px;border-radius:13px;flex:none;display:grid;place-items:center;color:#06281f;background:linear-gradient(150deg,#7ae8c6,#2bbf93)}
.hf-etx{display:flex;flex-direction:column;flex:1;min-width:0}.hf-etx b{font-size:14.5px;font-weight:800;color:#fff}
.hf-etx small{font-size:11px;color:#b9d7cb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hf-ep{font-size:12px;font-weight:800;color:var(--hf-gold,#f0cf7a)}
.hf-entry .hf-badge{background:#f0cf7a}
.hf-entry .pi{color:#b9d7cb}

@media(max-width:360px){.hf-big{font-size:25px}.hf-juz{grid-template-columns:repeat(5,1fr)}.hf-grades{gap:5px}}
@media(prefers-reduced-motion:reduce){.hf-btn,.hf-entry,.hf-w,.hf-prog i{transition:none!important}}
