/* Zikr Break — 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);

  /* Liquid glass (the floating nav): tint, the lip of the rim, its shadow,
     and the thicker lens under the current tab */
  --lg-tint: rgba(255, 255, 255, 0.5);
  --lg-rim-hi: rgba(255, 255, 255, 0.95);
  --lg-rim-lo: rgba(255, 255, 255, 0.35);
  --lg-edge: rgba(15, 23, 42, 0.07);
  --lg-shadow: 0 14px 34px -10px rgba(15, 23, 42, 0.28), 0 3px 10px rgba(15, 23, 42, 0.08);
  --lg-lens: rgba(255, 255, 255, 0.62);
  --lg-sheen: rgba(255, 255, 255, 0.55);

  --grad-hero: linear-gradient(135deg, #e7fbf3 0%, #ecfeff 35%, #f5f9e8 70%, #fef3c7 100%);
  --grad-card: linear-gradient(135deg, color-mix(in srgb, var(--c-primary) 12%, transparent), rgba(20, 184, 166, 0.05) 60%, rgba(245, 158, 11, 0.08));
  --grad-primary: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #059669 100%);
  --grad-accent: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #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);
  /* follows the colour theme: a green ring around a blue button looked broken */
  --shadow-glow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 14%, transparent);

  --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);

  /* The nav is a pill floating above the bottom edge; --nav-height is the
     room it takes, which content and the floating buttons keep clear of. */
  --nav-pill-h: 64px;
  --nav-pill-gap: 12px;
  --nav-height: calc(var(--nav-pill-h) + var(--nav-pill-gap) + 6px + var(--safe-bot));
  --header-height: 78px;
}

