/* Ayah, redesigned 2026-10-24 after Tarteel (Muhammad: "pages adjusted like tarteel", "easy to look at and modern", "right now the
   UI is text heavy and not instinctive"). One set of tokens for every screen, light and dark; page.css draws the mushaf page and
   screens.css the screens outside a lesson. */
@font-face{font-family:AmiriQuran;src:url('/fonts/amiri-quran.ttf') format('truetype');font-display:swap}
:root{
  color-scheme:light dark;
  --bg:#F7F5F0;--page:#F7F5F0;--surface:#FFFFFF;--card:#EEEAE2;--ink:#171511;--muted:#6B665C;--line:#E6E1D6;
  --accent:#A87B1A;--accent-grad:linear-gradient(135deg,#F5D98E,#E8BC5E);--accent-ink:#3D2B05;--glow:rgba(232,188,94,.45);
  --band:rgba(168,123,26,.09);--wordbox:rgba(110,78,12,.24);--fresh:#8A6212;--miss:#D92D20;--miss-text:#B42318;--hint:#2F6AA8;--rule:rgba(0,0,0,.08);--slot:rgba(23,21,17,.15);
  --shadow:0 1px 2px rgba(0,0,0,.06),0 4px 14px rgba(0,0,0,.06);--scrim:rgba(0,0,0,.28);
  --accent-text:color-mix(in srgb,var(--accent) 66%,var(--ink));    /* gold small text at 4.5:1 or better (6:1 light, 10.9:1 dark) */
  /* Practice, after Tarteel's screen (2026-10-25): the bars, the card on them, the footer's buttons, the page's own ink and markers,
     the bookmark when off, the timer pill, the peek buttons' rings and the capsule's mint edge, and the big mic's gradient (brighter
     in the centre while it connects) and glow. Light keeps white buttons with a soft shadow and the page's colours. */
  --chrome:var(--page);--well:var(--card);--btn:var(--surface);--btn-shadow:var(--shadow);--page-ink:var(--ink);--rosette:var(--ink);--mark-off:#857D70;--miss-fill:var(--miss);
  --timer-bg:#ECE7DC;--timer-ink:#3B362C;--peek-ring:#CFC6B4;--peek-edge:rgba(200,150,50,.5);--peek-glow:rgba(232,188,94,.5);
  --mic-grad:radial-gradient(circle,#F6DC93 0%,#EECB72 50%,#E6BC5C 100%);--mic-busy:radial-gradient(circle,#FBEAB8 0%,#F6DC93 30%,#EECB72 62%,#E6BC5C 100%);--mic-glow:rgba(232,188,94,.55);
  /* older names, still used here and there */
  --paper:var(--bg);--violet:var(--accent);--soft:var(--card);--error:var(--miss);--success:var(--accent);
  font-family:Inter,-apple-system,BlinkMacSystemFont,Roboto,'Segoe UI',sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none
}
/* Dark takes Tarteel's page and mark colours (2026-10-25): page #181816 under bars of #1C1C1E, text #FEFEFC, markers #E7E7E5, the
   newest word gold #E9C46A (2026-10-26, was green), mistakes #D35B76, helped words blue #8DB3E2. Light keeps the readable ones (DESIGN.md's 4.5:1).
   The glow round the gold buttons is softer in the dark (2026-10-26: --glow .3 to .2, --mic-glow .4 to .26). */
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){
  --bg:#18181E;--page:#15151B;--surface:#26262D;--card:#303036;--ink:#F2F2F3;--muted:#A1A1AA;--line:#34343B;--accent:#E0B354;--accent-grad:linear-gradient(135deg,#F0CF7E,#D9A845);--accent-ink:#2E2005;--glow:rgba(224,179,84,.2);
  --band:rgba(224,179,84,.11);--wordbox:rgba(240,200,110,.3);--fresh:#E9C46A;--miss:#E1654C;--miss-text:#F2A08F;--hint:#8DB3E2;--rule:rgba(255,255,255,.09);--slot:rgba(255,255,255,.17);
  --shadow:0 1px 2px rgba(0,0,0,.45),0 4px 14px rgba(0,0,0,.35);--scrim:rgba(0,0,0,.5);
  --chrome:#15151B;--well:var(--card);--btn:var(--surface);--btn-shadow:0 0 #0000;--miss-fill:#C74C33;--page-ink:#F5F1E6;--rosette:#D8D2C2;--mark-off:#8A8A8C;
  --timer-bg:#2A2A32;--timer-ink:#E5E5E7;--peek-ring:#6A6A72;--peek-edge:rgba(224,179,84,.45);--peek-glow:rgba(224,179,84,.32);
  --mic-grad:radial-gradient(circle,#F2D27F 0%,#E6BF62 50%,#DBAE4E 100%);--mic-busy:radial-gradient(circle,#FAE3A6 0%,#F2D27F 30%,#E6BF62 62%,#DBAE4E 100%);--mic-glow:rgba(224,179,84,.26)
}}
/* Theme (Practice's settings, 2026-10-25): Light or Dark whatever the phone says; Auto follows it, above. */
:root[data-theme=dark]{color-scheme:dark;
  --bg:#18181E;--page:#15151B;--surface:#26262D;--card:#303036;--ink:#F2F2F3;--muted:#A1A1AA;--line:#34343B;--accent:#E0B354;--accent-grad:linear-gradient(135deg,#F0CF7E,#D9A845);--accent-ink:#2E2005;--glow:rgba(224,179,84,.2);
  --band:rgba(224,179,84,.11);--wordbox:rgba(240,200,110,.3);--fresh:#E9C46A;--miss:#E1654C;--miss-text:#F2A08F;--hint:#8DB3E2;--rule:rgba(255,255,255,.09);--slot:rgba(255,255,255,.17);
  --shadow:0 1px 2px rgba(0,0,0,.45),0 4px 14px rgba(0,0,0,.35);--scrim:rgba(0,0,0,.5);
  --chrome:#15151B;--well:var(--card);--btn:var(--surface);--btn-shadow:0 0 #0000;--miss-fill:#C74C33;--page-ink:#F5F1E6;--rosette:#D8D2C2;--mark-off:#8A8A8C;
  --timer-bg:#2A2A32;--timer-ink:#E5E5E7;--peek-ring:#6A6A72;--peek-edge:rgba(224,179,84,.45);--peek-glow:rgba(224,179,84,.32);
  --mic-grad:radial-gradient(circle,#F2D27F 0%,#E6BF62 50%,#DBAE4E 100%);--mic-busy:radial-gradient(circle,#FAE3A6 0%,#F2D27F 30%,#E6BF62 62%,#DBAE4E 100%);--mic-glow:rgba(224,179,84,.26)
}
:root[data-theme=light]{color-scheme:light}

*{box-sizing:border-box}
body{margin:0;min-height:100dvh;line-height:1.5;background:var(--bg)}
button,input,select{font:inherit;color:inherit}
button,a,input,select{-webkit-tap-highlight-color:transparent}
button{cursor:pointer;border:0;background:none;padding:0}
button:disabled{opacity:.45;cursor:default}
button,a{touch-action:manipulation}
:is(.round,.fab,.pill,.primary,.secondary,.icon-btn,.ctl):active:not(:disabled){transform:scale(.96)}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
a{color:var(--accent-text)}
svg{width:22px;height:22px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
h1,h2,h3,p{margin:0}
h1{font-size:28px;line-height:1.2;letter-spacing:-.6px;font-weight:650}
h2{font-size:21px;line-height:1.25;letter-spacing:-.3px;font-weight:620}
h3{font-size:17px;font-weight:600}
.muted{color:var(--muted)}
.small{font-size:13px}
.arabic{font-family:AmiriQuran,serif;font-weight:400;direction:rtl}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#app{width:100%;max-width:440px;min-height:100dvh;margin:auto;position:relative;isolation:isolate;background:var(--bg)}
.screen{min-height:100dvh;display:flex;flex-direction:column}
.loading-screen{min-height:100dvh;display:grid;place-items:center;color:var(--muted);font-size:14px}
/* The lessons could not open: centred, a gap between the line and its button (2026-10-25). */
.load-fail{display:flex;flex-direction:column;align-items:center;gap:16px;max-width:300px;padding:0 24px;text-align:center}
.load-fail p:first-child{font-size:16px;font-weight:600;color:var(--ink)}
.load-fail .secondary{width:auto;padding:10px 28px}
.desktop-wordmark,.desktop-note{display:none}

/* Shared pieces */
.icon-btn{width:44px;height:44px;display:inline-grid;place-items:center;border-radius:50%;color:var(--ink);flex-shrink:0}
.round{width:48px;height:48px;display:grid;place-items:center;border-radius:50%;background:var(--surface);color:var(--ink);box-shadow:var(--shadow);flex-shrink:0}
.round svg{width:22px;height:22px}
.fab{width:66px;height:66px;border-radius:50%;display:grid;place-items:center;flex-shrink:0;background:var(--accent-grad);color:var(--accent-ink);
  box-shadow:0 0 0 5px color-mix(in srgb,var(--glow) 60%,transparent),0 0 26px 6px var(--glow)}
.fab svg{width:28px;height:28px;stroke-width:2.2}
.fab svg [fill=currentColor]{fill:currentColor}
.pill{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 14px;border-radius:999px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow);font-size:14px;font-weight:600;white-space:nowrap}
.primary{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:54px;padding:12px 20px;border-radius:999px;background:var(--accent-grad);color:var(--accent-ink);font-size:16px;font-weight:650}
.primary svg{width:20px;height:20px}
.secondary{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:50px;padding:10px 16px;border-radius:999px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow);font-size:15px;font-weight:600}
.text-btn{min-height:44px;padding:10px 4px;font-size:14px;font-weight:600;color:var(--accent-text)}
.switch{appearance:none;width:51px;height:31px;margin:0;border-radius:999px;background:var(--line);position:relative;flex-shrink:0;cursor:pointer;transition:background .2s}
.switch::after{content:'';position:absolute;top:3px;left:3px;width:25px;height:25px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s}
.switch:checked{background:var(--accent)}
.switch:checked::after{transform:translateX(20px)}
.notice{margin:0 16px 8px;padding:10px 14px;border-radius:14px;background:var(--card);font-size:13px;line-height:1.45}
.notice.error{color:var(--miss)}
.notice:empty{display:none}
.rec{display:inline-flex;vertical-align:1px;margin-right:6px}
.rec[hidden]{display:none}
.rec i{width:8px;height:8px;border-radius:50%;background:var(--miss);animation:pulse 1.6s ease-in-out infinite}
@keyframes pulse{50%{opacity:.35}}

