/* ===================== الأساس ===================== */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --paper: #F4EBD9;
  --surface: #FCF7EC;
  --surface-2: #EFE5D0;
  --ink: #1B1A17;
  --muted: #6E6555;
  --green: #12473A;
  --green-2: #1B5C49;
  --gold: #C0A062;
  --gold-soft: rgba(192, 160, 98, .34);
  --clay: #A4552F;
  --line: rgba(192, 160, 98, .5);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(27, 26, 23, .05), 0 8px 20px -18px rgba(27, 26, 23, .55);
  --quran-size: 27px;
}

[data-theme="dark"] {
  --paper: #0E1512;
  --surface: #141D19;
  --surface-2: #1A2621;
  --ink: #E8DFC9;
  --muted: #98A69B;
  --green: #1B5C49;
  --green-2: #246b54;
  --gold: #C0A062;
  --gold-soft: rgba(192, 160, 98, .26);
  --line: rgba(192, 160, 98, .32);
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 24px -20px rgba(0, 0, 0, .9);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Cairo', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }
.hidden { display: none !important; }

button, .tab, .chip, .seg-btn, .select, .switch-row { user-select: none; -webkit-user-select: none; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

input, select { font-family: inherit; font-size: 16px; }

h1, h2, h3, p, ul, li { margin: 0; padding: 0; }
ul { list-style: none; }

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

/* ===================== الرأس ===================== */
.app-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 13px;
  background-color: var(--green);
  color: #F6EFDE;
  border-bottom: 1px solid var(--gold);
  box-shadow: inset 0 -5px 0 rgba(192, 160, 98, .12);
  position: relative;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-mark {
  color: var(--gold);
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.brand-mark svg { width: 100%; height: 100%; }

.brand-text { min-width: 0; }
.brand-text h1 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: #F8F2E4;
  white-space: nowrap;
}
.brand-text p {
  font-size: 11.5px;
  font-weight: 300;
  color: var(--gold);
  line-height: 1.4;
  margin-top: 1px;
}

.header-actions { display: flex; gap: 6px; flex: 0 0 auto; }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #EFE5D0;
  border: 1px solid transparent;
  transition: background-color .16s ease, border-color .16s ease, transform .12s ease;
}
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:active { transform: scale(.94); }
.icon-btn:hover { background-color: rgba(255, 255, 255, .08); border-color: rgba(192, 160, 98, .4); }

.icon-btn--sm {
  width: 40px;
  height: 40px;
  color: var(--green);
  border: 1px solid var(--line);
  background-color: var(--surface);
  font-weight: 600;
  font-size: 13px;
  border-radius: 10px;
}
.icon-btn--sm svg { width: 18px; height: 18px; }
[data-theme="dark"] .icon-btn--sm { color: var(--gold); }
.icon-btn--sm:hover { border-color: var(--gold); background-color: var(--surface-2); }

/* ===================== المحتوى ===================== */
main {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 28px;
  max-width: 820px;
  width: 100%;
  margin-inline: auto;
  overscroll-behavior: contain;
}

.view { animation: fadeUp .22s ease-out; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ===================== البطاقات ===================== */
.card {
  position: relative;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}

.card::after {
  content: '';
  position: absolute;
  top: 7px;
  inset-inline-end: 8px;
  width: 13px;
  height: 13px;
  opacity: .32;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0A062' stroke-width='1.6'%3E%3Crect x='4.5' y='4.5' width='15' height='15'/%3E%3Crect x='4.5' y='4.5' width='15' height='15' transform='rotate(45 12 12)'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.eyebrow {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
  margin-bottom: 6px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 12px;
}
[data-theme="dark"] .card-title { color: var(--gold); }

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
  margin: 6px 0 14px;
}
[data-theme="dark"] .page-title { color: var(--gold); }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  margin: 20px 2px 10px;
}
[data-theme="dark"] .section-title { color: var(--gold); }

