:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #eef4ff;
  --line: #d8e1ee;
  --text: #16202c;
  --muted: #5e6b79;
  --brand: #1155cc;
  --brand-soft: #dfeaff;
  --danger: #b42318;
  --danger-soft: #ffe4e0;
  --ok: #117a37;
  --shadow: 0 14px 40px rgba(17, 38, 68, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 60%);
  color: var(--text);
  font-family: "Pretendard Variable", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.hero-copy,
.deadline-card,
.toolbar,
.section-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-weight: 700;
  line-height: 1.6;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
}

.hero-desc {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.deadline-card {
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #0f4cc1 0%, #2166e4 100%);
  color: white;
}

.deadline-label {
  opacity: 0.85;
  font-size: 0.95rem;
}

.deadline-date {
  margin-top: 8px;
  font-size: 1.7rem;
  font-weight: 800;
}

.role-switch {
  display: inline-flex;
  gap: 10px;
  margin: 18px 0 20px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.role-btn {
  background: transparent;
  color: var(--muted);
  padding: 12px 18px;
}

.role-btn.active {
  background: var(--brand);
  color: #fff;
}

.toolbar {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.progress-wrap {
  flex: 1;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e7edf6;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f4cc1 0%, #35a0ff 100%);
  transition: width 0.2s ease;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.secondary-btn {
  background: var(--panel-2);
  color: var(--brand);
}

.danger-btn {
  background: var(--danger-soft);
  color: var(--danger);
}

.sections {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.section-card {
  overflow: hidden;
}

.section-head {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  cursor: pointer;
}

.section-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.section-count {
  min-width: 88px;
  text-align: right;
  font-weight: 800;
  color: var(--brand);
}

.section-body {
  padding: 0 18px 16px;
}

.item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 16px 10px;
  border-top: 1px solid var(--line);
}

.item:first-child {
  border-top: 1px solid var(--line);
}

.item input[type="checkbox"] {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

.item-title {
  font-weight: 700;
}

.item-note {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.item-note .highlight {
  color: var(--brand);
  font-weight: 800;
}

.item-tag {
  align-self: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: #eff3f8;
  color: #44505d;
}

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

.item.done .item-tag {
  background: #e1f7ea;
  color: var(--ok);
}

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

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions button {
    flex: 1;
  }

  .item {
    grid-template-columns: auto 1fr;
  }

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