/* ============ نور مهدوی — تم عرفانی (شب / روز) ============ */
:root {
  --gold: #e6c36a;
  --gold-2: #b8903a;
  --teal: #5fd0c5;
  --bg: #070b1a;
  --bg-2: #0e1738;
  --card: rgba(255, 255, 255, .045);
  --card-b: rgba(230, 195, 106, .22);
  --text: #ece7d6;
  --muted: #9aa0b8;
  --ar-size: 1.9rem;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --font: "Vazirmatn", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-ar: "Amiri Quran", "Scheherazade New", "Traditional Arabic", serif;
  --font-display: "Reem Kufi", "Vazirmatn", serif;
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='%23e6c36a' stroke-opacity='.09' stroke-width='1'%3E%3Crect x='25' y='25' width='40' height='40'/%3E%3Crect x='25' y='25' width='40' height='40' transform='rotate(45 45 45)'/%3E%3Ccircle cx='45' cy='45' r='9'/%3E%3C/g%3E%3C/svg%3E");
}
[data-theme="day"] {
  --bg: #f7f1e1;
  --bg-2: #efe5c9;
  --card: rgba(255, 255, 255, .72);
  --card-b: rgba(150, 110, 30, .28);
  --text: #2b2418;
  --muted: #6f6650;
  --gold: #9a6f12;
  --gold-2: #7a550a;
  --teal: #1b8a80;
  --shadow: 0 10px 30px rgba(120, 90, 20, .15);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font); color: var(--text); line-height: 1.9;
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg-2), var(--bg) 70%) fixed, var(--bg);
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}
.sky { position: fixed; inset: 0; z-index: -1; background-image: var(--star); background-size: 90px; opacity: .9; pointer-events: none;
  mask-image: linear-gradient(to bottom, #000, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.5; margin: 0 0 .4em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); color: var(--gold); letter-spacing: .01em; }
.muted { color: var(--muted); font-size: .9rem; }
.wrap { width: min(1080px, 100% - 2rem); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 2rem); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* ---------- نوار بالا ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem;
  padding: .6rem 1rem; padding-top: calc(.6rem + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-b);
}
.brand { display: flex; align-items: center; gap: .5rem; color: var(--gold); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-inline-end: auto; }
.topnav { display: none; gap: 1.4rem; }
.topnav a { color: var(--muted); padding: .2rem .1rem; border-bottom: 2px solid transparent; transition: .2s; }
.topnav a:hover, .topnav a.on { color: var(--gold); border-color: var(--gold); }
.icon-btn { background: var(--card); color: var(--gold); border: 1px solid var(--card-b); border-radius: 12px; min-width: 42px; height: 42px; font: inherit; cursor: pointer; padding: 0 .7rem; }
.icon-btn:hover { background: color-mix(in srgb, var(--gold) 15%, transparent); }

/* ---------- هیرو ---------- */
.hero { text-align: center; padding: 3.2rem 1.2rem 2.4rem; position: relative; overflow: hidden; }
.moon { width: 120px; height: 120px; margin: 0 auto 1rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d6, var(--gold) 55%, var(--gold-2));
  box-shadow: 0 0 60px 10px color-mix(in srgb, var(--gold) 45%, transparent), 0 0 140px 40px color-mix(in srgb, var(--gold) 18%, transparent);
  -webkit-mask: radial-gradient(circle 100px at 78% 30%, transparent 98%, #000 100%); mask: radial-gradient(circle 100px at 78% 30%, transparent 98%, #000 100%);
  animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.bismillah { font-family: var(--font-ar); font-size: clamp(1.5rem, 5vw, 2.2rem); color: var(--gold); margin: .2rem 0 .6rem; }
.lead { color: var(--muted); max-width: 640px; margin: .4rem auto 1.4rem; font-size: 1.02rem; }

.search { display: flex; gap: .5rem; max-width: 560px; margin: 0 auto; padding: .35rem; background: var(--card); border: 1px solid var(--card-b); border-radius: 999px; box-shadow: var(--shadow); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; padding: .6rem 1rem; outline: none; }
.search input::placeholder { color: var(--muted); }
.search button { border: 0; border-radius: 999px; padding: 0 1.4rem; font: inherit; font-weight: 700; cursor: pointer; color: #1b1405; background: linear-gradient(135deg, #f4dc98, var(--gold-2)); }

/* ---------- عنوان بخش ---------- */
.section-title { text-align: center; margin: 2.2rem 0 1.2rem; font-size: 1.35rem; color: var(--gold); position: relative; }
.section-title span { padding: 0 1rem; background: var(--bg); position: relative; z-index: 1; }
.section-title::before { content: ""; position: absolute; inset-inline: 0; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); }
[data-theme="day"] .section-title span { background: var(--bg); }

/* ---------- کارت‌ها ---------- */
.grid.cats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--card-b); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(6px); }
.card.cat { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.5rem 1.1rem; transition: transform .25s, border-color .25s, box-shadow .25s; position: relative; overflow: hidden; }
.card.cat::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 60%); opacity: 0; transition: .3s; }
.card.cat:hover { transform: translateY(-4px); border-color: var(--gold); }
.card.cat:hover::after { opacity: 1; }
.card.cat h3 { font-size: 1.25rem; margin: .4rem 0 .2rem; color: var(--gold); }
.card.cat p { color: var(--muted); font-size: .9rem; margin: 0 0 .8rem; line-height: 1.8; }
.cat-icon { width: 64px; height: 64px; display: grid; place-items: center; font-size: 1.9rem; border-radius: 50%; border: 1px solid var(--gold-2); background: radial-gradient(circle, color-mix(in srgb, var(--gold) 20%, transparent), transparent 70%); }
.cat-icon.big { width: 84px; height: 84px; font-size: 2.4rem; margin: 0 auto 1rem; }
.badge { display: inline-block; font-size: .78rem; padding: .05rem .7rem; border-radius: 999px; border: 1px solid var(--card-b); color: var(--gold); background: var(--card); }
.badge.warn { color: #ffb86b; border-color: #ffb86b66; }

/* ---------- لیست‌ها ---------- */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.row { display: flex; flex-direction: column; gap: .1rem; padding: .9rem 1.1rem; background: var(--card); border: 1px solid var(--card-b); border-radius: 14px; transition: .2s; position: relative; }
a.row::after { content: "‹"; position: absolute; inset-inline-end: 1rem; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 1.5rem; }
a.row { padding-inline-end: 2.4rem; }
a.row:hover { border-color: var(--gold); transform: translateX(-3px); }
.row-title { font-weight: 700; }
.row-sub { color: var(--muted); font-size: .86rem; line-height: 1.7; }
.empty { text-align: center; color: var(--muted); padding: 2rem 0; }

/* ---------- سرتیتر صفحه ---------- */
.page-head { text-align: center; padding: 2.2rem 1rem 1rem; }
.page-head.tight { padding: .6rem 0 .4rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin: 1rem 0 .4rem; text-align: center; }
.crumbs a:hover { color: var(--gold); }
.crumbs i { font-style: normal; margin: 0 .3rem; opacity: .6; }

/* ---------- خواندن دعا ---------- */
.reader { max-width: 820px; padding-bottom: 1rem; }
.tools { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 1rem 0; position: sticky; top: 64px; z-index: 5; padding: .5rem; border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--card-b); }
.tools button { font: inherit; font-size: .88rem; color: var(--text); background: var(--card); border: 1px solid var(--card-b); border-radius: 10px; padding: .35rem .8rem; cursor: pointer; }
.tools button:hover, .tools button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.ornament { text-align: center; color: var(--gold); font-size: 1.6rem; margin: 1rem 0; letter-spacing: .5em; opacity: .85; }
.verses { display: grid; gap: 1.1rem; }
.verse { padding: 1.1rem 1.2rem; background: var(--card); border: 1px solid var(--card-b); border-radius: var(--radius); }
.ar { font-family: var(--font-ar); font-size: var(--ar-size); line-height: 2.5; margin: 0; text-align: center; color: var(--text); text-wrap: balance; }
.fa { margin: .4rem 0 0; color: var(--muted); text-align: center; font-size: var(--fa-size, 1.02rem); }
.tr.block { padding: 1rem 1.2rem; border-top: 1px dashed var(--card-b); }
.mini { font-size: 1rem; color: var(--gold); text-align: center; }
.reader.no-trans .tr { display: none; }
.translit { margin: 1.2rem 0; background: var(--card); border: 1px solid var(--card-b); border-radius: 14px; padding: .7rem 1.1rem; }
.translit summary { cursor: pointer; color: var(--gold); font-weight: 700; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 1.8rem 0 0; }
.pager a { padding: .5rem 1rem; border: 1px solid var(--card-b); border-radius: 12px; background: var(--card); color: var(--gold); font-size: .92rem; }
.pager a:hover { border-color: var(--gold); }