.star-mini {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0A062' stroke-width='2'%3E%3Crect x='4.5' y='4.5' width='15' height='15'/%3E%3Crect x='4.5' y='4.5' width='15' height='15' transform='rotate(45 12 12)'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ===================== الأزرار ===================== */
.btn {
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn:active { transform: scale(.975); }

.btn--primary {
  background-color: var(--green);
  color: #F6EFDE;
  border: 1px solid var(--green);
}
.btn--primary:hover { background-color: var(--green-2); }

.btn--ghost {
  background-color: transparent;
  color: var(--green);
  border: 1px solid var(--line);
}
[data-theme="dark"] .btn--ghost { color: var(--gold); }
.btn--ghost:hover { border-color: var(--gold); background-color: var(--surface-2); }

.btn--wide { width: 100%; }
.btn--sm { min-height: 40px; padding: 7px 13px; font-size: 13px; }
.btn .chev { width: 15px; height: 15px; }

.round-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background-color: var(--surface);
  color: var(--green);
  transition: transform .12s ease, background-color .16s ease, border-color .16s ease;
}
[data-theme="dark"] .round-btn { color: var(--gold); }
.round-btn:active { transform: scale(.93); }
.round-btn svg { width: 22px; height: 22px; }
.round-btn:hover { border-color: var(--gold); }

.round-btn--main {
  width: 64px;
  height: 64px;
  background-color: var(--green);
  border-color: var(--green);
  color: #F6EFDE;
}
.round-btn--main:hover { background-color: var(--green-2); }
.round-btn--main svg { width: 26px; height: 26px; }

/* ===================== الحقول ===================== */
.search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.search-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}
#surah-search {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background-color: var(--surface);
  color: var(--ink);
  padding: 10px 44px 10px 14px;
  font-size: 15px;
}
#surah-search::placeholder { color: var(--muted); opacity: .85; }
#surah-search::-webkit-search-cancel-button { display: none; }

.chips { display: flex; gap: 8px; margin-bottom: 14px; }
.chip {
  min-height: 38px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background-color: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.chip.is-active {
  background-color: var(--green);
  border-color: var(--green);
  color: #F6EFDE;
}

.seg {
  display: flex;
  gap: 6px;
  background-color: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 14px;
}
.seg--scroll { overflow-x: auto; scrollbar-width: none; }
.seg--scroll::-webkit-scrollbar { display: none; }
.seg-btn {
  flex: 1 0 auto;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease;
}
.seg-btn.is-active {
  background-color: var(--surface);
  color: var(--green);
  box-shadow: 0 1px 2px rgba(27, 26, 23, .08);
}
[data-theme="dark"] .seg-btn.is-active { color: var(--gold); }

.select {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background-color: var(--surface);
  color: var(--ink);
  padding: 10px 14px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C0A062' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-inline-start: 40px;
  padding-inline-end: 14px;
}
.select--sm { min-height: 40px; font-size: 13px; width: auto; padding-block: 6px; }

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gold-soft);
  font-size: 14px;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 10px;
}

/* ===================== الفهرس ===================== */
.hero-card { padding: 16px 16px 14px; }
.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hero-card .eyebrow { margin-bottom: 2px; }
.hero-star { width: 18px; height: 18px; color: var(--gold); opacity: .8; flex: 0 0 auto; }
.hero-star svg { width: 100%; height: 100%; }
.hero-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--green);
  margin: 2px 0 12px;
}
[data-theme="dark"] .hero-title { color: var(--gold); }

.surah-list { display: flex; flex-direction: column; gap: 8px; }

.surah-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: start;
  padding: 11px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--gold-soft);
  background-color: var(--surface);
  transition: border-color .16s ease, background-color .16s ease, transform .12s ease;
}
.surah-item:active { transform: scale(.99); }
.surah-item:hover { border-color: var(--gold); }
.surah-item.is-current { border-color: var(--gold); background-color: var(--surface-2); }

.surah-num {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 3px var(--surface);
  background-color: var(--surface-2);
}
[data-theme="dark"] .surah-num { color: var(--gold); }

