/* V9: Separate memorisation setup and focused reading/practice page, shared across laptop and mobile. */
.hifz-setup-wrap{width:min(860px,100%);margin:0 auto 60px;min-width:0}
.hifz-setup-panel{padding:0;overflow:hidden}
.hifz-section{padding:25px 30px 27px;border-bottom:1px solid var(--line);min-width:0}
.hifz-section-heading{display:flex;align-items:flex-start;gap:14px;margin-bottom:20px;min-width:0}
.hifz-section-heading>div{flex:1;min-width:0}
.hifz-section-heading h2{margin:0 0 5px;font-size:clamp(17px,2.5vw,21px);line-height:1.3;letter-spacing:-.03em}
.hifz-section-heading p{color:var(--muted);font-size:12px;margin:0;line-height:1.55}
.hifz-step{width:36px;height:36px;border-radius:12px;background:var(--soft);border:1px solid var(--line);display:grid;place-items:center;color:var(--accent);font-weight:850;font-size:12px;flex:0 0 36px}
.hifz-section .field{display:flex;flex-direction:column;gap:8px;min-width:0;margin:0 0 14px}
.hifz-section .field>span:first-child{font-size:12px;font-weight:750;color:var(--ink)}
.hifz-section .field .select-shell{width:100%;min-width:0;min-height:47px;border:1px solid var(--line);border-radius:13px;background:var(--paper)}
.hifz-section .field select{min-width:0;max-width:100%;font-size:12px;padding-right:32px}
.hifz-section .field input{width:100%;max-width:100%;min-width:0;min-height:47px;border:1px solid var(--line);border-radius:13px;padding:10px;background:var(--paper);color:var(--ink)}
.hifz-section .studio-fields{margin:0 0 10px}
.hifz-section .studio-fields .field{margin-bottom:0}
.hifz-section [hidden],.qari-mode-tabs [hidden]{display:none!important}
.hifz-profile-open{width:100%;min-height:86px;padding:15px;text-align:left;gap:14px}
.hifz-profile-open .reciter-face{height:49px;width:49px;flex:0 0 49px}
.hifz-profile-open .listen-profile-text strong{font-size:15px;line-height:1.45}
.hifz-profile-open .listen-profile-text small{font-size:12px;line-height:1.4}
.hifz-change-reciter{display:inline-flex;align-items:center;gap:7px;color:var(--accent);font-weight:780;white-space:nowrap;font-size:12px;flex:0 0 auto}
.hifz-change-reciter .ico{height:15px;width:15px}
.hifz-source-note{font-size:11px;line-height:1.6;color:var(--muted);margin:12px 0 0}
.hifz-setup-footer{padding:25px 30px;display:grid;gap:12px;background:var(--soft)}
.hifz-setup-footer .btn{font-size:14px;min-height:53px;white-space:nowrap}
.hifz-setup-footer>small{color:var(--muted);text-align:center;line-height:1.5;font-size:11px}
.hifz-setup-footer .form-error{color:#c05454;margin:0;font-size:12px}
.hifz-setup-footer .form-error[hidden]{display:none!important}
.qari-mode-tabs:has(button[hidden]){grid-template-columns:minmax(0,1fr)}
.hifz-practice-head{width:min(980px,100%);margin:22px auto 20px;display:flex;align-items:flex-start;gap:24px;min-width:0}
.hifz-practice-head>.btn{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px}
.hifz-practice-head>div{flex:1;min-width:0}
.hifz-practice-head h1{font-size:clamp(30px,4vw,43px);line-height:1.2;letter-spacing:-.04em;margin:6px 0 6px}
.hifz-practice-head p{font-size:12px;color:var(--muted);overflow-wrap:anywhere;margin:0}
.hifz-practice-player{max-width:980px;width:100%;margin:0 auto 50px;position:static;padding:clamp(18px,3vw,40px);min-width:0}
.hifz-playback-label{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.hifz-live-mark{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid var(--line);background:var(--soft);border-radius:99px;color:var(--accent);font-size:11px;font-weight:800;white-space:nowrap}
.hifz-live-mark .ico{width:15px;height:15px}
.hifz-ayah-display{background:var(--soft);border:1px solid var(--line);border-radius:19px;min-height:220px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px;padding:clamp(15px,3vw,40px);min-width:0;margin:18px 0}
.hifz-ayah-display .studio-arabic{font-size:clamp(29px,4vw,45px);line-height:2.15;overflow-wrap:break-word;min-height:0;margin:0;text-align:center;width:100%}
.hifz-ayah-display #hifz-english{max-width:720px;font-size:13px;line-height:1.7;margin:0;text-align:center}
.hifz-practice-player .studio-progress{margin:16px 0 10px}
.hifz-practice-tools{justify-content:center}
.hifz-practice-tools .btn,.hifz-player-actions .btn{white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:0}
.hifz-player-actions .btn{font-size:13px;min-height:46px}
.hifz-practice-player>.small{line-height:1.6}
@media(max-width:700px){.hifz-section{padding:20px 16px}.hifz-setup-footer{padding:20px 16px}.hifz-practice-head{display:grid;gap:15px}.hifz-practice-head>.btn{justify-self:start}.hifz-playback-label{justify-content:center}.hifz-ayah-display{min-height:180px}.hifz-practice-player{padding:18px 13px}}
@media(max-width:355px){.hifz-profile-open{gap:9px;padding:11px}.hifz-change-reciter{font-size:0;gap:0}.hifz-change-reciter .ico{height:19px;width:19px}.hifz-player-actions{gap:5px}.hifz-player-actions .btn{font-size:10px;padding:9px 8px}.hifz-section-heading{gap:10px}.hifz-step{width:30px;height:30px;flex-basis:30px}}
/* Keep playback usable on smaller phones: actions sit above the five-item mobile navigation. */
@media(max-width:700px){
 .hifz-practice-player{padding-bottom:115px;margin-bottom:145px;}
 .hifz-practice-player .hifz-player-actions{
  position:fixed;z-index:66;left:10px;right:10px;bottom:calc(68px + env(safe-area-inset-bottom));
  display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;
  gap:6px;padding:10px;background:var(--card);border:1px solid var(--line);
  border-radius:18px;box-shadow:0 8px 30px #00000026;margin:0;
 }
 .hifz-practice-player .hifz-player-actions .btn{flex:1 1 auto;padding:9px 6px;white-space:nowrap;font-size:clamp(9px,2.7vw,12px);}
 .hifz-practice-player .hifz-player-actions .btn.green{flex:1.2 1 auto;}
}
