:root {
  --bg: #fff7ef;
  --ink: #35261f;
  --muted: #7d6d64;
  --panel: #ffffff;
  --accent: #f47c8f;
  --accent-dark: #c94762;
  --mint: #7cc9a6;
  --line: #efd8cc;
  --shadow: 0 20px 55px rgba(92, 58, 44, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at top left, rgba(244, 124, 143, 0.26), transparent 32rem),
    linear-gradient(135deg, #fff7ef 0%, #f5fbf5 56%, #fff0f4 100%);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.hero {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.intro {
  max-width: 34rem;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.cat-badge {
  position: relative;
  width: 128px;
  height: 128px;
}

.face {
  position: absolute;
  inset: 18px 6px 0;
  display: block;
  border: 4px solid #493129;
  border-radius: 48% 48% 44% 44%;
  background: #ffd6a8;
  box-shadow: var(--shadow);
}

.ear {
  position: absolute;
  top: 2px;
  width: 42px;
  height: 48px;
  border: 4px solid #493129;
  background: #ffd6a8;
  transform: rotate(45deg);
  z-index: 0;
}

.left-ear {
  left: 18px;
  border-radius: 12px 0 6px 0;
}

.right-ear {
  right: 18px;
  border-radius: 6px 12px 0 0;
}

.eye {
  position: absolute;
  top: 42px;
  width: 13px;
  height: 20px;
  border-radius: 50%;
  background: #2d201b;
}

.left-eye {
  left: 34px;
}

.right-eye {
  right: 34px;
}

.nose {
  position: absolute;
  left: 50%;
  top: 65px;
  width: 14px;
  height: 10px;
  border-radius: 50% 50% 60% 60%;
  background: var(--accent);
  transform: translateX(-50%);
}

.whisker {
  position: absolute;
  top: 76px;
  width: 34px;
  height: 3px;
  border-radius: 99px;
  background: #493129;
}

.whisker-left {
  left: 16px;
  transform: rotate(8deg);
}

.whisker-right {
  right: 16px;
  transform: rotate(-8deg);
}

.todo-panel {
  padding: 24px;
  border: 1px solid rgba(239, 216, 204, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.todo-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.todo-form input {
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdfb;
  outline: none;
}

.todo-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(244, 124, 143, 0.16);
}

.todo-form button,
.summary button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent-dark);
  cursor: pointer;
  font-weight: 800;
}

.todo-form button {
  min-width: 86px;
}

.toolbar {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}

.filter {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fffdfb;
  cursor: pointer;
  font-weight: 700;
}

.filter.active {
  border-color: transparent;
  color: #173d2d;
  background: #c9f0df;
}

.todo-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfb;
}

.todo-item.done .todo-text {
  color: #9a8a82;
  text-decoration: line-through;
}

.check {
  width: 28px;
  height: 28px;
  border: 2px solid var(--mint);
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

.todo-item.done .check {
  background: var(--mint);
}

.todo-text {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.delete {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--accent-dark);
  background: #ffe7ec;
  cursor: pointer;
  font-weight: 900;
}

.empty-state {
  display: none;
  padding: 34px 12px 22px;
  color: var(--muted);
  text-align: center;
}

.empty-state.visible {
  display: block;
}

.sleepy-cat {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 2.4rem;
  font-weight: 900;
}

.summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 800;
}

.summary button {
  padding: 0 14px;
  background: #6f5b53;
}

footer {
  padding: 0 16px 22px;
  color: #7d6d64;
  font-size: 0.9rem;
  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: 640px) {
  .app-shell {
    width: min(100% - 24px, 920px);
    padding-top: 28px;
  }

  .hero {
    grid-template-columns: 86px 1fr;
    gap: 16px;
  }

  .cat-badge {
    width: 84px;
    height: 84px;
    transform: scale(0.66);
    transform-origin: left center;
  }

  .todo-panel {
    padding: 16px;
  }

  .todo-form,
  .summary {
    grid-template-columns: 1fr;
  }

  .todo-form {
    display: grid;
  }

  .summary {
    display: grid;
    justify-items: stretch;
  }
}
