/* ===========================================================
   Dalîl al-Hajj — Stylesheet (v2)
   Inspiration : géométrie islamique, palette nuit & or
   =========================================================== */

:root {
  --bg-deep: #0a1f1a;
  --bg-card: #112d26;
  --bg-card-2: #15392f;
  --bg-elev: #1a4639;
  --ink: #f4ecd8;
  --ink-soft: #c9bfa6;
  --ink-muted: #8a9690;
  --gold: #d4a857;
  --gold-soft: #e8c98a;
  --gold-deep: #a07d34;
  --emerald: #2d8a6e;
  --emerald-deep: #1d5a48;
  --rose: #b87979;
  --red: #c75050;
  --border: rgba(212, 168, 87, 0.18);
  --border-strong: rgba(212, 168, 87, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.35);

  --font-ar: "Amiri", "Scheherazade New", "Traditional Arabic", serif;
  --font-fr: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-fr);
  background: var(--bg-deep);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  background-image:
    radial-gradient(at 20% 0%, rgba(45, 138, 110, 0.15) 0px, transparent 50%),
    radial-gradient(at 80% 100%, rgba(212, 168, 87, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ==================== HEADER ==================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(10, 31, 26, 0.88);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 1.5rem;
  padding-top: max(0.8rem, env(safe-area-inset-top));
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--bg-deep);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(212, 168, 87, 0.3);
}

.brand-text h1 {
  font-family: var(--font-ar);
  font-size: 1.6rem;
  color: var(--gold-soft);
  line-height: 1;
  margin-bottom: 0.15rem;
}

.brand-text p {
  font-size: 0.74rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

.header-info {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.info-pill {
  background: rgba(212, 168, 87, 0.1);
  color: var(--gold-soft);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.info-pill:hover { background: rgba(212, 168, 87, 0.2); border-color: var(--gold); }

.top-nav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 0.25rem;
  scroll-snap-type: x proximity;
}

.top-nav::-webkit-scrollbar { height: 4px; }
.top-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.nav-btn:hover { border-color: var(--gold); color: var(--gold-soft); background: rgba(212, 168, 87, 0.08); }
.nav-btn.active { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); font-weight: 600; }

/* ==================== VIEWS ==================== */
#app-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.view {
  display: none;
  animation: fadeIn 0.4s ease;
}

