/* ===== v4.7.0 fixes (insets, toast, settings accordions, switches, mushaf, wizard, exit dialog) ===== */
:root { --sat-x: max(env(safe-area-inset-top, 0px), var(--sat, 0px)); --sab-x: max(env(safe-area-inset-bottom, 0px), var(--sab, 0px)); }

/* 1) شريط الحالة: الهيدر ينزل تحته، والدوك فوق شريط التنقل */
#app { grid-template-rows: calc(var(--header) + var(--sat-x)) minmax(0, 1fr) auto !important; }
.top { box-sizing: border-box !important; height: calc(var(--header) + var(--sat-x)) !important; padding-top: var(--sat-x) !important; }
.dock { padding-bottom: max(8px, var(--sab-x)) !important; }
#mesue-smart-drawer { padding-top: var(--sat-x) !important; padding-bottom: var(--sab-x) !important; }
.sheet-card, .wizard-card { margin-bottom: var(--sab-x); }

/* 4) رسالة موحّدة (توست) — عرض طبيعي بدل الحبة الطويلة الرفيعة */
.toast, #toast {
  position: fixed !important; left: 50% !important; right: auto !important; top: auto !important;
  bottom: calc(var(--dock, 64px) + var(--sab-x) + 14px) !important; transform: translateX(-50%) !important;
  width: max-content !important; min-width: 0 !important; max-width: min(90vw, 460px) !important; height: auto !important;
  white-space: normal !important; word-break: normal !important; writing-mode: horizontal-tb !important;
  text-align: center !important; line-height: 1.5 !important; font-size: 14px !important;
  padding: 10px 18px !important; border-radius: 14px !important; z-index: 3000 !important;
  background: rgba(8, 22, 16, .96) !important; color: #FFF3B0 !important; border: 1px solid rgba(212, 175, 55, .45) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45) !important;
}
#toast { pointer-events: none; }
#mesue-dua-toast {
  width: max-content !important; max-width: min(92vw, 460px) !important; height: auto !important;
  white-space: normal !important; border-radius: 14px !important; top: calc(var(--sat-x) + 66px) !important;
  flex-wrap: wrap; line-height: 1.5; padding: 10px 16px !important;
}
.ob-sheet, .mx-modal { position: fixed !important; }

