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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* ==== Layout shell ==== */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--nav-height) + 12px);
  max-width: 540px;
  margin: 0 auto;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* ==== 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;
}
.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; }
.toast-emoji {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1.2;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
}
.toast-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.45;
  min-width: 0;
  word-break: break-word;
}
.toast-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}
.toast-text small { color: var(--c-text-muted); }
.toast-action {
  flex-shrink: 0;
  padding: 0.35rem 0.7rem;
  background: var(--c-primary-soft);
  color: var(--c-primary-dark);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  align-self: center;
}
[data-theme="dark"] .toast-action { color: var(--c-primary); }
.toast[data-kind="reminder"] {
  border-left: 3px solid var(--c-primary);
}
.toast[data-kind="badge"] {
  border-left: 3px solid var(--c-accent);
  background: linear-gradient(135deg, var(--c-bg-elev) 0%, var(--c-accent-soft) 100%);
}
.toast[data-kind="streak"] {
  border-left: 3px solid var(--c-accent);
}

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

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

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

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

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

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

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

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

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

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

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

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

/* ==== Landing page ==== */
.landing {
  position: relative;
  min-height: 100vh;
  padding: var(--safe-top) 1.25rem var(--safe-bot);
  overflow-x: hidden;
  background: var(--grad-hero);
}
.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;
}
.landing-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
}
.brand-icon { width: 32px; height: 32px; }
.landing-main {
  position: relative;
  z-index: 2;
  max-width: 540px;
  margin: 0 auto;
  padding: 2rem 0 1rem;
  text-align: center;
}
.hero-title {
  font-size: clamp(1.7rem, 7.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 1rem 0 1.25rem;
  color: var(--c-text);
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  padding: 0 0.25rem;
}
.hero-title em {
  font-style: italic;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.05em;
}
.hero-sub {
  font-size: 1rem;
  color: var(--c-text-muted);
  max-width: 360px;
  margin: 0 auto 2rem;
  line-height: 1.55;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 3rem;
}
.hero-cta .btn { width: 100%; max-width: 280px; }

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

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

.landing-foot {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 0 1rem;
  color: var(--c-text-muted);
  font-size: 0.78rem;
}

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

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