/* Zikr Reminder — Core styles
   Mobile-first, modern, calming, glassmorphism + dark mode */

:root {
  /* Color tokens — Light theme */
  --c-bg: #f6f7f5;
  --c-bg-elev: #ffffff;
  --c-bg-soft: #f0f4ef;
  --c-text: #0f172a;
  --c-text-muted: #475569;
  --c-text-soft: #64748b;
  --c-border: rgba(15, 23, 42, 0.08);
  --c-border-strong: rgba(15, 23, 42, 0.14);

  --c-primary: #10b981;
  --c-primary-dark: #059669;
  --c-primary-soft: #d1fae5;
  --c-primary-glow: rgba(16, 185, 129, 0.25);

  --c-accent: #f59e0b;
  --c-accent-soft: #fef3c7;

  --c-danger: #ef4444;
  --c-success: #10b981;

  --c-glass: rgba(255, 255, 255, 0.7);
  --c-glass-border: rgba(255, 255, 255, 0.5);
  --c-glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);

  --grad-hero: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 50%, #fef3c7 100%);
  --grad-card: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(245, 158, 11, 0.05));
  --grad-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

  /* Spacing & shape */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 0 4px rgba(16, 185, 129, 0.12);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-arabic: 'Amiri', 'Inter', serif;

  --t-fast: 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-base: 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-slow: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);

  --nav-height: calc(72px + var(--safe-bot));
  --header-height: 64px;
}

[data-theme="dark"] {
  --c-bg: #07090d;
  --c-bg-elev: #0f1419;
  --c-bg-soft: #11161c;
  --c-text: #f1f5f9;
  --c-text-muted: #94a3b8;
  --c-text-soft: #64748b;
  --c-border: rgba(255, 255, 255, 0.06);
  --c-border-strong: rgba(255, 255, 255, 0.12);

  --c-primary: #34d399;
  --c-primary-dark: #10b981;
  --c-primary-soft: rgba(52, 211, 153, 0.15);
  --c-primary-glow: rgba(52, 211, 153, 0.3);

  --c-accent: #fbbf24;
  --c-accent-soft: rgba(251, 191, 36, 0.15);

  --c-glass: rgba(15, 20, 25, 0.6);
  --c-glass-border: rgba(255, 255, 255, 0.08);
  --c-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

  --grad-hero: linear-gradient(135deg, #0a1410 0%, #0f1f1c 50%, #1a1408 100%);
  --grad-card: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(251, 191, 36, 0.04));
  --grad-primary: linear-gradient(135deg, #34d399 0%, #10b981 100%);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #07090d;
    --c-bg-elev: #0f1419;
    --c-bg-soft: #11161c;
    --c-text: #f1f5f9;
    --c-text-muted: #94a3b8;
    --c-text-soft: #64748b;
    --c-border: rgba(255, 255, 255, 0.06);
    --c-border-strong: rgba(255, 255, 255, 0.12);

    --c-primary: #34d399;
    --c-primary-soft: rgba(52, 211, 153, 0.15);
    --c-glass: rgba(15, 20, 25, 0.6);
    --c-glass-border: rgba(255, 255, 255, 0.08);

    --grad-hero: linear-gradient(135deg, #0a1410 0%, #0f1f1c 50%, #1a1408 100%);
    --grad-card: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(251, 191, 36, 0.04));
  }
}

/* ==== Reset ==== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }
[hidden] { display: none !important; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
::selection { background: var(--c-primary-glow); color: var(--c-text); }

/* ==== Background particles ==== */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-particles span {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--c-primary);
  border-radius: 50%;
  opacity: 0.08;
  animation: float-up 20s linear infinite;
}
.bg-particles span:nth-child(1) { left: 10%; animation-delay: 0s; width: 6px; height: 6px; }
.bg-particles span:nth-child(2) { left: 25%; animation-delay: 4s; }
.bg-particles span:nth-child(3) { left: 40%; animation-delay: 8s; width: 4px; height: 4px; }
.bg-particles span:nth-child(4) { left: 55%; animation-delay: 12s; }
.bg-particles span:nth-child(5) { left: 70%; animation-delay: 2s; width: 10px; height: 10px; }
.bg-particles span:nth-child(6) { left: 85%; animation-delay: 6s; }
.bg-particles span:nth-child(7) { left: 15%; animation-delay: 10s; background: var(--c-accent); opacity: 0.06; }
.bg-particles span:nth-child(8) { left: 65%; animation-delay: 14s; background: var(--c-accent); opacity: 0.06; }
.bg-particles span:nth-child(9) { left: 30%; animation-delay: 16s; width: 5px; height: 5px; }
.bg-particles span:nth-child(10) { left: 80%; animation-delay: 18s; width: 7px; height: 7px; }

/* ==== Splash ==== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--grad-hero);
  transition: opacity 0.4s ease, visibility 0.4s;
}
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-inner { text-align: center; }
.splash-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.25rem;
  animation: breathe 2.4s ease-in-out infinite;
  filter: drop-shadow(0 12px 32px var(--c-primary-glow));
}
.splash-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.02em;
}
.splash-sub {
  font-size: 0.95rem;
  color: var(--c-text-muted);
  margin-top: 0.25rem;
}
.splash-loader {
  display: flex;
  gap: 6px;
  margin-top: 2rem;
  justify-content: center;
}
.splash-loader span {
  width: 6px; height: 6px;
  background: var(--c-primary);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite;
}
.splash-loader span:nth-child(2) { animation-delay: 0.2s; }
.splash-loader span:nth-child(3) { animation-delay: 0.4s; }

/* ==== Layout shell ==== */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--nav-height) + 12px);
  max-width: 540px;
  margin: 0 auto;
}
/* Desktop sidebar is hidden on mobile */
.desktop-nav { display: none; }
.app-content { display: contents; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.65rem;
  background: linear-gradient(to bottom, var(--c-bg) 70%, transparent);
  min-height: var(--header-height);
}
.header-title { flex: 1; min-width: 0; }
.header-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-sub {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-sub:empty { display: none; }
.header-actions { display: flex; gap: 0.25rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  color: var(--c-text);
  transition: background var(--t-fast), transform var(--t-fast);
  position: relative;
}
.icon-btn:hover { background: var(--c-bg-soft); }
.icon-btn:active { transform: scale(0.93); }
.bell-dot {
  position: absolute;
  top: 9px; right: 9px;
  width: 8px; height: 8px;
  background: var(--c-accent);
  border-radius: 50%;
  border: 2px solid var(--c-bg);
}

/* ==== View container ==== */
.view {
  padding: 0 1rem 2rem;
  animation: view-in 0.36s var(--t-base);
  overflow-x: hidden;
}
@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==== Bottom navigation ==== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 540px;
  height: var(--nav-height);
  padding: 8px 12px calc(8px + var(--safe-bot));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  align-items: center;
  background: var(--c-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--c-glass-border);
  z-index: 30;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--c-text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: var(--r-md);
  padding: 4px;
  transition: color var(--t-fast), transform var(--t-fast);
}
.nav-item:active { transform: scale(0.94); }
.nav-item.active { color: var(--c-primary); }
.nav-item.active svg { stroke-width: 2.2; }
.nav-center { position: relative; transform: translateY(-12px); }
.nav-center-orb {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 10px 24px var(--c-primary-glow), 0 0 0 6px var(--c-bg);
  transition: transform var(--t-fast);
}
.nav-center:active .nav-center-orb { transform: scale(0.92); }
.nav-center { gap: 0; }

