/* Noor al-Bukhari — styles */
@font-face { font-family: "Amiri"; src: url("../fonts/amiri-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Amiri"; src: url("../fonts/amiri-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Naskh Arabic"; src: url("../fonts/noto-naskh-arabic-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Naskh Arabic"; src: url("../fonts/noto-naskh-arabic-arabic-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Scheherazade New"; src: url("../fonts/scheherazade-new-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Scheherazade New"; src: url("../fonts/scheherazade-new-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Nastaliq Urdu"; src: url("../fonts/noto-nastaliq-urdu-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Nastaliq Urdu"; src: url("../fonts/noto-nastaliq-urdu-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --scale: 1;
  --emerald-9: #04332d; --emerald-8: #064a40; --emerald-7: #0b5d4f; --emerald-6: #0e7c6b; --emerald-5: #14a088;
  --teal: #19b3a3; --turq-1: #e3f6f2; --turq-2: #c9ede6;
  --gold: #c9973a; --gold-2: #e8c46c; --gold-1: #fbf0d4;
  --cream: #fbf7ee; --paper: #fffdf8; --sand: #f3ead6;
  --rose: #c2566b; --rose-1: #fbe9ec; --indigo: #3d4f9a; --indigo-1: #e9ecfa; --stone: #8a6d47; --stone-1: #f4ece0;
  --ink: #1d2b29; --ink-2: #44524f; --muted: #6b7a76; --line: #e6dfcf; --line-2: #efe9dc;
  --bg: var(--cream); --card: var(--paper); --head-bg: rgba(255,253,248,.88);
  --ar-color: #0b3f37; --ur-color: #2a2f45; --en-color: var(--ink);
  --shadow: 0 1px 2px rgba(20,40,35,.06), 0 6px 22px rgba(20,40,35,.07);
  --shadow-lg: 0 10px 40px rgba(10,40,35,.14);
  --radius: 18px; --radius-sm: 12px;
  --font-en: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-read: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Cambria, serif;
  /* Arabic reading font (the reader can change it in settings); Amiri stays for decorative titles */
  --font-ar: "Noto Naskh Arabic", "Scheherazade New", "Traditional Arabic", serif;
  --ar-size: 1.62rem; --ar-lh: 2.2; --ar-ws: .08em;
  --font-ar-display: "Amiri", "Noto Naskh Arabic", serif;
  --font-ur: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
  --geo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cg fill='none' stroke='%230e7c6b' stroke-opacity='.07' stroke-width='1.2'%3E%3Crect x='18' y='18' width='36' height='36'/%3E%3Crect x='18' y='18' width='36' height='36' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='8'/%3E%3Cpath d='M0 0l18 18M72 0 54 18M0 72l18-18M72 72 54 54'/%3E%3C/g%3E%3C/svg%3E");
  --geo-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.2'%3E%3Crect x='18' y='18' width='36' height='36'/%3E%3Crect x='18' y='18' width='36' height='36' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='8'/%3E%3Cpath d='M0 0l18 18M72 0 54 18M0 72l18-18M72 72 54 54'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}
html[data-arfont="sch"] { --font-ar: "Scheherazade New", "Noto Naskh Arabic", serif; --ar-size: 1.95rem; --ar-lh: 2.05; --ar-ws: .06em; }
html[data-arfont="amiri"] { --font-ar: "Amiri", "Noto Naskh Arabic", serif; --ar-size: 1.7rem; --ar-lh: 2.3; --ar-ws: .05em; }
html[data-theme="dark"] {
  --bg: #0b1715; --card: #12211e; --paper: #12211e; --head-bg: rgba(11,23,21,.88); --sand: #1a2a27;
  --ink: #e7eeea; --ink-2: #bfcbc7; --muted: #8fa29d; --line: #24382f; --line-2: #1d302b;
  --ar-color: #f4e3b0; --ur-color: #d7e7f1; --en-color: #e7eeea;
  --turq-1: #123631; --turq-2: #17443d; --gold-1: #2c2615; --rose-1: #33191f; --indigo-1: #1a1f38; --stone-1: #2a2219;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 22px rgba(0,0,0,.25);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font: 16px/1.6 var(--font-en); color: var(--ink); background: var(--bg) var(--geo); min-height: 100vh; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
a { color: var(--emerald-6); text-decoration: none; }
a:hover { text-decoration: underline; }
html[data-theme="dark"] a { color: #5fd3bd; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; margin-top: 1.6em; }
p { margin: 0 0 1em; }
code { background: var(--sand); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
.i { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.wrap.narrow { max-width: 860px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--emerald-7); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--emerald-7); color: #fff !important; font: 600 .95rem var(--font-en); cursor: pointer; text-decoration: none !important; transition: transform .15s, background .2s, box-shadow .2s; box-shadow: 0 4px 14px rgba(11,93,79,.25); }
.btn:hover { background: var(--emerald-6); transform: translateY(-1px); }
.btn.gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #3b2a07 !important; box-shadow: 0 4px 14px rgba(201,151,58,.35); }
.btn.ghost { background: transparent; color: var(--emerald-7) !important; border: 1.5px solid var(--emerald-6); box-shadow: none; }
html[data-theme="dark"] .btn.ghost { color: #7fe0cc !important; border-color: #3d8f80; }
.btn.ghost.light { color: #fff !important; border-color: rgba(255,255,255,.6); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: .875rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.iconbtn { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; justify-content: center; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; padding: 0 10px; font: 600 .8rem var(--font-en); }
.iconbtn:hover { background: var(--turq-1); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--head-bg); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 14px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink) !important; text-decoration: none !important; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--emerald-6), var(--emerald-8)); color: var(--gold-2); box-shadow: 0 4px 12px rgba(11,93,79,.3); }
.logo { width: 28px; height: 28px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 1.02rem; }
.brand-text small { font-family: var(--font-ar-display); color: var(--gold); font-size: .95rem; }
.topnav { display: none; gap: 4px; margin-left: 10px; }
.topnav a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .93rem; text-decoration: none; }
.topnav a:hover { background: var(--turq-1); }
.topnav a.on { background: var(--emerald-7); color: #fff; }
.topsearch { display: none; flex: 1; max-width: 340px; margin-left: auto; position: relative; }
.topsearch .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; }
.topsearch input { width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 14px 0 38px; font: inherit; font-size: .93rem; }
.topbar .iconbtn[data-action="settings"] { margin-left: auto; background: var(--turq-1); color: var(--emerald-7); }
html[data-theme="dark"] .topbar .iconbtn[data-action="settings"] { color: #7fe0cc; }
.topbar .iconbtn .lbl { white-space: nowrap; }
@media (min-width: 960px) {
  .topnav { display: flex; }
  .topsearch { display: block; }
  .topbar .iconbtn[data-action="settings"] { margin-left: 0; }
  body { padding-bottom: 0; }
  .bottomnav { display: none !important; }
}
@media (max-width: 420px) { .topbar .iconbtn .lbl { display: none; } .brand-text small { display: none; } }

/* ---------- bottom nav ---------- */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--head-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 62px; color: var(--muted); font-size: .72rem; font-weight: 600; text-decoration: none; position: relative; }
.bottomnav a .i { width: 23px; height: 23px; }
.bottomnav a.on { color: var(--emerald-6); }
html[data-theme="dark"] .bottomnav a.on { color: #5fd3bd; }
.bottomnav a.on::before { content: ""; position: absolute; top: 0; width: 34px; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold); }

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; min-height: 470px; display: flex; align-items: center; background: var(--emerald-8); }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,51,45,.35), rgba(4,51,45,.05) 50%, rgba(4,51,45,.55)); }
.hero-in { position: relative; z-index: 1; text-align: center; padding-top: 44px; padding-bottom: 120px; }
.bismillah { font-family: var(--font-ar-display); font-size: clamp(1.5rem, 4vw, 2.2rem); color: var(--gold-2); margin-bottom: .2em; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 5vw, 3rem); text-shadow: 0 2px 18px rgba(0,0,0,.35); margin-bottom: .3em; }
.hero-sub { max-width: 620px; margin: 0 auto 1.4em; font-size: clamp(1rem, 2.3vw, 1.15rem); color: #e8f6f2; }
.hero-search { display: flex; align-items: center; gap: 6px; max-width: 560px; margin: 0 auto; background: rgba(255,255,255,.96); border-radius: 999px; padding: 5px 5px 5px 16px; box-shadow: var(--shadow-lg); }
.hero-search .i { color: var(--muted); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; height: 44px; color: #1d2b29; outline: none; }
.hero-stats { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; font-size: .9rem; }
.hero-stats span { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); padding: 4px 12px; border-radius: 999px; backdrop-filter: blur(4px); }
.hero-stats b { color: var(--gold-2); }

/* ---------- page band ---------- */
.page-band { background: linear-gradient(135deg, var(--emerald-7), var(--emerald-9)); background-image: var(--geo-light), linear-gradient(135deg, var(--emerald-6), var(--emerald-9)); color: #eaf7f3; padding: 34px 0 30px; margin-bottom: 26px; position: relative; }
.page-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 8px; background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--gold)); opacity: .85; }
.page-band h1, .page-band h2 { color: #fff; }
.page-band a { color: var(--gold-2); }
.page-band.small { padding: 16px 0 18px; margin-bottom: 20px; }
.page-band.tone-gold { background-image: var(--geo-light), linear-gradient(135deg, #a8792a, #5f4310); }
.page-band.tone-rose { background-image: var(--geo-light), linear-gradient(135deg, #a8485c, #5b1e2c); }
.page-band.tone-indigo { background-image: var(--geo-light), linear-gradient(135deg, #3d4f9a, #1b2350); }
.page-band.tone-stone { background-image: var(--geo-light), linear-gradient(135deg, #8a6d47, #3f2f1b); }
.page-band.tone-teal { background-image: var(--geo-light), linear-gradient(135deg, #12a090, #075049); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--gold-2); margin-bottom: .4em; }
.lead { font-size: 1.05rem; color: #d4ece6; max-width: 720px; }
.crumbs { font-size: .88rem; color: #cde6df; margin-bottom: 8px; }
.crumbs span { opacity: .6; margin: 0 4px; }
.ar-inline { font-family: var(--font-ar-display); color: var(--gold-2); font-weight: 400; margin-left: 8px; }
.book-title-ar { font-family: var(--font-ar-display); font-size: 1.35rem; color: var(--gold-2); }
.book-title-ar.big { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.6; }
.filter { position: relative; display: block; max-width: 420px; margin-top: 16px; }
.filter .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filter input { width: 100%; height: 46px; border-radius: 999px; border: 0; padding: 0 16px 0 42px; font: inherit; background: rgba(255,255,255,.95); color: #1d2b29; }

/* ---------- hadith card ---------- */
.hadith { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 0 22px; overflow: hidden; }
.hadith::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--emerald-6), var(--teal), var(--gold-2)); }
.h-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 18px 20px 6px; }
.h-num { font-size: 1.02rem; margin: 0; font-weight: 700; }
.h-num a { color: var(--emerald-7); }
html[data-theme="dark"] .h-num a { color: #6fe0c8; }
.hadith.full .h-num { font-size: 1.3rem; }
.h-book { font-size: .82rem; color: var(--muted); background: var(--turq-1); padding: 2px 10px; border-radius: 999px; }
.h-read-badge { display: none; align-items: center; gap: 3px; margin-left: auto; font-size: .75rem; font-weight: 700; color: var(--emerald-6); background: var(--turq-1); padding: 2px 10px 2px 6px; border-radius: 999px; }
.h-read-badge .i { width: 14px; height: 14px; }
.hadith.is-read .h-read-badge { display: inline-flex; }
.h-theme { margin: 4px 20px 0; font-size: .85rem; color: var(--stone); }
.h-theme span { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--gold-1); color: #8a6420; border-radius: 6px; padding: 1px 7px; margin-right: 4px; }
.lang { position: relative; padding: 14px 20px 16px; }
.lang + .lang { border-top: 1px dashed var(--line); }
.lang-tag { display: inline-block; font: 700 .68rem/1 var(--font-en); letter-spacing: .06em; padding: 4px 8px; border-radius: 6px; margin-bottom: 8px; }
.lang.ar .lang-tag { background: var(--turq-1); color: var(--emerald-7); font-family: var(--font-ar); font-size: .95rem; letter-spacing: 0; padding: 3px 9px; }
.lang.ur .lang-tag { background: var(--indigo-1); color: var(--indigo); font-family: var(--font-ur); font-size: .8rem; letter-spacing: 0; padding: 5px 9px 9px; line-height: 1.6; }
.lang.en .lang-tag { background: var(--gold-1); color: #8a6420; text-transform: uppercase; }
html[data-theme="dark"] .lang.ur .lang-tag { color: #aab8ff; }
html[data-theme="dark"] .lang.en .lang-tag { color: var(--gold-2); }
.lang p { margin: 0; }
.lang.ar { background: linear-gradient(180deg, rgba(25,179,163,.06), transparent 70%); }
.lang.ar p { font-family: var(--font-ar); font-size: calc(var(--ar-size) * var(--scale)); line-height: var(--ar-lh); color: var(--ar-color); text-align: right; word-spacing: var(--ar-ws); text-rendering: optimizeLegibility; }
.lang.ur p { font-family: var(--font-ur); font-size: calc(1.2rem * var(--scale)); line-height: 2.55; color: var(--ur-color); text-align: right; }
.lang.en p { font-family: var(--font-read); font-size: calc(1.07rem * var(--scale)); line-height: 1.8; color: var(--en-color); }
.hadith:not(.full) .lang.ar p { font-size: calc(var(--ar-size) * .92 * var(--scale)); }
@media (min-width: 760px) { .hadith.full .lang.ar p { font-size: calc(var(--ar-size) * 1.12 * var(--scale)); } }
.lang p.missing { font-family: var(--font-en) !important; font-size: .9rem !important; line-height: 1.6 !important; color: var(--muted) !important; background: var(--sand); border-radius: 10px; padding: 10px 12px; font-style: italic; }
.lang.ur p.missing { font-family: var(--font-ur) !important; line-height: 2.2 !important; font-style: normal; }
.lang.ur p.missing span { display: block; font-family: var(--font-en); font-style: italic; line-height: 1.5; text-align: left; }
.h-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 20px 16px; background: linear-gradient(0deg, var(--sand), transparent); border-top: 1px solid var(--line-2); }
.h-ref { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); }
.h-ref b { color: var(--ink-2); }
.h-actions { display: flex; gap: 2px; flex-wrap: wrap; }
.act { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; min-width: 52px; min-height: 48px; justify-content: center; border: 0; background: transparent; color: var(--ink-2); border-radius: 12px; cursor: pointer; font: 600 .7rem var(--font-en); padding: 4px 6px; transition: background .15s, color .15s, transform .1s; }
.act:hover { background: var(--turq-1); color: var(--emerald-7); }
.act:active { transform: scale(.94); }
.act[aria-pressed="true"] { color: var(--emerald-6); }
.act[data-action="bookmark"][aria-pressed="true"] { color: var(--gold); --fill: var(--gold-2); }
.act[data-action="read"][aria-pressed="true"] { background: var(--turq-1); }

/* language visibility */
html:not([data-langs*="ar"]) .lang.ar,
html:not([data-langs*="ur"]) .lang.ur,
html:not([data-langs*="en"]) .lang.en { display: none; }
html[data-langs="ar"] .lang.ar, html[data-langs="ur"] .lang.ur, html[data-langs="en"] .lang.en { border-top: 0; }
html[data-langs="ur"] .lang.ur, html[data-langs="en"] .lang.en { padding-top: 14px; }

/* reader page */
.reader { padding-bottom: 20px; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 26px; }
.pn { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink) !important; text-decoration: none !important; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; min-width: 0; }
.pn:hover { transform: translateY(-2px); border-color: var(--emerald-5); }
.pn span { display: flex; flex-direction: column; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pn small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.pn.next { justify-content: flex-end; text-align: right; }
.pn .i { color: var(--emerald-6); }
.info-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.info { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.info h2 { font-size: 1rem; color: var(--emerald-7); }
html[data-theme="dark"] .info h2 { color: #6fe0c8; }
.info dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }
.note { display: flex; gap: 10px; align-items: center; background: var(--gold-1); border: 1px solid #ecd9a8; color: #6e5317; padding: 10px 14px; border-radius: 12px; font-size: .88rem; }
html[data-theme="dark"] .note { border-color: #4a3f1e; color: #e9d29a; }

/* ---------- home ---------- */
.home-grid { display: grid; gap: 22px; margin-top: -80px; position: relative; z-index: 2; }
@media (min-width: 980px) { .home-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.section-head h2 .i { color: var(--gold); width: 24px; height: 24px; }
.hotd .section-head { background: var(--card); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); }
.ur-inline { font-family: var(--font-ur); font-size: .85rem; color: var(--gold); font-weight: 400; line-height: 2; }
.more { font-weight: 600; font-size: .9rem; }
.side-col { display: grid; gap: 18px; }
.reminder { position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px 20px 18px; color: #fff; background-image: var(--geo-light), linear-gradient(150deg, #e0a845, #b06d1d 60%, #7a4a12); box-shadow: var(--shadow-lg); }
.reminder h2 { color: #fff; font-size: 1.15rem; }
.reminder-badge { display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.rem-en { font-family: var(--font-read); font-size: 1.1rem; line-height: 1.6; }
.rem-ur { font-family: var(--font-ur); font-size: 1.1rem; line-height: 2.4; }
.rem-note { font-size: .75rem; opacity: .85; margin: 0; border-top: 1px solid rgba(255,255,255,.25); padding-top: 8px; }
.goal-card, .continue-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); text-align: center; }
.goal-card h2, .continue-card h2 { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 1.05rem; }
.goal-card h2 .i, .continue-card h2 .i { color: var(--gold); }
.goal-ring { position: relative; width: 140px; height: 140px; margin: 4px auto 8px; }
.goal-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--turq-1); stroke-width: 12; }
.ring-fg { fill: none; stroke: url(#none); stroke: var(--emerald-5); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.goal-card.done .ring-fg { stroke: var(--gold); }
.goal-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.goal-num b { font-size: 2.2rem; line-height: 1; color: var(--emerald-7); }
html[data-theme="dark"] .goal-num b { color: #6fe0c8; }
.goal-num small { color: var(--muted); }
.cont-link { display: block; text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--turq-1); color: var(--ink) !important; text-decoration: none !important; }
.cont-link b { display: block; color: var(--emerald-7); }
.cont-link span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .88rem; color: var(--ink-2); }
.block { margin: 40px 0; }
.feat-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .feat-grid { grid-template-columns: repeat(3, 1fr); } }
.feat-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink) !important; text-decoration: none !important; transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.feat-card::after { content: "❝"; position: absolute; right: 14px; top: 2px; font-size: 4rem; color: var(--turq-2); font-family: Georgia, serif; line-height: 1; }
.feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feat-theme { font-size: .82rem; color: var(--stone); font-weight: 600; position: relative; z-index: 1; }
.feat-theme > span:first-child { display: inline-block; font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--gold-1); color: #8a6420; border-radius: 6px; padding: 1px 7px; margin-right: 6px; }
.feat-theme [lang="ur"] { font-family: var(--font-ur); font-weight: 400; }
.feat-en { font-family: var(--font-read); line-height: 1.7; flex: 1; }
.feat-ref { font-size: .8rem; font-weight: 700; color: var(--emerald-6); }
.mini-list { display: grid; gap: 10px; }
@media (min-width: 760px) { .block .mini-list { grid-template-columns: repeat(2, 1fr); } }
.mini { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.mini > a { flex: 1; min-width: 0; color: var(--ink) !important; text-decoration: none !important; }
.mini b { color: var(--emerald-7); display: block; font-size: .92rem; }
html[data-theme="dark"] .mini b { color: #6fe0c8; }
.mini .m-book { font-size: .75rem; color: var(--muted); }
.mini .m-ar { font-family: var(--font-ar); font-size: 1.2rem; line-height: 2; color: var(--ar-color); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; direction: rtl; text-align: right; }
.mini .m-ur { font-family: var(--font-ur); font-size: .95rem; line-height: 2.3; color: var(--ur-color); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; direction: rtl; text-align: right; }
.mini .m-en { font-size: .9rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini .m-time { font-size: .72rem; color: var(--muted); }
.mini .iconbtn { color: var(--muted); }
.empty { padding: 30px 18px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty .ornament { font-size: 2rem; color: var(--gold); }
.explore { border-radius: 24px; overflow: hidden; background-image: var(--geo-light), linear-gradient(135deg, var(--emerald-6), var(--emerald-9)); color: #e3f4ef; }
.explore-in { display: grid; gap: 24px; padding: 30px 24px; }
@media (min-width: 900px) { .explore-in { grid-template-columns: 1fr 1.1fr; padding: 40px; align-items: center; } }
.explore h2 { color: #fff; font-size: 1.6rem; }
.explore-books { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.explore-books a { display: flex; flex-direction: column; padding: 12px 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; color: #fff !important; text-decoration: none !important; transition: background .2s; position: relative; }
.explore-books a:hover { background: rgba(255,255,255,.18); }
.explore-books span { position: absolute; top: 10px; right: 12px; font-size: .75rem; color: var(--gold-2); font-weight: 700; }
.explore-books b { font-size: .92rem; padding-right: 22px; }
.explore-books i { font-style: normal; font-family: var(--font-ar-display); color: var(--gold-2); font-size: 1.05rem; }

/* ---------- topics ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; margin-bottom: 30px; }
.topic-grid.compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.topic-card { --tc: var(--emerald-6); --tc-bg: var(--turq-1); display: flex; flex-direction: column; gap: 4px; padding: 18px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink) !important; text-decoration: none !important; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.topic-card::before { content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: var(--tc-bg); opacity: .7; }
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.topic-card > * { position: relative; }
.topic-card b { font-size: .98rem; line-height: 1.3; }
.topic-card small { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.tc-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--tc-bg); color: var(--tc); margin-bottom: 6px; }
.tc-icon .i { width: 30px; height: 30px; }
.tc-icon.big { width: 76px; height: 76px; border-radius: 20px; background: rgba(255,255,255,.15); color: var(--gold-2); }
.tc-icon.big .i { width: 46px; height: 46px; }
.tc-ur { font-family: var(--font-ur); color: var(--tc); font-size: .95rem; line-height: 2; }
.tone-gold { --tc: #a87a25; --tc-bg: var(--gold-1); }
.tone-rose { --tc: var(--rose); --tc-bg: var(--rose-1); }
.tone-indigo { --tc: var(--indigo); --tc-bg: var(--indigo-1); }
.tone-stone { --tc: var(--stone); --tc-bg: var(--stone-1); }
.tone-teal { --tc: #0f9384; --tc-bg: var(--turq-2); }
html[data-theme="dark"] .topic-card { --tc: #6fe0c8; }
html[data-theme="dark"] .tone-gold { --tc: var(--gold-2); } html[data-theme="dark"] .tone-rose { --tc: #f39aac; } html[data-theme="dark"] .tone-indigo { --tc: #aab8ff; } html[data-theme="dark"] .tone-stone { --tc: #d9b98d; }
.topic-hero { display: flex; gap: 18px; align-items: center; }
.topic-names { font-size: 1.1rem; color: var(--gold-2); }
.topic-names [lang="ur"] { font-family: var(--font-ur); }
.topic-names [lang="ar"] { font-family: var(--font-ar); font-size: 1.25rem; }
.method { margin-top: 14px; font-size: .88rem; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 10px 14px; color: #e6f3ef; max-width: 860px; }
.section-title { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.section-title .i { color: var(--gold); width: 24px; height: 24px; }

/* ---------- books ---------- */
.book-grid { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.book-tile a { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink) !important; text-decoration: none !important; box-shadow: var(--shadow); height: 100%; transition: transform .15s, border-color .15s; }
.book-tile a:hover { transform: translateY(-2px); border-color: var(--emerald-5); }
.bt-num { flex: none; width: 46px; height: 46px; display: grid; place-items: center; font-weight: 800; color: var(--emerald-7); background: var(--turq-1); border-radius: 50%; position: relative; }
.bt-num::before { content: ""; position: absolute; inset: -4px; border: 1.5px dashed var(--gold-2); border-radius: 50%; }
.bt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bt-ar { font-family: var(--font-ar-display); font-size: 1.3rem; color: var(--ar-color); line-height: 1.7; }
.bt-en { font-weight: 700; line-height: 1.35; }
.bt-meta { font-size: .78rem; color: var(--muted); }
.bar { display: block; height: 6px; border-radius: 6px; background: var(--turq-1); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--emerald-5), var(--gold-2)); border-radius: 6px; transition: width .6s; }
.book-hero { display: flex; gap: 18px; align-items: center; }
.book-medal { flex: none; width: 76px; height: 76px; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: #3b2a07; background: linear-gradient(135deg, var(--gold-2), var(--gold)); border-radius: 50%; box-shadow: 0 0 0 6px rgba(232,196,108,.25); }
.book-progress { max-width: 360px; }
.book-progress .bar { background: rgba(255,255,255,.2); }
.book-progress small { color: #cde6df; }
.books-nav { margin-top: 26px; }

/* ---------- pager ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 20px 0 30px; }
.pager a, .pager span { display: inline-flex; align-items: center; gap: 4px; min-width: 42px; height: 42px; justify-content: center; padding: 0 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; text-decoration: none; }
.pager .cur { background: var(--emerald-7); color: #fff; border-color: var(--emerald-7); }
.pager .gap { border: 0; background: transparent; }

/* ---------- search ---------- */
.bigsearch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: rgba(255,255,255,.97); border-radius: 20px; padding: 8px; box-shadow: var(--shadow-lg); }
.bigsearch .i { color: var(--muted); margin-left: 8px; }
.bigsearch input { flex: 1 1 200px; min-width: 0; height: 46px; border: 0; font: inherit; font-size: 1.05rem; background: transparent; color: #1d2b29; outline: none; }
.bigsearch select { height: 46px; border-radius: 12px; border: 1px solid #e6dfcf; background: #fbf7ee; font: inherit; font-size: .9rem; padding: 0 10px; max-width: 100%; flex: 1 1 160px; color: #1d2b29; }
.hint { font-size: .85rem; color: #cde6df; margin: 10px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff !important; font-size: .85rem; text-decoration: none !important; }
.chip:hover { background: rgba(255,255,255,.24); }
.quick-hits { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hit-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--turq-1); color: var(--emerald-7) !important; font-weight: 600; font-size: .9rem; text-decoration: none !important; }
.hit-pill.gold { background: var(--gold-1); color: #7d5a17 !important; }
.result-count { color: var(--muted); }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.result a { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); color: var(--ink) !important; text-decoration: none !important; transition: border-color .15s; }
.result a:hover { border-color: var(--emerald-5); }
.r-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.r-head b { color: var(--emerald-7); }
html[data-theme="dark"] .r-head b { color: #6fe0c8; }
.r-head span { font-size: .8rem; color: var(--muted); }
.r-snip { font-family: var(--font-read); line-height: 1.7; }
.r-snip[lang="ar"] { font-family: var(--font-ar); font-size: 1.3rem; line-height: 2.1; }
.r-snip[lang="ur"] { font-family: var(--font-ur); font-size: 1.05rem; line-height: 2.4; }
.r-sub { font-size: .85rem; color: var(--muted); }
mark { background: var(--gold-1); color: inherit; padding: 0 2px; border-radius: 3px; box-shadow: inset 0 -2px 0 var(--gold-2); }
.examples { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.examples ul { margin: 0; padding-left: 18px; line-height: 2; }
.examples [lang="ur"] { font-family: var(--font-ur); }
.examples [lang="ar"] { font-family: var(--font-ar); font-size: 1.15rem; }

/* ---------- library ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 4px; scrollbar-width: none; }
.tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: 600 .9rem var(--font-en); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--emerald-7); color: #fff; border-color: var(--emerald-7); }
.count { font-size: .75rem; background: rgba(0,0,0,.08); padding: 0 7px; border-radius: 999px; }
.tabs button[aria-selected="true"] .count { background: rgba(255,255,255,.2); }
.tabpanel { margin-bottom: 40px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.collections { display: grid; gap: 16px; margin-top: 16px; }
.coll { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.coll-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.coll-head h3 { margin: 0; flex: 1; font-size: 1.05rem; }
.coll .mini { box-shadow: none; background: var(--bg); }
.collect-new { display: flex; gap: 8px; }
.collect-new input, .goal-set input { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 12px; font: inherit; }
.collect-new.inline { max-width: 480px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.9rem; color: var(--emerald-7); line-height: 1.1; }
html[data-theme="dark"] .stat b { color: #6fe0c8; }
.stat span { font-size: .82rem; color: var(--muted); }
.goal-set { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.goal-set .size-row { max-width: 320px; margin-top: 8px; }
.week-chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 140px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 12px 8px; }
.week-chart .day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: .65rem; color: var(--muted); }
.week-chart .day i { width: 100%; max-width: 24px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--teal), var(--emerald-6)); min-height: 3px; }
.week-chart .day.met i { background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.book-progress-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (min-width: 760px) { .book-progress-list { grid-template-columns: 1fr 1fr; } }
.book-progress-list li a { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink) !important; text-decoration: none !important; font-size: .88rem; }
.book-progress-list .n { font-weight: 800; color: var(--emerald-6); }
.book-progress-list .bar { grid-column: 2 / 4; margin: 0; }
.file-btn { cursor: pointer; }

/* ---------- prose / about ---------- */
.prose { padding-bottom: 30px; }
.prose h2 { margin-top: 1.6em; color: var(--emerald-7); }
html[data-theme="dark"] .prose h2 { color: #6fe0c8; }
.src-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); font-size: .93rem; }
.src-table th, .src-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.src-table th { width: 30%; color: var(--ink-2); background: var(--sand); }
@media (max-width: 600px) { .src-table th, .src-table td { display: block; width: 100%; } }
.checklist { list-style: none; padding: 0; display: grid; gap: 10px; }
.checklist li { padding: 12px 14px 12px 44px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); position: relative; font-size: .93rem; }
.checklist li::before { position: absolute; left: 14px; top: 12px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 900; color: #fff; }
.checklist .ok::before { content: "✓"; background: var(--emerald-5); }
.checklist .warn::before { content: "!"; background: var(--gold); }
.numlist { font-size: .82rem; line-height: 1.9; max-height: 220px; overflow: auto; }
.empty-state { text-align: center; padding: 50px 18px; }
.ornament { font-size: 3rem; color: var(--gold); line-height: 1; }
.ur-block { font-family: var(--font-ur); line-height: 2.4; font-size: 1.1rem; }

/* ---------- footer ---------- */
.site-foot { margin-top: 50px; background: var(--emerald-9); background-image: var(--geo-light); color: #b9d6cf; padding: 34px 0 20px; font-size: .9rem; }
.foot-in { display: grid; gap: 20px; }
@media (min-width: 760px) { .foot-in { grid-template-columns: 2fr 1fr; } }
.foot-brand { display: flex; align-items: center; gap: 8px; color: var(--gold-2); font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
.foot-links { display: flex; flex-direction: column; gap: 6px; }
.site-foot a { color: #e8f6f2; }
.foot-note { border-top: 1px solid rgba(255,255,255,.1); margin-top: 20px; padding-top: 14px; font-size: .8rem; color: #8fb3aa; }

/* ---------- dialogs ---------- */
dialog.sheet { border: 0; padding: 0; background: transparent; max-width: 560px; width: 100%; margin: auto auto 0; max-height: 92vh; color: var(--ink); }
dialog.sheet::backdrop { background: rgba(4,30,26,.55); backdrop-filter: blur(3px); }
.sheet-in { background: var(--card); border-radius: 24px 24px 0 0; padding: 18px 20px calc(22px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; }
@media (min-width: 700px) { dialog.sheet { margin: auto; } .sheet-in { border-radius: 24px; } }
dialog[open] .sheet-in { animation: up .25s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-head h2 { margin: 0; }
.sheet h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.seg { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.seg.theme { grid-template-columns: repeat(3, 1fr); }
.seg button, .seg label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; padding: 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 600 .88rem var(--font-en); cursor: pointer; }
.seg button small { font-weight: 400; color: var(--muted); font-family: var(--font-ar); font-size: .85rem; }
.seg button[aria-checked="true"] { border-color: var(--emerald-6); background: var(--turq-1); box-shadow: inset 0 0 0 1px var(--emerald-6); }
.seg.share-langs { grid-template-columns: repeat(3, 1fr); margin: 8px 0 12px; }
.seg label { flex-direction: row; gap: 6px; }
.seg label:has(input:checked) { border-color: var(--emerald-6); background: var(--turq-1); }
.size-row { display: flex; align-items: center; gap: 10px; }
.size-row input[type=range] { flex: 1; accent-color: var(--emerald-6); }
.install-row { margin-top: 18px; }
.card-preview { background: var(--sand); border-radius: 16px; padding: 10px; display: grid; place-items: center; }
.card-preview canvas { width: 100%; max-width: 330px; height: auto; border-radius: 10px; box-shadow: var(--shadow); }
.card-msg { margin: 10px; text-align: center; color: var(--ink-2); font-size: .9rem; }
.collect-list { display: grid; gap: 8px; margin: 10px 0 14px; }
.collect-list button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 600 .92rem var(--font-en); cursor: pointer; text-align: left; }
.collect-list button[aria-pressed="true"] { border-color: var(--emerald-6); background: var(--turq-1); }
.collect-list button .i { color: var(--emerald-6); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--emerald-9); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 960px) { .toast { bottom: 28px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .topbar, .bottomnav, .site-foot, .h-actions, .prevnext, .page-band, dialog { display: none !important; }
  body { background: #fff; padding: 0; }
  .hadith { box-shadow: none; border: 1px solid #ccc; }
}
html:not([data-langs*="ar"]) .mini .m-ar, html:not([data-langs*="ur"]) .mini .m-ur, html:not([data-langs*="en"]) .mini .m-en { display: none; }
.act:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.seg.arfont { grid-template-columns: repeat(3, 1fr); }
.seg.arfont button { min-height: 78px; }
.seg.arfont .sample { font-size: 1.25rem; white-space: nowrap; line-height: 1.8; color: var(--ar-color); direction: rtl; font-weight: 400; }
.seg.arfont button small { font-family: var(--font-en); font-size: .72rem; }

/* ---------- live search suggestions ---------- */
.suggest { position: fixed; z-index: 200; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow-y: auto; overscroll-behavior: contain; padding: 6px; text-align: left; font-size: .93rem; }
.suggest.loading::before { content: ""; position: sticky; top: -6px; display: block; height: 3px; margin: -6px -6px 3px; border-radius: 16px 16px 0 0; background: linear-gradient(90deg, transparent, var(--gold), var(--emerald-5), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: sg-bar 0.9s linear infinite; }
.sg-group + .sg-group { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 4px; }
.sg-title { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; display: flex; justify-content: space-between; }
.sg-count { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--emerald-6); }
.sg-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; }
.sg-item:hover, .sg-item.on { background: var(--turq-1); }
html[data-theme="dark"] .sg-item:hover, html[data-theme="dark"] .sg-item.on { background: var(--line); }
.sg-ic { flex: 0 0 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--sand); color: var(--emerald-7); font-weight: 700; font-size: .9rem; }
.sg-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sg-txt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-txt small { color: var(--ink-2); font-size: .82rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-txt small [lang="ur"], .sg-txt small [lang="ar"] { font-family: var(--font-ar); display: block; text-align: right; }
.sg-txt mark { background: var(--gold-1); color: inherit; padding: 0 2px; border-radius: 3px; }
html[data-theme="dark"] .sg-txt mark { background: rgba(201,151,58,.35); }
.sg-book { font-weight: 400; color: var(--muted); font-size: .85em; }
.sg-all { margin-top: 4px; border-top: 1px solid var(--line-2); border-radius: 0 0 10px 10px; }
.sg-all b { color: var(--emerald-6); }
.sg-empty { padding: 12px; color: var(--muted); font-size: .88rem; }

/* suggestion animations */
.suggest { transform-origin: top center; }
.suggest.sg-open { animation: sg-in .22s cubic-bezier(.2,.8,.2,1) both; }
.suggest.sg-closing { animation: sg-out .16s ease-in both; pointer-events: none; }
.suggest.sg-open .sg-item, .suggest.sg-open .sg-title, .suggest.sg-open .sg-empty { animation: sg-item .32s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 28ms + 40ms); }
.suggest.sg-swap .sg-group, .suggest.sg-swap .sg-all, .suggest.sg-swap .sg-empty { animation: sg-fade .18s ease-out both; }
.sg-item { transition: background-color .15s ease, transform .15s ease; }
.sg-item.on { transform: translateX(3px); }
.sg-ic { transition: background-color .15s ease, color .15s ease, transform .2s cubic-bezier(.3,1.6,.5,1); }
.sg-item:hover .sg-ic, .sg-item.on .sg-ic { background: var(--emerald-6); color: #fff; transform: scale(1.08); }
.sg-all .sg-ic { transition: transform .2s ease, background-color .15s ease, color .15s ease; }
.sg-all:hover .sg-ic, .sg-all.on .sg-ic { transform: translateX(3px) scale(1.08); }
.sg-txt mark { animation: sg-mark .6s ease-out both; animation-delay: .15s; background-size: 200% 100%; }
.topsearch input, .hero-search, .bigsearch { transition: box-shadow .2s ease, border-color .2s ease; }
.topsearch input:focus { border-color: var(--emerald-5); box-shadow: 0 0 0 3px rgba(20,160,136,.18); outline: none; }
.hero-search:focus-within, .bigsearch:focus-within { box-shadow: var(--shadow-lg), 0 0 0 3px rgba(232,196,108,.55); }
@keyframes sg-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sg-out { to { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes sg-item { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sg-fade { from { opacity: .35; } to { opacity: 1; } }
@keyframes sg-mark { from { background-color: transparent; } }
@keyframes sg-bar { from { background-position: -100% 0; } to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .suggest, .suggest *, .suggest::before { animation: none !important; transition: none !important; }
  .sg-item.on, .sg-item:hover .sg-ic { transform: none; }
}

/* ======================================================================
   Smart search & voice search
   ====================================================================== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.linkbtn { border: 0; background: none; color: var(--emerald-6); font: 600 .85rem var(--font-en); cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.linkbtn:hover { background: var(--turq-1); }
.kbd { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--turq-1); color: var(--emerald-7); font-weight: 600; font-size: .85rem; }
.kbd .i { width: 15px; height: 15px; }

/* microphone buttons */
.mic-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 44px; height: 44px; border-radius: 999px; border: 0; cursor: pointer; background: var(--turq-1); color: var(--emerald-7); transition: background .2s, transform .15s, box-shadow .2s; position: relative; }
.mic-btn:hover { background: var(--turq-2); transform: scale(1.05); }
.mic-btn:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }
.mic-btn .i { width: 22px; height: 22px; }
.mic-btn.no-sr { opacity: .75; }
.mic-btn.sm { width: 34px; height: 34px; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: transparent; }
.mic-btn.sm:hover { background: var(--turq-1); transform: translateY(-50%) scale(1.05); }
.topsearch .mic-btn.sm .i { width: 18px; height: 18px; position: static; transform: none; color: var(--emerald-6); }
.topsearch input { padding-right: 42px; }
.hero-search .mic-btn { background: #e3f6f2; color: #0b5d4f; }
html[data-theme="dark"] .mic-btn:not(.sm) { background: #e3f6f2; color: #0b5d4f; }

/* search page form */
.sx-band { padding-bottom: 22px; }
.sx-h-ur { font-family: var(--font-ur); font-size: .7em; color: var(--gold-2); font-weight: 400; margin-left: 8px; }
.sx-form { display: block; padding: 8px; }
.sx-box { display: flex; align-items: center; gap: 6px; }
.sx-box > .i { color: var(--muted); margin-left: 8px; flex: none; }
.sx-box input { flex: 1 1 auto; min-width: 0; height: 52px; border: 0; font: inherit; font-size: 1.12rem; background: transparent; color: #1d2b29; outline: none; }
.sx-box input::-webkit-search-cancel-button { display: none; }
.sx-clear { flex: none; width: 36px; height: 36px; border-radius: 999px; border: 0; background: transparent; color: #6b7a76; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sx-clear:hover { background: #f1ece0; }
.sx-clear .i { width: 18px; height: 18px; }
.sx-box .mic-btn { width: auto; padding: 0 16px 0 13px; height: 46px; background: linear-gradient(135deg, #e3f6f2, #c9ede6); color: #0b5d4f; font: 700 .95rem var(--font-en); box-shadow: inset 0 0 0 1.5px rgba(14,124,107,.25); }
.sx-go { height: 46px; flex: none; }
@media (max-width: 560px) {
  .sx-box { flex-wrap: wrap; }
  .sx-box input { flex-basis: calc(100% - 90px); height: 48px; }
  .sx-box .mic-btn, .sx-go { flex: 1 1 40%; }
}
.sx-filters { border-top: 1px solid #ece6d8; margin-top: 8px; padding: 10px 6px 2px; color: #44524f; font-size: .9rem; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.sx-scope { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sx-flabel { font-weight: 600; color: var(--muted); font-size: .85rem; margin-right: 2px; }
.sx-band .sx-flabel { color: #6b7a76; }
.sx-radio { position: relative; cursor: pointer; }
.sx-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.sx-radio span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #e6dfcf; background: #fbf7ee; font-weight: 600; color: #44524f; transition: background .15s, border-color .15s; }
.sx-radio span[lang] { font-family: var(--font-ar); font-size: 1rem; }
.sx-radio span[lang="ur"] { font-family: var(--font-ur); font-size: .9rem; line-height: 2.2; }
.sx-radio input:checked + span { background: var(--emerald-7); border-color: var(--emerald-7); color: #fff; }
.sx-radio input:focus-visible + span { outline: 3px solid var(--gold-2); outline-offset: 1px; }
.sx-adv { flex: 1 1 100%; }
.sx-adv summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; color: var(--emerald-7); padding: 6px 10px; border-radius: 10px; list-style: none; user-select: none; }
.sx-adv summary::-webkit-details-marker { display: none; }
.sx-adv summary:hover { background: #f1ece0; }
.sx-adv summary .i { width: 18px; height: 18px; }
.sx-badge { background: var(--gold); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; }
.sx-adv-in { display: grid; gap: 12px; padding: 10px 4px 6px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sx-adv-in { grid-template-columns: 1fr 1fr; } }
.sx-field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .85rem; color: #6b7a76; }
.sx-field select, .sx-field input { height: 44px; border-radius: 12px; border: 1px solid #e6dfcf; background: #fbf7ee; font: inherit; font-size: .95rem; padding: 0 10px; color: #1d2b29; width: 100%; }
.sx-goto > div { display: flex; gap: 6px; }
.sx-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 600; color: #44524f; padding-top: 6px; }
.sx-check input { width: 20px; height: 20px; accent-color: var(--emerald-7); margin-top: 2px; flex: none; }
.sx-check small { display: block; font-weight: 400; color: #6b7a76; font-size: .8rem; }
.sx-band .hint { margin-top: 12px; }

/* results area */
.sx-page { position: relative; padding-bottom: 30px; }
.sx-progress { position: sticky; top: 0; height: 3px; margin: -14px 0 11px; border-radius: 3px; overflow: hidden; z-index: 5; }
.sx-progress.on { background: linear-gradient(90deg, transparent, var(--gold), var(--emerald-5), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: sx-bar 1s linear infinite; }
@keyframes sx-bar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
#sx-out[aria-busy="true"] { opacity: .55; transition: opacity .2s .15s; }
.sx-langs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.sx-langs button { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: 600 .82rem var(--font-en); cursor: pointer; }
.sx-langs button[aria-checked="true"] { background: var(--turq-1); border-color: var(--emerald-6); color: var(--emerald-7); box-shadow: inset 0 0 0 1px var(--emerald-6); }
html[data-theme="dark"] .sx-langs button[aria-checked="true"] { background: var(--line); color: #7fe0cc; }
.sx-summary { margin-bottom: 14px; }
.sx-count { margin: 0 0 6px; font-size: 1.05rem; }
.sx-count b { color: var(--emerald-7); font-size: 1.15rem; }
html[data-theme="dark"] .sx-count b { color: #6fe0c8; }
.sx-meta { color: var(--muted); font-size: .85rem; }
.sx-understood { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.sx-label { font-weight: 700; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 4px 6px 0; display: inline-flex; align-items: center; gap: 6px; }
.sx-understood .sx-label, .sx-related .sx-label { margin-bottom: 0; }
.sx-label .i { width: 16px; height: 16px; }
.sx-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.sx-chip.topic { background: var(--gold-1); border-color: #ecd9a4; color: #6b4d12; }
html[data-theme="dark"] .sx-chip.topic { background: #2a2614; border-color: #5a4a1f; color: var(--gold-2); }
.sx-chip [lang="ur"], .sx-rel [lang="ur"], .hit-pill [lang="ur"] { font-family: var(--font-ur); font-weight: 400; font-size: .92em; line-height: 1.9; }
.sx-chip [lang="ar"] { font-family: var(--font-ar); font-weight: 400; }
.sx-chip[lang="ur"] { font-family: var(--font-ur); font-weight: 400; line-height: 2; }
.sx-plus { color: var(--muted); font-weight: 700; }
.sx-notes { margin: 6px 0 0; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); display: grid; gap: 3px; }
.sx-notes li::before { content: "ⓘ "; color: var(--emerald-6); }
.sx-related { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 16px; }
.sx-pop { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-rel { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; min-height: 38px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2) !important; font-weight: 600; font-size: .88rem; text-decoration: none !important; transition: border-color .15s, background .15s, transform .15s; }
.sx-rel:hover { border-color: var(--emerald-5); background: var(--turq-1); transform: translateY(-1px); }
.sx-rel[lang="ur"] { font-family: var(--font-ur); font-weight: 400; font-size: .95rem; line-height: 2.2; }
.sx-rel[lang="ar"] { font-family: var(--font-ar); font-weight: 400; font-size: 1.05rem; }
html[data-theme="dark"] .sx-rel:hover { background: var(--line); }
.sx-start { display: grid; gap: 22px; margin-bottom: 30px; }
.sx-start[hidden] { display: none; }
.sx-row { display: flex; justify-content: space-between; align-items: center; }
.sx-more { text-align: center; margin: 6px 0 26px; }
.sx-more small { font-weight: 400; opacity: .8; }
.sx-end { text-align: center; color: var(--muted); font-size: .9rem; margin: 6px 0 26px; }
.sx-empty { text-align: center; padding: 26px 14px 10px; }
.sx-empty h2 { font-size: 1.25rem; }
.sx-tips { text-align: left; max-width: 520px; margin: 0 auto 18px; line-height: 1.9; }
.sx-try { max-width: 640px; margin: 0 auto; }
.sx-try .sx-pop { justify-content: center; }

/* result cards: shortened text with "Show full hadith" */
.hadith.is-result { margin-bottom: 16px; }
.h-found { margin: 0; padding: 0 20px 6px; font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.h-found .i { width: 14px; height: 14px; color: var(--emerald-6); }
.hadith.is-result:not(.expanded) .lang p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
.hadith.is-result:not(.expanded) .lang.ar p, .hadith.is-result:not(.expanded) .lang.ur p { -webkit-line-clamp: 4; line-clamp: 4; }
.hadith.is-result .lang mark { background: #fbe7a8; box-shadow: inset 0 -2px 0 var(--gold); border-radius: 4px; padding: 0 2px; }
html[data-theme="dark"] .hadith.is-result .lang mark { background: #5a4a1f; color: #fff6dc; box-shadow: inset 0 -2px 0 var(--gold-2); }
.r-more { display: flex; flex-wrap: wrap; gap: 8px; }
.r-more .btn .i { width: 16px; height: 16px; transition: transform .2s; }
.hadith.expanded [data-action="expand"] .i { transform: rotate(90deg); }

/* suggestions: understood topics */
.sg-understood { padding: 8px 10px 4px; font-size: .8rem; color: var(--muted); }
.sg-understood > span { color: #6b4d12; background: var(--gold-1); padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.sg-understood [lang="ur"] { font-family: var(--font-ur); font-weight: 400; }
html[data-theme="dark"] .sg-understood > span { background: #2a2614; color: var(--gold-2); }

/* voice dialog */
.voice-dlg h2 [lang="ur"] { font-family: var(--font-ur); font-weight: 400; font-size: .75em; color: var(--muted); margin-left: 6px; }
.vc-langs { grid-template-columns: repeat(2, 1fr); margin-bottom: 6px; }
@media (min-width: 520px) { .vc-langs { grid-template-columns: repeat(4, 1fr); } }
.vc-langs b[lang="ur"] { font-family: var(--font-ur); font-weight: 400; line-height: 1.9; }
.vc-langs b[lang="ar"] { font-family: var(--font-ar); }
.vc-langs button small { font-family: var(--font-en) !important; font-size: .72rem !important; text-align: center; }
.vc-stage { text-align: center; padding: 14px 6px 6px; }
.vc-orb { position: relative; width: 112px; height: 112px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; margin: 4px auto 6px; display: block; padding: 0; }
.vc-orb:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .6; }
.vc-core { position: absolute; inset: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--emerald-5), var(--emerald-7)); color: #fff; box-shadow: 0 8px 26px rgba(11,93,79,.35); transition: transform .2s, background .3s; z-index: 2; }
.vc-orb:hover .vc-core { transform: scale(1.05); }
.vc-orb:focus-visible .vc-core { outline: 4px solid var(--gold-2); outline-offset: 3px; }
.vc-core .i { width: 38px; height: 38px; }
.vc-core .stop { display: none; width: 30px; height: 30px; }
.vc-ring { position: absolute; inset: 14px; border-radius: 50%; border: 2px solid var(--emerald-5); opacity: 0; }
.vc-stage[data-state="listening"] .vc-core { background: linear-gradient(135deg, #e0504f, #b3262d); box-shadow: 0 8px 30px rgba(179,38,45,.4); }
.vc-stage[data-state="listening"] .vc-core .mic { display: none; }
.vc-stage[data-state="listening"] .vc-core .stop { display: block; }
.vc-stage[data-state="listening"] .vc-ring { border-color: #e0504f; animation: vc-ring 1.8s ease-out infinite; }
.vc-stage[data-state="listening"] .vc-ring.r2 { animation-delay: .6s; }
.vc-stage[data-state="listening"] .vc-ring.r3 { animation-delay: 1.2s; }
.vc-stage.hearing .vc-ring { animation-duration: 1.1s !important; }
@keyframes vc-ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }
.vc-bars { display: flex; justify-content: center; align-items: center; gap: 4px; height: 26px; margin-bottom: 4px; visibility: hidden; }
.vc-bars i { width: 5px; height: 6px; border-radius: 3px; background: #e0504f; }
.vc-stage[data-state="listening"] .vc-bars { visibility: visible; }
.vc-stage.hearing .vc-bars i { animation: vc-bar .9s ease-in-out infinite; }
.vc-bars i:nth-child(2) { animation-delay: .1s; } .vc-bars i:nth-child(3) { animation-delay: .25s; } .vc-bars i:nth-child(4) { animation-delay: .05s; }
.vc-bars i:nth-child(5) { animation-delay: .3s; } .vc-bars i:nth-child(6) { animation-delay: .15s; } .vc-bars i:nth-child(7) { animation-delay: .35s; }
@keyframes vc-bar { 0%, 100% { height: 6px; } 50% { height: 24px; } }
.vc-stage[data-state="done"] .vc-core { background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.vc-stage[data-state="error"] .vc-core, .vc-stage[data-state="nothing"] .vc-core { background: linear-gradient(135deg, #8fa29d, #5d6e6a); box-shadow: none; }
.vc-status { font-weight: 700; font-size: 1.02rem; margin: 0 0 8px; color: var(--ink); }
.vc-stage[data-state="error"] .vc-status { color: var(--rose); }
.vc-text { min-height: 1.6em; font-size: 1.25rem; line-height: 1.8; margin: 0 0 10px; color: var(--emerald-7); font-weight: 600; unicode-bidi: plaintext; }
.vc-text:empty { display: none; }
.vc-stage[data-state="error"] .vc-text { font-size: .92rem; font-weight: 400; color: var(--ink-2); }
html[data-theme="dark"] .vc-text { color: #7fe0cc; }
.vc-hint [lang="ur"] { font-family: var(--font-ur); }
.vc-stage:not([data-state="idle"]):not([data-state="listening"]) .vc-hint { display: none; }
.vc-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 12px; }
.vc-actions:not(:has(.btn:not([hidden]))) { display: none; }
.vc-actions .btn .i { width: 18px; height: 18px; }
.vc-auto { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); cursor: pointer; }
.vc-auto input { width: 18px; height: 18px; accent-color: var(--emerald-7); }
html[data-theme="dark"] .hit-pill { background: #12352f; color: #9eeedb !important; border: 1px solid #1f5a4f; }
html[data-theme="dark"] .hit-pill.gold { background: #2a2614; color: var(--gold-2) !important; border-color: #5a4a1f; }

/* ---------- search: audit fixes ---------- */
.sx-field select, .sx-field input { flex: none; }
body.page-search .topsearch { display: none; }
@media (min-width: 960px) { body.page-search .topbar .iconbtn[data-action="settings"] { margin-left: auto; } }
.sx-exact { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--sand); border-radius: 6px; padding: 1px 6px; }
.sx-chip bdi[lang="ur"] { font-family: var(--font-ur); font-weight: 400; line-height: 2; }
.sx-warn { color: #8a5a10; font-weight: 600; }
html[data-theme="dark"] .sx-warn { color: var(--gold-2); }
.sx-share { margin-left: 4px; vertical-align: middle; }
.sx-share .i { width: 15px; height: 15px; vertical-align: -2px; }
.sx-reset { grid-column: 1 / -1; text-align: right; }
.sx-recent-item { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.sx-recent-item .sx-rel { border: 0; background: transparent; padding-right: 6px; }
.sx-recent-x { width: 30px; height: 30px; margin-right: 4px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sx-recent-x:hover { background: var(--rose-1); color: var(--rose); }
.sx-recent-x .i { width: 14px; height: 14px; }
.to-top { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60; display: inline-flex; align-items: center; gap: 4px; height: 46px; padding: 0 16px 0 12px; border-radius: 999px; border: 0; background: var(--emerald-7); color: #fff; font: 700 .9rem var(--font-en); box-shadow: var(--shadow-lg); cursor: pointer; animation: up .25s ease-out; }
.to-top .i { transform: rotate(90deg); width: 18px; height: 18px; }
.to-top[hidden] { display: none; }
@media (min-width: 960px) { .to-top { bottom: 28px; } }
.sx-back { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 14px; }
.sx-back a { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--turq-1); color: var(--emerald-7); }
.sx-back a .i { width: 18px; height: 18px; }
html[data-theme="dark"] .sx-back a { background: #12352f; color: #9eeedb; }
.hadith.full .lang mark { background: #fbe7a8; box-shadow: inset 0 -2px 0 var(--gold); border-radius: 4px; padding: 0 2px; }
html[data-theme="dark"] .hadith.full .lang mark { background: #5a4a1f; color: #fff6dc; }
.book-search { position: relative; display: flex; align-items: center; gap: 6px; max-width: 460px; margin-top: 14px; background: rgba(255,255,255,.96); border-radius: 999px; padding: 4px 4px 4px 14px; box-shadow: var(--shadow); }
.book-search > .i { color: #6b7a76; flex: none; width: 18px; }
.book-search input[type="search"] { flex: 1; min-width: 0; border: 0; background: transparent; height: 40px; font: inherit; color: #1d2b29; outline: none; }
.book-search .mic-btn { width: 40px; height: 40px; background: #e3f6f2; color: #0b5d4f; }
input[dir="auto"]::placeholder { text-align: left; }
.sx-goto > div input { flex: 1 1 auto; width: auto; min-width: 0; }
.sx-goto > div .btn { flex: none; height: 44px; }
.book-hero > div { flex: 1 1 auto; min-width: 0; }
.book-search { width: 100%; box-sizing: border-box; }
@media (max-width: 520px) { .book-hero { align-items: flex-start; } .book-medal { width: 56px; height: 56px; font-size: 1.25rem; } }
@media (max-width: 959px) { .to-top { width: 46px; padding: 0; justify-content: center; bottom: calc(150px + env(safe-area-inset-bottom)); right: 12px; opacity: .92; } .to-top span { display: none; } }

/* ---------- visitor counter (footer) ---------- */
.visit-counter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 22px; }
.visit-counter[hidden] { display: none; }
.vc-stat { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(232,196,108,.28); min-width: 200px; }
.vc-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #3b2a07; }
.vc-ic .i { width: 22px; height: 22px; }
.vc-stat b { display: block; font-size: 1.45rem; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.vc-stat small { display: block; color: #b9d6cf; font-size: .8rem; }
.vc-stat small [lang="ur"] { font-family: var(--font-ur); margin-left: 4px; color: var(--gold-2); }
.vc-note { flex: 1 1 220px; margin: 0; font-size: .76rem; color: #8fb3aa; }
@media (max-width: 520px) { .vc-stat { flex: 1 1 100%; } }
.vc-stat small [lang="ur"] { display: inline-block; line-height: 2.1; vertical-align: middle; }
.vc-stat small { line-height: 1.6; }
