:root{font:16px system-ui,sans-serif;color:#17312c;background:#eff4ef;color-scheme:light}
*{box-sizing:border-box}
body{margin:0}
.wrap{width:min(100% - 2rem,42rem);margin-inline:auto}
header{background:#103936;color:#f4fff6;padding:calc(1.25rem + env(safe-area-inset-top)) 0 1rem}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:.65rem}
.toolbar h1,.toolbar h2{margin:0}
.toolbar h1{font-size:1.85rem}
.add{font-size:1.5rem;padding:0;width:44px;background:#e3efe8;color:#164b3c}
main{padding:1rem 0 calc(1.5rem + env(safe-area-inset-bottom))}
.panel,.empty{background:#fff;border:1px solid #d8e5dc;border-radius:1rem;padding:1rem}
h1,h2{font-size:1.15rem;margin:0 0 .8rem}
h3{margin:0;font-size:1.1rem}
form,label{display:grid;gap:.55rem}
form{gap:.85rem}
label{min-width:0;font-size:.9rem;font-weight:650}
label small,#count{color:#526b62;font-weight:500}
.pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}
input,textarea,button{font:inherit;font-size:1rem;min-width:0}
input,textarea{width:100%;min-height:44px;border:1px solid #aabfb3;border-radius:.55rem;padding:.55rem;background:#f8fbf9;color:inherit}
input[type=date]{appearance:none}
input[type=file]{font-size:.85rem}
button{min-height:44px;border:0;border-radius:.65rem;padding:.5rem .8rem;background:#17654f;color:white;font-weight:700;cursor:pointer}
button:disabled{opacity:.55;cursor:default}
.secondary{background:#e3efe8;color:#164b3c}
:focus-visible{outline:3px solid #297a64;outline-offset:3px}
.meta,.empty,details p{color:#476358}
.empty{text-align:center;padding:2rem 1rem}
.catch-row{width:100%;display:flex;align-items:center;gap:.8rem;text-align:left;margin-bottom:.4rem;background:white;color:inherit;border:1px solid #d8e5dc;border-radius:.85rem;padding:.55rem .75rem}
.catch-row:active{background:#e3efe8}
.row-copy{flex:1;min-width:0;display:grid;gap:.2rem;overflow-wrap:anywhere}
.row-copy .meta{font-size:.85rem;font-weight:500}
.thumb{width:64px;height:64px;flex:none;object-fit:cover;border-radius:.55rem;background:#e3efe8}
.placeholder{display:grid;place-items:center}
.chevron{font-size:1.6rem;color:#526b62}
dialog{padding:0;width:min(100% - 1rem,42rem);max-width:none;max-height:calc(100dvh - 1rem);border:1px solid #d8e5dc;border-radius:1rem;background:#eff4ef;color:inherit;overflow:hidden}
dialog[open],dialog form{display:flex;flex-direction:column;min-height:0;gap:0}
dialog form{max-height:inherit}
dialog::backdrop{background:#0c26248c}
.dialog-bar{padding:.5rem .65rem;border-bottom:1px solid #d8e5dc;background:#fff;flex:none}
.dialog-bar h2{font-size:1rem;text-align:center;overflow-wrap:anywhere}
.dialog-bar button{font-size:.875rem;flex:none}
#detail .dialog-bar{justify-content:flex-start}
.plain{background:transparent;color:#17654f}
.dialog-body{padding:1rem;min-height:0;overflow:auto;overscroll-behavior:contain}
fieldset,.detail-group{min-width:0;margin:0 0 1rem;padding:.85rem;border:1px solid #d8e5dc;border-radius:.75rem;background:#fff}
fieldset label+label,fieldset label+.pair{margin-top:.75rem}
legend{font-size:.85rem;font-weight:700;color:#476358}
.hero-photo{display:block;max-width:100%;width:100%;height:min(240px,40vh);object-fit:contain;margin:0 auto 1rem;border-radius:.75rem}
.detail-group dl,.detail-group p{margin:.6rem 0 0}
.detail-group p,.detail-group dd{white-space:pre-wrap;overflow-wrap:anywhere}
.detail-group dl div{display:grid;grid-template-columns:1fr 1.25fr;gap:.5rem;padding:.5rem 0;border-top:1px solid #d8e5dc}
.detail-group dt{color:#476358}
.detail-group dd{margin:0;text-align:right}
#form-error{color:#982b22;font-weight:650}
.actions{display:flex;gap:.5rem;flex-wrap:wrap}
details{margin-top:1rem}
summary{font-weight:700;cursor:pointer}
#status{position:fixed;z-index:2;bottom:calc(1rem + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);margin:0;padding:.75rem 1rem;width:max-content;max-width:calc(100% - 2rem);border-radius:.65rem;color:#fff;background:#103936;pointer-events:none}
@media(max-width:340px){.pair{grid-template-columns:1fr}}
