* {
  box-sizing: border-box;
}

:root {
  --accent: #4c5fd5;
  --accent-dark: #3c4bc0;
  --bg: #eef0f6;
  --panel: #ffffff;
  --text: #1e2130;
  --text-muted: #767b8c;
  --border: #e4e6ef;
  --item-bg: #f7f8fc;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 45, 0.04), 0 8px 24px rgba(20, 24, 45, 0.06);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  background: linear-gradient(180deg, #f3f4fa 0%, #eaecf5 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

.page-header {
  margin-bottom: 28px;
}

h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.panel-icon {
  font-size: 16px;
}

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

.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.stat-icon {
  font-size: 22px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef0fb;
  border-radius: 12px;
  flex-shrink: 0;
}

.stat.accent .stat-icon {
  background: #fdf1e2;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.reflection-highlight {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, #4c5fd5, #6a5bd0);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  color: #fff;
}

.reflection-highlight-icon {
  font-size: 22px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  flex-shrink: 0;
}

.reflection-highlight-body {
  min-width: 0;
}

.reflection-highlight-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.reflection-highlight-week {
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
}

.reflection-highlight-comment {
  font-size: 13px;
  margin: 6px 0 0;
  line-height: 1.6;
  opacity: 0.95;
  white-space: pre-wrap;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.reflection-panel {
  margin-top: 18px;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.form input,
.form textarea {
  border: 1px solid var(--border);
  background: var(--item-bg);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76, 95, 213, 0.15);
  background: #fff;
}

.form button {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.form button:hover {
  background: var(--accent-dark);
}

.form button:active {
  transform: scale(0.98);
}

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

.list-item {
  background: var(--item-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.list-item:hover {
  border-color: #d3d7e6;
  background: #f1f3fa;
}

.item-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
}

.item-body {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: pre-wrap;
  line-height: 1.5;
}

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

.note-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

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

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

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

.task-item.done {
  background: #f4f5fa;
}

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

.task-check {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  border: 1.5px solid #c6cadb;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.task-check:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.task-check:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 10px;
  margin-left: 8px;
  letter-spacing: 0.02em;
}

.badge.done {
  background: #e3f5e8;
  color: #2e9147;
}

.badge.open {
  background: #fdf1e2;
  color: #c67c1f;
}

.delete-btn {
  border: none;
  background: transparent;
  color: #b9bdd0;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.delete-btn:hover {
  color: #d64545;
  background: #fdeaea;
}

.empty {
  color: #a6abbd;
  font-size: 13px;
  padding: 16px 0;
  text-align: center;
}
