* {
  box-sizing: border-box;
}
:root {
  --ink: #153e31;
  --leaf: #197348;
  --lime: #b5ed6a;
  --mint: #dff6dd;
  --paper: #fffef9;
  --line: #c9dbc9;
  color-scheme: light;
}
body {
  margin: 0;
  background: #f6faef;
  color: var(--ink);
  font:
    16px/1.5 system-ui,
    sans-serif;
}
header {
  background: var(--lime);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}
.mast {
  max-width: 48rem;
  margin: auto;
  padding: 0.15rem 1.3rem;
  min-height: 7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.mast span {
  font:
    800 clamp(1.75rem, 5vw, 2.8rem) / 1.1 Georgia,
    serif;
  letter-spacing: -0.045em;
}
.mast img {
  width: clamp(100px, 26vw, 170px);
  height: auto;
}
#identity:not(:empty) {
  display: block;
  margin-top: 0.35rem;
  font-weight: 650;
  font-size: 0.88rem;
}
main {
  width: min(100%, 48rem);
  margin: auto;
  padding: 1.1rem 1.25rem 7.5rem;
}
h1,
h2 {
  font-family: Georgia, serif;
  line-height: 1.15;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  margin: 0.35em 0 0.48em;
}
h2 {
  font-size: 1.55rem;
  margin: 1.4em 0 0.5em;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
summary {
  cursor: pointer;
}
button {
  border: 1px solid #abc7b0;
  border-radius: 12px;
  background: #fffef9;
  font-weight: 650;
  padding: 0.52rem 0.85rem;
  min-height: 44px;
}
button:hover,
summary:hover {
  background: #eaf8d9;
}
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #966411;
  outline-offset: 2px;
}
button[data-action="add"],
button[data-action="newTask"],
button[type="submit"] {
  background: var(--leaf);
  color: white;
  border: 0;
  padding-inline: 1.15rem;
}
button[data-action="add"]:hover,
button[data-action="newTask"]:hover,
button[type="submit"]:hover {
  background: #115536;
}
button[data-action="tick"],
button[data-action="taskState"] {
  background: var(--mint);
  border-color: #a7ceb1;
}
button[data-action="edit"],
button[data-action="history"] {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-color: transparent;
}
nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  position: fixed;
  z-index: 2;
  bottom: max(0.65rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 1.4rem), 30rem);
  padding: 6px;
  border: 1px solid #264c37;
  border-radius: 22px;
  background: #174633;
  box-shadow: 0 5px 20px #1e4d3029;
}
nav button {
  flex: 1;
  padding: 0.5rem 0.25rem;
  border: 0;
  background: transparent;
  color: white;
  border-radius: 16px;
}
nav button:hover {
  background: #2f624b;
}
nav button[aria-current="true"] {
  background: var(--lime);
  color: var(--ink);
}
nav:empty,
#status:empty {
  display: none;
}
#status {
  display: inline-block;
  margin: 0.2rem 0;
  padding: 0.22rem 0.7rem;
  border-radius: 20px;
  background: var(--mint);
  font-size: 0.85rem;
  font-weight: 650;
}
label {
  display: block;
  font-size: 0.94rem;
  font-weight: 600;
  margin: 0.65rem 0;
}
select,
input {
  display: block;
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.68rem 0.8rem;
  border: 1px solid #a2bda9;
  border-radius: 10px;
  background: white;
  min-height: 44px;
}
input[type="checkbox"] {
  display: inline;
  width: 1.1rem;
  min-height: 0;
  height: 1.1rem;
  vertical-align: middle;
  accent-color: var(--leaf);
}
.row,
details,
section > form,
.task-card,
dialog {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  margin: 0.65rem 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  border-left: 5px solid #8bd066;
}
.row strong {
  flex: 1 1 8rem;
  overflow-wrap: anywhere;
}
.row > span {
  color: #48614e;
  font-size: 0.94rem;
  margin-right: 0.3rem;
}
.row:has([data-action="card"]) {
  border-left-color: #e8af50;
  background: #fff9e8;
}
.task-card {
  border-top: 4px solid #8bd066;
}
.task-card h2 {
  margin: 0.3rem 0 0.65rem;
}
.task-card > small {
  color: #526753;
}
.assignment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}
.task-state {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.12rem 0.55rem;
  border-radius: 20px;
  background: var(--mint);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0.8rem 0;
}
summary {
  font-weight: 650;
  padding: 0.25rem;
}
#view > button {
  margin: 0.25rem 0.35rem 0.25rem 0;
}
form button[type="submit"] {
  margin-top: 0.5rem;
}
dialog {
  margin: auto;
  max-width: min(94vw, 32rem);
  width: 100%;
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 16px 55px #14352238;
}
dialog::backdrop {
  background: #143529af;
}
dialog > form {
  text-align: right;
}
article {
  overflow-wrap: anywhere;
}
article:has(svg) {
  text-align: center;
}
article svg {
  background: white;
  width: 100%;
  height: auto;
  max-height: 55vh;
}
@media (max-width: 480px) {
  .mast {
    min-height: 5.2rem;
  }
  .row:has([data-action="tick"]) {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.05rem 0.35rem;
  }
  .row:has([data-action="tick"]) strong,
  .row:has([data-action="tick"]) > span {
    grid-column: 1;
  }
  .row [data-action="tick"] {
    grid-column: 2;
    grid-row: 1/3;
  }
  .row [data-action="edit"] {
    grid-column: 3;
    grid-row: 1/3;
  }
  .row {
    padding: 0.7rem;
  }
  main {
    padding-inline: 1rem;
  }
}

.shop-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
#settings {
  margin-left: auto;
}
@media (max-width: 480px) {
  .mast img {
    width: 4rem;
  }
  .mast {
    gap: 0.4rem;
  }
  .mast span {
    font-size: 1.5rem;
  }
}
