:root {
  --bg: #f6f5f1;
  --panel-bg: #fffefc;
  --border: #e4e0d6;
  --ink: #1e1d1a;
  --muted: #8c8778;
  --accent: #2c3641;
  --accent-hover: #1c232b;
  --danger: #a8442f;
  --danger-hover: #8a3626;
  --done-bg: #f1efe9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ---- header ---- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
}

.brand-eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.brand h1 {
  margin: 0;
  font-family: ui-serif, Georgia, "Hiragino Mincho ProN", serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.today {
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 6px;
}

/* ---- dashboard ---- */

.dashboard {
  display: flex;
  align-items: center;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px 32px;
  margin-bottom: 40px;
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 0 8px;
}

.stat-value {
  font-family: ui-serif, Georgia, "Hiragino Mincho ProN", serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat-value-danger {
  color: var(--danger);
}

.stat-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-label svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ---- latest review callout ---- */

.latest-review {
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 20px 32px;
  margin-bottom: 40px;
}

.latest-review-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.latest-review-label svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.latest-review-comment {
  margin: 0;
  font-family: ui-serif, Georgia, "Hiragino Mincho ProN", serif;
  font-size: 17px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.latest-review-week {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ---- layout ---- */

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

@media (max-width: 720px) {
  .columns {
    grid-template-columns: 1fr;
  }
  .app {
    padding: 32px 18px 60px;
  }
  .top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 26px 26px 10px;
}

.panel-wide {
  margin-top: 28px;
  padding-bottom: 10px;
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.panel-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.panel-header h2 svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--muted);
}

.panel-week {
  font-size: 12px;
  color: var(--muted);
}

/* ---- forms ---- */

.add-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 6px 2px 8px;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom: 1.5px solid var(--accent);
}

.btn-add {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-add svg {
  width: 13px;
  height: 13px;
}

.btn-add:hover {
  background: var(--accent);
  color: #fff;
}

/* ---- lists ---- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 460px;
  overflow-y: auto;
}

.item {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.item:last-child {
  border-bottom: none;
}

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

.item-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

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

.item-body {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.item-meta {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

/* task checkbox toggle */

.check {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.check:hover {
  border-color: var(--accent);
}

.check svg {
  width: 11px;
  height: 11px;
}

.item.done .check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

/* icon (delete) buttons — reveal on row hover */

.icon-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
}

.item:hover .icon-btn,
.icon-btn:focus-visible {
  opacity: 1;
}

.icon-btn:hover {
  color: var(--danger);
  background: var(--done-bg);
}

.empty {
  padding: 18px 0;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}
