
* {box-sizing:border-box}
:root {color-scheme:light; --green:#18483b; --deep:#162e25; --muted:#50675b; --line:#d6e2d9; --soft:#eaf3e9; font:16px/1.5 system-ui,sans-serif}
body {margin:0; background:#f4f7f2; color:var(--deep)}
[hidden] {display:none!important}
.wrap {width:min(100% - 2rem, 46rem); margin-inline:auto}
.top {background:var(--green); color:white}
.top-inner {display:flex; justify-content:space-between; align-items:center; gap:.5rem; min-height:4rem}
.brand {display:flex; align-items:center; gap:.55rem; text-decoration:none; color:inherit; font-weight:700}
.brand img {width:2rem; height:2rem; border-radius:.5rem; background:#edf8e9}
.hero {display:flex; justify-content:space-between; align-items:flex-end; flex-wrap:wrap; gap:1rem; padding:2rem 0 1.25rem}
.hero p {margin:0; color:var(--muted)}
h1,h2,h3 {margin:0; line-height:1.15}
h1 {font-family:Georgia,serif; font-size:clamp(2rem,8vw,3.4rem); font-weight:600; letter-spacing:-.035em}
h2 {font-size:1.25rem}
h3 {margin:1rem 0 .25rem; font-size:1rem}
.family-title {font-weight:700; margin-bottom:.2rem!important}
button,input {font:inherit}
button {min-height:2.75rem; border:1px solid var(--line); background:#fff; color:var(--deep); border-radius:.65rem; padding:.5rem .8rem; font-weight:650; cursor:pointer}
button:disabled {opacity:.62; cursor:wait}
button:hover:not(:disabled) {border-color:#578271}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible {outline:3px solid #3c8564; outline-offset:2px}
.primary {background:var(--green); color:white; border-color:var(--green)}
.header-button {font-size:.9rem}
.top .header-button {background:transparent; color:#fff; border-color:#9ab6a9}
.card,dialog {border:1px solid var(--line); background:#fff; border-radius:1rem; box-shadow:0 12px 26px #173b2210}
.setup,.panel {padding:clamp(1rem,4vw,1.5rem)}
.setup {max-width:34rem}
.setup form,dialog form {display:grid; gap:.65rem}
.setup details {border-top:1px solid var(--line); margin-top:1rem; padding-top:1rem}
summary {font-weight:650; cursor:pointer}
details form {margin-top:.8rem}
label {display:block; font-weight:650; font-size:.9rem}
input {min-width:0; width:100%; min-height:2.75rem; border:1px solid #b6cbbd; border-radius:.65rem; padding:.55rem .65rem; color:var(--deep); background:white}
.tabs {display:grid; grid-template-columns:1fr 1fr; gap:.4rem; padding:.35rem; border-radius:.85rem; background:#e0eae1; margin-bottom:1rem}
.tabs button {border-color:transparent; background:transparent}
.tabs [aria-pressed=true] {background:white; box-shadow:0 2px 4px #173b2218}
.panel-heading,.inline-form,.foot,.actions,.month-bar {display:flex; align-items:center; justify-content:space-between; gap:.55rem}
.inline-form {margin:1rem 0}
.inline-form button,.panel-heading button {flex-shrink:0}
.count,.foot,.empty {color:var(--muted); font-size:.9rem}
.empty {padding:.75rem 0; margin:0}
.entries {list-style:none; padding:0; margin:0}
.entries li {display:flex; align-items:center; gap:.5rem; border-top:1px solid var(--line); min-height:3.4rem; overflow-wrap:anywhere}
.entries li > :first-child {flex:1; min-width:0}
.entries label {display:flex; align-items:center; gap:.65rem; padding:.6rem .15rem; min-height:2.75rem; font-size:1rem; cursor:pointer}
.entries input {width:1.3rem; min-height:1.3rem; height:1.3rem; margin:0; flex:none; accent-color:var(--green)}
.entries input:checked + span {text-decoration:line-through; color:var(--muted)}
.entry-controls {display:flex; gap:.25rem; flex:none}
.text-button {border:0; background:transparent; color:var(--green); text-decoration:underline; text-underline-offset:.15em; padding-inline:.4rem}
.month-bar {margin:1rem 0 .6rem; gap:.3rem}
.month-bar strong {flex:1; text-align:center}
.month-bar button:first-child,.month-bar button:last-child {font-size:1.3rem; padding:0; width:2.75rem}
.week,.days {display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.2rem; text-align:center}
.week {font-weight:700; color:var(--muted); margin-bottom:.35rem}
.days button {background:var(--soft); border-color:transparent; padding:0; position:relative}
.days button[aria-current=date] {border-color:var(--green)}
.days button[aria-pressed=true] {background:var(--green); color:white}
.days button.has-events::after {content:""; position:absolute; width:.3rem; height:.3rem; border-radius:100%; background:currentColor; bottom:.28rem; left:calc(50% - .15rem)}
.event-text {padding:.45rem .15rem}
.event-text small {display:block; color:var(--muted); font-size:.9rem}
.foot {padding:.5rem 0 1rem; flex-wrap:wrap}
dialog {width:min(100% - 2rem, 31rem); padding:1.25rem; color:var(--deep)}
dialog::backdrop {background:#132d23a6}
dialog h2 {margin-bottom:.55rem}
.fields {display:grid; grid-template-columns:1fr 1fr; gap:.65rem}
.fields > div {min-width:0}
.actions {justify-content:flex-end; margin-top:.65rem}
#feedback,#event-error {color:#8c2825; background:#fdf0ed; border-radius:.6rem; padding:.65rem}
.sr-only {position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0}
