/* Owner-approved 2026-11-08 direction. Scope visual hierarchy; retain shared data/safety rules. */
#home[data-layout=v2] #today-hero #today-balance[data-focus=intake]{display:flex;flex-direction:column;gap:10px;text-align:left;padding:18px!important;background:var(--soft);border:1px solid var(--line);border-radius:22px}
#home #today-balance[data-focus=intake] .intake-focus{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%}
.intake-focus-copy{display:flex;min-width:0;flex-direction:column;gap:3px}
#home #today-balance .intake-focus-copy>small{font-size:13px;line-height:1.5}
#home #today-balance .intake-focus-number{display:flex;align-items:baseline;gap:5px;font-size:42px;font-weight:750;line-height:1.15;font-variant-numeric:tabular-nums}
#home #today-balance .intake-focus-number small{font-size:14px;font-weight:500}
.intake-focus-ring{width:76px;height:76px;flex:none;display:grid;place-items:center;position:relative;color:var(--brand)}
.intake-focus-ring .intake-progress-dial{width:100%;height:100%;position:absolute;inset:0;fill:none;stroke-width:5;transform:rotate(-90deg)}
.intake-progress-track{stroke:var(--line)}
.intake-progress-fill{stroke:var(--brand);stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:var(--intake-offset,100)}
.intake-focus-ring[data-animate=true] .intake-progress-fill{animation:intake-progress-fill 650ms cubic-bezier(.2,.7,.2,1) both}
.intake-progress-caption{display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15;z-index:1;gap:2px;max-width:80%}
.intake-progress-percent{font-size:20px;font-weight:750;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.intake-progress-label{font-size:10px;line-height:1.3;max-width:100%;text-align:center}
.intake-focus-ring.is-unknown .intake-progress-track{stroke-dasharray:2 4}
.intake-focus-ring.is-unknown .intake-progress-fill{display:none}
@keyframes intake-progress-fill{from{stroke-dashoffset:var(--intake-from,100)}to{stroke-dashoffset:var(--intake-offset,100)}}
@media(prefers-reduced-motion:reduce){.intake-focus-ring[data-animate=true] .intake-progress-fill{animation:none}}
#home[data-layout=v2] #today-hero #today-balance[data-focus=intake] .today-balance-main{display:flex;gap:8px;justify-content:space-between;align-items:baseline;margin:0;padding-top:10px;border-top:1px solid var(--line);width:100%}
#home[data-layout=v2] #today-hero #today-balance[data-focus=intake] .today-balance-value{font-size:18px!important;line-height:1.3!important}
#home[data-layout=v2] #today-hero #today-balance[data-focus=intake] .today-balance-label{font-size:12px!important}
#home[data-layout=v2] #today-hero #today-balance[data-focus=intake] .today-energy-io{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:10px;margin:0;padding:0}
#home[data-layout=v2] #today-hero #today-balance[data-focus=intake] .today-energy-measure{display:flex;flex-direction:column;gap:1px;align-items:flex-start}
#home #today-balance[data-focus=intake] .today-energy-track{display:none}
#home[data-layout=v2] #today-hero #today-balance[data-focus=intake] .today-energy-period{font-size:11px;line-height:1.5;margin:0}
#home #today-balance[data-focus=intake] .today-balance-status{padding:4px 8px;background:var(--surface);border-radius:7px;align-self:flex-start}
#home #today-balance[data-focus=intake] .today-balance-more{align-self:flex-end;padding:0;min-height:24px}
#home[data-layout=v2] #today-nutrition{border:0!important;border-radius:0;background:transparent;padding:10px 2px!important}
#home .nutrition-focus>h3{font-size:16px;margin:0 0 2px}
#home .nutrition-focus>.pfc-ratio-bar{margin:8px 0 10px;height:7px}
#home .nutrition-focus .pfc-summary-grid{display:flex;flex-direction:column;gap:8px}
#home .nutrition-focus .pfc-summary-grid>.nutrition-row{display:grid;grid-template-columns:minmax(70px,1fr) minmax(56px,1fr) minmax(80px,auto);grid-template-rows:auto auto;gap:0 10px;align-items:center;min-width:0}
#home .nutrition-focus .pfc-summary-grid b{grid-column:1;grid-row:1;font-size:12px;line-height:1.4}
#home .nutrition-focus .pfc-summary-grid strong{grid-column:3;grid-row:1;font-size:19px;line-height:1.25;margin:0;text-align:right;font-variant-numeric:tabular-nums}
#home .nutrition-focus .pfc-summary-grid .macro-composition{grid-column:1;grid-row:2;font-size:11px}
#home .nutrition-focus .pfc-summary-grid .nutrition-target{grid-column:3;grid-row:2;text-align:right;font-size:11px}
#home .nutrition-focus .pfc-summary-grid progress{grid-column:2;grid-row:1/3;width:100%;height:7px;min-width:0;margin:0;accent-color:var(--brand)}
#home .nutrition-focus [data-macro=fat_g] progress{accent-color:#756959}
#home .nutrition-focus [data-macro=carbs_g] progress{accent-color:#4F7089}
#home .nutrition-focus.care .pfc-summary-grid>.nutrition-row{grid-template-columns:1fr 1fr}
#home .nutrition-focus.care .pfc-summary-grid strong,#home .nutrition-focus.care .pfc-summary-grid .nutrition-target{grid-column:2}
#home .nutrition-focus .mineral-summary-grid{margin-top:12px;padding-top:10px;border-top:1px solid var(--line);gap:12px}
#home .nutrition-focus .mineral-summary-grid .nutrition-row{padding:0;min-width:0}
#home .nutrition-focus .mineral-summary-grid strong{font-size:19px}
#home .nutrition-focus .mineral-summary-grid small{font-size:11px}
#home #today-energy-extra>summary,#home .nutrition-ratio-method>summary,#home .today-nutrition-analysis>summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
#home #home-complete-day{min-height:44px}
#home #meal-next .journey-card{padding:14px;border-radius:18px;margin:6px 0 12px}
#home #meal-next h2{font-size:15px;margin:0 0 3px}#home #meal-next p{font-size:13px;margin:3px 0 8px;line-height:1.5}#home #meal-next button{min-height:44px;font-size:14px}
#home .home-meal-row{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:10px;min-height:76px;padding:10px 0;align-items:center;text-align:left}
#home .home-meal-thumb{display:block;width:52px;height:52px;border-radius:12px;overflow:hidden;background:var(--soft)}
#home .home-meal-thumb img{display:block;width:100%;height:100%;object-fit:cover}
#home .home-meal-row>span:nth-child(2){min-width:0}#home .home-meal-row b{font-size:14px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}#home .home-meal-value{max-width:80px;font-size:13px;line-height:1.4;text-align:right;font-variant-numeric:tabular-nums}
/* The dialog itself must never transform: iOS file-picker anchors rely on viewport coordinates. */
.meal-sheet .sheet-meal-preview{display:flex;gap:14px;align-items:center;margin:8px 0 12px;min-width:0}
.meal-sheet .sheet-meal-preview .sheet-photo{display:flex;flex-direction:column;align-items:center;gap:6px;flex:none;margin:0;max-width:104px}
.meal-sheet .sheet-meal-preview .sheet-pic{width:104px;height:104px;object-fit:cover;border-radius:18px}
.meal-sheet .sheet-meal-preview .sheet-photo-pick{font-size:12px;min-height:36px;max-width:104px;text-align:center}
.meal-sheet .sheet-meal-fields{min-width:0;flex:1}.meal-sheet .sheet-meal-fields .sheet-name{width:100%;font-size:20px;font-weight:700;margin:0 0 5px;line-height:1.4}.meal-sheet .sheet-meal-fields .sheet-serving{width:100%;font-size:16px;margin:0}
.meal-sheet .sheet-amount-status{font-size:12px;line-height:1.5;margin:6px 0}
.meal-sheet .sheet-kcal{margin:12px 0}.meal-sheet .sheet-kcal-input{font-size:42px;max-width:180px}
.meal-sheet .sheet-pfc{gap:6px}.meal-sheet .sheet-pfc label{border-radius:14px;padding:10px 8px;min-width:0}.meal-sheet .sheet-pfc input{width:100%;min-width:0;font-size:20px}
.meal-sheet .sheet-save{position:sticky;bottom:0;z-index:2;min-height:50px;box-shadow:0 -8px 20px 6px var(--surface)}
.meal-sheet .sheet-done{padding:16px;background:var(--soft);border-radius:18px}.meal-sheet .sheet-done-mark{border-radius:50%;background:var(--brand);color:var(--surface)}
.ql-sheet .ql-grid{gap:10px}.ql-sheet .ql-photo-choices{gap:8px}.ql-sheet .ql-photo-choice{padding:12px;min-height:64px}.ql-sheet .ql-photo-extra summary{min-height:44px;display:flex;align-items:center}
#report .weekly-record-open{min-height:76px;gap:10px;padding:10px}#report .weekly-record-photo{width:52px;height:52px;flex:none;border-radius:12px;overflow:hidden}#report .weekly-record-photo img{width:100%;height:100%;object-fit:cover}#report .weekly-record-main{min-width:0}#report .weekly-record-main strong{font-size:14px;line-height:1.45}#report .weekly-record-value{font-size:15px;max-width:74px}#report .weekly-timeline{padding:6px 0}#report #week-day-selector .today-day{min-height:64px}
.today-quick-btn,.ql-tile,.ql-photo-choice,.sheet-chips button{transition:transform 100ms ease,opacity 100ms ease}
.today-quick-btn:active,.ql-tile:active,.ql-photo-choice:active,.sheet-chips button:active{transform:scale(.98)}
@media(max-width:360px){#home #today-balance .intake-focus-number{font-size:35px}.intake-focus-ring{width:64px;height:64px}.meal-sheet .sheet-meal-preview{gap:10px}.meal-sheet .sheet-meal-preview .sheet-pic{width:80px;height:80px}.meal-sheet .sheet-meal-preview .sheet-photo{max-width:80px}#home .nutrition-focus .pfc-summary-grid>.nutrition-row{grid-template-columns:80px minmax(36px,1fr) 80px;gap:0 7px}}
@media(prefers-reduced-motion:reduce){.today-quick-btn,.ql-tile,.ql-photo-choice,.sheet-chips button{transition:none}.today-quick-btn:active,.ql-tile:active,.ql-photo-choice:active,.sheet-chips button:active{transform:none}.record-success-enter{animation:none}}
#home[data-layout=v2] #today-hero #today-balance[data-focus=intake]{gap:7px}
#home #today-balance[data-focus=intake] .today-balance-more{font-size:11px!important;line-height:1.4}
#home #meal-next{padding:12px 14px;margin:8px 0;border-radius:18px;background:var(--soft)}
#home #meal-next[hidden]{display:none}
.top-panel:not([hidden]),.record-tab-panel:not([hidden]){animation:focus-panel-enter 160ms ease-out}
@keyframes focus-panel-enter{from{opacity:.65}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.top-panel:not([hidden]),.record-tab-panel:not([hidden]){animation:none}}
#home #today-balance .today-focus-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%}
#home #today-balance .today-focus-footer .today-balance-more{min-height:28px;display:flex;align-items:center;padding:0}
#home #today-balance .today-focus-footer .today-balance-status{margin:0}
#home[data-layout=v2] .intake-focus-ring{width:64px;height:64px}
#home[data-layout=v2] #today-energy-extra{font-size:12px;margin:0}
#home[data-layout=v2] #home-complete-day{margin:0 0 10px!important;padding:8px 12px;background:var(--soft);border:1px solid var(--line);color:var(--brand);font-size:13px}
#home .nutrition-focus .pfc-summary-grid .nutrition-partial{grid-column:1/-1;font-size:11px}
#home .nutrition-focus.care .pfc-summary-grid .nutrition-comparison{grid-column:1/-1;font-size:11px}
#home .nutrition-focus progress{appearance:none;border:0;border-radius:8px;overflow:hidden;background:var(--line)}
#home .nutrition-focus progress::-webkit-progress-bar{background:var(--line);border-radius:8px}
#home .nutrition-focus progress::-webkit-progress-value{background:var(--brand);border-radius:8px}
#home .nutrition-focus [data-macro=fat_g] progress::-webkit-progress-value{background:#756959}
#home .nutrition-focus [data-macro=carbs_g] progress::-webkit-progress-value{background:#4F7089}
#home .nutrition-focus progress::-moz-progress-bar{background:var(--brand);border-radius:8px}
#home .nutrition-focus [data-macro=fat_g] progress::-moz-progress-bar{background:#756959}
#home .nutrition-focus [data-macro=carbs_g] progress::-moz-progress-bar{background:#4F7089}
/* Real request feedback: one transform-only photo scan, stopped by request lifecycle. */
#meal-photo-state{position:relative;isolation:isolate;overflow:hidden;border-radius:16px}
.meal-scan-frame{position:relative;overflow:hidden;border-radius:18px;background:var(--soft)}
.meal-scan-overlay{display:none;position:absolute;inset:0;pointer-events:none;border-radius:inherit;overflow:hidden}
.meal-is-reading .meal-scan-overlay{display:block}
.meal-scan-overlay::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 38%,#dcecc96b 49%,#eef7dce6 50%,#dcecc96b 51%,transparent 62%);transform:translateY(-70%);animation:meal-scan 1.7s ease-in-out infinite alternate}
.meal-scan-corner{position:absolute;width:22px;height:22px;border:3px solid #edf5db;z-index:1;filter:drop-shadow(0 1px 2px #243e3155)}
.meal-scan-corner:nth-child(1){top:12px;left:12px;border-right:0;border-bottom:0;border-top-left-radius:8px}.meal-scan-corner:nth-child(2){top:12px;right:12px;border-left:0;border-bottom:0;border-top-right-radius:8px}.meal-scan-corner:nth-child(3){bottom:12px;left:12px;border-top:0;border-right:0;border-bottom-left-radius:8px}.meal-scan-corner:nth-child(4){bottom:12px;right:12px;border-top:0;border-left:0;border-bottom-right-radius:8px}
.meal-reading-status{display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 12px;background:var(--soft);border-radius:12px;font-weight:600}
.meal-reading-status::before{content:"";width:16px;height:16px;flex:none;border:2px solid var(--line);border-top-color:var(--brand);border-radius:50%;animation:meal-reading-spin 900ms linear infinite}
@keyframes meal-scan{to{transform:translateY(70%)}}
@keyframes meal-reading-spin{to{transform:rotate(360deg)}}
/* The daily grams and energy shares use separate, explicitly labelled views. */
.pfc-ratio-label{display:block;font-size:11px;color:var(--muted);margin-top:9px}
#home .nutrition-focus>.pfc-ratio-label{margin-top:5px}
#report .nutrition-dense .pfc-summary-grid{display:flex;flex-direction:column;gap:8px}
#report .nutrition-dense .pfc-summary-grid>.nutrition-row{display:grid;grid-template-columns:minmax(95px,1fr) auto;gap:1px 10px;align-items:baseline;min-width:0}
#report .nutrition-dense .pfc-summary-grid b{font-size:13px;grid-column:1}
#report .nutrition-dense .pfc-summary-grid strong{font-size:22px;grid-column:2;grid-row:1;text-align:right}
#report .nutrition-dense .pfc-summary-grid .nutrition-target{display:block;grid-column:2;grid-row:2;text-align:right;font-size:11px}
#report .nutrition-dense .pfc-summary-grid .macro-composition{display:block;grid-column:1;grid-row:2;font-size:11px}
#report .nutrition-dense .pfc-summary-grid progress{display:block;grid-column:1/-1;grid-row:3;width:100%;height:6px;accent-color:var(--brand);margin:4px 0}
#report .nutrition-dense .pfc-summary-grid .nutrition-partial,#report .nutrition-dense .pfc-summary-grid .nutrition-comparison{grid-column:1/-1;font-size:12px}
.nutrient-trend{--nutrient-tone:#527f6a;margin:8px 0 16px;padding:14px 12px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.nutrient-trend[data-nutrient=fat_g]{--nutrient-tone:#8a7761}.nutrient-trend[data-nutrient=carbs_g]{--nutrient-tone:#6289a4}.nutrient-trend[data-nutrient=salt_g]{--nutrient-tone:#84768e}.nutrient-trend[data-nutrient=potassium_mg]{--nutrient-tone:#527e7d}
.nutrient-scale{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-variant-numeric:tabular-nums;font-size:12px;margin-bottom:8px}.nutrient-scale small{font-size:11px;color:var(--muted)}
.nutrient-columns{position:relative;display:grid;grid-template-columns:repeat(var(--days),minmax(0,1fr));gap:3px;padding-top:20px}
.nutrient-day{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;min-width:0;padding:3px 0 6px;background:transparent;border:0;border-radius:8px;color:var(--ink);font-variant-numeric:tabular-nums;cursor:pointer}
.nutrient-day[aria-pressed=true]{outline:2px solid var(--nutrient-tone);outline-offset:0;background:var(--soft)}
.nutrient-amount{font-size:11px;line-height:18px;font-weight:700}.nutrient-column{display:flex;align-items:flex-end;justify-content:center;position:relative;height:104px;width:100%;border-bottom:1px solid var(--line)}
.nutrient-fill{display:block;height:max(2px,var(--fill));width:55%;max-width:24px;border-radius:5px 5px 0 0;background:var(--nutrient-tone)}
.nutrient-day.is-partial .nutrient-fill{opacity:.45}.nutrient-date{font-size:10px;line-height:20px}.nutrient-missing{color:var(--muted);align-self:center}.nutrient-missing-label{font-size:9px;color:var(--muted)}
.nutrient-target-line{position:absolute;left:0;right:0;top:var(--target-top);border-top:1px dashed var(--muted);pointer-events:none;z-index:2}
.nutrient-chart-hint{display:block;font-size:11px;color:var(--muted);margin-top:9px;line-height:1.5}
.nutrient-columns.is-month{gap:1px}.nutrient-columns.is-month .nutrient-amount{visibility:hidden}.nutrient-columns.is-month .nutrient-date{visibility:hidden}.nutrient-columns.is-month .nutrient-day:first-of-type .nutrient-date,.nutrient-columns.is-month .nutrient-day:last-child .nutrient-date{visibility:visible;white-space:nowrap}.nutrient-columns.is-month .nutrient-missing-label{visibility:hidden}
@media(prefers-reduced-motion:reduce){.meal-is-reading .meal-scan-overlay::after{animation:none;transform:none;background:#e1efcb22}.meal-reading-status::before{animation:none;border-top-color:var(--brand)}}
.nutrient-scale small::before{content:"";display:inline-block;width:12px;margin-right:5px;border-top:1px dashed var(--muted);vertical-align:middle}
.ql-capture.meal-request-pending .ql-photo-choices{display:none}
.ql-capture.meal-request-pending #meal-photo-preview{display:block;width:100%;height:clamp(180px,30vh,280px);max-height:none;object-fit:contain;background:var(--soft)}
.ql-capture.meal-request-pending #meal-photo-info{display:none}
/* The shared request timer stays intact; avoid announcing the same wait twice. */
.ql-capture.meal-request-pending .response-pending{display:none}
#report .progress-nutrient-switch{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
#report .progress-nutrient-switch button{min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:99px;background:var(--surface);font:inherit;font-size:13px;font-weight:600;color:var(--ink)}
#report .progress-nutrient-switch button[aria-pressed=true]{background:var(--brand);border-color:var(--brand);color:#fff}
#report .nutrition-dense [data-macro=fat_g] progress{accent-color:#8a7761}#report .nutrition-dense [data-macro=carbs_g] progress{accent-color:#6289a4}
.nutrient-columns.is-month .nutrient-missing{font-size:0;width:70%;height:1px;border-bottom:1px dashed var(--muted)}

/* Confirm the food first; keep timing editable without three permanent rows. */
.meal-sheet .sheet-when{display:block;padding:0;margin-top:12px;border-block:1px solid var(--line)}
.meal-sheet .sheet-when-summary{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 14px;padding:14px 0;font-size:13px;cursor:pointer;min-height:48px}
.meal-sheet .sheet-when-summary>span:first-child{color:var(--muted)}
.meal-sheet .sheet-when-value{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-weight:600}
.meal-sheet .sheet-when-value::after{content:'⌄';font-size:16px}
.meal-sheet .sheet-when[open] .sheet-when-value::after{content:'⌃'}
.meal-sheet .sheet-when[open]>.sheet-chips,.meal-sheet .sheet-when[open]>.sheet-time{margin:0 0 10px}
.meal-sheet .sheet-date{min-width:0;max-width:100%;flex:1 1 125px}
.meal-sheet .sheet-save-dock{position:sticky;bottom:-1px;z-index:3;background:var(--surface);padding:8px 0 0;box-shadow:0 -10px 18px var(--surface)}
.meal-sheet .sheet-save-dock .sheet-save{position:static;box-shadow:none;margin-top:0}
.meal-sheet .sheet-save-dock .sheet-status:not(:empty){padding:10px 12px;margin:0 0 8px;border:1px solid currentColor;border-radius:10px;font-size:14px;line-height:1.5;overflow-wrap:anywhere;max-height:24vh;overflow:auto}
.meal-sheet .sheet-save-dock .sheet-status:empty{display:none}
.meal-sheet .sheet-save-dock .sheet-cancel{margin:2px auto;min-height:40px}
.meal-sheet .sheet-meal-preview .sheet-photo:not(.has-photo) .sheet-photo-pick{flex-direction:column;justify-content:center;white-space:normal;padding:10px 6px;min-height:80px;min-width:80px;font-size:11px;line-height:1.4;border-radius:16px;background:var(--soft)}
.meal-sheet .sheet-meal-preview .sheet-photo:not(.has-photo) svg{flex:none;width:22px;height:22px}

/* Direct route from the summary to the daily graph, without repeating the metrics. */
#report .progress-nutrient-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
#report .progress-nutrient-heading h3{margin:0}
#report .progress-nutrient-jump{min-height:44px;flex:none;font-size:12px;font-weight:600;padding:8px 0;max-width:48%;text-align:right}
#report .progress-nutrient-switch{scroll-margin-top:16px}
.meal-sheet .sheet-quantity-jump{min-height:44px;font-size:14px;font-weight:600;padding:6px 10px 6px 0}
.meal-sheet .sheet-components,.meal-sheet .product-review{scroll-margin-top:16px}

/* Daily closing reuses the existing sheet, with date and omitted drinks/snacks first. */
.meal-sheet.completion-sheet{box-sizing:border-box;width:100%;max-width:560px;margin:0 auto;padding:10px 20px calc(16px + env(safe-area-inset-bottom));max-height:56dvh;overflow-y:auto;border-radius:24px 24px 0 0}
.meal-sheet.completion-sheet:has(details[open]){max-height:88dvh}
.completion-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.completion-sheet .completion-head h2{font-family:inherit;font-size:19px;margin:2px 0;line-height:1.4}
.completion-head button{min-width:48px;min-height:44px}
.completion-date,.guidance-date{display:block;font-size:22px;font-weight:700;margin:8px 0 16px;color:var(--brand)}
.completion-date-picker{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;font-size:14px;margin-bottom:16px}
.completion-date-picker select{box-sizing:border-box;width:100%;min-width:0;min-height:44px;font-size:16px}
.completion-records{border:1px solid var(--line);border-radius:16px;padding:12px 14px;margin:12px 0}
.completion-records summary{min-height:44px;font-size:14px;font-weight:600;cursor:pointer}
.completion-records ul{padding-left:20px;margin:10px 0 0;max-height:144px;overflow:auto}
.completion-records li{font-size:14px;line-height:1.6;overflow-wrap:anywhere;margin:4px 0}
.completion-missed{background:var(--soft);border-radius:20px;padding:16px;margin:16px 0}
.completion-missed h3{font-size:17px;margin:0 0 8px;line-height:1.5}
.completion-missed .helper{font-size:14px;margin:0 0 12px}
.completion-missed-input{box-sizing:border-box;width:100%;min-height:84px;padding:12px;font:inherit;font-size:16px;resize:vertical;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff)}
.completion-missed button{width:100%;min-height:44px;margin-top:10px}
.completion-footer{padding:8px 0 0}
.completion-reminder{font-size:13px;color:var(--muted);margin:8px 0}
.completion-sheet .completion-footer{position:sticky;bottom:-1px;background:var(--surface);padding:8px 0 0}
.completion-submit{width:100%;min-height:48px}
.completion-status:empty{display:none}
.completion-status{font-size:14px;line-height:1.6;margin:12px 0;overflow-wrap:anywhere}
.completion-sheet .completion-later{display:block;flex:0 0 auto;margin:0;min-height:44px;padding-inline:12px;border-radius:999px;font-size:13px}
.completion-sheet .completion-later:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
@media(max-width:359px){.completion-sheet{padding-inline:14px}.completion-date{font-size:20px}.completion-date-picker{grid-template-columns:1fr;gap:6px}}

.completion-date-options>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;list-style:none;cursor:pointer}
.completion-date-options>summary::-webkit-details-marker{display:none}
.completion-date-options>summary .completion-date{margin:6px 0}
.completion-date-options>summary>span{font-size:13px;font-weight:600;text-decoration:underline;color:var(--brand)}
.completion-sheet .completion-missed{padding:0 12px;margin:8px 0;border-radius:14px}
.completion-missed>summary{display:flex;align-items:center;min-height:48px;font-size:15px;font-weight:600;cursor:pointer;list-style:none}
.completion-missed>summary::before{content:"＋";margin-right:8px;font-size:20px;font-weight:400}
.completion-missed[open]{padding-bottom:12px}
.completion-missed[open]>summary::before{content:"−"}
.completion-missed>summary::-webkit-details-marker{display:none}
.completion-sheet .completion-missed-input{min-height:72px}
.completion-sheet .completion-records{margin:4px 0;padding:0;border:0;border-bottom:1px solid var(--line);border-radius:0}
.completion-sheet .completion-date{font-size:19px;margin:4px 0 8px}
#report .record-shared-summary[hidden]{display:none}
#report .record-summary-scope[hidden]{display:none}
#report .record-period-io{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0 0}
#report .record-period-io dt{font-size:11px;color:var(--muted)}
#report .record-period-io dd{font-size:19px;font-weight:600;margin:4px 0}
#report .record-log-day>h3{font-size:16px;padding:8px 0;margin:12px 0 0;border-bottom:1px solid var(--line)}
#report .record-log-day .weekly-record-group{margin:12px 0}
#report .record-log-day .weekly-record-group>h3{font-size:14px;margin:8px 0;color:var(--muted)}

/* One selected-date calendar owns the day summary, completion and sharing. */
#report .record-calendar{margin:10px 0 12px;padding:12px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}
#report .record-calendar-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
#report .record-calendar-date{font-size:18px;line-height:1.4;margin:0;font-variant-numeric:tabular-nums}
#report .record-calendar-share{min-height:44px;padding:6px 10px;font-size:13px;margin:0}
#report .record-calendar .weekly-timeline{margin:0;overflow-x:auto;overscroll-behavior-x:contain}
#report .record-calendar #week-day-selector{min-width:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin:0}
#report .record-calendar #week-day-selector .today-day{min-width:0;min-height:76px;padding:6px 2px;display:flex;flex-direction:column;align-items:center;gap:3px;border-radius:13px;scroll-snap-align:center}
#report .record-calendar #week-day-selector .today-day-n{display:block;width:auto;height:auto;font-size:21px;line-height:1.2;margin:0;outline:none;border:0;background:transparent}
#report .record-calendar #week-day-selector .today-day-w{font-size:11px;line-height:1.3}
#report .record-calendar .calendar-marks{display:flex;align-items:center;justify-content:center;gap:4px;min-height:14px}
#report .calendar-meal-state{font-size:12px;font-weight:700;line-height:14px}
#report .calendar-workout{width:13px;height:13px;display:inline-flex}
#report .calendar-workout svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8}
#report .record-calendar #week-day-selector .today-day[aria-pressed=true]{background:var(--brand);color:var(--on-primary,#fff);border-color:var(--brand)}
#report .record-calendar-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:10px;color:var(--muted);margin:6px 0}
#report .record-calendar-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;margin:6px 0}
#report .record-calendar-actions button{min-height:44px;margin:0;padding:8px 12px;font-size:13px}
#report .record-complete-day{width:100%}
#report .record-day-confirmed{font-size:13px;color:var(--brand);font-weight:600}
#report .record-summary-scope{display:flex;gap:4px;align-items:center;justify-content:flex-end;border-top:1px solid var(--line);padding-top:6px}
#report .record-summary-scope button{border:0;border-radius:10px;background:transparent;padding:7px 12px;min-height:44px;font:inherit;font-size:13px;color:var(--muted)}
#report .record-summary-scope button[aria-pressed=true]{background:var(--soft);font-weight:600;color:var(--brand)}
#report .record-day-io{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:10px 0 0}
#report .record-day-io dt{font-size:12px;color:var(--muted)}
#report .record-day-io dd{font-size:22px;line-height:1.4;font-weight:600;margin:2px 0 0;font-variant-numeric:tabular-nums}
#report .record-day-remaining{grid-column:1/-1;font-size:13px;margin:8px 0 0}
#report .record-day-method{grid-column:1/-1;margin-top:6px;font-size:12px}
#report .record-day-method>summary{min-height:44px;align-content:center;cursor:pointer}
#report .record-selected-balance.progress-balance{padding:14px 16px}
#report .record-calendar #week-day-selector:has(>:nth-child(8)){display:flex}
#report .record-calendar #week-day-selector:has(>:nth-child(8)) .today-day{flex:0 0 44px}
#report .record-calendar .today-day:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
@media(max-width:359px){#report .record-calendar{padding:8px}#report .record-calendar-date{font-size:16px}#report .record-calendar #week-day-selector .today-day{border-radius:10px}#report .record-shared-summary .record-selected-balance>strong{font-size:25px}#report .record-day-io dd{font-size:19px}}
#report .calendar-workout-legend{display:inline-flex;gap:4px;align-items:center}
#report .calendar-workout-legend svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8}
#report .record-day-unknown{grid-column:1/-1;font-size:12px;margin:6px 0 0;font-weight:600}
#report .progress-controls{margin:8px 0;gap:6px}#report .progress-controls>button{min-height:44px;padding:6px;font-size:13px}
#report .progress-navigation{margin:6px 0;gap:8px}#report .progress-navigation>button{min-height:44px}
#report .report-page-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 6px;min-height:40px}
#report .report-page-actions h1{font-size:22px;margin:0;line-height:1.4}
#report .report-page-actions button{min-height:44px;font-size:12px}
#report .record-range-row{display:flex;align-items:center;gap:6px;margin:4px 0 8px}
#report .record-range-row .progress-controls{flex:1;min-width:0;margin:0}
#report .record-range-row .progress-navigation{flex:0 0 auto;margin:0;gap:4px}
#report .record-range-row .progress-navigation>button{max-width:none;width:44px;min-width:44px;padding:4px;min-height:44px}
#report .record-range-row .progress-navigation>.text-button{width:auto;padding-inline:5px;font-size:11px}
#report .record-calendar{margin-top:0;padding:8px 10px}
#report .record-calendar-head{margin-bottom:4px}
#report .record-calendar-heading{min-width:0}
#report .record-calendar-heading #report-period{display:block;font-size:10px;margin:2px 0 0;text-align:left;line-height:1.3}
#report .record-calendar-heading .record-range-label{font-size:10px}
#report .record-calendar #week-day-selector .today-day{min-height:64px}
#report .record-calendar-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:4px;border-top:1px solid var(--line);padding-top:4px;min-height:44px}
#report .record-calendar-footer .record-summary-scope{flex:0 0 auto;border:0;padding:0}
#report .record-calendar-footer .record-summary-scope button{padding:6px 8px;font-size:12px}
#report .record-calendar-footer .record-calendar-actions{flex:1;min-width:0;margin:0;justify-content:flex-end}
#report .record-calendar-footer .record-calendar-actions[hidden]{display:none}
#report .record-calendar-footer .record-calendar-actions button{font-size:12px;padding:6px 8px}
#report .record-calendar-footer .record-day-confirmed{font-size:11px;white-space:nowrap}
#report .record-shared-summary .nutrition-focus .pfc-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#report .record-shared-summary .nutrition-focus .pfc-summary-grid>.nutrition-row{display:flex;flex-direction:column;gap:2px;min-width:0}
#report .record-shared-summary .nutrition-focus .pfc-summary-grid b{font-size:11px}
#report .record-shared-summary .nutrition-focus .pfc-summary-grid strong{font-size:22px;margin:2px 0}
#report .record-shared-summary .nutrition-focus .pfc-summary-grid progress{width:100%;height:6px;margin:2px 0}
#report .record-shared-summary .nutrition-notes{margin-top:8px}
#report .record-range-row .progress-controls>button{font-size:12px;white-space:nowrap;padding:6px 4px;min-width:0}
@media(max-width:359px){#report .record-range-row .progress-controls>button{font-size:11px;padding-inline:2px}#report .record-range-row{gap:4px}}
#report .record-calendar #week-day-selector{min-width:326px;grid-template-columns:repeat(7,minmax(44px,1fr));gap:3px}
#report .record-calendar #week-day-selector .today-day{min-width:44px}
#report{padding-top:8px}
#report .record-range-row .progress-navigation>button{height:44px;line-height:1;padding-block:4px}
#report .record-calendar .weekly-timeline{scrollbar-width:none}
#report .record-calendar .weekly-timeline::-webkit-scrollbar{display:none}
#report .record-calendar #week-day-selector .today-day{gap:2px;padding:3px 2px;min-height:64px}
#report .record-calendar #week-day-selector .today-day-n{font-size:20px}
#report .record-calendar-legend{margin:3px 0}
#report .record-shared-summary .nutrition-focus .pfc-summary-grid strong{line-height:1.2}
#report .record-shared-summary .nutrition-focus .pfc-summary-grid b,#report .record-shared-summary .nutrition-focus .pfc-summary-grid small{line-height:1.3}

#report .progress-review>[hidden]{display:none}

#report .record-safety-notices:empty,#report .record-safety-notices[hidden]{display:none}
#report .record-safety-notices{font-size:12px;line-height:1.6;margin:8px 0}
/* Numeric context replaces repeated large prose-only target warnings. */
#report .record-log-targets{background:var(--card,#fff);border:1px solid var(--line,#d9dfd3);border-radius:18px;padding:12px 14px;margin:8px 0 12px}
#report .record-log-targets dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
#report .record-log-targets dt{font-size:12px;font-weight:600;color:var(--muted)}
#report .record-log-targets dd{display:flex;flex-direction:column;gap:3px;margin:3px 0 0;font-variant-numeric:tabular-nums}
#report .record-log-targets dd strong{font-size:21px;line-height:1.3}
#report .record-log-targets dd span,#report .record-log-targets dd small{font-size:12px}
#report .record-log-targets dd small[data-over=true]{color:#795017;font-weight:600}
#report .record-log-targets details{font-size:12px;margin-top:8px;color:var(--muted)}
.record-target-notice{padding:12px 14px!important;border:0!important;border-left:3px solid #b38448!important;border-radius:12px!important;margin:8px 0!important;font-size:12px!important}
.record-target-notice>strong{font-size:12px}
.record-target-list{display:grid;gap:6px;margin:6px 0}
.record-target-list>div{display:grid;grid-template-columns:minmax(72px,auto) 1fr;gap:8px;align-items:baseline}
.record-target-list dt{font-size:12px;font-weight:500}
.record-target-list dd{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:0;font-size:12px;font-variant-numeric:tabular-nums}
.record-target-notice details{font-weight:400;font-size:12px;margin-top:6px}
.record-target-notice details p{margin:6px 0 0}
#report .record-target-notice{grid-column:1/-1;min-width:0;box-sizing:border-box;color:#795017}
#report .record-target-notice>strong{font-size:13px;line-height:1.4;margin:0;color:inherit}
#report .record-target-notice .record-target-list span,#report .record-target-notice .record-target-list b{color:inherit;font-size:12px}
#report .record-target-notice summary,#report .record-log-targets summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
#report .record-care-note{font-size:12px;line-height:1.6;margin:8px 0}
#report .record-selected-balance[data-balance-tone=surplus] .record-day-io dt{color:#fff}
#report .record-selected-balance[data-balance-tone=surplus] .record-day-method{color:#fff}

#report .record-log-targets dd strong{font-weight:650}
/* Owner-approved 2026-11-09: numbers first, guidance disclosed, quiet surfaces. */
#report .record-shared-summary .record-selected-balance.progress-balance{background:var(--paper,#fffef9);color:var(--ink);border:1px solid var(--line);border-radius:22px;padding:18px;gap:5px 12px}
#report .record-shared-summary .record-selected-balance>strong{border-radius:999px;padding:7px 13px;margin:0;font-size:25px;line-height:1.2;white-space:nowrap}
#report .record-shared-summary .record-selected-balance[data-balance-tone=surplus]>strong{background:#354f41;color:#fff}
#report .record-shared-summary .record-selected-balance[data-balance-tone=deficit]>strong{background:#e2edcf;color:#354f41}
#report .record-shared-summary .record-selected-balance>small{color:var(--muted);font-size:11px}
#report .record-shared-summary .record-selected-balance .record-day-io{margin-top:14px;gap:16px}
#report .record-shared-summary .record-selected-balance .record-day-io dt{color:var(--muted);font-weight:500;font-size:11px}
#report .record-shared-summary .record-selected-balance .record-day-io dd{font-size:23px;letter-spacing:-.02em;color:var(--ink);margin-top:5px}
#report .record-shared-summary .record-selected-balance .record-day-target{display:block;font-size:11px;color:var(--muted);margin-top:3px}
#report .record-shared-summary .record-selected-balance .record-day-remaining{font-size:12px;margin:10px 0 0;color:var(--ink)}
#report .record-shared-summary .record-selected-balance .record-day-method{color:var(--muted);margin-top:4px}
#report .record-target-notice{background:transparent!important;border:0!important;border-radius:0!important;border-left:0!important;padding:0!important;margin:2px 0 0!important;color:var(--ink);box-shadow:none;outline:none}
#report .record-target-notice>summary{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:8px;min-height:44px;font-size:11px;font-weight:500;color:var(--muted);border-top:1px solid var(--line);padding-top:4px}
#report .record-target-chips{display:inline-flex;flex-wrap:wrap;gap:6px}
#report .record-target-chip{display:inline-flex;align-items:center;gap:4px;background:#fff2e5;color:#76512f;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:600;line-height:1.4}
#report .record-target-notice>summary>span:first-child{font-size:12px}
#report .record-target-notice>summary>span:first-child::before{content:'›';display:inline-block;font-size:17px;margin-right:6px;transition:transform .15s}
#report .record-target-notice[open]>summary>span:first-child::before{transform:rotate(90deg)}
#report .record-target-list{margin:8px 0 0;padding:8px 0;border-top:1px solid var(--line)}
#report .record-target-notice>p{font-size:12px;line-height:1.6;font-weight:400;margin:6px 0;color:var(--muted)}
#report .record-log-targets{border-color:transparent;padding:14px 16px;background:var(--paper,#fffef9);box-shadow:none}
#report .record-log-targets dd strong{font-size:23px;color:var(--brand)}
#report .record-log-targets dd small[data-over=true]{background:#fff2e5;border-radius:999px;align-self:flex-start;padding:3px 7px;font-size:10px;font-weight:500;color:#76512f}
@media(max-width:359px){#report .record-shared-summary .record-selected-balance>strong{font-size:21px;padding:6px 10px}#report .record-shared-summary .record-selected-balance.progress-balance{padding:14px}#report .record-target-notice>summary{align-items:flex-start;justify-content:flex-start}}

/* The same three-column macro hierarchy on Today and selected-day records. */
#home .nutrition-focus .pfc-summary-grid,#report .record-shared-summary .nutrition-focus .pfc-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#home .nutrition-focus .pfc-summary-grid>.nutrition-row,#home .nutrition-focus.care .pfc-summary-grid>.nutrition-row,#report .record-shared-summary .nutrition-focus .pfc-summary-grid>.nutrition-row{display:flex;flex-direction:column;align-items:stretch;gap:4px;min-width:0}
#home .nutrition-focus .pfc-summary-grid b,#report .record-shared-summary .nutrition-focus .pfc-summary-grid b{font-size:12px;line-height:1.5;min-height:var(--macro-heading-height,18px)}
#home .nutrition-focus .pfc-summary-grid strong,#report .record-shared-summary .nutrition-focus .pfc-summary-grid strong{font-size:24px;line-height:1.2;text-align:left;margin:2px 0}
#home .nutrition-focus .pfc-summary-grid .macro-composition,#report .record-shared-summary .nutrition-focus .macro-composition{font-size:12px;line-height:1.5;order:3}
#home .nutrition-focus .pfc-summary-grid .nutrition-target,#report .record-shared-summary .nutrition-focus .pfc-summary-grid .nutrition-target{font-size:12px;line-height:1.5;text-align:left;order:2}
#home .nutrition-focus .pfc-summary-grid progress,#report .record-shared-summary .nutrition-focus .pfc-summary-grid progress{width:100%;height:6px;margin:5px 0;order:4;flex:none}
#home .nutrition-focus .pfc-summary-grid .nutrition-partial,#report .record-shared-summary .nutrition-focus .pfc-summary-grid .nutrition-partial{font-size:12px;order:5}
#home .nutrition-focus .pfc-summary-grid .nutrition-comparison,#report .record-shared-summary .nutrition-focus .pfc-summary-grid .nutrition-comparison{order:4;font-size:12px}
.nutrition-extra-notes>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-size:12px;color:var(--muted)}
.nutrition-extra-notes>summary::before{content:'›';font-size:17px;margin-right:6px}
.nutrition-extra-notes[open]>summary::before{transform:rotate(90deg)}
.nutrition-extra-notes p{font-size:12px;line-height:1.6;margin:4px 0}
#home #home-recent{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x proximity;padding:4px 0 8px}
#home #home-recent .recent-meal{display:flex;align-items:center;gap:10px;flex:0 0 225px;max-width:85%;min-height:76px;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:18px;text-align:left;scroll-snap-align:start;white-space:normal}
#home .meal-mini-photo{display:grid;place-items:center;width:52px;height:52px;flex:none;overflow:hidden;border-radius:13px;background:var(--soft)}
#home .meal-mini-photo svg{width:22px;height:22px;fill:none;stroke:var(--muted);stroke-width:1.7}
#home .meal-mini-photo img{width:100%;height:100%;object-fit:cover}
#home .recent-meal-copy{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
#home .recent-meal-copy b{font-size:13px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#home .recent-meal-copy small{font-size:11px;color:var(--muted);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#home .recent-meal-add{font-size:21px;color:var(--brand);flex:none}
#home .home-meal-row{grid-template-columns:60px minmax(0,1fr) auto;gap:12px;min-height:84px}
#home .home-meal-thumb{width:60px;height:60px;border-radius:15px}
#home .recent-meal,#home .home-meal-row{transition:transform .1s ease,background-color .1s ease}
#home .recent-meal:active,#home .home-meal-row:active{transform:scale(.985);background:var(--soft)}
@media(max-width:359px){#home .nutrition-focus .pfc-summary-grid,#report .record-shared-summary .nutrition-focus .pfc-summary-grid{gap:8px}#home .nutrition-focus .pfc-summary-grid strong,#report .record-shared-summary .nutrition-focus .pfc-summary-grid strong{font-size:21px}}
@media(prefers-reduced-motion:reduce){#home .recent-meal,#home .home-meal-row{transition:none}#home .recent-meal:active,#home .home-meal-row:active{transform:none}#report .record-target-notice>summary>span:first-child::before{transition:none}}
#report .record-target-notice>summary:focus-visible,.nutrition-extra-notes>summary:focus-visible{outline:2px solid var(--brand);outline-offset:3px;border-radius:6px}
#report .record-shared-summary .nutrition-focus progress{appearance:none;border:0;border-radius:8px;overflow:hidden;background:var(--line)}
#report .record-shared-summary .nutrition-focus progress::-webkit-progress-bar{background:var(--line);border-radius:8px}
#report .record-shared-summary .nutrition-focus progress::-webkit-progress-value{background:var(--brand);border-radius:8px}
#report .record-shared-summary .nutrition-focus [data-macro=fat_g] progress::-webkit-progress-value{background:#756959}
#report .record-shared-summary .nutrition-focus [data-macro=carbs_g] progress::-webkit-progress-value{background:#4F7089}
#report .record-shared-summary .nutrition-focus progress::-moz-progress-bar{background:var(--brand);border-radius:8px}
#report .record-shared-summary .nutrition-focus [data-macro=fat_g] progress::-moz-progress-bar{background:#756959}
#report .record-shared-summary .nutrition-focus [data-macro=carbs_g] progress::-moz-progress-bar{background:#4F7089}

/* FA01–03/12: one primary quantity, a compact honest projection, then meal photos. */
#home[data-layout=v2] #today-hero #today-balance[data-density=readable]{background:var(--surface);border-color:var(--line);padding:16px!important;gap:8px;border-radius:22px}
#home #today-balance[data-density=readable] .intake-focus-number{font-size:40px;letter-spacing:-.025em;white-space:nowrap}
#home #today-balance[data-density=readable] .intake-focus-target{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 5px;font-size:12px;line-height:1.6;color:var(--muted)}
#home #today-balance[data-density=readable] .intake-focus-target b{font-size:14px;white-space:nowrap}
#home #today-balance[data-density=readable] .intake-focus-ring{width:76px;height:76px;color:var(--brand)}

#home[data-layout=v2] #today-hero #today-balance[data-density=readable] .today-balance-main{padding-top:9px;gap:5px 10px;flex-wrap:wrap}
#home[data-layout=v2] #today-hero #today-balance[data-density=readable] .today-balance-value{font-size:16px!important;white-space:nowrap}
#home[data-layout=v2] #today-hero #today-balance[data-density=readable] .today-balance-label{font-size:11px!important;line-height:1.5}
#home[data-layout=v2] #today-hero #today-balance[data-density=readable] .today-energy-io{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin:0;padding:0}
#home #today-balance[data-density=readable] .today-energy-io small{font-size:11px!important}
#home #today-balance[data-density=readable] .today-energy-io>b{font-size:13px!important;white-space:nowrap}
#home #today-balance[data-density=readable] .today-focus-footer .today-balance-status{padding:0;background:none;font-size:11px!important}
#home #today-balance[data-density=readable] .today-focus-footer{gap:5px 10px;flex-wrap:wrap}
#home #today-hero #home-complete-day{align-self:flex-end;width:auto;background:transparent!important;border:0;min-height:44px;margin:0!important}
#home #today-nutrition .nutrition-ratio-method{margin-top:4px}
#home #today-nutrition .nutrition-ratio-method>summary{min-height:36px}
.nutrition-focus>.pfc-ratio-label,.nutrition-focus>.pfc-ratio-bar{display:none}
#home .nutrition-focus .pfc-summary-grid>.nutrition-row,#report .nutrition-focus .pfc-summary-grid>.nutrition-row,#report .record-shared-summary .nutrition-focus .pfc-summary-grid>.nutrition-row{padding:12px 10px;background:var(--surface);border-radius:14px;gap:2px}
#home .nutrition-focus .pfc-summary-grid strong,#report .nutrition-focus .pfc-summary-grid strong{font-size:23px;white-space:nowrap;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
#home .nutrition-focus .pfc-summary-grid b,#report .nutrition-focus .pfc-summary-grid b{overflow-wrap:anywhere}
.nutrition-focus .mineral-summary-grid .nutrition-row strong{white-space:nowrap;font-variant-numeric:tabular-nums}
.nutrition-set-targets{min-height:44px;font-size:12px;padding:4px 0;margin:0}
#home #today-energy-extra{margin-top:12px;border-top:1px solid var(--line);padding-top:4px}
#home .daily-meals{margin-top:12px}
#home .daily-meals .section-head{margin-bottom:4px}
#home .nutrition-focus .nutrition-ratio-method p{font-size:12px}
@media(max-width:359px){#home #today-balance[data-density=readable] .intake-focus-number{font-size:35px}#home .nutrition-focus .pfc-summary-grid strong,#report .nutrition-focus .pfc-summary-grid strong{font-size:20px}}

#home .today-nutrition-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 8px}
#home .today-nutrition-head h3{font-size:16px;margin:0;line-height:1.4}
#home .today-nutrition-head small{font-size:11px;color:var(--muted)}
#home .today-nutrition-head #home-complete-day{width:auto;min-height:44px;margin:0!important;padding:8px 4px!important;font-size:11px;background:transparent!important;border:0;white-space:normal;max-width:140px}
#home #today-nutrition .nutrition-overview{margin-top:0}
#home[data-layout=v2] #today-hero #today-balance[data-density=readable]{padding:14px 16px!important;gap:6px}

.nutrition-summary-footer{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:0 12px}
.nutrition-summary-footer>.nutrition-ratio-method{margin:0!important;flex:1;min-width:0}
.nutrition-summary-footer:has(>.nutrition-ratio-method[open]){display:block}
#home .nutrition-summary-footer .nutrition-ratio-method>summary{min-height:44px}
#home .nutrition-focus .mineral-summary-grid .nutrition-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;align-items:baseline}
#home .nutrition-focus .mineral-summary-grid .nutrition-row strong{font-size:17px;margin:0}
#home .nutrition-focus .mineral-summary-grid .nutrition-row small{grid-column:1/-1;line-height:1.5}
#home .nutrition-focus .mineral-summary-grid{gap:8px;padding-top:8px;margin-top:8px}
#home .today-quick{margin-bottom:4px}
#home .navigation-tabs{margin-bottom:8px}

/* A following consultation control must yield while it would cover nutrient values. */
.app[data-screen=home] .ai-fab.is-covering-metric{opacity:0!important;pointer-events:none!important}
.component-factors{margin:6px 0 0;gap:4px}.component-factors button{min-height:44px;padding:6px 10px;font-size:12px}

#home #meal-next{border:1px solid var(--line);background:var(--surface);padding:12px 14px;border-radius:16px;gap:6px 10px}
#home #meal-next .journey-food{font-size:12px;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#home #meal-next .helper{flex:1 1 100%;font-size:12px}
#home #meal-next .primary{width:auto;font-size:12px;padding:8px 12px}#home #meal-next .check-row{font-size:12px}
.sheet-again .text-button{min-height:44px}.sheet-day summary{cursor:pointer;min-height:44px;display:flex;align-items:center;margin:0}
.sheet-day[open] summary{margin-bottom:6px}.sheet-day{margin-top:12px!important}.sheet-cancel.primary{width:100%;margin-bottom:8px;min-height:48px}

@media(max-width:359px){#home #today-balance[data-density=readable] .intake-focus-ring{width:66px;height:66px}.intake-progress-percent{font-size:18px}.intake-progress-label{font-size:9px}}

/* Brief feedback is about completing the record, never a nutrition/health score. */
.meal-result-enter{animation:meal-result-enter 280ms cubic-bezier(.2,.7,.2,1) both}
@keyframes meal-result-enter{from{opacity:.3;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
.record-success-enter{position:relative;animation:record-success-enter 420ms cubic-bezier(.2,.8,.2,1) both}
.record-success-enter::after{content:"";position:absolute;inset:-7px;border:2px solid var(--brand);border-radius:50%;animation:record-success-ripple 650ms ease-out both;pointer-events:none}
@keyframes record-success-enter{0%{opacity:0;transform:scale(.6)}65%{opacity:1;transform:scale(1.12)}100%{opacity:1;transform:scale(1)}}
@keyframes record-success-ripple{from{opacity:.45;transform:scale(.65)}to{opacity:0;transform:scale(1.4)}}
@media(prefers-reduced-motion:reduce){.meal-result-enter,.record-success-enter,.record-success-enter::after{animation:none}.record-success-enter::after{display:none}}

.ql-capture.meal-request-pending:has(#meal-photo-state:not([hidden])) #meal-description,.ql-capture.meal-request-pending:has(#meal-photo-state:not([hidden])) .mc-actions{display:none}
.meal-is-reading .meal-scan-overlay::after{will-change:transform}
/* A background update waits until the meal sheet is dismissed, so the progress is actually seen. */
body:has(dialog[open]) .intake-focus-ring[data-animate=true] .intake-progress-fill{animation-play-state:paused}

/* A consistent, short interaction language across entry, editing and review. */
.navigation-tabs button,.record-summary-scope button,.ql-tile,.ql-photo-choice,.sheet-chips button{transition:transform 140ms ease,background-color 180ms ease,color 180ms ease}
.navigation-tabs button:active,.record-summary-scope button:active,.ql-tile:active,.ql-photo-choice:active,.sheet-chips button:active{transform:scale(.97)}
.nutrient-fill{transform-origin:center bottom}
.meal-read-cancel{align-self:center;min-height:44px;font-size:13px;margin:0 auto 8px}
#home[data-layout=v2] #home-recent{display:grid;grid-template-columns:minmax(0,1fr);gap:0;overflow:visible;padding:0;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
#home[data-layout=v2] #home-recent .recent-meal{max-width:none;width:100%;border:0;border-radius:0;background:transparent;padding:10px 12px;min-height:76px;scroll-snap-align:none;white-space:normal;display:flex;align-items:center;gap:10px}
#home[data-layout=v2] #home-recent .recent-meal+.recent-meal{border-top:1px solid var(--line)}
#home[data-layout=v2] #home-recent .recent-meal:first-child{border-radius:18px 18px 0 0}#home[data-layout=v2] #home-recent .recent-meal:last-child{border-radius:0 0 18px 18px}
#home #today-energy-extra .nutrition-ratio-method>summary,#home #today-energy-extra .nutrition-extra-notes>summary{min-height:44px}
.sheet-components .sheet-component-row{display:block;padding:0;border:0;border-bottom:1px solid var(--line);border-radius:0}
.component-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;padding:12px 0;min-height:66px;cursor:pointer;list-style:none}
.component-heading::-webkit-details-marker{display:none}
.component-heading>b{font-size:14px;line-height:1.5;grid-column:1}.component-amount{font-size:12px;color:var(--muted);grid-column:1;line-height:1.5}
.component-energy{grid-column:2;grid-row:1/3;align-self:center;font-size:14px;white-space:nowrap;display:flex;align-items:center;gap:8px}
.component-energy::after{content:'›';font-size:20px;font-weight:400;color:var(--muted);transition:transform 180ms ease}.sheet-component-row[open] .component-energy::after{transform:rotate(90deg)}
.sheet-components .sheet-component-row>label{display:flex;gap:8px;align-items:center;padding:4px 0}.sheet-components .sheet-component-row input{width:110px;max-width:100%;min-height:44px}
.sheet-components .component-factors{display:flex;flex-wrap:wrap;margin:4px 0 14px}
.component-heading:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:8px}
@media(prefers-reduced-motion:reduce){.navigation-tabs button,.record-summary-scope button,.ql-tile,.ql-photo-choice,.sheet-chips button,.component-energy::after{transition:none}.navigation-tabs button:active,.record-summary-scope button:active,.ql-tile:active,.ql-photo-choice:active,.sheet-chips button:active{transform:none}}
.ql-grid .ql-tile[data-log=label]{grid-column:1/-1;min-height:62px;display:flex;align-items:center;gap:12px;background:var(--surface)}
.ql-grid .ql-tile[data-log=label] .ql-tile-icon{margin:0}.ql-grid .ql-tile[data-log=label] .ql-tile-text{display:flex;flex-direction:column;gap:2px}
.ql-grid .ql-tile[data-log=label] .ql-tile-text small{display:block;font-size:11px;color:var(--muted);font-weight:400}
/* Pending capture is a focused photo stage; source choices return immediately on cancel. */
.ql-sheet:has(.meal-request-pending) .ql-photo-choices,.ql-sheet:has(.meal-request-pending) .ql-mode-help,.ql-sheet:has(.meal-request-pending) .ql-mode-back,.ql-sheet:has(.meal-request-pending) .ql-primary-methods{display:none}
.ql-capture.meal-request-pending #meal-photo-preview{max-height:38dvh;width:100%;object-fit:contain}
.ql-capture.meal-request-pending #meal-photo-info,.ql-capture.meal-request-pending #meal-photo-remove{display:none}
.ql-capture.meal-request-pending #meal-photo-state{margin:6px 0}
.ql-capture.meal-request-pending .meal-reading-status{justify-content:center;background:transparent;font-size:15px;margin:4px 0}

#home .home-meal-value{display:flex;flex-direction:column;align-items:flex-end;gap:2px;max-width:none}#home .home-meal-value>strong,#home .home-meal-value>small{white-space:nowrap}#home .home-meal-value>strong{font-size:14px}#home .home-meal-value>small{font-size:11px}

/* Shared daily charts: one scale, day selection and spacing across energy/nutrients/workouts. */
.nutrient-trend{--nutrient-tone:#638c72;padding:16px 12px 12px;border-radius:20px;overflow:hidden}
.nutrient-trend[data-nutrient=fat_g]{--nutrient-tone:#b28a4e}
.nutrient-trend[data-nutrient=carbs_g]{--nutrient-tone:#6596b9}
.nutrient-trend[data-nutrient=salt_g]{--nutrient-tone:#9b829f}
.nutrient-trend[data-nutrient=potassium_mg]{--nutrient-tone:#5a9894}
.nutrient-trend[data-nutrient=burn]{--nutrient-tone:#7b9c72}
.nutrient-trend[data-nutrient=intake]{--nutrient-tone:#be8865}
.nutrient-trend[data-nutrient=minutes]{--nutrient-tone:#9a89b4}
.nutrient-scale{margin-bottom:12px;font-size:12px;gap:6px;flex-wrap:wrap}
.nutrient-scale small{font-size:11px}
.nutrient-scale small::before{display:none}
.nutrient-trend:has(.nutrient-target-line) .nutrient-scale small::before{display:inline-block}
.nutrient-columns{gap:4px;padding-top:0}
.nutrient-day{gap:4px;padding:4px 2px 6px;border-radius:12px;min-height:44px}
.nutrient-day[aria-pressed=true]{outline:none;background:#edf2e8;box-shadow:inset 0 0 0 1px #bfd0b7}
.nutrient-day:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
.nutrient-amount{font-size:11px;line-height:20px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
.nutrient-column{height:128px;border-bottom:0;display:block;background:linear-gradient(to bottom,transparent calc(50% - .5px),#e9ede6 calc(50% - .5px),#e9ede6 calc(50% + .5px),transparent calc(50% + .5px))}
.nutrient-fill{position:absolute;left:50%;translate:-50% 0;height:max(2px,var(--fill));width:54%;max-width:28px;border-radius:6px 6px 2px 2px}
.nutrient-day.is-partial .nutrient-fill{opacity:.48}
.nutrient-fill[data-balance-tone=deficit]{background:#acc99a;border:1px solid #71956a;border-radius:2px 2px 6px 6px}
.nutrient-fill[data-balance-tone=surplus]{background:#354f41}
.nutrient-zero-line,.nutrient-target-line{position:absolute;left:0;right:0;z-index:2;pointer-events:none;border-top:1px solid #cbd4c6}
.nutrient-target-line{border-top:1px dashed #778570}
.nutrient-date{font-size:10px;line-height:20px;font-variant-numeric:tabular-nums;white-space:nowrap}
.nutrient-chart-hint{font-size:11px;line-height:1.5;margin-top:8px}
.nutrient-columns.is-month .nutrient-day{padding-inline:0}
.nutrient-columns.is-month .nutrient-day[aria-pressed=true] .nutrient-amount{visibility:visible;position:relative;z-index:3;background:var(--surface);border-radius:4px}
.nutrition-focus [data-macro=fat_g]{color:#80673f}
.nutrition-focus [data-macro=carbs_g]{color:#487494}
.nutrition-focus .nutrition-row strong{color:var(--ink)}
#home .nutrition-focus [data-macro=fat_g] progress::-webkit-progress-value,#report .nutrition-focus [data-macro=fat_g] progress::-webkit-progress-value{background:#b28a4e}
#home .nutrition-focus [data-macro=carbs_g] progress::-webkit-progress-value,#report .nutrition-focus [data-macro=carbs_g] progress::-webkit-progress-value{background:#6596b9}
#home .nutrition-focus [data-macro=fat_g] progress::-moz-progress-bar,#report .nutrition-focus [data-macro=fat_g] progress::-moz-progress-bar{background:#b28a4e}
#home .nutrition-focus [data-macro=carbs_g] progress::-moz-progress-bar,#report .nutrition-focus [data-macro=carbs_g] progress::-moz-progress-bar{background:#6596b9}
@media(max-width:359px){.nutrient-trend{padding:12px 8px}.nutrient-columns{gap:2px}.nutrient-amount{font-size:10px}.nutrient-date{font-size:9px}#home .nutrition-focus .pfc-summary-grid>.nutrition-row,#report .record-shared-summary .nutrition-focus .pfc-summary-grid>.nutrition-row{padding:10px 8px}}

.nutrient-fill[data-balance-tone=deficit]{transform-origin:center top}
/* Mineral labels must not squeeze into isolated Japanese characters. */
#home .nutrition-focus .mineral-summary-grid .nutrition-row,#report .nutrition-focus .mineral-summary-grid .nutrition-row{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;padding:0}
#home .nutrition-focus .mineral-summary-grid .nutrition-row b,#report .nutrition-focus .mineral-summary-grid .nutrition-row b{font-size:12px;line-height:1.5;white-space:nowrap}
#home .nutrition-focus .mineral-summary-grid .nutrition-row strong,#report .nutrition-focus .mineral-summary-grid .nutrition-row strong{font-size:19px;line-height:1.4;margin:0}
#home .nutrition-focus .mineral-summary-grid .nutrition-row small,#report .nutrition-focus .mineral-summary-grid .nutrition-row small{font-size:11px;line-height:1.5}
#home .nutrition-focus [data-macro=fat_g] b,#report .nutrition-focus [data-macro=fat_g] b{color:#80673f}
#home .nutrition-focus [data-macro=carbs_g] b,#report .nutrition-focus [data-macro=carbs_g] b{color:#487494}
#report .record-shared-summary .nutrition-focus [data-macro=fat_g] progress::-webkit-progress-value{background:#b28a4e}
#report .record-shared-summary .nutrition-focus [data-macro=carbs_g] progress::-webkit-progress-value{background:#6596b9}
#report .record-shared-summary .nutrition-focus [data-macro=fat_g] progress::-moz-progress-bar{background:#b28a4e}
#report .record-shared-summary .nutrition-focus [data-macro=carbs_g] progress::-moz-progress-bar{background:#6596b9}
/* Match baselines when translated nutrient names require a second line. */
@media(max-width:600px){#home:lang(th) .nutrition-focus .pfc-summary-grid b,#report:lang(th) .nutrition-focus .pfc-summary-grid b,#home:lang(en) .nutrition-focus .pfc-summary-grid b,#report:lang(en) .nutrition-focus .pfc-summary-grid b{min-height:36px}#home:lang(th) .nutrition-focus .pfc-summary-grid .nutrition-target,#report:lang(th) .nutrition-focus .pfc-summary-grid .nutrition-target{min-height:36px}}
@media(max-width:359px){#home:lang(th) .nutrition-focus .pfc-summary-grid b,#report:lang(th) .nutrition-focus .pfc-summary-grid b{min-height:54px}}
@media(max-width:600px){#report:lang(en) .progress-tabs button{white-space:nowrap;overflow-wrap:normal;padding-inline:2px;font-size:11px}}
@media(max-width:359px){#home .nutrition-focus .pfc-summary-grid b,#report .nutrition-focus .pfc-summary-grid b{min-height:36px}#report .progress-tabs{grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}#report .progress-tabs button{min-width:0;padding-inline:2px}}

@media(max-width:359px){.nutrition-focus .pfc-summary-grid{--macro-heading-height:36px}}
