:root {
  --bg: #f6f5ef;
  --surface: #ffffff;
  --surface-soft: #fff8e8;
  --ink: #24302f;
  --muted: #66706d;
  --line: #ded9cb;
  --green: #1f8a70;
  --green-soft: #dff3ec;
  --yellow: #f3b23c;
  --red: #d85845;
  --blue: #3377b8;
  --shadow: 0 14px 34px rgba(55, 49, 37, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(243, 178, 60, 0.18), transparent 34rem),
    linear-gradient(180deg, #f9f7ef 0%, var(--bg) 42%, #eef5f1 100%);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

button,
select,
textarea {
  font: inherit;
}

.site-header,
main {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 22px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.eyebrow,
.section-label {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.header-actions,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 0 16px;
}

.button-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.overview,
.progress-panel,
.panel,
.task-card {
  border: 1px solid rgba(137, 126, 101, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 1.4fr);
  gap: 26px;
  padding: 26px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.overview-grid div {
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.overview-grid dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.overview-grid dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.progress-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding: 20px;
}

.progress-meter {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4dfd1;
}

.progress-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #63b99e);
  transition: width 0.25s ease;
}

.progress-text {
  white-space: nowrap;
  font-weight: 800;
}

.status-summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-chip {
  border-radius: 999px;
  background: var(--green-soft);
  color: #125d4c;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 10px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  margin-top: 18px;
  padding-bottom: 40px;
}

.task-board {
  min-width: 0;
}

.filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.filter select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.task-groups {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.task-card {
  overflow: hidden;
}

.task-card.is-complete {
  background: rgba(245, 252, 249, 0.92);
}

.task-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.task-header p {
  color: var(--muted);
  font-size: 0.9rem;
}

.task-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.task-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  background: #fff;
  padding: 14px 18px;
}

.task-item.is-hidden {
  display: none;
}

.task-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  margin-top: 3px;
}

.task-title {
  display: block;
  font-weight: 800;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.badge {
  border-radius: 999px;
  background: #eef1ed;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 8px;
}

.badge.high {
  background: #ffe9df;
  color: #a23624;
}

.badge.medium {
  background: #fff0c8;
  color: #795018;
}

.badge.low {
  background: #e6f0fb;
  color: #235a89;
}

.side-column {
  display: grid;
  align-content: start;
  gap: 14px;
}

.panel {
  padding: 18px;
}

.date-list,
.memo-list {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
}

.date-list {
  list-style: none;
}

.date-list li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.date-list time {
  border-radius: 8px;
  background: #f1f6f3;
  color: var(--green);
  font-weight: 900;
  padding: 4px 8px;
  text-align: center;
}

.memo-list {
  padding-left: 1.1em;
}

dialog {
  width: min(680px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0;
}

dialog::backdrop {
  background: rgba(20, 28, 26, 0.42);
}

dialog form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

@media (max-width: 920px) {
  .site-header,
  .overview,
  .progress-panel,
  .layout {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-header,
  main {
    width: min(100% - 20px, 1180px);
  }

  .header-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions .button,
  .filter select {
    width: 100%;
  }

  .overview,
  .progress-panel,
  .panel {
    padding: 16px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .task-header,
  .task-item {
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 14px;
  }

  .task-item .badge {
    grid-column: 2;
    justify-self: start;
  }

  .date-list li {
    grid-template-columns: 1fr;
  }
}