/* 2) الإعدادات: بدون صناديق متداخلة ولا ارتفاعات ثابتة */
.settings-scroll { display: block !important; height: auto; }
#settings-pro, #settings-v47, #perm-banner {
  background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
  border-radius: 0 !important; max-height: none !important; overflow: visible !important; margin: 0 !important;
}
.settings-group, .sp-group {
  content-visibility: visible !important; contain: none !important; contain-intrinsic-size: none !important;
  height: auto !important; max-height: none !important; overflow: hidden !important;
  padding: 0 !important; margin: 8px 0 !important; border-radius: 16px !important; display: block !important;
}
.sp-group > .sp-title, .settings-group > .sp-title {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 13px 16px !important; min-height: 48px; cursor: pointer; font-weight: 700; margin: 0 !important;
}
.sp-title::-webkit-details-marker { display: none; }
.sp-title::after { content: '⌄'; color: #D4AF37; font-size: 18px; line-height: 1; transition: transform .22s ease; }
details[open] > .sp-title::after { transform: rotate(180deg); }
.sp-body { overflow: hidden; padding: 0 0 6px; }
.sp-row, .settings-item { display: flex !important; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 16px !important; min-height: 44px; height: auto !important; border-radius: 0 !important;
  background: none !important; border: 0 !important; border-top: 1px solid rgba(212, 175, 55, .10) !important; margin: 0 !important; flex-wrap: wrap; }
.sp-row > span:first-child, .settings-item > span:first-child { flex: 1 1 140px; min-width: 0; }
.sp-row select, .sp-row input[type=number], .settings-item select { max-width: 55%; }
.dhikr-quick-row { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; padding: 10px 16px !important; height: auto !important; }
.dhikr-quick-row > * { flex: 1 1 auto; white-space: nowrap; }
.sp-note { font-size: 12px; opacity: .8; padding: 2px 16px 10px; line-height: 1.6; }

/* مفاتيح تبديل حقيقية */
input[type=checkbox].sp-switch, input[type=checkbox].styled-chk, input[type=checkbox].mx-switch {
  -webkit-appearance: none; appearance: none; width: 44px !important; height: 26px !important; flex: none;
  border-radius: 99px; background: #3a4a42; position: relative; cursor: pointer; margin: 0; border: 0;
  transition: background .2s ease; outline-offset: 2px;
}
input[type=checkbox].sp-switch::after, input[type=checkbox].styled-chk::after, input[type=checkbox].mx-switch::after {
  content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
input[type=checkbox].sp-switch:checked, input[type=checkbox].styled-chk:checked, input[type=checkbox].mx-switch:checked { background: #D4AF37; }
input[type=checkbox].sp-switch:checked::after, input[type=checkbox].styled-chk:checked::after, input[type=checkbox].mx-switch:checked::after { transform: translateX(-18px); }

/* إعدادات: تبويبات عربية */
.settings-tab-nav {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 6px;
  position: sticky; top: 0; z-index: 5; background: linear-gradient(180deg, rgba(6,18,13,.96), rgba(6,18,13,.72));
}
.settings-tab-btn {
  flex: 1 1 calc(50% - 8px); min-width: 140px; padding: 10px 8px; border-radius: 12px;
  border: 1px solid rgba(212,175,55,.35); background: rgba(212,175,55,.08); color: #FFF3B0;
  font: inherit; font-size: 0.78rem; font-weight: 800; cursor: pointer;
}
.settings-tab-btn.is-active { background: linear-gradient(135deg, #E6C65C, #D4AF37); color: #06100C; border-color: transparent; }
.settings-tab-panel[hidden] { display: none !important; }

.mushaf-collapsed-bar {
  display: none;
  position: fixed;
  left: 0; right: 0;
  top: calc(var(--header, 56px) + var(--sat-x, 0px));
  z-index: 2450;
  padding: 6px 12px 8px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
  box-sizing: border-box;
}
#view-mushaf.mushaf-top-collapsed:not([hidden]) .mushaf-collapsed-bar { display: flex; }
.mushaf-collapsed-bar > * { pointer-events: auto; }
.mushaf-bar-peek {
  padding: 8px 14px; border-radius: 99px; border: 1px solid rgba(212,175,55,.35);
  background: rgba(6,18,13,.75); color: #A3C9B8; font-weight: 700; font-size: 0.72rem; cursor: pointer;
  font: inherit;
}
.mushaf-mobile-fs-chip {
  display: inline-flex; align-items: center;
  padding: 9px 16px; border-radius: 99px; border: 1px solid rgba(212,175,55,.55);
  background: linear-gradient(135deg, rgba(212,175,55,.22), rgba(6,18,13,.92)); color: #FFF3B0; font-weight: 800; font-size: 0.78rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.45); cursor: pointer; font: inherit;
}
body.mushaf-zen-fullscreen .mushaf-collapsed-bar { display: none !important; }
@media (min-width: 768px) {
  .mushaf-collapsed-bar { display: none !important; }
  #view-mushaf.mushaf-top-collapsed:not([hidden]) #btn-mushaf-fullscreen { display: inline-flex !important; }
}

/* 8) المصحف: شريط مضغوط + قائمة ⋮ + شريط التكبير الناعم + وضع ملء الشاشة (Zen Fullscreen) */
.mushaf-top-row { display: flex !important; align-items: center; gap: 6px !important; flex-wrap: nowrap !important; }
.mushaf-top-row .reciter { flex: 1 1 auto; min-width: 0; max-width: 44vw; font-size: 13px; padding: 6px 8px; }
.mushaf-top-row #page-label { white-space: nowrap; font-size: 13px; }
.mx-ic { min-width: 36px; height: 36px; padding: 0 7px !important; font-size: 16px; flex: none; }
.mushaf-bar { justify-content: center !important; gap: 18px !important; }
.mx-menu { position: fixed !important; z-index: 2600; top: calc(var(--header) + var(--sat-x) + 56px); left: 10px;
  min-width: 200px; background: #0c1f17; border: 1px solid rgba(212,175,55,.45); border-radius: 14px; padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 4px; }
.mx-menu[hidden] { display: none !important; }
.mx-item { text-align: right; padding: 11px 12px; border-radius: 10px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.mx-item:active { background: rgba(212,175,55,.15); }
.mx-zoom { display: flex; justify-content: space-between; gap: 6px; padding: 4px 6px; }

/* شريط التكبير والتصغير الناعم والواسع للمصحف */
.mushaf-smooth-zoom-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 4px 4px 2px !important;
  box-sizing: border-box !important;
}
.mushaf-zoom-step-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(212, 175, 55, 0.5) !important;
  background: rgba(212, 175, 55, 0.14) !important;
  color: #FFF3B0 !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  user-select: none !important;
}
.mushaf-zoom-step-btn:active {
  background: #D4AF37 !important;
  color: #06100C !important;
}
.mushaf-zoom-slider {
  flex: 1 1 auto !important;
  min-width: 80px !important;
  height: 6px !important;
  accent-color: #D4AF37 !important;
  cursor: pointer !important;
}
.mushaf-zoom-pct-btn {
  min-width: 48px !important;
  height: 28px !important;
  padding: 0 8px !important;
  border-radius: 99px !important;
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
  background: rgba(6, 18, 13, 0.85) !important;
  color: #D4AF37 !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

/* وضع ملء الشاشة الكامل للمصحف (إخفاء كل القوائم والمفاتيح) */
body.mushaf-zen-fullscreen #app {
  grid-template-rows: 0px minmax(0, 1fr) 0px !important;
}
body.mushaf-zen-fullscreen .top,
body.mushaf-zen-fullscreen .dock,
body.mushaf-zen-fullscreen #mushaf-top,
body.mushaf-zen-fullscreen #mushaf-bar,
body.mushaf-zen-fullscreen #mushaf-menu,
body.mushaf-zen-fullscreen #mushaf-tools-pool {
  display: none !important;
}
body.mushaf-zen-fullscreen #stage,
body.mushaf-zen-fullscreen #view-mushaf {
  width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.mushaf-zen-fullscreen #mushaf-frame {
  width: 100vw !important;
  height: calc(100dvh - var(--mushaf-dock-h, 68px)) !important;
  max-width: 100vw !important;
  max-height: calc(100dvh - var(--mushaf-dock-h, 68px)) !important;
  padding: 4px 4px 0 !important;
  border-radius: 0 !important;
}
body.mushaf-zen-fullscreen .mushaf-reader-dock {
  display: flex !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 2900 !important;
}
body.mushaf-zen-fullscreen .mushaf-zen-floating {
  display: none !important;
}
.mushaf-zen-floating {
  position: fixed !important;
  bottom: calc(var(--sab-x) + 14px) !important;
  left: 14px !important;
  z-index: 2800 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(6, 18, 13, 0.82) !important;
  border: 1px solid rgba(212, 175, 55, 0.5) !important;
  border-radius: 99px !important;
  padding: 5px 10px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65) !important;
  backdrop-filter: blur(10px) !important;
}
.mushaf-zen-floating[hidden] {
  display: none !important;
}
.mushaf-exit-fs-btn {
  background: linear-gradient(135deg, #E6C65C, #D4AF37) !important;
  color: #06100C !important;
  border: none !important;
  border-radius: 99px !important;
  padding: 5px 12px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}
.mushaf-zen-mini-zoom {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.mushaf-zen-mini-zoom button {
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  background: rgba(212, 175, 55, 0.15) !important;
  color: #FFF3B0 !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  padding: 0 !important;
}
.mushaf-zen-mini-zoom span {
  font-size: 0.75rem !important;
  color: #D4AF37 !important;
  font-weight: 700 !important;
  min-width: 38px !important;
  text-align: center !important;
}

/* 5) معالج الصلاحيات */
.ob-wiz { inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); padding: calc(var(--sat-x) + 12px) 14px calc(var(--sab-x) + 12px); }
.ob-wiz .ob-card { width: min(420px, 100%); text-align: center; padding: 22px 18px; border-radius: 20px; background: #0c1f17; border: 1px solid rgba(212,175,55,.4); display: flex; flex-direction: column; gap: 12px; max-height: 100%; overflow-y: auto; }
.ob-hero { font-size: 48px; line-height: 1; }
.ob-dots { display: flex; justify-content: center; gap: 6px; }
.ob-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); transition: all .2s; }
.ob-dot.ok { background: #4caf50; }
.ob-dot.cur { width: 22px; border-radius: 6px; background: #D4AF37; }
.ob-link { background: none; border: 0; color: #D4AF37; padding: 8px; font: inherit; }
.ob-okmsg { color: #7ee08a; font-weight: 700; }
.ob-wiz .ob-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.04); }
.ob-wiz .ob-row.ok .ob-st { color: #7ee08a; }

/* 10) نافذة الخروج + مسجل الصوت */
.mx-modal { inset: 0; z-index: 5000; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; }
.mx-modal[hidden] { display: none !important; }
.mx-card { width: min(320px, 86vw); background: #0c1f17; border: 1px solid rgba(212,175,55,.45); border-radius: 18px; padding: 20px; text-align: center; }
.mx-card h3 { margin: 0 0 16px; }
.mx-actions { display: flex; gap: 10px; }
.mx-actions button, .mx-rec button { flex: 1; padding: 10px; border-radius: 12px; border: 1px solid rgba(212,175,55,.5); background: none; color: inherit; font: inherit; }
.mx-actions .mx-yes { background: #D4AF37; color: #0c1f17; font-weight: 700; }
.mx-rec { display: flex; gap: 8px; padding: 6px 16px 12px; flex-wrap: wrap; }
.mx-rec button.rec-on { background: #b3261e; color: #fff; }

/* مصحف — بدون شريط علوي؛ شريط قراءة سفلي + أدوات في القائمة */
#mushaf-tools-pool {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}
#mesue-smart-drawer .mushaf-drawer-tools {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(6, 18, 13, 0.88);
}
.mushaf-drawer-tools-title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #D4AF37;
  text-align: right;
}
.mushaf-drawer-tools .mushaf-top {
  position: static !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  display: block !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.mushaf-reader-dock {
  --mushaf-dock-h: 72px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--sab-x, 0px) + var(--dock-h, 56px));
  z-index: 2460;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(6, 18, 13, 0.55), rgba(6, 18, 13, 0.94));
  border-top: 1px solid rgba(212, 175, 55, 0.4);
  backdrop-filter: blur(12px);
  box-sizing: border-box;
}
body.mushaf-zen-fullscreen .mushaf-reader-dock {
  bottom: 0 !important;
}
.mushaf-reader-dock .dock-chip {
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.12);
  color: #FFF3B0;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 99px;
  padding: 7px 11px;
  cursor: pointer;
  flex: none;
}
.mushaf-reader-dock .dock-ayah {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.7rem;
  color: #A3C9B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  padding: 0 4px;
}
.mushaf-reader-dock .dock-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  background: rgba(6, 18, 13, 0.9);
  color: #D4AF37;
  font: inherit;
  cursor: pointer;
}
.mushaf-reader-dock .dock-page span { font-size: 1rem; font-weight: 800; line-height: 1; }
.mushaf-reader-dock .dock-page small { font-size: 0.62rem; color: #A3C9B8; }
.mushaf-reader-dock .dock-nav { min-width: 40px !important; }
.mushaf-reader-dock .dock-play { min-width: 44px !important; }
body.view-mushaf #view-mushaf {
  padding-bottom: calc(var(--mushaf-dock-h, 68px) + var(--dock-h, 56px) + 8px);
}
body.mushaf-zen-fullscreen.view-mushaf #view-mushaf {
  padding-bottom: var(--mushaf-dock-h, 68px) !important;
}
.mesue-drawer-account-strip {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.08);
}
.mesue-drawer-account-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  text-align: right;
}
.mesue-drawer-account-head strong { display: block; color: #FFF3B0; font-size: 0.9rem; }
.mesue-drawer-account-head small { color: #A3C9B8; font-size: 0.72rem; }
.mesue-drawer-account-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.mesue-drawer-account-links a {
  text-decoration: none;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 10px;
  background: rgba(6, 18, 13, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #FFF3B0;
}
.mesue-drawer-account-btn {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #E6C65C, #D4AF37);
  color: #06100C;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  font: inherit;
}


/* mushaf-tools-pool-page-hide: keep tools only in القائمة drawer, not over the page */
#view-mushaf .mushaf-tools-pool { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px; pointer-events: none; }
.mushaf-drawer-tools .mushaf-tools-pool,
.mushaf-drawer-tools #mushaf-top,
#mesue-smart-drawer .mushaf-top { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal; pointer-events: auto; margin: 0; padding: 0; }
#view-mushaf .mushaf-frame { transition: opacity .18s ease, transform .18s ease; }
#view-mushaf .mushaf-frame.is-turning { opacity: .35; transform: translateX(6%) scale(.985); }
body.mushaf-zen-fullscreen #mushaf-reader-dock { display: flex !important; }
body.mushaf-zen-fullscreen .mushaf-zen-floating { display: flex !important; }

.mushaf-zen-floating { display: none; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 8px 10px; }
body.mushaf-zen-fullscreen .mushaf-zen-floating { display: flex !important; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--sab-x, 0px)); z-index: 2800; background: rgba(8,18,14,.88); border: 1px solid rgba(255,243,176,.28); border-radius: 999px; backdrop-filter: blur(8px); max-width: min(96vw, 640px); }
.mushaf-page-scrub { width: min(42vw, 220px); accent-color: #D4AF37; }

/* --- Header layout & circular icons (MesueTech + User Account) --- */
header.top,
.top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0 14px !important;
  box-sizing: border-box !important;
}

.top-leading {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.top-trailing {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-inline-start: auto !important;
  flex-shrink: 0 !important;
}

/* Mesue Tech circular icon button */
.top-mesue-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  min-height: 36px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1.5px solid rgba(212, 175, 55, 0.45) !important;
  background: linear-gradient(135deg, rgba(14, 32, 24, 0.95), rgba(6, 18, 13, 0.98)) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 6px rgba(212, 175, 55, 0.12) !important;
  cursor: pointer !important;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
  flex: none !important;
  overflow: hidden !important;
}
.top-mesue-btn:hover,
.top-mesue-btn:focus-visible {
  transform: scale(1.05) !important;
  border-color: rgba(245, 178, 53, 0.85) !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55), 0 0 10px rgba(212, 175, 55, 0.3) !important;
}
.top-mesue-logo {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  object-fit: contain !important;
  display: block !important;
}
.top-mesue-copy,
.top-mesue-fallback {
  display: none !important;
}