/* ==== Buttons ==== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.96); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.95rem 1.75rem; font-size: 1rem; }
.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 8px 20px var(--c-primary-glow);
}
.btn-primary:hover { box-shadow: 0 12px 28px var(--c-primary-glow); }
.btn-secondary {
  background: var(--c-bg-elev);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn-secondary:hover { background: var(--c-bg-soft); }
.btn-ghost {
  background: transparent;
  color: var(--c-text-muted);
}
.btn-ghost:hover { color: var(--c-text); background: var(--c-bg-soft); }
.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--c-danger);
}
.btn-block { width: 100%; }

/* ==== Cards ==== */
.card {
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-glass {
  background: var(--c-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--c-glass-border);
  box-shadow: var(--c-glass-shadow);
}
.card-gradient {
  background: var(--grad-card);
  border: 1px solid var(--c-primary-soft);
}
.card h2, .card h3 { font-size: 1.05rem; font-weight: 700; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

/* ==== Pills ==== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--r-pill);
  background: var(--c-primary-soft);
  color: var(--c-primary-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
[data-theme="dark"] .pill { color: var(--c-primary); }

/* ==== Forms ==== */
.input, .textarea, .select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  color: var(--c-text);
  font-size: 0.95rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: var(--shadow-glow);
}
.textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
.input-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text-muted);
  margin-bottom: 0.5rem;
}

/* ==== Toggle ==== */
.toggle {
  position: relative;
  width: 46px;
  height: 26px;
  background: var(--c-border-strong);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--t-base);
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform var(--t-base);
  box-shadow: var(--shadow-sm);
}
.toggle.on { background: var(--c-primary); }
.toggle.on::after { transform: translateX(20px); }

/* ==== Progress ring ==== */
.ring {
  position: relative;
  width: 120px;
  height: 120px;
}
.ring svg { transform: rotate(-90deg); }
.ring circle {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}
.ring .ring-bg { stroke: var(--c-bg-soft); }
.ring .ring-fg {
  stroke: var(--c-primary);
  stroke-dasharray: var(--ring-len, 314);
  stroke-dashoffset: var(--ring-len, 314);
  transition: stroke-dashoffset 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 0 8px var(--c-primary-glow));
}
.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-label strong { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.ring-label small { font-size: 0.75rem; color: var(--c-text-muted); }

/* ==== Stat tiles ==== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.stat {
  padding: 1rem;
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  transition: transform var(--t-fast);
}
.stat:hover { transform: translateY(-2px); }
.stat-icon {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}
.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-text);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  margin-top: 2px;
}

/* ==== Task item ==== */
.task {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: 0.5rem;
  transition: all var(--t-base);
  cursor: pointer;
}
.task:active { transform: scale(0.99); }
.task-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--c-border-strong);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: all var(--t-base);
}
.task-check svg {
  width: 14px; height: 14px;
  stroke: white;
  stroke-width: 3;
  fill: none;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--t-base);
}
.task-emoji { font-size: 1.2rem; flex-shrink: 0; }
.task-content { flex: 1; min-width: 0; }
.task-title {
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-meta {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  margin-top: 2px;
}
.task-actions { display: flex; gap: 0.25rem; }
.task.done .task-check {
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.task.done .task-check svg { opacity: 1; transform: scale(1); }
.task.done .task-title {
  text-decoration: line-through;
  color: var(--c-text-muted);
}
.task.done { background: var(--c-bg-soft); }
.task.priority-high { border-left: 3px solid var(--c-accent); }

/* ==== Section header ==== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.75rem 0 0.85rem;
}
.section-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-link {
  font-size: 0.8rem;
  color: var(--c-primary);
  font-weight: 600;
}

/* ==== Empty state ==== */
.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--c-text-muted);
}
.empty-emoji {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}
.empty-title { color: var(--c-text); margin-bottom: 0.35rem; font-size: 1.05rem; }
.empty-sub { font-size: 0.9rem; }

/* ==== Badge ==== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  background: var(--c-bg-soft);
  border-radius: var(--r-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-text-muted);
}
.badge-primary { background: var(--c-primary-soft); color: var(--c-primary-dark); }
[data-theme="dark"] .badge-primary { color: var(--c-primary); }
.badge-accent { background: var(--c-accent-soft); color: #b45309; }
[data-theme="dark"] .badge-accent { color: var(--c-accent); }

/* ==== Quote card ==== */
.quote-card {
  position: relative;
  padding: 1.5rem;
  background: var(--grad-card);
  border: 1px solid var(--c-primary-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.quote-card::before {
  content: '"';
  position: absolute;
  top: -20px; left: 12px;
  font-family: Georgia, serif;
  font-size: 6rem;
  color: var(--c-primary);
  opacity: 0.15;
  line-height: 1;
}
.quote-text {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.55;
  font-style: italic;
  position: relative;
}
.quote-source {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--c-text-muted);
  font-style: normal;
}

/* ==== Nafl suggestion card ==== */
.nafl-card {
  position: relative;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(16, 185, 129, 0.06));
  border: 1px solid var(--c-primary-soft);
  cursor: pointer;
  overflow: hidden;
}
.nafl-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--c-primary-glow), transparent 70%);
  pointer-events: none;
}
.nafl-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  position: relative;
}
.nafl-emoji {
  font-size: 1.8rem;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--c-bg-elev);
  border-radius: var(--r-md);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.nafl-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-primary-dark);
  background: var(--c-primary-soft);
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
[data-theme="dark"] .nafl-pill { color: var(--c-primary); }
.nafl-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--c-border);
}

