* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 32px 16px 70px;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  /* やわらかい桜色のグラデーション */
  background: linear-gradient(160deg, #fdf4f7 0%, #faf1f6 45%, #f6f1f8 100%);
  background-attachment: fixed;
  color: #5a4650;
  line-height: 1.7;
}

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

header {
  margin-bottom: 26px;
  text-align: center;
}

h1 {
  margin: 0;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 30px;
  font-weight: normal;
  letter-spacing: 0.12em;
  color: #b96a8c;
}

/* タイトルの下に細い飾り線 */
h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, #f3c7d8, #d9a3c4);
  border-radius: 2px;
}

.subtitle {
  margin: 10px 0 0;
  color: #a9909c;
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* ダッシュボード */
.dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.stat {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #f3e0e8;
  border-radius: 18px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(203, 148, 175, 0.12);
}

.stat-label {
  display: block;
  font-size: 12px;
  color: #a9909c;
  letter-spacing: 0.06em;
}

.stat-value {
  display: block;
  margin-top: 4px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 32px;
  color: #c77ba0;
}

/* ダッシュボード内：最新の振り返り */
.latest-review {
  background: linear-gradient(135deg, #fdf1f6 0%, #f7f0fa 100%);
  border: 1px solid #f0dbe8;
  border-radius: 18px;
  padding: 18px 22px;
  margin-bottom: 28px;
  box-shadow: 0 4px 14px rgba(203, 148, 175, 0.12);
}

.latest-review-heading {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #a9909c;
}

.latest-review-heading::before {
  content: "❀";
  margin-right: 6px;
  color: #e6a8c4;
}

.latest-review-week {
  margin-top: 4px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: #b96a8c;
}

.latest-review-comment {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  color: #6b5460;
}

.latest-review .empty {
  padding: 8px 0 2px;
  text-align: left;
}

/* 2カラム */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* 週次の振り返りは横幅いっぱいに置く */
.panel-wide {
  margin-top: 22px;
}

.panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #f3e0e8;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 6px 20px rgba(203, 148, 175, 0.12);
}

h2 {
  margin: 0 0 16px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 18px;
  font-weight: normal;
  letter-spacing: 0.1em;
  color: #b96a8c;
  padding-bottom: 12px;
  border-bottom: 1px solid #f6e3ea;
}

/* 見出しの前に小さな飾り */
h2::before {
  content: "❀";
  margin-right: 8px;
  font-size: 14px;
  color: #e6a8c4;
}

/* 入力欄 */
.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.form input,
.form textarea {
  font: inherit;
  padding: 12px 14px;
  background: #fffdfe;
  border: 1px solid #f0dbe4;
  border-radius: 12px;
  color: #5a4650;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-label {
  font-size: 12px;
  color: #a9909c;
  letter-spacing: 0.04em;
}

.form-note {
  margin: 2px 0 0;
  font-size: 12px;
  color: #b8a2ac;
}

.form input::placeholder,
.form textarea::placeholder {
  color: #c7b2bd;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: #e0a3c1;
  box-shadow: 0 0 0 3px rgba(224, 163, 193, 0.18);
}

.form button {
  font: inherit;
  padding: 12px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #e79ebb 0%, #cf87ac 100%);
  color: #fff;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(207, 135, 172, 0.3);
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
}

.form button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(207, 135, 172, 0.38);
}

.form button:active {
  transform: translateY(0);
}

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

.item {
  background: #fdf6f9;
  border: 1px solid #f2dde6;
  border-left: 4px solid #e6a8c4;
  border-radius: 14px;
  padding: 14px 16px;
  transition: background 0.2s, box-shadow 0.2s;
}

.item:hover {
  background: #fbeef4;
  box-shadow: 0 4px 12px rgba(203, 148, 175, 0.18);
}

.item-title {
  font-weight: bold;
  color: #6b5460;
  word-break: break-word;
}

.item-body {
  margin: 6px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  color: #7d6672;
}

.item-meta {
  margin-top: 8px;
  font-size: 12px;
  color: #a9909c;
}

.empty {
  color: #c2aab5;
  font-size: 14px;
  text-align: center;
  padding: 18px 0;
}

/* タスク */
.task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.task-main {
  flex: 1;
  min-width: 0;
}

/* 完了したタスクは色を落として区別する */
.task.done {
  background: #f7f3f6;
  border-left-color: #d8c6d1;
}

.task.done:hover {
  background: #f3edf1;
}

.task.done .item-title {
  text-decoration: line-through;
  color: #b0a0aa;
}

.task input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #d9799a;
}

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: normal;
  vertical-align: middle;
}

.badge-done {
  background: #eee7f0;
  color: #94809d;
}

.badge-open {
  background: #fce6ee;
  color: #c4708f;
}

.delete-btn {
  font: inherit;
  font-size: 12px;
  padding: 5px 14px;
  border: 1px solid #f0cdd9;
  border-radius: 999px;
  background: #fff;
  color: #c47c94;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.delete-btn:hover {
  background: #fbe9f0;
  color: #b05f7c;
}