/* User account circular chip button */
.top-user-chip {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1.5px solid rgba(212, 175, 55, 0.45) !important;
  background: linear-gradient(135deg, rgba(14, 32, 24, 0.95), rgba(6, 18, 13, 0.98)) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 6px rgba(212, 175, 55, 0.12) !important;
  cursor: pointer !important;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
  flex: none !important;
  overflow: hidden !important;
  font-size: 0 !important;
  line-height: 0 !important;
}
.top-user-chip:hover,
.top-user-chip:focus-visible {
  transform: scale(1.05) !important;
  border-color: rgba(245, 178, 53, 0.85) !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55), 0 0 10px rgba(212, 175, 55, 0.3) !important;
}
.top-user-avatar {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  box-shadow: none !important;
  flex: none !important;
}
.top-user-initial {
  display: none !important;
}
.top-user-guest {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  color: #FFF3B0 !important;
}
.top-user-guest svg {
  width: 18px !important;
  height: 18px !important;
}
.top-user-email {
  display: none !important;
}

.mushaf-frame { position: absolute; inset: 0; }
.mushaf-page {
  position: relative;
  transform-origin: center center;
  max-width: 100%;
  max-height: 100%;
}
.mushaf-page img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}
.mushaf-ayah-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
#mushaf-frame button.mushaf-ayah-hit,
#mushaf-frame button.mushaf-ayah-hit:hover,
#mushaf-frame button.mushaf-ayah-hit:active {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  color: transparent !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  padding: 0 !important;
  border-radius: 4px !important;
}
#mushaf-frame button.mushaf-ayah-hit.is-active,
#mushaf-frame button.mushaf-ayah-hit.is-active:hover,
#mushaf-frame button.mushaf-ayah-hit.is-active:active {
  background: rgba(212, 175, 55, 0.16) !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 2px rgba(255, 243, 176, 0.9) !important;
  transform: none !important;
}
.mushaf-ayah-hit {
  position: absolute;
  left: 4%;
  right: 4%;
  border: none;
  margin: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
  border-radius: 6px;
  min-height: 28px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.mushaf-ayah-hit.is-active {
  background: rgba(212, 175, 55, 0.2);
  box-shadow: inset 0 0 0 2px rgba(255, 243, 176, 0.85);
}
.mushaf-ayah-hit:focus-visible {
  outline: 3px solid #7DD3FC;
  outline-offset: 2px;
}
body[data-mushaf-theme="night"] #view-mushaf,
body[data-mushaf-theme="night"] .mushaf-frame img { background: #0a0f14 !important; filter: brightness(0.88) contrast(1.05); }
body[data-mushaf-theme="sepia"] .mushaf-frame img { filter: sepia(0.35) brightness(1.02); background: #e8dcc8 !important; }
body[data-mushaf-theme="high-contrast"] .mushaf-frame img { filter: contrast(1.2); }
body[data-mushaf-theme="high-contrast"] .mushaf-ayah-hit.is-active {
  background: rgba(255, 243, 176, 0.35);
  box-shadow: inset 0 0 0 3px #fff;
}
body.mushaf-large-text .mushaf-frame img { transform-origin: center center; image-rendering: crisp-edges; }

.mushaf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mushaf-reader-panel {
  margin: 10px 0 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 243, 176, 0.2);
  background: rgba(6, 16, 12, 0.55);
}
.mushaf-reader-panel-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: #FFF3B0;
}
.mushaf-reader-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mushaf-reader-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  color: #A3C9B8;
}
.mushaf-reader-field select,
.mushaf-reader-field input[type="number"] {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 243, 176, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: #eaf6ef;
  font: inherit;
  padding: 6px 8px;
}
.mushaf-switch-row { flex-direction: row !important; align-items: center; min-height: 48px; gap: 8px !important; }
.mushaf-bookmark-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; max-height: 160px; overflow: auto; }
.mushaf-bookmark-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 243, 176, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #eaf6ef;
  font: inherit;
  cursor: pointer;
  text-align: right;
}
.mushaf-bookmark-empty { margin: 0; font-size: 0.75rem; color: #A3C9B8; }

.mushaf-reader-dock .dock-nav,
.mushaf-reader-dock .dock-play,
.mushaf-reader-dock .dock-chip,
.mushaf-reader-dock .dock-page {
  min-width: 48px !important;
  min-height: 48px !important;
}
.mushaf-reader-dock .dock-ayah-nav { font-size: 0.72rem; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  #view-mushaf .mushaf-frame,
  .mushaf-ayah-hit,
  #mushaf-img { transition: none !important; }
  #view-mushaf .mushaf-frame.is-turning { transform: none; opacity: 1; }
}

/* MUSHAF_CLEAR_PAGE_20261109 — no overlay on mushaf page */
#view-mushaf #mushaf-top,
#view-mushaf .mushaf-top,
#view-mushaf .mushaf-collapsed-bar {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
#view-mushaf .mushaf-ayah-layer,
#view-mushaf .mushaf-ayah-hit {
  pointer-events: none !important;
}
#view-mushaf .mushaf-frame {
  inset: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
}
#view-mushaf:not([hidden]) {
  padding-top: 0 !important;
}
/* MUSHAF_CLEAR_PAGE_20261109b — force-clear overlays */
#view-mushaf #mushaf-tools-pool:not(.mushaf-drawer-tools) #mushaf-top,
#view-mushaf > #mushaf-tools-pool #mushaf-top,
#view-mushaf .mushaf-top,
#view-mushaf .mushaf-reader-panel,
#view-mushaf .mushaf-meta-row,
#view-mushaf .mushaf-top-row {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
}
#view-mushaf .mushaf-ayah-hit {
  pointer-events: none !important;
}
#view-mushaf .mushaf-ayah-hit.is-active {
  background: rgba(212, 175, 55, 0.2) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 243, 176, 0.85) !important;
}
/* HIDE_APP_TOP_ON_MUSHAF — page fully clear */
body.view-mushaf #app { grid-template-rows: var(--sat-x, 0px) minmax(0, 1fr) auto !important; }
body.view-mushaf header.top {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.view-mushaf #view-mushaf:not([hidden]) {
  top: 0 !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}