/* ==== Backup card (Profile) ==== */
.backup-card {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(16, 185, 129, 0.03));
}
.backup-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

/* ==== Seasonal / Hijri occasion hero card ==== */
.occasion-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(245, 158, 11, 0.06));
  border: 1px solid var(--c-primary-soft);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}
.occasion-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 110% -20%, rgba(245, 158, 11, 0.15), transparent 60%);
  pointer-events: none;
}
.occasion-icon {
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--c-bg-elev);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.occasion-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-primary-dark);
  margin-bottom: 4px;
}
[data-theme="dark"] .occasion-label { color: var(--c-primary); }
.occasion-text {
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--c-text);
  position: relative;
  z-index: 1;
}
/* Variant theming */
.occasion-ramadan { background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.06)); border-color: rgba(99, 102, 241, 0.3); }
.occasion-ramadan .occasion-label { color: #6366f1; }
.occasion-hajj, .occasion-arafah, .occasion-dhulhijjah, .occasion-eid_adha {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.06));
  border-color: rgba(245, 158, 11, 0.3);
}
.occasion-hajj .occasion-label, .occasion-arafah .occasion-label, .occasion-dhulhijjah .occasion-label { color: #b45309; }
[data-theme="dark"] .occasion-hajj .occasion-label, [data-theme="dark"] .occasion-arafah .occasion-label, [data-theme="dark"] .occasion-dhulhijjah .occasion-label { color: #fbbf24; }
.occasion-jumuah {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.06));
}

/* Today's Quran message — sticky daily verse */
.quote-day {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(168, 85, 247, 0.05));
  border-color: rgba(16, 185, 129, 0.25);
}
.quote-day-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-primary-dark);
  background: var(--c-primary-soft);
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-pill);
  margin-bottom: 0.75rem;
}
[data-theme="dark"] .quote-day-label { color: var(--c-primary); }

/* Reflection card smooth swap */
#reflection-card,
#hadith-card,
#dua-card { transition: opacity 0.25s ease; }
button.section-link {
  background: none;
  border: 0;
  font-size: 0.8rem;
  color: var(--c-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--r-pill);
}
button.section-link:hover { background: var(--c-primary-soft); }

/* ==== Du'a card ==== */
.dua-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(245, 158, 11, 0.04));
  border: 1px solid var(--c-primary-soft);
}
.dua-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary-dark);
  background: var(--c-primary-soft);
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-pill);
  margin-bottom: 0.75rem;
}
[data-theme="dark"] .dua-label { color: var(--c-primary); }
.dua-arabic {
  font-family: 'Amiri', serif;
  font-size: 1.25rem;
  line-height: 1.55;
  font-weight: 500;
  color: var(--c-text);
}

/* ==== Smart suggestion strip (dashboard) ==== */
.smart-tip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--c-bg-soft);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--r-md);
  margin-top: 1rem;
}
.smart-tip-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.smart-tip-text {
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--c-text);
}

/* ==== Growth (Progress page) ==== */
.growth-headline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
}
.growth-emoji {
  font-size: 1.8rem;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--c-bg-elev);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.growth-card .card-header { margin-bottom: 0.75rem; }
