* { 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;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header h1 { margin: 0; font-size: 1.3rem; }
.today { font-size: 1rem; }

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: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* 見出しが折り返しても数字の位置をそろえる */
}
.stat .label { font-size: .85rem; color: #666; }
.stat .value { font-size: 2rem; font-weight: bold; }
.stat.accent .value { color: #d9534f; }

/* レイアウト */
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) {
  .columns { grid-template-columns: 1fr; }
  .stat .value { font-size: 1.5rem; }
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  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 { display: flex; gap: 8px; }
.inline input { flex: 1; }
.remind-label { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: #555; }
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: #2f3e5c;
  color: #fff;
  cursor: pointer;
}
button:hover { opacity: .85; }
button.danger { background: #d9534f; }
button.small { padding: 4px 10px; font-size: .85rem; }

/* 一覧 */
.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; }
.list .empty { color: #999; }

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

.task { display: flex; align-items: center; gap: 10px; }
.task input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.task .content { flex: 1; }
.task.done .text { text-decoration: line-through; color: #999; }
.badge {
  display: inline-block;
  font-size: .75rem;
  padding: 1px 8px;
  border-radius: 10px;
  margin-right: 6px;
  background: #fbe3e2;
  color: #c0392b;
}
.task.done .badge { background: #e2f4e6; color: #2e7d32; }

/* 振り返り */
.review-week { font-weight: bold; }
.review-comment { white-space: pre-wrap; margin: 4px 0; }
.latest-review .review-comment { margin: 6px 0; }
.list li.review { cursor: pointer; }
.list li.review:hover { background: #f8f9fb; }

/* リマインド */
.remind { display: inline-block; margin-left: 6px; }
.remind.due { color: #d9534f; font-weight: bold; }
.task.done .remind { color: #999; font-weight: normal; }

.reminder-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff4d6;
  border: 1px solid #f0c36d;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.reminder-banner .msg { flex: 1; }
