:root {
  color-scheme: light;
  --bg: #f6f1e8;
  --ink: #1c1917;
  --muted: #78716c;
  --card: #fffdf8;
  --line: #e7e0d4;
  --accent: #0d9488;
  --accent-deep: #0f766e;
  --done: #a8a29e;
  --danger: #c2410c;
  --shadow: 0 18px 50px rgba(28, 25, 23, 0.08);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(13, 148, 136, 0.12), transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(194, 65, 12, 0.08), transparent 35%),
    var(--bg);
  padding: 2rem 1rem 3rem;
}

.shell {
  width: min(100%, 560px);
  margin: 0 auto;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.sub {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.badge {
  display: inline-block;
  margin: 0.65rem 0 0;
  padding: 0.28rem 0.65rem;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.28);
  border-radius: 999px;
}

.stats {
  display: flex;
  gap: 0.6rem;
  font-family: system-ui, sans-serif;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.55rem 0.75rem;
  min-width: 4.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat span {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.stat small {
  color: var(--muted);
  font-size: 0.7rem;
}

.composer {
  display: flex;
  gap: 0.6rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.55rem;
  box-shadow: var(--shadow);
}

.composer input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 0.85rem;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  outline: none;
}

.composer input::placeholder {
  color: #a8a29e;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  border-radius: 12px;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff;
  padding: 0.75rem 1.15rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn.primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
}

.btn.ghost:hover:not(:disabled) {
  color: var(--danger);
  border-color: #fdba74;
  background: #fff7ed;
}

.btn.link {
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.2rem;
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn.link:hover:not(:disabled) {
  color: var(--ink);
}

.status {
  min-height: 1.2rem;
  margin: 0.9rem 0 0.6rem;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
  box-shadow: var(--shadow);
  animation: rise 0.25s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.item input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent-deep);
  cursor: pointer;
  flex-shrink: 0;
}

.item .title {
  flex: 1;
  font-size: 1.05rem;
  line-height: 1.35;
  word-break: break-word;
}

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

.empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.5);
}

.foot {
  margin-top: 1.25rem;
  text-align: center;
}

@media (max-width: 520px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
}