.growth-delta {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: var(--r-pill);
  letter-spacing: 0.02em;
}
.growth-delta.up { color: #047857; background: #d1fae5; }
.growth-delta.down { color: #b45309; background: #fef3c7; }
[data-theme="dark"] .growth-delta.up { color: #6ee7b7; background: rgba(16, 185, 129, 0.15); }
[data-theme="dark"] .growth-delta.down { color: #fcd34d; background: rgba(245, 158, 11, 0.15); }
.growth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.growth-cell {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.85rem;
  background: var(--c-bg-soft);
  border-radius: var(--r-md);
}
.growth-label {
  font-size: 0.7rem;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.growth-cell strong {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.growth-cell small {
  margin-top: 2px;
  font-size: 0.7rem;
}
.growth-best {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--c-border);
}

/* ==== Streak flame ==== */
.streak-flame {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: var(--grad-accent);
  color: white;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* ==== Toast (stacked queue) ==== */
.toast-host {
  position: fixed;
  top: calc(var(--safe-top) + 72px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: calc(100% - 2rem);
  max-width: 380px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in 0.35s var(--t-base);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.removing { animation: toast-out 0.25s forwards; }
/* Persistent update banner toast — sticky, with action button */
.toast-update {
  background: linear-gradient(135deg, var(--c-primary-soft), rgba(245, 158, 11, 0.08));
  border-color: var(--c-primary);
  box-shadow: 0 14px 32px var(--c-primary-glow);
  align-items: center;
}
.toast-update .btn {
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.toast-update .toast-text strong { color: var(--c-text); }
.toast-emoji {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1.2;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
}
.toast-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.45;
  min-width: 0;
  word-break: break-word;
}
.toast-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}
.toast-text small { color: var(--c-text-muted); }
.toast-action {
  flex-shrink: 0;
  padding: 0.35rem 0.7rem;
  background: var(--c-primary-soft);
  color: var(--c-primary-dark);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  align-self: center;
}
[data-theme="dark"] .toast-action { color: var(--c-primary); }
.toast[data-kind="reminder"] {
  border-left: 3px solid var(--c-primary);
}
.toast[data-kind="badge"] {
  border-left: 3px solid var(--c-accent);
  background: linear-gradient(135deg, var(--c-bg-elev) 0%, var(--c-accent-soft) 100%);
}
.toast[data-kind="streak"] {
  border-left: 3px solid var(--c-accent);
}

/* ==== Dynamic Island — slow, dramatic ball→bar with shadow ==== */
.island {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-14px) scale(0.55);
  background: linear-gradient(135deg, #0a0e12, #0f1419 65%, #14181d);
  color: white;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  height: 32px;
  width: 32px;
  overflow: hidden;
  z-index: 95;
  opacity: 0;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.4),
    0 6px 18px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    width 1.05s cubic-bezier(0.34, 1.4, 0.5, 1),
    height 0.95s cubic-bezier(0.34, 1.4, 0.5, 1),
    padding 0.95s cubic-bezier(0.34, 1.4, 0.5, 1),
    opacity 0.55s ease,
    transform 0.85s cubic-bezier(0.34, 1.5, 0.5, 1),
    border-radius 0.95s cubic-bezier(0.34, 1.4, 0.5, 1),
    box-shadow 0.6s ease;
}
/* Stage 1: ball appears (small dot) */
.island.expanding {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  width: 38px;
  height: 38px;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
/* Stage 2: ball expands into bar */
.island.expanded {
  width: min(380px, calc(100vw - 24px));
  height: 68px;
  padding: 0 1rem;
  gap: 0.85rem;
  border-radius: 24px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}
/* Stage 3: collapse back to ball */
.island.collapsing {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  gap: 0;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}
.island-emoji {
  font-size: 1.45rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.6s ease 0.2s, transform 0.6s cubic-bezier(0.34, 1.4, 0.5, 1) 0.1s;
  transform: scale(0.7);
}
.island.expanding .island-emoji { transform: scale(1); }
.island.expanded .island-emoji {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(52, 211, 153, 0.12));
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.2);
}
.island-content {
  flex: 1;
  min-width: 0;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.45s ease 0.4s, transform 0.55s cubic-bezier(0.34, 1.4, 0.5, 1) 0.4s;
}
.island.expanded .island-content { opacity: 1; transform: translateX(0); }
.island-title {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.island-message {
  display: -webkit-box;
  font-size: 0.93rem;
  line-height: 1.32;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.island-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.4s ease 0.5s,
    transform 0.5s cubic-bezier(0.34, 1.5, 0.5, 1) 0.5s,
    background 0.2s;
}
.island.expanded .island-close { opacity: 1; transform: scale(1); }
.island-close:hover { background: rgba(255, 255, 255, 0.16); color: white; }

/* ==== Modal ==== */
.modal-host {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in var(--t-base);
}
.modal-host.open { display: flex; }
.modal {
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--c-bg-elev);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 1.25rem;
  padding-bottom: calc(1.25rem + var(--safe-bot));
  animation: modal-up var(--t-slow);
  -webkit-overflow-scrolling: touch;
}
.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--c-border-strong);
  border-radius: var(--r-pill);
  margin: 0 auto 1rem;
}
.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.modal-sub {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}

/* ==== Install banner ==== */
.install-banner {
  position: fixed;
  bottom: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 500px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 70;
  animation: banner-up 0.5s var(--t-slow);
}
.install-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--grad-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.install-icon img { width: 32px; height: 32px; }
.install-text {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  line-height: 1.3;
}
.install-text strong { display: block; font-size: 0.92rem; }
.install-text span { color: var(--c-text-muted); font-size: 0.8rem; }
.install-actions { display: flex; gap: 0.4rem; }

/* ==== Confetti ==== */
.confetti {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
}

/* ==== Reminder log item ==== */
.log-item {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--c-border);
}
.log-item:last-child { border-bottom: 0; }
.log-emoji {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.log-content { flex: 1; min-width: 0; }
.log-text { font-size: 0.95rem; font-weight: 500; }
.log-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--c-text-muted);
}

/* ==== Floating action button ==== */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  right: 1.25rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 24px var(--c-primary-glow);
  z-index: 25;
  transition: transform var(--t-fast);
}
.fab:active { transform: scale(0.92); }

/* ==== Tabs ==== */
.tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--c-bg-soft);
  border-radius: var(--r-pill);
  margin-bottom: 1rem;
}
.tab {
  flex: 1;
  padding: 0.55rem 0.85rem;
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-align: center;
  transition: all var(--t-fast);
}
.tab.active {
  background: var(--c-bg-elev);
  color: var(--c-text);
  box-shadow: var(--shadow-sm);
}

/* ==== Chips (selectable) ==== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.95rem;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text);
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--c-bg-elev);
}
.chip:hover { border-color: var(--c-primary); }
.chip.selected {
  background: var(--c-primary-soft);
  border-color: var(--c-primary);
  color: var(--c-primary-dark);
}
[data-theme="dark"] .chip.selected { color: var(--c-primary); }

/* ==== Slider ==== */
.slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}
input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--c-border-strong);
  border-radius: var(--r-pill);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--c-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--c-bg-elev);
  box-shadow: 0 2px 6px var(--c-primary-glow);
}
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--c-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--c-bg-elev);
}

/* ==== Setting row ==== */
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--c-border);
}
.setting:last-child { border-bottom: 0; }
.setting-text { flex: 1; min-width: 0; }
.setting-title {
  font-size: 0.95rem;
  font-weight: 500;
}
.setting-sub {
  font-size: 0.8rem;
  color: var(--c-text-muted);
  margin-top: 2px;
}
/* Divider version that doesn't squeeze its content — used above grouped controls */
.setting-divider {
  padding: 1rem 0 0.65rem;
  border-top: 1px solid var(--c-border);
  margin-top: 0.5rem;
}
.setting-divider:first-of-type { border-top: 0; margin-top: 0; padding-top: 0.5rem; }

/* Intensity chips spacing — breathing room above and below */
.intensity-chips {
  margin: 0.25rem 0 1.1rem;
  gap: 0.5rem;
}
.intensity-chips .chip {
  padding: 0.55rem 1rem;
  font-weight: 600;
  text-transform: capitalize;
}