.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.view-title {
  font-size: 2rem;
  color: var(--gold-soft);
  margin-bottom: 0.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.view-sub {
  color: var(--ink-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  font-style: italic;
}

/* ==================== HOME / HERO ==================== */
.hero h2 {
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
  color: var(--ink);
  font-weight: 600;
}

.intro { color: var(--ink-soft); font-size: 1.02rem; margin-bottom: 1.5rem; }
.intro strong { color: var(--gold-soft); font-weight: 600; }

.ayah {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  margin-bottom: 1rem;
  overflow: hidden;
}

.ayah::before, .ayah::after {
  content: "❋";
  position: absolute;
  color: var(--gold);
  opacity: 0.35;
  font-size: 1.4rem;
}

.ayah::before { top: 0.6rem; left: 0.8rem; }
.ayah::after  { bottom: 0.6rem; right: 0.8rem; }

.ayah .ar {
  font-family: var(--font-ar);
  font-size: 1.8rem;
  color: var(--gold-soft);
  line-height: 2;
  margin-bottom: 0.8rem;
  direction: rtl;
}

.ayah .fr { font-size: 0.92rem; color: var(--ink-soft); font-style: italic; }

.callout {
  background: rgba(184, 121, 121, 0.08);
  border-left: 3px solid var(--rose);
  padding: 1rem 1.25rem;
  border-radius: 0 12px 12px 0;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.callout.info    { background: rgba(45, 138, 110, 0.1); border-left-color: var(--emerald); }
.callout.success { background: rgba(45, 138, 110, 0.12); border-left-color: var(--emerald); color: var(--gold-soft); font-weight: 500; }

/* ==================== CARDS GRID ==================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.2rem;
  text-align: left;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); }

.card-num {
  font-family: var(--font-ar);
  position: absolute;
  top: 0.7rem;
  right: 1rem;
  font-size: 2.4rem;
  color: var(--gold);
  opacity: 0.25;
  line-height: 1;
}

.card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--gold-soft); font-weight: 600; }
.card p { font-size: 0.88rem; color: var(--ink-muted); line-height: 1.5; }

/* ==================== PROGRESS ==================== */
.progress-summary, .hajj-countdown {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
  margin-top: 2rem;
}

.progress-summary h3, .hajj-countdown h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  color: var(--gold-soft);
  font-weight: 600;
}

.progress-bar {
  height: 8px;
  background: rgba(212, 168, 87, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0%;
}

#progressText { font-size: 0.85rem; color: var(--ink-muted); margin-bottom: 0.8rem; }

/* ==================== BUTTONS ==================== */
.btn-primary, .btn-secondary, .btn-tertiary {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 600;
}
.btn-primary:hover { background: var(--gold-soft); }
.btn-primary.big { padding: 0.85rem 1.5rem; font-size: 1rem; }

.btn-secondary {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--border);
}
.btn-secondary:hover { color: var(--gold-soft); border-color: var(--gold); background: rgba(212, 168, 87, 0.08); }

.btn-tertiary {
  background: transparent;
  color: var(--ink-muted);
  border-color: transparent;
  font-size: 0.82rem;
}
.btn-tertiary:hover { color: var(--rose); }

/* ==================== SUBSECTION ==================== */
.subsection {
  margin: 2rem 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.subsection:last-child { border-bottom: none; }

.subsection h3 {
  font-size: 1.25rem;
  color: var(--gold-soft);
  margin-bottom: 1rem;
  font-weight: 600;
  padding-left: 1rem;
  border-left: 3px solid var(--gold);
}

.subsection h4 { font-size: 0.95rem; margin: 1.2rem 0 0.6rem; color: var(--ink); font-weight: 600; }
.subsection ul, .subsection ol { padding-left: 1.4rem; color: var(--ink-soft); }
.subsection ul li, .subsection ol li { margin-bottom: 0.5rem; line-height: 1.6; }
.subsection strong { color: var(--gold-soft); font-weight: 600; }
.subsection em { color: var(--ink); font-style: italic; }

/* Check / Step lists */
.check-list, .step-list { list-style: none; padding-left: 0; }

.check-list li, .step-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.7rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.check-list li.checked::before {
  background: var(--gold);
  content: "✓";
  color: var(--bg-deep);
  text-align: center;
  font-size: 0.7rem;
  line-height: 14px;
  font-weight: bold;
}

.check-list li.checked { opacity: 0.55; text-decoration: line-through; }

.step-list { counter-reset: step; }

.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 24px;
  height: 24px;
  background: var(--bg-elev);
  color: var(--gold);
  border-radius: 50%;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 24px;
  border: 1px solid var(--border-strong);
}

/* Packing grid */
.packing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.packing-group {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.packing-group h4 {
  color: var(--gold-soft);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.5rem;
}

.packing-group .check-list li { font-size: 0.88rem; }

/* ==================== DUA CARDS ==================== */
.dua-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.4rem;
  margin: 1.2rem 0;
  position: relative;
}

.dua-card.highlight {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--bg-card-2) 0%, var(--bg-elev) 100%);
  box-shadow: 0 0 0 1px var(--gold) inset, 0 8px 24px rgba(212, 168, 87, 0.1);
}

.dua-label {
  font-size: 0.78rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--border);
}

.dua-ar {
  font-family: var(--font-ar);
  font-size: 1.45rem;
  line-height: 2.2;
  color: var(--gold-soft);
  direction: rtl;
  text-align: right;
  margin-bottom: 1rem;
  font-weight: 400;
}

.dua-tr {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 0.7rem;
  letter-spacing: 0.01em;
}

.dua-fr { color: var(--ink); font-size: 0.95rem; line-height: 1.65; }

.dua-note {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--border);
  font-style: italic;
}

.dua-card h4 {
  color: var(--gold);
  font-size: 0.95rem;
  margin: 1.5rem 0 0.7rem;
  font-weight: 600;
  border-top: 1px dashed var(--border);
  padding-top: 1rem;
}
.dua-card h4:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.dua-search { margin-bottom: 1.5rem; }
.dua-search input {
  width: 100%;
  padding: 0.85rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
}
.dua-search input:focus { outline: none; border-color: var(--gold); }

