:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overscroll-behavior: none;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-header h1 { font-size: 1.2rem; }
.pill {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.2);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}
#main {
  flex: 1;
  padding: 1rem;
  padding-bottom: 5rem;
}
.card {
  background: var(--card);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.card h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.5; }
.btn-primary, .btn-secondary {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.75rem;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:disabled { opacity: 0.6; }
.btn-secondary { background: #e2e8f0; color: var(--text); }
input, textarea, select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
textarea { min-height: 100px; resize: vertical; }
.quote {
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
  margin: 1rem 0;
}
.gratitude-list, .goal-list {
  list-style: none;
}
.gratitude-list li, .goal-list li {
  padding: 0.75rem;
  background: #f1f5f9;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}
.goal-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-section {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.nav-section button {
  flex: 1;
  min-width: 80px;
  padding: 0.7rem 0.4rem;
  border: none;
  border-radius: 0.6rem;
  background: #e0e7ff;
  color: var(--primary-dark);
  font-weight: 600;
}
#nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: space-around;
  background: var(--card);
  border-top: 1px solid #e2e8f0;
  padding: 0.5rem 0;
  z-index: 10;
}
#nav button {
  background: none;
  border: none;
  font-size: 1.4rem;
}
.hidden { display: none !important; }
.affirmation {
  font-size: 1.3rem;
  text-align: center;
  line-height: 1.5;
  padding: 2rem 1rem;
}
.timer {
  text-align: center;
  font-size: 2.5rem;
  color: var(--primary);
  margin: 1rem 0;
}
.premium { border: 2px solid var(--accent); }
.premium ul { margin-left: 1.2rem; margin-bottom: 0.75rem; }
.status-free { color: var(--muted); }
.status-premium { color: var(--success); font-weight: 700; }
.error { color: var(--danger); margin-top: 0.5rem; }
.success { color: var(--success); margin-top: 0.5rem; }
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stat {
  background: #eef2ff;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
}
.stat .number { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.stat .label { font-size: 0.75rem; color: var(--muted); }
