/* ===== وِرْدِي — نظام التصميم ===== */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
  --cream: #F5F1E8;
  --cream-2: #FBF8F1;
  --green: #1F4E3D;
  --green-2: #2C6B54;
  --green-light: #E8F0EA;
  --gold: #C9A227;
  --gold-light: #E4CC6E;
  --ink: #2B2B2B;
  --ink-soft: #6B6B6B;
  --line: #EAE6DD;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(31, 78, 61, 0.05);
  --shadow-md: 0 6px 20px rgba(31, 78, 61, 0.08);
  --radius: 20px;
  --radius-sm: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Tajawal', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; display: block; }

.app {
  width: 100%;
  min-height: 100vh;
  background: transparent;   /* ✅ الشفافية كي تظهر الخلفية */
  padding-bottom: calc(24px + var(--safe-bottom));   /* ✅ خُفّض من 110px */
  padding-top: var(--safe-top);
  padding-left: max(clamp(16px, 4vw, 80px), var(--safe-left));
  padding-right: max(clamp(16px, 4vw, 80px), var(--safe-right));
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
}

/* ===== الشعار ===== */
.top-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 0;
}
.top-logo img {
  width: clamp(180px, 32vw, 380px);
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  filter: contrast(1.15) saturate(1.25) brightness(0.94);
  -webkit-mask-image: radial-gradient(ellipse 45% 45% at 50% 45%, #000 25%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,0.3) 65%, transparent 82%);
  mask-image: radial-gradient(ellipse 45% 45% at 50% 45%, #000 25%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,0.3) 65%, transparent 82%);
  animation: logoGlow 3s ease-in-out infinite;
}
@keyframes logoGlow {
  0%, 100% { filter: contrast(1.15) saturate(1.25) brightness(0.94) drop-shadow(0 4px 12px rgba(201, 162, 39, .08)); }
  50%      { filter: contrast(1.15) saturate(1.25) brightness(0.94) drop-shadow(0 8px 22px rgba(201, 162, 39, .22)); }
}

/* ===== العنوان ===== */
.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0 0;
}
.title-bar h1 {
  font-family: 'Amiri', serif;
  font-size: 44px;
  color: var(--green);
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  flex: 1;
}
.lang-btn {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--green);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.lang-btn:hover { background: var(--green-light); border-color: var(--green); }
.lang-btn.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ===== التاريخ + الساعة ===== */
.datetime-line { text-align: center; padding: 8px 0 16px; }
.date-line {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 6px;
}
.date-line .dot { color: var(--gold); margin: 0 8px; font-size: 9px; vertical-align: middle; }
.clock-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  font-family: 'Tajawal', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  box-shadow: var(--shadow-sm);
  direction: ltr;
}
.clock-line .clock-ico { font-size: 14px; opacity: .7; }
#liveClock { letter-spacing: 1px; font-variant-numeric: tabular-nums; }

/* ===== الشرائح ===== */
.chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 0 16px;
  scrollbar-width: none;
  justify-content: center;
  flex-wrap: wrap;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}
.chip:hover { border-color: var(--green); }
.chip.active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
  font-weight: 700;
}
.chip[data-period].active-period {
  background: linear-gradient(160deg, #E4B94C, #C9A227);
  color: #fff;
  border-color: #C9A227;
  font-weight: 700;
  animation: chipPulse 2.4s ease-in-out infinite;
}
@keyframes chipPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, .55); }
  50%      { box-shadow: 0 0 0 10px rgba(201, 162, 39, 0); }
}
.chip[data-period="evening"].active-period {
  background: linear-gradient(160deg, #2C4A6B, #1F3A52);
  border-color: #1F3A52;
  animation: chipPulseBlue 2.4s ease-in-out infinite;
}
@keyframes chipPulseBlue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 58, 82, .55); }
  50%      { box-shadow: 0 0 0 10px rgba(31, 58, 82, 0); }
}