.dua-card.hidden-by-search { display: none; }

/* ==================== STEPS ==================== */
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 1.4rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.step.important {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(212, 168, 87, 0.15) inset;
}

.step-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: rgba(212, 168, 87, 0.04);
}

.step-badge {
  background: var(--gold);
  color: var(--bg-deep);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.step-head h3 { flex: 1; font-size: 1.15rem; color: var(--gold-soft); font-weight: 600; min-width: 200px; }

.step-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
}

.step-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}

.step.completed { opacity: 0.7; border-color: var(--emerald); }
.step.completed .step-head { background: rgba(45, 138, 110, 0.1); }

.step-body { padding: 1.4rem; }

.step-body h4 { color: var(--gold-soft); font-size: 0.95rem; margin: 1.2rem 0 0.7rem; font-weight: 600; }
.step-body h4:first-child { margin-top: 0; }
.step-body ul, .step-body ol { padding-left: 1.4rem; margin-bottom: 1rem; color: var(--ink-soft); }
.step-body li { margin-bottom: 0.5rem; line-height: 1.6; }
.step-body strong { color: var(--gold-soft); font-weight: 600; }
.step-body em { color: var(--ink); }
.step-body p { margin-bottom: 0.8rem; color: var(--ink-soft); }

.note {
  font-size: 0.88rem;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--ink-muted);
  padding: 0.6rem 0.9rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* Accordion */
.accordion {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin-top: 0.8rem;
  border: 1px solid var(--border);
}

.accordion summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--gold-soft);
  font-size: 0.92rem;
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}

.accordion summary::after {
  content: "›";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transition: transform 0.2s ease;
  color: var(--gold);
}

.accordion[open] summary::after { transform: translateY(-50%) rotate(270deg); }

.accordion ol.two-col {
  columns: 2;
  column-gap: 1.5rem;
  margin-top: 0.8rem;
  padding-left: 1.4rem;
}

.accordion ol.two-col li { break-inside: avoid; font-size: 0.85rem; margin-bottom: 0.35rem; }

/* Meditation/Reflection */
.meditation, .reflection {
  background: linear-gradient(135deg, rgba(45, 138, 110, 0.08), rgba(212, 168, 87, 0.05));
  border-left: 3px solid var(--emerald);
  padding: 1.2rem 1.3rem;
  margin: 1.2rem 0;
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

.meditation p, .reflection p { color: var(--ink-soft); font-size: 0.95rem; }
.meditation strong, .reflection strong { color: var(--gold-soft); font-style: normal; font-weight: 600; }

.reflection .signature {
  text-align: center;
  font-family: var(--font-ar);
  color: var(--gold);
  font-size: 1.4rem;
  margin-top: 1.5rem;
  font-style: normal;
  direction: rtl;
}

/* Link cards */
.link-card-row { margin: 0.8rem 0; }

.link-card {
  display: inline-block;
  margin: 0.4rem 0.4rem 0.4rem 0;
  padding: 0.7rem 1.1rem;
  background: rgba(212, 168, 87, 0.08);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--gold-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.link-card:hover { background: rgba(212, 168, 87, 0.18); border-color: var(--gold); transform: translateX(3px); }

/* ==================== TOOLS ==================== */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 1.4rem;
  overflow: hidden;
}

.tool-head {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: rgba(212, 168, 87, 0.04);
}

.tool-head h3 {
  color: var(--gold-soft);
  font-size: 1.15rem;
  font-weight: 600;
}

.tool-note {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 1rem;
  font-style: italic;
  text-align: center;
}

/* Tasbih */
.tasbih-body { padding: 1.4rem; text-align: center; }

.tasbih-display { margin-bottom: 1.5rem; }

.tasbih-dhikr-ar {
  font-family: var(--font-ar);
  font-size: 2rem;
  color: var(--gold-soft);
  margin-bottom: 0.3rem;
  direction: rtl;
  line-height: 1.5;
}

.tasbih-dhikr-tr {
  color: var(--ink-muted);
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.tasbih-button {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--bg-elev) 0%, var(--bg-card-2) 100%);
  border: 3px solid var(--gold);
  color: var(--gold-soft);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all 0.1s ease;
  box-shadow: 0 0 30px rgba(212, 168, 87, 0.15), inset 0 0 30px rgba(212, 168, 87, 0.08);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tasbih-button:active { transform: scale(0.96); box-shadow: 0 0 50px rgba(212, 168, 87, 0.4), inset 0 0 30px rgba(212, 168, 87, 0.15); }

.tasbih-button.milestone { animation: pulse 0.5s ease; }

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); box-shadow: 0 0 60px rgba(212, 168, 87, 0.6); }
  100% { transform: scale(1); }
}