[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);

  --lg-tint: rgba(26, 31, 42, 0.42);
  --lg-rim-hi: rgba(255, 255, 255, 0.34);
  --lg-rim-lo: rgba(255, 255, 255, 0.06);
  --lg-edge: rgba(0, 0, 0, 0.4);
  --lg-shadow: 0 16px 38px -8px rgba(0, 0, 0, 0.6), 0 3px 10px rgba(0, 0, 0, 0.35);
  --lg-lens: rgba(255, 255, 255, 0.13);
  --lg-sheen: rgba(255, 255, 255, 0.16);

  --grad-hero: linear-gradient(135deg, #051a14 0%, #082423 35%, #14283d 65%, #1f1610 100%);
  --grad-card: linear-gradient(135deg, color-mix(in srgb, var(--c-primary) 16%, transparent), rgba(99, 102, 241, 0.06) 60%, rgba(251, 191, 36, 0.08));
  --grad-primary: linear-gradient(135deg, #34d399 0%, #2dd4bf 50%, #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);
}

/* Set by boot.js until the app-only stylesheets arrive — so nothing
   transitions from unstyled to styled on the first frames. */
.css-pending *, .css-pending *::before, .css-pending *::after { transition: none !important; }

@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);
    --lg-tint: rgba(26, 31, 42, 0.42);
    --lg-rim-hi: rgba(255, 255, 255, 0.34);
    --lg-rim-lo: rgba(255, 255, 255, 0.06);
    --lg-edge: rgba(0, 0, 0, 0.4);
    --lg-shadow: 0 16px 38px -8px rgba(0, 0, 0, 0.6), 0 3px 10px rgba(0, 0, 0, 0.35);
    --lg-lens: rgba(255, 255, 255, 0.13);
    --lg-sheen: rgba(255, 255, 255, 0.16);

    --grad-hero: linear-gradient(135deg, #0a1410 0%, #0f1f1c 50%, #1a1408 100%);
    --grad-card: linear-gradient(135deg, color-mix(in srgb, var(--c-primary) 8%, transparent), 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; }
/* Android-only content (Scroll Guard, Google Play) on an iPhone or iPad — see js/boot.js */
html.is-apple [data-android-only] { 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 ==== */
html.is-scrolling .bg-particles span { animation-play-state: paused; }
.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;
  /* A little air above the title and under the subtitle on every screen */
  padding: 1.15rem 1rem 0.75rem;
  background: var(--c-bg);
  min-height: var(--header-height);
}
/* The soft edge sits below the header, so nothing scrolls visibly behind its text. */
.app-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
  background: linear-gradient(to bottom, var(--c-bg), transparent);
  pointer-events: none;
}
.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.6rem 1rem 2rem;
  animation: view-in 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-x: hidden;
}
@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==== Bottom navigation — a floating pill of liquid glass ====
   The page shows through it blurred, brightened and more saturated; a lip of
   light runs round the rim (brightest along the top) and a soft sheen lies
   across it. Under the current tab sits a lens of thicker glass that flows to
   the next tab like a drop of liquid (app.js, NavLens). It replaced a
   full-width bar: one small blurred pill also costs less than the old strip. */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-pill-gap) + var(--safe-bot));
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 440px);
  height: var(--nav-pill-h);
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lg-sheen), transparent 55%), var(--lg-tint);
  backdrop-filter: blur(18px) saturate(190%) brightness(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(190%) brightness(1.06);
  box-shadow: var(--lg-shadow), inset 0 -1px 0 var(--lg-edge);
  isolation: isolate;
  z-index: 30;
}
/* the rim: a hairline of light, bright on top, fading down the sides */
.bottom-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--lg-rim-hi), var(--lg-rim-lo) 45%, var(--lg-rim-lo) 70%, color-mix(in srgb, var(--lg-rim-hi) 60%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
/* the sheen: light caught in the glass towards one corner */
.bottom-nav::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(70% 120% at 16% -30%, var(--lg-sheen), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
/* The lens under the current tab. Moved only by transform (on the compositor):
   app.js stretches it between its leading and trailing edges as it flows. */
.nav-liquid {
  position: absolute;
  top: 6px;
  left: 0;
  height: calc(100% - 12px);
  border-radius: 999px;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--lg-sheen), transparent 65%),
    color-mix(in srgb, var(--c-primary) 16%, var(--lg-lens));
  box-shadow:
    inset 0 1px 0 var(--lg-rim-hi),
    inset 0 -1px 2px color-mix(in srgb, var(--c-primary) 18%, transparent),
    0 0 0 0.5px var(--lg-rim-lo),
    0 6px 16px -6px color-mix(in srgb, var(--c-primary) 45%, transparent);
  transform-origin: 0 50%;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease;
}
.nav-liquid.is-off { opacity: 0; }
.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  color: var(--c-text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.35s ease, transform var(--t-fast);
}
.nav-item svg { transition: transform 0.45s cubic-bezier(.34, 1.56, .64, 1); }
.nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:active { transform: scale(0.94); }
.nav-item.active { color: var(--c-primary); }
.nav-item.active svg { stroke-width: 2.2; transform: translateY(-1px) scale(1.08); }
.nav-center { position: relative; gap: 0; }
.nav-center-orb {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 6px 18px var(--c-primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 8px rgba(0, 0, 0, 0.14);
  transition: transform var(--t-fast);
}
.nav-center:active .nav-center-orb { transform: scale(0.92); }
.nav-center.active svg { transform: none; }

/* ==== 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:
    0 1px 3px rgba(15, 23, 42, 0.04),
    0 4px 14px rgba(15, 23, 42, 0.04);
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
[data-theme="dark"] .card {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.25);
}
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--c-primary-soft); }
.card-glass {
  background: var(--c-glass);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  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);
  box-shadow:
    0 4px 16px color-mix(in srgb, var(--c-primary) 10%, transparent),
    0 1px 3px color-mix(in srgb, var(--c-primary) 6%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
[data-theme="dark"] .card-gradient {
  box-shadow:
    0 4px 20px color-mix(in srgb, var(--c-primary) 18%, transparent),
    0 1px 3px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.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;
}
.input-row .input { flex: 1; min-width: 0; }
.input-row .btn-primary {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
}
.input-row .btn-primary svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.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.55rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  white-space: nowrap;
  max-width: 80%;
  /* Auto-shrink when content is wide (e.g. "20/23") via container query fallback */
}
/* Shrink the label progressively as the string gets longer */
.ring[style*="80"] .ring-label strong,
.ring[style*="92"] .ring-label strong {
  /* small rings (80–92px) — start smaller */
  font-size: 1.1rem;
}
.ring-label small { font-size: 0.7rem; color: var(--c-text-muted); margin-top: 1px; }
/* Long labels (anything with 4+ visible chars like 12/15, 20/23) auto-fit */
.ring-label.long strong { font-size: 0.95rem; }
.ring-label.xlong strong { font-size: 0.85rem; }

