:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e2e6ef;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #3b5bdb;
  --accent-soft: #eef2ff;
  --danger: #c92a2a;
  --done: #12b886;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* 通信に失敗したときのお知らせ */
.error-banner {
  background: #fff0f0;
  border-bottom: 2px solid #f3b1b1;
  color: #a32020;
  padding: 13px 20px;
  font-size: .92rem;
  font-weight: 600;
  text-align: center;
}

/* ヘッダー */
.header {
  background: linear-gradient(135deg, #3b5bdb 0%, #5f7ae8 100%);
  color: #fff;
  padding: 32px 20px;
}
.header__inner { max-width: 820px; margin: 0 auto; }
.header__title { margin: 0; font-size: 1.6rem; letter-spacing: .02em; }
.header__lead { margin: 6px 0 0; opacity: .85; font-size: .92rem; }

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: grid;
  gap: 20px;
}

/* カード */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.section__title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
  padding-left: 11px;
  border-left: 4px solid var(--accent);
}

/* ダッシュボード */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
}
.stat--accent { background: #fff4e6; }
.stat__label { display: block; font-size: .78rem; color: var(--muted); }
.stat__value { display: block; font-size: 1.9rem; font-weight: 700; line-height: 1.2; }

.latest-review {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f8f9fc;
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.latest-review__label { font-size: .78rem; color: var(--muted); }
.latest-review__body { margin: 4px 0 0; white-space: pre-wrap; }

/* フォーム */
.form { display: grid; gap: 10px; }
.form--row { grid-template-columns: 1fr auto; align-items: start; }
.label { font-size: .82rem; color: var(--muted); }
.input {
  width: 100%;
  padding: 11px 13px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: #fcfdff;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, .12);
}
.input--area { resize: vertical; }
.button {
  padding: 11px 20px;
  font-size: .93rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  justify-self: start;
}
.button:hover { background: #324db3; }
.note { margin: 0; font-size: .78rem; color: var(--muted); }

/* 一覧（背景と同化しないよう、1件ずつ枠と余白をつける） */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item {
  background: #fafbfe;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 13px 15px;
  display: grid;
  gap: 4px;
}
.item--done { border-left-color: var(--done); background: #f4fbf8; }
.item--done .item__title { text-decoration: line-through; color: var(--muted); }
.item__title { font-weight: 700; }
.item__body { margin: 0; white-space: pre-wrap; }
.item__meta { font-size: .76rem; color: var(--muted); }
.item__actions { display: flex; gap: 8px; margin-top: 4px; }
.mini {
  padding: 5px 12px;
  font-size: .78rem;
  font-family: inherit;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.mini:hover { background: #f1f3f9; }
.mini--danger { color: var(--danger); border-color: #f3d4d4; }
.badge {
  display: inline-block;
  padding: 1px 9px;
  font-size: .72rem;
  border-radius: 999px;
  background: #e9ecf5;
  color: var(--muted);
}
.badge--done { background: #d3f9ec; color: #0b7a5c; }

.empty { margin: 0; color: var(--muted); font-size: .88rem; }

.footer {
  padding: 22px;
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr; }
  .form--row { grid-template-columns: 1fr; }
  .button { justify-self: stretch; }
}
