/* خطوط محلية (بديل @fontsource في نسخة PHP) */
@font-face {
  font-family: "Cairo";
  src: url("../fonts/cairo-arabic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cairo";
  src: url("../fonts/cairo-arabic-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cairo";
  src: url("../fonts/cairo-arabic-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cairo";
  src: url("../fonts/cairo-arabic-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cairo";
  src: url("../fonts/cairo-arabic-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Amiri";
  src: url("../fonts/amiri-arabic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Amiri";
  src: url("../fonts/amiri-arabic-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aref Ruqaa";
  src: url("../fonts/aref-ruqaa-arabic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aref Ruqaa";
  src: url("../fonts/aref-ruqaa-arabic-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   أُنس — نظام التصميم
   ========================================================================== */

:root {
  --bg: #f7f3e9;
  --bg-soft: #efe7d7;
  --surface: #fffdf8;
  --surface-2: #fbf7ee;
  --surface-3: #f2ecdf;
  --ink: #17241e;
  --ink-2: #33443b;
  --muted: #6f7b74;
  --green-950: #061f17;
  --green-900: #0a2d22;
  --green-800: #0d3a2c;
  --green-700: #14513c;
  --green-600: #1d6a4e;
  --green-soft: #e4ede6;
  --gold: #b28e4f;
  --gold-2: #d4b67d;
  --gold-3: #f1e3c5;
  --gold-soft: #f6eedc;
  --line: rgba(24, 57, 43, 0.12);
  --line-strong: rgba(24, 57, 43, 0.2);
  --shadow-sm: 0 2px 10px rgba(17, 45, 33, 0.05);
  --shadow: 0 18px 45px -20px rgba(13, 46, 34, 0.25);
  --shadow-lg: 0 36px 80px -30px rgba(13, 46, 34, 0.4);
  --font-ui: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-naskh: "Noto Naskh Arabic", "Amiri", serif;
  --font-quran: "Amiri", "Traditional Arabic", serif;
  --font-display: "Aref Ruqaa", "Amiri", serif;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --container: 1200px;
  --header-h: 80px;
  --tabbar-h: 64px;
  --ease-out: cubic-bezier(.22,.61,.36,1);
  --transition: 240ms cubic-bezier(.22,.8,.24,1);
}

[data-theme="dark"] {
  --bg: #071b14;
  --bg-soft: #0a241a;
  --surface: #0c261c;
  --surface-2: #0a2119;
  --surface-3: #102e22;
  --ink: #f4efdf;
  --ink-2: #d2dbd5;
  --muted: #93a49b;
  --green-950: #04150f;
  --green-900: #072019;
  --green-800: #0b3025;
  --green-700: #124533;
  --green-600: #1c6349;
  --green-soft: #102e22;
  --gold: #d0ae72;
  --gold-2: #e2c790;
  --gold-3: #342b1c;
  --gold-soft: #182b21;
  --line: rgba(208, 174, 114, 0.16);
  --line-strong: rgba(208, 174, 114, 0.26);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.2);
  --shadow: 0 20px 48px -20px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 36px 90px -30px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 22px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink);
  background:
    radial-gradient(1100px 500px at 90% -8%, rgba(178, 142, 79, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 25%, rgba(20, 81, 60, 0.05), transparent 55%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
  transition: background-color .3s ease, color .3s ease;
}

::selection { background: var(--gold-2); color: var(--green-950); }

h1, h2, h3, h4, h5 { margin: 0; line-height: 1.4; font-weight: 800; color: var(--ink); letter-spacing: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }
svg { flex: none; }

.skip-link {
  position: fixed; right: 1rem; top: -100px; z-index: 2000;
  background: var(--green-800); color: #fff; padding: .65rem 1rem; border-radius: 10px;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.site-main { min-height: 55vh; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--green-600); font-size: .78rem; font-weight: 700;
  letter-spacing: 0; text-transform: none; margin-bottom: .55rem;
}
.eyebrow.light { color: var(--gold-2); }
.eyebrow svg { opacity: .9; }
.gold-word { color: var(--gold-2); }
.text-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 700; font-size: .86rem; color: var(--green-700);
  transition: gap var(--transition), color var(--transition);
}
.text-link:hover { gap: .7rem; color: var(--gold); }
[data-theme="dark"] .text-link { color: var(--gold-2); }
.text-btn {
  background: none; border: 0; color: var(--muted); display: inline-flex; align-items: center;
  gap: .35rem; font-size: .8rem; padding: 0;
}
.text-btn:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 999px; border: 1px solid transparent; padding: .78rem 1.4rem; min-height: 46px;
  font-size: .88rem; font-weight: 700; line-height: 1.2; text-align: center; letter-spacing: 0;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green-800); color: #fff; box-shadow: 0 8px 20px -10px rgba(10, 45, 34, .7); }
.btn-primary:hover { background: var(--green-700); }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--green-950); box-shadow: 0 10px 24px -12px rgba(178,142,79,.6); }
.btn-gold:hover { filter: brightness(1.04); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--gold); color: var(--green-700); background: var(--surface); }
.btn-outline-gold { border-color: rgba(212,182,125,.5); color: var(--gold-2); background: transparent; }
.btn-outline-gold:hover { background: rgba(212,182,125,.12); }
.btn-sm { padding: .5rem .9rem; font-size: .78rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--ink-2);
  position: relative; transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--green-700); }
[data-theme="dark"] .icon-btn:hover { color: var(--gold-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 34px -30px rgba(6,31,23,.75);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; flex: none; }
.logo-mark {
  width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold-2); background: linear-gradient(150deg, var(--green-800), var(--green-950));
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(212,182,125,.32), 0 10px 24px -14px rgba(10,45,34,.9);
  transition: transform var(--transition), box-shadow var(--transition);
}
.brand:hover .logo-mark { transform: translateY(-1px) rotate(-2deg); box-shadow: inset 0 0 0 1px rgba(212,182,125,.5), 0 14px 28px -14px rgba(10,45,34,.9); }
.logo-mark svg { width: 27px; height: 27px; }
.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1; }
.brand-name { font-family: var(--font-quran); font-size: 1.98rem; font-weight: 700; line-height: 1.3; color: var(--green-800); }
.brand-tag { color: var(--gold); font-size: .63rem; font-weight: 600; letter-spacing: 0; margin-top: .1rem; }
[data-theme="dark"] .brand-name { color: var(--gold-2); }
.desktop-nav { display: flex; align-items: center; gap: .15rem; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: .25rem;
  padding: .52rem .72rem; font-size: .8rem; font-weight: 700; color: var(--ink-2);
  border-radius: 999px; background: none; border: 0; letter-spacing: 0;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--green-700); background: var(--surface-2); }
.nav-link.active { color: var(--green-800); background: var(--gold-soft); }
[data-theme="dark"] .nav-link.active { background: rgba(212,182,125,.14); }
[data-theme="dark"] .nav-link:hover, [data-theme="dark"] .nav-link.active { color: var(--gold-2); }
.nav-more { position: relative; }
.nav-menu {
  position: absolute; top: calc(100% + 12px); left: 0; min-width: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .5rem; z-index: 5;
  animation: menuIn .18s ease-out;
}
.nav-menu-item {
  display: flex; align-items: center; gap: .6rem; padding: .62rem .7rem;
  border-radius: 10px; font-size: .84rem; color: var(--ink-2);
}
.nav-menu-item:hover { background: var(--surface-2); color: var(--green-700); }
[data-theme="dark"] .nav-menu-item:hover { color: var(--gold-2); }
.header-actions { display: flex; align-items: center; gap: .1rem; }
.fav-btn .count-dot {
  position: absolute; top: 4px; left: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--gold); color: var(--green-950);
  font-size: .58rem; font-weight: 800; display: grid; place-items: center;
}
.avatar-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-800); color: var(--gold-2); font-weight: 800; font-size: .9rem;
  border: 2px solid var(--gold-soft); margin-inline-start: .25rem;
}
.mobile-menu-btn { display: none; }
.mobile-drawer {
  position: fixed; inset: 0; z-index: 250; background: var(--bg);
  padding: 1.1rem 1.25rem 2rem; display: flex; flex-direction: column; overflow-y: auto;
  animation: drawerIn .25s ease-out;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.drawer-nav { display: flex; flex-direction: column; padding: 1rem 0; gap: .18rem; }
.drawer-nav a {
  display: flex; align-items: center; gap: .7rem; min-height: 52px;
  padding: .6rem .85rem; border-radius: 14px; font-size: .92rem; font-weight: 700; color: var(--ink-2);
  transition: background var(--transition), color var(--transition);
}
.drawer-nav a svg { color: var(--gold); }
.drawer-nav a:hover { background: var(--surface-2); }
.drawer-nav a.active { background: var(--gold-soft); color: var(--green-800); }
[data-theme="dark"] .drawer-nav a.active { color: var(--gold-2); }
.drawer-footer { margin-top: auto; display: grid; gap: .6rem; padding-top: 1.5rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #f7f1e3;
  background:
    radial-gradient(900px 480px at 88% 6%, rgba(212,182,125,.15), transparent 58%),
    radial-gradient(700px 500px at 6% 86%, rgba(40,130,96,.28), transparent 65%),
    linear-gradient(135deg, #072419 0%, #0a3125 48%, #0d3f2e 100%);
  padding: 68px 0 0;
}
.hero::before {
  content: ""; position: absolute; inset: 0; background: url("../pattern.svg") center/210px;
  opacity: .055; mix-blend-mode: screen; pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,182,125,.6), transparent);
}
.hero-halo { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.hero-halo-1 { width: 480px; height: 480px; border: 1px solid rgba(212,182,125,.12); left: -190px; top: 80px; }
.hero-halo-2 { width: 280px; height: 280px; border: 1px solid rgba(212,182,125,.1); left: -90px; top: 180px; }
.hero-grid {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-bottom: 56px;
}
.hero-copy { animation: riseIn .7s both; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1.35rem;
  border: 1px solid rgba(212,182,125,.38); background: rgba(212,182,125,.08);
  color: var(--gold-2); border-radius: 999px; padding: .4rem .85rem; font-size: .74rem; font-weight: 700;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700; color: #faf5e8;
  font-size: clamp(2.8rem, 5vw, 4.4rem); line-height: 1.3; margin-bottom: .8rem;
  letter-spacing: 0; text-wrap: balance;
}
.hero-title-sub {
  display: flex; align-items: center; gap: .7rem; margin-top: 1.15rem;
  font-family: var(--font-ui); font-size: clamp(.78rem, 1.1vw, .9rem);
  font-weight: 700; letter-spacing: 0; color: rgba(212,182,125,.92);
}
.hero-title-sub::before,
.hero-title-sub::after { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .5; }
.hero-lead { max-width: 540px; color: rgba(247,241,227,.75); font-size: .98rem; line-height: 1.95; margin-bottom: 1.7rem; }
.hero .search-form { max-width: 570px; }
.hero-quick { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-top: 1rem; font-size: .74rem; color: rgba(247,241,227,.5); }
.hero-quick a {
  border: 1px solid rgba(247,241,227,.16); border-radius: 999px; padding: .2rem .65rem;
  color: rgba(247,241,227,.75); transition: all var(--transition);
}
.hero-quick a:hover { border-color: var(--gold-2); color: var(--gold-2); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.7rem; color: rgba(247,241,227,.6); font-size: .74rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: .35rem; }
.hero-trust svg { color: var(--gold-2); }
.hero-verse-wrap { position: relative; animation: riseIn .8s .12s both; }
.hero-arch { position: absolute; inset: -34px -12px -20px; color: var(--gold-2); pointer-events: none; }
.hero-arch svg { width: 100%; height: 100%; }
.verse-card {
  position: relative; z-index: 1; background: linear-gradient(160deg, #fffdf6 0%, #f7efdf 100%);
  color: #1a2a22; border-radius: 30px 30px 30px 8px; padding: 1.55rem 1.7rem 1.35rem;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.55), inset 0 0 0 1px rgba(212,182,125,.4);
  overflow: hidden;
}
.verse-card::before {
  content: ""; position: absolute; width: 160px; height: 160px; border: 1px solid rgba(178,142,79,.25);
  border-radius: 50%; left: -80px; top: -80px;
}
.verse-card::after {
  content: "﷽"; position: absolute; left: 16px; top: 12px; font-family: var(--font-quran);
  color: rgba(178,142,79,.16); font-size: 2rem;
}
.verse-card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.verse-card-head .eyebrow { color: var(--gold); margin: 0; font-size: .75rem; }
.revelation-pill { border: 1px solid rgba(178,142,79,.3); color: #8d6a32; font-size: .65rem; border-radius: 999px; padding: .15rem .6rem; }
.verse-quran {
  font-family: var(--font-quran); font-size: clamp(1.5rem, 2.2vw, 1.95rem); line-height: 2.15;
  color: #163327; margin: 1.1rem 0 .9rem; text-align: center; min-height: 100px;
  display: flex; align-items: center; justify-content: center;
}
.verse-ref { display: flex; align-items: center; justify-content: center; gap: .6rem; color: #7c6a4c; font-size: .76rem; font-weight: 600; }
.dot { width: 3px; height: 3px; background: var(--gold); border-radius: 50%; }
.verse-actions { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed rgba(178,142,79,.3); }
.verse-actions .content-actions { justify-content: center; }
.verse-read-link { display: flex; justify-content: center; align-items: center; gap: .45rem; margin-top: .55rem; font-size: .74rem; color: #8d6a32; font-weight: 700; }
.hero-stat-float {
  position: absolute; z-index: 2; bottom: -22px; right: -22px; display: flex; gap: .6rem;
  background: #0a2d22; color: #f8f1e2; border: 1px solid rgba(212,182,125,.4);
  border-radius: 15px; padding: .65rem .85rem; box-shadow: 0 18px 35px -18px #000;
}
.hero-stat-float svg { color: var(--gold-2); margin-top: .15rem; }
.hero-stat-float div { display: flex; flex-direction: column; line-height: 1.35; }
.hero-stat-float strong { font-size: .75rem; }
.hero-stat-float small { font-size: .62rem; color: rgba(247,241,227,.55); }
.hero-stats {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(247,241,227,.12); padding: 1.2rem 0 1.4rem;
}
.hero-stats > div { display: flex; flex-direction: column; align-items: center; gap: .15rem; border-left: 1px solid rgba(247,241,227,.1); }
.hero-stats > div:last-child { border-left: 0; }
.hero-stats strong { color: var(--gold-2); font-size: 1.25rem; font-weight: 800; }
.hero-stats span { color: rgba(247,241,227,.55); font-size: .67rem; }

/* ---------- Search form ---------- */
.search-form {
  display: flex; align-items: center; gap: .55rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: .38rem .42rem .38rem 1.1rem;
  box-shadow: var(--shadow-sm); transition: border-color var(--transition), box-shadow var(--transition);
}
.search-form:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(178,142,79,.1); }
.search-form > svg { color: var(--gold); }
.search-form input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: .88rem; padding: .42rem 0; color: var(--ink);
}
.search-form input::placeholder { color: var(--muted); font-weight: 400; }
.search-form.large { padding: .45rem .5rem .45rem 1.25rem; }
.search-form.large input { font-size: .94rem; }
.search-form.large .btn { padding: .72rem 1.5rem; }
.hero .search-form { box-shadow: 0 22px 50px -28px rgba(0,0,0,.65); border-color: rgba(212,182,125,.32); }
.hero .search-form input { color: #17241e; }
.hero .search-form input::placeholder { color: #7a817b; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.6rem, 6.5vw, 5.6rem) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); color: var(--ink); letter-spacing: 0; line-height: 1.45; }
.section-head > p { max-width: 390px; color: var(--muted); font-size: .84rem; text-align: left; }
.section-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; color: var(--green-700); white-space: nowrap; }
[data-theme="dark"] .section-link { color: var(--gold-2); }

/* ---------- Category cards ---------- */
.home-sections { padding-top: clamp(3.8rem, 7vw, 6rem); }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.category-card {
  position: relative; display: flex; gap: .85rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.2rem; min-height: 158px; overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.category-card::after {
  content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%;
  left: -45px; bottom: -45px; background: var(--green-soft); transition: transform .4s ease;
}
.category-card.tone-gold::after { background: var(--gold-soft); }
.category-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px 130px at 100% 0%, rgba(178,142,79,.12), transparent 70%);
  opacity: 0; transition: opacity .4s var(--ease-out);
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(178,142,79,.45); }
.category-card:hover::before { opacity: 1; }
.category-card:hover::after { transform: scale(1.7); }
.category-icon {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px;
  background: var(--green-soft); color: var(--green-700); position: relative; z-index: 1;
}
.category-card.tone-gold .category-icon { background: var(--gold-soft); color: var(--gold); }
[data-theme="dark"] .category-icon { color: var(--gold-2); }
.category-card > div { position: relative; z-index: 1; }
.category-card h3 { font-size: .98rem; margin-bottom: .3rem; }
.category-card p { font-size: .73rem; line-height: 1.75; color: var(--muted); margin-bottom: .55rem; }
.category-count { font-size: .65rem; color: var(--gold); font-weight: 700; }
.category-arrow { position: absolute; left: 1rem; bottom: .9rem; color: var(--gold); opacity: 0; transform: translateX(6px); transition: all var(--transition); z-index: 1; }
.category-card:hover .category-arrow { opacity: 1; transform: translateX(0); }

/* ---------- Daily hadith ---------- */
.daily-hadith-section { padding-top: 1rem; }
.daily-hadith {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0;
  background:
    radial-gradient(500px 300px at 8% 10%, rgba(212,182,125,.13), transparent 65%),
    linear-gradient(145deg, #082a1f, #0b3a2a);
  border-radius: var(--radius-lg); overflow: hidden; color: #f7f1e3;
  border: 1px solid rgba(212,182,125,.18); box-shadow: var(--shadow-lg);
  position: relative;
}
.daily-hadith::before { content: ""; position: absolute; inset: 0; background: url("../pattern.svg") 0 0/180px; opacity: .04; pointer-events: none; }
.daily-hadith-aside {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; padding: 2rem;
  border-left: 1px solid rgba(247,241,227,.1); position: relative; z-index: 1;
}
.hadith-quote-mark { color: var(--gold-2); opacity: .8; margin-top: 1rem; }
.topic-pill { border: 1px solid rgba(212,182,125,.4); color: var(--gold-2); border-radius: 999px; padding: .25rem .75rem; font-size: .68rem; font-weight: 600; }
.daily-hadith-aside .btn { margin-top: auto; font-size: .72rem; }
.daily-hadith-main { padding: 2.1rem 2.3rem 2rem; position: relative; z-index: 1; }
.hadith-text { font-family: var(--font-quran); font-size: clamp(1.2rem, 1.7vw, 1.52rem); line-height: 2.15; color: #fbf6e9; margin-bottom: 1.3rem; }
.hadith-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; font-size: .69rem; color: rgba(247,241,227,.58); }
.source-name { color: var(--gold-2); font-weight: 700; }
.grade-badge {
  display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .15rem .55rem;
  font-size: .63rem; font-weight: 700;
}
.grade-sahih { background: rgba(83,168,123,.18); color: #9adbb6; border: 1px solid rgba(83,168,123,.25); }
.grade-hasan { background: rgba(212,182,125,.15); color: var(--gold-2); border: 1px solid rgba(212,182,125,.3); }
.hadith-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid rgba(247,241,227,.11); }
.daily-hadith .text-link { color: var(--gold-2); }
.daily-hadith .content-actions .action-btn { color: rgba(247,241,227,.65); border-color: rgba(247,241,227,.14); }
.daily-hadith .content-actions .action-btn:hover { color: var(--gold-2); border-color: var(--gold-2); }

/* ---------- Content actions ---------- */
.content-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.action-btn {
  display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--line);
  background: transparent; color: var(--muted); border-radius: 999px; padding: .32rem .6rem;
  font-size: .68rem; font-weight: 600; transition: all var(--transition);
}
.action-btn:hover { color: var(--green-700); border-color: var(--gold); background: var(--surface); }
.action-btn.is-active { color: #b45b62; border-color: rgba(180,91,98,.35); background: rgba(180,91,98,.06); }
.action-btn.compact { padding: .3rem; width: 28px; height: 28px; justify-content: center; }
[data-theme="dark"] .action-btn { color: var(--muted); }
[data-theme="dark"] .action-btn:hover { color: var(--gold-2); }
.share-wa:hover { color: #25a35a !important; border-color: #25a35a !important; }
.share-fb:hover { color: #4267b2 !important; border-color: #4267b2 !important; }

/* ---------- Tools grid ---------- */
.daily-tools { padding-top: 1rem; }
.tools-grid { display: grid; grid-template-columns: 1.16fr .84fr; gap: 1.2rem; align-items: stretch; }

/* ---------- Prayer widget ---------- */
.prayer-widget {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem 1.7rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.prayer-widget::before {
  content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%;
  border: 1px solid var(--line); left: -90px; top: -100px;
}
.prayer-widget-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; position: relative; z-index: 1; }
.prayer-widget-top h2 { font-size: 1.45rem; margin-top: .1rem; }
.prayer-sub { color: var(--muted); font-size: .7rem; margin-top: .15rem; }
.location-btn {
  display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--green-700); border-radius: 999px; padding: .4rem .7rem;
  font-size: .7rem; font-weight: 600; white-space: nowrap;
}
[data-theme="dark"] .location-btn { color: var(--gold-2); }
.next-prayer {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin: 1.2rem 0 1rem; padding: .9rem 1.1rem; border-radius: 16px;
  background: linear-gradient(135deg, var(--green-800), var(--green-700)); color: #fbf5e7;
  position: relative; overflow: hidden;
}
.next-prayer::after { content: "☾"; position: absolute; left: 14px; bottom: -22px; font-size: 5rem; opacity: .08; }
.next-prayer-info { display: flex; align-items: baseline; gap: .5rem; }
.next-prayer-info span { font-size: .67rem; color: rgba(251,245,231,.6); }
.next-prayer-info strong { font-size: 1.2rem; color: var(--gold-2); }
.next-prayer-info small { font-size: .72rem; color: rgba(251,245,231,.7); }
.countdown { display: flex; align-items: center; gap: .45rem; background: rgba(0,0,0,.16); border-radius: 999px; padding: .35rem .7rem; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .85rem; color: var(--gold-2); }
.prayer-times { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.prayer-time { display: flex; flex-direction: column; align-items: center; gap: .15rem; border-radius: 12px; padding: .55rem .3rem; border: 1px solid transparent; }
.prayer-time span { font-size: .65rem; color: var(--muted); font-weight: 600; }
.prayer-time strong { font-size: .77rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.prayer-time.is-next { background: var(--gold-soft); border-color: rgba(178,142,79,.25); }
.prayer-time.is-next span, .prayer-time.is-next strong { color: var(--gold); }
[data-theme="dark"] .prayer-time.is-next span, [data-theme="dark"] .prayer-time.is-next strong { color: var(--gold-2); }
.prayer-loading, .prayer-error { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 2rem 1rem; color: var(--muted); font-size: .8rem; }
.prayer-error { color: #a84d4d; }
.prayer-widget-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.qibla-mini { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .7rem; }
.prayer-inline-error { color: #a84d4d; font-size: .68rem; margin-top: .5rem; }

/* ---------- Tasbih mini ---------- */
.tasbih-card {
  background:
    radial-gradient(300px 250px at 50% 30%, rgba(212,182,125,.09), transparent 70%),
    var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.2rem; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.tasbih-card-head h3 { font-size: 1.2rem; }
.dhikr-tabs { display: flex; gap: .3rem; margin: .9rem 0; background: var(--surface-2); padding: .25rem; border-radius: 999px; }
.dhikr-tabs button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: .35rem .2rem; font-size: .67rem; font-weight: 600; color: var(--muted); transition: all var(--transition); }
.dhikr-tabs button.active { background: var(--surface); color: var(--green-700); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .dhikr-tabs button.active { color: var(--gold-2); }
.tasbih-circle {
  position: relative; width: 150px; height: 150px; border-radius: 50%; border: 0; background: var(--green-900);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: .2rem auto; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(212,182,125,.25), 0 20px 40px -20px rgba(6,31,23,.65);
  transition: transform .1s ease, box-shadow .2s ease; -webkit-tap-highlight-color: transparent;
}
.tasbih-circle:active { transform: scale(.96); }
.tasbih-circle svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.tasbih-circle .ring-bg { fill: none; stroke: rgba(255,255,255,.09); stroke-width: 4; }
.tasbih-circle .ring-progress { fill: none; stroke: var(--gold-2); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .3s ease; }
.tasbih-count { font-size: 2.3rem; font-weight: 800; line-height: 1; color: var(--gold-2); position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.tasbih-label { font-family: var(--font-quran); font-size: 1rem; margin-top: .3rem; color: rgba(255,255,255,.75); position: relative; z-index: 1; }
.tasbih-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .8rem; font-size: .65rem; color: var(--muted); }
.tasbih-card-foot .text-link { font-size: .65rem; }

/* ---------- Azkar preview ---------- */
.azkar-home { background: linear-gradient(180deg, transparent, var(--bg-soft) 20%, var(--bg-soft) 80%, transparent); }
.azkar-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.azkar-column { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem; }
.azkar-column-head { display: flex; align-items: center; gap: .8rem; padding-bottom: 1rem; margin-bottom: .9rem; border-bottom: 1px solid var(--line); }
.azkar-time-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-size: 1.3rem; }
.azkar-column-head h3 { font-size: 1.1rem; }
.azkar-column-head p { font-size: .68rem; color: var(--muted); }
.zikr-preview-card { padding: .85rem .9rem; border: 1px solid var(--line); border-radius: 14px; margin-bottom: .55rem; background: var(--surface-2); }
.zikr-preview-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.zikr-preview-top h4 { font-size: .82rem; }
.repeats { font-size: .61rem; color: var(--gold); border: 1px solid rgba(178,142,79,.25); border-radius: 999px; padding: 0 .4rem; }
.zikr-preview-card > p { font-family: var(--font-naskh); color: var(--ink-2); font-size: .95rem; line-height: 1.95; margin-bottom: .45rem; }
.zikr-preview-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.zikr-preview-foot > span { min-width: 0; flex: 1 1 auto; color: var(--muted); font-size: .6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.azkar-column > .btn { margin-top: .4rem; }
.azkar-tip { display: flex; align-items: center; gap: .8rem; background: var(--gold-soft); border: 1px solid rgba(178,142,79,.18); border-radius: 14px; padding: .8rem 1rem; margin-top: 1.2rem; font-size: .75rem; color: var(--ink-2); }
.azkar-tip .tip-icon { color: var(--gold); }
.azkar-tip p { flex: 1; }
.azkar-tip a { color: var(--gold); font-weight: 700; white-space: nowrap; }

/* ---------- Duas preview ---------- */
.duas-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.dua-preview-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; display: flex; flex-direction: column; min-height: 210px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.dua-preview-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.dua-preview-card.card-1 { background: linear-gradient(160deg, var(--green-800), var(--green-700)); color: #f8f2e4; border-color: transparent; }
.dua-preview-card.card-2 { background: linear-gradient(160deg, #f5ead3, #efe0c0); color: #283a30; border-color: rgba(178,142,79,.2); }
[data-theme="dark"] .dua-preview-card.card-2 { background: linear-gradient(160deg, #332915, #2a2212); color: #f4efdf; }
.dua-category { font-size: .63rem; font-weight: 700; color: var(--gold); margin-bottom: .8rem; }
.card-1 .dua-category { color: var(--gold-2); }
.dua-text { font-family: var(--font-quran); font-size: 1.08rem; line-height: 2; flex: 1; }
.dua-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .62rem; color: var(--muted); }
.card-1 .dua-foot { border-color: rgba(247,241,227,.14); color: rgba(247,241,227,.55); }
.dua-arrow { color: var(--gold); }

/* ---------- Articles preview ---------- */
.articles-preview-grid { display: grid; grid-template-columns: 1.35fr minmax(0, 1fr) minmax(0, 1fr); gap: .9rem; }
.article-preview-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem; min-height: 240px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.article-preview-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.article-preview-card.featured {
  background:
    radial-gradient(350px 250px at 90% 0%, rgba(212,182,125,.14), transparent 65%),
    var(--green-900); color: #f8f2e4; border-color: transparent;
}
.article-preview-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.article-cat { font-size: .62rem; font-weight: 700; color: var(--gold); background: var(--gold-soft); border-radius: 999px; padding: .12rem .55rem; }
.article-preview-card.featured .article-cat { background: rgba(212,182,125,.12); color: var(--gold-2); }
.article-read { font-size: .6rem; color: var(--muted); }
.article-preview-card.featured .article-read { color: rgba(247,241,227,.5); }
.article-preview-card h3 { font-size: 1.12rem; line-height: 1.6; margin-bottom: .5rem; }
.article-preview-card.featured h3 { color: #fbf6e9; font-size: 1.4rem; }
.article-preview-card p { color: var(--muted); font-size: .76rem; line-height: 1.9; flex: 1; }
.article-preview-card.featured p { color: rgba(247,241,227,.62); }
.article-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1rem; font-size: .72rem; font-weight: 700; color: var(--green-700); }
.article-preview-card.featured .article-link { color: var(--gold-2); }
[data-theme="dark"] .article-link { color: var(--gold-2); }

/* ---------- Home CTA ---------- */
.home-cta-section { padding-top: 1rem; }
.home-cta {
  display: grid; grid-template-columns: 1.1fr minmax(0, .9fr); gap: 2rem; align-items: center;
  background:
    radial-gradient(650px 350px at 95% 15%, rgba(212,182,125,.14), transparent 60%),
    linear-gradient(140deg, #082b20, #0c3a2b);
  border-radius: var(--radius-xl); padding: clamp(1.7rem, 4vw, 3.2rem); color: #f8f2e4;
  position: relative; overflow: hidden; border: 1px solid rgba(212,182,125,.16);
}
.home-cta::after { content: ""; position: absolute; inset: 0; background: url("../pattern.svg") 0 0/170px; opacity: .04; pointer-events: none; }
.home-cta-copy { position: relative; z-index: 1; }
.home-cta h2 { color: #fbf6e9; font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: .7rem; }
.home-cta p { color: rgba(247,241,227,.65); font-size: .85rem; max-width: 520px; margin-bottom: 1.3rem; }
.home-cta-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.home-cta-note { display: flex; align-items: center; gap: .4rem; font-size: .67rem; color: rgba(247,241,227,.45); margin-top: .9rem; }
.home-cta-reminder { position: relative; z-index: 1; }
.reminder-card {
  display: flex; gap: .9rem; background: rgba(255,253,248,.96); color: #1b2b23;
  border-radius: var(--radius); padding: 1.2rem; box-shadow: 0 20px 50px -25px #000;
}
.reminder-icon { width: 44px; height: 44px; flex: none; border-radius: 13px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; }
.reminder-body h2 { font-size: 1rem; }
.reminder-body > p { font-size: .72rem; color: #6f7b74; margin: .2rem 0 .7rem; }
.reminder-controls { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.reminder-controls label { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid rgba(24,57,43,.13); border-radius: 999px; padding: .3rem .6rem; color: #6f7b74; }
.reminder-controls input { border: 0; background: transparent; font-size: .72rem; width: 75px; outline: none; }
.reminder-body small { display: block; margin-top: .5rem; font-size: .65rem; }
.form-success { color: #2f7f57; }
.form-error { color: #a84d4d; }
.form-hint { color: #6f7b74; }
.install-banner {
  display: flex; align-items: center; gap: .8rem; width: 100%; text-align: right;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1rem; color: var(--ink); margin-bottom: 1rem; box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.install-banner:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.install-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--green-soft); color: var(--green-700); display: grid; place-items: center; flex: none; }
[data-theme="dark"] .install-icon { color: var(--gold-2); }
.install-banner > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.4; }
.install-banner strong { font-size: .8rem; }
.install-banner small { color: var(--muted); font-size: .65rem; }
.install-banner .btn { flex: none; }

/* ---------- Footer ---------- */
.site-footer {
  background:
    radial-gradient(900px 420px at 88% 0%, rgba(212,182,125,.09), transparent 62%),
    #051a12;
  color: rgba(247,241,227,.66); position: relative; overflow: hidden; margin-top: 2.5rem;
  border-top: 1px solid rgba(212,182,125,.2);
}
.footer-pattern { position: absolute; inset: 0; background: url("../pattern.svg") 0 0/190px; opacity: .035; pointer-events: none; }
.footer-inner { position: relative; display: grid; grid-template-columns: 1.6fr .8fr .8fr .8fr; gap: 2.2rem; padding: 3.2rem 0 2.2rem; }
.footer-brand-col .brand-name { color: var(--gold-2); }
.footer-brand-col .logo-mark { background: rgba(212,182,125,.08); }
.footer-desc { font-size: .76rem; line-height: 1.95; color: rgba(247,241,227,.5); margin: 1rem 0; max-width: 340px; }
.footer-badge { display: inline-flex; align-items: center; gap: .35rem; color: var(--gold-2); border: 1px solid rgba(212,182,125,.25); border-radius: 999px; padding: .25rem .7rem; font-size: .65rem; }
.footer-col { display: flex; flex-direction: column; gap: .55rem; }
.footer-col h2 { color: #f7f1e3; font-size: .82rem; margin-bottom: .35rem; }
.footer-col a { font-size: .73rem; color: rgba(247,241,227,.52); transition: color var(--transition); }
.footer-col a:hover { color: var(--gold-2); }
.footer-sources { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; border-top: 1px solid rgba(247,241,227,.1); padding: 1.4rem 0; }
.footer-sources p { font-size: .65rem; line-height: 1.9; color: rgba(247,241,227,.4); display: flex; gap: .45rem; }
.footer-sources svg { color: var(--gold); margin-top: .18rem; flex: none; }
.footer-bottom { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; border-top: 1px solid rgba(247,241,227,.08); padding: 1.1rem 0 1.4rem; font-size: .63rem; color: rgba(247,241,227,.38); }
.footer-made { display: inline-flex; align-items: center; gap: .25rem; }
.footer-made svg { color: var(--gold); }
.footer-links { display: inline-flex; align-items: center; gap: 1rem; }
.footer-links a { display: inline-flex; align-items: center; gap: .25rem; }
.footer-links a:hover { color: var(--gold-2); }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500; background: rgba(4,20,14,.6);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 1rem;
  animation: fadeIn .2s ease-out;
}
.modal-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.7rem; width: min(520px, 100%); max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); position: relative; animation: riseIn .25s ease-out;
}
.modal-close { position: absolute; top: .8rem; left: .8rem; }
.modal-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: var(--gold-soft); color: var(--gold); margin-bottom: 1rem; }
.modal-card h2 { font-size: 1.25rem; margin-bottom: .4rem; }
.modal-card > p { color: var(--muted); font-size: .8rem; margin-bottom: 1rem; }
.install-steps { display: grid; gap: .6rem; }
.install-steps p { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; font-size: .75rem; color: var(--ink-2); line-height: 1.8; }
.install-steps svg { display: inline; vertical-align: -2px; color: var(--gold); }
.install-modal { text-align: right; }

/* ---------- Animation ---------- */
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawerIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGold { 0%, 100% { box-shadow: 0 0 0 0 rgba(212,182,125,.25); } 50% { box-shadow: 0 0 0 12px rgba(212,182,125,0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1150px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .header-inner { gap: .7rem; }
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.6rem; padding-bottom: 34px; }
  .hero-copy { max-width: 680px; }
  .hero-verse-wrap { max-width: 560px; margin-inline: auto; width: 100%; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); row-gap: 1rem; }
  .hero-stats > div:nth-child(3) { border-left: 0; }
  .hero-stats > div:nth-child(4), .hero-stats > div:nth-child(5) { display: none; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
  .azkar-preview-grid { grid-template-columns: minmax(0, 1fr); }
  .articles-preview-grid { grid-template-columns: 1fr 1fr; }
  .article-preview-card.featured { grid-column: 1 / -1; }
  .home-cta { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-sources { grid-template-columns: 1fr; gap: .6rem; }
}
@media (max-width: 760px) {
  :root { --header-h: 68px; }
  .container { width: min(var(--container), calc(100% - 28px)); }
  .brand-name { font-size: 1.75rem; }
  .brand-tag { font-size: .57rem; }
  .logo-mark { width: 42px; height: 42px; border-radius: 14px; }
  .logo-mark svg { width: 24px; height: 24px; }
  .header-actions .desktop-only { display: none; }
  .hero { padding-top: 42px; }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.5rem); }
  .hero-trust { gap: .7rem; }
  .verse-card { padding: 1.25rem 1.15rem; border-radius: 24px 24px 24px 6px; }
  .verse-quran { font-size: 1.55rem; line-height: 2.1; }
  .hero-stat-float { position: static; margin-top: .8rem; display: inline-flex; }
  .section-head { flex-direction: column; align-items: flex-start; gap: .7rem; }
  .section-head > p { text-align: right; }
  .category-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .65rem; }
  .category-card { padding: 1rem .85rem; min-height: 150px; flex-direction: column; gap: .6rem; }
  .category-card p { display: none; }
  .category-arrow { display: none; }
  .daily-hadith { grid-template-columns: minmax(0, 1fr); }
  .daily-hadith-aside { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 1.2rem; border-left: 0; border-bottom: 1px solid rgba(247,241,227,.1); gap: .7rem; }
  .hadith-quote-mark { display: none; }
  .daily-hadith-aside .btn { margin-top: 0; margin-inline-start: auto; }
  .daily-hadith-main { padding: 1.25rem; }
  .hadith-actions { flex-direction: column; align-items: flex-start; }
  .prayer-widget { padding: 1.2rem 1rem; }
  .prayer-widget-top { gap: .4rem; }
  .next-prayer { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .prayer-times { gap: .2rem; }
  .prayer-time { padding: .45rem .15rem; }
  .prayer-time strong { font-size: .68rem; }
  .prayer-widget-bottom { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .duas-preview-grid { grid-template-columns: 1fr; }
  .dua-preview-card { min-height: 170px; }
  .articles-preview-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .2rem; }
  .hero-stats > div:nth-child(3) { display: flex; border-left: 1px solid rgba(247,241,227,.1); }
  .hero-stats > div:nth-child(4), .hero-stats > div:nth-child(5) { display: none; }
  .hero-stats strong { font-size: 1.1rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.6rem; padding-top: 2.4rem; }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .home-cta-actions { flex-direction: column; align-items: stretch; }
  .home-cta-actions .btn { width: 100%; }
  .reminder-card { flex-direction: column; }
}
@media (max-width: 480px) {
  .hero-actions { }
  .hero-badge { font-size: .66rem; }
  .hero-quick { display: none; }
  .header-actions .icon-btn { width: 36px; height: 36px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { flex-direction: row; min-height: auto; }
  .category-card p { display: block; }
  .ayat-card { }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-col { border-top: 1px solid rgba(247,241,227,.08); padding-top: 1rem; }
  .footer-brand-col { border: 0; padding: 0; }
  .content-actions { gap: .25rem; }
  .action-btn span { display: none; }
  .action-btn { width: 32px; height: 32px; padding: 0; justify-content: center; }
}

/* ---------- Page hero / inner pages ---------- */
.page-hero {
  position: relative; overflow: hidden; color: #f7f1e3;
  background:
    radial-gradient(700px 360px at 92% 12%, rgba(212,182,125,.15), transparent 60%),
    linear-gradient(135deg, #082b20, #0b3829 70%, #0e4231);
  padding: 2.3rem 0 2.8rem; border-bottom: 1px solid rgba(212,182,125,.15);
}
.page-hero.tone-gold {
  background:
    radial-gradient(700px 360px at 88% 10%, rgba(255,255,255,.1), transparent 60%),
    linear-gradient(135deg, #92703b, #b28e4f 60%, #a17d43);
}
.page-hero.tone-plain { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
.page-hero-pattern { position: absolute; inset: 0; background: url("../pattern.svg") 0 0/200px; opacity: .045; pointer-events: none; }
.page-hero-inner { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.page-hero-copy { max-width: 760px; }
.page-hero h1 { color: #fbf6e9; font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: 0; margin: .2rem 0 .55rem; text-wrap: balance; }
.page-hero p { color: rgba(247,241,227,.8); font-size: .87rem; max-width: 650px; line-height: 1.9; text-wrap: pretty; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(255deg, rgba(3,17,12,.42), rgba(3,17,12,.06) 55%, transparent);
}
.page-hero.tone-plain h1 { color: var(--ink); }
.page-hero.tone-plain p { color: var(--muted); }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .64rem; color: rgba(247,241,227,.6); margin-bottom: 1rem; position: relative; }
.breadcrumbs span { display: inline-flex; align-items: center; gap: .3rem; }
.breadcrumbs a:hover { color: var(--gold-2); }
.page-hero.tone-plain .breadcrumbs { color: var(--muted); }
.page-hero-aside { flex: none; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.page-hero-aside .btn-outline-gold { border-color: rgba(247,241,227,.25); color: #f7f1e3; }

.pill-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill-tab {
  display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line);
  background: var(--surface); border-radius: 999px; padding: .45rem .9rem; color: var(--muted);
  font-size: .75rem; font-weight: 600; transition: all var(--transition);
}
.pill-tab:hover { border-color: var(--gold); color: var(--green-700); }
.pill-tab.active { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.page-hero .pill-tab { background: rgba(247,241,227,.08); border-color: rgba(247,241,227,.17); color: rgba(247,241,227,.72); }
.page-hero .pill-tab.active { background: var(--gold); border-color: var(--gold); color: var(--green-950); }

.empty-state {
  text-align: center; padding: 4rem 1rem; border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg); color: var(--muted); background: var(--surface-2);
}
.empty-state svg { color: var(--gold); margin-bottom: .7rem; }
.empty-state h2 { font-size: 1.2rem; margin-bottom: .35rem; }
.empty-state p { font-size: .8rem; }

/* ---------- Quran listing ---------- */
.quran-page { padding-top: 2.2rem; }
.quran-stats-row { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; margin-bottom: 1.3rem; color: var(--muted); font-size: .73rem; }
.quran-stats-row span { display: inline-flex; align-items: center; gap: .35rem; }
.quran-stats-row svg { color: var(--gold); }
.last-read-card { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; margin-bottom: 1.6rem; box-shadow: var(--shadow-sm); }
.last-read-card.empty { background: var(--surface-2); }
.last-read-icon { width: 45px; height: 45px; flex: none; border-radius: 13px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; }
.last-read-card > div { flex: 1; }
.last-read-card h3 { font-size: .92rem; }
.last-read-card p { font-size: .67rem; color: var(--muted); }
.last-read-label { font-size: .6rem; color: var(--gold); font-weight: 700; letter-spacing: .03em; }
.quran-toolbar { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.quran-filters { display: flex; gap: .3rem; }
.quran-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: .45rem; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .48rem .9rem; color: var(--muted); }
.quran-search input { border: 0; outline: none; background: transparent; flex: 1; font-size: .78rem; color: var(--ink); }
.sort-select { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .45rem .7rem; color: var(--muted); font-size: .72rem; }
.sort-select select, .reader-settings select { border: 0; background: transparent; outline: none; color: var(--ink); font-size: .72rem; }
.surah-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.surah-card {
  display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: 15px; padding: .8rem .85rem; transition: all var(--transition); position: relative; overflow: hidden;
}
.surah-card::after { content: ""; position: absolute; inset-block: 0; right: 0; width: 2px; background: transparent; transition: background var(--transition); }
.surah-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.surah-card:hover::after { background: var(--gold); }
.surah-number {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center; color: var(--gold);
  font-size: .8rem; font-weight: 800;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M24 2l7 5 9 1-2 9 4 7-6 7-3 9-9-2-9 2-3-9-6-7 4-7-2-9 9-1 7-5Z' fill='none' stroke='%23b28e4f' stroke-opacity='.36'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.surah-info { flex: 1; min-width: 0; }
.surah-info h2 { font-family: var(--font-quran); font-size: 1.17rem; line-height: 1.5; }
.surah-info span { color: var(--muted); font-size: .58rem; letter-spacing: .02em; display: block; }
.surah-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .12rem; font-size: .58rem; color: var(--muted); white-space: nowrap; }
.revelation-tag { font-size: .56rem; border-radius: 999px; padding: 0 .38rem; border: 1px solid var(--line); }
.revelation-tag.meccan { color: var(--gold); border-color: rgba(178,142,79,.3); background: var(--gold-soft); }
.revelation-tag.medinan { color: var(--green-700); border-color: rgba(29,106,78,.2); background: var(--green-soft); }
[data-theme="dark"] .revelation-tag.medinan { color: #8ed5b3; }
.surah-open { color: var(--muted); opacity: .6; transition: all var(--transition); }
.surah-card:hover .surah-open { color: var(--gold); opacity: 1; transform: translateX(-3px); }
.quran-search-hint { display: flex; align-items: center; gap: .6rem; border: 1px dashed var(--line-strong); border-radius: 14px; padding: .8rem 1rem; margin-top: 1.4rem; font-size: .74rem; color: var(--muted); background: var(--surface-2); }
.quran-search-hint svg { color: var(--gold); }
.quran-search-hint p { flex: 1; }

/* ---------- Quran reader ---------- */
.reader-page { background: var(--bg); padding-bottom: 4rem; }
.reader-container { padding-top: 1.1rem; }
.reader-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.reader-nav { display: flex; align-items: center; gap: .65rem; }
.reader-title { display: flex; flex-direction: column; line-height: 1.4; }
.reader-title > span { font-family: var(--font-quran); font-size: 1.3rem; font-weight: 700; }
.reader-title small { font-size: .62rem; color: var(--muted); }
.reader-tools { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.tool-chip { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .38rem .7rem; font-size: .68rem; color: var(--muted); }
.tool-chip.active { background: var(--green-soft); border-color: rgba(29,106,78,.22); color: var(--green-700); }
[data-theme="dark"] .tool-chip.active { color: var(--gold-2); }
.tafsir-switch { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: .16rem; }
.tafsir-switch button { border: 0; background: transparent; padding: .28rem .6rem; border-radius: 999px; font-size: .64rem; color: var(--muted); }
.tafsir-switch button.active { background: var(--surface); color: var(--green-700); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .tafsir-switch button.active { color: var(--gold-2); }
.reader-settings { display: flex; flex-wrap: wrap; gap: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); animation: riseIn .2s ease-out; }
.setting-group { display: flex; align-items: center; gap: .55rem; font-size: .7rem; color: var(--muted); }
.setting-group > span { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.setting-group select { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); padding: .3rem .5rem; font-size: .7rem; }
.setting-group input[type="range"] { accent-color: var(--gold); width: 110px; }
.setting-group b { color: var(--gold); font-size: .65rem; }
.speed-options { display: flex; gap: .2rem; }
.speed-options button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; padding: .15rem .38rem; font-size: .6rem; color: var(--muted); }
.speed-options button.active { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.reader-paper {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 2.6rem); box-shadow: var(--shadow-sm); position: relative;
  background-image: radial-gradient(circle at 50% 0%, rgba(178,142,79,.05), transparent 40%);
}
.surah-ornament { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--gold); opacity: .55; margin-bottom: 1rem; }
.surah-ornament span { width: min(120px, 18vw); height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.surah-ornament span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.surah-ornament svg { width: 40px; height: 40px; }
.surah-head { text-align: center; padding-bottom: 1.3rem; border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
.surah-head-kicker { color: var(--gold); font-size: .66rem; font-weight: 700; letter-spacing: .3em; }
.surah-head h1 { font-family: var(--font-quran); font-size: clamp(2rem, 4vw, 3rem); color: var(--green-800); margin: .1rem 0 .2rem; }
[data-theme="dark"] .surah-head h1 { color: var(--gold-2); }
.surah-head-meta { display: flex; align-items: center; justify-content: center; gap: .55rem; font-size: .63rem; color: var(--muted); }
.surah-head-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }
.basmala { font-family: var(--font-quran); font-size: clamp(1.35rem, 2.2vw, 1.8rem); color: var(--green-700); margin-top: 1.2rem; }
[data-theme="dark"] .basmala { color: var(--gold-2); }
.ayat-list { margin-top: 1rem; }
.ayah-card {
  display: grid; grid-template-columns: 50px 1fr; gap: .9rem; padding: 1.1rem .8rem;
  border-radius: 14px; border: 1px solid transparent; border-bottom: 1px solid var(--line);
  transition: background var(--transition), border-color var(--transition); scroll-margin-top: 120px;
}
.ayah-card:hover { background: var(--surface-2); }
.ayah-card.is-active { background: var(--surface-2); border-color: rgba(178,142,79,.15); }
.ayah-card.is-playing { background: linear-gradient(90deg, var(--gold-soft), transparent); border-color: rgba(178,142,79,.3); }
.ayah-rail { display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.ayah-number {
  width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(178,142,79,.3);
  border-radius: 50%; color: var(--gold); font-size: .62rem; font-weight: 700;
  background-image: radial-gradient(circle, var(--surface) 55%, transparent 56%);
}
.ayah-play { border: 0; background: var(--green-soft); color: var(--green-700); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; }
[data-theme="dark"] .ayah-play { color: var(--gold-2); }
.ayah-play:hover { background: var(--green-800); color: #fff; }
.ayah-text { font-family: var(--font-quran); line-height: 2.15; text-align: justify; color: var(--ink); letter-spacing: .01em; }
.ayah-translation { direction: ltr; text-align: left; color: var(--muted); font-size: .78rem; line-height: 1.8; margin-top: .7rem; padding: .6rem .8rem; border-left: 2px solid var(--gold-2); background: var(--surface-2); }
.ayah-actions { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; margin-top: .55rem; opacity: .65; transition: opacity var(--transition); }
.ayah-card:hover .ayah-actions, .ayah-card.is-active .ayah-actions { opacity: 1; }
.ayah-actions .content-actions { display: contents; }
.tafsir-panel { margin-top: .8rem; background: var(--green-soft); border: 1px solid rgba(29,106,78,.12); border-radius: 12px; padding: .9rem 1rem; animation: riseIn .2s ease-out; }
[data-theme="dark"] .tafsir-panel { background: var(--surface-3); border-color: var(--line); }
.tafsir-panel-head { display: flex; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .45rem; padding-bottom: .4rem; border-bottom: 1px dashed var(--line-strong); }
.tafsir-panel-head h3 { font-size: .78rem; color: var(--green-700); }
[data-theme="dark"] .tafsir-panel-head h3 { color: var(--gold-2); }
.tafsir-panel-head span { font-size: .6rem; color: var(--muted); }
.tafsir-panel p { font-size: .8rem; line-height: 2; color: var(--ink-2); white-space: pre-line; max-height: 440px; overflow-y: auto; }
.tafsir-loading { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .75rem; }
.surah-end { text-align: center; border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1.2rem; }
.surah-end > span { font-family: var(--font-quran); color: var(--gold); font-size: 1.1rem; }
.surah-end-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: .9rem; }

/* Audio player */
.audio-player {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 180; background: var(--surface);
  border-top: 1px solid var(--line-strong); box-shadow: 0 -20px 50px -30px rgba(6,31,23,.4);
  animation: riseIn .3s ease-out; padding-bottom: env(safe-area-inset-bottom);
}
.audio-player-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.player-info { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.player-orb { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--green-800); color: var(--gold-2); }
.player-info > div:last-child { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.player-info strong { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info strong span { color: var(--gold); margin: 0 .2rem; }
.player-info small { font-size: .62rem; color: var(--muted); }
.player-controls { display: flex; align-items: center; gap: .3rem; }
.player-play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--green-800); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px -8px rgba(10,45,34,.6); }
.player-play:hover { background: var(--green-700); }
.player-options { display: flex; align-items: center; gap: .35rem; }
.player-options select { border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); padding: .35rem .55rem; font-size: .63rem; max-width: 140px; }
.player-tool { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); display: grid; place-items: center; }
.player-tool.active { background: var(--gold-soft); color: var(--gold); border-color: rgba(178,142,79,.3); }
.player-progress { height: 2px; background: var(--line); }
.player-progress span { display: block; height: 100%; width: 35%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); animation: progressPulse 3s ease-in-out infinite alternate; }
@keyframes progressPulse { from { width: 18%; opacity: .5; } to { width: 62%; opacity: 1; } }
.player-error { color: #a84d4d; font-size: .66rem; padding-bottom: .35rem; }

@media (max-width: 1000px) {
  .surah-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .quran-grid { }
  .surah-grid { grid-template-columns: 1fr; }
  .quran-toolbar { gap: .5rem; }
  .quran-search { order: 3; flex-basis: 100%; }
  .sort-select { margin-inline-start: auto; }
  .last-read-card { flex-wrap: wrap; }
  .last-read-card .btn { margin-inline-start: 57px; }
  .reader-topbar { align-items: flex-start; }
  .reader-tools { width: 100%; justify-content: space-between; }
  .reader-tools .tafsir-switch { order: 3; }
  .play-surah-btn { flex: 1; }
  .reader-settings { gap: .8rem; }
  .setting-group { width: 100%; justify-content: space-between; }
  .reader-paper { padding: 1rem .7rem; border-radius: 18px; }
  .ayah-card { grid-template-columns: 36px 1fr; gap: .5rem; padding: .9rem .2rem; }
  .ayah-number { width: 30px; height: 30px; font-size: .55rem; }
  .ayah-text { text-align: right; line-height: 2.2; }
  .audio-player { bottom: 0; }
  .audio-player-inner { flex-wrap: wrap; gap: .45rem; padding: .55rem 0; }
  .player-info { order: 1; width: calc(100% - 150px); }
  .player-controls { order: 2; margin-inline-start: auto; }
  .player-options { order: 3; width: 100%; justify-content: center; border-top: 1px solid var(--line); padding-top: .4rem; }
  .player-options select { max-width: 120px; }
  .player-info strong { font-size: .7rem; }
}

/* ---------- Hadith ---------- */
.hadith-hero-count { display: flex; align-items: center; gap: .6rem; color: var(--gold-2); font-size: .75rem; border: 1px solid rgba(212,182,125,.25); border-radius: 14px; padding: .6rem .9rem; background: rgba(212,182,125,.06); }
.hadith-hero-count strong { font-size: 1.2rem; color: var(--gold-2); }
.hadith-layout { display: grid; grid-template-columns: 245px 1fr; gap: 1.5rem; align-items: start; }
.hadith-sidebar { position: sticky; top: calc(var(--header-h) + 1rem); display: grid; gap: .9rem; }
.sidebar-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.sidebar-card h2 { display: flex; align-items: center; gap: .4rem; font-size: .82rem; margin-bottom: .7rem; color: var(--ink); }
.sidebar-card h2 svg { color: var(--gold); }
.sidebar-link { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .48rem .55rem; border-radius: 9px; font-size: .71rem; color: var(--ink-2); }
.sidebar-link b { font-size: .58rem; color: var(--muted); background: var(--surface-2); border-radius: 999px; min-width: 22px; text-align: center; padding: 0 .3rem; }
.sidebar-link:hover { background: var(--surface-2); color: var(--green-700); }
.sidebar-link.active { background: var(--green-soft); color: var(--green-700); font-weight: 700; }
[data-theme="dark"] .sidebar-link.active { color: var(--gold-2); }
.sidebar-note { background: linear-gradient(145deg, var(--green-800), var(--green-700)); color: #f8f2e4; border-radius: var(--radius); padding: 1.1rem; position: relative; overflow: hidden; }
.sidebar-note::after { content: "﷽"; position: absolute; left: -.5rem; bottom: -1.5rem; font-family: var(--font-quran); font-size: 4.5rem; color: rgba(255,255,255,.05); }
.sidebar-note > svg { color: var(--gold-2); margin-bottom: .4rem; }
.sidebar-note h3 { color: #fbf6e9; font-size: .82rem; margin-bottom: .3rem; }
.sidebar-note p { color: rgba(247,241,227,.62); font-size: .68rem; line-height: 1.85; margin-bottom: .6rem; }
.sidebar-note a { color: var(--gold-2); font-size: .66rem; font-weight: 700; }
.hadith-main { min-width: 0; }
.hadith-search-row { margin-bottom: 1.1rem; }
.hadith-search-row .search-form { max-width: 620px; }
.hadith-search-row > p { color: var(--muted); font-size: .68rem; margin-top: .45rem; }
.hadith-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.hadith-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; display: flex; flex-direction: column; transition: all var(--transition); position: relative; overflow: hidden;
}
.hadith-card::before { content: "”"; position: absolute; left: 12px; bottom: -20px; font-family: var(--font-quran); font-size: 6rem; color: var(--gold); opacity: .05; }
.hadith-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.hadith-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; position: relative; z-index: 1; }
.topic-pill.light { color: var(--green-700); background: var(--green-soft); border-color: transparent; }
[data-theme="dark"] .topic-pill.light { color: var(--gold-2); }
.hadith-card-text { font-family: var(--font-quran); font-size: 1.05rem; line-height: 2; color: var(--ink-2); flex: 1; position: relative; z-index: 1; }
.hadith-card-source { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin: .8rem 0 .6rem; padding-top: .6rem; border-top: 1px dashed var(--line); color: var(--muted); font-size: .6rem; position: relative; z-index: 1; }
.hadith-card-source svg { color: var(--gold); }
.hadith-card-source i { width: 2px; height: 2px; background: var(--gold); border-radius: 50%; }
.hadith-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .4rem; flex-wrap: wrap; position: relative; z-index: 1; }
.hadith-card-foot .text-link { font-size: .68rem; }
.hadith-card-foot .content-actions { gap: .2rem; }
.hadith-card-foot .action-btn span { display: none; }
.hadith-card-foot .action-btn { width: 29px; height: 29px; padding: 0; justify-content: center; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.8rem; font-size: .7rem; color: var(--muted); }
.page-btn { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--line); border-radius: 999px; padding: .38rem .7rem; color: var(--ink-2); font-weight: 600; }
.page-btn:hover { border-color: var(--gold); color: var(--green-700); }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* hadith detail */
.detail-grade { display: flex; align-items: center; gap: .6rem; border-radius: 14px; padding: .7rem .9rem; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fbf6e9; }
.detail-grade > svg { color: var(--gold-2); }
.detail-grade div { display: flex; flex-direction: column; line-height: 1.4; }
.detail-grade span { font-size: .58rem; color: rgba(247,241,227,.55); }
.detail-grade strong { font-size: .9rem; }
.detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.4rem; align-items: start; }
.hadith-detail-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.2rem, 3vw, 2.2rem); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.hadith-detail-top { display: flex; align-items: center; gap: .5rem; justify-content: space-between; flex-wrap: wrap; }
.hadith-detail-quote { color: var(--gold); opacity: .4; margin: 1rem 0 .2rem; }
.hadith-detail-text { font-family: var(--font-quran); font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 2.25; color: var(--ink); }
.hadith-explanation { background: var(--gold-soft); border: 1px solid rgba(178,142,79,.15); border-radius: 14px; padding: .9rem 1rem; margin-top: 1.3rem; }
.hadith-explanation h2 { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--gold); margin-bottom: .3rem; }
.hadith-explanation p { font-size: .82rem; line-height: 1.95; color: var(--ink-2); white-space: pre-line; }
.hadith-doc { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; background: var(--surface-2); }
.hadith-doc > h2 { font-size: .82rem; margin-bottom: .6rem; }
.hadith-doc dl { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; margin: 0; }
.hadith-doc dl > div { border-bottom: 1px dashed var(--line); padding-bottom: .35rem; }
.hadith-doc dt { color: var(--muted); font-size: .62rem; }
.hadith-doc dd { margin: 0; font-size: .75rem; font-weight: 600; color: var(--ink-2); }
.source-note { color: var(--muted); font-size: .65rem; line-height: 1.8; margin: .8rem 0; }
.hadith-detail-actions { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.detail-aside { display: grid; gap: .9rem; position: sticky; top: calc(var(--header-h) + 1rem); }
.related-hadith { display: block; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.related-hadith > span { font-size: .57rem; color: var(--gold); font-weight: 700; }
.related-hadith p { font-family: var(--font-quran); font-size: .82rem; line-height: 1.8; color: var(--ink-2); margin-top: .15rem; }
.related-hadith:hover p { color: var(--green-700); }
.detail-aside .sidebar-card > .text-link { margin-top: .7rem; font-size: .68rem; }

@media (max-width: 1024px) {
  .hadith-grid { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hadith-layout { grid-template-columns: 1fr; }
  .hadith-sidebar { position: static; }
  .hadith-sidebar .sidebar-card { overflow-x: auto; }
  .sidebar-card h2 { position: sticky; right: 0; }
  .hadith-sidebar .sidebar-link { display: inline-flex; margin: .1rem; border: 1px solid var(--line); }
  .hadith-layout .sidebar-note { display: none; }
}
@media (max-width: 640px) {
  .hadith-doc dl { grid-template-columns: 1fr; }
  .detail-aside { grid-template-columns: 1fr; }
  .hadith-card-foot .content-actions .action-btn span { display: none; }
}

/* ---------- Azkar / Duas ---------- */
.azkar-hero-badges { display: flex; flex-wrap: wrap; gap: .45rem; }
.azkar-hero-badges span { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid rgba(247,241,227,.2); border-radius: 999px; padding: .35rem .75rem; color: rgba(247,241,227,.75); font-size: .68rem; }
.azkar-hero-badges svg { color: var(--gold-2); }
.azkar-intro-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-bottom: 1.4rem; }
.azkar-intro-strip > div { display: flex; align-items: center; gap: .65rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .75rem .9rem; }
.azkar-intro-strip svg { color: var(--gold); }
.azkar-intro-strip span { display: flex; flex-direction: column; line-height: 1.4; }
.azkar-intro-strip strong { font-size: .76rem; }
.azkar-intro-strip small { color: var(--muted); font-size: .62rem; }
.azkar-tabs-wrap {
  overflow-x: auto; padding-bottom: .3rem; margin-bottom: 1.4rem; scrollbar-width: none;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to left, #000 calc(100% - 14px), transparent 100%);
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 14px), transparent 100%);
}
.azkar-tabs-wrap::-webkit-scrollbar { display: none; }
.azkar-tabs { display: flex; gap: .45rem; min-width: max-content; }
.azkar-tab { display: flex; align-items: center; gap: .55rem; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: .6rem .8rem; min-width: 138px; text-align: right; transition: all var(--transition); scroll-snap-align: start; }
.azkar-tab:hover { border-color: var(--gold); }
.azkar-tab.active { background: var(--green-800); border-color: var(--green-800); color: #fff; box-shadow: var(--shadow); }
.azkar-tab-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-size: .95rem; }
.azkar-tab span:last-child { display: flex; flex-direction: column; line-height: 1.4; }
.azkar-tab b { font-size: .72rem; }
.azkar-tab small { font-size: .58rem; color: var(--muted); }
.azkar-tab.active small { color: rgba(255,255,255,.55); }
.azkar-list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.azkar-list-head h2 { font-size: 1.3rem; }
.azkar-list-head p { color: var(--muted); font-size: .7rem; }
.azkar-search { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .4rem .7rem; color: var(--muted); }
.azkar-search input { border: 0; outline: none; background: transparent; font-size: .72rem; width: 180px; color: var(--ink); }
.azkar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; align-items: start; }
.azkar-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; position: relative; transition: border-color var(--transition), box-shadow var(--transition); scroll-margin-top: 100px; }
.azkar-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.azkar-card.is-done { border-color: rgba(29,106,78,.25); background: linear-gradient(180deg, var(--green-soft), var(--surface) 60%); }
.azkar-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.azkar-card-head h3 { font-size: .9rem; margin-bottom: .2rem; }
.azkar-grade { display: inline-flex; align-items: center; gap: .25rem; font-size: .57rem; color: var(--green-700); }
[data-theme="dark"] .azkar-grade { color: #8ed5b3; }
.azkar-repeat-pill { font-size: .6rem; font-weight: 700; color: var(--gold); border: 1px solid rgba(178,142,79,.25); border-radius: 999px; padding: .05rem .48rem; flex: none; }
.azkar-text {
  position: relative; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4;
}
.azkar-text::after { content: ""; position: absolute; bottom: 0; inset-inline: 0; height: 45px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.azkar-text.expanded { display: block; -webkit-line-clamp: unset; line-clamp: unset; }
.azkar-text.expanded::after { display: none; }
.azkar-text p { font-family: var(--font-naskh); font-size: 1.1rem; line-height: 2.1; color: var(--ink-2); margin-bottom: .35rem; overflow-wrap: break-word; text-align: justify; }
.azkar-expand { display: inline-flex; align-items: center; gap: .25rem; border: 0; background: none; color: var(--gold); font-size: .63rem; font-weight: 700; padding: .2rem 0 .4rem; }
.azkar-source { font-size: .6rem; color: var(--muted); padding: .45rem 0; border-top: 1px dashed var(--line); line-height: 1.7; }
.azkar-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.zikr-counter { display: flex; align-items: center; gap: .35rem; }
.zikr-counter small { font-size: .58rem; color: var(--muted); min-width: 45px; }
.counter-btn { position: relative; width: 47px; height: 47px; border: 0; background: transparent; color: var(--gold); display: grid; place-items: center; font-size: .62rem; font-weight: 800; border-radius: 50%; }
.counter-btn svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.counter-ring-bg { fill: var(--surface-2); stroke: var(--line); stroke-width: 3; }
.counter-ring { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .25s ease; }
.counter-btn span { position: relative; z-index: 1; }
.counter-btn svg + * { position: relative; z-index: 1; }
.counter-btn:hover .counter-ring-bg { fill: var(--gold-soft); }
.counter-done { color: var(--green-700); font-weight: 700; }
[data-theme="dark"] .counter-done { color: #8ed5b3; }
.azkar-card .content-actions .action-btn span { display: none; }
.azkar-card .content-actions .action-btn { width: 29px; height: 29px; padding: 0; justify-content: center; }
.azkar-toast { position: absolute; bottom: .55rem; left: .55rem; background: var(--green-800); color: #fff; font-size: .58rem; border-radius: 999px; padding: .25rem .55rem; display: flex; align-items: center; gap: .2rem; animation: riseIn .2s ease-out; }
.azkar-dua-link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--gold-soft); border: 1px solid rgba(178,142,79,.18); border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: 1.4rem; }
.azkar-dua-link h3 { font-size: .92rem; }
.azkar-dua-link p { color: var(--muted); font-size: .7rem; }
.duas-intro { display: flex; align-items: center; gap: .8rem; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: 1.4rem; }
.duas-intro > svg { color: var(--gold); }
.duas-intro p { flex: 1; color: var(--muted); font-size: .72rem; line-height: 1.8; }
.duas-page .azkar-column { }
.dua-source-chip { display: inline-flex; align-items: center; gap: .25rem; font-size: .6rem; color: var(--gold); }

@media (max-width: 760px) {
  .azkar-intro-strip { grid-template-columns: 1fr; gap: .4rem; }
  .azkar-intro-strip > div { padding: .55rem .7rem; }
  .azkar-grid { grid-template-columns: 1fr; }
  .azkar-list-head { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .azkar-search input { width: 100%; }
  .azkar-filter { width: 100%; }
  .azkar-list-head .azkar-search { width: 100%; }
  .azkar-dua-link { flex-direction: column; text-align: center; }
  .duas-intro { flex-wrap: wrap; }
  .duas-intro p { flex-basis: 100%; order: 3; }
  .duas-intro .btn { margin-inline-start: auto; }
}

/* ---------- Tasbih page ---------- */
.tasbih-hadith-strip { display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 14px; padding: .8rem 1rem; margin-bottom: 1.2rem; }
.tasbih-hadith-strip > svg { color: var(--gold); flex: none; }
.tasbih-hadith-strip p { flex: 1; font-family: var(--font-quran); font-size: 1rem; color: var(--ink-2); }
.tasbih-hadith-strip span { font-size: .58rem; color: var(--gold); white-space: nowrap; }
.tasbih-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1rem; align-items: start; }
.tasbih-picker, .tasbih-main-card { min-width: 0; }
.tasbih-picker { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem; position: sticky; top: calc(var(--header-h) + 1rem); }
.tasbih-picker-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-bottom: .7rem; }
.tasbih-picker-head h2 { font-size: .9rem; }
.tasbih-list { display: flex; flex-direction: column; gap: .15rem; max-height: 54vh; overflow-y: auto; padding-left: .1rem; }
.tasbih-list-item { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: right; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: .48rem .5rem; color: var(--ink-2); }
.tasbih-list-item:hover { background: var(--surface-2); }
.tasbih-list-item.active { background: var(--green-soft); border-color: rgba(29,106,78,.15); }
.tasbih-list-orb { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--gold); font-size: .75rem; }
.tasbih-list-item.active .tasbih-list-orb { background: var(--green-800); color: var(--gold-2); }
.tasbih-list-item > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.tasbih-list-item b { font-size: .68rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tasbih-list-item small { font-size: .56rem; color: var(--muted); }
.delete-custom { color: var(--muted); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.delete-custom:hover { color: #a84d4d; background: rgba(168,77,77,.1); }
.custom-dhikr-form { display: grid; grid-template-columns: 1fr auto; gap: .4rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .6rem; margin-bottom: .6rem; }
.custom-dhikr-form > input { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .5rem; background: var(--surface); font-size: .7rem; outline: none; }
.custom-dhikr-form label { display: flex; align-items: center; gap: .35rem; font-size: .62rem; color: var(--muted); }
.custom-dhikr-form label input { width: 56px; border: 1px solid var(--line); border-radius: 6px; padding: .2rem .3rem; background: var(--surface); }
.tasbih-main-card {
  background:
    radial-gradient(500px 350px at 50% 22%, rgba(212,182,125,.08), transparent 65%),
    linear-gradient(160deg, #082b20, #0b3a2b);
  border: 1px solid rgba(212,182,125,.2); border-radius: var(--radius-xl); padding: 1.5rem 1.8rem 1.3rem;
  color: #f8f2e4; display: flex; flex-direction: column; align-items: center; position: relative; overflow: hidden;
}
.tasbih-main-card::before { content: ""; position: absolute; inset: 0; background: url("../pattern.svg") 0 0/200px; opacity: .04; pointer-events: none; }
.tasbih-main-top { display: flex; align-items: center; justify-content: space-between; width: 100%; position: relative; z-index: 1; }
.tasbih-main-top .eyebrow { color: var(--gold-2); margin: 0; }
.tasbih-total { font-size: .63rem; color: rgba(247,241,227,.55); }
.tasbih-active-label { font-family: var(--font-quran); font-size: 1.5rem; color: var(--gold-2); margin: 1rem 0 .2rem; text-align: center; position: relative; z-index: 1; }
.tasbih-big { position: relative; width: min(330px, 72vw); height: min(330px, 72vw); border: 0; background: transparent; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; margin: .4rem auto .6rem; -webkit-tap-highlight-color: transparent; user-select: none; }
.tasbih-big:active { transform: scale(.985); }
.tasbih-big svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.big-ring-bg { fill: rgba(255,255,255,.025); stroke: rgba(255,255,255,.08); stroke-width: 4; }
.big-ring-progress { fill: none; stroke: url(#none); stroke: var(--gold-2); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .25s ease; transform: rotate(-90deg); transform-origin: center; }
.big-ring-inner { fill: none; stroke: rgba(212,182,125,.12); stroke-width: 1; stroke-dasharray: 1 8; }
.big-count { font-family: var(--font-quran); font-size: clamp(3.8rem, 7vw, 5.2rem); font-weight: 700; line-height: 1.15; color: var(--gold-2); position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.big-target { font-size: .7rem; color: rgba(247,241,227,.45); position: relative; z-index: 1; margin-top: .25rem; }
.big-tap { font-size: .64rem; color: rgba(247,241,227,.5); border: 1px solid rgba(247,241,227,.16); border-radius: 999px; padding: .14rem .65rem; margin-top: .8rem; position: relative; z-index: 1; }
.big-completed { display: inline-flex; align-items: center; gap: .2rem; font-size: .66rem; color: #9adbb6; background: rgba(83,168,123,.15); border: 1px solid rgba(83,168,123,.3); border-radius: 999px; padding: .14rem .65rem; margin-top: .8rem; position: relative; z-index: 1; }
.tasbih-big.completed { animation: pulseGold .6s ease-out 2; }
.tasbih-main-actions { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: center; position: relative; z-index: 1; }
.tasbih-main-card .btn-ghost { color: #f7f1e3; border-color: rgba(247,241,227,.25); background: rgba(255,255,255,.04); }
.tasbih-main-card .btn-ghost:hover { color: var(--gold-2); border-color: var(--gold-2); }
.toggle-pill { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid rgba(247,241,227,.18); background: transparent; color: rgba(247,241,227,.6); border-radius: 999px; padding: .55rem .8rem; font-size: .68rem; }
.toggle-pill.active { color: var(--gold-2); border-color: rgba(212,182,125,.4); background: rgba(212,182,125,.07); }
.tasbih-note { font-size: .62rem; color: rgba(247,241,227,.35); text-align: center; margin-top: .8rem; position: relative; z-index: 1; }

@media (max-width: 860px) {
  .tasbih-layout { grid-template-columns: minmax(0, 1fr); }
  .tasbih-picker { position: static; }
  .tasbih-list {
    flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: .35rem;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  }
  .tasbih-list-item { flex: 0 0 min(170px, 62vw); scroll-snap-align: start; }
}
@media (max-width: 620px) {
  .tasbih-main-card { padding: 1.1rem .8rem; border-radius: 24px; }
  .tasbih-main-top { flex-direction: column; align-items: flex-start; gap: .3rem; }
  .tasbih-hadith-strip { flex-wrap: wrap; }
  .tasbih-hadith-strip p { flex-basis: 100%; order: 3; font-size: .9rem; }
  .tasbih-main-actions { width: 100%; }
  .tasbih-main-actions .btn, .tasbih-main-actions .toggle-pill { flex: 1; justify-content: center; }
}

/* ---------- Prayer page ---------- */
.prayer-page { padding-top: 2.2rem; }
.prayer-dashboard { display: grid; gap: 1rem; }
.prayer-location-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; flex-wrap: wrap; }
.location-main { display: flex; align-items: center; gap: .8rem; }
.location-pin { width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; }
.location-main > div > span { font-size: .6rem; color: var(--muted); }
.location-main h2 { font-size: 1.15rem; line-height: 1.4; }
.location-main h2 small { font-size: .62rem; color: var(--muted); font-weight: 400; }
.location-main p { font-size: .65rem; color: var(--gold); }
.location-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.prayer-settings { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; }
.prayer-settings label { display: flex; flex-direction: column; gap: .2rem; font-size: .62rem; color: var(--muted); }
.prayer-settings select { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: .4rem .5rem; font-size: .7rem; color: var(--ink); min-width: 220px; }
.prayer-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 1rem; }
.next-prayer-hero { background:
    radial-gradient(500px 300px at 80% 10%, rgba(212,182,125,.18), transparent 60%),
    linear-gradient(145deg, #082b20, #0d3e2d); color: #f8f2e4; border-radius: var(--radius-lg); padding: 1.7rem; position: relative; overflow: hidden; border: 1px solid rgba(212,182,125,.18); }
.next-prayer-hero::after { content: ""; position: absolute; inset: 0; background: url("../pattern.svg") 0 0/200px; opacity: .045; pointer-events: none; }
.next-prayer-hero .eyebrow { color: var(--gold-2); position: relative; z-index: 1; }
.next-prayer-hero h2 { font-family: var(--font-quran); font-size: 2.3rem; color: #fbf6e9; margin: .4rem 0 0; position: relative; z-index: 1; }
.next-prayer-time { font-size: 1.1rem; color: var(--gold-2); position: relative; z-index: 1; }
.big-countdown { font-size: clamp(2.4rem, 5.5vw, 3.8rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: #fbf6e9; margin: .4rem 0 .2rem; position: relative; z-index: 1; }
.next-prayer-hero > p { color: rgba(247,241,227,.55); font-size: .65rem; position: relative; z-index: 1; }
.next-prayer-hero .prayer-inline-error { color: #f0b4b4; }
.prayer-today-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; }
.prayer-today-list { display: grid; gap: .15rem; margin-top: .6rem; }
.prayer-today-row { display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; border-radius: 10px; font-size: .78rem; color: var(--ink-2); }
.prayer-today-row strong { margin-inline-start: auto; font-size: .78rem; font-variant-numeric: tabular-nums; }
.prayer-today-row.is-next { background: var(--gold-soft); color: var(--gold); }
.prayer-today-row.is-next strong { color: var(--gold); }
[data-theme="dark"] .prayer-today-row.is-next, [data-theme="dark"] .prayer-today-row.is-next strong { color: var(--gold-2); }
.prayer-icon { width: 27px; text-align: center; }
.sunrise-row { display: flex; justify-content: space-between; font-size: .67rem; color: var(--muted); border-top: 1px dashed var(--line); margin-top: .5rem; padding-top: .55rem; }
.sunrise-row strong { color: var(--gold); font-weight: 600; }
.prayer-bottom-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 1rem; }
.qibla-card, .hijri-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.3rem 1.4rem; }
.qibla-card-head, .hijri-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.qibla-card-head h3, .hijri-card-head h3 { font-family: var(--font-quran); font-size: 1.2rem; margin-top: .1rem; }
.compass-wrap { display: flex; align-items: center; gap: 1.2rem; margin-top: 1rem; }
.compass { position: relative; width: 180px; height: 180px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); background: radial-gradient(circle at center, var(--surface-2) 0 56%, transparent 57%), var(--surface); box-shadow: inset 0 0 0 6px var(--surface-2), inset 0 0 0 7px var(--line); }
.compass::before { content: ""; position: absolute; inset: 22px; border: 1px dashed var(--line); border-radius: 50%; }
.compass-ticks { position: absolute; inset: 9px; border-radius: 50%; background: repeating-conic-gradient(var(--line) 0deg 1deg, transparent 1deg 15deg); mask: radial-gradient(circle, transparent 0 78%, black 79%); -webkit-mask: radial-gradient(circle, transparent 0 78%, black 79%); }
.compass > span { position: absolute; font-size: .6rem; color: var(--muted); font-weight: 700; }
.compass-n { top: 5px; left: 50%; transform: translateX(-50%); color: var(--green-700) !important; }
[data-theme="dark"] .compass-n { color: var(--gold-2) !important; }
.compass-s { bottom: 5px; left: 50%; transform: translateX(-50%); }
.compass-e { right: 8px; top: 50%; transform: translateY(-50%); }
.compass-w { left: 8px; top: 50%; transform: translateY(-50%); }
.compass-center { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.8rem; }
.qibla-arrow { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding-top: 16px; color: var(--gold); transition: transform .15s linear; transform-origin: center; }
.qibla-arrow svg { transform: rotate(0deg); }
.qibla-info { display: flex; flex-direction: column; gap: .15rem; }
.qibla-info strong { font-size: 2.2rem; color: var(--gold); line-height: 1; }
.qibla-info span { font-size: .68rem; color: var(--muted); }
.qibla-info small { font-size: .62rem; color: var(--muted); line-height: 1.7; margin-top: .4rem; max-width: 170px; }
.hijri-month { font-size: .65rem; color: var(--gold); border: 1px solid rgba(178,142,79,.25); border-radius: 999px; padding: .15rem .55rem; white-space: nowrap; }
.hijri-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .2rem; margin: .9rem 0 1rem; }
.hijri-day { display: flex; flex-direction: column; align-items: center; border-radius: 8px; padding: .25rem .1rem; background: var(--surface-2); border: 1px solid transparent; }
.hijri-day small { font-size: .52rem; color: var(--muted); }
.hijri-day b { font-size: .76rem; color: var(--ink-2); }
.hijri-day span { font-size: .45rem; color: var(--muted); }
.hijri-day.today { background: var(--green-800); border-color: var(--gold); }
.hijri-day.today small, .hijri-day.today b, .hijri-day.today span { color: var(--gold-2); }
.hijri-card h4 { font-size: .72rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .7rem; margin-bottom: .4rem; }
.events-list { display: grid; gap: .25rem; }
.event-item { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.event-days { min-width: 48px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); text-align: center; font-size: .55rem; padding: .1rem .35rem; }
.event-item > div { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.event-item strong { font-size: .68rem; }
.event-item small { font-size: .55rem; color: var(--muted); }
.event-date { font-size: .55rem; color: var(--muted); }
.prayer-footnote { display: flex; justify-content: space-between; gap: 1rem; border: 1px dashed var(--line-strong); border-radius: 12px; padding: .7rem .9rem; font-size: .6rem; color: var(--muted); flex-wrap: wrap; }
.prayer-footnote span { color: var(--gold); }
.city-modal h2 { display: flex; align-items: center; gap: .4rem; }
.city-modal h2 svg { color: var(--gold); }
.city-search { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: 999px; padding: .5rem .8rem; margin-bottom: .7rem; color: var(--muted); }
.city-search input { flex: 1; border: 0; outline: none; background: transparent; font-size: .78rem; color: var(--ink); }
.city-list { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; max-height: 320px; overflow-y: auto; margin-bottom: .8rem; }
.city-option { display: flex; justify-content: space-between; align-items: center; gap: .3rem; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: .4rem .55rem; font-size: .7rem; color: var(--ink-2); text-align: right; }
.city-option > span { display: inline-flex; align-items: center; gap: .25rem; }
.city-option small { font-size: .52rem; color: var(--muted); }
.city-option:hover, .city-option.active { border-color: var(--gold); background: var(--gold-soft); }
.empty-inline { font-size: .7rem; color: var(--muted); grid-column: 1/-1; text-align: center; padding: 1rem; }
.prayer-widget .eyebrow { margin-bottom: .1rem; }

@media (max-width: 900px) {
  .prayer-hero-grid, .prayer-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .prayer-location-bar { align-items: flex-start; }
  .location-actions { width: 100%; }
  .location-actions .btn { flex: 1; }
  .compass-wrap { flex-direction: column; }
  .compass { width: 160px; height: 160px; }
  .qibla-info { align-items: center; text-align: center; }
  .city-list { grid-template-columns: 1fr; }
  .prayer-settings select { min-width: 0; width: 100%; }
  .prayer-settings label { width: 100%; }
}

/* ---------- Search ---------- */
.search-page .search-form { max-width: 760px; margin-inline: auto; margin-bottom: 1.2rem; }
.search-summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .75rem; margin-bottom: .8rem; }
.search-summary strong { color: var(--ink); }
.search-summary span { font-size: .65rem; }
.search-tabs { display: flex; flex-wrap: wrap; gap: .35rem; border-bottom: 1px solid var(--line); padding-bottom: .8rem; margin-bottom: 1.5rem; }
.search-tab { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .4rem .75rem; font-size: .7rem; color: var(--muted); }
.search-tab b { background: var(--surface-2); color: var(--gold); font-size: .58rem; border-radius: 999px; padding: 0 .35rem; }
.search-tab.active { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.search-tab.active b { background: rgba(255,255,255,.12); color: var(--gold-2); }
.search-section { margin-bottom: 2rem; }
.search-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.search-section-head h2 { display: flex; align-items: center; gap: .4rem; font-size: 1.15rem; }
.search-section-head h2 svg { color: var(--gold); }
.search-section-head span { font-size: .65rem; color: var(--muted); }
.verse-results { display: grid; gap: .55rem; }
.verse-result { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 1rem 1.1rem; transition: all var(--transition); }
.verse-result:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.verse-result-ref { font-size: .62rem; color: var(--gold); font-weight: 700; }
.verse-result p { font-family: var(--font-quran); font-size: 1.2rem; line-height: 2.05; color: var(--ink); margin: .25rem 0; }
.verse-result-en { color: var(--muted); font-size: .68rem; line-height: 1.7; display: block; }
.search-small-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.search-small-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; display: flex; flex-direction: column; }
.search-small-card:hover { border-color: var(--gold); }
.search-small-card > span { font-size: .58rem; color: var(--gold); font-weight: 700; }
.search-small-card h3 { font-size: .85rem; margin: .25rem 0; }
.search-small-card p { font-size: .7rem; color: var(--muted); line-height: 1.8; flex: 1; }
.search-small-card small { font-size: .58rem; color: var(--gold); margin-top: .4rem; }
.results-note { text-align: center; color: var(--muted); font-size: .65rem; margin-top: .7rem; }
.search-suggestions { text-align: center; padding: 2rem 0; }
.search-suggestions h2 { font-size: 1rem; margin-bottom: .8rem; }
.suggestion-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.suggestion-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .38rem .8rem; font-size: .7rem; color: var(--ink-2); }
.suggestion-chip:hover { border-color: var(--gold); color: var(--green-700); }
@media (max-width: 640px) { .search-small-grid { grid-template-columns: 1fr; } }

/* ---------- Articles ---------- */
.article-featured { position: relative; display: flex; align-items: flex-end; min-height: 360px; border-radius: var(--radius-xl); overflow: hidden; padding: clamp(1.5rem, 4vw, 2.8rem); color: #f8f2e4; background: linear-gradient(145deg, #082b20, #0d3d2d); border: 1px solid rgba(212,182,125,.2); margin-bottom: 1.3rem; }
.article-featured-bg { position: absolute; inset: 0; background: url("../pattern.svg") 0 0/160px; opacity: .06; }
.article-featured::after { content: "﷽"; position: absolute; left: 2rem; top: 1rem; font-family: var(--font-quran); font-size: 5rem; color: rgba(212,182,125,.08); }
.article-featured > div { position: relative; z-index: 1; max-width: 740px; }
.article-featured h2 { color: #fbf6e9; font-size: clamp(1.7rem, 3.5vw, 2.8rem); margin: .5rem 0; line-height: 1.45; }
.article-featured p { color: rgba(247,241,227,.65); font-size: .85rem; line-height: 1.95; margin-bottom: .8rem; }
.article-featured-meta { display: flex; gap: 1rem; color: rgba(247,241,227,.5); font-size: .65rem; margin-bottom: 1rem; }
.articles-page-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.article-page-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; display: flex; flex-direction: column; min-height: 220px; transition: all var(--transition); }
.article-page-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.article-page-card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.article-page-card-top > span:last-child { font-size: .58rem; color: var(--muted); }
.article-page-card h2 { font-size: 1.05rem; line-height: 1.65; margin-bottom: .4rem; }
.article-page-card p { color: var(--muted); font-size: .72rem; line-height: 1.9; flex: 1; }
.article-page-card-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: 1rem; padding-top: .7rem; border-top: 1px solid var(--line); font-size: .6rem; color: var(--muted); }
.article-page-card-foot span:last-child { display: inline-flex; align-items: center; gap: .2rem; color: var(--gold); }
.article-hero-meta { display: inline-flex; align-items: center; gap: .35rem; color: var(--gold-2); border: 1px solid rgba(212,182,125,.25); border-radius: 999px; padding: .35rem .7rem; font-size: .68rem; }
.article-detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.article-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.2rem, 3vw, 2.4rem); }
.article-byline { display: flex; align-items: center; gap: .7rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.article-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; }
.article-byline div { display: flex; flex-direction: column; line-height: 1.5; }
.article-byline strong { font-size: .78rem; }
.article-byline small { font-size: .6rem; color: var(--muted); }
.article-body h2 { font-size: 1.25rem; margin: 1.5rem 0 .5rem; color: var(--green-800); }
[data-theme="dark"] .article-body h2 { color: var(--gold-2); }
.article-body p { font-size: .88rem; line-height: 2.1; color: var(--ink-2); margin-bottom: .8rem; }
.article-body ul { margin: .3rem 0 1rem; padding-inline-start: 1.2rem; }
.article-body li { font-size: .85rem; line-height: 2; color: var(--ink-2); margin-bottom: .3rem; }
.article-body li::marker { color: var(--gold); }
.article-share { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.article-share h3 { display: flex; align-items: center; gap: .35rem; font-size: .8rem; margin-bottom: .6rem; }
.article-share h3 svg { color: var(--gold); }
.article-back { margin-top: 1.2rem; }
.related-article { display: block; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.related-article > span { font-size: .55rem; color: var(--gold); }
.related-article p { font-size: .75rem; color: var(--ink-2); line-height: 1.7; }
.related-article:hover p { color: var(--green-700); }
@media (max-width: 900px) { .articles-page-grid { grid-template-columns: 1fr 1fr; } .article-detail-layout { grid-template-columns: 1fr; } .detail-aside { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .articles-page-grid { grid-template-columns: 1fr; } .detail-aside { grid-template-columns: 1fr; } .article-featured { min-height: 300px; } }

/* ---------- Auth / account / favorites ---------- */
.auth-page { min-height: calc(100vh - var(--header-h)); position: relative; overflow: hidden; padding: clamp(2rem, 5vw, 4.5rem) 0; background: radial-gradient(900px 500px at 12% 20%, rgba(178,142,79,.08), transparent 60%), var(--bg); }
.auth-pattern { position: absolute; inset: 0; background: url("../pattern.svg") 0 0/220px; opacity: .025; pointer-events: none; }
.auth-layout { position: relative; display: grid; grid-template-columns: 1fr 430px; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.auth-aside { max-width: 520px; }
.auth-verse { font-family: var(--font-quran); font-size: clamp(1.5rem, 2.5vw, 2rem); color: var(--green-700); display: block; margin-bottom: 1rem; }
[data-theme="dark"] .auth-verse { color: var(--gold-2); }
.auth-aside h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.5; margin-bottom: .8rem; }
.auth-aside > p { color: var(--muted); font-size: .85rem; line-height: 2; margin-bottom: 1.2rem; }
.auth-aside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.auth-aside li { position: relative; padding-inline-start: 1.4rem; font-size: .78rem; color: var(--ink-2); }
.auth-aside li::before { content: "✓"; position: absolute; right: 0; color: var(--gold); font-weight: 800; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.3rem, 3vw, 2rem); box-shadow: var(--shadow); }
.auth-card-head { text-align: center; margin-bottom: 1.3rem; }
.auth-logo { display: inline-flex; flex-direction: column; align-items: center; gap: .25rem; margin-bottom: .8rem; }
.auth-logo .logo-mark { width: 54px; height: 54px; border-radius: 16px; }
.auth-logo .logo-mark svg { width: 43px; height: 43px; }
.auth-logo > span:last-child { font-family: var(--font-display); font-size: 1.1rem; color: var(--green-800); }
[data-theme="dark"] .auth-logo > span:last-child { color: var(--gold-2); }
.auth-card-head h1 { font-size: 1.5rem; }
.auth-card-head p { color: var(--muted); font-size: .72rem; line-height: 1.8; margin-top: .25rem; }
.auth-form { display: grid; gap: .7rem; }
.auth-form label { display: flex; flex-direction: column; gap: .28rem; }
.auth-form label > span:first-child { font-size: .68rem; font-weight: 600; color: var(--ink-2); }
.auth-form input { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: .62rem .75rem; font-size: .8rem; outline: none; transition: border-color var(--transition), box-shadow var(--transition); }
.auth-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(178,142,79,.1); }
.password-field { position: relative; display: block; }
.password-field input { padding-left: 2.3rem; }
.password-field button { position: absolute; left: .45rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); width: 30px; height: 30px; display: grid; place-items: center; }
.auth-error { display: flex; align-items: center; gap: .35rem; background: rgba(168,77,77,.08); border: 1px solid rgba(168,77,77,.2); color: #a84d4d; border-radius: 9px; padding: .5rem .65rem; font-size: .68rem; }
.auth-switch { text-align: center; font-size: .7rem; color: var(--muted); margin-top: .9rem; }
.auth-switch a { color: var(--gold); font-weight: 700; }
.auth-demo { text-align: center; font-size: .6rem; color: var(--muted); margin-top: .8rem; background: var(--surface-2); border-radius: 8px; padding: .4rem; }
.auth-demo code { color: var(--gold); font-family: monospace; direction: ltr; }
.auth-guest { text-align: center; margin-top: .8rem; }
.auth-guest a { font-size: .66rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.account-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.3rem; align-items: start; }
.account-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem; position: sticky; top: calc(var(--header-h) + 1rem); }
.account-profile { text-align: center; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.account-avatar { width: 74px; height: 74px; border-radius: 50%; margin: 0 auto .55rem; display: grid; place-items: center; background: var(--green-800); color: var(--gold-2); font-size: 1.8rem; font-weight: 800; border: 3px solid var(--gold-soft); }
.account-profile h2 { font-size: 1.1rem; }
.account-profile p { font-size: .62rem; color: var(--muted); margin-bottom: .45rem; }
.role-badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .6rem; color: var(--gold); border: 1px solid rgba(178,142,79,.25); border-radius: 999px; padding: .12rem .5rem; }
.account-nav { display: grid; gap: .15rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.account-nav a { display: flex; align-items: center; gap: .45rem; padding: .52rem .55rem; border-radius: 9px; font-size: .72rem; color: var(--ink-2); }
.account-nav a:hover, .account-nav a.active { background: var(--green-soft); color: var(--green-700); }
.account-nav b { margin-inline-start: auto; font-size: .58rem; background: var(--surface); border-radius: 999px; padding: 0 .35rem; color: var(--gold); }
.account-side-foot { padding-top: .8rem; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.account-side-foot > span { font-size: .57rem; color: var(--muted); }
.account-main { min-width: 0; }
.account-hero { display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1rem; flex-wrap: wrap; }
.account-hero > svg { color: var(--gold); }
.account-hero > div { flex: 1; }
.account-hero h1 { font-size: 1.15rem; }
.account-hero p { color: var(--muted); font-size: .68rem; }
.account-section-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.account-section-head h2 { display: flex; align-items: center; gap: .35rem; font-size: 1.05rem; }
.account-section-head h2 svg { color: var(--gold); }
.account-section-head h2 span { font-size: .6rem; color: var(--gold); background: var(--gold-soft); border-radius: 999px; padding: 0 .4rem; }
.favorites-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.favorite-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; transition: all var(--transition); }
.favorite-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.favorite-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.favorite-type { font-size: .57rem; color: var(--gold); background: var(--gold-soft); border-radius: 999px; padding: .08rem .45rem; }
.favorite-card h3 { font-family: var(--font-quran); font-size: 1rem; line-height: 1.8; margin-bottom: .2rem; }
.favorite-card p { color: var(--muted); font-size: .67rem; line-height: 1.8; }
.favorite-card .text-link { margin-top: .5rem; font-size: .65rem; }
.favorites-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.favorites-storage { color: var(--muted); font-size: .62rem; }
.pill-tab b { color: var(--gold); font-size: .55rem; margin-inline-start: .2rem; }
.pill-tab.active b { color: var(--gold-2); }
.favorites-guest-note { display: flex; align-items: center; gap: .5rem; background: var(--gold-soft); border: 1px solid rgba(178,142,79,.18); border-radius: 12px; padding: .6rem .8rem; margin-bottom: 1rem; font-size: .68rem; color: var(--ink-2); }
.favorites-guest-note svg { color: var(--gold); }
.favorites-guest-note p { flex: 1; }
.favorites-loading { display: flex; justify-content: center; align-items: center; gap: .5rem; color: var(--muted); padding: 3rem; font-size: .8rem; }
.empty-actions { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { max-width: 100%; }
  .auth-card { max-width: 500px; width: 100%; margin-inline: auto; }
  .account-layout { grid-template-columns: 1fr; }
  .account-side { position: static; }
  .account-profile { display: flex; align-items: center; text-align: right; gap: .7rem; flex-wrap: wrap; }
  .account-avatar { margin: 0; width: 54px; height: 54px; font-size: 1.3rem; }
  .account-profile h2 { flex-basis: 100%; margin-top: .2rem; }
  .account-nav { display: flex; overflow-x: auto; gap: .2rem; }
  .account-nav a { white-space: nowrap; }
  .account-side-foot { flex-direction: row; justify-content: space-between; align-items: center; width: 100%; }
}
@media (max-width: 620px) {
  .favorites-grid { grid-template-columns: 1fr; }
  .favorites-toolbar { align-items: flex-start; }
  .favorites-guest-note { flex-wrap: wrap; }
  .favorites-guest-note p { flex-basis: 100%; order: 3; }
  .favorites-guest-note .btn { margin-inline-start: auto; }
}

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-root { min-height: 100vh; background: #f2f5f1; color: #1b2a23; }
.admin-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar { background: #08251c; color: rgba(247,241,227,.7); padding: 1.1rem 1rem 1rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; border-left: 1px solid rgba(212,182,125,.12); }
.admin-brand { display: flex; align-items: center; gap: .6rem; padding: .2rem .35rem 1rem; border-bottom: 1px solid rgba(247,241,227,.09); }
.admin-brand-mark { width: 40px; height: 40px; border-radius: 12px; background: rgba(212,182,125,.08); display: grid; place-items: center; }
.admin-brand-mark .logo-mark { width: 36px; height: 36px; background: transparent; box-shadow: none; }
.admin-brand-mark .logo-mark svg { width: 32px; height: 32px; }
.admin-brand > div { display: flex; flex-direction: column; line-height: 1.25; }
.admin-brand strong { font-family: var(--font-display); color: var(--gold-2); font-size: 1.1rem; }
.admin-brand small { font-size: .55rem; letter-spacing: .12em; color: rgba(247,241,227,.4); }
.admin-close { display: none; margin-inline-start: auto; background: none; border: 0; color: rgba(247,241,227,.6); }
.admin-nav { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 0; overflow-y: auto; flex: 1; }
.admin-nav-label { color: rgba(247,241,227,.3); font-size: .55rem; letter-spacing: .1em; padding: .7rem .6rem .3rem; }
.admin-nav a { display: flex; align-items: center; gap: .55rem; padding: .58rem .65rem; border-radius: 9px; font-size: .72rem; color: rgba(247,241,227,.65); transition: all var(--transition); }
.admin-nav a:hover { background: rgba(247,241,227,.05); color: var(--gold-2); }
.admin-nav a.active { background: rgba(212,182,125,.12); color: var(--gold-2); font-weight: 700; box-shadow: inset 3px 0 0 var(--gold); }
.admin-sidebar-foot { border-top: 1px solid rgba(247,241,227,.09); padding-top: .8rem; display: flex; flex-direction: column; gap: .5rem; }
.admin-user-mini { display: flex; align-items: center; gap: .5rem; }
.admin-user-mini > span { width: 33px; height: 33px; border-radius: 50%; background: rgba(212,182,125,.15); color: var(--gold-2); display: grid; place-items: center; font-weight: 700; font-size: .75rem; }
.admin-user-mini div { display: flex; flex-direction: column; line-height: 1.3; }
.admin-user-mini strong { font-size: .66rem; color: #f7f1e3; }
.admin-user-mini small { display: inline-flex; align-items: center; gap: .15rem; font-size: .52rem; color: rgba(247,241,227,.4); }
.admin-logout { display: flex; align-items: center; gap: .35rem; border: 1px solid rgba(247,241,227,.12); background: transparent; color: rgba(247,241,227,.5); border-radius: 8px; padding: .38rem .5rem; font-size: .62rem; }
.admin-logout:hover { color: #f2b3b3; border-color: rgba(242,179,179,.3); }
.admin-main { padding: 1.6rem clamp(1rem, 3vw, 2.2rem) 3rem; min-width: 0; }
.admin-mobile-bar { display: none; }
.admin-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.admin-breadcrumb { font-size: .6rem; color: #8a988f; }
.admin-page-head h1 { font-size: 1.65rem; color: #13251c; letter-spacing: -.02em; margin: .1rem 0 .2rem; }
.admin-page-head p { font-size: .7rem; color: #718078; }
.admin-page-head .btn-primary { background: #0d3a2c; }
.admin-notice { display: flex; align-items: center; gap: .35rem; background: #e4f1e8; border: 1px solid #c5e0d0; color: #2a6e4c; font-size: .7rem; border-radius: 9px; padding: .5rem .7rem; margin-bottom: .8rem; }
.admin-error { display: flex; align-items: center; gap: .35rem; background: #fbeceb; border: 1px solid #f0cfcc; color: #9b4141; font-size: .7rem; border-radius: 9px; padding: .5rem .7rem; margin-bottom: .8rem; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .65rem; margin-bottom: 1rem; }
.admin-stat-card { background: #fff; border: 1px solid #e3e8e1; border-radius: 13px; padding: .9rem; display: flex; align-items: center; gap: .7rem; box-shadow: 0 2px 8px rgba(18,40,29,.03); }
.stat-icon { width: 43px; height: 43px; flex: none; display: grid; place-items: center; border-radius: 11px; }
.admin-stat-card.green .stat-icon { background: #e2efe7; color: #1d6a4e; }
.admin-stat-card.gold .stat-icon { background: #f6eedb; color: #a9864a; }
.admin-stat-card.blue .stat-icon { background: #e2edf2; color: #35718a; }
.admin-stat-card.purple .stat-icon { background: #ebe6f3; color: #6e558e; }
.admin-stat-card > div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.admin-stat-card > div > span { color: #738178; font-size: .6rem; }
.admin-stat-card strong { font-size: 1.35rem; color: #15271e; font-weight: 800; }
.admin-stat-card small { color: #95a39a; font-size: .54rem; }
.admin-dashboard-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: .7rem; margin-bottom: .7rem; }
.admin-dashboard-grid.three { grid-template-columns: repeat(3, 1fr); }
.admin-panel { background: #fff; border: 1px solid #e3e8e1; border-radius: 13px; padding: 1rem 1.1rem; min-width: 0; }
.admin-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; margin-bottom: .7rem; }
.admin-panel-head h2 { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: #22362b; }
.admin-panel-head h2 svg { color: #a9864a; }
.admin-panel-head p { font-size: .58rem; color: #8a988f; margin-top: .1rem; }
.admin-pill { font-size: .52rem; color: #2a6e4c; background: #e4f1e8; border-radius: 999px; padding: .05rem .45rem; }
.admin-link { display: inline-flex; align-items: center; gap: .2rem; color: #a9864a; font-size: .6rem; }
.admin-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: .4rem; height: 170px; padding-top: .8rem; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .25rem; }
.chart-value { font-size: .5rem; color: #8a988f; height: 14px; }
.chart-track { width: min(34px, 70%); height: calc(100% - 35px); background: #f0f4ef; border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.chart-track span { display: block; width: 100%; background: linear-gradient(180deg, #2a8461, #164a37); border-radius: 5px; transition: height .6s ease; }
.chart-col small { font-size: .52rem; color: #8a988f; }
.admin-mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; margin-bottom: .8rem; }
.admin-mini-stats > div { display: flex; align-items: center; gap: .4rem; background: #f6f8f4; border-radius: 9px; padding: .5rem; }
.admin-mini-stats svg { color: #a9864a; }
.admin-mini-stats span { display: flex; flex-direction: column; line-height: 1.3; }
.admin-mini-stats strong { font-size: .8rem; }
.admin-mini-stats small { font-size: .48rem; color: #8a988f; }
.admin-subhead { font-size: .65rem; color: #718078; margin: .7rem 0 .3rem; }
.admin-people { display: grid; gap: .1rem; }
.admin-person { display: flex; align-items: center; gap: .45rem; padding: .3rem 0; border-bottom: 1px solid #f0f3ef; }
.admin-person-avatar { width: 27px; height: 27px; border-radius: 50%; background: #e2efe7; color: #1d6a4e; display: grid; place-items: center; font-size: .62rem; font-weight: 700; flex: none; }
.admin-person div { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.admin-person strong { font-size: .62rem; }
.admin-person small { font-size: .5rem; color: #8a988f; overflow: hidden; text-overflow: ellipsis; }
.admin-role { font-size: .5rem; border-radius: 999px; padding: .05rem .4rem; background: #eef2ed; color: #718078; }
.admin-role.admin { background: #f6eedb; color: #a9864a; }
.admin-top-list { display: grid; gap: .1rem; }
.admin-top-list a, .admin-top-list > div { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid #f0f3ef; font-size: .62rem; color: #3a4c42; }
.admin-top-list a:hover { color: #a9864a; }
.admin-top-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-top-list b { font-size: .55rem; color: #a9864a; background: #f8f2e5; border-radius: 999px; padding: .02rem .35rem; flex: none; }
.admin-empty { text-align: center; color: #8a988f; font-size: .66rem; padding: 1rem; }
.admin-quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: .7rem; }
.admin-quick-actions a { display: flex; align-items: center; gap: .55rem; background: #fff; border: 1px solid #e3e8e1; border-radius: 11px; padding: .7rem .8rem; color: #22362b; transition: all var(--transition); }
.admin-quick-actions a:hover { border-color: #c9b07d; box-shadow: 0 7px 18px -12px rgba(18,40,29,.25); }
.admin-quick-actions svg { color: #a9864a; }
.admin-quick-actions span { display: flex; flex-direction: column; line-height: 1.35; }
.admin-quick-actions strong { font-size: .66rem; }
.admin-quick-actions small { font-size: .52rem; color: #8a988f; }

/* Admin table */
.admin-table-card { background: #fff; border: 1px solid #e3e8e1; border-radius: 13px; overflow: hidden; }
.admin-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem .9rem; border-bottom: 1px solid #edf1ec; flex-wrap: wrap; }
.admin-table-toolbar > span { font-size: .6rem; color: #8a988f; }
.admin-search { display: flex; align-items: center; gap: .35rem; border: 1px solid #e0e6df; border-radius: 8px; padding: .38rem .55rem; color: #8a988f; min-width: 230px; }
.admin-search input { border: 0; outline: none; background: transparent; font-size: .66rem; color: #1b2a23; flex: 1; }
.admin-table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th { text-align: right; font-size: .56rem; color: #8a988f; font-weight: 600; padding: .55rem .7rem; background: #f8faf7; border-bottom: 1px solid #edf1ec; white-space: nowrap; }
.admin-table td { padding: .55rem .7rem; font-size: .62rem; color: #3a4c42; border-bottom: 1px solid #f0f3ef; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #fafcf9; }
.admin-cell-text { display: inline-block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.admin-muted { color: #8a988f; font-size: .55rem; }
.admin-status { display: inline-flex; border-radius: 999px; padding: .05rem .45rem; font-size: .5rem; font-weight: 600; }
.admin-status.on { background: #e4f1e8; color: #2a6e4c; }
.admin-status.off { background: #f3f1ee; color: #8a7d6b; }
.admin-row-actions { display: flex; gap: .25rem; }
.admin-action { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #e3e8e1; background: #fff; border-radius: 7px; color: #718078; }
.admin-action:hover { border-color: #c9b07d; color: #a9864a; }
.admin-action.delete:hover { border-color: #e6b7b3; color: #a84d4d; background: #fdf4f3; }

/* Admin forms */
.admin-modal { width: min(780px, 100%); padding: 1.4rem; }
.admin-modal-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.admin-modal-head > span { width: 40px; height: 40px; border-radius: 11px; background: #f6eedb; color: #a9864a; display: grid; place-items: center; }
.admin-modal-head h2 { font-size: 1.1rem; color: #15271e; }
.admin-modal-head p { font-size: .6rem; color: #8a988f; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.admin-field { display: flex; flex-direction: column; gap: .2rem; }
.admin-field.full { grid-column: 1 / -1; }
.admin-field > span { font-size: .6rem; color: #5e6f64; font-weight: 600; display: flex; align-items: center; gap: .2rem; }
.admin-field > span b { color: #a84d4d; }
.admin-field input, .admin-field textarea, .admin-field select { border: 1px solid #dde4dc; background: #fbfcfa; border-radius: 8px; padding: .48rem .6rem; font-size: .68rem; color: #1b2a23; outline: none; width: 100%; transition: border-color var(--transition); }
.admin-field input:focus, .admin-field textarea:focus, .admin-field select:focus { border-color: #b29a65; box-shadow: 0 0 0 3px rgba(178,154,101,.12); }
.admin-field textarea { resize: vertical; line-height: 1.7; min-height: 90px; }
.admin-field small { font-size: .52rem; color: #8a988f; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-left: 1.8rem; }
.select-wrap svg { position: absolute; left: .5rem; top: 50%; transform: translateY(-50%); color: #8a988f; pointer-events: none; }
.admin-switch { display: inline-flex; align-items: center; gap: .35rem; border: 0; background: transparent; font-size: .62rem; color: #8a988f; padding: .3rem 0; }
.admin-switch > span { width: 34px; height: 19px; border-radius: 999px; background: #d9e0d8; position: relative; transition: background .2s; }
.admin-switch > span::after { content: ""; position: absolute; top: 2px; right: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.admin-switch.on > span { background: #2a8461; }
.admin-switch.on > span::after { transform: translateX(-15px); }
.admin-form-actions { display: flex; gap: .4rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid #edf1ec; }
.admin-modal .auth-error { margin-top: .2rem; }
.admin-loading { display: flex; align-items: center; gap: .4rem; color: #8a988f; font-size: .65rem; }

/* Daily */
.daily-admin-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: .8rem; align-items: start; }
.daily-form { padding: 1.1rem; }
.daily-form h2 { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: #22362b; margin-bottom: .8rem; }
.daily-form h2 svg { color: #a9864a; }
.daily-preview { display: grid; gap: .6rem; }
.daily-preview-card { background: #fff; border: 1px solid #e3e8e1; border-radius: 13px; padding: 1rem; }
.daily-preview-card.verse { background: linear-gradient(150deg, #0a2f23, #0d3c2c); border-color: transparent; color: #f7f1e3; }
.daily-preview-card.verse .eyebrow { color: var(--gold-2); }
.daily-preview-text { font-family: var(--font-quran); font-size: 1.35rem; line-height: 2.15; margin: .4rem 0; }
.daily-preview-ref { font-size: .58rem; color: #8a988f; }
.daily-preview-card.verse .daily-preview-ref { color: rgba(247,241,227,.5); }
.daily-preview-hadith { font-family: var(--font-quran); font-size: .92rem; line-height: 1.95; color: #3a4c42; margin: .4rem 0; }
.daily-tip { display: flex; gap: .4rem; background: #f6eedb; border: 1px solid #ebdfc4; border-radius: 9px; padding: .55rem .7rem; color: #7c663d; font-size: .58rem; line-height: 1.7; }
.daily-tip svg { color: #a9864a; margin-top: .1rem; }

/* Admin login */
.admin-login-page { min-height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: radial-gradient(900px 500px at 20% 10%, rgba(42,132,97,.2), transparent 60%), linear-gradient(140deg, #061f17, #0a2e22 55%, #0d3a2b); overflow: hidden; }
.admin-login-pattern { position: absolute; inset: 0; background: url("../pattern.svg") 0 0/180px; opacity: .06; }
.admin-login-wrap { position: relative; width: min(420px, 100%); }
.admin-login-brand { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-bottom: 1rem; color: var(--gold-2); font-family: var(--font-display); font-size: 1.3rem; }
.admin-login-brand .logo-mark { width: 42px; height: 42px; background: rgba(212,182,125,.08); }
.admin-login-brand .logo-mark svg { width: 36px; height: 36px; }
.admin-login-card { background: #fffdf8; border: 1px solid rgba(212,182,125,.25); border-radius: 20px; padding: 1.5rem; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.admin-login-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.admin-lock { width: 43px; height: 43px; flex: none; border-radius: 12px; background: #f6eedb; color: #a9864a; display: grid; place-items: center; }
.admin-login-head h1 { font-size: 1.15rem; color: #15271e; }
.admin-login-head p { font-size: .6rem; color: #8a988f; }
.admin-login-form { display: grid; gap: .6rem; }
.admin-login-form label { display: flex; flex-direction: column; gap: .2rem; }
.admin-login-form label > span { font-size: .6rem; color: #5e6f64; font-weight: 600; }
.admin-login-form input { border: 1px solid #dde4dc; background: #fbfcfa; border-radius: 8px; padding: .55rem .65rem; font-size: .72rem; outline: none; }
.admin-login-form input:focus { border-color: #b29a65; box-shadow: 0 0 0 3px rgba(178,154,101,.12); }
.admin-login-note { font-size: .52rem; color: #9aa79e; text-align: center; line-height: 1.7; }
.admin-login-footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border-top: 1px solid #edf1ec; padding-top: .7rem; margin-top: 1rem; font-size: .55rem; color: #8a988f; }
.admin-login-footer a, .admin-login-footer span { display: inline-flex; align-items: center; gap: .2rem; }
.admin-login-footer a:hover { color: #a9864a; }

@media (max-width: 1100px) {
  .admin-stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-dashboard-grid.three { grid-template-columns: 1fr; }
  .admin-quick-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; inset-block: 0; right: 0; width: 270px; z-index: 400; transform: translateX(100%); transition: transform .25s ease; box-shadow: -20px 0 50px rgba(0,0,0,.3); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-close { display: inline-flex; }
  .admin-backdrop { position: fixed; inset: 0; background: rgba(4,20,14,.5); z-index: 350; }
  .admin-mobile-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem 0 1rem; }
  .admin-mobile-bar > span { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-display); color: #0a2d22; }
  .admin-mobile-bar .logo-mark { width: 30px; height: 30px; border-radius: 9px; }
  .admin-mobile-bar .logo-mark svg { width: 25px; height: 25px; }
  .admin-user-dot { width: 31px; height: 31px; border-radius: 50%; background: #0a2d22; color: var(--gold-2); display: grid; place-items: center; font-size: .65rem; }
  .admin-main { padding-top: .8rem; }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
  .daily-admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .admin-stats-grid { grid-template-columns: 1fr 1fr; gap: .45rem; }
  .admin-stat-card { padding: .65rem; gap: .45rem; }
  .stat-icon { width: 36px; height: 36px; border-radius: 9px; }
  .admin-stat-card strong { font-size: 1.1rem; }
  .admin-quick-actions { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-page-head { align-items: flex-start; }
  .admin-page-head .btn { width: 100%; }
  .admin-table-scroll { overflow: visible; }
  .admin-table { min-width: 0; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { border-bottom: 1px solid #edf1ec; padding: .5rem .2rem; }
  .admin-table td { display: flex; justify-content: space-between; align-items: center; gap: .8rem; border: 0; padding: .3rem .5rem; }
  .admin-table td::before { content: attr(data-label); font-size: .52rem; color: #8a988f; }
  .admin-cell-text { max-width: 190px; }
  .admin-mini-stats { grid-template-columns: 1fr; }
  .admin-quick-actions a { padding: .6rem; }
}

/* ---------- About / privacy / offline ---------- */
.about-mission { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.about-mission h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .6rem; }
.about-mission p { color: var(--muted); font-size: .82rem; line-height: 2; margin-bottom: .6rem; max-width: 650px; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.about-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: .9rem; display: flex; flex-direction: column; }
.about-stats strong { font-size: 1.55rem; color: var(--gold); }
.about-stats span { font-size: .62rem; color: var(--muted); }
.about-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: .65rem; margin: 1.5rem 0 2rem; }
.about-features > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.05rem; }
.about-features > div > span { width: 40px; height: 40px; border-radius: 11px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; margin-bottom: .55rem; }
.about-features h3 { font-size: .82rem; margin-bottom: .2rem; }
.about-features p { font-size: .66rem; color: var(--muted); line-height: 1.9; }
.about-section { margin-top: 2.2rem; }
.about-section-head { margin-bottom: 1rem; }
.about-section-head h2 { font-size: 1.5rem; margin-bottom: .3rem; }
.about-section-head > p { color: var(--muted); font-size: .75rem; line-height: 1.9; max-width: 760px; }
.sources-list { display: grid; gap: .45rem; }
.source-item { display: flex; align-items: flex-start; gap: .65rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; }
.source-item > svg { color: var(--gold); margin-top: .15rem; }
.source-item > div { flex: 1; }
.source-item h3 { font-size: .76rem; margin-bottom: .1rem; }
.source-item p { font-size: .65rem; color: var(--muted); line-height: 1.8; }
.source-item a { color: var(--gold); }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.method-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; position: relative; }
.method-grid b { position: absolute; top: .8rem; left: .9rem; font-size: 1.6rem; color: var(--gold); opacity: .25; }
.method-grid h3 { font-size: .82rem; margin-bottom: .25rem; }
.method-grid p { font-size: .68rem; color: var(--muted); line-height: 1.9; }
.about-warning { display: flex; align-items: center; gap: .7rem; background: var(--gold-soft); border: 1px solid rgba(178,142,79,.18); border-radius: 12px; padding: .8rem 1rem; margin-top: .8rem; }
.about-warning svg { color: var(--gold); flex: none; }
.about-warning p { flex: 1; font-size: .68rem; color: var(--ink-2); }
.api-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.api-list code { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: .35rem .6rem; font-family: ui-monospace, monospace; font-size: .62rem; color: var(--green-700); direction: ltr; }
[data-theme="dark"] .api-list code { color: var(--gold-2); }
.about-cta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--green-900); color: #f7f1e3; border-radius: var(--radius-lg); padding: 1.4rem 1.6rem; margin-top: 2.2rem; flex-wrap: wrap; }
.about-cta h2 { font-size: 1.2rem; color: #fbf6e9; }
.about-cta p { font-size: .7rem; color: rgba(247,241,227,.55); }
.about-cta-links { display: flex; gap: .4rem; flex-wrap: wrap; }
.privacy-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.privacy-content { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.2rem, 3vw, 2rem); }
.privacy-intro { display: flex; gap: .6rem; background: var(--green-soft); border-radius: 12px; padding: .8rem; margin-bottom: 1rem; }
.privacy-intro svg { color: var(--green-700); flex: none; }
[data-theme="dark"] .privacy-intro svg { color: var(--gold-2); }
.privacy-intro p { font-size: .75rem; color: var(--ink-2); line-height: 1.9; }
.privacy-content h2 { display: flex; align-items: center; gap: .4rem; font-size: 1rem; margin: 1.3rem 0 .35rem; }
.privacy-content h2 svg { color: var(--gold); }
.privacy-content p { font-size: .78rem; color: var(--muted); line-height: 2; }
.privacy-content a { color: var(--gold); }
.privacy-updated { margin-top: 1.2rem; font-size: .6rem !important; }
.privacy-side { display: grid; gap: .8rem; position: sticky; top: calc(var(--header-h) + 1rem); }
.offline-page { min-height: 55vh; display: flex; align-items: center; }
.offline-card { text-align: center; max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 3rem 1.5rem; box-shadow: var(--shadow-sm); }
.offline-icon { width: 70px; height: 70px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; margin: 0 auto 1rem; }
.offline-card h1 { font-size: 1.5rem; }
.offline-card p { color: var(--muted); font-size: .78rem; line-height: 1.9; margin: .5rem auto 1.2rem; max-width: 400px; }
.offline-actions { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; }
@media (max-width: 900px) { .about-mission { grid-template-columns: 1fr; } .about-features { grid-template-columns: 1fr 1fr; } .privacy-layout { grid-template-columns: 1fr; } .privacy-side { position: static; grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .about-features { grid-template-columns: 1fr; } .method-grid { grid-template-columns: 1fr; } .about-warning { flex-wrap: wrap; } .about-warning p { flex-basis: 100%; order: 3; } .about-cta { flex-direction: column; align-items: flex-start; } .privacy-side { grid-template-columns: 1fr; } .about-stats { grid-template-columns: 1fr 1fr; } }

/* ---------- Errors / loading ---------- */
.notfound-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; padding: 2rem 1rem; background: radial-gradient(700px 450px at 50% 0%, rgba(178,142,79,.12), transparent 65%), var(--bg); }
.notfound-pattern { position: absolute; inset: 0; background: url("../pattern.svg") 0 0/190px; opacity: .04; }
.notfound-inner { position: relative; text-align: center; max-width: 600px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: clamp(2rem, 5vw, 3rem); box-shadow: var(--shadow); }
.notfound-inner .brand { justify-content: center; margin-bottom: 1rem; }
.notfound-code { font-family: var(--font-display); font-size: 4rem; color: var(--gold); display: block; line-height: 1; }
.notfound-icon { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold); margin: 0 auto 1rem; }
.notfound-inner h1 { font-size: 1.7rem; margin: .6rem 0 .4rem; }
.notfound-inner > p { color: var(--muted); font-size: .8rem; line-height: 1.95; max-width: 420px; margin: 0 auto 1.2rem; }
.notfound-actions { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; }
.loading-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.loading-skeleton { background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: 13px; border: 1px solid var(--line); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (max-width: 700px) { .loading-grid { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   أُنس — طبقة التحسين v2: شريط تنقل سفلي، صقل الموبايل، وتفاصيل الحركة
   ========================================================================== */

/* ---------- Bottom tab bar (mobile only) ---------- */
.mobile-tabbar { display: none; }

@media (max-width: 900px) {
  .mobile-tabbar {
    position: fixed; z-index: 200; bottom: 0; inset-inline: 0;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: .1rem;
    padding: .4rem .45rem calc(.4rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    border-top: 1px solid var(--line);
    box-shadow: 0 -16px 40px -28px rgba(6,31,23,.7);
  }
  .tabbar-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
    min-height: 50px; border-radius: 14px; color: var(--muted);
    font-size: .6rem; font-weight: 700; letter-spacing: 0;
    transition: color var(--transition), background var(--transition), transform var(--transition);
  }
  .tabbar-item svg { width: 21px; height: 21px; }
  .tabbar-item:active { transform: scale(.94); }
  .tabbar-item.active { color: var(--green-800); background: var(--gold-soft); }
  [data-theme="dark"] .tabbar-item.active { color: var(--gold-2); background: rgba(212,182,125,.14); }

  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

  /* المشغّل الصوتي يأخذ مكان الشريط أثناء التشغيل بدل أن يتداخلا */
  body:has(.audio-player) .mobile-tabbar { display: none; }
  body:has(.audio-player) { padding-bottom: 0; }
}

/* ---------- Mobile polish ---------- */
@media (max-width: 760px) {
  .site-header { box-shadow: 0 10px 24px -26px rgba(6,31,23,.9); }
  .header-inner { gap: .4rem; }
  .header-actions { gap: 0; }
  .icon-btn { width: 42px; height: 42px; }
  .hero { padding-top: 38px; }
  .hero-badge { margin-bottom: 1.1rem; }
  .hero-lead { font-size: .92rem; line-height: 1.9; margin-bottom: 1.4rem; }
  .hero .search-form { padding-block: .3rem; }
  .hero-trust { gap: .55rem .95rem; font-size: .7rem; }
  .verse-card { padding: 1.3rem 1.2rem 1.15rem; }
  .section-head { gap: .5rem; margin-bottom: 1.4rem; }
  .section-head h2 { font-size: clamp(1.45rem, 6vw, 1.75rem); }
  .category-card { min-height: 138px; }
  .category-card:hover { transform: none; }
  .btn { padding: .72rem 1.15rem; }
  .page-hero { padding: 1.8rem 0 2.2rem; }

  .drawer-nav a { min-height: 52px; display: flex; align-items: center; border-radius: 14px; }
  .mobile-drawer { padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); }
  .drawer-footer .btn { min-height: 48px; }
  .install-banner { flex-wrap: wrap; }
  .install-banner .btn { width: 100%; }
}

/* ---------- Micro polish ---------- */
.section-head { flex-wrap: wrap; }
.section-head > div { min-width: 0; }
.section-head h2 { max-width: 100%; overflow-wrap: break-word; }
.page-hero h1 { overflow-wrap: break-word; }
.section-head h2, .hero-lead, .article-preview-card h3, .dua-preview-card h3 { text-wrap: balance; }
.article-body p, .tafsir-panel p { text-wrap: pretty; }

:where(a, button, input, select, textarea):focus-visible { outline-offset: 3px; }

@media (hover: none) {
  .category-card:hover, .article-preview-card:hover, .dua-preview-card:hover { transform: none; }
}

/* ==========================================================================
   أُنس — الشاشة الافتتاحية (Splash)
   ========================================================================== */
.splash {
  position: fixed; inset: 0; z-index: 900;
  display: grid; place-items: center;
  color: #f7f1e3; overflow: hidden;
  /* زجاج مصنفر: الموقع يظهر خلفه مموّهًا ثم يتّضح مع انصراف الشاشة */
  background:
    radial-gradient(900px 520px at 78% 6%, rgba(212,182,125,.18), transparent 62%),
    radial-gradient(700px 480px at 6% 94%, rgba(40,130,96,.26), transparent 66%),
    linear-gradient(152deg, rgba(6,31,22,.72) 0%, rgba(9,45,34,.66) 54%, rgba(12,58,43,.7) 100%);
  backdrop-filter: blur(16px) saturate(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
  transition: opacity .5s ease, visibility .5s ease, backdrop-filter .5s ease, -webkit-backdrop-filter .5s ease;
  animation: splashAutoHide .5s ease 2.9s forwards;
}
.splash::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("../pattern.svg") center/230px; opacity: .05;
}
.splash::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(closest-side at 50% 46%, transparent 38%, rgba(2,14,10,.55) 100%);
}
.splash.is-leaving {
  opacity: 0; visibility: hidden;
  backdrop-filter: blur(0px) saturate(1);
  -webkit-backdrop-filter: blur(0px) saturate(1);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .splash {
    background:
      radial-gradient(900px 520px at 78% 6%, rgba(212,182,125,.16), transparent 62%),
      radial-gradient(700px 480px at 6% 94%, rgba(40,130,96,.24), transparent 66%),
      linear-gradient(152deg, #072419 0%, #0a3125 54%, #0d3f2e 100%);
  }
}

.splash-inner {
  position: relative; z-index: 1; isolation: isolate; display: grid; justify-items: center;
  gap: .55rem; text-align: center; padding: 1rem;
}
/* هالة خفيفة خلف الشعار والاسم تحفظ وضوح النص فوق الأجزاء الفاتحة من الموقع */
.splash-inner::before {
  content: ""; position: absolute; inset: -18% -22%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(4,20,14,.62), rgba(4,20,14,.32) 55%, transparent 78%);
  filter: blur(12px);
}
.splash-inner > * { position: relative; z-index: 1; }
.splash-mark {
  width: 92px; height: 92px; display: grid; place-items: center; color: var(--gold-2);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 28%, rgba(212,182,125,.16), transparent 72%);
  box-shadow: inset 0 0 0 1px rgba(212,182,125,.3), 0 28px 70px -34px rgba(0,0,0,.95);
  margin-bottom: 1rem;
  animation: splashMark .95s cubic-bezier(.22,.8,.24,1) both;
}
.splash-mark svg { width: 54px; height: 54px; }
.splash-name {
  font-family: var(--font-quran); font-size: clamp(2.4rem, 9vw, 3.15rem); line-height: 1.45;
  color: #fbf6e9; padding-top: .35rem;
  animation: splashName .9s .1s cubic-bezier(.22,.8,.24,1) both;
}
.splash-tag {
  font-size: .76rem; font-weight: 700; color: rgba(212,182,125,.92);
  animation: splashTag .9s .24s ease both;
}
.splash-bar {
  margin-top: 1.15rem; width: 138px; height: 2px; border-radius: 2px;
  background: rgba(212,182,125,.2); overflow: hidden;
}
.splash-bar i {
  display: block; width: 42%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  animation: splashSweep 1.05s ease-in-out infinite;
}

@keyframes splashMark {
  from { opacity: 0; transform: scale(.72) rotate(-9deg); filter: blur(10px); }
  to { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0); }
}
@keyframes splashName {
  from { opacity: 0; transform: translateY(14px); filter: blur(9px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes splashTag {
  from { opacity: 0; transform: translateY(6px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes splashSweep {
  from { transform: translateX(-130%); }
  to { transform: translateX(340%); }
}
@keyframes splashAutoHide {
  to { opacity: 0; visibility: hidden; }
}

@media (min-width: 760px) {
  .splash-mark { width: 116px; height: 116px; }
  .splash-mark svg { width: 66px; height: 66px; }
  .splash-name { font-size: 3.35rem; }
  .splash-tag { font-size: .82rem; }
  .splash-bar { width: 172px; margin-top: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .splash { animation: none; }
  .splash-mark, .splash-name, .splash-tag { animation: none; }
  .splash-bar i { animation: none; width: 100%; }
}


/* ==========================================================================
   تنبيه المتصفحات الداخلية (ماسنجر/فيسبوك/انستجرام...) — التثبيت يحتاج Chrome
   ========================================================================== */
.inapp-bar {
  position: relative; z-index: 120;
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  color: #f7f1e3; border-bottom: 1px solid rgba(212,182,125,.32);
}
.inapp-bar-inner {
  width: min(var(--container), calc(100% - 24px)); margin-inline: auto;
  display: flex; align-items: center; gap: .7rem; padding: .6rem 0;
}
.inapp-icon { color: var(--gold-2); display: grid; place-items: center; flex: none; }
.inapp-bar p { flex: 1; font-size: .76rem; line-height: 1.75; color: rgba(247,241,227,.84); }
.inapp-bar p strong { color: var(--gold-2); font-weight: 800; }
.inapp-actions { display: flex; gap: .4rem; flex: none; }
.inapp-actions .btn { white-space: nowrap; }
.inapp-actions .btn-ghost {
  color: #f7f1e3; border-color: rgba(247,241,227,.32); background: rgba(247,241,227,.07);
}
.inapp-actions .btn-ghost:hover { color: var(--green-950); background: #f7f1e3; border-color: #f7f1e3; }
.inapp-close { color: rgba(247,241,227,.72); flex: none; }
.inapp-close:hover { background: rgba(247,241,227,.1); color: #fff; border-color: transparent; }

@media (max-width: 760px) {
  .inapp-bar-inner { flex-wrap: wrap; gap: .45rem; padding: .55rem 0 .7rem; }
  .inapp-bar p { flex: 1 1 100%; order: 3; font-size: .74rem; }
  .inapp-icon { order: 1; }
  .inapp-close { order: 2; margin-inline-start: auto; }
  .inapp-actions { order: 4; flex: 1 1 100%; }
  .inapp-actions .btn { flex: 1; }
}

/* عناصر تحميل مسبق مخفية لتلاوة متصلة بلا انقطاع */
.audio-preload { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -9999px; }

/* كتلة تحميل APK داخل نافذة التثبيت */
.apk-download { display: grid; gap: .45rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line-strong); }
.apk-download small { color: var(--muted); font-size: .68rem; line-height: 1.7; text-align: center; }


@media (max-width: 760px) {
  .page-hero-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .page-hero-copy { max-width: 100%; }
  .page-hero-aside { flex-wrap: wrap; width: 100%; }
  .page-hero-aside .btn, .page-hero-aside > * { max-width: 100%; }
  .azkar-hero-badges { flex-wrap: wrap; }
}

/* ==========================================================================
   صفحة معاينة الموبايل /preview
   ========================================================================== */
.preview-page { max-width: 1080px; margin: 0 auto; padding: clamp(1.2rem, 3vw, 2.4rem) 1rem 3rem; }
.preview-head { text-align: center; margin-bottom: 1.4rem; }
.preview-head h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .35rem; }
.preview-head p { color: var(--muted); font-size: .82rem; line-height: 1.8; }

.preview-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7rem .9rem; box-shadow: var(--shadow-sm); margin-bottom: 1.2rem;
}
.preview-group { display: flex; align-items: center; gap: .45rem; }
.preview-label { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; color: var(--muted); }
.preview-group select {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px;
  padding: .38rem .75rem; font-size: .76rem; color: var(--ink);
}
.preview-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-inline-start: auto; }

.preview-stage { display: grid; place-items: center; }
.preview-phone {
  position: relative; border-radius: 42px; padding: 10px;
  background: linear-gradient(160deg, #0d2a20, #04150f);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.55), inset 0 0 0 1px rgba(212,182,125,.25);
  transition: width .2s ease, height .2s ease;
}
.preview-phone::before {
  content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 82px; height: 6px; border-radius: 999px; background: rgba(0,0,0,.55); z-index: 2;
}
.preview-phone-inner {
  border-radius: 34px; overflow: hidden; background: var(--bg);
  transform-origin: top right; position: relative;
}
.preview-phone iframe { display: block; border: 0; background: var(--bg); }

.preview-note { text-align: center; color: var(--muted); font-size: .7rem; margin-top: 1rem; }

@media (max-width: 760px) {
  .preview-actions { margin-inline-start: 0; width: 100%; }
  .preview-actions .btn { flex: 1; }
}


