@font-face{font-family:"Amiri Quran";src:url("assets/fonts/AmiriQuran.ttf")}
.mushafTools{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.mushafTools label{display:grid;gap:5px;flex:1;min-width:105px;font-weight:700}.mushafTools select,.mushafTools input{width:100%;border:1px solid var(--line);border-radius:12px;padding:10px;background:#fff;color:var(--ink)}.mushafPager{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:18px 0}.mushafPager .btn{font-size:12px}.quranPaper{min-height:290px;background:#fffdf7;border:2px solid #cfb98b;border-radius:18px;padding:19px 12px;text-align:center}.quranLine{font-family:"Traditional Arabic", "Amiri Quran",serif;font-size:25px;line-height:2.15}.quranWord,.ayahMark{border:0;background:transparent;color:#27251f;padding:0 1px;font:inherit;line-height:inherit}.quranWord.selected{background:#f6e8ae;border-radius:5px}.ayahMark{color:var(--gold);font-size:19px}.surahHeading{font-family:Georgia,serif;color:var(--deep);font-size:22px;border-block:1px solid var(--gold);padding:6px;margin:14px 0}.basmala{display:block;font-size:25px;margin:10px}.tafsirTabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}.tafsirTabs .selected{background:var(--deep);color:#fff}.tafsirText{white-space:pre-wrap;line-height:1.9;min-height:70px}

.mushafTools[hidden]{display:none}
@font-face{font-family:"Amiri Quran";src:url("assets/fonts/AmiriQuran.ttf") format("truetype");font-style:normal;font-weight:400;font-display:swap}
/* An interactive Madinah-style leaf; each Quran line still uses the existing page data. */
.quranPaper{position:relative;isolation:isolate;background:#fffcf6;color:#211b18;border:1px solid #bfa486;border-radius:19px 25px 25px 19px;box-shadow:inset 0 0 0 5px #fffcf6,inset 0 0 0 7px #d0b99a,5px 1px 0 #eee5d9,9px 2px 0 #d9c8b4,0 12px 25px #5b3d251a;padding:20px 17px 17px;overflow:hidden}
.quranPaper::before{content:"";position:absolute;inset:9px;border:1px solid #e3d1b8;border-radius:13px 17px 17px 13px;pointer-events:none;z-index:-1}
.mushafMeta,.mushafFoot{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#9a7959;font-size:13px;font-weight:500}
.mushafMeta{padding:2px 6px 12px}.mushafFoot{padding:16px 6px 2px;font-size:12px}
.mushafText{direction:rtl}.quranLine{font-family:"Amiri Quran","Traditional Arabic",serif;font-size:clamp(20px,5.4vw,32px);font-weight:400;line-height:2.05;text-align:justify;text-align-last:justify;min-height:1.95em;color:#211b18}
.quranWord,.ayahMark{font-family:inherit;font-size:inherit;font-weight:400;line-height:inherit;vertical-align:baseline;color:inherit;padding:0;border:0;background:none}
.quranWord{white-space:nowrap}.quranWord.selected{background:#f7e9b5;border-radius:4px}
.ayahMark{display:inline-grid;place-items:center;vertical-align:middle;line-height:1;width:1.65em;height:1.65em;min-width:1.65em;background:url("assets/ayah-rosette.svg") center/contain no-repeat;color:#8a683e;font-family:"IBM Plex Sans Arabic",sans-serif;font-size:.61em;font-weight:500;white-space:nowrap}
.surahHeading{display:flex;align-items:center;justify-content:center;position:relative;margin:10px 0 4px;padding:5px 3px;border:2px double #aa855d;border-radius:9px;background:radial-gradient(circle at 7% 50%,#c3a67e 0 3px,transparent 4px),radial-gradient(circle at 93% 50%,#c3a67e 0 3px,transparent 4px),linear-gradient(90deg,#f1e4d2,#fff8ed 25%,#fff8ed 75%,#f1e4d2);box-shadow:inset 0 0 0 3px #fff7e9,inset 0 0 0 4px #c9a983;color:#4b3628;font:400 1.12em "Amiri Quran",serif;text-align:center;min-height:2.2em}
.surahHeading::before,.surahHeading::after{content:"۞";color:#b18b61;font:.9em "Amiri Quran",serif;flex:1;text-align:center}
.basmala{display:block;font-family:"Amiri Quran",serif;font-size:1.2em;line-height:1.8;text-align:center;text-align-last:center;margin:0 0 5px}
@media(max-width:500px){.quranPaper{margin-inline:-13px;padding:15px 11px 13px}.mushafMeta{padding-bottom:9px}.quranLine{font-size:clamp(19px,5.1vw,25px);line-height:2.12}.surahHeading{margin-top:7px}}
.quranLine{text-align:center;text-align-last:center}
.quranWord{margin-inline:.025em}
@media(min-width:700px){.quranLine{font-size:30px;line-height:2.05}}
.btn{border:0;background:var(--primary);color:white;border-radius:12px;padding:10px 15px}.btn.alt{background:#f3e7e9;color:var(--deep)}
/* Fixed source images preserve Quran glyphs and line layout. */
.mushafPageImage{display:block;width:100%;height:auto;max-width:1024px;margin:auto;object-fit:contain;mix-blend-mode:multiply;user-select:none}
.pageAyahTools{margin-top:18px}
.quranPaper{padding:16px 12px 12px;max-width:720px;margin-inline:auto}
@media(max-width:500px){.quranPaper{margin-inline:-13px;padding:14px 8px 10px}.mushafMeta{font-size:11px}.mushafFoot{padding-top:10px}}