/* AM/PM time picker */
.quiet-hours {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0 0.75rem;
}
.qh-field {
  flex: 1;
  min-width: 0;
}
.qh-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.qh-arrow {
  font-size: 1.2rem;
  color: var(--c-text-muted);
  margin-top: 18px;
  flex-shrink: 0;
}
.time-picker {
  display: flex;
  align-items: stretch;
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.time-picker:focus-within {
  border-color: var(--c-primary);
  box-shadow: var(--shadow-glow);
}
.tp-hour {
  border: 0;
  background: transparent;
  padding: 0.65rem 0.5rem 0.65rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-text);
  appearance: none;
  outline: none;
  cursor: pointer;
  min-width: 0;
  flex: 1;
}
.tp-ampm {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--c-border);
}
.tp-ap {
  flex: 1;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--c-text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all var(--t-fast);
  letter-spacing: 0.04em;
}
.tp-ap:first-child { border-bottom: 1px solid var(--c-border); }
.tp-ap.on {
  background: var(--c-primary);
  color: white;
}

/* ==== Landing page ==== */
.landing {
  position: relative;
  min-height: 100vh;
  padding: var(--safe-top) 1.25rem var(--safe-bot);
  overflow-x: hidden;
  background: var(--grad-hero);
}
/* Vertical rhythm — every section breathes consistently */
.landing-main { padding-bottom: 4rem; }
.landing-main > .hero-row { margin-bottom: 1rem; }
.landing-main > .stat-counters { margin-top: 3rem; margin-bottom: 1rem; }
.landing-main > .hero-features { margin-top: 3rem; }
.landing-main > .seo-section { margin-top: 4.5rem; }
.landing-main > .hajj-section { margin-top: 4.5rem; margin-bottom: 1.5rem; }
@media (min-width: 1024px) {
  .landing-main > .seo-section { margin-top: 6rem; }
  .landing-main > .hajj-section { margin-top: 6rem; }
  .landing-main > .stat-counters { margin-top: 5rem; }
}
.landing-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: orb-drift 18s ease-in-out infinite;
}
.orb-1 {
  width: 280px; height: 280px;
  background: #34d399;
  top: -50px; right: -80px;
}
.orb-2 {
  width: 220px; height: 220px;
  background: #fbbf24;
  bottom: 200px; left: -60px;
  animation-delay: -6s;
}
.orb-3 {
  width: 180px; height: 180px;
  background: #6ee7b7;
  top: 40%; right: -40px;
  animation-delay: -12s;
}
.orb-4 {
  width: 200px; height: 200px;
  background: #a78bfa;
  bottom: -50px; right: 10%;
  animation-delay: -3s;
  opacity: 0.3;
}
.orb-5 {
  width: 140px; height: 140px;
  background: #f472b6;
  top: 70%; left: 30%;
  animation-delay: -9s;
  opacity: 0.25;
}
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 185, 129, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  opacity: 0.6;
}
[data-theme="dark"] .grid-bg {
  background-image:
    linear-gradient(rgba(52, 211, 153, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 211, 153, 0.05) 1px, transparent 1px);
}
.bg-glow {
  position: absolute;
  top: 20%; left: 50%;
  width: 600px; height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 60%);
  filter: blur(40px);
  animation: bg-glow-pulse 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bg-glow-pulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.15); }
}

/* Cinematic pill — with pulsing dot */
.cinematic-pill {
  position: relative;
  padding-left: 1.1rem;
  animation: cinematic-pill-fade 0.8s 0.2s both;
}
.pill-dot {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  background: var(--c-primary);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
}
@keyframes cinematic-pill-fade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Trust row */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin: 1.5rem 0 0;
  animation: cinematic-pill-fade 0.8s 0.6s both;
}
.trust-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  background: var(--c-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--r-pill);
  color: var(--c-text);
  letter-spacing: 0.01em;
}

