/* Ruqyah — the verses and duas, with the whole recitation in one reader's voice */
@font-face { font-family: "KFGQPC Hafs"; font-display: swap; src: url(../assets/qurancomplex/kfgqpc_hafs_v30.ttf) format("truetype"); }
:root {
  --paper: #f6f1e3; --page: #fffdf7; --ink: #1d2420; --muted: #6e6650; --green: #0f5a47; --green-2: #123a30; --gold: #a07c2e; --gold-2: #c9a24f;
  --line: #e7dcc0; --hl: rgba(201, 162, 79, .22); --ui: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--ui); line-height: 1.7; padding-bottom: 40px; }
a { color: var(--green); }

.top { max-width: 760px; margin: 0 auto; padding: 14px 16px 4px; display: flex; align-items: center; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; }
.crumbs a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); text-decoration: none; padding: 4px 8px; border-radius: 10px; white-space: nowrap; }
.crumbs a:hover, .crumbs a:focus-visible { background: var(--hl); outline: none; }
.crumbs .home { padding-inline-start: 2px; }
.crumbs svg { width: 28px; height: 28px; flex: none; }
.crumbs .sep { color: var(--gold-2); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.hero { text-align: center; padding: 18px 0 8px; }
.hero h1 { margin: 0; font-family: "Amiri", serif; font-size: clamp(2.1rem, 7vw, 2.8rem); color: var(--green-2); line-height: 1.3; }
.hero p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.note { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: #f0eadb; border: 1px solid var(--line); font-size: .9rem; color: #4d473a; }
.note b { color: var(--green); }

/* the player */
.player { position: sticky; top: 8px; z-index: 20; margin: 16px 0 10px; padding: 12px 14px; border-radius: 18px; background: var(--green-2); color: #f3ead2; box-shadow: 0 12px 30px rgba(18, 58, 48, .25); }
.reader { display: flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 600; }
.reader select { flex: 1; min-width: 0; font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink); background: #fbf6e8; border: 0; border-radius: 10px; padding: .45rem .6rem; }
.ctrl { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.play { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: .65rem 1rem; font: inherit; font-weight: 700; font-size: 1rem; color: var(--green-2); background: #f5c95a; cursor: pointer; min-width: 200px; }
.play svg { width: 20px; height: 20px; fill: currentColor; }
.play .i-pause, .player.on .play .i-play { display: none; }
.player.on .play .i-pause { display: block; }
.rounds { display: inline-flex; background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 3px; }
.rounds label { display: flex; }
.rounds input { position: absolute; opacity: 0; pointer-events: none; }
.rounds span { padding: .35rem .75rem; border-radius: 9px; font-size: .85rem; font-weight: 600; cursor: pointer; color: #e8dcbc; }
.rounds input:checked + span { background: #fbf6e8; color: var(--green-2); }
.rounds input:focus-visible + span { outline: 2px solid #f5c95a; }
.now { margin: 8px 2px 0; font-size: .86rem; min-height: 1.5em; color: #e8dcbc; }
.bar { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: #f5c95a; transition: width .3s ease; }

/* the verses */
.isti { text-align: center; font-family: "Amiri", serif; font-size: 1.25rem; color: var(--muted); margin: 14px 0 6px; }
.parts { display: grid; gap: 12px; }
.part { background: var(--page); border-radius: 18px; padding: 12px 16px 14px; border: 1px solid var(--line); }
.partHead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.partHead h2 { margin: 0; font-size: 1rem; color: var(--green); }
.partHead small { color: var(--gold); font-weight: 600; font-size: .8rem; white-space: nowrap; }
.bsm { text-align: center; font-family: "KFGQPC Hafs", "Amiri", serif; font-size: 1.45rem; color: var(--ink); line-height: 2; }
.ayat { font-family: "KFGQPC Hafs", "Amiri", serif; font-size: 1.55rem; line-height: 2.15; text-align: justify; text-align-last: center; }
.ay { cursor: pointer; border-radius: .3em; padding: .05em .1em; transition: background-color .2s ease; -webkit-tap-highlight-color: transparent; }
.ay:hover { background: rgba(201, 162, 79, .1); }
.ay.on { background: var(--hl); }
.bsm.on, .isti.on { background: var(--hl); border-radius: 10px; }
/* the ayah number in its ornament (the same as the Quran page) */
.num { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; margin-inline: .12em .04em; vertical-align: -.16em; font-family: "Amiri", serif; color: #7a5d17; line-height: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='34' fill='%23FBF3DF'/%3E%3Cg fill='none' stroke='%23A07C2E'%3E%3Ccircle cx='50' cy='50' r='39' stroke-width='5'/%3E%3Ccircle cx='50' cy='50' r='31.5' stroke-width='2'/%3E%3C/g%3E%3Cg fill='%23A07C2E'%3E%3Ccircle cx='95' cy='50' r='4.2'/%3E%3Ccircle cx='81.8' cy='81.8' r='4.2'/%3E%3Ccircle cx='50' cy='95' r='4.2'/%3E%3Ccircle cx='18.2' cy='81.8' r='4.2'/%3E%3Ccircle cx='5' cy='50' r='4.2'/%3E%3Ccircle cx='18.2' cy='18.2' r='4.2'/%3E%3Ccircle cx='50' cy='5' r='4.2'/%3E%3Ccircle cx='81.8' cy='18.2' r='4.2'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
.num b { font-size: .5em; font-weight: 700; }
.num.d3 b { font-size: .4em; }

/* the duas */
.duas { margin-top: 18px; }
.duas h2 { margin: 0 0 2px; font-size: 1.15rem; color: var(--green-2); text-align: center; }
.hint { margin: 0 0 10px; text-align: center; color: var(--muted); font-size: .85rem; }
.dua { background: var(--page); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 10px; margin-bottom: 10px; }
.dua p { margin: 0; font-family: "Amiri", serif; font-size: 1.3rem; line-height: 2; text-align: center; }
.duaFoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.duaFoot small { color: var(--gold); font-weight: 600; }
.count { display: inline-flex; align-items: baseline; gap: 4px; border: 0; border-radius: 99px; padding: .4rem 1rem; font: inherit; color: #fff; background: var(--green); cursor: pointer; min-width: 92px; justify-content: center; transition: transform .1s ease; }
.count:active { transform: scale(.96); }
.count b { font-size: 1.15rem; }
.count span { font-size: .8rem; }
.dua.done { border-color: #9fcdb9; background: #f1f8f3; }
.dua.done .count { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }

.credit { margin-top: 22px; font-size: .78rem; color: var(--muted); text-align: center; line-height: 1.9; }

@media (max-width: 520px) {
  .ayat { font-size: 1.4rem; line-height: 2.05; }
  .play { min-width: 0; }
  .crumbs { font-size: .8rem; gap: 2px; } .crumbs a { padding: 4px 5px; } .crumbs svg { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* the phone's own voice for the duas (labelled «صوت آلي») */
.duaBtns { display: flex; align-items: center; gap: 8px; }
.spk { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--green); border-radius: 99px; padding: .35rem .8rem; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.spk svg { width: 14px; height: 14px; fill: currentColor; }
.spk small { font-weight: 500; font-size: .68rem; color: var(--muted); }
.spk.on { background: var(--green); color: #fff; border-color: var(--green); }
.spk.on small { color: #d8eadf; }
@media (max-width: 420px) { .duaFoot { flex-wrap: wrap; justify-content: center; } .duaFoot > small { flex-basis: 100%; text-align: center; } }
.dua .spkNote, .spkNote { font-family: var(--ui); margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: #fff6e0; border: 1px solid #f1dca6; color: #6d4a07; font-size: .85rem; line-height: 1.8; text-align: center; }
.voiceRow { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -4px 0 10px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.voiceRow select { font: inherit; font-weight: 600; color: var(--ink); background: var(--page); border: 1px solid var(--line); border-radius: 10px; padding: .3rem .5rem; max-width: 70vw; }
