:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;color:#192c25;background:#f5f7f3;--green:#214b3e;--line:#dce5da;--muted:#50655b;color-scheme:light}
*{box-sizing:border-box}
body{margin:0;padding-bottom:calc(80px + env(safe-area-inset-bottom))}
button,input,select,textarea{font:inherit}
button{cursor:pointer;color:inherit}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #a06129;outline-offset:2px}
[hidden]{display:none!important}
.top{background:var(--green);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:calc(12px + env(safe-area-inset-top)) max(20px,calc((100vw - 640px)/2)) 12px;gap:12px}
.brand{font-weight:700;font-size:1.25rem}
.brand small{font-size:.8125rem;font-weight:500;color:#d3e7d9;margin-left:5px}
.add{border:0;border-radius:50%;width:44px;height:44px;background:#e4f1d8;color:var(--green);font-size:1.65rem;line-height:1}
main{max-width:680px;padding:24px 20px;margin:auto}
h1{margin:0 0 7px;font-size:1.95rem;letter-spacing:-.04em}
h2{font-size:1.125rem;margin:0}
.subtitle{color:var(--muted);margin:0 0 22px}
.cards{display:grid;gap:10px;margin-top:12px}
.card{background:white;border:1px solid var(--line);border-radius:15px;overflow-wrap:anywhere;padding:14px;display:flex;gap:10px;align-items:flex-start}
.card-content{flex:1;min-width:0}
.card h2{margin:4px 0}
.card p{margin:6px 0;white-space:pre-wrap}
.meta{font-size:.875rem;color:var(--muted)}
.card a{color:var(--green)}
.card .edit,.card .complete{min-height:44px;padding:7px 10px;background:#eef4eb;border:0;border-radius:10px;flex:none}
.done h2{text-decoration:line-through}
.empty{padding:20px;border:1px dashed #b3c7b6;border-radius:14px;color:var(--muted)}
nav{position:fixed;inset:auto 0 0;background:#fff;border-top:1px solid var(--line);display:flex;justify-content:center;padding:5px 12px calc(5px + env(safe-area-inset-bottom));z-index:2}
nav button{flex:1;max-width:218px;display:grid;gap:2px;place-items:center;border:0;background:transparent;border-radius:10px;min-height:54px;font-size:.875rem}
nav button span{font-size:1.35rem;line-height:1.1}
nav button[aria-current=page]{background:#e8f1e3;color:var(--green);font-weight:700}
.month{background:#fff;border:1px solid var(--line);border-radius:16px;padding:10px;margin-bottom:20px}
.month header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.month header button{min-height:44px;min-width:44px;border:0;border-radius:9px;background:#eef4eb}
.grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center}
.weekday{font-size:.875rem;color:var(--muted);padding:6px 0}
.day{min-height:44px;border:0;background:transparent;border-radius:9px;position:relative}
.day.has::after{content:"";position:absolute;bottom:4px;left:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:currentColor}
.day[aria-pressed=true]{background:var(--green);color:white;font-weight:700}
.day[aria-current=date]:not([aria-pressed=true]){font-weight:700;text-decoration:underline}
dialog{width:min(calc(100% - 20px),500px);max-height:calc(100dvh - 24px);background:#fff;color:inherit;border:1px solid var(--line);border-radius:18px;padding:0;overscroll-behavior:contain}
dialog::backdrop{background:#152c24a0}
form{display:grid;gap:12px;padding:16px}
.sheet-head,.form-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sheet-head button,.form-actions button{min-height:44px;border:0;border-radius:10px;padding:0 14px;background:#eef4eb}
.sheet-head button{font-size:1.45rem}
form label{display:grid;gap:4px;font-size:.9375rem}
input,select,textarea{width:100%;min-height:44px;border:1px solid #b9c9bc;border-radius:8px;padding:8px;background:white;color:inherit}
textarea{resize:vertical}
.form-actions .save{margin-left:auto;background:var(--green);color:white}
.form-actions .danger,#error{color:#992725}