/* Phone with mouse-tilt */
.phone-tilt {
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

/* Floating notification previews — anchored to phone */
.float-notif {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem 0.55rem 0.55rem;
  background: linear-gradient(135deg, #0a0e12, #14181d);
  color: white;
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.05);
  white-space: nowrap;
  font-size: 0.78rem;
  z-index: 3;
  pointer-events: none;
  /* Mobile: hide floating notifications — phone is centered alone */
  display: none;
}
.float-notif-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(16, 185, 129, 0.18);
  border-radius: 50%;
  font-size: 1rem;
  flex-shrink: 0;
}
.float-notif-content { display: flex; flex-direction: column; line-height: 1.2; }
.float-notif-content strong { font-size: 0.6rem; letter-spacing: 0.08em; color: #94a3b8; }
.float-notif-1 { top: 14%; left: -32%; animation-delay: 0.5s; }
.float-notif-2 { bottom: 18%; right: -28%; animation-delay: 3s; }
@keyframes float-notif {
  0%, 100% { transform: translate(0, 0); opacity: 0; }
  12%, 82% { opacity: 1; }
  50% { transform: translate(6px, -4px); }
}
/* Show floating notifications only when there's room (≥800px) */
@media (min-width: 800px) {
  .float-notif {
    display: flex;
    animation: float-notif 8s ease-in-out infinite;
  }
}

/* Stat counters */
.stat-counters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-width: 480px;
  margin: 2.5rem auto 1rem;
  animation: cinematic-pill-fade 0.8s 0.9s both;
}
.stat-counter {
  padding: 1rem 0.85rem;
  background: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--r-md);
  text-align: center;
}
.stat-counter-num {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-counter-label {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-top: 4px;
  font-weight: 500;
}
@media (min-width: 640px) {
  .stat-counters { grid-template-columns: repeat(4, 1fr); }
}
.landing-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
}
.brand-icon { width: 32px; height: 32px; }
.landing-main {
  position: relative;
  z-index: 2;
  max-width: 540px;
  margin: 0 auto;
  padding: 2rem 0 1rem;
  text-align: center;
}
.hero-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}
.hero-text {
  width: 100%;
  text-align: center;
}
.hero-title {
  font-size: clamp(1.7rem, 7.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 1rem 0 1.25rem;
  color: var(--c-text);
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  padding: 0 0.25rem;
}
.hero-title em {
  font-style: italic;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.05em;
}
.hero-sub {
  font-size: 1rem;
  color: var(--c-text-muted);
  max-width: 360px;
  margin: 0 auto 2rem;
  line-height: 1.55;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 3rem;
}
.hero-cta .btn { width: 100%; max-width: 280px; }

.hero-mock {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem auto 0;
  position: relative;
  min-height: 480px;
}
.phone {
  width: 240px;
  height: 440px;
  background: linear-gradient(145deg, #1f2937, #111827);
  border-radius: 32px;
  padding: 14px;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.25),
    inset 0 0 0 2px rgba(255, 255, 255, 0.05);
  animation: phone-float 6s ease-in-out infinite;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--grad-hero);
  border-radius: 22px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
}
.phone-screen::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 6px;
  background: #1f2937;
  border-radius: 999px;
}
.mock-stat {
  margin-top: 1rem;
  background: white;
  border-radius: 14px;
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.mock-label { font-size: 0.75rem; color: #64748b; }
.mock-num { font-size: 1.2rem; font-weight: 700; color: #10b981; }
.mock-task {
  background: white;
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #1f2937;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.mock-task .check {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  flex-shrink: 0;
}
.mock-task.mock-done .check {
  background: #10b981;
  border-color: #10b981;
  position: relative;
}
.mock-task.mock-done .check::after {
  content: '';
  position: absolute;
  top: 3px; left: 5px;
  width: 4px; height: 7px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.mock-task.mock-done span:last-child { text-decoration: line-through; color: #94a3b8; }
.mock-reminder {
  margin-top: auto;
  background: linear-gradient(135deg, #ecfdf5, #fef3c7);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.72rem;
  color: #047857;
  font-style: italic;
  line-height: 1.4;
}
.mock-reminder .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  margin-top: 5px;
  animation: pulse 2s ease-in-out infinite;
}

.hero-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  text-align: left;
  margin-bottom: 2rem;
}
.feature {
  padding: 1.25rem;
  background: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--r-lg);
}
.feature-emoji {
  display: inline-block;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.feature h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.feature p { font-size: 0.85rem; color: var(--c-text-muted); line-height: 1.5; }

.landing-foot {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem 0 1.5rem;
  color: var(--c-text-muted);
}
.foot-nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.foot-nav a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text);
  transition: color var(--t-fast);
}
.foot-nav a:hover { color: var(--c-primary); }
.foot-tagline {
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
}
.foot-copy {
  font-size: 0.75rem;
  opacity: 0.7;
}
.foot-copy a {
  color: var(--c-primary);
  text-decoration: underline;
}

/* === SEO content sections on landing — modernized card-first design === */
.seo-section {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 4rem auto 0;
  padding: 0 0.5rem;
  text-align: left;
  scroll-margin-top: 32px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-primary-dark);
  background: var(--c-primary-soft);
  padding: 0.35rem 0.85rem;
  border-radius: var(--r-pill);
  margin-bottom: 0.85rem;
}
[data-theme="dark"] .section-eyebrow { color: var(--c-primary); }
.seo-section > .section-eyebrow + h2 { margin-top: 0.25rem; }
.seo-section h2 {
  font-size: clamp(1.4rem, 5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  color: var(--c-text);
  text-align: left;
  line-height: 1.2;
}
.seo-section p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--c-text);
  margin-bottom: 1rem;
}

/* Pitch grid (What is Zikr Reminder) */
.pitch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.25rem;
}
@media (min-width: 640px) {
  .pitch-grid { grid-template-columns: 1fr 1fr; }
}
.pitch-card {
  padding: 1.35rem 1.25rem;
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.pitch-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-primary-soft);
}
.pitch-card-icon {
  font-size: 1.7rem;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--c-primary-soft);
  border-radius: var(--r-md);
  margin-bottom: 0.85rem;
}
.pitch-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.pitch-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--c-text-muted);
  margin: 0;
}
.pitch-card-primary {
  background: linear-gradient(135deg, var(--c-primary-soft), rgba(245, 158, 11, 0.06));
  border-color: var(--c-primary);
}
.pitch-card-primary .pitch-card-icon { background: var(--grad-primary); color: white; }

/* Persona grid (Who it's for) */
.persona-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 1.25rem;
}
@media (min-width: 640px) {
  .persona-grid { grid-template-columns: repeat(4, 1fr); }
}
.persona-card {
  padding: 1.15rem 0.9rem 1.25rem;
  background: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--r-lg);
  text-align: center;
  transition: transform 0.3s;
}
.persona-card:hover { transform: translateY(-3px); }
.persona-emoji { font-size: 2rem; margin-bottom: 0.55rem; display: block; }
.persona-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.35rem; }
.persona-card p { font-size: 0.78rem; line-height: 1.5; color: var(--c-text-muted); margin: 0; }
.seo-section p strong { color: var(--c-text); font-weight: 700; }
.seo-section p em { color: var(--c-primary-dark); font-style: italic; }
[data-theme="dark"] .seo-section p em { color: var(--c-primary); }

.feature-list, .step-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.feature-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.5rem;
  font-size: 0.92rem;
  line-height: 1.55;
  border-bottom: 1px solid var(--c-border);
}
.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0.8rem;
  width: 18px;
  height: 18px;
  background: var(--c-primary);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 800;
}
.feature-list li:last-child { border-bottom: 0; }
.feature-list li strong { color: var(--c-text); font-weight: 700; }

.step-list {
  counter-reset: step;
}
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 0.75rem 0 0.75rem 2.4rem;
  font-size: 0.92rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--c-border);
}
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 28px;
  height: 28px;
  background: var(--grad-primary);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 4px 8px var(--c-primary-glow);
}
.step-list li:last-child { border-bottom: 0; }

.faq-item {
  background: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--r-md);
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2.5rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--c-primary);
  transition: transform var(--t-base);
}
.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}
.faq-item p {
  padding: 0 1.25rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--c-text-muted);
  margin: 0;
}
.faq-item p strong { color: var(--c-text); font-weight: 600; }

