:root {
  --bg: #f5f6f8;
  --panel-bg: #ffffff;
  --border: #e3e5ea;
  --text: #2b2d34;
  --text-muted: #767a85;

  --accent: #4a63e7;
  --accent-hover: #3a4fd0;
  --accent-soft: #eef1ff;

  --danger: #e15b5b;
  --done-bg: #f5f6f8;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  background: var(--accent);
  color: #fff;
  padding: 22px 24px;
}

.app-header h1 {
  margin: 0;
  font-size: 21px;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px;
}

/* ダッシュボード */
.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.stat-icon {
  font-size: 26px;
  line-height: 1;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  min-width: 36px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.review-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.review-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.review-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.review-card-body .review-week {
  font-weight: 600;
  margin-bottom: 4px;
}

.review-card-body .review-comment {
  font-size: 14px;
  white-space: pre-wrap;
  margin-bottom: 6px;
}

.review-card-body .empty {
  padding: 0;
}

/* レイアウト（縦一列） */
.columns {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 17px;
}

/* フォーム */
.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg);
  border-radius: 10px;
}

.form input,
.form textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: #fff;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form button {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
}

.form button:hover {
  background: var(--accent-hover);
}

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

.empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 12px 0;
}

/* メモ項目 */
.note-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.note-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.note-body {
  font-size: 14px;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 8px;
}

.note-date,
.task-date {
  font-size: 12px;
  color: var(--text-muted);
}

.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* タスク項目 */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.task-item.completed {
  background: var(--done-bg);
}

.task-item input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

.task-content {
  flex: 1;
}

.task-title {
  font-size: 14px;
}

.task-item.completed .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-status {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.task-item.completed .task-status {
  background: #e9e9ec;
  color: var(--text-muted);
}

/* 週次振り返り項目 */
.review-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.review-week {
  font-weight: 600;
  margin-bottom: 6px;
}

.review-comment {
  font-size: 14px;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 8px;
}

.delete-btn {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.delete-btn:hover {
  background: var(--danger);
  color: #fff;
}