/* The lesson (2026-10-26, Muhammad: "a lot of the space is being taken by forward and back buttons ... modern but not take up
   space"): the card on top holds the surah, the time left and the step with its dots (or the guide's words), the page fills the
   rest, and one slim bar of five fixed slots sits under it, about 60 px: ghost buttons with their word under the icon (no guessing)
   and the gold play button in the middle. A tap on the page hides both bars and the page grows. */
.lesson-screen{height:100dvh;min-height:0;background:var(--page)}
.lesson-top{display:flex;align-items:center;gap:4px;padding:max(6px,env(safe-area-inset-top)) 6px 4px;flex-shrink:0}
.lesson-screen .lesson-top{position:relative;z-index:4}
.page-card{flex:1;min-width:0;position:relative;display:flex;flex-direction:column;justify-content:center;min-height:52px;padding:6px 14px 7px;border-radius:12px;background:var(--card);overflow:hidden}
.page-card strong{font-size:16px;font-weight:650;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.page-card .meta{font-size:13px;line-height:1.3;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.page-card .progress{position:absolute;left:0;bottom:0;height:3px;width:var(--p,0%);background:var(--accent);border-radius:0 3px 3px 0;transition:width .5s}
/* The lesson's card keeps its 54 px, so the page never resizes for it; the guide's words are a caption above the bar instead
   (2026-10-26: long ones grew the card over the page). Since v44 it holds the surah and the time left; the step is over the bar. */
.lesson-card{display:block;height:54px;min-height:0;padding:0;border-radius:16px;background:none;overflow:visible}
.card-face{position:absolute;inset:0 0 auto;min-height:100%;display:flex;border-radius:16px;background:var(--card);overflow:hidden}
.card-text{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:2px;padding:7px 12px 7px 14px}
.card-line{display:flex;align-items:baseline;gap:10px;min-width:0}
.card-line strong{flex:1;min-width:0;line-height:20px}
.lesson-card .time-left{flex-shrink:0;font-size:12px;line-height:16px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.lesson-card .meta{line-height:18px}
/* The step, back just over the bar where it was before the redesign (Muhammad, 2026-10-26: "were ok in the original place now its
   on top and too unnoticable"): a pill with its icon, words and dots (With Minshawi, On your own, From the start; plain, Listen, while
   the guide speaks); a tap opens the lesson's settings. While the intro plays, Skip intro at the row's other end. */
.step-row{display:flex;align-items:center;gap:10px;min-height:44px;padding:2px 8px 0}
.step-pill{position:relative;display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:64%;min-height:38px;padding:0 14px 0 12px;border-radius:999px;background:var(--surface);box-shadow:var(--shadow);color:var(--ink);font-size:14px;font-weight:600;line-height:18px;text-align:left}
.step-pill:empty{visibility:hidden}
.step-pill svg{width:19px;height:19px;color:var(--accent)}
.step-pill .label{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.step-pill .label.turn{color:var(--accent-text)}    /* ux2: his own turn, the gold text colour (text only) */
.step-pill.quiet{box-shadow:none;background:none;padding-left:4px}
.step-pill .dots i{width:7px;height:7px}
.skip-intro{position:relative;display:inline-flex;align-items:center;gap:6px;flex-shrink:0;min-height:38px;margin-left:auto;padding:0 12px 0 16px;border-radius:999px;background:var(--surface);box-shadow:var(--shadow);color:var(--ink);font-size:14px;font-weight:600;white-space:nowrap}
.skip-intro[hidden]{display:none}
.skip-intro svg{width:17px;height:17px;color:var(--accent)}
:is(.step-pill,.skip-intro)::after{content:'';position:absolute;inset:-3px 0}
:is(.step-pill,.skip-intro):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.dots{display:flex;gap:4px;flex-shrink:0;color:var(--accent)}
.dots i{width:6px;height:6px;border-radius:50%;border:1.5px solid currentColor;opacity:.45}
.dots i.on{background:currentColor;opacity:1}
.listening{width:8px;height:8px;border-radius:50%;background:var(--miss);animation:pulse 1.4s ease-in-out infinite}
/* The test's eye, at the card's right end as Practice's bookmark: a 44 px column to tap, its word under it. */
.card-eye{position:relative;z-index:1;flex-shrink:0;width:44px;margin-left:-8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;color:var(--ink)}
.card-eye[hidden]{display:none}
.card-eye svg{width:20px;height:20px}
.card-eye span{font-size:11px;font-weight:600;line-height:13px;color:var(--muted)}
.card-eye[aria-pressed=true],.card-eye[aria-pressed=true] span{color:var(--accent-text)}
.mic-toggle[aria-pressed="false"]{color:var(--muted)}
.lesson-screen .mushaf{flex:1;min-height:0}
/* The bar: five equal slots, so no button moves when Help comes and goes. */
.lesson-controls{position:relative;flex-shrink:0;padding:4px 6px max(4px,env(safe-area-inset-bottom))}
.control-row{display:grid;grid-template-columns:repeat(5,1fr);align-items:center;justify-items:center;height:52px}
.ctl{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;max-width:72px;height:50px;border-radius:14px;color:var(--ink)}
.ctl svg{width:23px;height:23px}
.ctl span{font-size:11px;font-weight:500;line-height:13px;color:var(--muted)}
.ctl:active:not(:disabled){background:var(--card)}
.ctl.help[hidden]{display:flex;visibility:hidden}
.lesson-controls .fab{width:52px;height:52px;box-shadow:0 2px 10px color-mix(in srgb,var(--glow) 70%,transparent)}
.lesson-controls .fab svg{width:24px;height:24px}
/* Bare, the bar leaves the layout and cannot be pressed, but a note in it still shows, low over the page number (2026-10-26: the
   first time says how the buttons come back); a tap on the note is a tap on the page, so it brings them back. */
.lesson-screen.bare .lesson-top:not(:has(:focus-visible)){display:none}
.lesson-screen.bare .lesson-controls:not(:has(:focus-visible)){position:absolute;left:0;right:0;bottom:0;visibility:hidden}
.lesson-screen.bare .lesson-controls:not(:has(:focus-visible))>.notice{visibility:visible;pointer-events:none;bottom:max(10px,calc(env(safe-area-inset-bottom) + 4px))}
/* The guide's words as a subtitle just above the bar (2026-10-26): centred, at most the page's width less 32 px, up to 4 lines,
   floating over the page so it never resizes, never on the bar. A note shows above it (app.js capFit sets --cap-h). Taps go
   through it to the page. Bare, it sits low over the page as the note does. */
.lesson-controls>.caption{position:absolute;z-index:6;left:50%;bottom:calc(100% + 8px);translate:-50% 0;width:max-content;max-width:calc(100% - 32px);box-sizing:border-box;margin:0;padding:8px 14px;border-radius:14px;background:var(--surface);color:var(--ink);font-size:14px;font-weight:500;line-height:20px;text-align:center;box-shadow:0 0 0 1px var(--line),var(--shadow);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden;pointer-events:none;text-wrap:pretty}
.lesson-controls>.caption[hidden]{display:none}
.lesson-controls:has(>.caption:not([hidden]))>.notice{bottom:calc(100% + 14px + var(--cap-h,0px))}
.lesson-screen.bare .lesson-controls:not(:has(:focus-visible))>.caption{visibility:visible;bottom:max(10px,calc(env(safe-area-inset-bottom) + 4px))}
.lesson-screen.bare .lesson-controls:not(:has(:focus-visible)):has(>.caption:not([hidden]))>.notice{bottom:calc(max(10px,calc(env(safe-area-inset-bottom) + 4px)) + 6px + var(--cap-h,0px))}

/* The lesson's settings, from the gear or the step pill */
.drill-panel{position:absolute;top:calc(max(6px,env(safe-area-inset-top)) + 60px);right:8px;z-index:5;width:min(340px,calc(100% - 16px));max-height:calc(100% - 80px);overflow:auto;background:var(--surface);color:var(--ink);border-radius:20px;padding:6px 16px 10px;box-shadow:0 18px 50px rgba(0,0,0,.25)}
.drill-panel[hidden]{display:none}
.panel-title{font-size:13px;font-weight:600;color:var(--muted);margin:12px 0 4px}
.panel-where{margin:10px 0 2px;font-size:13px;line-height:18px;color:var(--muted);font-variant-numeric:tabular-nums}
.panel-where:empty{display:none}
.panel-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;font-size:15px;border-bottom:1px solid var(--line)}
.panel-row:last-child{border-bottom:0}
.panel-row small{display:block;font-size:13px;color:var(--muted);line-height:1.35}
.stepper{display:flex;align-items:center;gap:10px;min-height:52px;font-size:15px;border-bottom:1px solid var(--line)}
.stepper span{flex:1}
.stepper button{width:44px;height:44px;border-radius:50%;background:var(--card);font-size:20px;line-height:1;display:grid;place-items:center}
.stepper output{min-width:26px;text-align:center;font-size:17px;font-weight:650;font-variant-numeric:tabular-nums}
.speed-choices{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:4px;margin:4px 0 6px;border-radius:14px;background:var(--card)}
.speed-choices button{height:44px;border-radius:10px;font-size:14px;font-weight:600}
.speed-choices button[aria-pressed=true]{background:var(--surface);box-shadow:var(--shadow)}
.panel-jumps{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 4px}
.panel-jumps button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border-radius:999px;background:var(--card);font-size:14px;font-weight:600}
.panel-jumps svg{width:18px;height:18px}
.panel-foot{display:flex;justify-content:center}

@media(min-width:760px){
  body{padding:28px 0}
  #app{min-height:820px;border:1px solid var(--line);border-radius:30px;overflow:hidden;box-shadow:0 20px 80px rgba(0,0,0,.08)}
  .screen{min-height:820px}
  .loading-screen{min-height:820px}
  #app:has(.lesson-screen,.practice-screen){min-height:0;max-width:max(440px,calc((100dvh - 96px)*.62 + 16px))}
  .screen:is(.lesson-screen,.practice-screen){height:calc(100dvh - 58px);min-height:0}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* The plain pages outside the app (How these lessons work, Record the guide) */
.topbar{display:flex;align-items:center;gap:10px;min-height:60px;padding:8px 16px}
.content{flex:1;padding:0 20px 28px}

/* Practice (2026-10-24), laid out as Tarteel's page screen on his 360 x 780 phone (2026-10-25): a 47 px card in a top row on the
   bars' colour (the menu, the card with its bookmark, find, the gear), the page, and an 80 px footer: the Mistakes pill, the book
   and the eye drawn 36 px and tapped 44 px (DESIGN.md), and the 70 px green mic 17 px from the edge, its bottom on theirs, the timer
   pill above the Mistakes pill while he recites. A tap on the page hides the top row; the page then says where it is in its own
   margins, the page number bottom left, as Tarteel's. */
.practice-screen{height:100dvh;min-height:0;background:var(--page)}
.practice-screen .mushaf{flex:1;min-height:0;touch-action:pan-y;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.practice-screen .lesson-top{gap:0;min-height:51px;padding:max(2px,env(safe-area-inset-top)) 6px 2px 5px;background:var(--chrome)}
.practice-screen .lesson-top>.icon-btn svg{width:23px;height:23px;stroke-width:2.6}
.practice-screen .page-card{flex-direction:row;align-items:stretch;min-height:47px;height:47px;padding:0;border-radius:8px;background:var(--well)}
.card-go{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;padding:0 0 0 8px;text-align:left;color:inherit;cursor:pointer}
.practice-screen .page-card strong{font-size:13px;font-weight:500;line-height:17px}
.practice-screen .page-card .meta{display:flex;font-size:11px;line-height:15px;letter-spacing:-.1px}
.page-card .meta .where{min-width:0;overflow:hidden;text-overflow:ellipsis}
.page-card .meta .key{flex-shrink:0}
.page-card .bookmark{position:relative;width:31px;flex-shrink:0;display:grid;place-items:center;color:var(--mark-off)}
.page-card .bookmark::after{content:'';position:absolute;inset:0 0 0 -13px}    /* 44 x 47 to tap, the glyph where Tarteel has it */
.page-card .bookmark[aria-pressed=true]{color:var(--ink)}
.page-card .bookmark svg{width:19px;height:19px;stroke:none}
.page-head{display:none}
.practice-screen.bare>.lesson-top{display:none}
.practice-screen.bare>.page-head{display:flex;justify-content:space-between;gap:12px;flex-shrink:0;padding:max(12px,env(safe-area-inset-top)) 14px 0;font-size:13px;line-height:18px;color:var(--ink)}
.practice-screen:not(.bare) .mushaf .page-number{visibility:hidden}
.practice-screen.bare .mushaf .page-number{text-align:left;padding-left:14px}
.practice-screen.bare .mushaf .page-number .ar{display:none}
.practice-screen.bare .mushaf .page-number .en{display:inline}
/* A note floats just above the footer, black with white text as Tarteel's toast, so the page never resizes for it (2026-10-25).
   Small enough to sit on the page number's strip, not on the last line. */
.practice-bar .notice,.practice-bar .notice.error,.lesson-controls>.notice,.lesson-controls>.notice.error{position:absolute;z-index:7;left:50%;bottom:calc(100% + 4px);translate:-50% 0;width:max-content;max-width:calc(100% - 32px);margin:0;padding:6px 12px;border-radius:9px;background:#000;color:#fff;font-size:13px;font-weight:500;line-height:18px;text-align:center;box-shadow:0 0 0 1px rgba(255,255,255,.1),0 4px 14px rgba(0,0,0,.3);cursor:pointer}
.bar-gap{flex:1;min-width:2px}
/* The ayat he has chosen by dragging (2026-10-25): a slim bar just above the footer, over the page number's strip, with how many,
   the range, Learn and clear. The footer stays usable under it (the mic clears the choice as it starts) and the page's lines are
   not covered; its two buttons take a 44 px tap past their drawn edge, never reaching the mic. */
.pick-bar{position:absolute;z-index:6;left:10px;right:10px;bottom:calc(100% + 2px);display:flex;align-items:center;gap:4px;height:30px;padding:0 2px 0 12px;border-radius:9px;background:var(--well);color:var(--ink);box-shadow:0 2px 10px rgba(0,0,0,.18)}
.pick-t{flex:1;min-width:0;display:flex;align-items:baseline;gap:8px;white-space:nowrap}
.pick-t strong{flex-shrink:0;font-size:14px;font-weight:700;line-height:18px}
.pick-t small{min-width:0;font-size:12px;line-height:18px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.pick-t small.why{color:var(--miss-text,var(--miss));font-weight:600}
.pick-learn{position:relative;flex-shrink:0;display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 12px 0 9px;border-radius:999px;background:var(--accent-grad);color:var(--accent-ink);font-size:13px;font-weight:700}
.pick-learn svg{width:14px;height:14px}
.pick-learn:active{transform:scale(.96)}
.pick-bar .pick-x{position:relative;width:30px;height:30px}
.pick-learn::after,.pick-bar .pick-x::after{content:'';position:absolute;inset:-10px -7px -4px}
.pick-learn::after{inset:-13px -7px -7px}
.pick-bar .pick-x svg{width:17px;height:17px;stroke-width:2.2}
.practice-bar.picked .notice{bottom:calc(100% + 36px)}
/* Back into a lesson left part way (2026-10-26): a slim chip where the choice bar sits, over the foot of the page and left of the
   mic, drawn 28 px and tapped 44 px (its tap reaches down into the footer, not up over the page's last line). Shown only with the
   mic at rest, no ayat chosen, no sheet open and the bars showing; a note then floats above it. */
.resume-chip{position:absolute;z-index:6;left:16px;bottom:calc(100% + 1px);max-width:calc(100% - 32px);display:none;align-items:center;gap:6px;height:28px;padding:0 13px 0 10px;border-radius:999px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow);font-size:13px;font-weight:600;line-height:1;white-space:nowrap}
.practice-screen:not(.bare,:has(>.sheet-scrim)) .practice-bar:not(.picked):has(>.fab[data-state=idle])>.resume-chip{display:flex}
.practice-screen:not(.bare,:has(>.sheet-scrim)) .practice-bar:not(.picked):has(>.fab[data-state=idle]):has(>.resume-chip) .notice{bottom:calc(100% + 36px)}
.resume-chip svg{width:13px;height:13px;color:var(--accent)}
.resume-chip span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.resume-chip::after{content:'';position:absolute;inset:-2px 0 -14px}
.resume-chip:active{transform:scale(.96)}
/* No offline mode (v45, 2026-10-26): with no microphone or no internet the lesson stops and this card says why, over the step, with
   Try again; the bar's buttons check again too. It shows over a bare page as well. */
.lesson-block{position:absolute;z-index:8;left:10px;right:10px;bottom:calc(100% + 8px);display:flex;align-items:center;gap:12px;padding:12px 12px 12px 14px;border-radius:16px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}
.lesson-block[hidden]{display:none}
.lesson-block .block-ic{width:36px;height:36px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;background:color-mix(in srgb,var(--miss) 13%,transparent);color:var(--miss-text)}
.lesson-block .block-ic svg{width:19px;height:19px}
.lesson-block .block-t{flex:1;min-width:0;margin:0;font-size:15px;font-weight:600;line-height:1.35}
.lesson-block .block-go{flex-shrink:0;min-height:44px;padding:0 16px;border:0;border-radius:999px;background:var(--accent-grad);color:var(--accent-ink);font:inherit;font-size:15px;font-weight:650}
.lesson-block .block-go:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.lesson-block.nudge{animation:block-nudge .3s}
@keyframes block-nudge{25%{translate:-5px 0}75%{translate:5px 0}}
@media(prefers-reduced-motion:reduce){.lesson-block.nudge{animation:none}}
.lesson-controls:has(>.lesson-block:not([hidden]))>:is(.caption,.notice){visibility:hidden}
.lesson-screen.bare .lesson-controls:not(:has(:focus-visible))>.lesson-block{visibility:visible}
/* About to turn the page while choosing (2026-10-25): a green strip down that edge for the 0.8 s it waits. */
.practice-screen .mushaf.edge-next{box-shadow:inset 10px 0 10px -6px var(--accent)}
.practice-screen .mushaf.edge-prev{box-shadow:inset -10px 0 10px -6px var(--accent)}
.practice-bar :is(.pill,.round){position:relative;flex-shrink:0;box-shadow:var(--btn-shadow)}
.practice-bar :is(.pill,.round)::after{content:'';position:absolute;inset:-4px}
.practice-bar .mistakes-pill{height:36px;min-height:36px;margin-right:8px;padding:0 10px;background:var(--btn);font-size:13px;font-weight:700;line-height:1}
.practice-bar .mistakes-pill.has{background:var(--miss-fill);color:#fff}    /* white on it at 4.5:1 or better (DESIGN.md); Tarteel's rose */
.practice-bar.tight .mistakes-pill{padding:0 7px;font-size:12px;letter-spacing:-.2px}
.practice-bar .round{width:36px;height:36px;background:var(--btn);color:var(--ink)}
.practice-bar .round svg{width:19px;height:19px;stroke-width:2.3}
.practice-bar .book{margin-right:9px}
.practice-bar .book svg{width:19px;height:19px}
/* The eye: hidden, it grows into a capsule with a thin mint edge and a faint green glow, the two peek buttons sliding out of it. */
.eye-group{display:flex;align-items:center;gap:4px;flex-shrink:0;border-radius:999px;background:var(--btn);box-shadow:var(--btn-shadow)}
.eye-group .round{background:none;box-shadow:none}
.eye-group.on{box-shadow:var(--btn-shadow),0 0 0 1px var(--peek-edge),0 2px 10px -1px var(--peek-glow)}
.eye-group .peek{box-shadow:inset 0 0 0 1.5px var(--peek-ring)}
.eye-group .peek+.peek{margin-left:4px}
.eye-group .peek svg{width:18px;height:18px;stroke-width:2.4}
.eye-group.opening{animation:capsule-in .3s ease-out}
@keyframes capsule-in{from{clip-path:inset(-12px calc(100% - 48px) -12px -12px round 30px)}to{clip-path:inset(-12px round 30px)}}
/* The timer, Tarteel's small pill above the Mistakes pill: an amber dot while it connects, red while it listens. */
.rec-timer{position:absolute;left:16px;bottom:calc(max(7px,env(safe-area-inset-bottom)) + 45px);display:flex;align-items:center;gap:6px;height:22px;padding:0 9px 0 8px;border-radius:999px;background:var(--timer-bg);color:var(--timer-ink);font-size:12px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums}
.rec-timer[hidden]{display:none}
.rec-timer i{width:8px;height:8px;border-radius:50%;background:#F14261}
.rec-timer.wait i{background:#F4BA3C}
/* What the server heard last, Tarteel's faint line of Arabic left of the mic (2026-10-25), on the timer's row: the newest word at its
   left end, so a line too long keeps it and loses its oldest words at the right (a left-to-right box starts an overlong line left). */
.heard-line{position:absolute;left:94px;right:95px;bottom:calc(max(7px,env(safe-area-inset-bottom)) + 45px);height:22px;overflow:hidden;white-space:nowrap;direction:ltr;text-align:right;font:15px/22px AmiriQuran,serif;color:var(--muted);opacity:.75;pointer-events:none}
.heard-line[hidden]{display:none}
@keyframes fab-spin{to{transform:rotate(1turn)}}
.sheet-scrim{position:absolute;inset:0;z-index:8;background:var(--scrim)}
.sheet{position:absolute;left:0;right:0;bottom:0;z-index:9;max-height:70%;overflow:auto;background:var(--surface);border-radius:22px 22px 0 0;padding:6px 18px max(18px,env(safe-area-inset-bottom));box-shadow:0 -10px 40px rgba(0,0,0,.25)}
.sheet-head{display:flex;align-items:center;justify-content:space-between;min-height:56px}
.sheet-head .icon-btn svg{transform:rotate(-90deg)}
.mistake-list,.page-list{list-style:none;margin:0;padding:0}
/* The Mistakes list, as Tarteel's sheet (2026-10-25): the sitting's range, then per row the ayah key boxed, the kind and three plain
   round icons, over a bordered box with the stretch of the ayah, its wrong words red, an expected word green. Arabic at 30 px. */
.sheet-when{margin:-8px 0 6px;font-size:13px;color:var(--muted)}
.mrow{padding:6px 0 12px;border-top:1px solid var(--line)}
.mrow-head{display:flex;align-items:center;gap:6px;min-height:44px}
.vkey{flex-shrink:0;padding:1px 6px;border:1px solid var(--line);border-radius:6px;font-size:13px;font-weight:600;line-height:20px;font-variant-numeric:tabular-nums}
.mkind{flex:1;min-width:0;margin-left:4px;font-size:15px;font-weight:600}
.micon{position:relative;flex-shrink:0;width:40px;height:40px;display:grid;place-items:center;border-radius:50%;color:var(--ink)}
.micon::after{content:'';position:absolute;inset:-2px}
.micon svg{width:22px;height:22px;stroke-width:1.9}
.mbox{margin-top:2px;padding:2px 12px;border:1px solid var(--line);border-radius:12px}
.mline{display:flex;flex-wrap:wrap;align-items:center;gap:0 12px;margin:0;padding:2px 0}
.mline+.mline{border-top:1px solid var(--line)}
.mline small{font-size:13px;color:var(--muted)}
.mrow .arabic{margin-left:auto;font-size:30px;line-height:1.75;text-align:right}
.mrow .arabic b{font-weight:400}
.mrow .arabic .ok{color:var(--fresh)}
.mrow .arabic .bad{color:var(--miss)}
.mrow .arabic .hint{color:var(--hint)}
.mrow.helped,.mrow.past{padding-bottom:6px}
.mrow.helped .arabic,.mrow.past .arabic{flex:1;min-width:0;margin-left:8px}
.mrow .more,.mcount{flex-shrink:0;font-size:13px;color:var(--muted);white-space:nowrap}
.mrow.focus .mbox{border-color:var(--miss);box-shadow:0 0 0 1px var(--miss)}
.sheet-group{margin:16px 0 4px;font-size:13px;font-weight:650;color:var(--muted)}
.past-btn{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:48px;margin-top:16px;padding:0 16px;border-radius:12px;background:var(--accent-grad);color:var(--accent-ink);font-size:15px;font-weight:650}
.past-btn svg{width:20px;height:20px}
.sheet-head h2{flex:1}
.sheet-head .icon-btn.back svg{transform:none}
/* The gear's sheet (2026-10-25): a switch row and the theme as three segments. */
.sheet-row{display:flex;align-items:center;gap:14px;min-height:60px;padding:10px 0;border-top:1px solid var(--line);font-size:16px;font-weight:600;cursor:pointer}
.sheet-row>span{flex:1;min-width:0}
.sheet-row small{display:block;font-size:13px;font-weight:400;color:var(--muted)}
.sheet-row.wrap{flex-wrap:wrap;row-gap:10px;cursor:default;padding-bottom:14px}
.sheet .seg{flex-basis:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;border-radius:999px;background:var(--card)}
.sheet .seg label{position:relative;cursor:pointer}
.sheet .seg input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.sheet .seg span{display:grid;place-items:center;min-height:44px;border-radius:999px;font-size:15px;font-weight:600}
.sheet .seg input:checked+span{background:var(--ink);color:var(--bg)}
.sheet .seg input:focus-visible+span{outline:3px solid var(--accent);outline-offset:2px}
.page-list button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:52px;border-top:1px solid var(--line);font-size:16px;text-align:left}
.page-list small{font-size:13px;color:var(--muted)}
.sheet-empty{padding:18px 0 26px;color:var(--muted)}
button.sheet-row{width:100%;text-align:left}
button.sheet-row>svg:last-child{width:18px;height:18px;color:var(--muted)}
/* The menu (2026-10-25): a small list under the hamburger, the screen left as it is around it. */
.sheet-scrim.clear{background:transparent}
.pop-menu{position:absolute;z-index:9;top:calc(max(2px,env(safe-area-inset-top)) + 48px);left:8px;min-width:208px;padding:6px;border-radius:14px;background:var(--surface);box-shadow:0 14px 40px rgba(0,0,0,.35)}
.pop-menu button{display:flex;align-items:center;gap:14px;width:100%;min-height:48px;padding:0 12px;border-radius:10px;font-size:16px;font-weight:600;text-align:left}
.pop-menu button[aria-current]{background:var(--card)}
.pop-menu svg{width:21px;height:21px}
/* How many portions are due, on Review's row (v43: Learn's row said it). */
.pop-menu .menu-n{margin-left:auto;padding-left:12px;font-size:13px;font-weight:600;color:var(--muted)}
/* Go to: a find field, Surah, Juz and Hizb tabs, bookmarks first. */
.goto-find{position:relative;display:flex;align-items:center;margin:2px 0 10px}
.goto-find svg{position:absolute;left:14px;width:19px;height:19px;color:var(--muted);pointer-events:none}
.goto-find input{width:100%;height:46px;margin:0;padding:0 14px 0 42px;border-radius:999px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font-size:16px;-webkit-appearance:none;appearance:none}
.goto-find input:focus{outline:none;border-color:var(--accent)}
.tabs3{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;margin-bottom:6px;border-radius:999px;background:var(--card)}
.tabs3 button{min-height:44px;border-radius:999px;font-size:15px;font-weight:600}
.tabs3 button[aria-selected=true]{background:var(--ink);color:var(--bg)}
.page-list .group{padding:12px 0 6px;font-size:13px;font-weight:650;color:var(--muted)}

/* Ayah's own (v52, 2026-10-27, Muhammad: "just the features like the mic ... is exactly in the same place as tarteel and looks the same").
   What copied Tarteel is drawn again here, the rest of the app left as it was: the top row, the foot with the mic, the toast, the
   Mistakes sheet. page.css does the hidden words, the band and the word marks. */
/* The top row: the surah as a large title with no card, its bookmark beside it, and one capsule of three buttons at the end. */
.practice-screen .lesson-top{align-items:center;gap:0;min-height:62px;padding:max(8px,env(safe-area-inset-top)) 12px 4px 18px;background:var(--chrome)}
.practice-screen .page-card{order:0;flex-direction:row;align-items:center;min-height:0;height:auto;margin-right:6px;padding:0;border-radius:0;background:none;overflow:visible}
.card-go{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;padding:0;text-align:left;color:inherit;cursor:pointer}
.practice-screen .page-card strong{font-size:23px;font-weight:650;line-height:1.15;letter-spacing:-.4px}
.practice-screen .page-card .meta{display:flex;margin-top:1px;font-size:11.5px;line-height:16px;letter-spacing:0}
.page-card .meta .where{min-width:0;overflow:hidden;text-overflow:ellipsis}
.page-card .meta .key{flex-shrink:0}
.page-card .bookmark{position:relative;width:38px;height:44px;flex-shrink:0;display:grid;place-items:center;color:var(--mark-off)}
.page-card .bookmark::after{content:'';position:absolute;inset:0}
.page-card .bookmark[aria-pressed=true]{color:var(--accent)}
.page-card .bookmark svg{width:20px;height:20px;stroke:none}
.practice-screen .lesson-top>.icon-btn{order:1;width:40px;height:42px;margin:0;border-radius:0;background:var(--surface);color:var(--ink);border:solid var(--line);border-width:1px 0}
.practice-screen .lesson-top>.icon-btn svg{width:21px;height:21px;stroke-width:1.9}
.practice-screen .lesson-top>[data-action=practice-prefs]{order:2;width:42px;padding-left:2px;border-width:1px 0 1px 1px;border-radius:21px 0 0 21px}    /* PM L-413: the search button is gone */
.practice-screen .lesson-top>[data-action=menu]{order:3;width:42px;padding-right:2px;border-width:1px 1px 1px 0;border-radius:0 21px 21px 0}
.pop-menu{top:calc(max(8px,env(safe-area-inset-top)) + 50px);left:auto;right:10px;border:1px solid var(--line);box-shadow:var(--shadow)}
/* The foot: a long strip for the mic along the bottom, the tools (Mistakes, the page's options, the eye) in a row over it. While it
   listens the strip holds the words just heard and the time. */
.practice-bar{position:relative;flex-shrink:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 0;min-height:0;padding:6px 14px max(12px,env(safe-area-inset-bottom)) 14px;background:var(--chrome);overflow-x:clip}
.practice-bar .mistakes-pill{height:40px;min-height:40px;margin-right:8px;padding:0 13px;font-size:13px;font-weight:650;line-height:1}
.practice-bar .round{width:40px;height:40px}
.practice-bar .round svg,.practice-bar .book svg{width:20px;height:20px;stroke-width:2}
.practice-bar .book{margin-right:8px}
.practice-bar .fab{order:5;flex:1 0 100%;display:flex;align-items:center;justify-content:center;gap:12px;width:100%;height:58px;padding:0 22px;border-radius:29px;background:var(--accent-grad);color:var(--accent-ink);font-size:17px;font-weight:700;line-height:1;box-shadow:0 8px 20px -10px var(--glow)}
.practice-bar .fab svg{width:25px;height:25px;stroke-width:2.2}
.practice-bar .fab::after{content:'Recite'}
.practice-bar .fab[data-state=connecting]{background:var(--mic-busy)}
.practice-bar .fab[data-state=connecting] svg{width:21px;height:21px;stroke-width:2.6;animation:fab-spin .8s steps(8) infinite}
@keyframes fab-spin{to{transform:rotate(1turn)}}
.practice-bar .fab[data-state=on]{justify-content:flex-start;padding:0 20px;background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--accent)}
.practice-bar .fab[data-state=on] svg{width:22px;height:22px;color:var(--accent)}
.practice-bar .fab[data-state=on]::after{content:none}
.practice-bar:has(.heard-line[hidden]) .fab[data-state=on]::after{content:'Listening';font-weight:600}
.practice-bar .fab:active:not(:disabled){transform:scale(.985)}
.rec-timer{right:30px;left:auto;bottom:calc(max(12px,env(safe-area-inset-bottom)) + 18px);z-index:1;background:none;padding:0;height:22px;font-size:14px;font-weight:600;gap:7px;pointer-events:none}
.heard-line{left:62px;right:104px;bottom:calc(max(12px,env(safe-area-inset-bottom)) + 18px);z-index:1}
/* The Next lesson chip stays where v51 had it, just over the foot; its tap area reaches 2 px past it, never down into the tools row (it
   used to reach 14 px down) and never up over the page's last line (2026-10-28 review). */
.resume-chip::after{inset:-2px 0 -2px}
/* The note over the page: a paper card with a gold edge, not a black toast. */
.practice-bar .notice,.practice-bar .notice.error,.lesson-controls>.notice,.lesson-controls>.notice.error{position:absolute;z-index:7;left:50%;bottom:calc(100% + 4px);translate:-50% 0;width:max-content;max-width:calc(100% - 32px);margin:0;padding:8px 14px;border-radius:12px;background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:var(--shadow),inset 3px 0 var(--accent);font-size:13px;font-weight:500;line-height:1.35;text-align:center}
.practice-bar .notice.error,.lesson-controls>.notice.error{box-shadow:var(--shadow),inset 3px 0 var(--miss)}
/* While ayat are chosen an error note sits over their bar, as every other note does, never on Learn (2026-10-28 review). */
.practice-bar.picked .notice.error{bottom:calc(100% + 36px)}
/* While the mic connects (a tap on Recite, or the page turning while he recites) the strip is gold: the words just heard wait under it,
   a page turn shows no word on it (he is still reciting), and the time takes the strip's own ink (2026-10-28 review). */
.practice-bar:has(>.fab[data-state=connecting]) .heard-line{visibility:hidden}
.practice-bar:not(:has(>.heard-line[hidden])) .fab[data-state=connecting]::after{content:none}
.practice-bar:has(>.fab[data-state=connecting]) .rec-timer{color:var(--accent-ink)}
.practice-bar:has(>.fab[data-state=connecting]) .rec-timer i{background:currentColor}
/* Narrow phones (2026-10-28 review). At 380 px or less (his phone is 360) the page, juz and hizb line takes v51's size again, so it
   fits beside the ayah's number while he recites, and the surah's name is 22 px, so the longest (Al-Mumtahanah, Al-Muddaththir) is
   whole; under 360 px the name shrinks with the screen. Wider phones keep the 23 px he saw. */
@media(max-width:380px){.practice-screen .page-card{margin-right:0}.practice-screen .page-card .meta{font-size:11px;letter-spacing:-.1px}html:not([dir=rtl]) .practice-screen .page-card strong{font-size:22px}}
@media(max-width:359px){html:not([dir=rtl]) .practice-screen .page-card strong{font-size:clamp(16px,calc((100vw - 192px)/7.7),22px)}}
@media(max-width:340px){.practice-screen .page-card .meta{font-size:10.5px}}
/* The Mistakes sheet: one card for each mistake, the ayah's number as plain text, round buttons for what to do with it, and the two
   lines (what was expected, what was said) each behind its own small label. */
.mistake-list{display:flex;flex-direction:column;gap:10px}
.mrow{padding:10px 12px 12px;border:1px solid var(--line);border-radius:18px;background:var(--bg)}
.mrow-head{min-height:40px;gap:6px}
.vkey{order:2;padding:0;border:0;border-radius:0;font-size:13px;font-weight:500;color:var(--muted)}
.mkind{order:1;flex:1;min-width:0;margin-left:0;font-size:16px;font-weight:650}
.mrow-head>.micon{order:3}
.micon{width:36px;height:36px;border-radius:12px;background:var(--card)}
.micon svg{width:20px;height:20px}
.mbox{margin-top:4px;padding:0;border:0;border-radius:0}
.mline{align-items:center;gap:0 10px;padding:6px 0;flex-wrap:nowrap}
.mline+.mline{border-top:1px dashed var(--line)}
.mline small{flex-shrink:0;min-width:60px;padding:2px 8px;border-radius:99px;background:var(--accent-tint);color:var(--accent-text);font-size:11.5px;font-weight:650;text-align:center}
.mline:last-child small{background:color-mix(in srgb,var(--miss) 14%,transparent);color:var(--miss-text)}
.mrow .arabic{flex:1;min-width:0;text-align:right}
.mrow.helped,.mrow.past{padding-bottom:6px}

/* v53: the page never changes size (Muhammad, 2026-10-28: "the page size shouldnt change", Tarteel's page in his screenshots, the
   lines in the same place with the bars shown and hidden). In Practice and in a lesson the page's box is the whole screen, and its
   padding is a fixed room at the top (the taller top bar, 62 px with no notch) and at the foot (Practice's foot, 124 px), the same
   on both screens; the bars float over that room, so showing or hiding them, the choose bar, a caption, Practice or a lesson, or
   another page never moves a line (mushaf.js fits the page to the room once). A tap anywhere on the room is a tap on the page. */
.lesson-screen,.practice-screen{position:relative;overflow:hidden;--stage-top:calc(max(8px,env(safe-area-inset-top)) + 54px);--stage-bottom:calc(max(12px,env(safe-area-inset-bottom)) + 112px)}
.lesson-screen .mushaf,.practice-screen .mushaf{position:absolute;inset:0;flex:none;min-height:0;overflow:hidden;padding:calc(var(--stage-top) + 4px) 0 var(--stage-bottom)}
.lesson-screen>.lesson-top,.practice-screen>.lesson-top{position:absolute;z-index:4;top:0;left:0;right:0}
/* Only a page taller than its room scrolls (2026-10-28 review: the phone turned sideways, the page at its smallest, half of it was
   behind the foot): its last line comes up over the foot, its first under the top bar. mushaf.js sets tall. */
:is(.lesson-screen,.practice-screen) .mushaf.tall{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;padding-bottom:calc(var(--stage-bottom) + 14px)}    /* +14: the 38 px under the last line, as upright (the page number's 24 in it) */
:is(.lesson-screen,.practice-screen) .mushaf.tall::-webkit-scrollbar{display:none}
.practice-bar{position:absolute;z-index:4;left:0;right:0;bottom:0}
.lesson-controls{position:absolute;z-index:5;left:0;right:0;bottom:0}
.practice-screen.bare>.page-head{position:absolute;z-index:3;top:0;left:0;right:0;pointer-events:none}
/* The guide's words (2026-10-28 review: a long one covered the page's last line): just over the five buttons, over the step's
   pill (it says Listen meanwhile; Skip under the play button skips the intro as Skip intro does), so up to 4 lines fit in the room
   under the last line, never on it. Bare, low over the foot as before. */
.lesson-controls>.caption{bottom:calc(52px + max(4px,env(safe-area-inset-bottom)) + 2px);padding:0 14px;border-block:7px solid transparent}    /* a border, not padding: a 5th line is cut at the 4th, never peeking under it */
.lesson-controls:has(>.caption:not([hidden]))>.notice{bottom:calc(52px + max(4px,env(safe-area-inset-bottom)) + 8px + var(--cap-h,0px))}
/* While Skip intro shows (2026-10-28 review: the caption hid its label, "ip intro"), the caption keeps to the rest of the row, 18 px
   clear of the button (its width, --skip-w, from app.js capFit; rtl.css mirrors it); slim, the button keeps only its arrow. */
.lesson-screen:not(.bare) .lesson-controls:has(.skip-intro:not([hidden]))>.caption{left:calc((100% - var(--skip-w,0px) - 18px)/2);max-width:calc(100% - var(--skip-w,0px) - 34px)}
.lesson-controls .skip-intro.slim{justify-content:center;width:38px;padding:0;gap:0}
.lesson-controls .skip-intro.slim>.si-t{display:none}
/* Turning the page: the page beside comes in with a thin double line between the two, as a book's (his screenshot, 2026-10-28). */
.mushaf.aside{pointer-events:none}
.mushaf.aside::after{content:'';position:absolute;z-index:2;top:0;bottom:0;width:4px;border:solid var(--line);border-width:0 1px}
.mushaf.aside.at-l::after{right:0}
.mushaf.aside.at-r::after{left:0}
.practice-screen .mushaf:is(.edge-next,.edge-prev){box-shadow:none}
/* "Delete my recordings" asks in Ayah's own sheet (2026-10-28 review: it was the browser's box, with English around the Arabic in
   Arabic): over the screen wherever Settings is scrolled to, Cancel first, Delete in red. */
.sheet-scrim.ask{position:fixed}
.sheet.ask-sheet{position:fixed;left:50%;right:auto;width:min(100%,440px);translate:-50% 0}
.ask-sheet .ask-t{margin:0 0 18px;font-size:15px;line-height:1.45;color:var(--muted)}
.ask-sheet .ask-row{display:flex;gap:10px}
.ask-sheet .btn{flex:1;min-height:48px;padding:0 18px;border:0;border-radius:999px;background:var(--card);color:var(--ink);font:inherit;font-size:16px;font-weight:650}
.ask-sheet .btn.danger{background:none;color:var(--miss-text,var(--miss));box-shadow:inset 0 0 0 1.5px currentColor}
.ask-sheet .btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* v53 (2026-10-28): Revise asks how, in Ayah's own sheet (Test me first or Revise first), two big choices, the last one marked; the
   choose bar has Revise beside Learn, a plain pill so Learn stays the main action. */
.sheet-scrim.revise{position:fixed}
.sheet.revise-sheet{position:fixed;left:50%;right:auto;width:min(100%,440px);translate:-50% 0}
.revise-choices{display:flex;flex-direction:column;gap:10px;padding:2px 0 6px}
.revise-choice{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:76px;padding:14px 18px;border:1.5px solid var(--line);border-radius:18px;background:var(--card);color:var(--ink);font:inherit;text-align:start;cursor:pointer}
.revise-choice strong{font-size:17px;font-weight:700;line-height:1.3}
.revise-choice small{font-size:14px;line-height:1.4;color:var(--muted)}
.revise-choice.last{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.revise-choice:active{transform:scale(.985)}
.revise-choice:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.pick-revise{position:relative;flex-shrink:0;display:inline-flex;align-items:center;height:24px;padding:0 11px;border-radius:999px;background:var(--card);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line);font-size:13px;font-weight:700}
.pick-revise:active{transform:scale(.96)}
.pick-revise::after{content:'';position:absolute;inset:-13px -4px -7px}
/* On a narrow phone (2026-10-28 review, 320 px in Arabic: Revise beside Learn cut the range to "٤٦:٢١ إلـ..."), the count and the
   range stack in the bar, so the whole range shows. */
@media (max-width:359px){.pick-t{flex-direction:column;align-items:flex-start;gap:0}.pick-t strong{font-size:13px;line-height:14px}.pick-t small{max-width:100%;font-size:11px;line-height:13px}}

/* v55 foot: Muhammad, 2026-10-29: "this looks like tarteel, need to change it", "the page is too small", "this whole thing occupies too much
   space". Practice's foot is one row 50 px tall in place of three rows (116): Recite takes the start half, a capsule of the three tools
   (Mistakes, the page's options, the veil) the other, and the resume chip, the timer and the words just heard float over the free
   strip under the page's last line, so the page's room grows by the height the foot gave up. The icons are Ayah's own: a page for the
   page's options, the soft slots of a hidden page for the veil, an eye over one word or three for the two peeks. */
.practice-screen{--stage-bottom:calc(max(10px,env(safe-area-inset-bottom)) + 56px)}
.practice-screen .practice-bar{flex-wrap:nowrap;gap:0;min-height:0;padding:6px 12px max(10px,env(safe-area-inset-bottom)) 12px}
.practice-screen .practice-bar .bar-gap{display:none}
.practice-screen .practice-bar .fab{order:1;flex:1 1 0;min-width:112px;width:auto;height:50px;margin:0 0 0 8px;padding:0 14px;gap:9px;border-radius:25px;font-size:16px}
.practice-screen .practice-bar .fab svg{width:23px;height:23px}
.practice-screen .practice-bar .fab[data-state=on]{padding:0 14px;justify-content:flex-start}
.practice-screen .practice-bar .fab[data-state=on]::after{content:'Listening';font-weight:600}
.practice-screen .practice-bar :is(.mistakes-pill,.book,.eye-group){height:50px;min-height:50px;margin:0;border:1px solid var(--line);border-radius:0;background:var(--surface);box-shadow:none}
.practice-screen .practice-bar .mistakes-pill{padding:0 14px;border-start-start-radius:25px;border-end-start-radius:25px;font-size:14px;font-weight:650}
.practice-screen .practice-bar.tight .mistakes-pill{padding:0 9px;font-size:12.5px;letter-spacing:-.2px}
.practice-screen .practice-bar .mistakes-pill.has{border-color:var(--miss-fill);background:var(--miss-fill);color:#fff}
.practice-screen .practice-bar .book{width:46px;margin-left:-1px}
.practice-screen .practice-bar .book svg{width:21px;height:21px;stroke-width:1.9}
.practice-screen .practice-bar .eye-group{position:relative;z-index:1;gap:0;margin-left:-1px;border-start-end-radius:25px;border-end-end-radius:25px}
.practice-screen .practice-bar .eye-group .round{width:44px;height:48px;border-radius:0;background:none;box-shadow:none}
.practice-screen .practice-bar .eye-group .round svg{width:21px;height:21px;stroke-width:1.9}
.practice-screen .practice-bar .eye-group .peek{border-left:1px solid var(--line);box-shadow:none}
.practice-screen .practice-bar .eye-group .peek+.peek{margin:0}
.practice-screen .practice-bar .eye-group.on{border-color:var(--peek-edge);box-shadow:0 0 0 1px var(--peek-edge),0 2px 10px -2px var(--peek-glow)}
.practice-screen .practice-bar .eye-group.on .eye{color:var(--accent-text,var(--ink))}
.practice-screen .practice-bar:has(.eye-group.on) .fab{flex:0 0 50px;min-width:0;width:50px;padding:0;justify-content:center;margin-left:auto}
html:not([dir=rtl]) .practice-screen .practice-bar:has(.eye-group.on) .eye-group{margin-right:8px}
.practice-screen .practice-bar:has(.eye-group.on) .fab::after{content:none!important}
/* The timer and the words just heard float over the strip under the page's last line, where the resume chip sits while idle. */
.practice-screen .practice-bar .rec-timer{left:12px;right:auto;bottom:calc(100% + 8px);height:24px;padding:0 10px 0 9px;background:var(--timer-bg);color:var(--timer-ink);font-size:13px;z-index:6}
.practice-screen .practice-bar:has(>.fab[data-state=connecting]) .rec-timer{color:var(--timer-ink)}
.practice-screen .practice-bar:has(>.fab[data-state=connecting]) .rec-timer i{background:#F4BA3C}
.practice-screen .practice-bar .heard-line{left:86px;right:12px;bottom:calc(100% + 8px);height:24px;line-height:24px;z-index:6}
.practice-screen .practice-bar:has(.rec-timer:not([hidden])) .notice{bottom:calc(100% + 38px)}
.practice-screen .practice-bar .resume-chip{bottom:calc(100% + 6px)}
.practice-screen .practice-bar .resume-chip::after{inset:-8px 0 -8px}
/* The smallest phones (320 px): the capsule would crowd Recite, so Recite takes its own row under it, as before. */
@media(max-width:339px){
  .practice-screen{--stage-bottom:calc(max(10px,env(safe-area-inset-bottom)) + 118px)}
  .practice-screen .practice-bar{flex-wrap:wrap;row-gap:6px}
  .practice-screen .practice-bar .fab,.practice-screen .practice-bar:has(.eye-group.on) .fab{order:5;flex:1 0 100%;width:100%;margin:0;padding:0 14px;justify-content:center}
  .practice-screen .practice-bar:has(.eye-group.on) .fab::after{content:'Recite'!important}
  .practice-screen .practice-bar:has(.eye-group.on) .fab[data-state=on]::after{content:'Listening'!important}
}


/* PM L-425: the revision's proposal, in the chosen ayat card's place, the section highlighted on the page above it */
.pick-card.offer-card .of-t{font-size:17px;line-height:1.35;white-space:normal}
.pick-card.offer-card .of-what{margin:0;font-size:15px;font-weight:600;color:var(--accent,#2f6f5e)}
.pick-card.offer-card .of-lines{display:flex;flex-direction:column;gap:4px}
.pick-card.offer-card .of-lines p{margin:0;font-size:14px;line-height:1.4;color:var(--muted,#666)}
.pick-card.offer-card .of-nav{direction:ltr;flex-direction:row;display:flex;align-items:center;justify-content:center;gap:14px;font-size:14px;font-variant-numeric:tabular-nums}
.pick-card.offer-card .of-nav .pc-edit{min-width:44px;min-height:36px;display:inline-flex;align-items:center;justify-content:center}
.pick-card.offer-card .of-nav .pc-edit:disabled{opacity:.35}
.pick-card.offer-card .of-go{background:var(--accent-grad,var(--accent,#2f6f5e));color:#fff}

/* PM L-431: the noisy room line, under the top bar on the page, calm, one tap to close */
.practice-screen>.noise-tip{position:absolute;z-index:8;left:16px;right:16px;top:calc(max(12px,env(safe-area-inset-top)) + 70px);display:flex;align-items:center;gap:12px;
  padding:12px 12px 12px 16px;border-radius:16px;background:var(--card,#fff);color:var(--ink,#1c1c1c);box-shadow:0 10px 30px -12px rgba(0,0,0,.35),inset 0 0 0 1px var(--line,rgba(0,0,0,.08));animation:noise-in .3s ease-out both}
.practice-screen>.noise-tip p{flex:1;margin:0;font-size:15px;line-height:1.4}
.practice-screen>.noise-tip .noise-ok{flex:none;min-width:56px;min-height:40px;border:0;border-radius:12px;background:var(--accent,#2f5fd0);color:#fff;font:inherit;font-weight:600}
@keyframes noise-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.practice-screen>.noise-tip{animation:none}}