/* ===== Hajj 2026 dedicated section ===== */
.hajj-section {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(220, 38, 38, 0.04), rgba(168, 85, 247, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--r-xl);
  padding: 2rem 1.5rem;
  margin: 3rem auto;
  max-width: 720px;
  position: relative;
  overflow: hidden;
}
.hajj-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(20px);
}
.hajj-hero { position: relative; z-index: 1; text-align: center; margin-bottom: 1.75rem; }
.hajj-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 0.95rem;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
  margin-bottom: 1rem;
  animation: hajj-badge-pulse 3s ease-in-out infinite;
}
@keyframes hajj-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.hajj-section h2 {
  font-size: clamp(1.4rem, 5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, #b45309, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .hajj-section h2 {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hajj-lead {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--c-text);
  max-width: 540px;
  margin: 0 auto;
}
.hajj-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 2rem 0 1.5rem;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) {
  .hajj-grid { grid-template-columns: 1fr 1fr; }
}
.hajj-card {
  padding: 1.25rem 1.15rem;
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.hajj-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}
.hajj-card-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
  display: inline-block;
}
.hajj-card-date {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b45309;
  background: #fef3c7;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-pill);
  margin-bottom: 0.6rem;
}
[data-theme="dark"] .hajj-card-date { color: #fbbf24; background: rgba(245, 158, 11, 0.15); }
.hajj-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.hajj-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--c-text-muted);
}
.hajj-features {
  background: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.25rem;
  position: relative;
  z-index: 1;
}
.hajj-features-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.hajj-cta {
  margin-top: 1.75rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* AEO direct-answer cards */
.answer-block .qa-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1rem;
}
@media (min-width: 640px) {
  .answer-block .qa-grid { grid-template-columns: 1fr 1fr; }
}
.qa-card {
  padding: 1.1rem 1.15rem;
  background: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--r-lg);
  transition: transform 0.3s, box-shadow 0.3s;
}
.qa-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.qa-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--c-text);
}
.qa-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--c-text-muted);
}
.faq-item p em { color: var(--c-primary-dark); font-style: italic; }
[data-theme="dark"] .faq-item p em { color: var(--c-primary); }

/* ==== Onboarding ==== */
.onboarding {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--safe-top) + 2rem) 1.5rem calc(var(--safe-bot) + 2rem);
  background: var(--grad-hero);
  display: flex;
  flex-direction: column;
}
.onb-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 2.5rem;
}
.onb-progress span {
  flex: 1;
  height: 4px;
  background: var(--c-border-strong);
  border-radius: var(--r-pill);
  transition: background var(--t-base);
}
.onb-progress span.done { background: var(--c-primary); }
.onb-step { flex: 1; }
.onb-emoji { font-size: 3rem; margin-bottom: 1rem; }
.onb-title { font-size: 1.6rem; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.onb-sub { color: var(--c-text-muted); margin-bottom: 2rem; line-height: 1.55; }
.onb-cta { display: flex; gap: 0.75rem; margin-top: auto; }
.onb-cta .btn { flex: 1; }

/* ==== Counter (Zikr) ==== */
.counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}
.counter-btn {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  display: grid;
  place-items: center;
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow:
    0 20px 60px var(--c-primary-glow),
    inset 0 -8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.1s ease;
  user-select: none;
  border: 6px solid var(--c-bg-elev);
}
.counter-btn:active { transform: scale(0.95); }
.counter-label {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  text-align: center;
}
.counter-meta {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
}
.counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  color: var(--c-text-muted);
}
.counter-pill strong { color: var(--c-text); font-weight: 700; }
.counter-reset {
  margin-top: 0.85rem;
}

/* ==== Mood selector ==== */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}
.mood-option {
  padding: 0.85rem 0.5rem;
  background: var(--c-bg-elev);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
}
.mood-option:hover { border-color: var(--c-primary); }
.mood-option.selected {
  background: var(--c-primary-soft);
  border-color: var(--c-primary);
}
.mood-emoji { font-size: 1.6rem; }
.mood-label { font-size: 0.7rem; color: var(--c-text-muted); margin-top: 2px; }

/* ==== Prayer tracker ==== */
.prayer-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
}
.prayer-tile {
  padding: 0.75rem 0.25rem;
  background: var(--c-bg-elev);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
  min-width: 0;
  overflow: hidden;
}
.prayer-tile:hover { border-color: var(--c-primary); }
.prayer-tile.done {
  background: var(--c-primary-soft);
  border-color: var(--c-primary);
}
.prayer-tile.done .prayer-name { color: var(--c-primary-dark); }
[data-theme="dark"] .prayer-tile.done .prayer-name { color: var(--c-primary); }
.prayer-emoji { font-size: 1.25rem; line-height: 1; }
.prayer-name { font-size: 0.72rem; font-weight: 600; margin-top: 4px; }
.prayer-time { font-size: 0.6rem; color: var(--c-text-muted); margin-top: 1px; }

/* ==== Badge grid ==== */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.badge-tile {
  padding: 1rem 0.5rem;
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  text-align: center;
  transition: all var(--t-base);
  opacity: 0.4;
}
.badge-tile.unlocked {
  opacity: 1;
  background: var(--grad-card);
  border-color: var(--c-primary-soft);
}
.badge-tile-emoji { font-size: 2rem; margin-bottom: 0.4rem; filter: grayscale(1); }
.badge-tile.unlocked .badge-tile-emoji { filter: none; }
.badge-tile-name { font-size: 0.78rem; font-weight: 600; }
.badge-tile-desc { font-size: 0.65rem; color: var(--c-text-muted); margin-top: 2px; }