.surah-info { flex: 1 1 auto; min-width: 0; }
.surah-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.surah-meta {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}
.surah-chev { width: 17px; height: 17px; color: var(--gold); flex: 0 0 auto; opacity: .8; }

.empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  padding: 26px 0;
}

/* ===================== القراءة ===================== */
.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.tool-group { display: flex; gap: 6px; }

.reader-head { text-align: center; margin-bottom: 10px; }
.reader-head h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
}
[data-theme="dark"] .reader-head h2 { color: var(--gold); }
.reader-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }

.basmala {
  font-family: 'Amiri Quran', 'Traditional Arabic', serif;
  font-size: 21px;
  text-align: center;
  color: var(--green);
  padding: 12px 0 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--gold-soft);
  position: relative;
}
[data-theme="dark"] .basmala { color: var(--gold); }

.quran-text {
  font-family: 'Amiri Quran', 'Traditional Arabic', serif;
  font-size: var(--quran-size);
  line-height: 2.35;
  text-align: justify;
  text-align-last: center;
  color: var(--ink);
  direction: rtl;
  padding: 14px 4px 8px;
  word-spacing: .06em;
}

.ayah-star {
  display: inline-grid;
  place-items: center;
  min-width: 1.55em;
  height: 1.55em;
  padding: 0 .2em;
  margin: 0 .18em;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--green);
  font-family: 'Cairo', sans-serif;
  font-size: .44em;
  font-weight: 700;
  vertical-align: middle;
  line-height: 1;
  background-color: var(--surface);
}
[data-theme="dark"] .ayah-star { color: var(--gold); }

.reader-status {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  padding: 22px 8px;
  line-height: 1.9;
}
.reader-status .btn { margin-top: 12px; }

.reader-nav {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 18px;
}
.reader-nav .btn { flex: 1 1 0; }

/* ===================== الأذكار ===================== */
.dhikr {
  position: relative;
  padding: 15px 15px 12px;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.dhikr:active { background-color: var(--surface-2); }
.dhikr.is-done { border-color: var(--clay); }
.dhikr.is-done::before {
  content: '✓';
  position: absolute;
  top: 8px;
  inset-inline-start: 10px;
  color: var(--clay);
  font-size: 14px;
  font-weight: 700;
}
.dhikr-note {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--clay);
  border: 1px solid rgba(164, 85, 47, .35);
  border-radius: 6px;
  padding: 1px 7px;
  margin-bottom: 8px;
}
.dhikr-text {
  font-family: 'Amiri Quran', 'Traditional Arabic', serif;
  font-size: 19px;
  line-height: 2.05;
  color: var(--ink);
  text-align: justify;
  text-align-last: start;
}
.dhikr-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--gold-soft);
}
.dhikr-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  background-color: var(--surface-2);
}
[data-theme="dark"] .dhikr-count { color: var(--gold); }
.dhikr.is-done .dhikr-count {
  color: #F6EFDE;
  background-color: var(--clay);
  border-color: var(--clay);
}

.dhikr-bar {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  height: 2px;
  background-color: var(--gold);
  border-radius: 0 0 0 12px;
  transition: width .25s ease;
  pointer-events: none;
}

.ibrahimiyya-text {
  font-family: 'Amiri Quran', 'Traditional Arabic', serif;
  font-size: 20px;
  line-height: 2.15;
  text-align: justify;
  color: var(--ink);
}