/* ==== 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;
  position: relative;
  /* Soft fade at both edges so marquee text doesn't hard-clip */
  mask-image: linear-gradient(90deg, transparent 0, black 6px, black calc(100% - 6px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 6px, black calc(100% - 6px), transparent 100%);
}
.task-title-inner {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}
/* Marquee class is added by JS only when text overflows the container.
   --m-dist is set per-task as a negative px value (computed scroll distance). */
.task-title-inner.is-marquee {
  animation: task-marquee 14s ease-in-out infinite;
}
@keyframes task-marquee {
  0%,  8%  { transform: translateX(0); }                          /* hold at start */
  48%, 55% { transform: translateX(var(--m-dist, 0)); }           /* hold at end */
  95%,100% { transform: translateX(0); }                          /* back to start */
}
.task:hover .is-marquee,
.task:active .is-marquee { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .task-title-inner.is-marquee { animation: none; transform: none; }
  .task-title { 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);
}

/* Notification health diagnostic */
.notif-health {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 0.85rem 1rem;
}
.notif-health-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--c-border);
  font-size: 0.85rem;
}
.notif-health-row:last-child { border-bottom: 0; }
.notif-health-row span { color: var(--c-text-muted); }
.notif-health-row strong { font-weight: 700; font-size: 0.82rem; }
.health-ok { color: var(--c-primary); }
.health-warn { color: #b45309; }
[data-theme="dark"] .health-warn { color: #fbbf24; }
.health-err { color: var(--c-danger); }

/* Update-available row (Profile About) */
.update-available-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--c-primary-soft), rgba(245, 158, 11, 0.08));
  border: 1.5px solid var(--c-primary);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}
.update-available-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  animation: hajj-pill-shine 3.5s ease-in-out infinite;
  pointer-events: none;
}
.update-available-row > div { flex: 1; min-width: 0; }
.update-available-row strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--c-primary-dark);
  letter-spacing: -0.01em;
}
[data-theme="dark"] .update-available-row strong { color: var(--c-primary); }
.update-available-row span {
  display: block;
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-top: 2px;
}
.update-pulse {
  width: 12px;
  height: 12px;
  background: var(--c-primary);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  animation: pulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 0 var(--c-primary-glow);
}
.update-available-row .btn {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* ==== 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); }

