#modal.food-log-sheet{width:min(620px,calc(100% - 32px));max-width:620px;max-height:calc(100dvh - 40px);padding:28px 32px 30px;border-radius:28px;background:#FFF5E6;color:#20201E;scrollbar-width:thin;overscroll-behavior:contain}
.food-log-sheet .modal-top{margin-bottom:25px}.food-log-sheet .member-log-label{display:none}.food-kicker{font-size:11px;letter-spacing:.12em;text-transform:uppercase;font-weight:700;display:block}.food-log-heading h2,.food-diary-heading h2,.food-review-hero h2{font-size:46px;line-height:.99;letter-spacing:-2px;margin:14px 0;font-weight:850}.food-log-heading p,.food-diary-heading p{font-size:14px;line-height:1.5;margin:0 0 24px}.food-meal-switch{display:flex;padding:5px;border:1px solid #20201E26;border-radius:50px;margin:0 0 26px;gap:3px}.food-meal-switch button{min-width:0;flex:1;padding:10px 2px;background:transparent;color:#20201E;border:0;border-radius:30px;font-size:12px;font-weight:650;min-height:40px}.food-meal-switch button[aria-pressed=true]{background:#20201E;color:#FFF5E6}.food-search-label{display:block;font-size:12px;font-weight:700;margin-bottom:9px}.food-search-box{display:flex;align-items:center;border:1.5px solid #20201E;border-radius:15px;padding:0 15px;height:56px;gap:10px}.food-search-box svg{width:20px;height:20px;flex-shrink:0}.food-search-box input{background:transparent;border:0!important;outline:none;font-size:16px!important;min-width:0;width:100%;padding:0!important;color:#20201E}.food-entry-methods{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 28px}.food-entry-methods button{display:flex;align-items:center;text-align:left;gap:10px;border:1px solid #20201E26;border-radius:15px;background:transparent;padding:14px 12px;color:#20201E;min-width:0}.food-entry-methods button>svg{width:20px;height:20px;flex-shrink:0}.food-entry-methods button>svg:last-child{width:14px;margin-left:auto}.food-entry-methods b{display:block;font-size:13px}.food-entry-methods small{display:block;font-size:10px;margin-top:4px;line-height:1.3}.food-log-tabs{display:flex;border-bottom:1px solid #20201E26;gap:24px;margin-bottom:24px}.food-log-tabs button{background:transparent;border:0;padding:0 0 13px;color:#20201E;font-size:13px;min-height:44px;border-bottom:3px solid transparent;border-radius:0}.food-log-tabs button[aria-pressed=true]{border-bottom-color:#20201E;font-weight:800}.food-list-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.food-list-heading h3{font-size:22px;letter-spacing:-.7px;margin:0}.food-list-heading small{font-size:11px}.food-log-item{display:flex;align-items:center;text-align:left;width:100%;padding:15px 0;border:0;border-bottom:1px solid #20201E20;background:transparent;color:#20201E;gap:14px}.food-log-item .food-photo,.food-log-item img,.food-item-mark{width:64px!important;height:64px!important;min-width:64px!important;border-radius:14px;overflow:hidden;object-fit:cover;margin:0}.food-log-item .food-photo img{width:100%!important;height:100%!important}.food-item-mark{display:grid;place-items:center;background:#20201E0a}.food-item-mark svg{width:27px;height:27px}.food-item-copy{flex:1;min-width:0}.food-item-copy b{font-size:16px;line-height:1.25;display:block;overflow-wrap:anywhere}.food-item-copy small{display:block;font-size:11px;line-height:1.5;margin-top:3px}.food-item-copy small:last-child{opacity:.72}.food-item-next{display:grid;place-items:center;width:30px;height:30px;border:1px solid #20201E30;border-radius:50%}.food-item-next svg{width:16px;height:16px}.food-log-empty{padding:26px 22px;border:1px dashed #20201E40;border-radius:18px;margin:12px 0 20px}.food-log-empty h3{font-size:22px;margin:0 0 10px;letter-spacing:-.6px}.food-log-empty p{font-size:14px;line-height:1.5;margin-bottom:18px}.food-diary-back{display:flex;align-items:center;gap:8px;background:transparent;border:0;color:#20201E;font-size:12px;padding:18px 0 0;min-height:44px}.food-diary-back svg{width:16px;height:16px}.food-review-hero{margin:22px 0}.food-review-hero>.food-photo{height:180px;border-radius:20px;overflow:hidden;margin:0 0 20px}.food-review-hero h2{font-size:36px;letter-spacing:-1.3px;overflow-wrap:anywhere}.food-portion-picks{display:flex;gap:8px;margin:12px 0}.food-portion-picks button{flex:1;border:1px solid #20201E30;background:transparent;color:#20201E;border-radius:12px;padding:13px}.food-portion-picks button[aria-pressed=true]{background:#20201E;color:#FFF5E6}.food-review-totals{margin:20px 0;background:#20201E;color:#FFF5E6;border-radius:20px;padding:22px}.food-review-totals>div:first-child{display:flex;align-items:baseline;gap:9px}.food-review-totals strong{font-size:46px;line-height:1}.food-review-totals span{font-size:12px}.food-review-macros{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #FFF5E630;margin-top:18px;padding-top:15px;gap:10px}.food-review-macros span{display:grid;gap:6px}.food-review-macros b{font-size:17px}.food-quiet-note{font-size:12px;line-height:1.5;margin:14px 0 18px}.food-log-sheet .food-commit{background:#20201E;color:#FFF5E6;border-radius:14px;display:flex;align-items:center;justify-content:space-between;padding:16px 20px;margin-top:18px}.food-commit svg{width:20px;height:20px}.food-diary-summary{display:grid;grid-template-columns:1fr auto;gap:20px;border-radius:20px;background:#20201E;color:#FFF5E6;padding:24px;margin:22px 0 16px}.food-diary-summary>div{display:grid;gap:6px}.food-diary-summary strong{font-size:43px;line-height:1;letter-spacing:-1px}.food-diary-summary span{font-size:12px}.food-diary-summary>div:nth-child(2){text-align:right}.food-diary-macros{grid-column:1/-1;display:grid!important;grid-template-columns:repeat(3,1fr);border-top:1px solid #FFF5E630;padding-top:17px;gap:12px!important}.food-diary-macros span{display:grid;gap:5px}.food-diary-macros b{font-size:18px}.food-diary-sections section{padding:20px 0;border-bottom:1px solid #20201E26}.food-group-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.food-group-heading h3{font-size:24px;letter-spacing:-.7px;margin:0 0 5px}.food-group-heading small{font-size:12px}.food-group-heading button{border:1px solid #20201E30;display:flex;gap:5px;align-items:center;background:transparent;color:#20201E;border-radius:24px;padding:12px 17px;font-size:12px;min-height:44px}.food-group-heading button svg{width:16px;height:16px}.food-diary-entry{display:flex;align-items:center;gap:12px;padding:18px 0 0}.food-diary-entry>.food-photo{width:52px;height:52px;min-width:52px;border-radius:12px;overflow:hidden;margin:0}.food-diary-entry>div:not(.food-photo){flex:1;min-width:0}.food-diary-entry b{font-size:15px;line-height:1.4;display:block;overflow-wrap:anywhere}.food-diary-entry small{display:block;font-size:12px;line-height:1.6}.food-remove{background:transparent;border:0;width:44px;min-width:44px;height:44px;font-size:22px;color:#20201E}.food-target-details{padding:24px 0 0}.food-target-details>summary{font-size:13px;font-weight:700;min-height:44px}.food-log-sheet input,.food-log-sheet select{font-size:16px}.food-log-sheet :focus-visible{outline:2px solid #20201E;outline-offset:4px}.food-log-sheet .primary{background:#20201E;color:#FFF5E6}.food-log-sheet button:disabled{opacity:.45}
@media(max-width:600px){#modal.food-log-sheet{margin:auto 0 0;width:100%;max-width:none;max-height:94dvh;padding:23px 22px calc(24px + env(safe-area-inset-bottom));border-radius:26px 26px 0 0}.food-log-heading h2,.food-diary-heading h2{font-size:42px}.food-entry-methods{gap:8px}.food-entry-methods button{gap:8px;padding:13px 10px}.food-entry-methods button>svg:last-child{display:none}.food-entry-methods small{font-size:10px}.food-log-tabs{gap:20px}.food-log-tabs button{font-size:12px}.food-log-item .food-photo,.food-log-item img,.food-item-mark{width:58px!important;height:58px!important;min-width:58px!important}.food-item-copy b{font-size:15px}.food-log-heading p,.food-diary-heading p{font-size:13px}}

.food-log-sheet .modal-photo{height:210px;border-radius:20px;margin:10px 0 22px}.food-log-sheet .modal-title{font-size:34px;letter-spacing:-1px;line-height:1.08}.food-log-sheet .recipe-facts{font-size:14px;line-height:1.5}.food-log-sheet .full-field{border-radius:12px;min-height:48px}.food-log-sheet form>label{display:block;font-size:13px;font-weight:650;margin:18px 0 8px}.food-log-sheet .nutrition-inputs{gap:12px;margin-top:18px}.food-log-sheet .nutrition-inputs label{font-size:12px}.food-log-sheet .full{min-height:48px;border-radius:13px}.food-log-sheet .log-meta{gap:10px}.food-log-sheet .log-meta>*{min-width:0}
/* Search -> portion -> log. Nutrition is already loaded. */
.food-log-sheet .modal-top{margin-bottom:16px}.food-log-sheet .modal-top>span{visibility:hidden}.simple-log-head{display:flex;align-items:center;gap:15px;margin-bottom:20px}.simple-log-head h2{flex:1;font-family:Arial,Helvetica,sans-serif;font-size:28px;letter-spacing:-.8px;margin:0;font-weight:700}.simple-log-head select{width:auto;max-width:45%;background:transparent;border:1px solid #20201E30;border-radius:25px;padding:10px 12px;font-size:13px;min-height:44px}.simple-search{margin:0 0 22px}.simple-search .food-search-box{background:#20201E06;border:1px solid #20201E30;border-radius:14px;height:54px;padding-right:4px}.simple-search button{display:grid;place-items:center;width:44px;min-height:44px;background:transparent;color:#20201E;padding:10px}.simple-list-title{display:block;font-size:13px;font-weight:600;letter-spacing:0;margin:22px 0 4px;color:#20201Eaa}.simple-food-row{display:flex;align-items:center;gap:12px;background:transparent;color:#20201E;border:0;border-bottom:1px solid #20201E18;border-radius:0;width:100%;text-align:left;padding:16px 0;min-height:76px}.simple-food-row>span:first-child{flex:1;min-width:0;display:grid;gap:6px}.simple-food-row b{font-size:16px;line-height:1.3;font-weight:550;overflow-wrap:anywhere}.simple-food-row small{font-size:12px;color:#20201Eaa;line-height:1.35}.simple-add{display:grid;place-items:center;width:30px;height:30px;min-width:30px;border:1px solid #20201E30;border-radius:50%}.simple-add svg{width:16px;height:16px}.simple-packaged{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;width:100%;color:#20201E;background:transparent;padding:16px 0;min-height:48px}.simple-packaged svg{width:16px;height:16px}.simple-log-footer{border-top:1px solid #20201E20;margin-top:8px;padding-top:10px;display:flex;gap:18px;align-items:flex-start;justify-content:space-between}.simple-log-footer>button{background:transparent;color:#20201E;font-size:12px;padding:10px 0;min-height:44px;text-align:left}.simple-log-footer details{font-size:11px;max-width:50%;line-height:1.5}.simple-log-footer summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.simple-back{display:flex;align-items:center;gap:8px;background:transparent;color:#20201E;padding:0;font-size:13px;min-height:44px;margin-bottom:18px}.simple-back svg{width:16px;height:16px}.simple-food-name{font-family:Arial,Helvetica,sans-serif;font-size:28px;font-weight:700;line-height:1.15;letter-spacing:-.7px;overflow-wrap:anywhere;margin:0 0 10px}.simple-source{font-size:12px;color:#20201Eaa;margin:0 0 28px}.simple-portion{display:flex;gap:8px;align-items:center;border:1px solid #20201E30;border-radius:15px;padding:8px;margin:10px 0 24px}.simple-portion button{width:38px;min-width:38px;height:44px;background:transparent;color:#20201E;font-size:23px;padding:0}.simple-portion input{width:64px;min-width:0;text-align:center;font-size:22px!important;font-weight:600;border:0;background:transparent;padding:5px;appearance:textfield}.simple-portion input::-webkit-inner-spin-button{appearance:none}.simple-portion select{flex:1;min-width:0;max-width:50%;border:0;border-left:1px solid #20201E20;border-radius:0;background:transparent;padding:12px 8px;font-size:14px}.simple-nutrition{padding:22px 0;border-top:1px solid #20201E20;border-bottom:1px solid #20201E20;margin-bottom:28px}.simple-nutrition>div:first-child{display:flex;gap:8px;align-items:baseline}.simple-nutrition strong{font-size:48px;font-weight:700;letter-spacing:-2px;line-height:1}.simple-nutrition>div:first-child>span{font-size:13px}.simple-macro-row{display:grid;grid-template-columns:repeat(3,1fr);margin-top:25px;gap:15px}.simple-macro-row>span{display:grid;gap:7px}.simple-macro-row b{font-size:19px;font-weight:600}.simple-macro-row small{font-size:12px;color:#20201Eaa}.simple-nutrition>p{font-size:11px;color:#20201Eaa;margin:18px 0 0}.simple-save{margin-top:0!important;min-height:54px!important;font-size:16px!important}.simple-nutrition-details{font-size:12px;line-height:1.5;margin-top:16px}.simple-nutrition-details summary{min-height:44px;display:flex;align-items:center;color:#20201Eaa;cursor:pointer}.simple-repeat-meta{display:none}.food-log-sheet .food-review-hero h2{font-family:Arial,Helvetica,sans-serif;font-size:28px;line-height:1.15;letter-spacing:-.7px}.food-log-sheet .live-details{margin:16px 0}.food-log-sheet .live-food-result{min-height:76px}.food-log-sheet .live-product-heading .modal-title{font-size:26px}.food-log-sheet .food-review-totals{background:transparent;color:#20201E;border-radius:0;padding:20px 0;border-block:1px solid #20201E20}.food-log-sheet .food-review-macros{border-color:#20201E20}
@media(max-width:600px){#modal.food-log-sheet{margin:0;width:100%;max-height:100dvh;height:100dvh;border-radius:0;padding:18px 22px calc(24px + env(safe-area-inset-bottom))}.food-log-sheet .modal-top{margin-bottom:8px}.simple-food-name{font-size:26px}.simple-log-head{margin-bottom:16px}.simple-portion{gap:4px}.simple-portion input{width:55px}.simple-log-footer{gap:12px}}
body:has(#modal.food-log-sheet[open]){overflow:hidden}.food-log-sheet .live-food-totals{background:transparent;color:#20201E;border-block:1px solid #20201E20;border-radius:0;padding:20px 0;margin:20px 0}.food-log-sheet .live-food-totals>strong{font-size:42px;letter-spacing:-1px}.food-log-sheet .live-food-totals>strong>span{font-size:13px;font-weight:400;letter-spacing:0}.food-log-sheet .live-food-totals>p{font-size:12px;margin-top:18px}

/* Keep the meal in view while adding its foods; commit only from review. */
.food-meal-bar{position:sticky;bottom:-30px;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 0;background:#FFF5E6;border-top:1px solid #20201E30;box-shadow:0 -12px 16px #FFF5E6}.food-meal-bar>span{display:grid;gap:5px;min-width:0}.food-meal-bar b{font-size:16px}.food-meal-bar small{font-size:12px}.food-meal-bar button{display:flex;align-items:center;gap:8px;min-height:48px;border-radius:14px;padding:12px 16px;white-space:nowrap;font-size:14px}.food-meal-bar svg{width:16px;height:16px}.food-meal-item{display:flex;align-items:center;gap:8px;border-bottom:1px solid #20201E25}.food-meal-edit{display:grid;gap:7px;flex:1;min-width:0;padding:18px 0;text-align:left;background:transparent;color:#20201E;border:0;border-radius:0}.food-meal-edit b{font-size:17px;line-height:1.3;overflow-wrap:anywhere}.food-meal-edit small{font-size:12px;opacity:.7}.food-meal-actions{position:sticky;bottom:-30px;z-index:3;padding:12px 0;background:#FFF5E6;box-shadow:0 -12px 16px #FFF5E6;display:grid;grid-template-columns:1fr 1.3fr;gap:10px}.food-meal-actions button{margin:0!important;min-width:0;font-size:15px}.food-meal-discard{font-size:12px;opacity:.7}.food-meal-items{margin:8px 0 24px}@media(max-width:600px){.food-meal-bar,.food-meal-actions{bottom:calc(-24px - env(safe-area-inset-bottom));padding-bottom:calc(18px + env(safe-area-inset-bottom))}}

#modal.food-log-sheet[open]:has(.simple-log-head){display:flex;flex-direction:column;height:min(780px,calc(100dvh - 40px));overflow:hidden}#modal.food-log-sheet:has(.simple-log-head)>*{flex-shrink:0}#modal.food-log-sheet:has(.simple-log-head) #food-log-results{overflow-y:auto;min-height:0;flex:1;overscroll-behavior:contain;scrollbar-width:thin;padding:0 3px}#modal.food-log-sheet:has(.simple-log-head) .food-meal-bar{position:static;padding:14px 0;box-shadow:none}#modal.food-log-sheet:has(.simple-log-head) .simple-search{margin-bottom:8px}.simple-log-footer details[open]{max-height:100px;overflow-y:auto}@media(max-width:600px){#modal.food-log-sheet[open]:has(.simple-log-head){height:100dvh;max-height:100dvh}}

.simple-food-row .simple-food-choice{flex:1;min-width:0;display:grid;gap:6px;border:0;background:transparent;color:#20201E;padding:12px 0;text-align:left;border-radius:0;min-height:60px}.simple-food-row .simple-add{width:44px;height:44px;min-width:44px;min-height:44px;background:transparent;color:#20201E;padding:0;flex:none}.simple-food-row{padding:4px 0;min-height:72px}.food-swipe{position:relative;overflow:hidden;border-radius:12px;touch-action:pan-y}.food-swipe-under{position:absolute;inset:0;display:flex;align-items:center;justify-content:flex-end;padding:0 20px;background:#20201E;color:#FFF5E6;font-size:14px;font-weight:700;visibility:hidden}.food-swiping .food-swipe-under{visibility:visible}.food-swipe-content{position:relative;background:#FFF5E6;touch-action:pan-y;transition:transform .15s ease}.food-swiping .food-swipe-content{transition:none;will-change:transform}.food-swipe .food-meal-item{padding-left:2px}.food-diary-swipe-row{display:flex;align-items:center;gap:4px}.food-diary-swipe-row .simple-diary-row{flex:1;min-width:0}.food-diary-swipe-row .food-remove{width:44px;min-width:44px}.food-swipe-hint{font-size:12px;opacity:.6;margin:6px 0 10px}.food-meal-undo{display:flex;align-items:center;justify-content:space-between;gap:12px;border-block:1px solid #20201E25;padding:3px 0;font-size:14px}.food-meal-undo button{background:transparent;color:#20201E;font-weight:700;padding:10px;min-height:44px}.food-swipe button:focus-visible{outline:2px solid #20201E;outline-offset:-3px}@media(prefers-reduced-motion:reduce){.food-swipe-content{transition:none}}

.food-meal-undo,.food-hub-surface .hub-undo{position:sticky;top:0;z-index:8;background:#FFF5E6}.food-meal-undo{box-shadow:0 8px 12px #FFF5E6}.food-hub-surface .hub-undo{top:8px}

.food-meal-bar .food-meal-summary{display:grid;gap:5px;flex:1;min-width:0;background:transparent;color:#20201E;border:0;padding:4px 0;text-align:left;border-radius:0;white-space:normal}.food-meal-bar .food-meal-summary b{font-size:16px}.food-meal-bar .food-meal-summary small{font-size:12px;font-weight:400}.food-diary-swipe-row .simple-diary-row{grid-template-columns:1fr auto}

/* Selected rows stay visible while the primary commit action anchors the sheet. */
.simple-food-row.is-selected{border:1px solid #FF5C28;box-shadow:inset 4px 0 0 #FF5C28;border-radius:14px;padding-inline:12px;margin:5px 0}.food-selection-qty{display:grid;place-items:center;flex:none;min-width:30px;height:30px;padding:0 6px;border-radius:50%;background:#FF5C28;color:var(--paper);font-size:15px}.food-selection-qty[hidden]{display:none}.food-selection-qty b{font-size:15px!important;font-weight:800}.food-log-sheet .food-meal-bar{display:grid;grid-template-columns:1fr;gap:10px;border-top:2px solid #20201E;padding-top:18px}.food-meal-bar .food-meal-summary{width:100%;min-height:54px;gap:5px}.food-meal-bar .food-meal-summary b{font-size:23px;font-weight:750}.food-meal-bar .food-meal-summary small{font-size:14px}.food-log-sheet .food-meal-bar .primary,.food-log-sheet .food-meal-actions .primary{background:#FF5C28;color:var(--paper);border:0}.food-log-sheet .food-meal-bar .primary{width:100%;min-height:62px;justify-content:center;font-size:22px;font-weight:800;border-radius:16px}.food-meal-bar .primary svg{width:21px;height:21px}#modal.food-log-sheet:has(.simple-log-head) .food-meal-bar{padding:15px 0 8px}

.food-logging-person{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;background:transparent;color:#20201E;border:1px solid #20201E35;border-radius:12px;padding:12px 14px;min-height:48px;text-align:left;font-size:14px;margin:0 0 14px}.food-logging-person svg{width:17px;height:17px;flex:none}

/* Keep identity visible without putting setup between a person and their food. */
.food-logging-context{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;font-size:13px;min-height:44px}
.food-logging-context>span{min-width:0;overflow-wrap:anywhere}
.food-profile-options{position:relative;flex:none}
.food-profile-options>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;text-decoration:underline;text-underline-offset:3px}
.food-profile-options[open] .food-logging-person{position:absolute;right:0;top:100%;z-index:5;width:min(270px,70vw);margin:0;background:var(--paper);box-shadow:0 8px 24px #20201E26}
