/* خط حفص — مجمع ملک فهد (KFGQPC Uthmanic Script HAFS)
   فایل اصلی و بدون تغییر: assets/fonts/hafs.ttf (KFGQPC Hafs V30) — مجوز: KFGQPC-Hafs-V30-license.docx */
@font-face {
  font-family: "KFGQPC Hafs";
  src: local("KFGQPC HAFS Uthmanic Script"), local("KFGQPC Uthmanic Script HAFS"), local("KFGQPCUthmanicScriptHAFS"),
       url("fonts/hafs.ttf") format("truetype");
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+25CC;
}
/* ==========================================================
   quranfa.com — هویت بصری: کاشی لاجوردی، فیروزه، طلای زعفرانی
   ========================================================== */
:root {
  --bg: #f8f5ee;
  --bg-2: #f1ece0;
  --surface: #fffdf8;
  --surface-2: #fbf8f0;
  --ink: #1a2433;
  --ink-2: #3a4658;
  --muted: #6c7686;
  --line: #e8e0cf;
  --line-2: #d9cdb2;
  --lapis: #1d3d70;
  --lapis-2: #2b5596;
  --lapis-deep: #10244a;
  --lapis-soft: #e6ecf6;
  --teal: #1f8a86;
  --teal-2: #3fb7ae;
  --teal-soft: #e2f3f1;
  --gold: #a87a26;
  --gold-2: #d4a548;
  --gold-3: #f0d58c;
  --gold-soft: #f8eed4;
  --rose: #a43d3a;
  --mark: #fbe39a;
  --tf-q: #1d4fa0;
  --tf-p: #1f7f7a;
  --tf-b: #8a5523;
  --shadow-sm: 0 1px 2px rgba(20, 30, 50, .05);
  --shadow: 0 1px 2px rgba(20, 30, 50, .04), 0 14px 34px -20px rgba(20, 36, 70, .28);
  --radius: 20px;
  --ar-size: 2.1rem;
  --tr-size: 1.08rem;

  --f-ui: "Vazirmatn", "Noto Naskh Arabic", "Noto Sans", Tahoma, sans-serif;
  --f-read: "Noto Naskh Arabic", "Vazirmatn", "Noto Serif", serif;
  --f-nast: "Noto Nastaliq Urdu", "Vazirmatn", serif;
  --f-head: "Vazirmatn", "Noto Naskh Arabic", "Noto Sans", sans-serif;
  --f-ar-osm: "KFGQPC Hafs", "Amiri Quran", "Amiri", "Scheherazade New", serif;
  --f-ar-simple: "Scheherazade New", "Amiri", "Noto Naskh Arabic", serif;
  --f-ar: var(--f-ar-osm);
  --f-ar-ui: "Amiri", "Noto Naskh Arabic", serif;
  --f-latin: "Noto Serif", Georgia, serif;

  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%2350c8bf' stroke-width='1'%3E%3Cpath d='M23.4 0H56.6L80 23.4V56.6L56.6 80H23.4L0 56.6V23.4Z'/%3E%3Crect x='27' y='27' width='26' height='26'/%3E%3Crect x='27' y='27' width='26' height='26' transform='rotate%2845 40 40%29'/%3E%3Ccircle cx='40' cy='40' r='6'/%3E%3C/g%3E%3C/svg%3E");
  --girih-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23c9a24f' stroke-width='1'%3E%3Cpath d='M23.4 0H56.6L80 23.4V56.6L56.6 80H23.4L0 56.6V23.4Z'/%3E%3Crect x='27' y='27' width='26' height='26'/%3E%3Crect x='27' y='27' width='26' height='26' transform='rotate%2845 40 40%29'/%3E%3Ccircle cx='40' cy='40' r='6'/%3E%3C/g%3E%3C/svg%3E");
  --tiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Crect width='24' height='12' fill='%231d3d70'/%3E%3Cpath d='M12 1.5l4.5 4.5L12 10.5 7.5 6z' fill='%233fb7ae'/%3E%3Cpath d='M12 4l2 2-2 2-2-2z' fill='%23fffdf7'/%3E%3Ccircle cx='0' cy='6' r='1.8' fill='%23d4a548'/%3E%3Ccircle cx='24' cy='6' r='1.8' fill='%23d4a548'/%3E%3C/svg%3E");
  --rosette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='%23e2f3f1' stroke='%23c9a24f' stroke-width='.9'%3E%3Ccircle cx='31' cy='20' r='6.6'/%3E%3Ccircle cx='27.8' cy='27.8' r='6.6'/%3E%3Ccircle cx='20' cy='31' r='6.6'/%3E%3Ccircle cx='12.2' cy='27.8' r='6.6'/%3E%3Ccircle cx='9' cy='20' r='6.6'/%3E%3Ccircle cx='12.2' cy='12.2' r='6.6'/%3E%3Ccircle cx='20' cy='9' r='6.6'/%3E%3Ccircle cx='27.8' cy='12.2' r='6.6'/%3E%3C/g%3E%3Ccircle cx='20' cy='20' r='12.4' fill='%23fffdf7' stroke='%23c9a24f' stroke-width='1.2'/%3E%3C/svg%3E");
  --flower: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23d4a548'%3E%3Cellipse cx='12' cy='5.6' rx='2.1' ry='3.9' transform='rotate%280 12 12%29'/%3E%3Cellipse cx='12' cy='5.6' rx='2.1' ry='3.9' transform='rotate%2845 12 12%29'/%3E%3Cellipse cx='12' cy='5.6' rx='2.1' ry='3.9' transform='rotate%2890 12 12%29'/%3E%3Cellipse cx='12' cy='5.6' rx='2.1' ry='3.9' transform='rotate%28135 12 12%29'/%3E%3Cellipse cx='12' cy='5.6' rx='2.1' ry='3.9' transform='rotate%28180 12 12%29'/%3E%3Cellipse cx='12' cy='5.6' rx='2.1' ry='3.9' transform='rotate%28225 12 12%29'/%3E%3Cellipse cx='12' cy='5.6' rx='2.1' ry='3.9' transform='rotate%28270 12 12%29'/%3E%3Cellipse cx='12' cy='5.6' rx='2.1' ry='3.9' transform='rotate%28315 12 12%29'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='3' fill='%231f8a86'/%3E%3C/svg%3E");
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b1424;
  --bg-2: #101b30;
  --surface: #121e35;
  --surface-2: #16233d;
  --ink: #ebe6da;
  --ink-2: #c9c4b8;
  --muted: #8e98a8;
  --line: #22304b;
  --line-2: #31425f;
  --lapis: #8fb1ea;
  --lapis-2: #a9c3f0;
  --lapis-deep: #0a1730;
  --lapis-soft: #18284a;
  --teal: #5fd0c6;
  --teal-2: #6fd9cf;
  --teal-soft: #13353a;
  --gold: #e2bf73;
  --gold-2: #e2bf73;
  --gold-3: #f0d58c;
  --gold-soft: #2c2817;
  --mark: #5b4a17;
  --tf-q: #9cc0ff;
  --tf-p: #7fe0d6;
  --tf-b: #e3ad78;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px -18px rgba(0,0,0,.7);
  --rosette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='%23143b40' stroke='%23d4a548' stroke-width='.9'%3E%3Ccircle cx='31' cy='20' r='6.6'/%3E%3Ccircle cx='27.8' cy='27.8' r='6.6'/%3E%3Ccircle cx='20' cy='31' r='6.6'/%3E%3Ccircle cx='12.2' cy='27.8' r='6.6'/%3E%3Ccircle cx='9' cy='20' r='6.6'/%3E%3Ccircle cx='12.2' cy='12.2' r='6.6'/%3E%3Ccircle cx='20' cy='9' r='6.6'/%3E%3Ccircle cx='27.8' cy='12.2' r='6.6'/%3E%3C/g%3E%3Ccircle cx='20' cy='20' r='12.4' fill='%23121e35' stroke='%23d4a548' stroke-width='1.2'/%3E%3C/svg%3E");
  color-scheme: dark;
}
html[dir="ltr"] { --f-ui: "Noto Sans", "Vazirmatn", system-ui, sans-serif; --f-read: "Noto Serif", Georgia, serif; --f-head: "Noto Serif", Georgia, serif; }
[data-yazi="simple"] { --f-ar: var(--f-ar-simple); }
[data-arfont="hafs"] { --f-ar: "KFGQPC Hafs", "Amiri Quran", serif; }
[data-arfont="amiriquran"] { --f-ar: "Amiri Quran", "Amiri", serif; }
[data-arfont="naskh"] { --f-ar: "Noto Naskh Arabic", "Amiri", serif; }
[data-arfont="scheherazade"] { --f-ar: "Scheherazade New", "Amiri", serif; }
[data-arfont="amiri"] { --f-ar: "Amiri", "Amiri Quran", serif; }
.ar-osm { font-family: var(--f-ar-osm) !important; }
.ar-simple { font-family: var(--f-ar-simple) !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0; color: var(--ink); font: 400 16px/1.75 var(--f-ui);
  background: radial-gradient(1100px 520px at 50% -180px, var(--surface-2), transparent 70%) no-repeat, var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--teal); }