/* المسبحة */
.tasbih-wrap { text-align: center; padding: 8px 0 4px; }
.tasbih-btn {
  width: min(72vw, 260px);
  height: min(72vw, 260px);
  border-radius: 50%;
  margin: 8px auto 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  background-color: var(--surface);
  box-shadow: inset 0 0 0 8px var(--paper), inset 0 0 0 9px var(--gold-soft);
  transition: transform .1s ease, background-color .16s ease;
}
.tasbih-btn:active { transform: scale(.97); background-color: var(--surface-2); }
.tasbih-count {
  font-family: 'Cairo', sans-serif;
  font-size: 54px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
[data-theme="dark"] .tasbih-count { color: var(--gold); }
.tasbih-label { display: block; font-size: 12px; color: var(--muted); margin-top: 8px; }
.tasbih-total { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.tasbih-targets { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }

/* ===================== الصلاة ===================== */
.loc-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.loc-name { font-size: 16.5px; font-weight: 700; color: var(--ink); }
.loc-date { font-size: 12px; color: var(--muted); margin-top: 2px; }
.loc-actions { display: flex; gap: 8px; align-items: center; }

.next-prayer { text-align: center; }
.np-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-top: 2px;
}
.np-name { font-size: 24px; font-weight: 700; color: var(--green); }
[data-theme="dark"] .np-name { color: var(--gold); }
.np-time { font-size: 16px; font-weight: 600; color: var(--muted); }
.np-count {
  font-size: 30px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 14px;
  direction: ltr;
}
[data-theme="dark"] .np-count { color: var(--ink); }

.dayline { margin: 0 2px; }
.dayline-track {
  height: 8px;
  border-radius: 999px;
  background-color: var(--surface-2);
  border: 1px solid var(--gold-soft);
  overflow: hidden;
}
.dayline-fill {
  height: 100%;
  width: 0%;
  background-color: var(--green);
  border-radius: 999px;
  transition: width .6s ease;
}
[data-theme="dark"] .dayline-fill { background-color: var(--gold); }
.dayline-marks { position: relative; height: 22px; margin-top: 2px; }
.dayline-mark {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.dayline-mark::before {
  content: '';
  display: block;
  width: 1px;
  height: 5px;
  background-color: var(--gold);
  margin: 0 auto 2px;
}
.dayline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
}

.prayer-table { padding: 6px 16px; }
.prayer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--gold-soft);
  font-size: 15px;
}
.prayer-row:last-child { border-bottom: 0; }
.prayer-row.is-next .prayer-name { color: var(--green); font-weight: 700; }
[data-theme="dark"] .prayer-row.is-next .prayer-name { color: var(--gold); }
.prayer-row.is-next .prayer-time { color: var(--green); font-weight: 700; }
[data-theme="dark"] .prayer-row.is-next .prayer-time { color: var(--gold); }
.prayer-name { color: var(--ink); }
.prayer-time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ===================== المشايخ ===================== */
.live-card { text-align: center; }
.live-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 4px;
}
[data-theme="dark"] .live-head { color: var(--gold); }
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--clay);
  opacity: .5;
}
.live-dot.is-on {
  opacity: 1;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: .55; }
}
.live-desc { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.live-status { font-size: 12px; color: var(--clay); margin-top: 10px; min-height: 18px; }

.player-card { text-align: center; }
.player-title {
  font-family: 'Amiri Quran', serif;
  font-size: 23px;
  color: var(--green);
  line-height: 1.5;
}
[data-theme="dark"] .player-title { color: var(--gold); }
.player-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 14px;
}

.seek {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 22px;
  background: transparent;
}
.seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background-color: var(--surface-2);
  border: 1px solid var(--gold-soft);
}
.seek::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background-color: var(--surface-2);
  border: 1px solid var(--gold-soft);
}
.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--green);
  border: 2px solid var(--surface);
  margin-top: -7px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.seek::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background-color: var(--green); border: 2px solid var(--surface);
}
[data-theme="dark"] .seek::-webkit-slider-thumb { background-color: var(--gold); }
[data-theme="dark"] .seek::-moz-range-thumb { background-color: var(--gold); }

.player-times {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 14px;
}

.reciter-list { display: flex; flex-direction: column; gap: 8px; }
.reciter-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: start;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--gold-soft);
  background-color: var(--surface);
  transition: border-color .16s ease, background-color .16s ease;
}
.reciter-btn:hover { border-color: var(--gold); }
.reciter-btn.is-active { border-color: var(--green); background-color: var(--surface-2); }
[data-theme="dark"] .reciter-btn.is-active { border-color: var(--gold); }
.reciter-name { flex: 1 1 auto; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.reciter-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 1px 8px;
}
.reciter-check { color: var(--green); font-weight: 700; }
[data-theme="dark"] .reciter-check { color: var(--gold); }

