:root {
  color-scheme: light;
  font-family: "DM Sans", system-ui, sans-serif;
  color: #362a26;
  background: #fbf5ef;
  --accent: #ac3c26;
  --muted: #746158;
  --border: #e4d8cd;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.shell { width: min(1060px, 100% - 40px); margin-inline: auto; }
header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -.045em; }
.brand img { border-radius: 11px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; min-height: 43px; padding: 10px 16px; border-radius: 9px; font-weight: 700; }
button:hover { filter: brightness(.96); }
button:disabled { opacity: .55; cursor: wait; }
.primary { color: white; background: var(--accent); border: 1px solid var(--accent); }
.primary span { margin-right: 5px; }
.quiet { color: #644b3e; background: transparent; border: 1px solid #cdb8a6; font-size: .875rem; }
:focus-visible { outline: 3px solid #cb6a35; outline-offset: 3px; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 42px 0 37px; }
h1 { font-size: clamp(3.1rem, 8vw, 5.4rem); font-weight: 780; line-height: .96; letter-spacing: -.08em; margin: 0; }
h1 em { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; color: var(--accent); }
.intro p { color: var(--muted); line-height: 1.5; margin: 20px 0 0; }
.intro > button { margin-bottom: 2px; }
.pantry { padding: 25px; border: 1px solid var(--border); border-radius: 20px; background: #fffdfa; }
.pantry-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.035em; }
#count { color: var(--muted); font-size: .875rem; }
.toolbar { display: flex; align-items: center; gap: 16px; justify-content: space-between; margin-bottom: 22px; }
.search { width: min(100%, 330px); }
input, select, textarea { width: 100%; min-width: 0; background: #fff; border: 1px solid #cbb8a7; border-radius: 8px; min-height: 44px; color: inherit; padding: 10px 11px; }
input::placeholder, textarea::placeholder { color: #856e60; }
select { appearance: none; padding-right: 35px; background-image: linear-gradient(45deg,transparent 50%,#795a46 50%),linear-gradient(135deg,#795a46 50%,transparent 50%); background-position: calc(100% - 20px) 20px,calc(100% - 15px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }
.filters { display: flex; gap: 4px; padding: 4px; background: #f3eae1; border-radius: 10px; }
.filters button { padding: 7px 12px; min-height: 35px; border: 0; color: #6b5244; background: transparent; font-size: .875rem; }
.filters button[aria-pressed="true"] { background: #fffdfa; color: #96351f; box-shadow: 0 1px 4px #5f31151c; }
.cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,270px),1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; }
.card.past { border-color: #d9a58f; }
.card-top { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.card-top h3 { margin: 0; font-size: 1.15rem; letter-spacing: -.035em; overflow-wrap: anywhere; }
.storage { display: inline-block; color: #746158; font-size: .875rem; margin: 6px 0 0; }
.edit { min-height: 33px; padding: 5px 9px; border: 0; color: #795843; background: #f7f0e8; font-size: .875rem; }
.target { align-self: flex-start; font-size: .875rem; font-weight: 700; margin: 18px 0 8px; border-radius: 7px; padding: 6px 9px; background: #edf3e7; color: #3f5a30; }
.target.soon { color: #874516; background: #fff0cf; }
.target.past { color: #96351f; background: #fce7dd; }
.target.none { background: #f3eee8; color: #6c5e53; }
.opened { margin: 0; font-size: .875rem; color: var(--muted); line-height: 1.5; }
.note { color: #6a574c; font-size: .9rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0; }
.used { width: 100%; margin-top: auto; padding-top: 9px; }
.used button { width: 100%; background: #f3f0e7; color: #5b493c; border: 1px solid #ded4c5; }
.empty { padding: 34px 12px 30px; text-align: center; border: 1px dashed #d9c8b8; border-radius: 13px; background: #fcf8f2; }
.empty-graphic { display: flex; justify-content: center; align-items: flex-end; gap: 3px; height: 66px; font-size: 2.6rem; }
.empty-graphic span:first-child { transform: rotate(-17deg); }
.empty-graphic span:nth-child(2) { transform: translateY(-10px); }
.empty-graphic span:last-child { transform: rotate(14deg); }
.empty h3 { margin: 18px 0 9px; font-size: 1.2rem; letter-spacing: -.035em; }
.empty p { max-width: 380px; margin: 0 auto 20px; line-height: 1.5; color: var(--muted); }
#status { margin: 0 0 14px; font-size: .9rem; color: #426042; }
#status:empty { display: none; }
#status button { margin-left: 8px; min-height: 32px; padding: 4px 10px; }
#status.error, .form-error { color: #a52a22; }
.no-results { padding: 24px 5px; color: var(--muted); line-height: 1.5; }
.guidance { font-size: .875rem; color: #78655a; line-height: 1.5; margin: 16px 4px 0; max-width: 720px; }
footer { color: #78655a; font-size: .875rem; padding: 26px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px 20px; line-height: 1.5; }
dialog { width: min(100% - 32px,500px); padding: 25px; color: inherit; border: 1px solid var(--border); border-radius: 16px; background: #fffdfa; max-height: 90vh; overflow-y: auto; }
dialog::backdrop { background: #39251d80; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 21px; }
.icon-button { color: #795843; background: #f7f0e8; border: 0; padding: 2px 11px; min-height: 35px; font-size: 1.5rem; }
#food-form label { display: block; margin: 15px 0 7px; font-size: .9rem; font-weight: 700; }
label span { font-weight: 400; color: #78655a; }
.date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
textarea { resize: vertical; }
.form-error:empty { display: none; }
.form-error { font-size: .9rem; line-height: 1.5; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.danger { color: #9d3322; background: transparent; border: 1px solid #daa48b; }
#delete { margin-right: auto; }
.danger.filled { color: white; background: #9d3322; }
#install-help p, #delete-name { line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media(max-width:650px) { .toolbar { flex-direction: column; align-items: stretch; gap: 10px; } .search { width: 100%; } .filters { justify-content: space-between; } .intro { padding-top: 30px; } .pantry { padding: 18px; } }
@media(max-width:420px) { .shell { width: calc(100% - 28px); } .intro { flex-direction: column; align-items: flex-start; } .intro > button { width: 100%; } .date-fields { grid-template-columns: 1fr; gap: 0; } }