.tasbih-count {
  font-size: 4rem;
  font-weight: 700;
  font-family: var(--font-ar);
  line-height: 1;
  color: var(--gold);
}

.tasbih-target {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin-top: 0.3rem;
}

.tasbih-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0.8rem;
  justify-content: center;
}

.tasbih-controls .btn-secondary { font-size: 0.82rem; padding: 0.45rem 0.85rem; }
.tasbih-controls .btn-secondary.active { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); }

/* Counter cards (Tawaf/Sa'y/Ramy) */
.counter-body { padding: 1.4rem; text-align: center; }

.kaaba-visual {
  width: 200px;
  height: 200px;
  margin: 0 auto 1rem;
  position: relative;
}

.orbit-svg { width: 100%; height: 100%; }

.tawaf-dot {
  fill: var(--bg-elev);
  stroke: var(--gold);
  stroke-width: 1.5;
  transition: all 0.3s ease;
}

.tawaf-dot.done { fill: var(--gold); }

.counter-display { margin: 1rem 0 1.2rem; }
.counter-num { font-size: 3.5rem; font-weight: 700; color: var(--gold); line-height: 1; font-family: var(--font-ar); }
.counter-label { color: var(--ink-muted); font-size: 0.9rem; margin-top: 0.3rem; }

.counter-actions {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* Sa'y */
.say-visual { margin-bottom: 1rem; }

.say-track {
  position: relative;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: linear-gradient(90deg, var(--emerald-deep) 0%, var(--bg-elev) 50%, var(--emerald-deep) 100%);
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.say-pole {
  padding: 0.45rem 1rem;
  background: var(--bg-deep);
  border-radius: 8px;
  font-weight: 600;
  color: var(--gold-soft);
  font-size: 0.92rem;
  z-index: 2;
}

.say-progress {
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 4px;
  background: rgba(212, 168, 87, 0.15);
  border-radius: 2px;
}

.say-progress::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--say-pct, 0%);
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.say-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.say-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1.5px solid var(--gold);
  transition: all 0.2s ease;
}

.say-dot.done { background: var(--gold); }

/* Ramy */
.ramy-select { margin-bottom: 1rem; }
.ramy-select label { display: block; color: var(--ink-soft); margin-bottom: 0.4rem; font-size: 0.88rem; }

.ramy-select select {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.92rem;
}

.jamarat-list { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1rem; }

.jamara {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.jamara-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.jamara-title { color: var(--gold-soft); font-weight: 600; }
.jamara-count { color: var(--gold); font-family: var(--font-ar); font-weight: 700; font-size: 1.1rem; }

.jamara-pebbles {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.pebble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--gold);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.pebble:hover { transform: scale(1.1); }
.pebble.thrown { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); }
.pebble.thrown::after { content: "✓"; font-weight: bold; }

.jamara-throw {
  width: 100%;
  padding: 0.55rem;
  background: rgba(212, 168, 87, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--gold-soft);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.jamara-throw:hover { background: rgba(212, 168, 87, 0.18); }
.jamara-throw:disabled { opacity: 0.4; cursor: not-allowed; }
.jamara.complete { border-color: var(--emerald); background: rgba(45, 138, 110, 0.08); }

/* Jamarât aerial map */
.jamarat-map {
  margin-bottom: 1.2rem;
  text-align: center;
}

.jamarat-svg {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-deep);
}

.jamara-pillar { cursor: pointer; transition: opacity 0.2s ease; }
.jamara-pillar:hover ellipse { fill: var(--bg-elev); stroke-width: 3; }
.jamara-pillar.active ellipse { fill: var(--gold); stroke: var(--gold-soft); }
.jamara-pillar.done ellipse { fill: var(--emerald); stroke: var(--emerald); }
.jamara-pillar.dim { opacity: 0.35; }

.jamarat-map-note {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 0.8rem;
  font-style: italic;
}