/* ===================== الإعدادات ===================== */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  border-bottom: 1px solid var(--gold-soft);
  font-size: 14px;
  cursor: pointer;
}
.switch-row:last-of-type { border-bottom: 0; }
.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 27px;
  border-radius: 999px;
  background-color: var(--surface-2);
  border: 1px solid var(--line);
  transition: background-color .2s ease, border-color .2s ease;
}
.sw::after {
  content: '';
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background-color: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.switch-row input:checked + .sw {
  background-color: var(--green);
  border-color: var(--green);
}
.switch-row input:checked + .sw::after { transform: translateX(-19px); }
html[dir="rtl"] .switch-row input:checked + .sw::after { transform: translateX(-19px); }
.switch-row input:focus-visible + .sw { outline: 2px solid var(--gold); outline-offset: 2px; }

.font-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.font-preview {
  flex: 1 1 auto;
  text-align: center;
  font-family: 'Amiri Quran', serif;
  font-size: var(--quran-size);
  color: var(--green);
  line-height: 1.6;
}
[data-theme="dark"] .font-preview { color: var(--gold); }

.about-text { font-size: 13px; color: var(--muted); line-height: 1.8; }
.about-ornament {
  width: 34px;
  height: 34px;
  margin: 14px auto 2px;
  color: var(--gold);
  opacity: .65;
}
.about-ornament svg { width: 100%; height: 100%; }

/* ===================== الشريط السفلي ===================== */
.tabbar {
  flex: 0 0 auto;
  background-color: var(--surface);
  border-top: 1px solid var(--gold);
  padding: 4px 6px 6px;
  position: relative;
  z-index: 20;
}
.tabbar-inner {
  display: flex;
  max-width: 820px;
  margin-inline: auto;
}
.tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 2px 4px;
  min-height: 54px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: color .16s ease, background-color .16s ease;
}
.tab svg { width: 21px; height: 21px; }
.tab:active { background-color: var(--surface-2); }
.tab.is-active { color: var(--green); }
[data-theme="dark"] .tab.is-active { color: var(--gold); }
.tab.is-active svg { stroke-width: 1.9; }

/* ===================== المشغل المصغر ===================== */
.miniplayer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background-color: var(--surface-2);
  border-top: 1px solid var(--line);
  max-width: 100%;
}
.mini-text { flex: 1 1 auto; min-width: 0; }
.mini-text span { display: block; line-height: 1.4; }
#mini-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#mini-sub { font-size: 11px; color: var(--muted); }

/* ===================== التنبيهات ===================== */
.toast-layer {
  position: fixed;
  top: 10px;
  inset-inline: 10px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background-color: var(--green);
  color: #F6EFDE;
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
  animation: toastIn .26s ease-out;
  max-width: 560px;
  margin-inline: auto;
  width: 100%;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
.toast-icon { color: var(--gold); flex: 0 0 auto; margin-top: 1px; }
.toast-icon svg { width: 19px; height: 19px; }
.toast-body { min-width: 0; }
.toast-title { font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.toast-msg { font-size: 12px; opacity: .85; line-height: 1.6; margin-top: 2px; }

/* ===================== شاشات أعرض ===================== */
@media (min-width: 720px) {
  body { font-size: 15.5px; }
  main { padding: 24px 24px 36px; }
  .app-header { padding-inline: 28px; }
  .brand-text h1 { font-size: 21px; }
  .surah-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .reciter-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .quran-text { font-size: calc(var(--quran-size) + 3px); }
}

@media (max-width: 360px) {
  .brand-text h1 { font-size: 17px; }
  .icon-btn { width: 38px; height: 38px; }
  .np-count { font-size: 25px; }
  .np-name { font-size: 21px; }
  .quran-text { font-size: calc(var(--quran-size) - 2px); }
  .loc-actions { width: 100%; }
  .loc-actions .select { flex: 1 1 auto; }
}