@font-face { font-family: Manrope; src: url("/manrope.ttf") format("truetype"); font-style: normal; font-weight: 200 800; font-display: swap; }
:root {
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sage: #cfd9c2;
  --ink: #233b2d;
  --forest: #315540;
  --muted: #505e50;
  --paper: #fffdf5;
  --surface: #f7f6ed;
  --soft: #e8edde;
  --line: #d4dac9;
  --field-line: #a5b49d;
  --orange: #fd590e;
  --rust: #983d22;
  --display-font: Georgia, "Times New Roman", serif;
  --section-type: 700 clamp(1.22rem, 4.7vw, 1.6rem)/1.16 var(--display-font);
  --dialog-type: 700 clamp(1.5rem, 5vw, 1.85rem)/1.16 var(--display-font);
  --control-type: .9rem;
  --control-height: 44px;
  --control-radius: 12px;
  --card-radius: 20px;
  --card-padding: clamp(15px, 4vw, 24px);
  --section-gap: 16px;
  --icon-size: 20px;
  --icon-small: 16px;
  --app-width: 760px;
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
}
* { box-sizing: border-box; }
.auth-buttons { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:16px 0 12px; }
.auth-profile { padding:var(--card-padding); margin-top:var(--section-gap); }
.auth-profile p, #login-dialog p { line-height:1.5; margin:8px 0 14px; }
.auth-profile p, #profile-name { overflow-wrap:anywhere; }
.auth-profile form { display:grid; gap:8px; margin-top:16px; }
dialog {
  width:min(var(--dialog-width,480px),calc(100% - 24px)); max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px);
  overflow:auto; overscroll-behavior:contain; padding:var(--card-padding); border:1px solid var(--line);
  border-radius:var(--card-radius); color:var(--ink); background:var(--paper);
}
dialog::backdrop { background:rgb(27 44 27 / .48); }
dialog > header { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:12px; }
dialog > header > h2 { min-width:0; margin:0; font:var(--dialog-type); letter-spacing:-.03em; overflow-wrap:anywhere; }
dialog > header > .text-button { flex:none; }
#login-dialog, #email-dialog { --dialog-width:410px; }
#flow-code { display:block; font-size:1.55rem; letter-spacing:.09em; color:var(--forest); white-space:nowrap; }
#open-provider { display:inline-flex; align-items:center; text-decoration:none; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
button, input, textarea, select { font: inherit; }
:is(input, textarea, select):not(:where([type=checkbox], [type=radio], [type=file], [type=hidden])) {
  min-width:0; max-width:100%; min-height:var(--control-height); padding:9px 12px; border:1px solid var(--field-line);
  border-radius:var(--control-radius); background:var(--paper); color:var(--ink); font-size:max(1rem,16px);
}
input:is([type=checkbox],[type=radio]) { accent-color:var(--forest); }
button, .file-label, a { -webkit-tap-highlight-color: transparent; }
button, .file-label { cursor: pointer; }
a { color: var(--forest); text-underline-offset: .16em; }
:focus-visible { outline: 3px solid #88501d; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .58; }
.app-page { scrollbar-gutter:stable; }
@supports not (scrollbar-gutter:stable) { .app-page { overflow-y:scroll; } }
.shell { --gutter:clamp(16px,4vw,32px); max-width:var(--app-width); min-height:100vh; margin:auto; padding:env(safe-area-inset-top,0px) max(var(--gutter),env(safe-area-inset-right,0px)) 0 max(var(--gutter),env(safe-area-inset-left,0px)); }
.topbar { min-height:60px; padding-top:4px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.brand { display:inline-flex; min-height:var(--control-height); align-items:center; border-radius:8px; }
.brand img { display:block; width:48px; height:auto; }
.diary-control { display:inline-flex; gap:7px; align-items:center; justify-content:center; min-height:var(--control-height); padding:5px 8px; border:0; border-radius:var(--control-radius); background:transparent; color:var(--forest); font-weight:700; font-size:var(--control-type); }
.diary-control:hover { background:var(--soft); }
.dots-icon { font-size:.72rem; letter-spacing:1.5px; }
#week-toggle { border:1px solid var(--line); padding-inline:11px; border-radius:12px; }
.calendar-icon { position:relative; display:inline-block; width:15px; height:14px; border:1.5px solid currentColor; border-radius:3px; background:linear-gradient(to bottom, transparent 3px,currentColor 3px,currentColor 4px,transparent 4px); }
.calendar-icon::before { content:""; position:absolute; left:2px; right:2px; top:-3px; height:4px; border-inline:1.5px solid currentColor; }
.calendar-icon::after { content:""; position:absolute; top:6px; left:3px; width:2px; height:2px; background:currentColor; box-shadow:4px 0 currentColor,0 3px currentColor,4px 3px currentColor; }
.screen { min-width:0; padding:8px 0 calc(90px + env(safe-area-inset-bottom,0px)); }
h1, h2, p { margin: 0; }
h1 { font-family:var(--display-font); font-weight:700; font-size:clamp(2.02rem,7.6vw,3rem); line-height:1.09; letter-spacing:-.047em; color:var(--ink); overflow-wrap:anywhere; }
h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.045em; }
.muted { color: var(--muted); margin-top: 8px; line-height: 1.45; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--card-radius); }
.gate { padding: 24px; margin-top: 12px; }
.gate { max-width:520px; margin-inline:auto; overflow:hidden; }
.gate-cover { display:block; width:calc(100% + 48px); height:auto; margin:-24px -24px 20px; }
.gate .primary, .gate .secondary { margin-top: 18px; display: inline-flex; text-decoration: none; }
.day-heading, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.day-heading { margin:0 0 8px; }
.day-heading > div { min-width: 0; }
.day-heading h1 { overflow-wrap: anywhere; }
.diary-date { position:relative; display:inline-flex; align-items:center; gap:6px; min-height:32px; font-size:.89rem; color:var(--muted); cursor:pointer; border-radius:6px; }
.diary-date:focus-within { outline:2px solid #88501d; outline-offset:2px; }
.diary-date input[type=date] { position:absolute; top:50%; left:0; transform:translateY(-50%); opacity:0; width:100%; height:44px; padding:0; cursor:pointer; }
.diary-date input::-webkit-calendar-picker-indicator { position:absolute; inset:0; width:100%; height:100%; cursor:pointer; }
.date-chevron { width:6px; height:6px; border:solid currentColor; border-width:0 1px 1px 0; transform:translateY(-2px) rotate(45deg); }
.date-control { display: grid; gap: 3px; font-size: .875rem; font-weight: 740; flex: none; color: var(--ink); }
input[type=date] { width:145px; }
.week { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; margin:0 0 14px; }
.week button { position:relative; display:grid; place-content:center; justify-items:center; gap:1px; min-width:0; min-height:46px; padding:4px 0; border:0; border-radius:11px; background:transparent; color:var(--muted); }
.week button:enabled:hover { background:var(--soft); }
.week button[aria-pressed=true], .week button[aria-pressed=true]:hover { background:var(--forest); color:#fffdf0; }
.week button:disabled { opacity: .53; cursor: default; }
.weekday { font-size:.73rem; }
.day-number { font-weight:760; font-size:.94rem; font-variant-numeric:tabular-nums; }
.status-mark { position:absolute; top:2px; right:3px; color:var(--rust); font-size:.7rem; line-height:1; }
.week button[aria-pressed=true] .status-mark { color:inherit; }
.balance, .composer-fields, .goal-form, .stats { padding:var(--card-padding); }
.text-button { min-height:var(--control-height); padding:4px 8px; background:transparent; border:0; border-radius:var(--control-radius); color:var(--forest); font-size:var(--control-type); font-weight:700; }
.text-button:hover { text-decoration: underline; }
.progress-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px 14px; }
.nutrient:first-child { grid-column: 1/-1; padding-bottom: 14px; border-bottom: 1px solid #d5ddca; }
.nutrient .label { display: block; font-size: .875rem; color: var(--muted); }
.nutrient .amount { margin: 3px 0; font-size: .95rem; font-weight: 760; font-variant-numeric: tabular-nums; }
.nutrient:first-child .amount { font-size: clamp(1.65rem,7vw,2.3rem); line-height: 1.2; letter-spacing: -.05em; }
.nutrient .goal { font-weight: 520; color: var(--muted); }
.nutrient[data-over=true] .value, .nutrient .over { color: var(--rust); }
.nutrient .over { font-size: .875rem; }
progress { width: 100%; height: 8px; appearance: none; display: block; border: 0; border-radius: 20px; color: var(--forest); background: #d9e1cf; margin: 8px 0 0; }
progress::-webkit-progress-bar { border-radius: 20px; background: #d9e1cf; }
progress::-webkit-progress-value { border-radius: 20px; background: #536e4d; }
progress::-moz-progress-bar { border-radius: 20px; background: #536e4d; }
.nutrient[data-over=true] progress::-webkit-progress-value { background: #b44b28; }
.nutrient[data-over=true] progress::-moz-progress-bar { background: #b44b28; }
.diary-balance { border:1px solid var(--line); border-radius:var(--card-radius); overflow:hidden; background:var(--surface); }
.diary-balance .progress-list { gap:0; }
.calorie-balance { grid-column:1/-1; color:#233c2b; }
.calorie-cover { display:grid; justify-items:start; align-content:center; gap:6px; min-height:124px; padding:16px 18px; background-color:#dce5cf; background-image:linear-gradient(90deg,#dce5cf 2%,#dce5cff5 34%,#dce5cfbf 52%,#dce5cf00 78%),url("/header.webp"); background-position:center, right 46%; background-size:cover; }
.calorie-cover .balance-label { font:680 .9rem/1.25 Manrope,system-ui,sans-serif; letter-spacing:0; }
.balance-number { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; font:600 clamp(2.7rem,10vw,3.55rem)/.98 Georgia,serif; letter-spacing:-.055em; font-variant-numeric:lining-nums tabular-nums; }
.balance-number small { font:660 .95rem/1 Manrope,system-ui,sans-serif; letter-spacing:0; }
.balance-note, .balance-goal { max-width:75%; font-size:.8rem; font-weight:670; line-height:1.45; }
.balance-goal { padding:5px 0; border:0; background:transparent; color:inherit; text-decoration:underline; text-underline-offset:.16em; }
.calorie-balance progress { margin:0; height:5px; border-radius:0; }
.diary-balance progress::-webkit-progress-value { background:var(--forest); }
.diary-balance progress::-moz-progress-bar { background:var(--forest); }
.diary-balance [data-over=true] progress::-webkit-progress-value { background:var(--rust); }
.diary-balance [data-over=true] progress::-moz-progress-bar { background:var(--rust); }
.calorie-balance[data-over=true] .balance-label { color:#863b22; }
.diary-balance .nutrient { padding:12px clamp(7px,2.8vw,16px) 14px; }
.diary-balance .nutrient .label, .diary-balance .nutrient .over { font-size:.78rem; }
.diary-balance .nutrient .amount { display:flex; font-size:.91rem; line-height:1.25; margin:4px 0; }
.diary-balance .nutrient .goal { font-size:.83rem; }
.diary-balance .nutrient progress { height:4px; margin:2px 0 0; }
.diary-balance .nutrient .over { margin-top:3px; }
.diary-heading { flex-wrap:wrap; margin:19px 0 8px; }
.diary-heading h2, .screen > h2, .card > h2 { font:var(--section-type); letter-spacing:-.03em; }
.primary, .secondary { border:1px solid transparent; border-radius:var(--control-radius); padding:9px 12px; min-height:var(--control-height); font-size:var(--control-type); font-weight:720; line-height:1.3; }
.primary { background: var(--forest); color: var(--paper); }
.primary:hover { background: #2d432f; }
.secondary { background: var(--soft); color: var(--ink); }
.secondary:hover { background: #dbe5d0; }
.compact { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.glyph { display:inline-block; flex:none; width:var(--icon-size); height:var(--icon-size); background:currentColor; -webkit-mask:url("/ui-icons.png") var(--pos,0%) center / 1100% 100% no-repeat; mask:url("/ui-icons.png") var(--pos,0%) center / 1100% 100% no-repeat; }
[data-symbol=chat] { --pos:10%; } [data-symbol=profile] { --pos:20%; } [data-symbol=stats] { --pos:30%; }
[data-symbol=breakfast] { --pos:40%; } [data-symbol=lunch] { --pos:50%; } [data-symbol=dinner] { --pos:60%; } [data-symbol=snack] { --pos:70%; }
[data-symbol=camera] { --pos:80%; } [data-symbol=plus] { --pos:90%; }
.compact .glyph { width:var(--icon-small); height:var(--icon-small); }
.meals { display:grid; border-top:1px solid var(--line); }
.meal-card { border-bottom:1px solid var(--line); }
.meal-card summary { display:flex; align-items:center; gap:10px; min-height:47px; padding:7px 4px; border-radius:6px; list-style:none; cursor:pointer; }
.meal-card summary::-webkit-details-marker { display: none; }
.meal-card summary:hover { background:var(--soft); }
.meal-card summary::after, .diary-tools-list button::after { content:""; width:7px; height:7px; flex:none; border:solid var(--muted); border-width:0 1.5px 1.5px 0; transform:rotate(-45deg); }
.meal-card summary::after { transform:translateY(-2px) rotate(45deg); }
.meal-card[open] summary::after { transform:translateY(2px) rotate(225deg); }
.meal-icon { display:grid; place-items:center; flex:none; width:22px; height:26px; color:var(--muted); }
.meal-icon[data-icon="2"] .glyph { width:17px; height:17px; border-radius:50%; -webkit-mask:radial-gradient(circle at 72% 24%,transparent 44%,#000 48%); mask:radial-gradient(circle at 72% 24%,transparent 44%,#000 48%); }
.meal-title { flex:1; min-width:0; overflow-wrap:anywhere; font-size:.97rem; font-weight:700; }
.meal-energy { color:var(--muted); font-size:.82rem; font-variant-numeric:tabular-nums; }
.meal-content { padding:0 4px 10px 32px; }
.entry { display: grid; gap: 7px; border-top: 1px solid var(--line); padding: 10px 0; }
.entry-meta { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .875rem; }
.entry-meta button { margin-left: auto; }
.entry ul { margin: 0; padding-left: 20px; }
.entry li { margin: 6px 0; }
.item-meta { color: var(--muted); display: block; font-size: .875rem; }
.navigation {
  position:fixed; inset-inline:0; bottom:0; z-index:5; max-width:var(--app-width); margin-inline:auto;
  display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:4px;
  padding:3px max(8px,env(safe-area-inset-right,0px)) max(8px,env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px));
  background:var(--surface); border-top:1px solid var(--line);
}
.navigation button {
  position:relative; display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  gap:3px; padding:5px 2px; min-width:0; min-height:48px; border:0; border-radius:8px; background:transparent;
  color:var(--muted); font-size:.78rem; font-weight:680; line-height:1.2; overflow-wrap:anywhere;
}
.navigation button[aria-current=page] { color:var(--forest); }
.navigation button[aria-current=page]::before { content:""; position:absolute; top:-3px; left:50%; transform:translateX(-50%); width:24px; height:3px; border-radius:0 0 3px 3px; background:currentColor; }
@media (hover:hover) { .navigation button:hover { background:var(--soft); } }
.notice { background: #f6e7d1; color: #674125; border-radius: 13px; padding: 10px 12px; margin-top: 8px; }
.messages { display:grid; gap:12px; margin:var(--section-gap) 0; }
.messages:empty { display:none; }
.bubble { scroll-margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper); border: 1px solid var(--line); padding: 12px 14px; border-radius: 17px 17px 17px 4px; }
.bubble.mine { background: var(--forest); border-color: var(--forest); color: var(--paper); max-width: 92%; justify-self: end; border-radius: 17px 17px 4px 17px; }
.actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.actions button { text-align: left; }
.composer { display:grid; gap:8px; margin-top:var(--section-gap); }
.composer-fields { container-type:inline-size; min-width:0; }
.composer-fields > label, .goal-form label { font-weight:700; }
.photo-status { margin: 0 0 12px; padding: 16px; background: #f5f7eb; scroll-margin: 12px; }
.photo-status-head { display: flex; gap: 10px; align-items: center; }
.photo-status-head strong { flex: 1; line-height: 1.3; }
.photo-emblem { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px; background: #dce6cf; }
.photo-clock { padding: 3px 9px; border: 1px solid #c2cdb6; border-radius: 20px; color: var(--forest); font-size: .83rem; font-weight: 720; font-variant-numeric: tabular-nums; white-space: nowrap; }
.photo-track { position: relative; margin-top: 15px; overflow: hidden; border-radius: 12px; background: #d9e1cf; }
.photo-track progress { margin: 0; height: 8px; }
.photo-status[data-mode=work] progress { opacity: 0; }
.photo-status[data-mode=work] .photo-track::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 38%; background: var(--forest); border-radius: inherit; animation: photo-scan 1.7s ease-in-out infinite alternate; }
@keyframes photo-scan { to { transform: translateX(163%); } }
@media (prefers-reduced-motion: reduce) { .photo-status[data-mode=work] .photo-track::after { animation: none; left: 31%; } }
.photo-steps { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; list-style: none; padding: 0; margin: 9px 0 0; color: var(--muted); font-size: .81rem; }
.photo-steps li::before { content: "○"; margin-right: 5px; }
.photo-steps li[aria-current=step] { color: var(--forest); font-weight: 800; }
.photo-steps li[aria-current=step]::before { content: "●"; color: #ad440e; }
.photo-steps .done::before { content: "✓"; color: var(--forest); font-weight: 800; }
.photo-status p { color: var(--muted); margin: 11px 0 0; font-size: .86rem; }
.photo-status[data-mode=error] { background: #fbefe1; }
.photo-status[data-mode=error] .photo-track, .photo-status[data-mode=error] .photo-steps { display: none; }
textarea, input[type=number] { width:100%; margin-top:6px; }
textarea { resize: vertical; min-height: 88px; }
.compose-actions { display:grid; align-items:start; gap:10px; margin-top:10px; }
#photo-tools { min-width:0; border:0; padding:0; margin:0; }
.camera-buttons, .attachment { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.photo-sources { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.photo-sources button { flex-direction:column; gap:4px; min-width:0; padding:6px 3px; overflow-wrap:anywhere; }
.gallery-icon { position:relative; display:inline-block; width:var(--icon-small); height:var(--icon-small); border:1.5px solid currentColor; border-radius:3px; overflow:hidden; flex:none; }
.gallery-icon::before { content:""; position:absolute; top:2px; right:2px; width:3px; height:3px; border-radius:50%; background:currentColor; }
.gallery-icon::after { content:""; position:absolute; left:1px; bottom:-4px; width:9px; height:9px; border:1.5px solid currentColor; transform:rotate(45deg); }
@container (min-width:32rem) {
  .compose-actions { grid-template-columns:minmax(0,1fr) auto; }
  .photo-sources button { flex-direction:row; gap:6px; }
}
.attachment { margin-top: 12px; }
.attachment img { object-fit: cover; border: 1px solid var(--line); border-radius: 10px; }
#file-status:not(:empty) { display: block; margin-top: 7px; }
#camera-preview { display: block; width: 100%; max-height: 56vh; max-height: 56dvh; object-fit: contain; background: #1b291b; border-radius: 14px; }
#camera-message { margin: 12px 0; }
.entry-context { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:baseline; padding-bottom:8px; margin-bottom:12px; border-bottom:1px solid var(--line); color:var(--forest); }
#entry-label { display:flex; align-items:baseline; flex-wrap:wrap; gap:2px 9px; }
#entry-label time { font-size:.87rem; white-space:nowrap; }
#clear-context { padding-inline:4px; min-height:44px; }
.entry-review { padding:var(--card-padding); display:grid; gap:var(--section-gap); min-width:0; scroll-margin-top:12px; }
.entry-review fieldset { min-width:0; margin:0; padding:0; border:0; }
.review-form .editor-fields { display:grid; gap:13px; }
.product-row { display:grid; grid-template-columns:minmax(0,1fr); gap:8px 12px; align-items:center; border-bottom:1px solid var(--line); padding:4px 0 12px; }
.product-name { display:flex; gap:8px; align-items:baseline; overflow-wrap:anywhere; }
.include-product, .meal-choice input { accent-color:var(--forest); }
.portion-label { display:grid; gap:3px; font-size:.78rem; font-weight:700; }
.portion-input { width:100%; }
.quantity-editor { display:grid; min-width:0; margin:0; padding:0; border:0; gap:8px; }
.quantity-editor:disabled { opacity:.55; }
.quantity-modes { display:inline-flex; justify-self:start; border:1px solid var(--line); background:var(--soft); padding:3px; border-radius:12px; }
.quantity-modes button { font:inherit; font-size:.86rem; font-weight:700; color:var(--forest); border:0; padding:4px 14px; min-height:36px; background:transparent; border-radius:9px; }
.quantity-modes button[aria-pressed=true] { background:var(--forest); color:white; }
.quantity-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,102px),1fr)); gap:8px; }
.quantity-fields .portion-label { min-width:0; }
.quantity-hint { color:var(--muted); font-size:.86rem; }
.product-amounts,.product-source { grid-column:1 / -1; }
.product-amounts { font-weight:650; }
.product-source,.pack-caption { color:var(--muted); overflow-wrap:anywhere; line-height:1.45; font-size:.85rem; }
.review-total { font-weight:750; }
.entry-review .meal-choices,.recipe-panel .meal-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.meal-choices legend { margin-bottom:7px; font-weight:750; }
.meal-choice { display:flex; align-items:center; gap:6px; min-height:44px; border:1px solid var(--line); border-radius:12px; padding:6px 10px; background:var(--soft); }
.meal-choice:has(input:checked) { background:var(--forest); color:white; }
.product-correction summary { cursor:pointer; font-weight:700; min-height:36px; padding-block:6px; }
.correction-form,.saved-portion { display:flex; align-items:end; flex-wrap:wrap; gap:8px; margin:5px 0 8px; }
.correction-form input { flex:1 1 180px; width:100%; }
.saved-portion label { display:grid; gap:4px; }
.saved-portion { display:grid; padding:9px 0; }
.recipe-panel { display:grid; gap:12px; padding:var(--card-padding); min-width:0; scroll-margin-top:12px; }
.recipe-panel h2 { overflow-wrap:anywhere; }
.recipe-panel .muted,.recipe-field span { line-height:1.45; margin:0; }
.recipe-form,.recipe-field { display:grid; min-width:0; gap:6px; }
.recipe-form { gap:14px; }
.recipe-field span { font-size:.91rem; font-weight:700; }
.recipe-field input,.recipe-field textarea { width:100%; }
.recipe-panel fieldset { min-width:0; padding:0; border:0; margin:0; }
.recipe-summary { padding:12px 14px; border-radius:12px; background:var(--soft); color:var(--forest); }
.recipe-summary p { margin:4px 0; }
.recipe-ingredients { display:grid; gap:5px; list-style:none; padding:0; margin:9px 0 0; font-size:.89rem; }
.recipe-ingredients li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; border-top:1px solid var(--line); padding-top:5px; overflow-wrap:anywhere; }
.recipe-composition summary { padding:6px 0; cursor:pointer; font-weight:700; }
.recipe-link { display:flex; align-items:center; justify-content:space-between; text-align:start; gap:12px; width:100%; min-width:0; min-height:54px; border:1px solid var(--line); border-radius:12px; background:var(--soft); color:var(--forest); padding:10px 14px; font:inherit; overflow-wrap:anywhere; }
.recipe-link span { min-width:0; display:grid; }
.recipe-link small { color:var(--muted); }
.recipe-feedback { color:#7a321e; }
.quick-sources { display:grid; grid-template-columns:minmax(0,1.17fr) minmax(0,.91fr) minmax(0,.98fr); gap:2px; }
.quick-sources button { display:flex; align-items:center; justify-content:center; gap:5px; min-height:46px; min-width:0; padding:4px 0; border:0; border-radius:var(--control-radius); background:transparent; color:var(--forest); font-size:clamp(.74rem,3.1vw,.89rem); font-weight:690; line-height:1.2; overflow-wrap:anywhere; }
.quick-sources button:hover { background:var(--soft); }
.quick-sources button:disabled { opacity:.6; }
.quick-icon, .quick-sources .glyph { display:inline-grid; place-content:center; flex:none; width:var(--icon-small); height:var(--icon-small); }
.quick-icon { font:normal 1.07rem/1 system-ui,sans-serif; }
[data-quick-source=favorites] .quick-icon { color:var(--rust); }
.diary-sources { margin-top:4px; }
.diary-tools-list { display:grid; }
.diary-tools-list button { display:flex; align-items:center; gap:12px; min-height:50px; padding:10px 4px; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--forest); font:680 1rem/1.35 Manrope,system-ui,sans-serif; text-align:left; }
.diary-tools-list button:last-child { border-bottom:0; }
.diary-tools-list button:hover { background:var(--soft); }
.diary-tools-list button::after { margin-left:auto; margin-right:4px; }
.product-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; }
.product-heading > :first-child { min-width:0; overflow-wrap:anywhere; }
.favorite-star { flex:none; display:inline-grid; place-items:center; width:44px; height:44px; padding:0; font-size:1.65rem; line-height:1; color:var(--forest); border:1px solid var(--line); background:var(--paper); border-radius:12px; }
.favorite-labeled { width:auto; padding:7px 10px; font-size:.84rem; font-weight:700; white-space:nowrap; }
@media (max-width:420px) {
  .entry-review .product-heading { align-items:flex-start; flex-direction:column; gap:6px; }
}
.favorite-star[aria-pressed=true] { color:#994415; background:#fff0dd; border-color:#e4af8b; }
.entry .diary-products { container-type:inline-size; list-style:none; padding:0; }
.diary-products .diary-food {
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:8px 12px;
  padding:10px 0; margin:0;
}
.diary-food + .diary-food { border-top:1px solid var(--line); }
.diary-food-copy { display:grid; justify-items:start; gap:3px; min-width:0; overflow-wrap:anywhere; }
.diary-food-actions, .diary-item-buttons { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.diary-item-action {
  display:inline-grid; place-items:center; width:var(--control-height); height:var(--control-height); padding:0;
  border:1px solid var(--line); border-radius:var(--control-radius); background:var(--paper); color:var(--forest);
}
.diary-item-action:hover, .diary-item-action[aria-expanded=true] { background:var(--soft); }
.diary-item-action[data-action=delete]:is(:hover,[aria-expanded=true]) { color:var(--rust); }
.diary-pencil { position:relative; width:14px; height:6px; border:1.5px solid currentColor; border-radius:1px 2px 2px 1px; transform:rotate(-45deg); }
.diary-pencil::before { content:""; position:absolute; right:100%; top:-1px; border-block:3px solid transparent; border-right:4px solid currentColor; }
.diary-pencil::after { content:""; position:absolute; inset:0 2px 0 auto; border-right:1px solid currentColor; }
.diary-cross { position:relative; width:16px; height:16px; }
.diary-cross::before, .diary-cross::after { content:""; position:absolute; top:7px; left:0; right:0; height:2px; border-radius:2px; background:currentColor; transform:rotate(45deg); }
.diary-cross::after { transform:rotate(-45deg); }
.diary-food-panel, .diary-item-feedback { grid-column:1/-1; min-width:0; }
.diary-item-form { padding:12px; border:1px solid var(--line); border-radius:var(--control-radius); background:var(--surface); }
.diary-item-fields { min-width:0; padding:0; margin:0; border:0; }
.diary-item-fields > legend { padding:0; margin-bottom:8px; font-weight:700; overflow-wrap:anywhere; }
.diary-item-buttons { margin-top:8px; }
.diary-item-buttons .remove-food { background:var(--rust); }
.diary-item-feedback, .diary-item-message { font-size:.875rem; color:var(--forest); }
.diary-item-message:not(:empty) { margin-top:8px; }
@container (max-width:23rem) {
  .diary-products .diary-food { grid-template-columns:minmax(0,1fr); }
}
.product-tabs { display:grid; grid-template-columns:1fr 1fr; margin:8px 0 16px; gap:4px; background:var(--soft); border-radius:12px; padding:4px; }
.product-tabs button { border:0; color:var(--forest); background:transparent; font:inherit; font-weight:700; min-height:40px; border-radius:9px; }
.product-tabs button[aria-pressed=true] { background:var(--forest);color:white; }
#products-status { margin:10px 0 8px; font-size:.9rem; }
.library-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; border-top:1px solid var(--line); }
.library-select { display:grid; text-align:start; overflow-wrap:anywhere; gap:3px; padding:11px 2px; min-height:50px; border:0; background:transparent; color:var(--ink); font:inherit; }
.library-select small { color:var(--muted); }
.entry-review > .text-button { justify-self:start; padding-inline:0; }
.goal-form { display:grid; gap:var(--section-gap); margin-top:var(--section-gap); }
.goal-grid { display: grid; gap: 14px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.privacy { font-size: .875rem; margin-top: 15px; }
.stats { margin-top: 16px; }
.usage-card { padding:var(--card-padding); margin:var(--section-gap) 0; }
.usage-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 18px; }
.usage-summary div { display:grid; min-width:0; align-content:start; overflow-wrap:anywhere; }
.usage-summary strong { font-size: 1.4rem; color: var(--forest); }
.usage-summary span, .usage-table small, .usage-card .muted { font-size: .875rem; color: var(--muted); }
.usage-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.usage-table td, .usage-table th { text-align: right; padding: 8px 3px; border-bottom: 1px solid var(--line); }
.usage-table th { font-size: .875rem; white-space: nowrap; }
.usage-table :is(td,th):first-child { text-align: left; overflow-wrap: anywhere; }
.usage-table small { display: block; }
.usage-name { color: var(--forest); background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 650; text-align: left; }
.usage-name::after { content: " ▾"; }
.usage-name[aria-expanded="true"]::after { content: " ▴"; }
.usage-detail > td { background: var(--soft); }
.usage-detail table { width: 100%; border-collapse: collapse; }
.usage-detail th[scope="row"] { font-weight: 500; white-space: normal; }
.usage-detail p { padding: 0 6px; }
.usage-table, .usage-detail table { table-layout: fixed; }
.usage-table > thead > tr > th:not(:first-child),
.usage-detail table thead th:not(:first-child) { width: 22%; }
.usage-table th, .usage-table td { overflow-wrap: anywhere; }
.usage-name { max-width: 100%; overflow-wrap: anywhere; }
.retention-card { padding:var(--card-padding); margin:0 0 var(--section-gap); }
.retention-card h2 { margin-bottom: 10px; }
.retention-card .pilot-summary { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.retention-card .pilot-summary strong { overflow-wrap: anywhere; }
.retention-card .muted { font-size: .88rem; line-height: 1.5; margin: 12px 0 0; }
.usage-pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.stats > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stats > div:last-child { border-bottom: 0; }
@media (max-width:370px) {
  .day-heading { gap:6px; }
  input[type=date] { width: 122px; }
  .week { gap: 3px; }
  .week button { border-radius: 10px; }
  .progress-list { gap: 10px 8px; }
  .nutrient .amount { font-size:.875rem; }
}
@media (min-width:620px) {
  .calorie-cover { min-height:154px; padding:22px 25px; }
}

.remember { display:flex; align-items:center; gap:8px; font-size:.93rem; }
.remember input { width:18px; height:18px; accent-color:var(--forest); }
.recipe-tools { display:flex; gap:8px 16px; flex-wrap:wrap; align-items:center; margin:10px 0; }
#email-form { display:grid; gap:9px; }
#email-message { margin:4px 0; font-size:.92rem; }
.public-shell { max-width:960px; margin:0 auto; padding:12px clamp(16px,4vw,36px) 48px; }
.public-shell a { text-underline-offset:3px; }
.public-shell .primary { display:inline-block; text-decoration:none; }
.not-found { max-width:880px; }
.not-found-card { margin-top:16px; padding:clamp(32px,7vw,74px) clamp(16px,5vw,56px); border:1px solid var(--line); border-radius:28px; background:var(--paper); text-align:center; }
.not-found-code { display:flex; align-items:center; justify-content:center; gap:.03em; color:var(--forest); font:700 clamp(5.6rem,18vw,9rem)/1 Georgia,serif; }
.not-found-plate { width:.78em; height:.78em; border-radius:50%; background:var(--sage) url("/header.webp") right center / 200% 100% no-repeat; }
.not-found-card h1 { margin:24px 0 10px; font-size:clamp(1.85rem,5vw,2.8rem); }
.not-found-card p { color:var(--muted); line-height:1.55; }
.not-found-card nav { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:4px 16px; margin-top:24px; }
.not-found-card nav a { display:inline-flex; min-height:44px; padding:10px 16px; align-items:center; justify-content:center; font-weight:750; }
.public-hero { display:grid; grid-template-columns:1.13fr 1fr; overflow:hidden; margin-top:12px; }
.public-copy { padding:clamp(22px,4vw,44px); }
.public-copy h1 { font:700 clamp(2rem,5vw,3.5rem)/1.05 Georgia,serif; margin:0; color:var(--forest); }
.public-copy p,.public-notes p { line-height:1.65; }
.public-copy .text-button { display:inline-block; margin:8px 0; }
.public-photo { width:100%; height:100%; object-fit:cover; }
.public-notes { display:grid; gap:24px; margin-top:32px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.public-notes h2 { margin:0; font:700 1.45rem/1.15 Georgia,serif; }
.public-notes p { margin:8px 0 0; }
.counter-pixel { position:absolute; left:-9999px; }
@media(max-width:680px){ .public-hero,.public-notes{grid-template-columns:1fr;} .public-photo{max-height:170px;} }

.balance-tools { flex-wrap:wrap; gap:2px 12px; }
.balance-tools > div { display:flex; align-items:center; gap:6px; }
#report-dialog { --dialog-width:440px; }
#report-dialog .muted,#report-status { font-size:.94rem; line-height:1.5; }
.report-presets { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.report-dates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:12px 0 16px; }
.report-dates label { display:grid; min-width:0; gap:4px; font-size:.92rem; font-weight:700; }
.report-dates input { width:100%; }
#report-status:empty { margin:0; }
#report-dialog button:disabled { opacity:.6; }

.install-card { display:grid; grid-template-columns:46px minmax(0,1fr) auto; gap:10px 12px; align-items:center;
  margin:8px 0 14px; padding:14px 16px; background:#eff3e7; border:1px solid #acbca1; border-radius:18px; }
.install-card img { display:block; border-radius:12px; }
.install-card strong { display:block; color:var(--forest); font-size:1.02rem; line-height:1.25; }
.install-card p { font-size:.86rem; color:var(--muted); line-height:1.4; margin:3px 0 0; }
.install-action { min-height:42px; border:1px solid #a7b59c; border-radius:12px; background:var(--paper);
  padding:6px 12px; color:var(--forest); font:inherit; font-weight:740; }
.install-help { grid-column:1/-1; min-width:0; padding:12px 0 0; border-top:1px solid var(--line); }
.install-platforms { display:flex; gap:4px; flex-wrap:wrap; }
.install-platforms button { padding:6px 9px; min-height:36px; border:0; border-radius:9px; background:transparent; color:var(--forest); font-size:.86rem; }
.install-platforms button[aria-pressed=true] { background:var(--forest); color:var(--paper); }
.install-help ol { margin:10px 0 2px; padding-left:1.55rem; color:var(--ink); font-size:.9rem; line-height:1.5; }
.install-help li+li { margin-top:4px; }
.gate .install-card { margin:14px 0; }
.nutrient { min-width:0; }
.balance, .diary-balance { container-type:inline-size; }
.nutrient .amount { display:flex; flex-wrap:wrap; align-items:baseline; gap:0 .16em; }
.nutrient .goal { overflow-wrap:anywhere; }
.nutrient:not(:first-child) { display:grid; grid-template-rows:auto 1fr auto auto; align-items:start; }
.nutrient:not(:first-child) .over { grid-row:3; }
.nutrient:not(:first-child) progress { grid-row:4; margin-top:4px; }
@container (max-width:400px) {
  .nutrient:not(:first-child) .amount { display:grid; grid-template-columns:minmax(0,1fr); justify-items:start; gap:0; }
  .nutrient:not(:first-child) :is(.value, .label) { overflow-wrap:anywhere; }
}
.balance-tools > div { flex-wrap:wrap; }
@media(max-width:390px) {
  .usage-table > thead > tr > th:not(:first-child), .usage-detail table thead th:not(:first-child) { width:21%; }
  .usage-table th { white-space:normal; }
  .balance-tools { align-items:flex-start; }
  .install-card { grid-template-columns:38px minmax(0,1fr) auto; gap:8px; padding:11px; }
  .install-card img { width:38px; height:38px; }
  .install-action { padding:5px 8px; font-size:.86rem; }
}
