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

body {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  background: #fafafa;
  color: #222;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 1.5rem;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; margin-bottom: 0.8rem; color: #444; }

#week-selector {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

#week-selector input {
  width: 5rem;
  padding: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

section {
  background: white;
  border-radius: 8px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid #e8e8e8;
}

#members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.member-card {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  border: 1px solid #e0e0e0;
}

.member-card .avatar { font-size: 2rem; }
.member-card .name { font-weight: 600; margin-top: 0.3rem; }
.member-card .role { font-size: 0.8rem; color: #888; }

.task-item, .habit-item, .question-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.task-item:last-child, .habit-item:last-child, .question-item:last-child {
  border-bottom: none;
}

.streak { color: #e67e22; font-weight: 600; }
.frequency { color: #888; font-size: 0.85rem; }
.completed { color: #27ae60; }

button {
  background: #333;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

button:hover { background: #555; }

.btn-small {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  background: #666;
}

.btn-log { background: #27ae60; }
.btn-log:hover { background: #2ecc71; }

details { margin-top: 0.8rem; }
summary { cursor: pointer; color: #666; font-size: 0.9rem; }

form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

input, select, textarea {
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}

textarea { width: 100%; min-height: 3rem; }

.booklet-link {
  display: inline-block;
  margin: 0.3rem 0.5rem 0.3rem 0;
  padding: 0.4rem 0.8rem;
  background: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
}

.booklet-link:hover { background: #2980b9; }
