* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, "Hiragino Sans", sans-serif; margin: 0 auto; max-width: 1000px; padding: 24px 16px; background: #f7f8fa; color: #2b2f36; line-height: 1.6; }
h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 4px; }
.lead { margin: 0 0 20px; font-size: .9rem; color: #666; }
h2 { font-size: 1.05rem; margin: 0 0 12px; padding-left: 10px; border-left: 4px solid #9ca3af; }
.card.memo h2 { border-left-color: #3b82f6; }
.card.task h2 { border-left-color: #22c55e; }

.dashboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 700px) { .dashboard { grid-template-columns: repeat(2, 1fr); } }
.stat { background: #fff; border: 1px solid #9ca3af; border-radius: 12px; padding: 14px; text-align: center; font-size: .85rem; color: #6b7280; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.stat span { display: block; font-size: 2rem; font-weight: 700; color: #2b2f36; line-height: 1.2; }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .columns { grid-template-columns: 1fr; } }
.columns > div { min-width: 0; }
.card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.card.memo { border: 1px solid #3b82f6; }
.card.task { border: 1px solid #22c55e; }

input, textarea { width: 100%; padding: 9px 12px; margin-bottom: 10px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; background: #fff; }
input:focus, textarea:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.2); }

button { padding: 7px 16px; border: 0; border-radius: 8px; background: #2563eb; color: #fff; cursor: pointer; font: inherit; font-size: .9rem; transition: background .15s; }
button:hover { background: #1d4ed8; }
button.secondary { background: #6b7280; }
button.secondary:hover { background: #4b5563; }
button.danger { background: #dc2626; }
button.danger:hover { background: #b91c1c; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { border-top: 1px solid #f0f1f3; padding: 14px 0; overflow-wrap: anywhere; }
.list li:first-child { border-top: 0; padding-top: 0; }
.list .meta { font-size: .8rem; color: #8a8f98; }
.list .body { white-space: pre-wrap; margin: 4px 0; }
.list .actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.done .text { text-decoration: line-through; color: #8a8f98; }
.badge { font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: #fde68a; margin-right: 4px; }
.done .badge { background: #bbf7d0; }
.empty { color: #8a8f98; }
.stat.s-memo { border: 2px solid #3b82f6; }
.stat.s-memo span { color: #2563eb; }
.stat.s-task { border: 2px solid #22c55e; }
.stat.s-task span { color: #16a34a; }
.stat.s-open { border: 2px solid #f59e0b; }
.stat.s-open span { color: #d97706; }
.stat.s-done { border: 2px solid #9ca3af; }
.stat.s-done span { color: #6b7280; }
.progress { font-size: .8rem; color: #16a34a; margin-left: 6px; }
.subtasks { list-style: none; margin: 10px 0 0 12px; padding: 0 0 0 12px; border-left: 2px solid #22c55e; }
.subtasks li { padding: 8px 0; border-top: 0; }
.subtasks .text { font-size: .95rem; }
button.small { padding: 4px 10px; font-size: .8rem; }
.sub-inputs { margin: 0 0 10px 12px; padding-left: 12px; border-left: 2px solid #22c55e; }
.sub-input-row { display: flex; gap: 6px; margin-bottom: 6px; }
.sub-input-row input { margin: 0; padding: 6px 10px; font-size: .9rem; }
