* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: #f4f5f7;
  color: #222;
}

header {
  background: #2f3e5c;
  color: #fff;
  padding: 14px 24px;
}
header h1 { margin: 0; font-size: 1.3rem; }

main { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }

/* ダッシュボード */
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  background: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
}
.stat-label { font-size: .85rem; color: #666; }
.stat-value { font-size: 2rem; font-weight: bold; }
.stat.accent .stat-value { color: #d9534f; }

/* レイアウト */
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .columns { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.card h2 { margin: 0 0 12px; font-size: 1.05rem; }

/* フォーム */
form { display: flex; flex-direction: column; gap: 8px; }
.inline-form { flex-direction: row; }
.inline-form input { flex: 1; }

input, textarea {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
textarea { resize: vertical; }

button {
  font: inherit;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: #3b6fd6;
  color: #fff;
  cursor: pointer;
}
button:hover { opacity: .9; }
button.small { padding: 4px 10px; font-size: .85rem; }
button.done-btn { background: #28a745; }
button.undo-btn { background: #888; }
button.delete-btn { background: #d9534f; }
button.edit-btn { background: #f0ad4e; }
.edit-input { width: 100%; padding: 4px 8px; }

/* 一覧 */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  border-top: 1px solid #eee;
  padding: 10px 0;
}
.list li:first-child { border-top: none; }
.empty { color: #999; font-size: .9rem; }

.memo-title { font-weight: bold; }
.memo-body { white-space: pre-wrap; margin: 4px 0; color: #444; }
.meta { font-size: .78rem; color: #888; }

.task { display: flex; align-items: center; gap: 10px; }
.task-main { flex: 1; min-width: 0; }
.task-text { word-break: break-word; }
.task.done .task-text { text-decoration: line-through; color: #999; }
.task-actions { display: flex; gap: 6px; flex-shrink: 0; }

.badge {
  display: inline-block;
  font-size: .72rem;
  padding: 1px 8px;
  border-radius: 10px;
  margin-right: 6px;
  background: #fff3cd;
  color: #8a6d00;
}
.badge.done { background: #d4edda; color: #1e6b33; }

/* 週次の振り返り */
.latest-review { border-left: 4px solid #3b6fd6; }
.latest-review h2 .meta { font-weight: normal; margin-left: 6px; }
.review-comment { white-space: pre-wrap; color: #444; }
.field-label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: #555; }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.review-week { font-weight: bold; }