img, svg { display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal-2); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--gold-3); color: #1b1503; }
[hidden] { display: none !important; }
.ic { flex: none; }
html[dir="rtl"] .ic-left, html[dir="rtl"] .ic-right { transform: none; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { inset-inline-start: 8px; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(880px, 100% - 32px); }
.nast { font-family: var(--f-nast); font-weight: 700; line-height: 2.1; }
html:not([lang="fa"]) .nast { font-family: var(--f-head); line-height: 1.4; }

.readbar { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 60; pointer-events: none; }
.readbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal-2), var(--gold-2)); }

/* ---------- نوار کاشی ---------- */
.tileband { height: 8px; background: var(--tiles) repeat-x center / 16px 8px; opacity: .95; }

/* ---------- سربرگ ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.topbar-in { display: flex; align-items: center; gap: 16px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { filter: drop-shadow(0 3px 6px rgba(16, 36, 74, .25)); transition: transform .35s ease; }
.brand:hover .logo { transform: translateY(-2px); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font: 700 1.3rem/1.55 var(--f-nast); color: var(--lapis); }
.brand-text small { font: 600 .7rem/1.2 "Noto Sans", sans-serif; letter-spacing: .08em; color: var(--gold); direction: ltr; text-align: end; }
html[dir="ltr"] .brand-text small { text-align: start; }
.mainnav { display: flex; gap: 2px; margin-inline-start: 10px; }
.mainnav a { position: relative; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .93rem; color: var(--ink-2); }
.mainnav a::after { content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--teal-2); transform: scaleX(0); transition: transform .2s; }
.mainnav a:hover::after { transform: scaleX(.5); }
.mainnav a.on { color: var(--lapis); }
.mainnav a.on::after { transform: scaleX(1); }
.topsearch { flex: 1; max-width: 330px; margin-inline-start: auto; display: flex; align-items: center; gap: 8px; padding-inline: 12px; height: 42px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); transition: .15s; }
.topsearch:focus-within { border-color: var(--teal-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal-2) 18%, transparent); }
.topsearch input { border: 0; background: none; outline: 0; width: 100%; font-size: .9rem; color: var(--ink); }
.topactions { display: flex; gap: 2px; align-items: center; margin-inline-start: auto; }
.topsearch + .topactions { margin-inline-start: 0; }
.iconbtn { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; background: none; border-radius: 12px; color: var(--ink-2); padding: 0 8px; }
.iconbtn:hover { background: var(--bg-2); color: var(--ink); }
.js-menu { display: none; }
.langsw { position: relative; }
.langsw-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; min-width: 180px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 50; }
.langsw-menu a { display: block; padding: 9px 14px; border-radius: 10px; font-size: .95rem; text-align: start; }
.langsw-menu a:hover { background: var(--bg-2); }
.langsw-menu a[aria-current] { background: var(--teal-soft); color: var(--teal); font-weight: 700; }

/* ---------- دکمه‌ها ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  background: var(--lapis); color: #fff8e6; font-weight: 700; font-size: .92rem; white-space: nowrap; transition: filter .15s, transform .15s, border-color .15s; }
[data-theme="dark"] .btn { background: var(--teal); color: #05201f; }
.btn:hover { filter: brightness(1.12); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-soft, [data-theme="dark"] .btn-soft { background: var(--surface); color: var(--ink-2); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-soft:hover { border-color: var(--teal-2); color: var(--ink); filter: none; }
.btn-ghost, [data-theme="dark"] .btn-ghost { background: none; color: var(--ink-2); border-color: var(--line); }
.btn-gold, [data-theme="dark"] .btn-gold { background: linear-gradient(180deg, var(--gold-3), var(--gold-2)); color: #2a1f05; }
.btn-icon { width: 42px; padding: 0 !important; justify-content: center; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 1rem; border-radius: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.chip:hover { border-color: var(--teal-2); color: var(--ink); }
.chip-gold { background: var(--gold-soft); border-color: var(--gold-2); color: var(--gold); }
.chip-teal { background: var(--teal-soft); border-color: transparent; color: var(--teal); }
.chip-select { padding-inline: 12px 6px; }
.chip-select select { border: 0; background: none; outline: 0; font-weight: 600; color: inherit; height: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips.start { justify-content: flex-start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: var(--teal); }
html[dir="ltr"] .eyebrow { letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; }
.divider { display: flex; align-items: center; gap: 14px; margin: 44px 0 34px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.divider span { width: 26px; height: 26px; background: var(--flower) center/contain no-repeat; }

/* ---------- قهرمان صفحهٔ اصلی ---------- */
.hero { position: relative; overflow: hidden; color: #f6eedb;
  background: radial-gradient(70% 90% at 50% 0%, #2c5aa0 0%, var(--lapis) 45%, var(--lapis-deep) 100%); }
[data-theme="dark"] .hero { background: radial-gradient(70% 90% at 50% 0%, #1b3666 0%, #10244a 50%, #071226 100%); }
.hero-girih { position: absolute; inset: 0; background: var(--girih) center / 92px 92px; opacity: .22;
  -webkit-mask-image: radial-gradient(70% 80% at 50% 30%, #000 20%, transparent 95%); mask-image: radial-gradient(70% 80% at 50% 30%, #000 20%, transparent 95%); }
.hero::before { content: ""; position: absolute; inset-inline: 0; top: -40%; height: 90%; background: radial-gradient(closest-side, rgba(240, 213, 140, .25), transparent); pointer-events: none; }
.hero-in { position: relative; text-align: center; padding: 46px 0 86px; }
.hero-logo { display: flex; justify-content: center; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.hero-title { margin: 6px 0 4px; font-weight: 400; }
.hero-title .nast { display: block; font-size: clamp(2.8rem, 7vw, 4.6rem); line-height: 1.9;
  background: linear-gradient(180deg, #fbe7ad, #d4a548); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub-h { display: block; font: 700 clamp(1.15rem, 2.6vw, 1.55rem)/1.5 var(--f-head); color: #fff8e6; }
.hero-ar { font: 400 clamp(2.2rem, 6vw, 3.4rem)/1.6 var(--f-ar-ui); color: var(--gold-3); }
.hero-lead { margin: 10px auto 28px; max-width: 620px; color: #cbd8ee; font-size: 1.02rem; }
.hero-search { display: flex; align-items: center; gap: 10px; max-width: 660px; margin: 0 auto; padding: 7px; padding-inline-start: 18px;
  background: #fffdf7; border-radius: 999px; color: #6c7686; box-shadow: 0 24px 50px -20px rgba(0,0,0,.6), 0 0 0 6px rgba(255,255,255,.07); }
.hero-search input { flex: 1; border: 0; outline: 0; background: none; font-size: 1rem; color: #1a2433; min-width: 0; height: 46px; }
.hero-search .btn { border-radius: 999px; height: 46px; padding: 0 24px; }
.quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.quick a { padding: 6px 15px; border-radius: 999px; border: 1px solid rgba(240, 213, 140, .3); background: rgba(255,255,255,.04); color: #f0dcaa; font-size: .88rem; font-weight: 600; }
.quick a:hover { background: rgba(240, 213, 140, .16); color: #fff6dc; }
.arcade { position: absolute; inset-inline: 0; bottom: -1px; height: 26px;
  background: radial-gradient(circle at 50% 100%, var(--bg) 0 19px, transparent 20px) repeat-x bottom / 46px 26px; }
.hero-sm .hero-in { padding: 36px 0 74px; }

/* ---------- بخش بالای صفحهٔ اصلی ---------- */
.home-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin: 18px 0 44px; }
.daily { position: relative; padding: 30px 32px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.daily::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--tiles) repeat-x center / 12px 6px; }
.daily::after { content: ""; position: absolute; inset-inline-end: -40px; bottom: -40px; width: 200px; height: 200px; background: var(--girih-gold) center/100px; opacity: .1; border-radius: 50%; }
.daily-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.daily-date { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); font-weight: 500; }
.daily-ar { font: 400 calc(var(--ar-size) * 1.02)/2.25 var(--f-ar); margin: 14px 0 8px; text-align: right; position: relative; }
.daily-tr { font: 400 1.08rem/2 var(--f-read); color: var(--ink-2); margin: 0 0 14px; position: relative; }
.daily-ref { position: relative; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--teal); font-size: .92rem; }
.side-stack { display: flex; flex-direction: column; gap: 12px; }
.side-stack .card { padding: 16px 20px; }
.continue-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-weight: 700; font-size: 1.05rem; color: var(--lapis); }
.marks ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.marks li { display: flex; align-items: center; justify-content: space-between; }
.marks li a { padding: 3px 0; font-weight: 600; }
.marks li button { border: 0; background: none; color: var(--muted); padding: 4px 6px; border-radius: 6px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; border-radius: var(--radius); padding: 16px 8px;
  background: linear-gradient(160deg, var(--lapis-2), var(--lapis-deep)); color: #e6ecf8; position: relative; overflow: hidden; box-shadow: var(--shadow); }
[data-theme="dark"] .stats { background: linear-gradient(160deg, #1b3666, #0a1730); }
.stats::before { content: ""; position: absolute; inset: 0; background: var(--girih) center / 60px; opacity: .14; }
.stats div { position: relative; }
.stats b { display: block; font: 800 1.5rem/1.3 var(--f-ui); color: var(--gold-3); }
.stats span { font-size: .78rem; opacity: .85; }
.promo { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: .2s; }
.promo:hover { border-color: var(--teal-2); transform: translateY(-1px); color: inherit; box-shadow: var(--shadow); }
.promo > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.5; }
.promo b { font-weight: 700; }
.promo small { color: var(--muted); }
.promo-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--lapis-soft); color: var(--lapis); }
.promo-ic--t { background: var(--teal-soft); color: var(--teal); }

/* ---------- زبانه‌ها ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 24px; position: sticky; top: 86px; z-index: 5; }
.tab { padding: 8px 22px; border-radius: 999px; font-weight: 700; color: var(--muted); font-size: .95rem; }
.tab.on { background: var(--surface); color: var(--lapis); box-shadow: var(--shadow-sm); }
.tabpane { display: none; padding-bottom: 30px; }
.tabpane.on { display: block; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.pane-head h2 { font: 800 1.45rem var(--f-head); margin: 0; color: var(--ink); }
.filter { display: flex; align-items: center; gap: 8px; padding-inline: 14px; height: 42px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); }
.filter input { border: 0; background: none; outline: 0; width: 190px; color: var(--ink); }
.filter.big { max-width: 460px; margin: 18px auto 0; height: 50px; }
.filter.big input { width: 100%; }

/* ---------- کارت سوره ---------- */
.sura-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.sura-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; transition: border-color .25s, transform .25s, box-shadow .25s; overflow: hidden; }
.sura-card::after { content: ""; position: absolute; inset-inline-start: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--teal-2); opacity: 0; transition: opacity .25s; }
.sura-card:hover { border-color: color-mix(in srgb, var(--teal-2) 60%, var(--line)); transform: translateY(-1px); box-shadow: var(--shadow); color: inherit; }
.sura-card:hover::after { opacity: 1; }
.sc-no { flex: none; width: 46px; height: 46px; display: grid; place-items: center; background: var(--rosette) center/contain no-repeat; }
.sc-no span { font: 700 .82rem var(--f-ui); color: var(--lapis); }
.sc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.55; }
.sc-main b { font-weight: 700; font-size: 1.04rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-main small { color: var(--muted); font-size: .8rem; }
.sc-ar { font: 400 1.55rem/1 var(--f-ar-ui); color: var(--lapis); }
.no-result { text-align: center; color: var(--muted); padding: 40px 0; }

.juz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.juz-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 18px 18px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: .25s; }
.juz-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--tiles) repeat-x center / 10px 5px; opacity: .85; }
.juz-card:hover { border-color: var(--teal-2); box-shadow: var(--shadow); color: inherit; transform: translateY(-1px); }
.jc-no { font: 800 1.2rem var(--f-ui); color: var(--lapis); }
.jc-from { font-weight: 600; margin-top: 6px; }
.jc-pages { color: var(--muted); font-size: .82rem; }
.goto { display: flex; align-items: center; gap: 8px; }
.goto label { font-weight: 600; color: var(--muted); font-size: .9rem; }
.goto input { width: 100px; height: 42px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.page-juz { display: flex; flex-direction: column; gap: 10px; }
.pj-row { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.pj-label { font-weight: 700; color: var(--lapis); padding-top: 4px; }
.pj-pages { display: flex; flex-wrap: wrap; gap: 4px; }
.pj-pages a { min-width: 40px; text-align: center; padding: 3px 6px; border-radius: 9px; font-size: .84rem; color: var(--ink-2); background: var(--bg); }
.pj-pages a:hover { background: var(--teal-soft); color: var(--teal); }

.langs-band h2, .about h2 { font: 800 1.4rem var(--f-head); margin: 0 0 16px; }
.lang-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lang-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 20px 20px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; transition: .25s; }
.lang-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--tiles) repeat-y center / 5px 10px; }
html[dir="rtl"] .lang-card::before { inset: 0 0 0 auto; }
.lang-card:hover { border-color: var(--teal-2); box-shadow: var(--shadow); color: inherit; }
.lang-card b { font: 700 1.35rem/1.5 var(--f-ui); color: var(--lapis); }
.lang-card small { color: var(--muted); }
.about { margin: 40px 0 10px; padding: 30px 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.about p { margin: 0; color: var(--ink-2); font: 400 1.02rem/2.05 var(--f-read); }
.about strong { color: var(--ink); font-weight: 600; }

/* ---------- صفحات خواندن ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 20px 0 6px; margin: 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "‹"; margin-inline-end: 6px; color: var(--line-2); }
html[dir="ltr"] .crumbs li + li::before { content: "›"; }
.crumbs a:hover { color: var(--teal); }

/* سرلوح */
.sarlowh { position: relative; margin: 14px 0 24px; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.sl-band { height: 12px; background: var(--tiles) repeat-x center / 24px 12px; }
.sl-body { position: relative; padding: 26px 20px 24px; }
.sl-body::before { content: ""; position: absolute; inset: 0; background: var(--girih-gold) center / 70px; opacity: .07; pointer-events: none; }
.sl-cartouche { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: min(380px, 80%); padding: 4px 52px; border-radius: 999px;
  background: linear-gradient(180deg, var(--lapis-2), var(--lapis-deep)); border: 2px solid var(--gold-2);
  box-shadow: inset 0 0 0 3px var(--lapis-deep), inset 0 0 0 4px color-mix(in srgb, var(--gold-3) 70%, transparent), 0 8px 20px -10px rgba(16, 36, 74, .6); }
[data-theme="dark"] .sl-cartouche { background: linear-gradient(180deg, #24467f, #0a1730); }
.sl-cartouche::before, .sl-cartouche::after { content: ""; position: absolute; top: 50%; width: 30px; height: 30px; transform: translateY(-50%); background: var(--rosette) center/contain no-repeat; }
.sl-cartouche::before { inset-inline-start: 10px; }
.sl-cartouche::after { inset-inline-end: 10px; }
.sl-ar { font: 400 clamp(1.5rem, 4vw, 2rem)/1.9 var(--f-ar-ui); color: var(--gold-3); }
.sl-title { position: relative; margin: 10px 0 0; font: 700 clamp(1.7rem, 4vw, 2.4rem)/2 var(--f-nast); color: var(--lapis); }
html:not([lang="fa"]) .sl-title { font: 800 clamp(1.4rem, 3.4vw, 1.9rem)/1.5 var(--f-head); margin-top: 14px; }
.sl-title a:hover { color: var(--teal); }
.sl-sub { position: relative; color: var(--muted); font-size: .98rem; margin-bottom: 4px; }
.sl-meta { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; font-size: .86rem; color: var(--muted); }
.sl-meta i { width: 6px; height: 6px; transform: rotate(45deg); background: var(--gold-2); }
h2.sl-title { font-size: 1.7rem; }
.ayah-list .sarlowh { margin-top: 48px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
.jump { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding-inline: 12px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); box-shadow: var(--shadow-sm); }
.jump select { border: 0; background: none; outline: 0; height: 40px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.basmala { text-align: center; font: 400 calc(var(--ar-size) * 1.1)/2 var(--f-ar); color: var(--lapis); margin: 6px 0 10px; }
.sura-cont { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 12px; margin: 34px 0 14px; padding: 12px; border-block: 1px solid var(--line); }
.sura-cont a { font-weight: 800; font-size: 1.1rem; }
.sura-cont span { font: 1.35rem var(--f-ar-ui); color: var(--gold); }
.sura-cont small { color: var(--muted); }

/* کارت آیه */
.ayah { position: relative; padding: 28px 6px 26px; scroll-margin-top: 110px; transition: background .3s; }
.ayah + .ayah::before { content: ""; position: absolute; top: -9px; inset-inline: 30%; height: 18px;
  background: var(--flower) center / 18px no-repeat, linear-gradient(90deg, transparent, var(--line-2), transparent) center / 100% 1px no-repeat; }
.ayah-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ayah-no { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: var(--rosette) center/contain no-repeat; }
.ayah-no span { font: 700 .82rem var(--f-ui); color: var(--lapis); }
.ayah-no:hover { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--teal-2) 55%, transparent)); }
.ayah-ref { font-size: .8rem; color: var(--muted); }
.ayah-tools { display: flex; gap: 2px; margin-inline-start: auto; opacity: .55; transition: opacity .15s; }
.ayah:hover .ayah-tools, .ayah.playing .ayah-tools, .ayah:focus-within .ayah-tools { opacity: 1; }
.tool { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; border-radius: 10px; color: var(--muted); }
.tool:hover { background: var(--bg-2); color: var(--ink); }
.tool.on { color: var(--gold); }
.tool.on .ic { fill: currentColor; }
.ar { font: 400 var(--ar-size)/2.35 var(--f-ar); text-align: right; direction: rtl; margin: 0 0 14px; color: var(--ink); word-spacing: .05em; }
.ayah-end { display: inline-grid; place-items: center; width: 1.55em; height: 1.55em; margin: 0 .1em; vertical-align: middle;
  font: 700 .46em/1 "Vazirmatn", "Amiri", sans-serif; color: var(--lapis); background: var(--rosette) center/contain no-repeat; }
.sajda { color: var(--gold); font-size: .8em; }
.meals { display: flex; flex-direction: column; gap: 14px; }
.meal p { margin: 0; font: 400 var(--tr-size)/2 var(--f-read); color: var(--ink-2); }
.meal--main p { color: var(--ink); font-size: calc(var(--tr-size) * 1.05); }
.meal:lang(en) p, .meal:lang(tg) p, .meal:lang(ku-Latn) p { font-family: var(--f-latin); line-height: 1.75; }
.meal-src { display: flex; align-items: center; gap: 8px; font-size: .74rem; color: var(--muted); margin-bottom: 2px; }
.meal-src b { padding: 1px 9px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-weight: 700; }
.meal:not(.meal--main) { padding-inline-start: 14px; border-inline-start: 2px solid var(--line-2); }

.tafsir { margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); overflow: hidden; }
.tafsir summary { display: flex; align-items: center; gap: 8px; padding: 11px 16px; cursor: pointer; list-style: none; font-weight: 700; font-size: .9rem; color: var(--teal); }
.tafsir summary::-webkit-details-marker { display: none; }
.tafsir summary::after { content: "+"; margin-inline-start: auto; font-size: 1.2rem; line-height: 1; color: var(--muted); }
.tafsir[open] summary::after { content: "−"; }
.tafsir-text { padding: 0 18px 10px; font: 400 calc(var(--tr-size) * .97)/2 var(--f-read); color: var(--ink-2); }
.tafsir-text p { margin: 0 0 10px; }
.tafsir-text .loading { color: var(--muted); }
.tf-block + .tf-block { border-top: 1px dashed var(--line-2); padding-top: 10px; margin-top: 6px; }
.tf-block h4 { margin: 0 0 4px; font: 700 .8rem var(--f-ui); color: var(--gold); }
.tafsir-foot { padding: 0 18px 14px; }
.tf-more { display: inline-flex; align-items: center; gap: 6px; font: 700 .85rem var(--f-ui); color: var(--lapis); }
.tf-more:hover { color: var(--teal); }
.tf-q { color: var(--tf-q); }
.tf-p { color: var(--tf-p); }
.tf-b { color: var(--tf-b); }
.ayah.playing { background: linear-gradient(90deg, transparent, var(--teal-soft) 50%, transparent); border-radius: 18px; }
.flash { animation: flash 1.8s ease; border-radius: 18px; }
@keyframes flash { 0%, 40% { background: var(--gold-soft); } 100% { background: transparent; } }

/* تک‌آیه */
.single-head { text-align: center; padding: 12px 0 12px; }
.single-head h1 { font: 800 clamp(1.5rem, 3.6vw, 2.1rem)/1.5 var(--f-head); margin: 6px 0 14px; }
.single-head h1 span { display: block; color: var(--teal); font-size: .78em; }
.single-list .ayah { padding-top: 14px; }
.single-list .ayah-head { justify-content: center; }
.single-list .ayah-tools { margin-inline-start: 0; opacity: 1; }
.single-list .ar { text-align: center; font-size: calc(var(--ar-size) * 1.18); }
.single-list .meal { padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); border-inline-start-width: 1px; }
.single-list .meal--main { border-color: var(--teal-2); box-shadow: var(--shadow); }
.single-list .meals { gap: 10px; }
.alt-script { margin: 6px 0 0; border: 1px dashed var(--line-2); border-radius: 16px; padding: 4px 16px; }
.alt-script summary { cursor: pointer; padding: 8px 0; font-weight: 600; color: var(--muted); font-size: .9rem; }
.alt-script .ar { text-align: center; }

.sura-about { margin: 40px 0 0; padding: 26px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.sura-about h2 { font: 800 1.25rem var(--f-head); margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 0 0 18px; }
.facts div { padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.facts dt { font-size: .76rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font: 800 1.2rem var(--f-ui); color: var(--lapis); }
.faq details { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0 0 14px; color: var(--ink-2); font-family: var(--f-read); }
.other-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 0 0; font-size: .88rem; color: var(--muted); }
.other-langs a { color: var(--lapis); font-weight: 600; }

/* صفحه‌بندی */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 34px 0 60px; }
.pg { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.pg span { display: flex; flex-direction: column; line-height: 1.45; font-weight: 700; min-width: 0; }
.pg small { font-weight: 500; font-size: .74rem; color: var(--muted); }
.pg.next { justify-content: flex-end; text-align: end; }
.pg:hover { border-color: var(--teal-2); color: inherit; }
.pg.ghost { border: 0; background: none; box-shadow: none; }
.pg-center { font-size: .88rem; color: var(--muted); font-weight: 600; }

/* ---------- مصحف ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 10px 0 18px; flex-wrap: wrap; }
.page-head h1 { font: 800 1.6rem/1.5 var(--f-head); margin: 2px 0 0; }
.mushaf-nav { display: flex; align-items: center; gap: 10px; }
.mn { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.mn:hover { border-color: var(--teal-2); }
.mushaf { flex: 1; min-width: 0; padding: 14px; border-radius: 10px; background: var(--tiles) center / 24px 12px; box-shadow: var(--shadow); }
.mushaf-frame { background: #fffaf0; color: #1d1a12; border-radius: 4px; padding: 20px clamp(16px, 4vw, 44px) 16px;
  box-shadow: inset 0 0 0 2px var(--gold-2), inset 0 0 0 6px #fffaf0, inset 0 0 0 7px var(--gold-2); }
[data-theme="dark"] .mushaf-frame { background: #121e35; color: var(--ink); box-shadow: inset 0 0 0 2px #8d7136, inset 0 0 0 6px #121e35, inset 0 0 0 7px #8d7136; }
.mushaf-top { display: flex; justify-content: space-between; font: 400 1.05rem var(--f-ar-ui); color: var(--gold); border-bottom: 1px solid var(--line-2); padding-bottom: 6px; margin-bottom: 14px; }
.mushaf-text { font: 400 calc(var(--ar-size) * .97)/2.45 var(--f-ar); text-align: justify; text-align-last: center; }
.m-ayah { cursor: pointer; border-radius: 6px; transition: background .15s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.m-ayah:hover { background: var(--teal-soft); }
.m-ayah.playing { background: var(--mark); }
.m-sura { margin: 12px 0 6px; text-align: center; text-align-last: center; }
.m-sura span { display: inline-block; min-width: 72%; padding: 2px 30px; font: 400 1.02em/1.9 var(--f-ar-ui); color: var(--gold-3); border-radius: 999px;
  background: linear-gradient(180deg, var(--lapis-2), var(--lapis-deep)); box-shadow: inset 0 0 0 2px var(--gold-2), inset 0 0 0 4px var(--lapis-deep), inset 0 0 0 5px var(--gold-2); }
.m-basmala { text-align: center; text-align-last: center; color: var(--lapis); }
.mushaf-foot { text-align: center; font: 600 1rem var(--f-ui); color: var(--gold); border-top: 1px solid var(--line-2); padding-top: 6px; margin-top: 10px; }
.section-title { font: 800 1.25rem var(--f-head); margin: 40px 0 14px; }
.section-title small { font-size: .8rem; color: var(--muted); font-weight: 500; }
.page-meal.hide { display: none; }
.pm-item { padding: 14px 6px; border-bottom: 1px solid var(--line); scroll-margin-top: 110px; }
.pm-ref { font-size: .84rem; color: var(--muted); font-weight: 600; }
.pm-ref b { color: var(--lapis); }
.pm-text { margin: 4px 0 0; font: 400 var(--tr-size)/2 var(--f-read); }
.pm-alt { color: var(--ink-2); font-size: calc(var(--tr-size) * .95); }
.pm-text:lang(en), .pm-text:lang(tg), .pm-text:lang(ku-Latn) { font-family: var(--f-latin); }
.pm-alt .lang { display: block; font: 700 .72rem var(--f-ui); color: var(--teal); }
.juz-suras { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: -6px 0 18px; }
.anchor { display: block; position: relative; top: -10px; }

/* ---------- تفسیر ---------- */
.page-hero { text-align: center; padding: 22px 0 30px; }
.page-hero h1 { font: 800 clamp(1.7rem, 4vw, 2.4rem)/1.6 var(--f-head); margin: 10px 0 6px; }
.page-hero h1 .nast { font-size: 1.15em; color: var(--lapis); }
.page-hero p { margin: 0 auto; max-width: 600px; color: var(--ink-2); font-family: var(--f-read); }
.ph-ic { display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; background: var(--teal-soft); color: var(--teal); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal-2) 30%, transparent); }
.tf-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tf-list a { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: .2s; }
.tf-list a:hover { border-color: var(--teal-2); color: inherit; }
.tf-no { flex: none; width: 40px; height: 40px; display: grid; place-items: center; background: var(--rosette) center/contain no-repeat; font: 700 .8rem var(--f-ui); color: var(--lapis); }
.tf-meal { flex: 1; min-width: 0; font: 400 .98rem/1.9 var(--f-read); color: var(--ink-2); }
.tf-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.tf-ar { padding: 30px clamp(18px, 4vw, 40px) 8px; font: 400 calc(var(--ar-size) * 1.06)/2.4 var(--f-ar); text-align: center;
  background: linear-gradient(var(--teal-soft), transparent); border-top: 8px solid transparent; border-image: var(--tiles) 0 0 100% 0 / 8px 0 0 0 repeat; }
.tf-actions { display: flex; justify-content: center; padding: 4px 0 20px; }
.tf-sec { padding: 0 clamp(18px, 4vw, 40px) 26px; }
.tf-sec h2 { font: 700 .82rem var(--f-ui); color: var(--gold); margin: 0 0 8px; }
.tf-meal-box p { margin: 0; padding: 16px 18px; border-radius: 16px; background: var(--bg); font: 400 calc(var(--tr-size) * 1.05)/2 var(--f-read); border-inline-start: 3px solid var(--teal-2); }
.tf-body { font: 400 var(--tr-size)/2.1 var(--f-read); color: var(--ink-2); }
.tf-body p { margin: 0 0 14px; }
.tf-short { border-top: 1px solid var(--line); padding-top: 24px; }
.tf-short-text { padding: 16px 18px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font: 400 calc(var(--tr-size) * .97)/2 var(--f-read); color: var(--ink-2); }
.tf-short-text p { margin: 0 0 10px; }
.tf-short-text p:last-child { margin: 0; }

/* ---------- جستجو ---------- */
.search-head { padding: 10px 0 6px; text-align: center; }
.search-head h1 { font-size: 2.2rem; margin: 0 0 12px; color: var(--lapis); }
.big-search { display: flex; align-items: center; gap: 8px; padding: 6px; padding-inline-start: 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); box-shadow: var(--shadow); }
.big-search:focus-within { border-color: var(--teal-2); }
.big-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 1.02rem; height: 44px; color: var(--ink); }
.big-search select { height: 42px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); padding: 0 10px; }
.big-search .btn { border-radius: 999px; }
.hint { color: var(--muted); font-size: .9rem; }
.hint a { color: var(--teal); font-weight: 600; }
.sura-grid.compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.results { list-style: none; margin: 0 0 60px; padding: 0; }
.result { padding: 20px 0; border-bottom: 1px solid var(--line); }
.r-ref { font-size: .88rem; font-weight: 600; color: var(--muted); }
.r-ref b { color: var(--lapis); }
.r-ar { font: 400 calc(var(--ar-size) * .82)/2.2 var(--f-ar); text-align: right; margin: 6px 0; }
.r-tr { font: 400 var(--tr-size)/2 var(--f-read); margin: 0; color: var(--ink-2); }
mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }
.empty-state { text-align: center; padding: 80px 0; }
.empty-state .btn { margin: 4px; }
.big-num { font: 800 5rem/1.2 var(--f-ui); color: var(--gold); }