/* ---------- دکمه‌ها ---------- */
.btn { display: inline-block; font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 12px; padding: .6rem 1.3rem; color: #1b1405; background: linear-gradient(135deg, #f4dc98, var(--gold-2)); }
.btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--card-b); }
.btn.danger { background: transparent; color: #ff8a8a; border: 1px solid #ff8a8a55; }
.btn.sm { padding: .25rem .8rem; font-size: .85rem; }
.btn:hover { filter: brightness(1.08); }

/* ---------- فوتر و ناوبری موبایل ---------- */
.footer { text-align: center; padding: 2.5rem 1rem 1.5rem; color: var(--muted); font-size: .9rem; }
.footer p { margin: .2rem 0; }
.bottomnav { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; padding: .45rem .5rem calc(.45rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--card-b); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 0; font-size: .74rem; color: var(--muted); padding: .1rem 1.2rem; line-height: 1.5; }
.bottomnav a span { font-size: 1.15rem; filter: grayscale(.4); }
.bottomnav a.on { color: var(--gold); }

@media (min-width: 760px) {
  .topnav { display: flex; }
  .bottomnav { display: none; }
  body { padding-bottom: 0; }
  .hero { padding-top: 4.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- پنل ادمین ---------- */
body.admin { padding-bottom: 3rem; }
body.admin main { padding-top: 1.2rem; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-head h1 small { color: var(--muted); font-size: .9rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.form { padding: 1.3rem; display: grid; gap: 1rem; }
.form.narrow-form { max-width: 420px; margin: 3rem auto; }
.form label { display: grid; gap: .3rem; font-size: .92rem; color: var(--muted); }
.form label small { color: var(--muted); opacity: .8; }
.form.card h1 { margin: 0; }
input, textarea, select { font: inherit; color: var(--text); background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--card-b); border-radius: 12px; padding: .6rem .8rem; width: 100%; }
.filters input, .filters select { width: auto; flex: 1; min-width: 150px; }
textarea { resize: vertical; line-height: 1.9; }
.ar-input { font-family: var(--font-ar); font-size: 1.3rem; line-height: 2.2; }
.two { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.two > *, .form label { min-width: 0; }
@media (min-width: 640px) { .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.check { display: flex !important; align-items: center; gap: .5rem; }
.check input { width: auto; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.admin-row { flex-direction: row !important; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-row > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.flash { padding: .7rem 1rem; border-radius: 12px; background: color-mix(in srgb, var(--teal) 15%, transparent); border: 1px solid var(--teal); margin-bottom: 1rem; }
.flash.err, .err { color: #ff9b9b; } .flash.err { background: #ff6b6b1a; border-color: #ff6b6b66; }

@media print {
  .topbar, .bottomnav, .tools, .pager, .footer, .sky, .search { display: none !important; }
  body { background: #fff; color: #000; }
  .ar, .fa, .verse { color: #000; border-color: #ccc; background: none; box-shadow: none; }
}

/* ---------- نوار بخش‌ها (چیپ‌ها) ---------- */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .55rem 1rem; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  position: sticky; top: 59px; z-index: 19; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--card-b); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: .25rem .95rem; border: 1px solid var(--card-b); border-radius: 999px; background: var(--card); color: var(--muted); font-size: .92rem; white-space: nowrap; transition: .2s; }
.chip:hover, .chip.on { color: var(--gold); border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
@media (min-width: 760px) { .chips { justify-content: center; top: 65px; } }
.group-title { color: var(--gold); font-size: 1.15rem; margin: 1.6rem 0 .7rem; padding-inline-start: .3rem; border-inline-start: 3px solid var(--gold-2); }
.tools { top: 112px; }

/* ---------- صلوات‌شمار ---------- */
.counter { padding: 1.2rem; margin: 1.4rem 0; text-align: center; }
.counters { display: grid; gap: 1.2rem; margin-top: 1.4rem; }
.c-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.c-head .c-title { margin: 0; font-size: 1.1rem; color: var(--gold); text-align: start; overflow-wrap: anywhere; }
.c-body { display: grid; gap: 1rem; justify-items: center; }
.c-ring { position: relative; width: min(240px, 70vw); aspect-ratio: 1; }
.c-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.c-ring circle { fill: none; stroke-width: 6; }
.c-bg { stroke: var(--card-b); }
.c-fg { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .25s ease; }
.counter.done .c-fg { stroke: var(--teal); }
.c-tap { position: absolute; inset: 14%; border-radius: 50%; border: 1px solid var(--card-b); cursor: pointer; color: var(--text); font: inherit;
  display: grid; place-content: center; gap: 0; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--gold) 22%, transparent), var(--card));
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; transition: transform .08s; }
.c-tap:active { transform: scale(.95); }
.c-num { font-family: var(--font-display); font-size: clamp(2.2rem, 11vw, 3.2rem); color: var(--gold); line-height: 1.2; }
.c-info { color: var(--muted); font-size: .8rem; }
.c-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: center; }
.c-actions label { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .9rem; }
.c-actions select { width: auto; padding: .3rem .6rem; }

/* ---------- یادبود ---------- */
.center { text-align: center; }
.m-photo { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; border: 2px solid var(--gold-2); box-shadow: 0 0 40px color-mix(in srgb, var(--gold) 30%, transparent); margin: 0 auto 1rem; display: block; }
.m-text { text-align: center; color: var(--text); font-size: 1.05rem; margin: .6rem 0; }
.c-shared { color: var(--muted); margin: .4rem 0 0; font-size: .95rem; }
.c-shared b { color: var(--gold); font-size: 1.15rem; }

/* ---------- آیه تصادفی ---------- */
.ayah { padding: 1.6rem 1.2rem; text-align: center; transition: opacity .25s; }
.ayah.loading { opacity: .45; }
.ayah .ar { font-size: clamp(1.7rem, 6.5vw, 2.6rem); line-height: 2.6; }
.ayah .fa { font-size: 1.1rem; color: var(--text); margin: 1rem 0; }
.ay-meta { margin: .6rem 0 1.2rem; }
.ay-meta a { color: var(--gold); border-bottom: 1px dashed var(--gold-2); }
.ay-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

/* ---------- حساب کاربری ---------- */
.hp {
  /* بدون هیچ جابه‌جایی به بیرون صفحه: در RTL، left:-9999px صفحه را ~۱۰۰۰۰ پیکسل پهن می‌کرد و روی موبایل ثبت‌نام و منو به‌هم می‌ریخت */
  position: absolute; inset-inline-start: 0; top: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none;
}
.lnk { color: var(--gold); border-bottom: 1px dashed var(--gold-2); }
.note { font-size: .9rem; margin: .4rem 0 0; }
.acc { white-space: nowrap; max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 759px) { .acc { display: none; } }
.captcha { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: .3rem 0; }
.captcha img { border: 1px solid var(--card-b); border-radius: 10px; background: #0d1530; max-width: 100%; height: auto; }
.form + .form { margin-top: 1.2rem; }
.form h2 { font-size: 1.1rem; color: var(--gold); margin: 0; }
.danger-zone { border-color: #ff6b6b55; }
.inline { display: inline; }
.acc-links { display: flex; gap: .7rem; justify-content: center; align-items: center; margin: 2rem 0 1rem; }

.u-stats { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 1rem 0; }
.u-stat { background: var(--card); border: 1px solid var(--card-b); border-radius: 16px; padding: 1rem 1.1rem; display: grid; text-align: center; }
.u-stat .n { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.4; }
.u-stat .l { color: var(--muted); font-size: .85rem; }
.u-stat.gold .n { color: var(--gold); }

.row.resume { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
.resume-main { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: .15rem; }
.cnt { font-family: var(--font-display); color: var(--gold); font-size: 1.3rem; }
.prog { display: block; height: 7px; border-radius: 99px; background: var(--card-b); overflow: hidden; margin-top: .35rem; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); border-radius: 99px; }

.card.continue { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; margin: 1rem 0 0; transition: .2s; }
.card.continue:hover { border-color: var(--gold); transform: translateY(-2px); }
.card.continue .c-text { flex: 1; display: grid; min-width: 0; }
.card.continue small { color: var(--muted); }
.card.continue strong { color: var(--gold); }

/* علامت «تا اینجا خواندم» و ادامه مطالعه */
.verse { position: relative; scroll-margin-top: 140px; }
.mark { position: absolute; inset-block-start: .6rem; inset-inline-start: .6rem; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--card-b); background: var(--card); color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; transition: .2s; }
.mark:hover { border-color: var(--teal); color: var(--teal); }
.verse.read { border-color: color-mix(in srgb, var(--teal) 55%, transparent); }
.verse.read .mark { background: var(--teal); color: #05201d; border-color: var(--teal); }
.verse.last { box-shadow: 0 0 0 1px var(--teal), 0 0 24px color-mix(in srgb, var(--teal) 25%, transparent); }
.verse:target, .verse.flash-line { outline: 2px solid var(--gold); outline-offset: 2px; }
.tools .cont { border-color: var(--teal); color: var(--teal); }
.toast { position: fixed; inset-inline: 0; bottom: calc(80px + env(safe-area-inset-bottom)); margin-inline: auto; width: fit-content; max-width: 90vw; z-index: 60;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--gold-2); border-radius: 999px; padding: .5rem 1.2rem; opacity: 0; transform: translateY(10px); transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

/* ---------- درخواست صلوات (نیت) ---------- */
.slider { position: relative; padding: 0 .2rem 1.6rem; }
.sl-track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: .5rem .3rem 1rem; }
.sl-track::-webkit-scrollbar { display: none; }
.sl-slide { flex: 0 0 min(88%, 360px); scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; padding: 1.2rem 1rem; transition: transform .35s, opacity .35s, box-shadow .35s; opacity: .7; transform: scale(.96); }
.sl-slide.active { opacity: 1; transform: scale(1); box-shadow: 0 14px 44px rgba(230, 195, 106, .16); }
.niyat-grid .sl-slide { opacity: 1; transform: none; }
.sl-slide h3 { margin: 0; font-size: 1.05rem; line-height: 1.7; }
.sl-slide h3 a { color: var(--gold); text-decoration: none; }
.sl-msg { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.9; }
.sl-nav { position: absolute; top: 42%; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--card-b); background: var(--bg-2); color: var(--gold); font-size: 1.4rem; cursor: pointer; display: grid; place-items: center; }
.sl-nav.prev { right: -4px; } .sl-nav.next { left: -4px; }
.slider.single .sl-nav, .slider.single .sl-dots { display: none; }
.sl-dots { display: flex; justify-content: center; gap: .4rem; margin-top: .2rem; }
.sl-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--card-b); cursor: pointer; transition: width .3s, background .3s; }
.sl-dots i.on { width: 22px; background: var(--gold); }

.s-tapbox { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.s-ring { position: relative; width: 170px; height: 170px; }
.s-tapbox.big .s-ring { width: min(78vw, 280px); height: min(78vw, 280px); }
.s-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.s-bg { fill: none; stroke: var(--card-b); stroke-width: 6; }
.s-fg { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .35s ease; filter: drop-shadow(0 0 6px rgba(230, 195, 106, .6)); }
.s-tap { position: absolute; inset: 12px; border-radius: 50%; border: 0; cursor: pointer; overflow: visible; color: var(--text); font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; background: radial-gradient(circle at 50% 35%, rgba(230, 195, 106, .22), rgba(230, 195, 106, .04) 70%); -webkit-tap-highlight-color: transparent; user-select: none; touch-action: manipulation; transition: transform .12s; }
.s-tap:active { transform: scale(.94); }
.s-tap:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.s-num { font-size: 1.7rem; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.s-tapbox.big .s-num { font-size: 2.6rem; }
.s-label { color: var(--muted); font-size: .75rem; }
.s-num.bump { animation: s-bump .25s ease; }
.s-tapbox.pulse .s-ring { animation: s-pulse .35s ease; }
.s-fx { position: absolute; inset: 0; pointer-events: none; }
.s-ripple { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2px solid var(--gold); animation: s-ripple .7s ease-out forwards; }
.s-float { position: absolute; margin: -14px 0 0 -12px; color: var(--gold); font-weight: 700; animation: s-float .9s ease-out forwards; }
.s-star { position: absolute; left: 50%; top: 50%; color: var(--gold); animation: s-star 1.1s ease-out forwards; }
.s-meta { display: flex; gap: .9rem; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: .82rem; }
.s-meta b { color: var(--gold); }
.s-bar { width: 80%; max-width: 260px; height: 5px; border-radius: 9px; background: var(--card-b); overflow: hidden; }
.s-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .35s; }
.niyat-hero .niyat-msg { max-width: 640px; margin-inline: auto; line-height: 2.1; }
.chips-inline { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
@keyframes s-bump { 40% { transform: scale(1.18); } }
@keyframes s-pulse { 40% { transform: scale(1.04); filter: drop-shadow(0 0 14px rgba(230, 195, 106, .55)); } }
@keyframes s-ripple { to { transform: scale(14); opacity: 0; } }
@keyframes s-float { to { transform: translateY(-70px); opacity: 0; } }
@keyframes s-star { to { transform: translate(var(--dx), var(--dy)) scale(.3) rotate(180deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sl-slide, .s-fg, .s-bar i { transition: none; } }

/* ---------- تقویم صلوات ---------- */
.cal-wrap { position: relative; margin-top: 1rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; color: var(--gold); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; direction: rtl; }
.cal-wd { text-align: center; font-size: .62rem; color: var(--muted); padding: .2rem 0; overflow: hidden; white-space: nowrap; }
.cal-cell { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--card-b); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .78rem; line-height: 1.2; min-width: 0; }
.cal-cell.empty { border: 0; }
.cal-cell .dc { font-size: .6rem; font-weight: 700; color: var(--gold); }
.cal-cell.l1 { background: rgba(230, 195, 106, .10); }
.cal-cell.l2 { background: rgba(230, 195, 106, .22); }
.cal-cell.l3 { background: rgba(230, 195, 106, .38); }
.cal-cell.l4 { background: rgba(230, 195, 106, .58); }
.cal-cell.l4 .dc, .cal-cell.l3 .dc { color: var(--text); }
.cal-cell.today { outline: 2px solid var(--gold); outline-offset: 1px; }
.cal-sum { text-align: center; margin: .8rem 0 .3rem; font-size: .85rem; }
.cal-wrap.locked #cal { filter: blur(5px); opacity: .55; pointer-events: none; user-select: none; }
.cal-lock { position: absolute; inset: 12% 6% auto; text-align: center; padding: 1.4rem 1.2rem; background: var(--bg-2); box-shadow: 0 16px 50px rgba(0, 0, 0, .5); }
.cal-lock h2 { margin: .3rem 0; font-size: 1.15rem; color: var(--gold); }
.cal-lock p { color: var(--muted); font-size: .88rem; line-height: 2; }


/* ---------- ابزار هر آیه، نشانک، مناسبت‌ها ---------- */
.v-tools { display: flex; justify-content: center; gap: .4rem; margin-top: .7rem; opacity: .55; transition: opacity .2s; }
.verse:hover .v-tools, .verse:focus-within .v-tools { opacity: 1; }
.v-tools button { font: inherit; font-size: .95rem; line-height: 1; min-width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--card-b); background: var(--card); color: var(--muted); cursor: pointer; }
.v-tools button:hover, .v-tools button.on { color: var(--gold); border-color: var(--gold); }
.tools [data-fav-line].on { color: var(--gold); border-color: var(--gold); }
.fav-row { display: grid; gap: .25rem; }
.ar-snip { font-family: var(--font-ar); font-size: 1.2rem; line-height: 2; color: var(--text); }

.card.today { display: grid; gap: .8rem; }
.today-date { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; justify-content: space-between; }
.today-date strong { color: var(--gold); font-size: 1.1rem; }
.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.today-list li { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; padding: .6rem .2rem; border-top: 1px solid var(--card-b); }
.today-list li:first-child { border-top: 0; }
.today-list .when { font-size: .78rem; color: #1b1405; background: var(--gold); border-radius: 99px; padding: .15rem .7rem; white-space: nowrap; }
.today-list li.tonight .when { background: var(--teal); }
.today-list .t { display: grid; gap: .15rem; }
.today-list small { color: var(--muted); line-height: 1.8; }
@media (max-width: 560px) { .today-list li { grid-template-columns: 1fr; } .today-list .when { justify-self: start; } }
#occ-cal .cal-cell { position: relative; }
#occ-cal .cal-cell .hd { font-size: .6rem; color: var(--muted); }
#occ-cal .cal-cell.fri .dn { color: #ff8a8a; }
#occ-cal .cal-cell.occ { background: rgba(230, 195, 106, .14); }
#occ-cal .dot { position: absolute; inset-block-end: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.small { font-size: .8rem; }

/* ---------- ختم قرآن ---------- */
.kh-mini .s-ring { width: 150px; height: 150px; }
.kh-mini .s-tap { text-decoration: none; }
.kh-center { cursor: default; }
.kh-done { color: var(--gold); font-weight: 700; margin: .4rem 0 0; }
.kh-body { margin: 1rem 0; text-align: start; }
.kh-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
@media (min-width: 560px) { .kh-grid { grid-template-columns: repeat(6, 1fr); } }
.kh-tile { font: inherit; display: grid; gap: .15rem; justify-items: center; padding: .6rem .2rem; border-radius: 14px; border: 1px solid var(--card-b); background: var(--card); color: var(--text); cursor: pointer; transition: transform .15s, border-color .2s; }
.kh-tile b { color: var(--gold); font-size: 1.15rem; }
.kh-tile small { color: var(--muted); font-size: .65rem; }
.kh-tile:hover { transform: translateY(-2px); border-color: var(--gold); }
.kh-tile.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.kh-tile.full { background: rgba(95, 208, 197, .14); border-color: var(--teal); }
.kh-tile.full b { color: var(--teal); }
.kh-bar { display: block; width: 80%; height: 4px; border-radius: 9px; background: var(--card-b); overflow: hidden; }
.kh-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .4s; }
.kh-seg.full .kh-bar i, .kh-tile.full .kh-bar i { background: var(--teal); }
.kh-panel { margin-top: 1rem; display: grid; gap: .8rem; text-align: start; }
.kh-panel-h, .kh-seg-h { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.kh-panel-h strong { color: var(--gold); font-size: 1.1rem; }
.kh-panel-h small, .kh-seg-h small { color: var(--muted); }
.kh-seg { display: grid; gap: .5rem; padding: .8rem; border: 1px solid var(--card-b); border-radius: 14px; }
.kh-seg .kh-bar { width: 100%; }
.kh-seg.full { border-color: var(--teal); }
.kh-seg-b { display: flex; gap: .5rem; flex-wrap: wrap; }
.kh-ayahs { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: .35rem; margin-top: .4rem; }
.kh-ay { font: inherit; font-size: .85rem; height: 38px; border-radius: 10px; border: 1px solid var(--card-b); background: var(--card); color: var(--text); cursor: pointer; transition: transform .12s; }
.kh-ay:hover:not(:disabled) { border-color: var(--gold); transform: scale(1.06); }
.kh-ay.read { background: var(--teal); color: #05201d; border-color: var(--teal); cursor: default; }

/* جزء، حزب و سجده در متن قرآن */
.juz-mark, .sajda-mark { position: absolute; inset-block-start: -.65rem; font-size: .72rem; border-radius: 99px; padding: .1rem .7rem; white-space: nowrap; }
.juz-mark { inset-inline-end: 1rem; background: var(--gold); color: #1b1405; font-weight: 700; }
.sajda-mark { inset-inline-start: 1rem; background: var(--teal); color: #05201d; font-weight: 700; }

/* =====================================================================
   افزونه‌ها: تم روز (سفید + سبز پررنگ + زرد پررنگ)، قرآن، تقویم، پنل کاربر، منوی مدرن
   ===================================================================== */
@counter-style persian { system: numeric; symbols: "۰" "۱" "۲" "۳" "۴" "۵" "۶" "۷" "۸" "۹"; }
[hidden] { display: none !important; }

[data-theme="day"] {
  --bg: #ffffff;
  --bg-2: #eef6f0;
  --card: #ffffff;
  --card-b: rgba(15, 107, 63, .24);
  --text: #12251b;
  --muted: #55675c;
  --gold: #0f6b3f;          /* سبز پررنگ: رنگ اصلی تأکید */
  --gold-2: #0a4a2b;
  --yellow: #b58900;        /* زرد پررنگ: تأکید دوم */
  --teal: #b58900;
  --shadow: 0 8px 26px rgba(15, 107, 63, .13);
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='%230f6b3f' stroke-opacity='.07' stroke-width='1'%3E%3Crect x='25' y='25' width='40' height='40'/%3E%3Crect x='25' y='25' width='40' height='40' transform='rotate(45 45 45)'/%3E%3Ccircle cx='45' cy='45' r='9'/%3E%3C/g%3E%3C/svg%3E");
}
[data-theme="day"] body { background: radial-gradient(1100px 520px at 50% -10%, #e3f1e7, #ffffff 70%) fixed, #fff; }
[data-theme="day"] .card, [data-theme="day"] .verse, [data-theme="day"] a.row, [data-theme="day"] .u-stat { box-shadow: 0 1px 2px rgba(15, 107, 63, .06); }
[data-theme="day"] .btn { background: linear-gradient(135deg, #1b9159, #0a4a2b); color: #fff; }
[data-theme="day"] .btn.ghost { background: transparent; color: var(--gold); }
[data-theme="day"] .btn.danger { color: #b3261e; border-color: #b3261e55; background: transparent; }
[data-theme="day"] .search button { background: linear-gradient(135deg, #1b9159, #0a4a2b); color: #fff; }
[data-theme="day"] .moon { background: radial-gradient(circle at 35% 35%, #fff4b8, #e2b507 55%, #b58900); box-shadow: 0 0 60px 10px rgba(226, 181, 7, .35), 0 0 140px 40px rgba(226, 181, 7, .14); }
[data-theme="day"] .ornament, [data-theme="day"] .bismillah { color: var(--yellow); }
[data-theme="day"] .section-title span { background: #fff; }
[data-theme="day"] .section-title::before { background: linear-gradient(90deg, transparent, var(--yellow), transparent); }
[data-theme="day"] .chip:hover, [data-theme="day"] .chip.on { background: rgba(15, 107, 63, .1); }
[data-theme="day"] .badge { color: var(--yellow); border-color: rgba(181, 137, 0, .45); background: #fffbe9; }
[data-theme="day"] .juz-mark { background: var(--yellow); color: #fff; }
[data-theme="day"] .sajda-mark { background: var(--gold); color: #fff; }
[data-theme="day"] .verse.read { border-color: rgba(181, 137, 0, .6); background: #fffdf3; }
[data-theme="day"] .verse.read .mark { background: var(--yellow); color: #fff; border-color: var(--yellow); }
[data-theme="day"] .verse.last { box-shadow: 0 0 0 1px var(--yellow), 0 0 18px rgba(181, 137, 0, .22); }
[data-theme="day"] .cal-cell.l1 { background: rgba(15, 107, 63, .08); }
[data-theme="day"] .cal-cell.l2 { background: rgba(15, 107, 63, .17); }
[data-theme="day"] .cal-cell.l3 { background: rgba(15, 107, 63, .3); }
[data-theme="day"] .cal-cell.l4 { background: rgba(15, 107, 63, .5); }
[data-theme="day"] .cal-cell.l4 .dn, [data-theme="day"] .cal-cell.l3 .dn { color: #fff; }
[data-theme="day"] .cal-lock { background: #fff; box-shadow: 0 16px 40px rgba(15, 107, 63, .2); }
[data-theme="day"] .topbar, [data-theme="day"] .chips, [data-theme="day"] .bottomnav, [data-theme="day"] .mbar { background: rgba(255, 255, 255, .92); }
[data-theme="day"] .kh-ay.read, [data-theme="day"] .kh-tile.full { background: var(--yellow); color: #fff; border-color: var(--yellow); }

/* ---------- قرآن: جزءها و سوره‌ها ---------- */
.juz-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.juz-card { display: grid; justify-items: center; gap: .15rem; padding: 1rem .6rem; text-align: center; transition: .25s; }
.juz-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.juz-card strong { color: var(--gold); font-size: 1.05rem; }
.juz-card small { color: var(--muted); font-size: .78rem; line-height: 1.6; }
.juz-card.done { border-color: var(--yellow, var(--teal)); }
.juz-no { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; font-family: var(--font-display); font-size: 1.5rem;
  color: var(--gold); border: 1px solid var(--gold-2); background: radial-gradient(circle, color-mix(in srgb, var(--gold) 18%, transparent), transparent 70%); }
.juz-no.big { width: 84px; height: 84px; font-size: 2.3rem; margin: 0 auto .6rem; }
.q-search { margin: 0 auto 1rem; max-width: 640px; }
.q-results { max-width: 720px; margin: 0 auto 1.2rem; display: grid; gap: .5rem; }
.q-group { display: grid; gap: .45rem; }
.q-row a.row { display: grid; gap: .2rem; }
.q-quick { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; justify-content: center; margin: 1rem 0 0; }
.surah-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.surah-row > div { display: grid; min-width: 0; }
.surah-row .row-title { color: var(--text); font-weight: 700; }
.surah-row .row-title:hover { color: var(--gold); }
.prog.wide { display: block; height: 8px; border-radius: 99px; overflow: hidden; background: var(--card-b); max-width: 420px; margin: .4rem auto 1rem; }
.prog.wide i { display: block; height: 100%; background: var(--gold); }
.surah-head { text-align: center; padding: 1.2rem 0 .2rem; scroll-margin-top: 130px; }
.surah-head h2 { margin: 0; color: var(--gold); font-size: 1.5rem; }
.ay-no { position: absolute; inset-block-start: .6rem; inset-inline-end: .8rem; font-size: .78rem; color: var(--muted); border: 1px solid var(--card-b); border-radius: 99px; min-width: 26px; text-align: center; padding: 0 .4rem; }
.verse.missing { opacity: .6; }
a.ayah-hit, .ayah-hit { display: grid; gap: .25rem; }
.ayah-hit .ar-snip { font-family: var(--font-ar); font-size: 1.25rem; line-height: 2.1; }

/* ---------- خواندن درون صفحه‌ی ختم ---------- */
.kh-read-bar { display: flex; gap: .5rem; flex-wrap: wrap; }
.kh-verses { display: grid; gap: .9rem; margin-top: .8rem; }
.kh-verses.no-tr .tr { display: none; }
.kh-v { text-align: center; }
.kh-v-act { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }

/* ---------- شمارش دفعات خواندن / آیه‌ی روز ---------- */
.readcount { padding: 1.1rem; margin: 1.4rem 0; text-align: center; }
.rc-body { display: flex; align-items: baseline; justify-content: center; gap: .5rem; margin: .3rem 0 .8rem; }
.rc-n { font-family: var(--font-display); font-size: 2.6rem; color: var(--gold); line-height: 1.2; }
.rc-l { color: var(--muted); }
.rc-act { display: flex; justify-content: center; gap: .6rem; align-items: center; }
.readcount.pulse .rc-n { animation: rcPulse .5s ease; }
@keyframes rcPulse { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.ayah-day { text-align: center; padding: 1.3rem 1.1rem; }
.ayah-day .ad-label { margin: 0 0 .3rem; color: var(--yellow, var(--gold)); font-weight: 700; font-size: .95rem; }
.ayah-day .ar { font-size: clamp(1.5rem, 5.5vw, 2.2rem); line-height: 2.5; }
.ayah-day .fa { margin: .2rem 0; }
.ayah-day .ay-meta a { color: var(--gold); }
.ay-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-top: .6rem; }

/* ---------- تقویم یکپارچه ---------- */
button.cal-cell { font: inherit; color: inherit; cursor: pointer; background: transparent; padding: 0; position: relative; }
button.cal-cell:hover:not(:disabled) { border-color: var(--gold); }
button.cal-cell.future { opacity: .35; cursor: default; }
.cal-cell.sel { outline: 2px solid var(--gold); outline-offset: 1px; }
.cal-cell .dots { display: flex; gap: 2px; margin-top: 2px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.dot.s { background: #d9a520; } .dot.q { background: #2e9d6b; } .dot.r { background: #3b82c4; }
.cal-legend { display: flex; justify-content: center; gap: 1rem; font-size: .8rem; margin: 0 0 .6rem; }
.cal-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.cal-detail { margin-top: 1rem; padding: 1rem; border: 1px solid var(--card-b); border-radius: 14px; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.cal-detail h3 { margin: 0 0 .5rem; color: var(--gold); font-size: 1.05rem; }
.cal-detail h4 { margin: .8rem 0 .2rem; font-size: .95rem; }
.cd-list { margin: 0; padding-inline-start: 1.2rem; line-height: 2; }
.cd-sal { font-weight: 700; margin: .2rem 0; }
.cd-visits summary { cursor: pointer; color: var(--muted); margin-top: .8rem; }

/* ---------- پنل کاربر ---------- */
.u-hero { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; flex-wrap: wrap; }
.u-avatar { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); flex: 0 0 auto; }
[data-theme="night"] .u-avatar { color: #1b1405; }
.u-who { flex: 1 1 200px; min-width: 0; }
.u-who h1 { font-size: 1.35rem; margin: 0; color: var(--text); }
.u-who p { margin: 0; font-size: .85rem; }
.u-hero-act { display: flex; gap: .5rem; align-items: center; }
.u-tabs { display: none; gap: .4rem; overflow-x: auto; padding: .3rem 0 .8rem; scrollbar-width: none; position: sticky; top: 60px; z-index: 15;
  background: color-mix(in srgb, var(--bg) 92%, transparent); }
.u-tabs::-webkit-scrollbar { display: none; }
.js-tabs .u-tabs { display: flex; }
.u-tabs button { flex: 0 0 auto; font: inherit; cursor: pointer; padding: .35rem 1.05rem; border-radius: 999px; border: 1px solid var(--card-b); background: var(--card); color: var(--muted); }
.u-tabs button.on { color: #fff; background: var(--gold); border-color: var(--gold); }
[data-theme="night"] .u-tabs button.on { color: #1b1405; }
.u-pane { padding-top: .3rem; }
.u-h { margin: 1.4rem 0 .6rem; font-size: 1.1rem; color: var(--gold); padding-inline-start: .6rem; border-inline-start: 3px solid var(--yellow, var(--gold-2)); }
.top-ayahs { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; counter-reset: ta; }
.top-ayahs li { counter-increment: ta; position: relative; }
.top-ayahs li::before { content: counter(ta, persian); position: absolute; inset-inline-start: -.2rem; top: -.35rem; z-index: 2; min-width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; background: var(--gold); color: #fff; }
.ta-count { justify-self: start; font-size: .78rem; color: var(--yellow, var(--gold)); font-weight: 700; }

/* ---------- منوی مدرن ---------- */
.mbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .6rem; padding: .55rem 1rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--card-b); }
.m-brand { display: flex; align-items: center; gap: .45rem; color: var(--gold); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.m-grow { flex: 1; }
.m-ic { min-width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--card-b); background: var(--card); color: var(--gold); font: inherit; cursor: pointer; }
.m-burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 0 9px; border-radius: 12px; border: 1px solid var(--card-b); background: var(--card); cursor: pointer; }
.m-burger span { display: block; height: 2px; background: var(--gold); border-radius: 2px; }
.m-nav { display: none; align-items: center; gap: .2rem; margin-inline-start: .8rem; }
.m-nav > a, .m-dd-btn { font: inherit; cursor: pointer; background: none; border: 0; color: var(--text); padding: .45rem .8rem; border-radius: 10px; }
.m-nav > a:hover, .m-dd-btn:hover, .m-nav > a.on, .m-dd.on > .m-dd-btn { color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.m-dd { position: relative; }
.m-dd-panel { display: none; position: absolute; inset-inline-start: 0; top: calc(100% + 6px); min-width: 240px; padding: .5rem; z-index: 50;
  background: var(--bg); border: 1px solid var(--card-b); border-radius: 16px; box-shadow: var(--shadow); gap: .15rem; }
.m-dd.open .m-dd-panel { display: grid; }
.m-dd-panel a { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 10px; color: var(--text); }
.m-dd-panel a:hover, .m-dd-panel a.on { background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold); }
.mi { width: 28px; height: 28px; display: inline-grid; place-items: center; font-size: 1.1rem; }
.m-acc { display: none; }
.m-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 59; }
.m-drawer { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(88vw, 380px); z-index: 60; background: var(--bg); border-inline-end: 1px solid var(--card-b);
  transform: translateX(100%); transition: transform .28s ease, visibility 0s .28s; visibility: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; display: grid; gap: .8rem; align-content: start; box-shadow: var(--shadow); }
.m-drawer.open { transform: none; visibility: visible; transition: transform .28s ease, visibility 0s; }
.m-drawer-head { display: flex; align-items: center; justify-content: space-between; color: var(--gold); font-size: 1.15rem; }
.m-search { margin: 0; }
.m-home { display: block; padding: .6rem .8rem; border-radius: 12px; border: 1px solid var(--card-b); background: var(--card); color: var(--text); }
.m-group { margin: .4rem 0 0; font-size: .85rem; color: var(--muted); font-weight: 500; }
.m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.m-tile { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border: 1px solid var(--card-b); border-radius: 14px; background: var(--card); color: var(--text); font-size: .92rem; }
.m-tile.on, .m-tile:hover { border-color: var(--gold); color: var(--gold); }
.m-drawer-acc { text-align: center; }
body.m-lock { overflow: hidden; }
@media (min-width: 900px) {
  .m-burger { display: none; }
  .m-nav { display: flex; }
  .m-acc { display: inline-block; }
}
.menu-modern .tools { top: 68px; }
.menu-modern .u-tabs { top: 68px; }

/* ---------- ادمین: انتخاب ظاهر ---------- */
.choice-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.choice { display: grid; gap: .35rem; padding: 1rem; border: 2px solid var(--card-b); border-radius: 16px; cursor: pointer; background: var(--card); }
.choice.on, .choice:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
.choice input { width: auto; justify-self: start; }
.choice small { color: var(--muted); }
.choice-prev { display: flex; gap: 4px; height: 46px; padding: 8px; border-radius: 10px; border: 1px solid var(--card-b); background: var(--bg-2); align-items: center; }
.choice-prev i { display: block; height: 10px; border-radius: 99px; background: var(--gold); opacity: .7; flex: 1; }
.prev-modern i:first-child { flex: 0 0 22px; height: 22px; border-radius: 6px; }
.prev-modern i:last-child { flex: 0 0 38px; }
.danger-zone { border-color: #b3261e66; }

/* ---------- وقف‌نامه ---------- */
.waqf { text-align: center; padding: 1.6rem 1.2rem; position: relative; overflow: hidden;
  border-color: var(--yellow, var(--gold)); background: linear-gradient(180deg, color-mix(in srgb, var(--yellow, var(--gold)) 9%, var(--card)), var(--card)); }
.waqf::before, .waqf::after { content: ""; position: absolute; inset-inline: 12%; height: 1px; background: linear-gradient(90deg, transparent, var(--yellow, var(--gold)), transparent); }
.waqf::before { top: .7rem; } .waqf::after { bottom: .7rem; }
.waqf-ornament { color: var(--yellow, var(--gold)); font-size: 1.4rem; }
.waqf-line { margin: .2rem 0 0; color: var(--muted); }
.waqf-name { margin: .1rem 0 .3rem; font-family: var(--font-display); font-size: clamp(1.6rem, 6vw, 2.3rem); color: var(--gold); }
.waqf-note { margin: 0 0 .4rem; color: var(--muted); font-size: .95rem; }
.waqf-fateha { margin: .3rem 0 0; font-family: var(--font-ar); color: var(--yellow, var(--gold)); font-size: 1.25rem; }
.waqf-foot { color: var(--text); }
.waqf-foot strong { color: var(--gold); }

/* ===== موبایل و نصب برنامه ===== */
html { -webkit-text-size-adjust: 100%; }
a, button, summary, label, input, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body { overflow-x: clip; }   /* hidden روی بعضی موبایل‌ها اسکرول صفحه را قفل می‌کرد */
img, svg, video, table { max-width: 100%; }
.install-bar { position: fixed; inset-inline: .6rem; bottom: calc(4.2rem + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: .6rem;
  padding: .6rem .8rem; border-radius: 14px; background: var(--card, #14213d); border: 1px solid var(--gold); box-shadow: 0 8px 28px rgba(0,0,0,.35); font-size: .85rem; line-height: 1.7; }
.install-bar[hidden] { display: none !important; }
.install-bar .ib-text { flex: 1; }
.install-bar .ib-ic { font-size: 1.4rem; }
.install-bar .ib-x { background: none; border: 0; color: var(--muted); font-size: 1.1rem; min-width: 44px; min-height: 44px; cursor: pointer; }
@media (min-width: 761px) { .install-bar { bottom: 1rem; max-width: 460px; inset-inline-start: auto; } }
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px !important; }
  .btn, button, .chip, .tabs a, .tabs button { min-height: 44px; }
  .bottomnav { box-shadow: 0 -4px 18px rgba(0,0,0,.25); }
  .bottomnav a { flex: 1; padding: .15rem .2rem; min-height: 48px; justify-content: center; font-size: .7rem; }
  .bottomnav a.on span { filter: none; transform: translateY(-1px); }
  body { padding-bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
  .container, main { padding-inline: max(.9rem, env(safe-area-inset-left)); }
  h1 { font-size: 1.45rem; line-height: 1.6; }
  h2 { font-size: 1.2rem; }
  .card { border-radius: 14px; }
}
@media (display-mode: standalone) { .topbar { padding-top: env(safe-area-inset-top); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ناوبری پایین: صفحه‌ی فعال پررنگ و مشخص */
.bottomnav a { position: relative; border-radius: 12px; transition: color .15s, background .15s; }
.bottomnav a.on { color: var(--gold); font-weight: 800; background: color-mix(in srgb, var(--gold) 14%, transparent); }
.bottomnav a.on::before { content: ""; position: absolute; inset-block-start: -.45rem; inset-inline: 22%; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold); }
.bottomnav a.on span { filter: none; transform: scale(1.15); }
.bottomnav a:not(.on) { font-weight: 400; }
.kh-panel, .kh-seg, .kh-read { scroll-margin-top: 80px; scroll-margin-bottom: 90px; }

/* بایگانی ختم‌ها */
.sec-h { margin: 1.6rem 0 .8rem; color: var(--gold); font-size: 1.15rem; }
.arch-card { border-color: var(--teal); }
.arch-card .badge { justify-self: start; }

/* ---------- عکس مرحوم کنار عنوان (صلوات و ختم) ---------- */
.req-ph { width: 56px; height: 56px; flex: 0 0 auto; display: block; object-fit: cover; object-position: center 20%; border-radius: 50%;
  border: 2px solid var(--gold-2); background: var(--card); box-shadow: 0 0 18px color-mix(in srgb, var(--gold) 28%, transparent); }
.req-ph.big { width: 120px; height: 120px; box-shadow: 0 0 40px color-mix(in srgb, var(--gold) 30%, transparent); }
.req-ph.xs { width: 34px; height: 34px; display: inline-block; vertical-align: middle; margin-inline-end: .5rem; border-width: 1px; box-shadow: none; }

/* ردیف عنوان کارت: بدون عکس مثل قبل؛ اگر کارت‌های دیگرِ همان لیست عکس دارند (reserve) ارتفاع یکسان می‌ماند تا چیدمان نپرد */
.req-head { display: flex; align-items: center; justify-content: center; gap: .7rem; width: 100%; min-width: 0; }
.req-head:not(.has-photo):not(.reserve) { display: block; }
.req-head.has-photo, .req-head.reserve { min-height: 56px; }
.req-head h3 { min-width: 0; overflow-wrap: anywhere; }
.req-head.has-photo h3 { text-align: start; }

/* عنوان صفحه‌ی اختصاصی: بدون عکس دقیقاً مثل قبل */
.req-title:not(.has-photo) { display: block; }
.req-title.has-photo { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1.1rem; margin-bottom: .6rem; }
.req-title.has-photo h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .req-title.has-photo { flex-direction: column; gap: .6rem; }
  .req-ph.big { width: 104px; height: 104px; }
}

/* فرم‌ها: پیش‌نمایش عکس انتخاب‌شده */
.photo-prev { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.photo-prev[hidden] { display: none; }
.photo-prev .req-ph.big { width: 96px; height: 96px; }

/* ---------- وبلاگ ---------- */
.blog-search { display: flex; gap: .6rem; max-width: 520px; margin: 0 auto 1rem; }
.blog-search input { flex: 1; min-width: 0; }
.tag-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin: 0 0 1.4rem; }
.tag-chips a { font-size: .85rem; padding: .2rem .85rem; border-radius: 999px; border: 1px solid var(--card-b); color: var(--muted); background: var(--card); text-decoration: none; }
.tag-chips a:hover, .tag-chips a.on { color: var(--gold); border-color: var(--gold-2); }
.blog-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 0 0 1.6rem; }
.blog-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.bc-img { display: block; aspect-ratio: 16 / 8.4; background: var(--card); overflow: hidden; }
.bc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.blog-card:hover .bc-img img { transform: scale(1.04); }
.bc-img.bc-ph { display: grid; place-items: center; font-size: 2.6rem; background: radial-gradient(circle, color-mix(in srgb, var(--gold) 16%, transparent), transparent 70%); }
.bc-body { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
.bc-title { margin: 0; font-size: 1.12rem; line-height: 1.6; }
.bc-title a { color: inherit; text-decoration: none; }
.bc-title a:hover { color: var(--gold); }
.bc-text { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bc-meta { margin-top: auto; display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .8rem; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 1rem 0 1.2rem; }
.pager a { min-width: 2.3rem; text-align: center; padding: .3rem .8rem; border-radius: 10px; border: 1px solid var(--card-b); background: var(--card); text-decoration: none; color: var(--text); }
.pager a.on { color: #1b1405; background: linear-gradient(135deg, #f4dc98, var(--gold-2)); border-color: transparent; font-weight: 700; }

.blog-post { padding-bottom: 1.5rem; }
.bp-head { text-align: center; padding: .6rem 0 1rem; }
.bp-head h1 { margin: 0 0 .6rem; line-height: 1.6; overflow-wrap: anywhere; }
.bp-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; color: var(--muted); font-size: .88rem; }
.bp-cover { margin: 0 0 1.4rem; }
.bp-cover img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--card-b); display: block; }
.bp-tags { justify-content: flex-start; margin: 1.6rem 0 1rem; }
.bp-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.2rem 0; padding: .9rem 0; border-block: 1px solid var(--card-b); color: var(--muted); font-size: .9rem; }
.bp-nav { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 1.2rem 0 0; }
.bp-nav a { display: flex; flex-direction: column; gap: .3rem; padding: .9rem 1.1rem; text-decoration: none; color: inherit; }
.bp-nav a small { color: var(--muted); }
.bp-nav a:hover b { color: var(--gold); }

/* متن نوشته (در ادیتور ادمین هم همین کلاس استفاده می‌شود تا نتیجه دقیقاً مثل سایت باشد) */
.post-body { font-size: 1.08rem; line-height: 2.05; overflow-wrap: anywhere; word-break: break-word; }
.post-body::after { content: ""; display: table; clear: both; }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.1em; }
.post-body h2, .post-body h3, .post-body h4 { color: var(--gold); line-height: 1.6; margin: 1.6em 0 .6em; }
.post-body h2 { font-size: 1.55rem; }
.post-body h3 { font-size: 1.3rem; }
.post-body h4 { font-size: 1.12rem; }
.post-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol { margin: 0 0 1.1em; padding-inline-start: 1.7em; }
.post-body li { margin-bottom: .35em; }
.post-body blockquote { margin: 1.2em 0; padding: .7em 1.2em; border-inline-start: 4px solid var(--gold-2); background: var(--card); border-radius: 12px; color: var(--muted); }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body img { max-width: 100%; height: auto; border-radius: 12px; }
.post-body img.img-center { display: block; margin: 1em auto; }
.post-body img.img-right { float: right; margin: .3em 0 .8em 1.2em; }
.post-body img.img-left { float: left; margin: .3em 1.2em .8em 0; }
.post-body hr { border: 0; border-top: 1px solid var(--card-b); margin: 2em 0; }
.post-body table { border-collapse: collapse; width: 100%; margin: 1.2em 0; }
.post-body th, .post-body td { border: 1px solid var(--card-b); padding: .5em .8em; vertical-align: top; min-width: 3rem; }
.post-body th { background: var(--card); }
.post-body pre, .post-body code { direction: ltr; text-align: left; font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
.post-body pre { background: var(--card); border: 1px solid var(--card-b); border-radius: 12px; padding: .8em 1em; overflow-x: auto; }
.post-body mark { background: #fde68a; color: #1b1405; border-radius: 4px; padding: 0 .2em; }
@media (max-width: 600px) {
  .post-body img.img-right, .post-body img.img-left { float: none; display: block; margin: 1em auto; max-width: 100%; }
  .blog-grid { grid-template-columns: 1fr; }
}

/* ---------- صوت ---------- */
.aud-btn { width: 2.2rem; height: 2.2rem; flex: 0 0 auto; display: inline-grid; place-items: center; padding: 0; font: inherit; font-size: .95rem; line-height: 1;
  color: var(--gold); background: var(--card); border: 1px solid var(--gold-2); border-radius: 50%; cursor: pointer; transition: transform .15s, background .15s; }
.aud-btn:hover { transform: scale(1.08); }
.aud-btn.on { color: #1b1405; background: linear-gradient(135deg, #f4dc98, var(--gold-2)); border-color: transparent; }
.list li.has-audio { position: relative; }
.list li.has-audio > a.row { padding-inline-end: 3.6rem; }
.list li.has-audio > .aud-btn { position: absolute; inset-inline-end: .9rem; top: 50%; transform: translateY(-50%); }
.list li.has-audio > .aud-btn:hover { transform: translateY(-50%) scale(1.08); }
.surah-row .aud-btn { margin-inline-start: auto; margin-inline-end: .5rem; }

.audio-box { display: grid; gap: .7rem; max-width: 640px; margin: 0 auto 1.2rem; padding: .9rem 1.1rem; }
.ab-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.ab-head select { width: auto; max-width: 100%; padding: .3rem .7rem; }
.audio-box audio { width: 100%; }
.audio-box .ab-dl { justify-self: start; }
.audio-box [hidden] { display: none; }
.admin-audio { display: block; width: min(420px, 100%); margin-top: .4rem; }

/* ---------- ختم شخصی و صوت کنار سوره ---------- */
.surah-audio { max-width: 520px; margin: .7rem auto .2rem; padding: .5rem .8rem; gap: .35rem; }
.surah-audio .ab-head { justify-content: center; font-size: .9rem; }
.surah-audio audio { height: 38px; }
.mk-row .actions { flex-wrap: nowrap; }
.mk-row .actions form { margin: 0; }
.tools form.inline { display: inline-flex; margin: 0; }
.tools a.btn.cont { font-size: .88rem; padding: .3rem .8rem; border-radius: 10px; }
.mk-pagedone { margin: 1.4rem 0 .6rem; }
@media (max-width: 520px) {
  .mk-row.row.resume { flex-wrap: wrap; }
  .mk-row .actions { width: 100%; justify-content: flex-end; }
}

/* ---------- صوت هر آیه / پارت ---------- */
.verse-aud { position: absolute; inset-block-start: .6rem; inset-inline-end: .6rem; z-index: 1; width: 2.4rem; height: 2.4rem; font-size: 1rem;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--gold) 22%, transparent); }
.verse-aud:hover { transform: scale(1.1); }
.verse-aud.on { animation: audPulse 1.6s ease-in-out infinite; }
.verse.playing { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--card));
  box-shadow: 0 0 0 1px var(--gold), 0 10px 34px color-mix(in srgb, var(--gold) 20%, transparent); }
.tools [data-aseq].on { border-color: var(--gold); color: #1b1405; background: linear-gradient(135deg, #f4dc98, var(--gold-2)); }
@keyframes audPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 55%, transparent); } 50% { box-shadow: 0 0 0 9px transparent; } }
[data-theme="day"] .verse.playing { background: #fffaf0; }
@media (max-width: 520px) { .verse-aud { width: 2.2rem; height: 2.2rem; inset-block-start: .5rem; inset-inline-end: .5rem; } }

/* ---------- نظر و رای وبلاگ ---------- */
.bc { max-width: 760px; margin: 2rem auto; padding: 1.3rem 1.4rem; display: grid; gap: 1.1rem; }
.bc-h { font-size: 1.1rem; color: var(--gold); margin: 0; display: flex; align-items: center; gap: .6rem; }
.bc-rate { display: grid; gap: .5rem; justify-items: center; text-align: center; padding-bottom: 1.1rem; border-bottom: 1px dashed var(--card-b); }
.bc-avg { display: flex; align-items: baseline; gap: .5rem; justify-content: center; }
.bc-avg b { font-family: var(--font-display); font-size: 2rem; color: var(--text); line-height: 1.3; }
.bc-stars { display: flex; gap: .25rem; direction: ltr; }
.bc-star { font-size: 2rem; line-height: 1; background: none; border: 0; padding: .1rem .15rem; cursor: pointer; color: color-mix(in srgb, var(--muted) 55%, transparent); transition: transform .15s, color .15s; }
.bc-star.on, .bc-star.hov { color: var(--gold); }
.bc-star:hover { transform: scale(1.18); }
.bc-hint { margin: 0; }
.bc-form { display: grid; gap: .5rem; }
.bc-form-foot { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.bc-login { margin: 0; text-align: center; }
.bc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.bc-item { padding: .9rem 1rem; border: 1px solid var(--card-b); border-radius: 14px; background: color-mix(in srgb, var(--bg) 40%, transparent); }
.bc-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.bc-head time { margin-inline-start: auto; }
.bc-del { font: inherit; font-size: .8rem; color: #ff8a8a; background: none; border: 0; cursor: pointer; padding: 0 .3rem; }
.bc-body { margin: .4rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 2; }
.bc-reply { margin-top: .7rem; padding: .6rem .9rem; border-inline-start: 3px solid var(--gold); border-radius: 10px; background: color-mix(in srgb, var(--gold) 9%, transparent); }
.bc-reply b { color: var(--gold); font-size: .88rem; }
.bc-reply p { margin: .2rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.95; }
.bc [hidden] { display: none; }

/* ---------- دسته‌های وبلاگ و نوشته‌های مرتبط ---------- */
.blog-cats { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 0 0 1.1rem; }
.blog-cats a { padding: .35rem 1rem; border-radius: 999px; border: 1px solid var(--card-b); background: var(--card); color: var(--muted); font-size: .92rem; transition: .2s; }
.blog-cats a small { opacity: .75; margin-inline-start: .3rem; }
.blog-cats a:hover, .blog-cats a.on { color: #1b1405; border-color: transparent; background: linear-gradient(135deg, #f4dc98, var(--gold-2)); }
[data-theme="day"] .blog-cats a:hover, [data-theme="day"] .blog-cats a.on { color: #fff; background: linear-gradient(135deg, #1b9159, #0a4a2b); }
.bp-cat { margin: .2rem 0 1rem; text-align: center; }
.rel-blog { margin: 1.4rem 0; padding: 1rem 1.2rem; }
.rel-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .45rem; }
.rel-list a { display: block; padding: .5rem .9rem; border-radius: 10px; border: 1px solid var(--card-b); background: color-mix(in srgb, var(--bg) 40%, transparent); transition: .2s; }
.rel-list a:hover { border-color: var(--gold); color: var(--gold); transform: translateX(-3px); }

/* ---------- پیشنهاد زنده‌ی جستجو ---------- */
.sg-box { position: absolute; z-index: 80; max-height: min(70vh, 460px); overflow-y: auto; padding: .35rem; border-radius: 16px;
  background: var(--bg-2); border: 1px solid var(--card-b); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.sg-box[hidden] { display: none; }
.sg-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 11px; color: var(--text); }
.sg-item:hover, .sg-item.on { background: color-mix(in srgb, var(--gold) 14%, transparent); }
.sg-ic { font-size: 1.15rem; flex: 0 0 auto; }
.sg-tx { display: grid; min-width: 0; line-height: 1.7; }
.sg-tx b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-tx b[lang="ar"] { font-family: var(--font-ar); font-size: 1.1rem; font-weight: 400; }
.sg-tx small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-box mark { background: color-mix(in srgb, var(--gold) 30%, transparent); color: inherit; border-radius: 4px; padding: 0 .1em; }
.sg-all { display: block; text-align: center; padding: .55rem; margin-top: .2rem; border-top: 1px dashed var(--card-b); color: var(--gold); font-size: .88rem; }
.sg-none { padding: .9rem; text-align: center; color: var(--muted); font-size: .92rem; }

/* ---------- گالری عکس ---------- */
.gal-grid { columns: 3 220px; column-gap: 14px; }
.gal-item { break-inside: avoid; margin: 0 0 14px; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--card-b); position: relative; }
.gal-item a { display: block; }
.gal-item img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar, auto); object-fit: cover; transition: transform .5s ease, filter .3s; background: color-mix(in srgb, var(--gold) 8%, var(--bg-2)); }
.gal-item:hover img { transform: scale(1.04); filter: brightness(1.06); }
.gal-item figcaption { padding: .55rem .8rem .7rem; font-size: .88rem; color: var(--muted); line-height: 1.8; }
@media (max-width: 520px) { .gal-grid { columns: 2 140px; column-gap: 10px; } .gal-item { margin-bottom: 10px; border-radius: 12px; } }
.lb { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(5, 8, 12, .92); backdrop-filter: blur(6px); animation: lbIn .2s ease; }
.lb[hidden] { display: none; }
.lb-f { margin: 0; max-width: min(94vw, 1500px); max-height: 94vh; display: grid; justify-items: center; gap: .6rem; }
.lb-f img { max-width: 100%; max-height: 82vh; width: auto; height: auto; border-radius: 12px; box-shadow: 0 20px 70px #000a; }
.lb-f figcaption { color: #e9e4d4; text-align: center; max-width: 70ch; line-height: 1.9; }
.lb-f figcaption[hidden] { display: none; }
.lb button { position: absolute; z-index: 2; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid #ffffff30; background: #ffffff14; color: #fff; font-size: 1.5rem; cursor: pointer; transition: background .2s; }
.lb button:hover { background: #ffffff2e; }
.lb-x { top: 1rem; inset-inline-start: 1rem; }
.lb-n { top: 50%; left: 1rem; transform: translateY(-50%); }
.lb-p { top: 50%; right: 1rem; transform: translateY(-50%); }
.lb-c { position: absolute; bottom: 1rem; color: #cfc9b8; font-size: .85rem; direction: ltr; }
html.lb-open { overflow: hidden; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 520px) { .lb-n, .lb-p { top: auto; bottom: 1rem; transform: none; } .lb-c { display: none; } }

/* ---------- صفحه‌ی عکس گالری ---------- */
.gal-item figcaption a { color: inherit; }
.gal-item figcaption a:hover { color: var(--gold); }
.lb-pg { color: var(--gold); font-size: .85rem; }
.ph-wrap { max-width: 1100px; margin-inline: auto; display: grid; gap: 1rem; }
.ph-fig { margin: 0; display: grid; gap: .8rem; justify-items: center; }
.ph-fig img { display: block; max-width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--card-b); box-shadow: 0 16px 50px #0006; background: var(--bg-2); }
.ph-cap { text-align: center; line-height: 2; max-width: 70ch; }
.ph-nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ph-nav a { padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--card-b); background: var(--card); transition: .2s; }
.ph-nav a:hover { border-color: var(--gold); color: var(--gold); }
.ph-rel { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.ph-rel a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--card-b); aspect-ratio: 1; }
.ph-rel img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.ph-rel a:hover img { transform: scale(1.06); }
.ph-meta { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: .85rem; }



/* ===== صلوات‌شمار: متن صلوات وصل‌شده به شمارنده ===== */
.cx-text { margin: .9rem 0 0; text-align: start; border: 1px solid var(--card-b); border-radius: 12px; background: color-mix(in srgb, var(--gold) 5%, transparent); }
.cx-text > summary { cursor: pointer; padding: .65rem .95rem; color: var(--gold); font-weight: 700; list-style: none; overflow-wrap: anywhere; }
.cx-text > summary::-webkit-details-marker { display: none; }
.cx-text > summary::before { content: "▸ "; }
.cx-text[open] > summary::before { content: "▾ "; }
.cx-body { padding: .2rem .95rem .95rem; display: grid; gap: .7rem; }
.cx-pick { display: grid; gap: .3rem; font-size: .88rem; color: var(--muted); }
.cx-link { width: 100%; max-width: 100%; }
.cx-out { max-height: 24rem; overflow: auto; padding: .3rem .2rem; }
.cx-ar { font-family: var(--font-ar); font-size: 1.5rem; line-height: 2.4; margin: 0; text-align: center; }
.cx-fa { margin: 0 0 .8rem; color: var(--muted); font-size: .95rem; text-align: center; line-height: 1.9; }
.cx-h { font-size: .95rem; color: var(--gold); margin: .8rem 0 .3rem; }
.cx-more { display: inline-block; margin-top: .5rem; }

/* ===== صفحه‌ی آیه تصادفی: متن توضیح، سؤالات متداول ===== */
.ayah-seo { padding: 1.3rem 1.4rem; margin: 1.6rem 0; }
.ayah-seo > h2 { color: var(--gold); font-size: 1.25rem; margin: 0 0 .6rem; }
.faq { margin: 1.6rem 0; }
.faq > h2 { color: var(--gold); font-size: 1.25rem; margin: 0 0 .8rem; }
.faq-item { border: 1px solid var(--card-b); border-radius: 14px; margin: .6rem 0; background: var(--card); }
.faq-item > summary { cursor: pointer; padding: .8rem 1rem; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "＋"; color: var(--gold); flex: none; }
.faq-item[open] > summary::after { content: "－"; }
.faq-a { margin: 0; padding: 0 1rem 1rem; color: var(--muted); white-space: pre-line; line-height: 2; }

/* ===== ختم: نوار ابزار خواندن (همان ابزار قرآن) و علامت آیه‌ی ادامه ===== */
.kh-tools { margin: .6rem 0; }
.kh-v.kh-focus { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 14px; transition: outline-color .3s; }
.kh-v { scroll-margin-top: 120px; }
.cal-detail { scroll-margin-top: 84px; }

/* ===== چت‌بات سایت ===== */
.chat-fab { position: fixed; inset-inline-start: 1rem; bottom: calc(4.9rem + env(safe-area-inset-bottom)); z-index: 45; display: inline-flex; align-items: center; gap: .45rem;
  padding: .65rem 1.05rem; border-radius: 999px; border: 1px solid var(--gold-2); background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #1a1405;
  font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transition: transform .2s; }
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab:focus-visible, .chat-ic:focus-visible, .chat-chip:focus-visible, .chat-send:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.chat-panel { position: fixed; inset-inline-start: 1rem; bottom: calc(4.9rem + env(safe-area-inset-bottom)); z-index: 46; width: min(390px, calc(100vw - 2rem));
  height: min(560px, calc(100dvh - 8rem)); display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  border: 1px solid var(--card-b); border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; border-bottom: 1px solid var(--card-b); background: var(--card); }
.chat-av { font-size: 1.5rem; }
.chat-ttl { flex: 1; min-width: 0; display: grid; }
.chat-ttl b { font-size: 1rem; }
.chat-ttl small { color: var(--muted); font-size: .72rem; }
.chat-ic { border: 0; background: transparent; color: var(--muted); font-size: 1.05rem; cursor: pointer; padding: .3rem .45rem; border-radius: 8px; }
.chat-ic:hover { color: var(--gold); background: var(--card); }
.chat-log { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .65rem; overscroll-behavior: contain; }
.chat-msg { max-width: 92%; display: grid; gap: .4rem; }
.chat-msg.bot { align-self: flex-start; }
.chat-msg.me { align-self: flex-end; }
.chat-bub { padding: .6rem .8rem; border-radius: 14px; line-height: 1.9; font-size: .93rem; overflow-wrap: anywhere; }
.chat-bub p { margin: 0; }
.chat-msg.bot .chat-bub { background: var(--card); border: 1px solid var(--card-b); border-end-start-radius: 4px; }
.chat-msg.me .chat-bub { background: color-mix(in srgb, var(--gold) 24%, transparent); border: 1px solid var(--gold-2); border-end-end-radius: 4px; }
.chat-links { display: grid; gap: .4rem; }
.chat-link { display: grid; gap: .1rem; padding: .55rem .75rem; border: 1px solid var(--card-b); border-radius: 12px; background: var(--card); color: var(--text); text-decoration: none; transition: border-color .2s, background .2s; }
.chat-link:hover { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.chat-link b { color: var(--gold); font-size: .92rem; font-weight: 700; overflow-wrap: anywhere; }
.chat-link small { color: var(--muted); font-size: .74rem; }
.chat-typing { display: inline-flex; gap: .3rem; align-items: center; padding: .75rem .9rem; }
.chat-typing i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--gold); opacity: .4; animation: chat-dot 1s infinite ease-in-out; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem .8rem; border-top: 1px solid var(--card-b); }
.chat-chips:empty { display: none; }
.chat-chip { border: 1px solid var(--card-b); background: var(--card); color: var(--text); border-radius: 999px; padding: .3rem .75rem; font: inherit; font-size: .82rem; cursor: pointer; }
.chat-chip:hover { border-color: var(--gold); color: var(--gold); }
.chat-form { display: flex; gap: .5rem; padding: .6rem .8rem; border-top: 1px solid var(--card-b); background: var(--card); }
.chat-in { flex: 1; min-width: 0; padding: .6rem .8rem; border-radius: 12px; border: 1px solid var(--card-b); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.chat-send { border: 0; border-radius: 12px; padding: 0 .95rem; background: var(--gold); color: #1a1405; font-size: 1rem; cursor: pointer; }
.chat-send:disabled, .chat-in:disabled { opacity: .55; cursor: wait; }
.chat-note { margin: 0; padding: 0 .8rem .6rem; color: var(--muted); font-size: .7rem; background: var(--card); }
@media (min-width: 761px) { .chat-fab { bottom: 1.2rem; } .chat-panel { bottom: 4.8rem; } }
@media (max-width: 760px) {
  .chat-panel { inset-inline: .5rem; width: auto; bottom: calc(4.4rem + env(safe-area-inset-bottom)); height: min(72dvh, 560px); }
  .chat-open .chat-fab { display: none; }
}
@media (prefers-reduced-motion: reduce) { .chat-fab, .chat-link { transition: none; } .chat-typing i { animation: none; opacity: .7; } }
@media print { .chat-fab, .chat-panel { display: none !important; } }


/* ---- دسترسی‌های مدیریتی کاربر و جدول مجوزها ---- */
.perm-chips { display: inline-flex; gap: .3rem; flex-wrap: wrap; vertical-align: middle; }
.perm-chip { font-size: .74rem; padding: .08rem .55rem; border-radius: 999px; border: 1px solid var(--card-b); }
.perm-chip.on { color: var(--gold); border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); font-weight: 600; }
.perm-chip.off { opacity: .4; text-decoration: line-through; }
.u-access { padding: 1rem 1.2rem; margin: 1rem 0; }
.u-access .u-h { margin-top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.u-role { font-size: .75rem; font-weight: 500; color: var(--muted); }
.u-access-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .6rem; }
.u-access-list li { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .6rem .8rem; border: 1px solid var(--card-b); border-radius: 14px; }
.u-access-list .ua-ic { font-size: 1.4rem; }
.u-access-list .ua-body { flex: 1 1 200px; min-width: 0; display: grid; gap: .3rem; }
.perm-matrix th.c, .perm-matrix td.c { text-align: center; width: 5.2rem; }
.perm-matrix input[type=checkbox] { width: 1.2rem; height: 1.2rem; accent-color: var(--gold); }
.perm-matrix .row-sub { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; margin-top: .15rem; }
