:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --paper: #f5f5f7;
  --white: #ffffff;
  --line: #d2d2d7;
  --muted: #6e6e73;
  --blue: #0071e3;
  --red: #ff3b30;
  --lime: #d7ff4f;
}

body.dark-mode {
  color-scheme: dark;
  --ink: #f5f5f7;
  --paper: #111214;
  --white: #1c1d20;
  --line: #3a3b40;
  --muted: #a7a7ad;
  --blue: #5aa7ff;
  --red: #ff6961;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 280px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  letter-spacing: 0;
}

main {
  display: grid;
  gap: 14px;
  padding: 14px;
}

header,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

header span,
.section-title span,
.focus-button span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  margin: 3px 0 0;
  font-size: 1.3rem;
  line-height: 1;
}

header a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  text-decoration: none;
}

.focus-button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  text-align: left;
}

.focus-button span {
  color: var(--lime);
}

.task-list,
.deadline-list {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}

.task-row,
.deadline-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.task-row i {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.task-row b,
.deadline-row b {
  font-size: 0.86rem;
  line-height: 1.35;
}

.task-row small,
.deadline-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.task-row.done {
  opacity: 0.58;
}

.task-row.done i {
  border-color: var(--blue);
  background: var(--blue);
}

.deadline-row {
  grid-template-columns: 1fr auto;
}

.deadline-row strong {
  color: var(--red);
  font-size: 0.74rem;
  white-space: nowrap;
}

.empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}
