:root {
  color-scheme: light;
  --bg: #eef5f2;
  --bg-2: #f7faf5;
  --ink: #1f2a2e;
  --muted: #6b777b;
  --line: rgba(31, 42, 46, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: #ffffff;
  --accent: #2f8c7c;
  --accent-dark: #1f6f63;
  --gold: #e3ad43;
  --rose: #d85666;
  --shadow: 0 24px 70px rgba(43, 70, 64, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(47, 140, 124, 0.14), transparent 34%),
    linear-gradient(315deg, rgba(227, 173, 67, 0.17), transparent 30%),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.planner {
  width: min(920px, 100%);
  max-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto auto auto auto minmax(220px, 1fr) auto;
  gap: 18px;
  padding: clamp(20px, 4vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.topbar,
.summary,
.composer,
.footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1;
  letter-spacing: 0;
}

.date-pill {
  flex: 0 0 auto;
  min-width: 132px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.summary {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(47, 140, 124, 0.1), rgba(227, 173, 67, 0.08));
}

.progress-ring {
  position: relative;
  width: 104px;
  aspect-ratio: 1;
  flex: 0 0 auto;
}

.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track,
.ring-value {
  fill: none;
  stroke-width: 10;
}

.ring-track {
  stroke: rgba(31, 42, 46, 0.1);
}

.ring-value {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 302;
  stroke-dashoffset: 302;
  transition: stroke-dashoffset 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress-ring strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.28rem;
}

.summary-copy {
  flex: 1;
  min-width: 0;
}

.summary-copy h2 {
  margin-bottom: 7px;
  font-size: clamp(1.1rem, 3vw, 1.55rem);
  line-height: 1.28;
}

.summary-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.composer {
  align-items: stretch;
}

.input-wrap {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 7px;
}

.input-wrap label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.input-wrap input,
.task-title {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--ink);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.input-wrap input {
  height: 54px;
  padding: 0 16px;
}

.input-wrap input:focus,
.task-title:focus {
  border-color: rgba(47, 140, 124, 0.55);
  box-shadow: 0 0 0 4px rgba(47, 140, 124, 0.14);
}

.primary-btn {
  align-self: end;
  height: 54px;
  min-width: 128px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(47, 140, 124, 0.28);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
  box-shadow: 0 18px 34px rgba(47, 140, 124, 0.34);
}

.primary-btn:active {
  transform: translateY(0);
}

.btn-icon {
  display: grid;
  place-items: center;
  width: 24px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.15rem;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
}

.filter {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.filter.active {
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: 0 9px 22px rgba(31, 42, 46, 0.09);
}

.task-panel {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
}

.task-list {
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 12px;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 140, 124, 0.55) transparent;
}

.task-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid rgba(31, 42, 46, 0.08);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: 0 10px 24px rgba(31, 42, 46, 0.06);
  animation: riseIn 260ms ease both;
}

.task-item.done {
  background: rgba(247, 250, 245, 0.88);
}

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

.check-shell {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
}

.task-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-check {
  width: 24px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid rgba(47, 140, 124, 0.42);
  border-radius: 50%;
  background: white;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.custom-check::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  opacity: 0;
  transform: rotate(-45deg) scale(0.7);
  transition: opacity 140ms ease, transform 140ms ease;
}

.task-check:checked + .custom-check {
  border-color: var(--accent);
  background: var(--accent);
  transform: scale(1.04);
}

.task-check:checked + .custom-check::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.task-title {
  height: 42px;
  padding: 0 12px;
  border-color: transparent;
  background: transparent;
  font-weight: 600;
}

.delete-btn {
  width: 36px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(31, 42, 46, 0.4);
  font-size: 1.35rem;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.delete-btn:hover {
  background: rgba(216, 86, 102, 0.1);
  color: var(--rose);
  transform: rotate(8deg);
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.empty-state.hidden {
  opacity: 0;
  transform: translateY(8px);
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(47, 140, 124, 0.1);
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 800;
}

.empty-state h2 {
  font-size: 1.25rem;
}

.empty-state p {
  color: var(--muted);
}

.footer-actions {
  justify-content: flex-end;
}

.ghost-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-weight: 700;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.ghost-btn:hover {
  border-color: rgba(47, 140, 124, 0.36);
  background: white;
  color: var(--accent-dark);
}

.ghost-btn.danger:hover {
  border-color: rgba(216, 86, 102, 0.32);
  color: var(--rose);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 14px;
    place-items: stretch;
  }

  .planner {
    min-height: calc(100vh - 28px);
    max-height: none;
    gap: 14px;
  }

  .topbar,
  .summary,
  .composer {
    align-items: stretch;
    flex-direction: column;
  }

  .date-pill {
    width: 100%;
  }

  .summary {
    flex-direction: row;
    align-items: center;
  }

  .progress-ring {
    width: 88px;
  }

  .primary-btn {
    width: 100%;
  }

  .footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 430px) {
  .summary {
    flex-direction: column;
    text-align: center;
  }

  .task-item {
    grid-template-columns: 30px minmax(0, 1fr) 32px;
    gap: 7px;
    padding: 8px;
  }

  .task-title {
    padding: 0 8px;
  }
}