/* TTS Audio button */
.tts-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.6rem;
  padding: 0.25rem 0.7rem;
  background: rgba(212, 168, 87, 0.1);
  color: var(--gold-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
}

.tts-btn:hover { background: rgba(212, 168, 87, 0.22); border-color: var(--gold); }
.tts-btn.playing { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); }
.tts-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.tts-btn svg { width: 14px; height: 14px; }

.dua-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* Qibla */
.qibla-body { padding: 1.4rem; text-align: center; }

.qibla-compass {
  width: 240px;
  height: 240px;
  margin: 0 auto 1.5rem;
  position: relative;
  background: radial-gradient(circle, var(--bg-card-2) 0%, var(--bg-deep) 100%);
  border: 3px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(212, 168, 87, 0.15), inset 0 0 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qibla-rose {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.qibla-rose span {
  position: absolute;
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.rose-n { top: 8px; left: 50%; transform: translateX(-50%); color: var(--rose); }
.rose-s { bottom: 8px; left: 50%; transform: translateX(-50%); }
.rose-e { right: 12px; top: 50%; transform: translateY(-50%); }
.rose-w { left: 12px; top: 50%; transform: translateY(-50%); }

.qibla-arrow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(0deg);
  transition: transform 0.5s ease;
}

.qibla-center {
  position: absolute;
  font-size: 1.3rem;
  color: var(--gold);
  z-index: 2;
}

.qibla-info p { margin-bottom: 0.3rem; color: var(--ink-soft); font-size: 0.95rem; }
.qibla-info strong { color: var(--gold-soft); }

/* Prayer times */
.prayer-body { padding: 1.4rem; }

.prayer-city-select { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.prayer-city-select label { color: var(--ink-soft); font-size: 0.9rem; }

.prayer-city-select select {
  flex: 1;
  min-width: 150px;
  padding: 0.55rem 0.9rem;
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
}

.prayer-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.7rem; }

.prayer-time-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  text-align: center;
}

.prayer-time-card.current { border-color: var(--gold); background: rgba(212, 168, 87, 0.08); }

.prayer-time-name {
  color: var(--gold-soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.prayer-time-name-ar { font-family: var(--font-ar); color: var(--ink-muted); font-size: 0.85rem; margin-bottom: 0.4rem; direction: rtl; }
.prayer-time-value { font-size: 1.3rem; font-weight: 600; color: var(--ink); font-family: var(--font-ar); }

/* ==================== JOURNAL ==================== */
.journal-editor {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.journal-form label {
  display: block;
  color: var(--gold-soft);
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0.9rem 0 0.4rem;
}

.journal-form input,
.journal-form textarea {
  width: 100%;
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.93rem;
  resize: vertical;
}

.journal-form input:focus, .journal-form textarea:focus { outline: none; border-color: var(--gold); }

.journal-actions { display: flex; gap: 0.7rem; margin-top: 1.2rem; flex-wrap: wrap; }

.journal-entries h3 {
  color: var(--gold-soft);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--gold);
}

.journal-list-container { display: flex; flex-direction: column; gap: 0.8rem; }

.journal-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
}

.journal-entry-date {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border);
}

.journal-entry-field { margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--ink-soft); }
.journal-entry-field strong { color: var(--gold-soft); font-weight: 600; }
.journal-entry-delete { background: transparent; border: none; color: var(--rose); cursor: pointer; font-size: 0.85rem; }
.journal-entry-delete:hover { color: var(--red); }

.empty-state { color: var(--ink-muted); font-style: italic; padding: 1.5rem; text-align: center; }

/* ==================== MY DUAS ==================== */
.dua-add {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.dua-add input, .dua-add select, .dua-add textarea {
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.93rem;
}

.dua-add input:focus, .dua-add select:focus, .dua-add textarea:focus { outline: none; border-color: var(--gold); }

.dua-categories h3 {
  color: var(--gold-soft);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--gold);
}

.my-duas-container { display: flex; flex-direction: column; gap: 0.6rem; }

.my-dua-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.my-dua-item.prayed { opacity: 0.65; background: rgba(45, 138, 110, 0.08); border-color: var(--emerald); }

.my-dua-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--bg-deep);
  transition: all 0.2s ease;
}

