* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6b4c9a;
  --primary-light: #8a6fbf;
  --accent: #e07a5f;
  --success: #3d8b40;
  --background: #faf8fc;
  --surface: #ffffff;
  --text: #2d2a32;
  --text-light: #666;
  --border: #e0d6ea;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
}

header {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.tagline { font-size: 1.1rem; opacity: 0.9; }

main { max-width: 900px; margin: 0 auto; padding: 1rem; }

section { background: var(--surface); border-radius: 8px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

h2 { color: var(--primary); margin-bottom: 1rem; font-size: 1.5rem; }

h3 { color: var(--primary); margin: 1.5rem 0 0.75rem; font-size: 1.2rem; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }

.form-group input, .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.checkbox-group label { display: flex; align-items: center; font-weight: normal; }

.checkbox-group input { width: auto; margin-right: 0.5rem; }

.primary-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  display: block;
  margin: 0 auto;
}

.primary-btn:hover { background: var(--primary-light); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}

.calendar-day {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem;
  text-align: center;
  cursor: pointer;
  font-size: 0.8rem;
  position: relative;
}

.calendar-day:hover { background: var(--border); }

.calendar-day.today { border-color: var(--primary); }

.calendar-day.completed { background: var(--success); color: white; }

.calendar-day .date-num { font-weight: bold; }

.calendar-day .prompt-preview { font-size: 0.7rem; margin-top: 0.25rem; }

.starred::after { content: '★'; color: gold; position: absolute; top: 2px; right: 4px; }

.favorites-section { margin-top: 2rem; }

.favorite-item {
  background: var(--background);
  padding: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  border-left: 3px solid var(--accent);
}

.streak-info { text-align: center; font-size: 1.1rem; margin-bottom: 1rem; }

.hidden { display: none; }

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-light);
}

footer a { color: var(--primary); }

@media (max-width: 600px) {
  .calendar-grid { grid-template-columns: repeat(4, 1fr); }
  .checkbox-group { grid-template-columns: 1fr; }
  header h1 { font-size: 2rem; }
}

@media (max-width: 400px) {
  .calendar-grid { grid-template-columns: repeat(3, 1fr); }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