/* ===== البطاقات ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin: 0 0 12px;
  width: 100%;
}
.card.tight { padding: 16px 20px; }

.sleep-tip { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 500; }
.sleep-tip .star { color: var(--gold); font-size: 18px; }

.resume {
  background: var(--green-light);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
}
.resume .btn-play {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 0 0 auto;
}
.resume .btn-play .tri {
  display: inline-block;
  width: 0; height: 0;
  border-left: 8px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.resume .info { flex: 1; text-align: right; }
.resume .info .lbl { color: var(--green-2); font-size: 14px; font-weight: 500; }
.resume .info .val { color: var(--green); font-size: 18px; font-weight: 800; margin-top: 4px; }
.resume .thumb {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  font-size: 24px;
  box-shadow: inset 0 0 0 1px var(--line);
  flex: 0 0 auto;
}

/* ===== بطاقة الالتزام ===== */
.tracker-head { display: flex; align-items: center; gap: 16px; }
.progress-ring {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0deg, var(--line) 0deg);
  display: grid; place-items: center;
  position: relative;
  flex: 0 0 auto;
}
.progress-ring::after {
  content: '';
  position: absolute; inset: 7px;
  background: #fff; border-radius: 50%;
}
.progress-ring span { position: relative; z-index: 1; font-size: 15px; font-weight: 800; color: var(--green); }
.tracker-head .headline { flex: 1; text-align: right; }
.tracker-head .headline h3 {
  font-family: 'Amiri', serif;
  color: var(--green);
  font-size: 24px;
  font-weight: 700;
}
.tracker-head .headline p {
  font-size: 13.5px;
  color: var(--gold);
  font-weight: 600;
  margin-top: 4px;
}

.tasks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 14px;
  margin-top: 22px;
}
.task {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.task input {
  appearance: none;
  width: 24px; height: 24px;
  border: 2px solid var(--green);
  border-radius: 7px;
  cursor: pointer;
  transition: .15s;
  position: relative;
  flex: 0 0 auto;
}
.task input:checked { background: var(--green); }
.task input:checked::after {
  content: '✓';
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  line-height: 1;
}

.card hr { border: none; border-top: 1px solid var(--line); margin: 20px 0 14px; }

.goal-row {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--ink);
  font-size: 14.5px;
  cursor: pointer;
  padding: 6px 0;
}
.goal-row .plus { color: var(--green); font-size: 26px; font-weight: 700; line-height: 1; }
.goal-row .txt { flex: 1; text-align: center; }
.goal-row .sq { width: 18px; height: 18px; background: var(--green); border-radius: 4px; }

/* ===== شبكة الأقسام ===== */
.sections {
  padding: 8px 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ✅ ملاحظة: أنماط .sec-card تُعرَّف بالكامل في index.css */

/* ===== الهيدر الموحد ===== */
.athkar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
  margin-bottom: 6px;
}
.athkar-header h2 {
  font-family: 'Amiri', serif;
  font-size: 26px;
  color: var(--green);
  font-weight: 700;
}
.athkar-header .nav-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--green);
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.athkar-header .nav-btn:hover { background: var(--green-light); border-color: var(--green); }

/* ===== الشريط السفلي ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(31, 78, 61, .06);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding: 8px 4px max(8px, var(--safe-bottom));
  z-index: 30;
}
.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 2px;
  font-weight: 500;
  transition: color .2s, background .2s;
  border-radius: 12px;
  position: relative;
}
.bn-item .ico { font-size: 22px; line-height: 1; transition: transform .2s; }
.bn-item .lbl { line-height: 1.2; white-space: nowrap; }
.bn-item.active { color: var(--green); font-weight: 800; }
.bn-item.active .ico { transform: translateY(-1px) scale(1.05); }
.bn-item.active::before {
  content: '';
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 3px;
  background: var(--green);
  border-radius: 0 0 4px 4px;
}
.bn-item:hover { color: var(--green); background: rgba(31, 78, 61, .04); }

.fade-in { animation: fade .35s ease both; }
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sec-title {
  font-family: 'Amiri', serif;
  text-align: center;
  color: var(--green);
  font-size: 26px;
  font-weight: 700;
  padding: 18px 16px 14px;
}

.menu-list { padding: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.menu-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  transition: transform .15s, box-shadow .2s;
  cursor: pointer;
  border: 1px solid transparent;
}
.menu-item:hover { transform: translateX(-2px); border-color: var(--line); }
.menu-item .ico { width: 26px; height: 26px; display: grid; place-items: center; color: var(--green); font-size: 20px; flex: 0 0 auto; }
.menu-item .lbl { flex: 1; text-align: right; }
.menu-item .chev { color: #C8C2B5; font-size: 18px; flex: 0 0 auto; }

.menu-section-title {
  font-family: 'Amiri', serif;
  font-size: 17px;
  color: var(--green);
  font-weight: 700;
  margin: 18px 0 8px;
  padding: 4px 8px 4px 0;
  position: relative;
  border-bottom: 2px solid var(--line);
  display: flex;
  align-items: center;
  gap: 6px;
}
.menu-section-title:first-child { margin-top: 0; }
.menu-section-title::before {
  content: '';
  width: 4px; height: 18px;
  background: var(--gold);
  border-radius: 2px;
  display: inline-block;
}

.footer-version { text-align: center; color: var(--ink-soft); font-size: 12px; padding: 30px 0 12px; opacity: .7; font-weight: 500; }

/* ============================================================
   🌙 الوضع الليلي — الأساسي
   ============================================================ */