body.view-mushaf .mushaf-frame,
body.view-mushaf #mushaf-frame {
  top: 0 !important;
  inset: 0 !important;
}

/* Sadaqa heart & note — positioned inside the radio chassis (Authentic Arabic Kufi/Naskh) */
.sadaqa-chassis-strip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 12px;
  margin-top: 10px;
  padding: 6px 18px 6px 14px;
  background: rgba(14, 34, 25, 0.78);
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 243, 176, 0.18);
  max-width: 100%;
  font-family: 'Reem Kufi', 'Amiri', serif !important;
}

button#sadaqa-heart {
  position: static !important;
  left: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  width: auto !important;
  height: 38px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 14px 0 12px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: linear-gradient(135deg, #22513c, #0c2016) !important;
  background-image: linear-gradient(135deg, #22513c, #0c2016) !important;
  border: 1.5px solid rgba(212, 175, 55, 0.75) !important;
  color: #FFF3B0 !important;
  cursor: pointer !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45) !important;
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.15s ease, box-shadow 0.15s ease !important;
  flex: none !important;
  font-family: 'Reem Kufi', 'Amiri', serif !important;
}

button#sadaqa-heart:hover,
button#sadaqa-heart:focus-visible {
  transform: scale(1.08) !important;
  border-color: #FFF3B0 !important;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.55) !important;
}

