.food-search{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.food-search label{flex:1;min-width:180px}.food-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.food-result,.food-log-entry,#selectedFood{border:1px solid #dce3dd;border-radius:12px;padding:16px;margin:12px 0;background:#fffdf8;overflow-wrap:anywhere}.food-result button{margin-top:10px}.food-muted{font-size:13px;color:#53665f;margin:6px 0;line-height:1.6}.food-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}.food-grid label{min-width:0}.food-grid input,.food-grid select{width:100%}#foodPreview,#foodTotals{background:#e9efe9;border-radius:12px;padding:14px;line-height:1.7}#foodStatus{min-height:24px}#foodTotals p{margin:6px 0}.food-attribution{font-size:12px;line-height:1.6;margin-top:24px}#foodResults{border-top:1px solid #dce3dd;margin-top:16px}#manualFields{border:0;padding:0;margin:0;min-width:0}@media(max-width:540px){.food-grid{grid-template-columns:1fr}.food-search button{width:100%}.food-result,.food-log-entry,#selectedFood{padding:12px}}

.weight-week{border:0;padding:0;margin:22px 0 12px;min-width:0}.weight-week legend{font-size:14px;margin-bottom:10px}#weightDays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}#weightDays label{display:block;text-align:center;cursor:pointer}#weightDays input{position:absolute;opacity:0;width:1px;height:1px}#weightDays span{display:block;border:1px solid #c4d1c9;border-radius:9px;padding:12px 2px;background:#f5f4ef}#weightDays input:checked+span{background:#d4e6d5;border:2px solid #315c4b;font-weight:700;padding:11px 1px}#weightDays input:focus-visible+span{outline:3px solid #bb802c;outline-offset:2px}
/* Featured weekly average */
.weight-highlight{position:relative;isolation:isolate;overflow:hidden;text-align:center;margin:18px 0 24px;padding:28px 20px 24px;border:1px solid #ddcba2;border-radius:24px;background:linear-gradient(135deg,#fff3cc 0%,#f7e7de 52%,#eae4f4 100%);box-shadow:0 10px 28px #6d554914,inset 0 1px 0 #ffffffb3;color:#4c4938}
.weight-highlight::before,.weight-highlight::after{content:'';position:absolute;z-index:-1;border:1px solid #ffffff9c;border-radius:50%;width:180px;height:180px;pointer-events:none}.weight-highlight::before{top:-95px;right:-45px}.weight-highlight::after{bottom:-125px;left:-45px;width:240px;height:240px}
.weight-sparkle{font-size:30px;color:#977337;line-height:1;margin-bottom:14px}.weight-eyebrow{font-size:13px;font-weight:700;letter-spacing:1.6px;text-transform:uppercase;color:#6a5b49}.weight-big-number{display:block;font-size:clamp(48px,12vw,76px);font-weight:750;letter-spacing:-3px;line-height:1.2;margin:10px 0;color:#55436b;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.weight-big-number span{font-size:22px;font-weight:500;letter-spacing:0;color:#756480}.ap-body .weight-range{font-size:14px;color:#65574f;margin:8px 0 16px}.weight-count{display:inline-block;border:1px solid #ffffffd9;border-radius:999px;background:#fffdf7b8;padding:7px 14px;font-size:12px;font-weight:650;color:#5c6251}.ap-body .weight-note{font-size:12px;color:#706156;margin:16px 0 0}.weight-previous{padding:12px 0;margin:0;border-bottom:1px solid #e7e6df;font-variant-numeric:tabular-nums}.weight-waiting{padding:32px 20px;font-size:20px;font-weight:650}.weight-waiting p{font-weight:400}@media(max-width:540px){.weight-highlight{padding:24px 14px;border-radius:18px}.weight-eyebrow{letter-spacing:1px}}

/* Favorite controls share the existing food cards and stay at the trailing edge. */
.food-log-entry{display:flex;align-items:flex-start;gap:12px}.food-log-content{flex:1;min-width:0}.food-heart{flex:0 0 44px;width:44px;min-height:44px;padding:10px;color:#80566b;background:#fffdf8}.food-heart svg{display:block;width:22px;height:22px}.food-heart[aria-pressed=true]{background:#f7e5ed}.food-heart:focus-visible,.common-food:focus-visible{outline:3px solid #bb802c;outline-offset:3px}
.common-food{display:block;width:100%;text-align:left;border:1px solid #dce3dd;border-radius:12px;padding:16px;margin:12px 0;background:#fffdf8;color:inherit;overflow-wrap:anywhere}.common-food>span{display:block;margin-top:6px}.common-food:hover{background:#edf4ee}.food-backup{margin-top:20px}.food-backup summary{cursor:pointer}.food-backup input{max-width:100%}@media(max-width:540px){.food-log-entry{gap:8px}.common-food{padding:12px}}

.recipe-builder,.recipe-card{border:1px solid #dce3dd;border-radius:12px;padding:16px;margin:12px 0;background:#fffdf8;overflow-wrap:anywhere}.recipe-ingredient{border-bottom:1px solid #dce3dd;padding:12px 0}.recipe-ingredient input,.recipe-card input{width:100%;max-width:140px}.recipe-card h4{margin:0 0 10px}.recipe-builder select{max-width:100%}.recipe-builder .food-actions>label{min-width:0;max-width:100%}.food-error{display:block;color:#963d36;font-size:13px}.recipe-breakdown{margin:12px 0}.recipe-breakdown summary{cursor:pointer}.recipe-builder :focus-visible,.recipe-card :focus-visible{outline:3px solid #bb802c;outline-offset:3px}#recipeNutrition{background:#e9efe9;border-radius:12px;padding:12px}@media(max-width:540px){.recipe-builder,.recipe-card{padding:12px}}

/* One daily workflow; browsing and management live in the native modal. */
.food-primary{display:block;width:100%;margin:18px 0;background:#dceadd;font-weight:700;font-size:18px;min-height:48px}.food-target{margin:8px 0;color:#53665f;font-size:13px}.food-target summary{cursor:pointer}#foodAddStatus{min-height:24px}#addFoodDialog{box-sizing:border-box;width:min(700px,calc(100% - 32px));max-height:88dvh;overflow:auto;border:1px solid #c4d1c9;border-radius:18px;padding:22px;background:#fffdf8;color:#334a40}#addFoodDialog::backdrop{background:#243e3659}.food-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.food-dialog-header h2{margin:0}#addFoodDialog button{min-height:44px}#addFoodDialog :focus-visible,#foodContent :focus-visible{outline:3px solid #bb802c;outline-offset:3px}#addFoodDialog section{margin-top:18px}#addFoodDialog h3{font-size:16px;margin:12px 0 6px}#addFoodDialog .common-food{margin:0;padding:12px 4px;border:0;border-bottom:1px solid #dce3dd;border-radius:0;background:transparent}#addFoodDialog .common-food:hover{background:#edf4ee}#addFoodDialog .recipe-card{padding:12px 4px;margin:0;border:0;border-bottom:1px solid #dce3dd;border-radius:0}#addFoodDialog .food-muted{font-size:12px}#foodTotals{display:flex;flex-wrap:wrap;gap:6px 20px}#foodTotals h3{width:100%;margin:0}#foodTotals p{margin:0}#foodTotals p:first-of-type{font-size:20px;font-weight:650;width:100%}[hidden]{display:none!important}
@media(max-width:540px){#addFoodDialog{width:100%;max-height:92dvh;margin:auto 0 0;border-radius:18px 18px 0 0;padding:16px}#addFoodDialog .food-search label{min-width:0;width:100%}.food-dialog-header{position:sticky;top:-16px;background:#fffdf8;padding:10px 0;z-index:1}}

#foodStatus:empty,#commonFoodStatus:empty,#recipeStatus:empty{display:none}#recentFoods{max-height:240px;overflow:auto}#addFoodDialog .food-dialog-header button{flex-shrink:0}

/* Compact daily entries expand to show the full saved nutrition and controls. */
.food-log-entry{padding:10px 12px;margin:6px 0;align-items:flex-start}
.food-entry-summary{cursor:pointer;min-height:44px;list-style:none;display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:center;gap:3px 12px}
.food-entry-summary::-webkit-details-marker{display:none}
.food-entry-name{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.food-entry-metrics{font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap}
.food-entry-summary::after{content:'Details ▾';font-size:11px;color:#53665f}
.food-log-content[open]>.food-entry-summary::after{content:'Details ▴'}
.food-entry-full-name{margin:10px 0 6px;font-weight:600}
.food-log-content>.food-actions{margin-bottom:0}
@media(max-width:540px){.food-entry-summary{grid-template-columns:minmax(0,1fr)}.food-entry-summary::after{display:none}.food-entry-metrics{font-size:13px}.food-log-entry{padding:8px 10px}}

/* Shared Boiling Frog layout and controls. */
.food-page main { max-width: 1000px; }
.food-page .accordion { border: 1px solid var(--line); border-radius: 12px; margin: 16px 0 20px; background: #fff; overflow: hidden; }
.food-page .accordion > summary { background: #e8f4e8; min-height: 56px; padding: 18px 20px; font-size: 1.35rem; font-weight: 700; color: #12452d; cursor: pointer; }
.food-page #weightSection > summary { background: #e8f4e8; }
.food-page .ap-body { padding: 18px; }
.food-page .ap-body > p { margin: 10px 0; }
.food-date-row { margin: 4px 0 18px; }
.food-date-row input { width: auto; }
.food-page .food-primary { background: #e8f4e8; border-color: #c1d9c0; color: #194d36; border-radius: 9px; }
.food-page .food-primary:hover { background: #d8ede2; }
.food-page .food-result, .food-page .food-log-entry, .food-page #selectedFood, .food-page .recipe-builder, .food-page .recipe-card { background: #f5faf6; border-color: var(--line); }
.food-page #foodTotals, .food-page #foodPreview, .food-page #recipeNutrition { background: #edf7f2; }
.food-page #addFoodDialog { background: #fff; color: var(--dark); border-color: var(--line); border-radius: 12px; }
.food-page #addFoodDialog::backdrop { background: #12332d80; }
.food-page textarea { width: 100%; min-height: 110px; border: 1px solid #9bb5aa; border-radius: 7px; padding: 10px; font: inherit; }
.food-page button.food-heart, .food-page button.common-food { color: var(--dark); }
.food-page button.food-heart[aria-pressed=true] { background: #fbe9e8; }
.food-page .food-dialog-header { background: #fff; }
.food-page #weightDays input:checked + span { background: #d8ede2; border-color: #95bcab; }
.food-connection { position: fixed; right: 16px; bottom: 16px; z-index: 20; max-width: min(420px, calc(100vw - 32px)); max-height: 45vh; overflow: auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 3px 16px #12332d20; }
.food-connection p { margin: 0; }
#food-recovery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 550px) { .food-page .ap-body { padding: 14px; } .food-page .accordion > summary { padding: 16px; } .food-page #addFoodDialog { border-radius: 12px 12px 0 0; } }

#barcodeVideo{display:block;width:100%;max-height:300px;object-fit:contain;background:#153c32;border-radius:9px;margin:12px 0}#barcodePanel{padding:12px;border:1px solid #bad3c9;border-radius:12px;margin:12px 0}.food-database-status{margin:12px 0}.food-database-status summary{cursor:pointer;padding:8px 0}
