* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Hiragino Sans", "Meiryo", system-ui, sans-serif;
  background: #fdf3f7;
  color: #3e2733;
}

header {
  background: linear-gradient(135deg, #ee7ba8, #b5527a);
  color: #fff;
  padding: 20px 24px;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

/* ダッシュボード */
.dashboard {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: #d85a8b;
}

.stat-label {
  margin-top: 4px;
  color: #9a7686;
  font-size: 0.9rem;
}

/* ダッシュボード：最新の振り返り */
.latest-review-wrap {
  padding: 0 24px 20px;
}

.latest-review {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-left: 5px solid #e0629a;
}

.latest-review-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #d85a8b;
  margin-bottom: 6px;
}

.latest-review-week {
  display: inline-block;
  font-size: 0.78rem;
  color: #9a7686;
  margin-left: 8px;
}

.latest-review-body {
  color: #3e2733;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* レイアウト */
main,
.review-section {
  display: flex;
  gap: 24px;
  padding: 0 24px 40px;
  flex-wrap: wrap;
}

.column {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.panel h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.hint {
  font-size: 0.8rem;
  font-weight: 400;
  color: #94a3b8;
}

/* フォーム */
form label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #475569;
}

form input,
form select,
form textarea {
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid #e6c4d3;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

form textarea {
  resize: vertical;
}

form button {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: #e0629a;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

form button:hover { background: #c94d84; }

/* リスト */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li {
  border: 1px solid #f2dae4;
  border-radius: 10px;
  padding: 14px;
}

.item-title {
  font-weight: 600;
  font-size: 1rem;
}

.item-meta {
  margin-top: 6px;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.6;
}

.review-comment {
  margin-top: 8px;
  color: #3e2733;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.empty {
  color: #94a3b8;
  text-align: center;
  padding: 20px;
}

/* 優先度バッジ */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.badge.high { background: #e11d48; }
.badge.mid { background: #f59e0b; }
.badge.low { background: #10b981; }

/* リマインダーバッジ */
.reminder {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #fce0ec;
  color: #b03a6b;
}

/* 操作ボタン */
.actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.actions button {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
}

.btn-done { background: #10b981; color: #fff; }
.btn-undone { background: #94a3b8; color: #fff; }
.btn-del { background: #f1f5f9; color: #e11d48; }

/* 完了済みタスク */
.task-done .item-title {
  text-decoration: line-through;
  color: #94a3b8;
}

.status-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-tag.done { background: #dcfce7; color: #15803d; }
.status-tag.pending { background: #fef9c3; color: #a16207; }