button#sadaqa-heart:active {
  transform: scale(0.92) !important;
}

/* Remote tap live bounce animation when another listener gives a heart */
button#sadaqa-heart.is-remote-tap {
  animation: sadaqa-remote-bounce 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes sadaqa-remote-bounce {
  0% { transform: scale(1); }
  30% { transform: scale(0.84); border-color: #ef4444; box-shadow: 0 0 18px rgba(239, 68, 68, 0.7); }
  60% { transform: scale(1.18); border-color: #FFF3B0; box-shadow: 0 0 22px rgba(212, 175, 55, 0.85); }
  100% { transform: scale(1); }
}

.sadaqa-heart-glyph {
  font-size: 1.45rem !important;
  line-height: 1;
  color: #ef4444;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  display: inline-block;
  transition: transform 0.18s ease;
}

.sadaqa-heart-count {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  line-height: 1;
  color: #FFF3B0;
  font-family: "Cairo", "Segoe UI", -apple-system, sans-serif !important;
  letter-spacing: normal;
}

.sadaqa-hearts-note {
  margin: 0 !important;
  font-family: "Cairo", "Segoe UI", -apple-system, Tahoma, sans-serif !important;
  font-size: 0.96rem !important;
  font-weight: 700 !important;
  color: #FFF3B0 !important;
  white-space: nowrap !important;
  letter-spacing: normal !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.sadaqa-float {
  position: fixed;
  z-index: 999;
  margin-left: -0.5rem;
  color: #ef4444;
  font-size: 1.55rem;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(239, 68, 68, 0.6));
  animation: sadaqa-rise 1.1s ease-out forwards;
}

@keyframes sadaqa-rise {
  0% { transform: translateY(0) scale(0.85); opacity: 1; }
  50% { transform: translateY(-34px) scale(1.35); opacity: 0.92; }
  100% { transform: translateY(-72px) scale(1.75); opacity: 0; }
}

button#sadaqa-heart[hidden],
body.view-mushaf button#sadaqa-heart,
body.mushaf-zen-fullscreen button#sadaqa-heart {
  display: none !important;
}

#view-radio .fav-section { padding-left: 0; }

@media (max-width: 420px) {
  .sadaqa-chassis-strip {
    padding: 4px 12px 4px 10px;
    gap: 8px;
  }
  button#sadaqa-heart {
    height: 35px !important;
    padding: 0 10px 0 8px !important;
  }
  .sadaqa-heart-glyph {
    font-size: 1.25rem !important;
  }
  .sadaqa-hearts-note {
    font-size: 0.88rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sadaqa-float { animation: none; opacity: 0; }
  button#sadaqa-heart.is-remote-tap { animation: none !important; }
}

/* ==========================================================================
   4.8.22: Mushaf Dock 5-Buttons & Ayah Layer Cancel
   ========================================================================== */
#mushaf-ayah-layer,
.mushaf-ayah-layer,
.mushaf-ayah-hit {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.mushaf-reader-dock {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(10px, 4vw, 24px) !important;
  padding: 8px 16px !important;
  background: linear-gradient(180deg, rgba(8, 20, 15, 0.88), rgba(4, 10, 8, 0.98)) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-top: 1px solid rgba(212, 175, 55, 0.35) !important;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.65) !important;
  z-index: 120 !important;
}

.mushaf-reader-dock #dock-bookmark-btn,
.mushaf-reader-dock #page-prev,
.mushaf-reader-dock #page-next,
.mushaf-reader-dock #dock-zen-in,
.mushaf-reader-dock #dock-zen-out {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(145deg, rgba(20, 48, 35, 0.95), rgba(9, 22, 16, 0.98)) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  color: #FFF3B0 !important;
  font-size: 1.15rem !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease !important;
}

