* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background: #f4f5f7;
  color: #222;
}

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

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

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

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

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #3457d5;
}

.stat-value.stat-value-alert {
  color: #d33;
}

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

.latest-review-card {
  grid-column: 1 / -1;
  text-align: left;
}

.latest-review-body {
  margin-top: 6px;
  font-size: 0.92rem;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}

.latest-review-body .review-week {
  display: block;
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 2px;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.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;
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
}

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

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

.form button {
  align-self: flex-start;
  background: #3457d5;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}

.form button:hover {
  background: #2a45ad;
}

.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 #eee;
  border-radius: 8px;
  padding: 10px 12px;
}

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

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

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

.review-week-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

#review-list .item {
  border-left: 4px solid #7a5cd6;
  background: #f8f6fd;
}

#task-list .item {
  border-left: 4px solid #e0a300;
  background: #fffaf0;
}

#task-list .item.done {
  border-left-color: #2e9e44;
  background: #f2fbf4;
}

.status-badge {
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.status-pending {
  color: #a06600;
  background: #fdecc8;
}

.status-done {
  color: #1f7a34;
  background: #ddf3e2;
}

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

.item-actions {
  display: flex;
  gap: 6px;
}

.item-actions button {
  font: inherit;
  font-size: 0.78rem;
  border: 1px solid #ccc;
  background: #fafafa;
  border-radius: 5px;
  padding: 3px 8px;
  cursor: pointer;
}

.item-actions button.done-btn {
  border-color: #3457d5;
  color: #3457d5;
}

.item-actions button.delete-btn {
  border-color: #d33;
  color: #d33;
}

.empty {
  color: #999;
  font-size: 0.9rem;
  text-align: center;
  padding: 12px 0;
}