/* ==== Tasks-page purpose banner (compact) ==== */
.tasks-purpose {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(16, 185, 129, 0.05), rgba(245, 158, 11, 0.04));
  border: 1.5px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--r-lg);
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
.tasks-purpose::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15), transparent 65%);
  filter: blur(25px);
  pointer-events: none;
}
.tasks-purpose-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--c-bg-elev);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  position: relative; z-index: 1;
}
.tasks-purpose-text {
  flex: 1; min-width: 0;
  position: relative; z-index: 1;
}
.tasks-purpose-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7c3aed;
  margin-bottom: 4px;
}
[data-theme="dark"] .tasks-purpose-label { color: #a78bfa; }
.tasks-purpose-text p {
  font-size: 0.93rem;
  line-height: 1.55;
  font-style: italic;
  color: var(--c-text);
  margin: 0;
}

/* ==== Purpose of Life capsule ==== */
.purpose-capsule {
  margin-top: 1.5rem;
  padding: 1.35rem 1.4rem 1.5rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), rgba(16, 185, 129, 0.06), rgba(245, 158, 11, 0.04));
  border: 1.5px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
}
.purpose-capsule::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.18), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}
.purpose-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7c3aed;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}
[data-theme="dark"] .purpose-label { color: #a78bfa; }
.purpose-icon { font-size: 1.1rem; }
.purpose-content { position: relative; z-index: 1; }
.purpose-text {
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 0.85rem;
  font-style: italic;
}
.purpose-placeholder {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--c-text-muted);
  margin-bottom: 0.85rem;
  font-style: italic;
}
.purpose-edit-btn {
  background: transparent;
  border: 1.5px solid rgba(168, 85, 247, 0.3);
  color: #7c3aed;
  padding: 0.4rem 0.95rem;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast);
}
.purpose-edit-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: #7c3aed;
}
[data-theme="dark"] .purpose-edit-btn { color: #a78bfa; border-color: rgba(167, 139, 250, 0.4); }

/* ==== 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.
   Solid background for max readability — no transparency on text. */
.toast-update {
  background: var(--c-bg-elev);
  border: 2px solid var(--c-primary);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.18),
    0 0 0 4px var(--c-primary-glow);
  align-items: center;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 1;
  position: relative;
  overflow: hidden;
}
.toast-update::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c-primary-soft), rgba(245, 158, 11, 0.06));
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}
.toast-update > * { position: relative; z-index: 1; }
.toast-update .toast-emoji { font-size: 1.6rem; filter: none; }
.toast-update .toast-text strong {
  color: var(--c-text);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.toast-update .toast-text span {
  color: var(--c-text-muted);
  font-size: 0.85rem;
  display: block;
  margin-top: 2px;
}
.toast-update .btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--c-primary-glow);
}
.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, color-mix(in srgb, var(--c-primary) 22%, transparent), color-mix(in srgb, var(--c-primary) 12%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-primary) 20%, transparent);
}
.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 color-mix(in srgb, var(--c-primary) 60%, transparent);
}
@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: color-mix(in srgb, var(--c-primary) 18%, transparent);
  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;
}
/* ===== Dynamic seasonal banner on landing ===== */
.landing-seasonal {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.75rem;
  border-radius: 22px;
  background: var(--c-bg-elev);
  border: 1.5px solid var(--c-primary);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
  text-align: left;
  animation: slide-down 0.5s var(--t-base) both;
}
.landing-seasonal::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: hajj-pill-shine 4s ease-in-out infinite;
  pointer-events: none;
}
.landing-seasonal.season-hajj { background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.06)); border-color: #f59e0b; }
.landing-seasonal.season-eid { background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(236, 72, 153, 0.06)); border-color: #ec4899; }
.landing-seasonal.season-ramadan { background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.06)); border-color: #6366f1; }
.landing-seasonal.season-jumuah { background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(14, 165, 233, 0.06)); border-color: #14b8a6; }
.landing-seasonal.season-muharram { background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(99, 102, 241, 0.05)); border-color: #a855f7; }
.ls-icon {
  font-size: 1.6rem;
  width: 48px; height: 48px;
  background: var(--c-bg-elev);
  border-radius: 14px;
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  position: relative; z-index: 1;
}
.ls-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.ls-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-primary-dark);
  margin-bottom: 0.25rem;
}
[data-theme="dark"] .ls-tag { color: var(--c-primary); }
.landing-seasonal.season-eid .ls-tag { color: #b91c1c; }
[data-theme="dark"] .landing-seasonal.season-eid .ls-tag { color: #fda4af; }
.landing-seasonal.season-ramadan .ls-tag { color: #6366f1; }
.landing-seasonal.season-jumuah .ls-tag { color: #0e7490; }
[data-theme="dark"] .landing-seasonal.season-jumuah .ls-tag { color: #5eead4; }
.ls-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--c-text);
  margin: 0;
}
.ls-cta {
  flex-shrink: 0;
  padding: 0.5rem 0.95rem;
  background: var(--c-primary);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--r-pill);
  transition: transform var(--t-fast);
  position: relative; z-index: 1;
  white-space: nowrap;
}
.ls-cta:hover { transform: translateY(-2px); }
.landing-seasonal.season-eid .ls-cta { background: linear-gradient(135deg, #ef4444, #ec4899); }
.landing-seasonal.season-ramadan .ls-cta { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.landing-seasonal.season-jumuah .ls-cta { background: linear-gradient(135deg, #14b8a6, #0ea5e9); }
@media (max-width: 540px) {
  .landing-seasonal { flex-wrap: wrap; }
  .ls-cta { width: 100%; 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.85rem;
  align-items: center;
  margin-bottom: 3rem;
}
.hero-cta .btn { width: 100%; max-width: 320px; }

/* Spotlight install button — RECOMMENDED, with pulsing glow */
.btn-install {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  color: white;
  position: relative;
  padding: 1.1rem 1.5rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow:
    0 12px 28px rgba(16, 185, 129, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  overflow: visible;
}
.btn-install:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(16, 185, 129, 0.55); }
.btn-install:active { transform: scale(0.97); }
.install-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1a1305;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  padding: 0.28rem 0.7rem;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--c-bg, #07090d);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.5);
  z-index: 3;
  white-space: nowrap;
  animation: install-badge-bounce 2.5s ease-in-out infinite;
}
@keyframes install-badge-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}
/* Give the badge clean room above the button */
.hero-cta { margin-top: 0.6rem; }
.btn-install { margin-top: 4px; }
.install-pulse {
  position: absolute;
  inset: -3px;
  border-radius: var(--r-pill);
  border: 2px solid rgba(16, 185, 129, 0.5);
  animation: install-pulse-ring 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes install-pulse-ring {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.18); }
}
.install-spotlight { box-shadow: 0 12px 28px rgba(16, 185, 129, 0.45); }
.install-spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.7), 0 0 30px rgba(16, 185, 129, 0.3);
  opacity: 0;
  animation: install-spotlight-glow 3s ease-in-out infinite;
}
@keyframes install-spotlight-glow {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.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;
}

/* Modern iPhone-15-Pro-style phone frame */
.phone.phone-modern {
  width: 280px;
  height: 580px;
  background: linear-gradient(155deg, #4a5568 0%, #1f2937 30%, #0f172a 70%, #1f2937 100%);
  border-radius: 44px;
  padding: 9px;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 30px 70px rgba(15, 23, 42, 0.35),
    0 12px 28px rgba(15, 23, 42, 0.2);
}
.phone-modern .phone-bezel {
  position: absolute;
  inset: 0;
  border-radius: 44px;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(0, 0, 0, 0.3);
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 24px;
  background: #000;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 5;
}
.phone-side {
  position: absolute;
  background: linear-gradient(90deg, #2a3441, #1a202c);
  border-radius: 2px;
}
.phone-side-right {
  right: -2px;
  top: 110px;
  width: 3px;
  height: 50px;
  box-shadow: 0 50px 0 -5px #1a202c, 0 56px 0 -1px #1a202c;  /* power button accent */
}
.phone-side-right::before {
  content: '';
  position: absolute;
  top: 60px;
  right: 0;
  width: 3px;
  height: 30px;
  background: linear-gradient(90deg, #2a3441, #1a202c);
  border-radius: 2px;
}
.phone-side-left {
  left: -2px;
  top: 80px;
  width: 3px;
  height: 20px;
  box-shadow: 0 30px 0 -3px #1a202c, 0 60px 0 -1px #1a202c, 0 78px 0 0 #1a202c;  /* volume buttons */
}
.phone-modern .phone-screen {
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ===== Static dashboard screenshot inside the phone frame ===== */
.phone-shot {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #f5f5f4 0%, #fafaf9 25%, #f0fdf4 100%);
  display: block;
  position: relative;
}
.phone-shot-img {
  /* Absolutely fill the phone screen so the screenshot always matches the frame
     exactly (no gap/letterbox), regardless of the PNG's intrinsic size. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: inherit;
  z-index: 2;
}
/* If onerror fires, hide the broken image and reveal the placeholder */
.phone-shot-img.phone-shot-fallback {
  visibility: hidden;
  height: 0;
}
.phone-shot-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 32px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: 'Inter', -apple-system, sans-serif;
  text-align: left;
  color: #0f172a;
}
.psp-pill {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1c1917;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35);
  margin-top: 12px;
}
.psp-card {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(254, 243, 199, 0.6));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
}
.psp-card-icon {
  font-size: 22px;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  background: white;
  border-radius: 10px;
  flex-shrink: 0;
}
.psp-card strong {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #b45309;
  margin-bottom: 4px;
}
.psp-card p {
  font-size: 11px;
  line-height: 1.4;
  margin: 0;
}
.psp-note {
  margin: auto 0 24px;
  text-align: center;
  font-size: 10px;
  color: #64748b;
  line-height: 1.5;
}
.psp-note code {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 9px;
  background: rgba(15, 23, 42, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Hide all the old .phone-demo styles when phone-shot is the screen */
.phone-modern .phone-screen.phone-shot .pd-statusbar,
.phone-modern .phone-screen.phone-shot .pd-header,
.phone-modern .phone-screen.phone-shot .pd-pill,
.phone-modern .phone-screen.phone-shot .pd-progress-card,
.phone-modern .phone-screen.phone-shot .pd-quick,
.phone-modern .phone-screen.phone-shot .pd-prayers,
.phone-modern .phone-screen.phone-shot .pd-bottom-nav { display: none; }
.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;
}
/* Dashboard SVG variant — fills the screen edge-to-edge */
.phone-screen-dashboard {
  padding: 0;
  background: transparent;
}
.phone-dashboard-svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 22px;
}

/* ===== Interactive HTML demo dashboard inside the phone frame ===== */
.phone-demo {
  background: linear-gradient(180deg, #f5f5f4 0%, #fafaf9 25%, #f0fdf4 100%);
  padding: 0 8px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 10px;
  color: #0f172a;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
}
/* Real status bar — clock left, signal/battery right (matches the screenshot) */
.pd-statusbar-real {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px 4px;
  font-size: 9px;
  font-weight: 700;
  color: #0f172a;
  position: relative;
  z-index: 2;
}
.pd-time { font-variant-numeric: tabular-nums; }
.pd-sb-right { display: inline-flex; align-items: center; gap: 3px; }
.pd-sb-icon { font-size: 8px; }
/* Legacy stub bar kept hidden (was used by old design) */
.pd-statusbar { display: none; }

.pd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  margin-top: 2px;
}
.pd-header strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #0f172a;
}
.pd-sub {
  display: block;
  font-size: 8.5px;
  color: #64748b;
  margin-top: 2px;
  font-weight: 500;
}
.pd-actions {
  display: flex;
  gap: 4px;
}
.pd-icon-btn {
  width: 22px; height: 22px;
  background: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  position: relative;
}
.pd-bell-dot {
  position: absolute;
  top: 3px; right: 3px;
  width: 5px; height: 5px;
  background: #f59e0b;
  border-radius: 50%;
  border: 1.5px solid white;
}

/* Hajj pill */
.pd-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b 55%, #d97706);
  color: #1c1917;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
  position: relative;
  overflow: hidden;
  animation: pd-pill-shine 4s ease-in-out infinite;
}
@keyframes pd-pill-shine {
  0%, 100% { box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 6px 18px rgba(245, 158, 11, 0.6); }
}
.pd-pill-icon {
  width: 22px; height: 22px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.pd-pill-text { flex: 1; line-height: 1.1; }
.pd-pill-text strong { display: block; font-size: 9px; font-weight: 800; }
.pd-pill-text em { display: block; font-size: 7px; font-style: normal; opacity: 0.85; }
.pd-pill-arrow { font-size: 11px; font-weight: 800; opacity: 0.7; }

/* Day of Arafah occasion card (sunrise icon + tag + message) */
.pd-occasion {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(254, 243, 199, 0.6));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 14px;
}
.pd-occ-icon {
  font-size: 18px;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
}
.pd-occ-body { flex: 1; min-width: 0; }
.pd-occ-tag {
  display: inline-block;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #b45309;
  margin-bottom: 3px;
}
.pd-occ-body p {
  font-size: 9px;
  line-height: 1.45;
  color: #0f172a;
  margin: 0;
  font-weight: 500;
}

/* Progress card */
.pd-progress-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-ring { position: relative; flex-shrink: 0; }
.pd-ring-arc {
  animation: pd-ring-fill 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  stroke-dashoffset: 201;
}
@keyframes pd-ring-fill {
  to { stroke-dashoffset: 64; }
}
.pd-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.pd-ring-label strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.pd-ring-label small { font-size: 6px; color: #64748b; }

.pd-progress-text { flex: 1; min-width: 0; }
.pd-progress-count {
  font-size: 7.5px;
  color: #64748b;
  display: block;
  margin-bottom: 1px;
}
.pd-progress-text strong {
  display: block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.pd-streak {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-size: 7px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

/* Quick actions */
.pd-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.pd-quick-tile {
  background: white;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  padding: 6px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 7px;
  font-weight: 700;
  color: #1f2937;
  cursor: pointer;
  transition: transform 0.2s;
}
.pd-quick-tile:hover { transform: translateY(-1px); }
.pd-quick-tile span { font-size: 14px; margin-bottom: 2px; }

/* Section header */
.pd-section {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 2px;
}
.pd-section strong { font-size: 9px; font-weight: 800; letter-spacing: -0.01em; }
.pd-section-meta { font-size: 7px; color: #64748b; }

/* Prayers */
.pd-prayers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}
.pd-prayer {
  background: white;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 6px;
  padding: 4px 0 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 6.5px;
  font-weight: 700;
  color: #1f2937;
  animation: pd-prayer-pop 0.4s ease both;
}
.pd-prayer:nth-child(1) { animation-delay: 0.2s; }
.pd-prayer:nth-child(2) { animation-delay: 0.3s; }
.pd-prayer:nth-child(3) { animation-delay: 0.4s; }
.pd-prayer:nth-child(4) { animation-delay: 0.5s; }
.pd-prayer:nth-child(5) { animation-delay: 0.6s; }
@keyframes pd-prayer-pop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
.pd-prayer span { font-size: 11px; margin-bottom: 1px; }
.pd-prayer.done {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-color: #10b981;
  color: #047857;
}

/* Today's verse */
.pd-verse {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(168, 85, 247, 0.04));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  padding: 7px 9px;
}
.pd-verse-tag {
  display: inline-block;
  background: #10b981;
  color: white;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 5px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.pd-verse p {
  font-size: 8.5px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 3px;
  color: #0f172a;
}
.pd-verse small { font-size: 6.5px; color: #64748b; }

/* Bottom nav */
.pd-bottom-nav {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  padding: 6px 6px 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  margin-left: -8px;
  margin-right: -8px;
  border-radius: 0 0 36px 36px;
  gap: 2px;
}
.pd-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  color: #64748b;
}
.pd-nav-item small {
  font-size: 6.5px;
  font-weight: 600;
  margin-top: 1px;
}
.pd-nav-item.active { color: #10b981; }
.pd-nav-orb {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.45);
  transform: translateY(-4px);
}
.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;
}
.foot-credit {
  font-size: 0.78rem;
  margin-top: 0.5rem;
  opacity: 0.85;
}
.foot-credit a {
  color: var(--c-primary);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--c-primary-glow);
  transition: opacity var(--t-fast);
}
.foot-credit a:hover { opacity: 0.8; }

/* === 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); }
}
/* Evergreen by default; the LIVE pill only appears when JS adds .in-season. */
.hajj-badge-live { display: none; }
.hajj-badge-evergreen { background: linear-gradient(135deg, #14b8a6, #0e7490); box-shadow: 0 6px 16px rgba(20, 184, 166, 0.32); animation: none; }
.hajj-section.in-season .hajj-badge-live { display: inline-block; }
.hajj-section.in-season .hajj-badge-evergreen { display: none; }
.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;
  text-align: center;  /* override .seo-section h2 left-align */
}
.hajj-section .hajj-section-title,
.hajj-section .hajj-features-title { text-align: center; margin-left: auto; margin-right: auto; }
.hajj-section .hajj-lead { text-align: center; max-width: 720px; margin: 0 auto 1rem; }
.hajj-section .hajj-features { text-align: center; }
.hajj-section .hajj-features p { text-align: left; }
[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; }
  .phone.phone-modern { width: 300px; height: 620px; }

  /* 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; }
  .phone.phone-modern { width: 320px; height: 660px; }
}

/* ============================
   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::after { display: none; }
  .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;
  }
}