.mushaf-reader-dock #dock-bookmark-btn:active,
.mushaf-reader-dock #page-prev:active,
.mushaf-reader-dock #page-next:active,
.mushaf-reader-dock #dock-zen-in:active,
.mushaf-reader-dock #dock-zen-out:active {
  transform: scale(0.92) !important;
  border-color: #D4AF37 !important;
  background: rgba(30, 70, 50, 0.95) !important;
}

.mushaf-reader-dock #dock-bookmark-btn.is-saved {
  border-color: #D4AF37 !important;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.6) !important;
  background: linear-gradient(145deg, #2a5a40, #143022) !important;
}

.mushaf-reader-dock #quran-play {
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  min-height: 54px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: radial-gradient(circle at 35% 25%, #fde047, #D4AF37 55%, #926a10) !important;
  border: 2px solid #FFF3B0 !important;
  color: #06100C !important;
  font-size: 1.4rem !important;
  cursor: pointer !important;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5), 0 6px 16px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.mushaf-reader-dock #quran-play:active {
  transform: scale(0.92) !important;
  box-shadow: 0 0 28px rgba(212, 175, 55, 0.75) !important;
}

/* ==========================================================================
   4.8.22: Azan View Royal Overhaul & Polish
   ========================================================================== */
#view-azan {
  max-width: 580px !important;
  margin: 0 auto !important;
  padding: 16px 14px 84px !important;
}