.my-dua-check.done { background: var(--gold); }
.my-dua-check.done::after { content: "✓"; font-weight: bold; }

.my-dua-body { flex: 1; }
.my-dua-name { color: var(--gold-soft); font-weight: 600; font-size: 0.98rem; margin-bottom: 0.25rem; }
.my-dua-cat { display: inline-block; background: rgba(212, 168, 87, 0.1); color: var(--gold); padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; margin-right: 0.4rem; }
.my-dua-note { color: var(--ink-muted); font-size: 0.85rem; margin-top: 0.3rem; line-height: 1.4; }

.my-dua-delete {
  background: transparent;
  border: none;
  color: var(--rose);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 0.4rem;
  align-self: flex-start;
}
.my-dua-delete:hover { color: var(--red); }

/* ==================== EMERGENCY ==================== */
.emergency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.emergency-card {
  background: linear-gradient(135deg, rgba(199, 80, 80, 0.15), rgba(199, 80, 80, 0.05));
  border: 1px solid rgba(199, 80, 80, 0.3);
  border-radius: 12px;
  padding: 1rem;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.emergency-card:hover { transform: translateY(-2px); border-color: var(--red); box-shadow: 0 8px 20px rgba(199, 80, 80, 0.2); }
.emergency-card strong { font-size: 1.5rem; color: var(--red); font-weight: 700; }
.emergency-card span { font-size: 0.78rem; color: var(--ink-soft); }

.personal-contacts {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.3rem;
}

.personal-contacts label { display: block; color: var(--gold-soft); font-size: 0.85rem; margin: 0.85rem 0 0.35rem; font-weight: 600; }
.personal-contacts label:first-child { margin-top: 0; }

.personal-contacts input {
  width: 100%;
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-family: inherit;
  font-size: 0.92rem;
}

.personal-contacts input:focus { outline: none; border-color: var(--gold); }
.personal-contacts .btn-primary { margin-top: 1rem; }

.warning-card {
  background: rgba(199, 80, 80, 0.08);
  border-left: 3px solid var(--red);
  padding: 1.2rem 1.4rem;
  border-radius: 0 12px 12px 0;
}

.warning-card ul { padding-left: 1.4rem; margin-bottom: 0.8rem; }
.warning-card li { color: var(--ink-soft); }
.warning-card strong { color: var(--rose); }

.phrasebook { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.8rem; }

.phrase {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) 2fr;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  align-items: center;
}

.ph-ar { font-family: var(--font-ar); font-size: 1.15rem; color: var(--gold-soft); direction: rtl; text-align: right; }
.ph-tr { font-style: italic; color: var(--ink-muted); font-size: 0.88rem; }
.ph-fr { color: var(--ink); font-size: 0.92rem; }

/* ==================== MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
}

.modal-close:hover { color: var(--rose); background: rgba(255, 255, 255, 0.05); }

.modal h2 { color: var(--gold-soft); font-size: 1.4rem; margin-bottom: 0.5rem; padding-right: 2rem; }
.modal-sub { color: var(--ink-muted); font-size: 0.88rem; margin-bottom: 1.5rem; }

.marja-list { display: flex; flex-direction: column; gap: 0.5rem; }

.marja-option {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.marja-option:hover { border-color: var(--gold); background: rgba(212, 168, 87, 0.08); }
.marja-option.active { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); font-weight: 600; }
.marja-option span { display: block; font-size: 0.8rem; color: var(--ink-muted); margin-top: 0.2rem; font-style: italic; }
.marja-option.active span { color: rgba(10, 31, 26, 0.7); }

/* ==================== FOOTER ==================== */
.app-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem 3rem;
  max-width: 880px;
  margin: 2rem auto 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
}

.app-footer p { margin-bottom: 1rem; }
.app-footer strong { color: var(--ink-soft); }
.app-footer em { color: var(--ink-soft); font-style: italic; }

.footer-prayer {
  font-family: var(--font-ar);
  font-size: 1.15rem;
  color: var(--gold-soft);
  direction: rtl;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
  line-height: 2;
}

