﻿:root {
  color-scheme: light;
  font-family: "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: #23332d;
  background: #f5f7f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 12%, rgba(221, 236, 224, 0.62), transparent 42%),
    #f5f7f4;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100% - 40px, 760px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5eae4;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #263d32;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #347451;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.phase-label {
  color: #7b8981;
  font-size: 13px;
}

.todo-panel {
  width: min(100%, 620px);
  margin: 76px auto 48px;
  padding: 38px 40px 30px;
  border: 1px solid #e8ece7;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 48px rgba(37, 61, 46, 0.07);
}

.intro {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #4a8964;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 9px;
  color: #25372e;
  font-size: clamp(24px, 5vw, 30px);
  letter-spacing: -0.04em;
  line-height: 1.35;
}

.intro-copy {
  margin-bottom: 0;
  color: #7b8981;
  font-size: 14px;
  line-height: 1.7;
}

.todo-form {
  display: flex;
  gap: 10px;
}

.todo-form input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 15px;
  border: 1px solid #dfe6df;
  border-radius: 10px;
  outline: none;
  background: #fbfcfb;
  color: #26372e;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.todo-form input::placeholder {
  color: #a4afa8;
}

.todo-form input:focus {
  border-color: #5c9b73;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(78, 144, 101, 0.13);
}

.add-button {
  flex: 0 0 auto;
  height: 48px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  background: #347451;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  transition: background 150ms ease, transform 150ms ease;
}

.add-button:hover {
  background: #286341;
}

.add-button:active {
  transform: translateY(1px);
}

.add-button span:first-child {
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}

.add-button:focus-visible,
.delete-button:focus-visible,
.todo-checkbox:focus-visible {
  outline: 3px solid rgba(62, 132, 85, 0.34);
  outline-offset: 3px;
}

.form-message {
  min-height: 20px;
  margin: 7px 0 0;
  color: #a54b43;
  font-size: 12px;
}

.list-heading {
  margin-top: 23px;
  padding-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0ec;
}

.list-heading h2 {
  margin-bottom: 0;
  color: #314238;
  font-size: 15px;
  font-weight: 700;
}

.task-counts {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #859189;
  font-size: 12px;
}

.task-counts strong {
  color: #4c6857;
  font-weight: 700;
}

.count-divider {
  width: 1px;
  height: 12px;
  background: #dce3dc;
}

.todo-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-item {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #edf0ec;
}

.todo-checkbox {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: #43835b;
  cursor: pointer;
}

.todo-text {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #38483e;
  font-size: 14px;
  line-height: 1.55;
}

.todo-item.is-completed .todo-text {
  color: #a0aaa3;
  text-decoration: line-through;
  text-decoration-color: #aeb9b0;
}

.delete-button {
  min-width: 36px;
  min-height: 36px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9aa59d;
  cursor: pointer;
  font-size: 12px;
  transition: background 150ms ease, color 150ms ease;
}

.delete-button:hover {
  background: #fff0ee;
  color: #b94b40;
}

.empty-state {
  padding: 30px 12px 25px;
  text-align: center;
}

.empty-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eff6f0;
  color: #4a8964;
  font-size: 18px;
}

.empty-title {
  margin-bottom: 5px;
  color: #5c6e62;
  font-size: 14px;
  font-weight: 650;
}

.empty-copy {
  margin-bottom: 0;
  color: #9aa59d;
  font-size: 12px;
}

.list-note {
  margin: 17px 0 0;
  color: #9aa59d;
  font-size: 12px;
  text-align: center;
}

.page-footer {
  margin-top: auto;
  padding: 20px 0 26px;
  color: #a0aaa3;
  font-size: 12px;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 28px, 760px);
  }

  .topbar {
    min-height: 70px;
  }

  .phase-label {
    font-size: 11px;
  }

  .todo-panel {
    margin: 38px auto 32px;
    padding: 28px 20px 24px;
    border-radius: 16px;
  }

  .todo-form {
    flex-direction: column;
  }

  .add-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}