* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: #f1f8f3;
  color: #1e2b22;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.dashboard-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dashboard-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2e8b57;
}

.dashboard-label {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #666;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

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

.latest-review-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 28px;
}

.latest-review-card .dashboard-label {
  margin-top: 0;
  margin-bottom: 6px;
}

.latest-review-content {
  font-size: 0.95rem;
  color: #1e2b22;
  white-space: pre-wrap;
  word-break: break-word;
}

.latest-review-week {
  font-size: 0.78rem;
  color: #2e8b57;
  font-weight: 600;
  margin-bottom: 4px;
}

.panel {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.panel h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form input,
.form textarea {
  padding: 8px 10px;
  border: 1px solid #cfe3d4;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: #2e8b57;
  box-shadow: 0 0 0 2px rgba(46, 139, 87, 0.15);
}

.form button {
  align-self: flex-start;
  padding: 8px 16px;
  background: #2e8b57;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.form button:hover {
  background: #256e45;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
}

.item {
  border: 1px solid #dcecdf;
  border-radius: 8px;
  padding: 10px 12px;
}

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

.item-body {
  margin-top: 4px;
  font-size: 0.9rem;
  color: #444;
  white-space: pre-wrap;
  word-break: break-word;
}

.item-meta {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #888;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.item.done .item-title {
  color: #999;
}

.task-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.task-row input[type="checkbox"] {
  margin-top: 3px;
}

.task-main {
  flex: 1;
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
}

.badge.done {
  background: #e3f7e8;
  color: #1a8a3d;
}

.badge.pending {
  background: #fff2e0;
  color: #b5690a;
}

.delete-btn {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
}

.delete-btn:hover {
  text-decoration: underline;
}

.empty {
  color: #999;
  font-size: 0.9rem;
}
