:root {
  --bg: #fdf3ee;              /* ベージュがかったピンクの背景 */
  --bg-accent: #f8e4e6;       /* 背景のグラデーション用 */
  --card: #fffaf7;            /* カードの生成り色 */
  --card-soft: #fdf1ec;       /* 入力欄などの淡い面 */
  --border: #f0dcd6;          /* ベージュの罫線 */
  --border-strong: #e8c4ca;
  --text: #5c4a4a;            /* 黒ではなく暖かみのあるブラウン */
  --muted: #ad9a95;
  --accent: #e08ba3;          /* ローズピンク */
  --accent-deep: #c96f8c;
  --accent-soft: #fbe7ec;
  --beige: #d8b79c;           /* 差し色のベージュ */
  --done: #b58fb0;
  --danger: #d98a94;
  --shadow: 0 4px 16px rgba(200, 150, 155, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 28px 16px 56px;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Segoe UI", sans-serif;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-accent) 55%, var(--bg) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
}

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

.page-header {
  max-width: 960px;
  margin: 0 auto 24px;
  text-align: center;
}

.page-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
}

/* 見出しの下の細いリボン */
.page-header h1::after {
  content: "";
  display: block;
  width: 76px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--beige), var(--accent));
}

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

.stat {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

/* カード上端のピンクのライン */
.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--beige), var(--accent-soft));
}

.stat-accent {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, #fff6f8, var(--card));
}

.stat-accent::before {
  background: linear-gradient(90deg, var(--accent), var(--beige));
}

.stat-label {
  flex: 1 0 100%;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--accent-deep);
}

.stat-unit { font-size: 12px; color: var(--muted); }

/* レイアウト */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 22px 24px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 13px;
  margin: 24px 0 12px;
  color: var(--accent-deep);
  font-weight: 600;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 見出しの前の小さなドット */
.card h2::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.card h2:first-child { margin-top: 0; }

.count { color: var(--muted); font-weight: 400; font-size: 12px; }

/* フォーム */
.form { display: flex; flex-direction: column; gap: 10px; }

input[type="text"], textarea {
  font: inherit;
  color: var(--text);
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-soft);
  resize: vertical;
  transition: border-color 0.15s, background 0.15s;
}

input[type="text"]::placeholder, textarea::placeholder { color: #c9b4ae; }

input[type="text"]:focus, textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 3px 10px rgba(224, 139, 163, 0.32);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}

button:hover {
  filter: brightness(1.05);
  box-shadow: 0 5px 14px rgba(224, 139, 163, 0.4);
}

button:active { transform: translateY(1px); }

.form-row { display: flex; gap: 8px; align-items: center; }
.form-row input[type="date"] { flex: 1; }

input[type="date"] {
  font: inherit;
  color: var(--text);
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-soft);
}

input[type="date"]:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ピンク以外の控えめなボタン */
.btn-sub {
  background: #fff;
  color: var(--accent-deep);
  border: 1px solid var(--border-strong);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: none;
  flex: none;
}

.btn-sub:hover { background: var(--accent-soft); box-shadow: none; filter: none; }

/* カレンダー */
.cal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.cal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-deep);
  letter-spacing: 0.06em;
  min-width: 108px;
  text-align: center;
}

.cal-nav {
  background: #fff;
  color: var(--accent-deep);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 17px;
  line-height: 1;
  box-shadow: none;
  flex: none;
}

.cal-nav:hover { background: var(--accent-soft); box-shadow: none; filter: none; }

.cal-today {
  margin-left: auto;
  background: #fff;
  color: var(--accent-deep);
  border: 1px solid var(--border-strong);
  padding: 5px 14px;
  font-size: 12px;
  box-shadow: none;
}

.cal-today:hover { background: var(--accent-soft); box-shadow: none; filter: none; }

.cal-weekdays, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-weekdays {
  margin-bottom: 4px;
  font-size: 11px;
  text-align: center;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.cal-weekdays .cal-sun { color: var(--accent-deep); }
.cal-weekdays .cal-sat { color: #8fa3c4; }

.cal-blank { aspect-ratio: 1 / 1; }

.cal-day {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
  background: var(--card-soft);
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: none;
  transition: background 0.12s, border-color 0.12s;
}

.cal-day:hover {
  background: var(--accent-soft);
  box-shadow: none;
  filter: none;
}

.cal-day.is-sun { color: var(--accent-deep); }
.cal-day.is-sat { color: #7f92b3; }

.cal-day.is-today {
  border-color: var(--beige);
  background: #fff;
}

.cal-day.is-selected {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(224, 139, 163, 0.35);
}

.cal-day.is-selected.is-sun, .cal-day.is-selected.is-sat { color: #fff; }

.cal-num { line-height: 1.1; }

.cal-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
}

.cal-badge-done { background: var(--done); }

.cal-day.is-selected .cal-badge {
  background: #fff;
  color: var(--accent-deep);
}

.cal-hint {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

/* 一覧 */
.list { list-style: none; margin: 0; padding: 0; }

.list li {
  border-top: 1px dashed var(--border);
  padding: 12px 0;
}

.list li:first-child { border-top: none; }

.item-title { font-weight: 600; word-break: break-word; }

.item-body {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 6px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--accent-soft);
  border-radius: 0 10px 10px 0;
  background: var(--card-soft);
  font-size: 14px;
}

.item-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; letter-spacing: 0.04em; }

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

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

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

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

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

.badge {
  display: inline-block;
  font-size: 10.5px;
  border-radius: 999px;
  padding: 1px 10px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent-deep);
  margin-left: 8px;
  vertical-align: 2px;
  letter-spacing: 0.06em;
}

.badge-done {
  background: #f3ecf5;
  border-color: #ddc9e2;
  color: var(--done);
}

/* 期限の表示 */
.due {
  display: inline-block;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  cursor: pointer;
  margin-bottom: 2px;
}

.due-over { background: #fbe3e3; color: #c26a72; }

.due-none {
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: default;
}

.task-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: none;
}

.task-date-edit {
  font: inherit;
  font-size: 11px;
  color: var(--muted);
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-soft);
  width: 118px;
}

.task-date-edit:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.btn-delete {
  background: #fff;
  color: var(--danger);
  border: 1px solid var(--border-strong);
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
  flex: none;
}

.btn-delete:hover {
  background: var(--accent-soft);
  box-shadow: none;
  filter: none;
}

/* メッセージ */
.message {
  max-width: 960px;
  margin: 18px auto 0;
  min-height: 1.7em;
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

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