:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #f5f5f3;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  background: #f5f5f3;
}

button, input { font: inherit; }

.app-shell {
  width: min(100%, 620px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom));
}

.topbar { margin-bottom: 30px; }

.date {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .01em;
  color: #6b6b68;
}

.time {
  margin-top: 3px;
  font-size: clamp(38px, 12vw, 58px);
  line-height: 1;
  font-weight: 760;
  letter-spacing: -.05em;
}

.composer { margin-bottom: 34px; }

#task-form {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 9px;
}

#task-input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #d8d8d3;
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: #171717;
  font-size: 16px;
}

#task-input:focus { border-color: #777772; }

#task-form button {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: #171717;
  color: #fff;
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
}

.task-section { margin-top: 30px; }
.done-section { margin-top: 42px; }

.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

h2 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #6b6b68;
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e6e6e1;
  color: #676763;
  font-size: 12px;
  font-weight: 700;
}

.task-list {
  overflow: hidden;
  border-radius: 15px;
  background: #fff;
}

.task-row {
  display: flex;
  align-items: center;
  min-height: 57px;
  padding: 6px 8px 6px 14px;
  border-bottom: 1px solid #eeeeea;
}

.task-row:last-child { border-bottom: 0; }

.task-main {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 12px;
  cursor: pointer;
}

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

.custom-check {
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  border: 2px solid #a9a9a3;
  border-radius: 7px;
  position: relative;
}

.task-checkbox:checked + .custom-check {
  background: #171717;
  border-color: #171717;
}

.task-checkbox:checked + .custom-check::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.task-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.3;
}

.done-section .task-title {
  color: #92928d;
  text-decoration: line-through;
}

.delete-task {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #aaa9a3;
  font-size: 25px;
  cursor: pointer;
}

.empty {
  margin: 13px 2px 0;
  color: #9a9a95;
  font-size: 14px;
}

@media (min-width: 700px) {
  .app-shell { padding-left: 0; padding-right: 0; }
}