.footer-version {
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
  .app-header { padding: 0.7rem 1rem; }
  .brand-text h1 { font-size: 1.35rem; }
  .nav-btn { font-size: 0.78rem; padding: 0.4rem 0.85rem; }
  #app-main { padding: 1.5rem 1rem 3rem; }
  .view-title { font-size: 1.55rem; }
  .ayah .ar { font-size: 1.45rem; }
  .dua-ar { font-size: 1.25rem; line-height: 2; }
  .step-head { padding: 1rem; }
  .step-head h3 { font-size: 1rem; min-width: auto; }
  .step-body { padding: 1.1rem; }
  .accordion ol.two-col { columns: 1; }
  .cards-grid { grid-template-columns: 1fr; }
  .tasbih-button { width: 170px; height: 170px; }
  .tasbih-count { font-size: 3.4rem; }
  .qibla-compass { width: 200px; height: 200px; }
  .phrase { grid-template-columns: 1fr 1fr; }
  .phrase .ph-fr { grid-column: 1 / -1; }
}

/* ==================== I18N — Language switching ==================== */
[data-i18n] { display: inline; }
html[data-lang="fr"] [data-i18n="en"] { display: none !important; }
html[data-lang="en"] [data-i18n="fr"] { display: none !important; }

/* Block-level translations (for paragraphs, headings inside containers) */
[data-i18n-block] { display: block; }
html[data-lang="fr"] [data-i18n-block="en"] { display: none !important; }
html[data-lang="en"] [data-i18n-block="fr"] { display: none !important; }

/* Language selector pill */
#langSelector {
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(212, 168, 87, 0.18);
}

#langSelector:hover { background: rgba(212, 168, 87, 0.28); }

/* ==================== KAFFÂRÂT ==================== */
.kaffarat-accordion h5 {
  color: var(--gold);
  font-size: 1rem;
  margin: 1.4rem 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border);
  font-weight: 600;
}

.kaffarat-accordion h5:first-of-type { margin-top: 1rem; }

.kaffara-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0.8rem;
}

.kaffara-list li {
  position: relative;
  padding: 0.6rem 0.9rem 0.6rem 1.5rem;
  margin-bottom: 0.4rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  line-height: 1.55;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.kaffara-list li::before {
  content: "◆";
  position: absolute;
  left: 0.5rem;
  top: 0.6rem;
  color: var(--gold);
  font-size: 0.75rem;
}

.kaffara-list li strong { color: var(--gold-soft); font-weight: 600; }
.kaffara-list li em { color: var(--ink); font-style: italic; }

.kaffara-list li.kaffara-note {
  background: rgba(199, 80, 80, 0.08);
  border-left: 2px solid var(--rose);
  margin-top: 0.6rem;
}

.kaffara-list li.kaffara-note::before { content: ""; }

.kaffara-warning {
  background: rgba(199, 80, 80, 0.1);
  border: 1px solid rgba(199, 80, 80, 0.3);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.kaffara-warning strong { color: var(--rose); }

/* ==================== ABOUT / SADAQA JÂRIYA ==================== */
.card-about {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(212, 168, 87, 0.12) 100%);
  border-color: var(--border-strong);
}

.card-about h3 { color: var(--gold); }

.about-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.6rem;
  margin-bottom: 1.5rem;
}

.bismillah {
  font-family: var(--font-ar);
  text-align: center;
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  direction: rtl;
  letter-spacing: 0.02em;
}

.about-card > p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.about-card strong { color: var(--gold-soft); font-weight: 600; }

.about-dua-request, .about-share {
  background: rgba(45, 138, 110, 0.08);
  border-left: 3px solid var(--emerald);
  padding: 1.3rem 1.4rem;
  border-radius: 0 12px 12px 0;
  margin: 1.5rem 0;
}

.about-share {
  background: rgba(212, 168, 87, 0.08);
  border-left-color: var(--gold);
}

.about-dua-request h3, .about-share h3 {
  font-size: 1.05rem;
  color: var(--gold-soft);
  margin-bottom: 0.8rem;
  font-weight: 600;
  border: none;
  padding: 0;
}

.about-dua-request ul {
  padding-left: 1.4rem;
  margin-bottom: 0.8rem;
}

.about-dua-request li {
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}

.dua-quote {
  font-style: italic;
  color: var(--ink-muted);
  margin-top: 0.8rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  font-size: 0.92rem;
}

.dua-quote em {
  font-family: var(--font-ar);
  color: var(--gold-soft);
  font-style: normal;
  font-size: 1.05rem;
  direction: rtl;
  display: inline-block;
}