body.dark {
  --cream: #101A16;
  --cream-2: #0C1411;
  --white: #1A241F;
  --ink: #E8E3D6;
  --ink-soft: #9AA5A0;
  --line: #2A3630;
  --green-light: #1C3229;
}
body.dark .top-logo img { mix-blend-mode: screen; filter: contrast(1.15) saturate(1.3) brightness(1.2); }
body.dark .clock-line { background: var(--white); border-color: var(--line); color: var(--gold); }
body.dark .bottom-nav { background: var(--white); border-top-color: var(--line); }
body.dark .bn-item:hover { background: rgba(255, 255, 255, .04); }

/* ============================================================
   🌙 تحسينات إضافية للوضع الليلي
   ============================================================ */

body.dark .top-logo img {
  filter: brightness(1.1) contrast(1.05)
          drop-shadow(0 6px 18px rgba(201, 162, 39, .35));
  background: transparent;
}

body.dark .date-line { color: #d4c08a; }
body.dark .clock-line {
  background: #1A241F;
  border-color: var(--line);
  color: var(--gold);
}

body.dark .chip {
  background: #1A241F;
  border-color: var(--line);
  color: var(--ink);
}
body.dark .chip:hover {
  border-color: var(--gold);
  background: rgba(201, 162, 39, .08);
}
body.dark .chip.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

body.dark .card {
  background: #1A241F;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
body.dark .card .info .lbl { color: var(--gold-light); }
body.dark .card .info .val { color: var(--gold); }

body.dark .lang-bar .theme-toggle {
  background: rgba(201, 162, 39, .15);
  color: var(--gold);
  border-color: rgba(201, 162, 39, .4);
}
body.dark .lang-bar .theme-toggle:hover {
  background: rgba(201, 162, 39, .25);
}

body.dark .menu-item {
  background: #1A241F;
  color: var(--ink);
}
body.dark .menu-item:hover {
  border-color: var(--gold);
  background: rgba(201, 162, 39, .06);
}
body.dark .menu-section-title {
  color: var(--gold);
  border-bottom-color: var(--line);
}

body.dark input,
body.dark select,
body.dark textarea {
  background: #131C18;
  color: var(--ink);
  border-color: var(--line);
}
body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .12);
}

/* ============================================================
   📱 استجابة كاملة
   ============================================================ */

@media (max-width: 359px) {
  .app { padding-left: 12px; padding-right: 12px; padding-bottom: calc(20px + var(--safe-bottom)); }
  .title-bar h1 { font-size: 32px; }
  .title-bar { gap: 8px; }
  .lang-btn { padding: 6px 12px; font-size: 11px; }
  .top-logo img { width: clamp(140px, 60vw, 180px); }
  .date-line { font-size: 11px; }
  .clock-line { font-size: 12px; padding: 3px 10px; }
  .chips { justify-content: flex-start; flex-wrap: nowrap; gap: 6px; padding: 4px 0 10px; }
  .chip { padding: 7px 12px; font-size: 11.5px; }
  .sections { grid-template-columns: 1fr 1fr; gap: 8px; }
  .card { padding: 14px; }
  .tasks { gap: 10px 6px; }
  .task { font-size: 12px; gap: 5px; }
  .task input { width: 18px; height: 18px; border-radius: 5px; }
  .task input:checked::after { font-size: 12px; }
  .progress-ring { width: 56px; height: 56px; }
  .progress-ring span { font-size: 12px; }
  .tracker-head .headline h3 { font-size: 18px; }
  .tracker-head .headline p { font-size: 11px; }
  .resume .btn-play { padding: 9px 14px; font-size: 13px; }
  .resume .info .val { font-size: 15px; }
  .resume .thumb { width: 42px; height: 42px; font-size: 18px; }
  .bn-item .lbl { font-size: 9px; }
  .bn-item .ico { font-size: 18px; }
  .menu-item { padding: 12px 14px; font-size: 13px; }
  .sec-title { font-size: 20px; padding: 14px 12px 10px; }
  .athkar-header h2 { font-size: 20px; }
  .athkar-header .nav-btn { width: 36px; height: 36px; font-size: 17px; }
}

