#meal-categories{border:0;padding:0;margin:16px 0}
#meal-categories legend{margin-bottom:8px}
.meal-segments{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.meal-segments label{position:relative;margin:0;cursor:pointer}
.meal-segments input{position:absolute;opacity:0;width:1px;height:1px}
.meal-segments span{display:flex;align-items:center;justify-content:center;min-height:44px;border:1px solid var(--rule);border-radius:var(--radius-control);background:var(--surface);font-size:14px}
.meal-segments input:checked+span{background:var(--accent);color:var(--surface)}
.meal-segments input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.meal-segments input:disabled+span{opacity:.65}
.meal-fee{display:flex;align-items:center;gap:8px;min-height:44px}
.meal-fee[hidden]{display:none}
.meal-fee input{flex:none;width:22px;height:22px;margin:0;accent-color:var(--accent)}
.meal-portions{display:flex;flex-direction:column;align-items:center;gap:4px}
.meal-portions .hint{margin:0}
.meal-category-line{margin:8px 0}
.meal-category-line summary{min-height:44px;display:flex;align-items:center;gap:8px}
.meal-category-line summary>span:first-child{flex:1}
.meal-category-line summary::after{width:16px;text-align:center}
#breakfast-items>.row-title{display:flex;justify-content:space-between;gap:8px;min-height:44px;align-items:center;margin:8px 24px 8px 0}
.meal-category-line summary::before{content:none}
.meal-category-line summary::after{content:'\203A'}
.meal-category-line[open] summary::after{transform:rotate(90deg)}
.meal-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;padding:8px 0;font-variant-numeric:tabular-nums}
.meal-photo-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0}
.meal-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:12px;margin:12px 0}
.meal-photo-tile{min-width:0;margin:0;padding:8px;border:1px solid var(--rule);border-radius:var(--radius-control)}
.meal-photo-tile img{display:block;width:100%;height:140px;object-fit:cover}
.meal-photo-tile figcaption{margin:8px 0;overflow-wrap:anywhere;font-size:14px}
.meal-photo-open{display:block;width:100%;padding:0;cursor:pointer}
.meal-photo-controls select{max-width:100%}
#photo-progress{width:100%}
#photo-dialog{max-width:min(96vw,1200px);max-height:96vh;padding:16px}
#photo-dialog img{display:block;max-width:100%;max-height:75vh;object-fit:contain;margin:auto}
#photo-dialog::backdrop{background:rgb(0 0 0 / .65)}