/* ---------- صوت ---------- */
.rc-av { --s: 56px; position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--teal-soft), var(--lapis-soft)); color: var(--lapis); font: 700 calc(var(--s) * .4)/1 var(--f-ui);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px color-mix(in srgb, var(--gold-2) 70%, transparent); }
.rc-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
.rc-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 22px 14px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: .25s; }
.rc-card:hover { border-color: var(--teal-2); box-shadow: var(--shadow); color: inherit; transform: translateY(-1px); }
.rc-name { font-weight: 700; line-height: 1.5; }
.rc-card small { color: var(--muted); font-size: .8rem; }
.listen-quick { margin: 40px 0 20px; }
.listen-quick h2, .lp-others h2 { font: 800 1.25rem var(--f-head); margin: 0 0 14px; }
.rc-head { display: flex; align-items: center; gap: 22px; padding: 16px 0 24px; }
.rc-head h1 { font: 800 clamp(1.5rem, 3.6vw, 2.1rem)/1.5 var(--f-head); margin: 2px 0; }
.rc-head p { margin: 0; color: var(--muted); }
.rc-select { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding-inline: 14px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); max-width: 100%; }
.rc-select select { border: 0; background: none; outline: 0; height: 40px; font-weight: 700; color: var(--ink-2); max-width: 260px; }
.tracks { list-style: none; margin: 0 0 40px; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden; }
.track { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); transition: background .2s; }
.track:last-child { border-bottom: 0; }
.track:hover { background: var(--surface-2); }
.track.playing { background: linear-gradient(90deg, transparent, var(--teal-soft)); }
html[dir="rtl"] .track.playing { background: linear-gradient(270deg, transparent, var(--teal-soft)); }
.tr-play { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--lapis); display: grid; place-items: center; }
.tr-play .ic { position: absolute; opacity: 0; transition: opacity .15s; }
.tr-no { font: 700 .86rem var(--f-ui); transition: opacity .15s; }
.track:hover .tr-play .ic, .track.playing .tr-play .ic { opacity: 1; }
.track:hover .tr-no, .track.playing .tr-no { opacity: 0; }
.track.playing .tr-play { background: var(--teal); color: #fff; border-color: transparent; }
.tr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.tr-main b { font-weight: 700; }
.tr-main small { color: var(--muted); font-size: .8rem; }
.tr-ar { font: 1.35rem/1 var(--f-ar-ui); color: var(--lapis); }
.tr-dl { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.tr-dl:hover { background: var(--bg-2); color: var(--teal); }
.lp-card { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 30px 20px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.lp-who { display: flex; align-items: center; gap: 16px; text-align: start; }
.lp-who b { display: block; font-weight: 800; font-size: 1.2rem; }
.lp-who small { color: var(--muted); }
.lp-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lp-card.playing { border-color: var(--teal-2); }
.lp-others { margin: 36px 0 0; }
.rc-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.rc-mini a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .92rem; }
.rc-mini a:hover { border-color: var(--teal-2); color: inherit; }

/* ---------- اطلاعات ---------- */
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.prose section + section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.prose h2 { font: 800 1.2rem var(--f-head); margin: 0 0 10px; color: var(--lapis); }
.prose p, .prose li { font: 400 1.02rem/2 var(--f-read); color: var(--ink-2); }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0; padding-inline-start: 20px; }
.prose a { color: var(--teal); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--teal) 35%, transparent); text-underline-offset: 4px; }
.src-note { padding: 14px 16px; border-radius: 14px; background: var(--teal-soft); border-inline-start: 3px solid var(--teal-2); color: var(--ink) !important; }
.source-card { margin: 20px 0 60px; }
.source-card .sc-label { display: block; font-size: .8rem; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.source-card a { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.source-card a:hover { border-color: var(--teal-2); color: inherit; }
.source-card b { font-weight: 800; font-size: 1.1rem; }
.source-card small { flex: 1; color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: end; }

/* ---------- پانویس ---------- */
.sitefoot { position: relative; margin-top: 60px; background: var(--lapis-deep); color: #c9d4e8; padding: 0 0 26px; overflow: hidden; }
[data-theme="dark"] .sitefoot { background: #060d1b; border-top: 1px solid var(--line); }
.sitefoot::before { content: ""; position: absolute; inset: 0; background: var(--girih) center / 90px; opacity: .06; pointer-events: none; }
.sitefoot .wrap { position: relative; }
.foot-verse { text-align: center; padding: 38px 0 28px; border-bottom: 1px solid rgba(240, 213, 140, .14); }
.foot-ar { font: 400 2rem/1.9 var(--f-ar-ui); color: var(--gold-3); }
.foot-tr { margin: 0; font: 400 1rem/2 var(--f-read); }
.foot-tr span { color: var(--gold-3); font-size: .85rem; margin-inline-start: 6px; }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding: 32px 0 26px; }
.foot-brand p { margin: 14px 0 0; font-size: .92rem; color: #aebbd3; max-width: 320px; line-height: 2; }
.sitefoot .brand-text b { color: #fff6e0; }
.sitefoot nav { display: flex; flex-direction: column; gap: 6px; }
.sitefoot h2 { font: 700 .86rem var(--f-ui); color: var(--gold-3); margin: 0 0 6px; }
.sitefoot nav a { font-size: .93rem; color: #d3dcee; }
.sitefoot nav a:hover { color: var(--gold-3); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-top: 18px; border-top: 1px solid rgba(240, 213, 140, .12); }
.copy { font-size: .8rem; opacity: .7; margin: 0; }
.foot-legal { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; }

/* ---------- پخش‌کننده‌ها ---------- */
.player, .splayer { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 55; }
.player { width: min(560px, calc(100% - 24px)); }
.splayer { width: min(840px, calc(100% - 24px)); }
.player-in, .sp-in { position: relative; display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 22px; overflow: hidden;
  background: color-mix(in srgb, var(--lapis-deep) 96%, transparent); color: #e9eef8; backdrop-filter: blur(12px); box-shadow: 0 22px 50px -14px rgba(0,0,0,.5); }
[data-theme="dark"] .player-in, [data-theme="dark"] .sp-in { border: 1px solid var(--line-2); }
.player .iconbtn, .splayer .iconbtn { color: #dbe3f2; }
.player .iconbtn:hover, .splayer .iconbtn:hover, .splayer .iconbtn.on { background: rgba(255,255,255,.1); color: var(--gold-3); }
.pbtn { width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: linear-gradient(180deg, var(--gold-3), var(--gold-2)); color: #2a1f05; flex: none; }
.player-info, .sp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; padding-inline: 6px; }
.sp-info { flex: 0 1 180px; }
.player-info b, .sp-info b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info small, .sp-info small { font-size: .75rem; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-progress { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.1); }
.player-progress span { display: block; height: 100%; width: 0; background: var(--teal-2); transition: width .25s linear; }
.sp-seek { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: .74rem; font-variant-numeric: tabular-nums; }
.sp-seek input { --p: 0%; flex: 1; min-width: 0; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; outline: 0;
  background: linear-gradient(90deg, var(--teal-2) var(--p), rgba(255,255,255,.18) var(--p)); }
.sp-seek input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--gold-3); border: 0; }
.sp-seek input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--gold-3); border: 0; }
body.has-splayer main { padding-bottom: 90px; }
html[dir="rtl"] .js-p-prev .ic, html[dir="rtl"] .js-p-next .ic { transform: scaleX(-1); }

/* ---------- تنظیمات ---------- */
.settings { border: 0; padding: 0; margin: 0; margin-inline-start: auto; height: 100%; max-height: 100%; width: min(420px, 100%); background: var(--surface); color: var(--ink); box-shadow: 0 0 60px -20px rgba(0,0,0,.4); }
.settings[open] { animation: slidein .25s ease; }
@keyframes slidein { from { opacity: 0; transform: translateX(var(--slide, -40px)); } }
html[dir="ltr"] .settings { --slide: 40px; }
.settings::backdrop { background: rgba(8, 16, 32, .45); backdrop-filter: blur(2px); }
.settings-in { display: flex; flex-direction: column; height: 100%; }
.settings-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.settings-head h2 { margin: 0; font: 800 1.2rem var(--f-head); }
.settings-body { flex: 1; overflow-y: auto; padding: 4px 20px 20px; }
.settings h3 { font-size: .82rem; font-weight: 700; color: var(--teal); margin: 22px 0 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 14px; border: 1.5px solid var(--line); text-align: center; font-size: .8rem; font-weight: 600; color: var(--muted); }
.seg span b { font-size: 1.4rem; line-height: 1.8; color: var(--ink); font-weight: 400; }
.seg input:checked + span { border-color: var(--teal-2); background: var(--teal-soft); color: var(--teal); }
.langgroup { margin-bottom: 12px; }
.langname { font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer; font-size: .93rem; }
.check:hover { background: var(--bg-2); }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }
.switch { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; font-size: .94rem; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--teal); }
html[dir="ltr"] .switch input:checked + span::after { transform: translateX(18px); }
html[dir="rtl"] .switch input:checked + span::after { transform: translateX(-18px); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: .9rem; font-weight: 600; }
.field select { height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 0 10px; font-weight: 500; }
.field input[type=range] { accent-color: var(--teal); }
.field output { font-weight: 500; color: var(--muted); }
.settings-foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.toast { position: fixed; left: 50%; top: 90px; transform: translate(-50%, -10px); opacity: 0; pointer-events: none; z-index: 70;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: .9rem; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- منوی پایین موبایل ---------- */
.bottomnav { display: none; }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1000px) {
  .home-top { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .topsearch { display: none; }
  .js-menu { display: inline-flex; }
  .mainnav { display: none; position: absolute; top: 78px; inset-inline: 0; flex-direction: column; padding: 10px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); margin: 0; }
  .mainnav.open { display: flex; }
  .about-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .bottomnav { position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 93%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; border-radius: 14px; font-size: .72rem; font-weight: 700; color: var(--muted); }
  .bottomnav a.on { color: var(--lapis); background: var(--lapis-soft); }
  body.lang-fa { padding-bottom: 70px; }
  .lang-fa .player, .lang-fa .splayer { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .sp-info { flex: 1; }
  .sp-seek { position: absolute; inset-inline: 14px; bottom: 4px; }
  .sp-seek span { display: none; }
  .sp-in { padding-bottom: 16px; }
  .js-sp-repeat { display: none !important; }
  .tr-ar { display: none; }
  .rc-head, .lp-who { flex-direction: column; text-align: center; }
}
@media (max-width: 640px) {
  :root { --ar-size: 1.85rem; }
  .topbar-in { gap: 8px; height: 64px; }
  .brand-text small { display: none; }
  .tabs { top: 78px; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pg-center { display: none; }
  .mn { display: none; }
  .mushaf { padding: 8px; }
  .daily { padding: 24px 20px; }
  .big-search, .hero-search { flex-wrap: wrap; border-radius: 22px; }
  .big-search select, .big-search .btn, .hero-search .btn { flex: 1; }
  .toolbar .btn span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .toolbar .btn { padding: 0 13px; }
  .foot-cols { grid-template-columns: 1fr; gap: 22px; }
  .sura-about, .about { padding: 22px 18px; }
  .ayah-tools { opacity: 1; }
  .ayah-ref { display: none; }
  .sl-cartouche { padding: 4px 40px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .topbar, .toolbar, .ayah-tools, .pager, .sitefoot, .player, .splayer, .readbar, .bottomnav, .tafsir:not([open]) { display: none !important; } body { background: #fff; } }

/* اصلاحات */
.sitefoot nav { align-items: flex-start; }
.sitefoot .foot-legal { gap: 6px 22px; align-items: center; }
@media (max-width: 640px) { .toolbar { gap: 6px; } .jump select { max-width: 120px; } }

/* ترجمهٔ فارسی در صفحه‌های چپ‌به‌راست (بخش انگلیسی) */
.meal:lang(fa) p, .meal:lang(ps) p, .meal:lang(ckb) p, .pm-text:lang(fa) { font-family: "Noto Naskh Arabic", "Vazirmatn", serif; line-height: 2; }
html[dir="ltr"] .meal:lang(fa) .meal-src, html[dir="ltr"] .meal:lang(fa) p { direction: rtl; text-align: right; }
.aliases { margin: -6px 0 16px; color: var(--muted); font-size: .92rem; }
.rc-head { padding-inline: 4px; }
.facts { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }

/* ---------- فاصلهٔ فشرده‌تر میان آیات + دکمهٔ کوچک تفسیر ---------- */
.ayah { padding: 14px 6px 12px; }
.ayah + .ayah::before { top: -7px; height: 14px; inset-inline: 34%; background-size: 13px, 100% 1px; }
.ayah-head { margin-bottom: 0; }
.ayah-no { width: 38px; height: 38px; }
.ayah-no span { font-size: .76rem; }
.ar { line-height: 2.15; margin-bottom: 6px; }
.meals { gap: 8px; }
.meal p { line-height: 1.95; }
.tafsir { margin-top: 8px; border: 0; background: none; border-radius: 0; overflow: visible; }
.tafsir summary { display: inline-flex; width: auto; padding: 3px 12px 3px 10px; gap: 6px; font-size: .78rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--teal); transition: border-color .15s, background .15s; }
.tafsir summary:hover { border-color: var(--teal-2); background: var(--teal-soft); }
.tafsir summary::after { content: "▾"; margin-inline-start: 2px; font-size: .8rem; color: var(--muted); }
.tafsir[open] summary { background: var(--teal-soft); border-color: transparent; }
.tafsir[open] summary::after { content: "▴"; }
.tafsir .tafsir-text { margin-top: 8px; padding: 12px 16px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.tafsir .tafsir-text:empty { display: none; }
.tafsir .tafsir-foot { padding: 6px 4px 0; }
.single-list .ayah { padding-top: 10px; }
.sura-cont { margin: 24px 0 10px; }
.ayah-list .sarlowh { margin-top: 32px; }