#view-azan .next-card {
  background: linear-gradient(145deg, rgba(16, 42, 30, 0.95), rgba(7, 18, 13, 0.98)) !important;
  border: 1.5px solid rgba(212, 175, 55, 0.45) !important;
  border-radius: 22px !important;
  padding: 18px 20px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), inset 0 0 25px rgba(212, 175, 55, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
  overflow: hidden !important;
  margin-bottom: 16px !important;
}

#view-azan .next-card::before {
  content: '' !important;
  position: absolute !important;
  top: -40% !important;
  right: -20% !important;
  width: 140px !important;
  height: 140px !important;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18), transparent 70%) !important;
  pointer-events: none !important;
}

#view-azan .next-card #place-line {
  font-size: 0.85rem !important;
  color: #A3C9B8 !important;
  font-weight: 600 !important;
  margin-bottom: 4px !important;
}

#view-azan .next-card #next-name {
  font-family: 'Reem Kufi', 'Amiri', serif !important;
  font-size: 1.75rem !important;
  color: #FFF3B0 !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
}

#view-azan .next-card #next-clock {
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif !important;
  font-style: normal !important;
  font-size: 2.1rem !important;
  font-weight: 800 !important;
  color: #D4AF37 !important;
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.35) !important;
  display: block !important;
  text-align: left !important;
  line-height: 1.1 !important;
}