/* ==== Focus mode ==== */
.focus-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #064e3b, #0f172a);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: white;
  animation: fade-in var(--t-slow);
}
.focus-timer {
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 1rem 0;
  font-variant-numeric: tabular-nums;
}
.focus-message {
  max-width: 320px;
  opacity: 0.85;
  font-size: 1.05rem;
  line-height: 1.5;
  font-style: italic;
}
.focus-breathe {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 1rem;
  animation: breathe 4s ease-in-out infinite;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
}
.focus-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* ==== Utilities ==== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--c-text-muted); }
.text-soft { color: var(--c-text-soft); }
.text-primary { color: var(--c-primary); }
.text-accent { color: var(--c-accent); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ==== Tablet ==== */
@media (min-width: 640px) {
  .hero-features { grid-template-columns: repeat(3, 1fr); }
  .hero-cta { flex-direction: row; justify-content: center; }
  .hero-cta .btn { width: auto; }
}

/* Desktop landing — proper 2-column hero with text left, phone right */
@media (min-width: 1024px) {
  .landing { padding: 0 2rem; }
  .landing-main { max-width: 1180px; padding: 1rem 0 5rem; text-align: left; }
  .landing-nav { max-width: 1180px; margin: 0 auto; padding: 1.25rem 0; }

  /* Hero is now a proper 2-column row */
  .hero-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    margin: 2rem 0 1rem;
    min-height: 620px;
  }
  .hero-text {
    flex: 1;
    text-align: left;
    max-width: 560px;
  }
  .hero-mock {
    flex-shrink: 0;
    margin: 0;
    min-height: 600px;
    width: auto;
    position: relative;
  }
  .phone { width: 300px; height: 580px; }

  /* Hero text alignment */
  .cinematic-pill { margin: 0 0 0.5rem; }
  .hero-title {
    font-size: clamp(2.8rem, 4.5vw, 3.8rem);
    line-height: 1.05;
    margin: 1rem 0 1.5rem;
  }
  .hero-sub { margin: 0 0 2rem; max-width: 480px; font-size: 1.05rem; }
  .hero-cta { justify-content: flex-start; flex-direction: row; margin-bottom: 2rem; }
  .trust-row { justify-content: flex-start; margin: 0; }

  /* Stat counters full-width below hero */
  .stat-counters { margin: 4rem auto 1rem; max-width: 100%; }

  /* SEO sections wider */
  .seo-section { max-width: 1100px; }
  .pitch-grid { grid-template-columns: repeat(4, 1fr); }
  .persona-grid { grid-template-columns: repeat(4, 1fr); }
  .qa-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .hajj-grid { grid-template-columns: repeat(4, 1fr); }
  .hajj-section { max-width: 1100px; }

  /* hero features hidden on desktop — pitch cards do that job better */
  .hero-features { display: none; }
}

/* Wide desktop */
@media (min-width: 1280px) {
  .landing-main { max-width: 1280px; }
  .landing-nav { max-width: 1280px; }
  .hero-row { gap: 6rem; }
  .phone { width: 320px; height: 620px; }
}

/* ============================
   DESKTOP LAYOUT (≥1024px)
   Sidebar nav (260px) + centered content column (max 720px).
   The content uses the SAME single-column flow as mobile —
   no grid, no orphaned columns. Predictable, readable, consistent.
   ============================ */
@media (min-width: 1024px) {
  :root { --nav-height: 0px; }

  .app {
    max-width: 1100px;
    padding: 1.5rem 2rem 2rem;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 2rem;
    align-items: stretch;
    min-height: 100vh;
    margin: 0 auto;
  }
  .app-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    max-width: 720px;
  }

  /* Sidebar */
  .desktop-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.75rem 1.25rem;
    background: var(--c-bg-elev);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 1.5rem;
    align-self: flex-start;
    height: calc(100vh - 3rem);
  }
  .desktop-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.5rem 1.5rem;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 1rem;
  }
  .desktop-brand-icon {
    width: 44px; height: 44px;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
  }
  .desktop-brand strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }
  .desktop-brand span {
    font-size: 0.7rem;
    color: var(--c-text-muted);
  }

  .desktop-nav-items {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
  }
  .desktop-nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--r-md);
    color: var(--c-text);
    font-weight: 500;
    font-size: 0.92rem;
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  }
  .desktop-nav-item:hover {
    background: var(--c-bg-soft);
    transform: translateX(2px);
  }
  .desktop-nav-item.active {
    background: var(--c-primary-soft);
    color: var(--c-primary-dark);
    font-weight: 600;
  }
  [data-theme="dark"] .desktop-nav-item.active { color: var(--c-primary); }
  .desktop-nav-item.active svg { stroke-width: 2.2; }

  .desktop-nav-foot {
    border-top: 1px solid var(--c-border);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }
  .desktop-nav-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.9rem;
    border-radius: var(--r-md);
    color: var(--c-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    transition: background var(--t-fast), color var(--t-fast);
  }
  .desktop-nav-action:hover {
    background: var(--c-bg-soft);
    color: var(--c-text);
  }

  /* Hide bottom nav on desktop */
  .bottom-nav { display: none !important; }

  /* App header: static (not sticky) on desktop — avoids overlap with content */
  .app-header {
    position: static;
    background: transparent;
    padding: 0 0 1.25rem;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 1.5rem;
    min-height: auto;
  }
  .app-header .header-actions { gap: 0.5rem; }
  .header-title h1 { font-size: 1.6rem; }

  /* View flows as a SINGLE COLUMN — same as mobile, just centered in the available space */
  .view {
    padding: 0;
    flex: 1;
    overflow: visible;
  }
  .view > .stagger {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  /* Keep mobile rhythm but with consistent gap */
  .view > .stagger > * + * { margin-top: 0; }
  /* Section heads get a little more breathing space on desktop */
  .view > .stagger > .section-head { margin-top: 1.25rem; }
  /* First child doesn't need extra margin */
  .view > .stagger > .section-head:first-child { margin-top: 0; }

  /* Larger progress ring */
  .card-gradient .ring { width: 130px !important; height: 130px !important; }

  /* Wider input rows */
  .input-row { max-width: 100%; }

  /* Modal centered like a real desktop dialog */
  .modal { max-width: 480px; border-radius: var(--r-xl); margin: 2rem auto; }
  .modal-host { align-items: center; }

  /* Card padding bumps a little on desktop */
  .view .card { padding: 1.35rem 1.25rem; }
  .view .card h2, .view .card h3 { font-size: 1.05rem; }

  /* Toast host & install banner repositioned to right side on desktop */
  .toast-host {
    left: auto;
    right: 1.5rem;
    transform: none;
    top: 1.5rem;
  }
  .install-banner {
    bottom: 1.5rem;
    right: 1.5rem;
    left: auto;
    transform: none;
    max-width: 380px;
  }
}

@media (min-width: 1280px) {
  .app {
    max-width: 1200px;
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .app-content { max-width: 760px; }
}

@media (min-width: 1600px) {
  .app { max-width: 1300px; }
  .app-content { max-width: 820px; }
}

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