@media (min-width: 360px) and (max-width: 389px) {
  .app { padding-left: 14px; padding-right: 14px; }
  .title-bar h1 { font-size: 38px; }
  .top-logo img { width: clamp(180px, 52vw, 240px); }
  .chips { justify-content: flex-start; flex-wrap: nowrap; }
  .sections { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 16px; }
  .tasks { gap: 12px 8px; }
  .task { font-size: 13px; }
  .task input { width: 20px; height: 20px; }
  .progress-ring { width: 62px; height: 62px; }
  .progress-ring span { font-size: 13px; }
  .tracker-head .headline h3 { font-size: 20px; }
  .tracker-head .headline p { font-size: 12px; }
  .bn-item .lbl { font-size: 10px; }
  .bn-item .ico { font-size: 19px; }
  .menu-item { padding: 13px 15px; font-size: 13.5px; }
}

@media (min-width: 390px) and (max-width: 411px) {
  .title-bar h1 { font-size: 42px; }
  .top-logo img { width: clamp(200px, 50vw, 260px); }
  .sections { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { padding: 18px 20px; }
  .tasks { gap: 14px 12px; }
  .task { font-size: 14.5px; }
  .task input { width: 22px; height: 22px; }
  .progress-ring { width: 68px; height: 68px; }
  .tracker-head .headline h3 { font-size: 22px; }
  .tracker-head .headline p { font-size: 13px; }
  .bn-item .lbl { font-size: 10.5px; }
}

@media (min-width: 412px) and (max-width: 479px) {
  .title-bar h1 { font-size: 44px; }
  .top-logo img { width: clamp(210px, 48vw, 280px); }
  .sections { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { padding: 20px 22px; }
  .tasks { gap: 15px 13px; }
  .task { font-size: 15px; }
  .task input { width: 23px; height: 23px; }
  .progress-ring { width: 72px; height: 72px; }
  .bn-item .lbl { font-size: 11px; }
  .bn-item .ico { font-size: 21px; }
}

@media (min-width: 480px) and (max-width: 767px) {
  .title-bar h1 { font-size: 48px; }
  .top-logo img { width: clamp(220px, 45vw, 320px); }
  .sections { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card { padding: 22px 26px; }
  .tasks { gap: 16px 14px; }
  .task { font-size: 15.5px; }
  .task input { width: 25px; height: 25px; }
  .bn-item .lbl { font-size: 11.5px; }
  .bn-item .ico { font-size: 23px; }
}

@media (min-width: 768px) and (max-width: 819px) {
  .title-bar h1 { font-size: 50px; }
  .top-logo img { width: clamp(240px, 32vw, 320px); }
  .chips { justify-content: center; flex-wrap: wrap; }
  .sections { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .card { padding: 22px 26px; }
  .task { font-size: 16px; }
  .task input { width: 26px; height: 26px; }
  .bn-item .lbl { font-size: 12px; }
  .bn-item .ico { font-size: 24px; }
  .menu-item { padding: 18px 22px; font-size: 16px; }
  .menu-list { max-width: 760px; margin: 0 auto; }
}

@media (min-width: 820px) and (max-width: 1023px) {
  .title-bar h1 { font-size: 52px; }
  .top-logo img { width: clamp(260px, 28vw, 340px); }
  .chips { justify-content: center; flex-wrap: wrap; }
  .sections { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .card { padding: 24px 28px; }
  .tasks { gap: 18px 16px; }
  .task { font-size: 16px; }
  .bn-item .lbl { font-size: 12.5px; }
  .bn-item .ico { font-size: 25px; }
  .menu-list { max-width: 820px; margin: 0 auto; }
  .stats { gap: 12px; }
  .stat { padding: 16px 10px; }
  .stat-val { font-size: 22px; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .app { padding-left: 50px; padding-right: 50px; }
  .title-bar h1 { font-size: 56px; }
  .top-logo img { width: clamp(280px, 22vw, 360px); }
  .sections { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .card { padding: 24px 28px; }
  .tasks { gap: 18px 16px; }
  .task { font-size: 16px; }
  .menu-list { max-width: 900px; margin: 0 auto; }
  .bottom-nav { max-width: 720px; left: 50%; right: auto; transform: translateX(-50%); border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: none; }
}

@media (min-width: 1280px) and (max-width: 1439px) {
  .app { padding-left: 60px; padding-right: 60px; }
  .title-bar h1 { font-size: 58px; }
  .top-logo img { width: clamp(300px, 20vw, 380px); }
  .sections { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .card { padding: 26px 30px; }
  .menu-list { max-width: 950px; margin: 0 auto; }
  .bottom-nav { max-width: 800px; left: 50%; right: auto; transform: translateX(-50%); border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: none; }
}

@media (min-width: 1440px) and (max-width: 1919px) {
  .app { max-width: 1500px; padding-left: 80px; padding-right: 80px; }
  .title-bar h1 { font-size: 62px; }
  .top-logo img { width: clamp(320px, 18vw, 400px); }
  .sections { grid-template-columns: repeat(4, 1fr); gap: 22px; }
  .card { padding: 28px 32px; }
  .menu-list { max-width: 1000px; margin: 0 auto; }
  .bottom-nav { max-width: 900px; left: 50%; right: auto; transform: translateX(-50%); border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: none; }
}

@media (min-width: 1920px) {
  .app { max-width: 1700px; }
  .title-bar h1 { font-size: 68px; }
  .top-logo img { width: 420px; }
  .sections { grid-template-columns: repeat(4, 1fr); gap: 26px; }
  .card { padding: 30px 36px; }
  .menu-list { max-width: 1100px; margin: 0 auto; }
  .bottom-nav { max-width: 1000px; left: 50%; right: auto; transform: translateX(-50%); border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: none; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .top-logo { padding: 8px 16px 0; }
  .top-logo img { width: clamp(100px, 18vw, 150px); }
  .title-bar h1 { font-size: 30px; }
  .datetime-line { display: none; }
  .chips { padding: 4px 0 8px; }
  .app { padding-bottom: 80px; }
  .bottom-nav { padding: 4px 4px max(4px, var(--safe-bottom)); }
  .bn-item .ico { font-size: 18px; }
  .bn-item .lbl { font-size: 9px; }
}

@media (max-width: 480px) {
  html, body { overflow-x: hidden; }
}

@media (hover: none) and (pointer: coarse) {
  .chip, .bn-item, .menu-item, .lang-btn, .athkar-header .nav-btn {
    min-height: 44px;
  }
  .chip { display: inline-flex; align-items: center; justify-content: center; }
  .bn-item { min-height: 52px; }
}

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

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .top-logo img { image-rendering: -webkit-optimize-contrast; }
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   📜 الخلفية الإسلامية — نقوش CSS خالصة (بدون صور خارجية)
   ✅ السبب: 4 ملفات SVG المذكورة سابقًا غير موجودة على السيرفر
   ============================================================ */

html, body {
  background-color: #F0EADA;
  background-image:
    /* نجمة إسلامية بسيطة: نقطتان متقاطعتان */
    radial-gradient(circle at 50% 50%, rgba(201, 162, 39, 0.08) 1px, transparent 1.5px),
    radial-gradient(circle at 0 0,     rgba(31, 78, 61, 0.04) 1px, transparent 1.5px);
  background-size: 24px 24px, 24px 24px;
  background-position: 0 0, 12px 12px;
  background-attachment: fixed, fixed;
}

body.dark {
  background-color: #0A1510 !important;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(228, 204, 110, 0.06) 1px, transparent 1.5px),
    radial-gradient(circle at 0 0,     rgba(255, 255, 255, 0.03) 1px, transparent 1.5px) !important;
  background-size: 24px 24px, 24px 24px !important;
  background-position: 0 0, 12px 12px !important;
  background-attachment: fixed, fixed !important;
}

@media (max-width: 700px) {
  html, body {
    background-size: 20px 20px, 20px 20px;
    background-position: 0 0, 10px 10px;
  }
  body.dark {
    background-size: 20px 20px, 20px 20px !important;
    background-position: 0 0, 10px 10px !important;
  }
}

.app,
.container,
main {
  background: transparent;
}

/* ============================================================
   ✨ تفاعلات وتحسينات بصرية
   ============================================================ */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.4, 0, .2, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

.wirdi-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(201, 162, 39, .35);
  transform: scale(0);
  animation: wirdiRipple .65s ease-out;
  pointer-events: none;
  z-index: 1;
}

@keyframes wirdiRipple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

.main-header.scrolled {
  padding-top: 4px !important;
}

.main-header.scrolled .top-logo img {
  width: clamp(60px, 10vw, 90px) !important;
  transition: width .3s ease;
}

.main-header.scrolled .main-title {
  font-size: clamp(20px, 3.5vw, 30px) !important;
  transition: font-size .3s ease;
}

.main-header.scrolled .brand-tagline {
  display: none;
}

.main-header.scrolled .greeting-block {
  display: none;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
  .wirdi-ripple { animation: none; }
  .main-header.scrolled .top-logo img,
  .main-header.scrolled .main-title { transition: none; }
}