:root {
  --bg: #e8f5e9;
  --border: #a5d6a7;
  --accent: #66bb6a;
  --ink: #1b5e20;
  --surface: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.5;
}

#app { max-width: 560px; margin: 0 auto; padding: 24px 16px 96px; }

h1 { font-size: 1.5rem; margin: 0 0 16px; }

button, input { font: inherit; color: inherit; }

button {
  cursor: pointer;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--surface);
}
button.primary { background: var(--ink); color: #fff; }
button.subtle { border-color: var(--border); background: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.title-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.title-row h1 { margin: 0; overflow-wrap: anywhere; }
.title-row button { white-space: nowrap; }
.created { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.created p { margin: 0; font-weight: 600; }

.add-form { display: flex; gap: 8px; margin-bottom: 16px; }
.add-form input { flex: 1; min-width: 0; border: 2px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--surface); }

h2 { font-size: 0.9rem; margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--border); }

ul { list-style: none; margin: 0; padding: 0; }

li.item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--bg); }
li.item label { flex: 1; display: flex; align-items: center; gap: 12px; cursor: pointer; overflow-wrap: anywhere; }
li.item input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); }
li.item.checked .name { text-decoration: line-through; opacity: 0.6; }
li.item .remove { border-color: transparent; background: transparent; padding: 4px 10px; }

.empty { opacity: 0.7; padding: 8px 4px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }

#toast-region { position: fixed; right: 16px; bottom: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  max-width: 100%;
  background: var(--ink); color: #fff;
  border-radius: 10px; padding: 10px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.toast button { background: var(--accent); color: var(--ink); border-color: var(--accent); font-weight: 600; white-space: nowrap; }