#view-azan .next-card #next-left {
  font-size: 0.85rem !important;
  color: #FFF1B8 !important;
  font-weight: 700 !important;
  background: rgba(212, 175, 55, 0.15) !important;
  padding: 4px 10px !important;
  border-radius: 99px !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  display: inline-block !important;
  margin-top: 6px !important;
  text-align: left !important;
}

#view-azan #prayer-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 8px !important;
  margin-bottom: 16px !important;
}

#view-azan #prayer-grid article {
  background: rgba(10, 24, 18, 0.85) !important;
  border: 1px solid rgba(212, 175, 55, 0.22) !important;
  border-radius: 16px !important;
  padding: 12px 6px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  transition: transform 0.15s ease, border-color 0.15s ease !important;
}

#view-azan #prayer-grid article .k {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: #CBD8D0 !important;
}

#view-azan #prayer-grid article .t {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  color: #FFF3B0 !important;
  letter-spacing: 0.5px !important;
}

#view-azan #prayer-grid article.soon {
  background: linear-gradient(145deg, rgba(28, 64, 46, 0.95), rgba(12, 30, 22, 0.98)) !important;
  border: 1.5px solid #D4AF37 !important;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.3) !important;
  transform: translateY(-2px) !important;
}

#view-azan #prayer-grid article.soon .k {
  color: #FFF3B0 !important;
}

#view-azan #prayer-grid article.soon .t {
  color: #D4AF37 !important;
  font-size: 1.02rem !important;
}

#view-azan .azan-actions {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
  background: rgba(8, 20, 15, 0.8) !important;
  border: 1px solid rgba(212, 175, 55, 0.2) !important;
  border-radius: 16px !important;
  padding: 10px 14px !important;
}

#view-azan .azan-actions .switch {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: #FFF3B0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-left: auto !important;
  cursor: pointer !important;
}

#view-azan .azan-actions .tool {
  background: rgba(20, 48, 35, 0.85) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  color: #FFF3B0 !important;
  border-radius: 12px !important;
  padding: 8px 14px !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.15s ease, border-color 0.15s ease !important;
}

#view-azan .azan-actions .tool:active {
  background: rgba(30, 75, 52, 0.95) !important;
  border-color: #D4AF37 !important;
}

#view-azan .azan-actions #btn-setup {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(160, 120, 20, 0.25)) !important;
  border-color: #D4AF37 !important;
  color: #FFF3B0 !important;
}

#view-azan .azan-voice-picker {
  background: rgba(10, 24, 18, 0.85) !important;
  border: 1px solid rgba(212, 175, 55, 0.25) !important;
  border-radius: 16px !important;
  padding: 10px 14px !important;
  margin-bottom: 12px !important;
}

#view-azan .note {
  color: #A3C9B8 !important;
  font-size: 0.82rem !important;
  line-height: 1.6 !important;
  text-align: center !important;
}