:root {
  color-scheme: light;
  font-family: Inter, ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f4ee;
  color: #20251f;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at 92% 2%, rgba(224, 239, 207, .8), transparent 34%),
    #f6f4ee;
}

button, input { font: inherit; }

.app {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: max(34px, env(safe-area-inset-top)) 20px max(36px, env(safe-area-inset-bottom));
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 5px;
  color: #65715f;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 12vw, 62px);
  line-height: .98;
  letter-spacing: -.055em;
}

.refresh {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .76);
  color: #485543;
  box-shadow: 0 7px 22px rgba(41, 52, 38, .08);
  -webkit-tap-highlight-color: transparent;
}

.refresh svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.refresh:active { transform: scale(.94); }
.refresh.loading svg { animation: spin .8s linear infinite; }

.status {
  min-height: 20px;
  margin: 0 0 12px 4px;
  color: #747b70;
  font-size: 14px;
}

.list { display: grid; gap: 10px; }

.item {
  display: flex;
  align-items: center;
  min-height: 68px;
  padding: 9px 18px 9px 14px;
  border: 1px solid rgba(57, 68, 52, .07);
  border-radius: 20px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 24px rgba(48, 58, 44, .055);
  transition: opacity .24s ease, transform .24s ease, max-height .28s ease, margin .28s ease, padding .28s ease;
  overflow: hidden;
}

.item label {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.item input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkbox {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 2px solid #acb5a6;
  border-radius: 11px;
  background: #fbfcf8;
  transition: .18s ease;
}

.checkbox::after {
  content: "";
  width: 9px;
  height: 16px;
  margin-top: -3px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  opacity: 0;
  transform: rotate(45deg) scale(.5);
  transition: .18s ease;
}

.item-text {
  min-width: 0;
  font-size: 18px;
  font-weight: 610;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.item input:focus-visible + .checkbox { outline: 3px solid rgba(87, 116, 72, .25); outline-offset: 3px; }
.item input:checked + .checkbox { border-color: #5e8150; background: #5e8150; }
.item input:checked + .checkbox::after { opacity: 1; transform: rotate(45deg) scale(1); }
.item.completing .item-text { color: #8a9186; text-decoration: line-through; }
.item.removing { opacity: 0; transform: translateX(18px) scale(.98); }
.item.failed { animation: shake .28s ease; }

.empty, .error {
  padding: 54px 24px;
  text-align: center;
  border: 1px solid rgba(57, 68, 52, .06);
  border-radius: 26px;
  background: rgba(255, 255, 255, .7);
}

.empty-check {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 19px;
  background: #dcebcf;
  color: #4f7143;
  font-size: 29px;
  font-weight: 760;
}

.empty h2, .error h2 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.02em; }
.empty p, .error p { margin: 0; color: #747b70; line-height: 1.45; }
.error button {
  margin-top: 20px;
  padding: 12px 20px;
  border: 0;
  border-radius: 14px;
  background: #34442f;
  color: #fff;
  font-weight: 720;
}

[hidden] { display: none !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 30% { transform: translateX(-5px); } 70% { transform: translateX(5px); } }

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