.todo-page main { max-width: 1000px; }
.todo-page h2, .todo-page .section > summary { font-family: inherit; font-weight: 700; color: #12452d; }
.todo-page .section { margin: 0 0 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.todo-page .section > summary { padding: 18px 20px; min-height: 56px; font-size: 1.35rem; background: #e8f4e8; cursor: pointer; }
.todo-page .section.more > summary { background: #e8f4e8; }
.todo-page .body { padding: 18px; }
.todo-page .date-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.todo-page .date-row input { width: auto; }
.todo-page .date-message { flex-basis: 100%; color: #92392d; }
.todo-page p { overflow-wrap: anywhere; }
.todo-page .hint, .todo-page .count { font-size: .85rem; color: var(--muted); }
.todo-page .hint { margin: 12px 0; }
.todo-page .count { background: transparent; border: 0; padding: 0; font-weight: 400; }
.todo-page .list { border: 1px solid var(--line); border-radius: 9px; margin-top: 14px; overflow: hidden; }
.todo-page .list > summary { padding: 14px; background: #f1f7f2; cursor: pointer; }
.todo-page .checklist-header { position: relative; list-style: none; padding-left: 34px !important; }
.todo-page .checklist-header::-webkit-details-marker { display: none; }
.todo-page .checklist-header::before { content: '\25b8'; position: absolute; left: 14px; top: 14px; color: var(--green); }
.todo-page .list[open] > .checklist-header::before { content: '\25be'; }
.todo-page .checklist-heading { display: flex; align-items: start; gap: 10px; }
.todo-page .checklist-title { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.todo-page .checklist-header > .count { display: block; margin-top: 5px; }
.todo-page .listbody { padding: 0 14px 14px; }
.todo-page .item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.todo-page .task-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.todo-page .item label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 1rem; font-weight: 400; overflow-wrap: anywhere; }
.todo-page input[type=checkbox] { width: 22px; height: 22px; min-height: 22px; padding: 0; flex: none; accent-color: var(--green); }
.todo-page .item.done label span { text-decoration: line-through; color: var(--muted); }
.todo-page .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.todo-page .task-row > .actions { gap: 4px; flex-wrap: nowrap; }
.todo-page .task-action-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; min-height: 44px; padding: 7px; background: #edf7f2; color: #194d36; border-color: #c1d9c0; }
.todo-page .task-action-icon svg { width: 20px; height: 20px; }
.todo-page button.danger { background: #fbe9e8; color: #783334; border-color: #e7c5c2; }
.todo-page .additem { display: flex; gap: 8px; align-items: center; }
.todo-page .additem input { flex: 1; }
.todo-page .add-controls { display: flex; flex-direction: column; gap: 8px; }
.todo-page .actions.bottom { margin-top: 14px; }
.todo-page .archive { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.todo-page .archive > summary { min-height: 44px; cursor: pointer; }
.todo-page .archiverow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.todo-page .archiverow small { display: block; color: var(--muted); }
.todo-page .checklist-days { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.todo-page .schedule-day { border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; font-size: .75rem; color: var(--muted); }
.todo-page .schedule-day.selected { background: #d8ede2; color: #194d36; font-weight: 700; border-color: #95bcab; }
.todo-page #scheduleOptions { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.todo-page #scheduleOptions label { display: grid; justify-items: center; gap: 8px; }
.todo-page #scheduleOptions span { font-size: .8rem; }
.todo-page #pickupItems .item { display: flex; align-items: center; gap: 12px; }
.todo-page #pickupItems label { flex: 1; }
.todo-page dialog { width: min(480px, calc(100% - 28px)); max-height: 90vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 24px; color: var(--dark); }
.todo-page dialog::backdrop { background: #12332d80; }
.todo-page dialog textarea { width: 100%; min-height: 110px; padding: 10px; border: 1px solid #9bb5aa; border-radius: 7px; font: inherit; }
.todo-page dialog label { margin-top: 14px; }
.todo-page dialog .actions { margin-top: 18px; }
.todo-page .footer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.todo-page #loadError { padding: 16px; background: #fbe9e8; color: #783334; border-radius: 9px; }
.todo-connection, .todo-page #status { position: fixed; right: 16px; bottom: 16px; z-index: 20; max-width: min(420px, calc(100vw - 32px)); max-height: 45vh; overflow: auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 3px 16px #12332d20; }
.todo-page #status { bottom: 70px; }
.todo-connection p { margin: 0; }
.todo-page #todo-recovery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 550px) {
  .todo-page .body { padding: 14px; }
  .todo-page .section > summary { padding: 16px; }
  .todo-page .task-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .todo-page .task-row > .actions { justify-content: flex-end; }
  .todo-page .additem { flex-wrap: wrap; }
  .todo-page .additem input { flex-basis: 100%; }
  .todo-page .add-controls { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .todo-page .archiverow { flex-wrap: wrap; }
}
