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

body {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background: #f0f2f5;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-align: center;
  color: #2c3e50;
}

/* ダッシュボード */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat {
  padding: 20px;
  text-align: center;
}

.stat-label {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: bold;
  color: #2980b9;
}

/* 2カラムレイアウト */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 20px;
}

.panel h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: #2c3e50;
}

/* 入力フォーム */
.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form input,
.form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: #2980b9;
}

button {
  background: #2980b9;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #2471a3;
}

/* 一覧 */
.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list li {
  background: #f9fafb;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
}

.memo-title {
  font-weight: bold;
  margin-bottom: 4px;
}

.memo-content {
  white-space: pre-wrap;
  margin-bottom: 6px;
  color: #444;
}

.meta {
  font-size: 0.78rem;
  color: #95a5a6;
}

/* タスク項目 */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.task-item input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.task-body {
  flex: 1;
}

.task-title {
  font-weight: 500;
}

/* 未完了タスクは赤字・太字で目立たせる */
.task-item:not(.done) .task-title {
  color: #e74c3c;
  font-weight: bold;
}

.task-item.done .task-title {
  text-decoration: line-through;
  color: #aaa;
  font-weight: 500;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

.badge.pending {
  background: #fdecea;
  color: #e74c3c;
}

.badge.done {
  background: #eafaf1;
  color: #27ae60;
}

.btn-delete {
  background: #e74c3c;
  padding: 4px 10px;
  font-size: 0.78rem;
}

.btn-delete:hover {
  background: #c0392b;
}

.row-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.empty {
  color: #aaa;
  font-size: 0.9rem;
  text-align: center;
  padding: 16px;
}

/* 最新の振り返りカード */
.latest-reflection {
  padding: 18px 20px;
  margin-bottom: 28px;
  border-left: 5px solid #8e44ad;
}

.latest-label {
  font-size: 0.9rem;
  color: #8e44ad;
  font-weight: bold;
  margin-bottom: 8px;
}

.latest-week {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 4px;
}

.latest-comment {
  white-space: pre-wrap;
  color: #444;
}

.empty-inline {
  color: #aaa;
}

/* 振り返りパネル */
.reflection-panel {
  margin-top: 20px;
}

.field-label {
  font-size: 0.85rem;
  color: #7f8c8d;
}

.reflection-week {
  font-weight: bold;
  color: #8e44ad;
  margin-bottom: 4px;
}

.reflection-comment {
  white-space: pre-wrap;
  margin-bottom: 6px;
  color: #444;
}

@media (max-width: 720px) {
  .columns {
    grid-template-columns: 1fr;
  }
  .dashboard {
    grid-template-columns: 1fr;
  }
}