.share-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.8rem;
}

.share-url {
  text-align: center;
  font-family: monospace;
  font-size: 0.88rem;
  color: var(--gold-soft);
  margin-top: 0.8rem;
  padding: 0.6rem 0.8rem;
  background: rgba(212, 168, 87, 0.08);
  border-radius: 8px;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.about-hadith {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1.4rem;
  margin: 1.8rem 0;
  text-align: center;
}

.hadith-ar {
  font-family: var(--font-ar);
  color: var(--gold-soft);
  font-size: 1.2rem;
  line-height: 2;
  direction: rtl;
  margin-bottom: 1rem;
}

.hadith-fr {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.6;
}

.about-signature {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
}

.about-signature p:first-child {
  font-family: var(--font-ar);
  color: var(--gold);
  font-size: 1.3rem;
  direction: rtl;
  margin-bottom: 0.6rem;
}

.signature-name {
  color: var(--ink-muted);
  font-size: 0.92rem;
  letter-spacing: 0.05em;
}

/* Sources officielles par marja */
.about-sources {
  background: rgba(45, 138, 110, 0.06);
  border-left: 3px solid var(--gold);
  padding: 1.3rem 1.4rem;
  border-radius: 0 12px 12px 0;
  margin: 1.8rem 0;
}

.about-sources h3 {
  font-size: 1.05rem;
  color: var(--gold-soft);
  margin-bottom: 0.8rem;
  font-weight: 600;
  border: none;
  padding: 0;
}

.about-sources > p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  line-height: 1.55;
}

.sources-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem 0;
}

.sources-list li {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.sources-list li strong {
  color: var(--gold-soft);
  display: block;
  margin-bottom: 0.2rem;
}

.sources-list a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(212, 168, 87, 0.3);
  text-underline-offset: 2px;
  word-break: break-all;
  font-size: 0.85rem;
}

.sources-list a:hover {
  color: var(--gold-soft);
  text-decoration-color: var(--gold);
}

.sources-note {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border);
}

.sources-note em { color: var(--gold-soft); font-style: italic; }

/* Welcome modal */
.welcome-modal {
  max-width: 520px;
  text-align: center;
}

.welcome-modal .bismillah {
  font-size: 1.7rem;
  margin-bottom: 1rem;
}

.welcome-modal h2 {
  color: var(--gold-soft);
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  padding-right: 0;
}

.welcome-modal .modal-sub {
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 1.2rem;
}

.welcome-modal p {
  color: var(--ink-soft);
  text-align: left;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.welcome-modal strong { color: var(--gold-soft); }

.welcome-asks {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0;
  text-align: left;
}

.welcome-asks li {
  background: rgba(212, 168, 87, 0.07);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.5;
}

.welcome-asks strong { color: var(--gold-soft); }

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.welcome-actions .btn-primary { width: 100%; }
.welcome-actions .btn-secondary { width: 100%; }

/* Footer credit */
.footer-credit {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.footer-credit strong {
  color: var(--gold-soft);
  font-weight: 600;
}

.footer-credit a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.footer-credit a:hover { text-decoration-color: var(--gold); }

/* ==================== CACHE STATUS BADGE ==================== */
.cache-status {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(10, 31, 26, 0.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: opacity 0.5s ease;
  bottom: calc(1rem + env(safe-area-inset-bottom));
}

.cache-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-muted);
  flex-shrink: 0;
}

.cache-status.loading .cache-dot {
  background: var(--gold);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.cache-status.ready {
  border-color: var(--emerald);
  color: var(--gold-soft);
}

.cache-status.ready .cache-dot {
  background: var(--emerald);
}

.cache-status.error {
  border-color: var(--rose);
  color: var(--rose);
}

.cache-status.error .cache-dot {
  background: var(--rose);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--bg-elev); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* ==================== PRINT ==================== */
@media print {
  .app-header, .top-nav, .step-check, .btn-secondary, .btn-primary, .btn-tertiary, .modal-backdrop, .info-pill { display: none; }
  body { background: white; color: black; }
  .view { display: block !important; page-break-before: always; }
  .dua-card, .step, .ayah { border: 1px solid #999; background: white !important; }
  .dua-ar { color: black; }
}
