/* =====================================================================
   v31 — "Simpler version 2" look: no top bar, big light page titles with
   round icon buttons, grouped glass lists with chevrons, a few Home cards.
   Loaded last.
   ===================================================================== */
header.top { display: none; }
main { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
h1 { font-size: 2.15rem; }

/* page head: eyebrow + big title on the left, round buttons on the right */
.pg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 18px 0 16px; }
.pg-head h1 { margin: 0; line-height: 1.12; }
.pg-head .eyebrow { color: var(--muted); margin-bottom: 2px; }
.pg-head .acts { display: flex; gap: 8px; flex: none; }
.pg-back { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.pg-back h1 { margin: 0; font-size: 1.85rem; }
.hbtn svg { display: block; }

/* grouped list: one glass card, rows with a soft round icon, title, small line, chevron */
.g-list { background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r); box-shadow: var(--shadow); padding: 4px 18px; margin-bottom: 14px; }
.g-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; color: var(--ink); font: inherit; min-height: 56px; }
.g-row:first-child { border-top: 0; }
.g-row.static { cursor: default; }
.g-row .icon-btn { flex: none; }
.g-ico { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.g-ico svg { width: 18px; height: 18px; }
.g-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.g-t b { font-weight: 400; font-size: 1rem; line-height: 1.3; }
.g-t small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.g-row .chev, .g-card .chev { color: var(--muted); font-size: 1.35rem; line-height: 1; }
.g-row .danger-t { color: var(--bad, #A93C2C); font-weight: 500; font-size: .9rem; }
h3.sec, .sec-h { font-weight: 500; font-size: .95rem; margin: 18px 2px 10px; }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 2px 10px; }
.sec-row h3 { margin: 0; font-weight: 500; font-size: .95rem; }
.sec-row .linkish { color: var(--accent); font-weight: 500; font-size: .86rem; text-decoration: none; }

/* single glass card rows (Tonight, Today's food, Water) */
.g-card { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 14px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 26px; box-shadow: var(--shadow); text-align: left; color: var(--ink); font: inherit; flex-wrap: wrap; }
.g-card .g-t b { font-size: 1.05rem; }
.orb { width: 52px; height: 52px; flex: none; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0, var(--b1) 38%, var(--accent) 100%); box-shadow: 0 6px 16px rgba(40,40,90,.18); overflow: hidden; display: grid; place-items: center; font-size: 1.4rem; }
.orb.has-ph { background: var(--glass-hi); } .orb img { width: 100%; height: 100%; object-fit: cover; }
.g-card.food { display: block; }
.fc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fc-main { display: flex; flex-direction: column; text-align: left; color: var(--ink); text-decoration: none; padding: 0; }
.fc-n { font-size: 1.9rem; font-weight: 300; letter-spacing: -.02em; }
.fc-n small { font-size: .9rem; color: var(--muted); letter-spacing: 0; }
.round-cam { width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.mbars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.mbar { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mbar b { font-weight: 400; font-size: .92rem; white-space: nowrap; }
.mbar .track, .g-card .track { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; display: block; }
.mbar .track i, .g-card .track i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.g-card.water .g-t b { font-size: 1.35rem; font-weight: 300; }
.g-card.water .g-t .track { margin-top: 6px; }
.w-adds { width: 100%; margin: 0; }
.pill-ghost { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--muted); border-radius: 999px; padding: 8px 16px; font: inherit; font-size: .86rem; margin: 6px 0 18px; }
.center { text-align: center; }

/* recipe circles with the photo (bug #0) */
.rcard-ico.has-ph, .idea-ico.has-ph { padding: 0; overflow: hidden; background: var(--glass-hi); }
.rcard-ico.has-ph img, .idea-ico.has-ph img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.idea-ico.has-ph { width: 44px; height: 44px; border-radius: 50%; flex: none; }

/* food photo wait + check (bugs #2, #3, #7, #11, #12) */
.pbar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 12px 0 16px; }
.pbar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width 1s linear; }
.meal-total { background: var(--accent-soft); border-radius: var(--r-sm); padding: 12px 14px; margin: 12px 0 0; font-size: .92rem; }
.meal-total b { margin-right: 6px; }

/* kitchen: In stock / Shopping list title tabs + filter chips + one card */
.big-tabs { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.big-tabs button { border: 0; background: none; padding: 4px 0; font: inherit; font-size: 1.85rem; font-weight: 300; letter-spacing: -.02em; color: var(--muted); }
.big-tabs button[aria-pressed="true"] { color: var(--ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 16px; }
.big-tabs sup { font-size: .75rem; color: var(--accent); font-weight: 500; margin-left: 2px; }
.k-list { background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r); box-shadow: var(--shadow); padding: 2px 18px; }

/* item page: how much is left + three big actions */
.seg-left { display: flex; justify-content: space-between; background: var(--glass-hi); border-radius: 999px; padding: 4px; }
.seg-left button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 9px 0; font: inherit; font-size: .9rem; color: var(--ink); }
.seg-left button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.big3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.big3 button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border-radius: 22px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--ink); font: inherit; font-size: .92rem; box-shadow: var(--shadow); }
.big3 button .g-ico { width: 34px; height: 34px; }
.big3 button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.big3 button.on .g-ico { background: rgba(255,255,255,.25); color: var(--accent-ink); }
.big3 button:disabled { opacity: .45; }

/* add sheet: four big tiles */
.add4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0 14px; }
.add4 button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; min-height: 128px; border-radius: 22px; border: 1px solid var(--glass-line); background: var(--glass-hi); color: var(--ink); font: inherit; }
.add4 .g-ico { margin-bottom: 8px; }
.add4 b { font-weight: 500; font-size: 1rem; }
.add4 small { color: var(--muted); font-size: .8rem; line-height: 1.35; }

/* profile */
.pf-head { text-align: center; margin: 8px 0 14px; }
.pf-ava { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; background: var(--glass-hi); border: 1px solid var(--glass-line); color: var(--accent); font-size: 1.8rem; overflow: hidden; }
.pf-ava img { width: 100%; height: 100%; object-fit: cover; }
.pf-head h1 { margin: 0; font-size: 1.9rem; }
.pf-head .small { color: var(--muted); }
.pf-btns { display: flex; justify-content: center; gap: 8px; margin: 12px 0 4px; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 0; margin: 12px 0 6px; text-align: center; }
.stats3 > * + * { border-left: 1px solid var(--line); }
.stats3 b { display: block; font-size: 1.5rem; font-weight: 300; }
.stats3 small { color: var(--muted); font-size: .78rem; }

/* recipe stat tiles */
.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.stat-tiles > div { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.stat-tiles b { display: block; font-size: 22px; font-weight: 300; white-space: nowrap; }
.stat-tiles small { color: var(--muted); font-size: .78rem; }
.demo-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); background: var(--glass); border: 1px solid var(--glass-line); border-radius: 999px; padding: 6px 8px 6px 16px; margin: 0 0 4px; }
.demo-line .linkish { color: var(--accent); font-weight: 500; font-size: .82rem; padding: 4px 8px; }
.k-chips .chip { flex: none; }
/* item page */
.it-head { margin-bottom: 0; }
.it-head .grow { flex: 1; }
.it-title { margin: 4px 2px 14px; }
.it-title h1 { margin: 2px 0 0; font-size: 2.1rem; line-height: 1.1; }
.it-hero { display: block; }
.ih-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.it-hero .ih-n { font-size: 1.9rem; font-weight: 300; letter-spacing: -.02em; }
.it-hero .qty.big { justify-content: center; }
.serves-tile b { display: flex; align-items: center; gap: 4px; }
.serves-tile .icon-btn.sm { width: 26px; height: 26px; min-width: 26px; font-size: .9rem; padding: 0; }
.stat-tiles .cost-tile { text-align: left; font: inherit; color: var(--ink); background: var(--glass); border: 1px solid var(--glass-line); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.rec-sh .grow { flex: 1; }
/* older lists pick up the grouped-list look */
.hub-rows { padding: 2px 18px; border-radius: var(--r); }
.hub-row { padding: 14px 0; min-height: 56px; }
.hub-t b { font-weight: 400; }
.sheet .sh h2 { font-size: 1.6rem; line-height: 1.2; }
/* pages behind Profile (Health, Spending, Cycle, Friends): a round back button next to the title */
.back-home { float: left; width: 44px; height: 44px; padding: 0; margin: 14px 12px 0 0; border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-line); color: var(--ink); font-size: 0; display: grid; place-items: center; }
.back-home::before { content: "‹"; font-size: 1.5rem; line-height: 1; margin-top: -2px; }
.back-home + * .eyebrow:first-child { display: none; }
.back-home + * h1, .back-home + h1 { margin-top: 18px; }
/* health */
.hbars { padding: 10px 18px; }
.hrow { padding: 8px 0; }
.hrow-l { display: flex; justify-content: space-between; font-size: .92rem; margin-bottom: 6px; }
.hrow .track, .vit-grid .track { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; display: block; }
.hrow .track i, .vit-grid .track i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.vit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.vit-grid > div { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.vit-grid small { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vit-grid b { font-weight: 300; font-size: 1.3rem; }
.tip-low { margin: 4px 2px 6px; }
details.meal-row { display: block; cursor: pointer; }
details.meal-row summary { display: flex; align-items: center; gap: 12px; list-style: none; }
details.meal-row summary::-webkit-details-marker { display: none; }
.meal-e { display: flex; align-items: center; gap: 8px; padding: 8px 0 0; font-size: .9rem; }
.more-health summary { cursor: pointer; padding: 4px 0; }
.glass-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.glass-dots i { width: 22px; height: 28px; border-radius: 4px 4px 8px 8px; border: 1.5px solid var(--accent); opacity: .45; }
.glass-dots i.on { background: var(--accent); opacity: 1; }

/* ---- Spending, Budget, Prices, Receipt ---- */
.mo-hero { padding: 22px 22px 20px; }
.mo-top { display: flex; justify-content: space-between; align-items: center; }
.mo-nav { display: flex; gap: 6px; }
.mo-nav .icon-btn { width: 32px; height: 32px; min-height: 0; font-size: 1.1rem; }
.mo-nav .icon-btn[disabled] { opacity: .35; }
.mo-n { font-size: 2.6rem; font-weight: 300; letter-spacing: -.02em; margin: 6px 0 4px; line-height: 1.1; }
.mo-prog { margin: 4px 2px 6px; }
.mo-prog .nl { font-size: .9rem; margin-bottom: 8px; }
.mo-cats { padding-top: 2px; padding-bottom: 2px; }
.mo-cats .kind-row { border-top: 1px solid var(--line); }
.mo-cats .kind-row:first-child { border-top: 0; }
.mo-cats .kind-row summary { display: flex; align-items: center; gap: 10px; padding: 16px 0; }
.mo-cats .kind-row summary .chev { transition: transform .2s; }
.mo-cats .kind-row[open] summary .chev { transform: rotate(90deg); }
.mo-cats .kind-body { padding: 0 0 12px 14px; }
.mo-cats .kind-it { border: 0; padding: 7px 0; align-items: flex-start; }
.mo-cats .kind-tips { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.g-more { margin: 6px 0 14px; }
.g-more > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; }
.g-more > summary::-webkit-details-marker { display: none; }
.g-more[open] > summary .chev { transform: rotate(90deg); }
.g-input { width: 100%; min-height: 52px; border-radius: 18px; border: 1px solid var(--glass-line); background: var(--glass); padding: 0 18px; font: inherit; font-size: 1rem; color: var(--ink); box-shadow: var(--shadow); }
.sheet-foot { margin-top: 22px; }
.tgl-row { cursor: pointer; }
input.tgl { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; flex: none; margin: 0; transition: background .2s; cursor: pointer; }
input.tgl::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
input.tgl:checked { background: var(--accent); }
input.tgl:checked::after { transform: translateX(18px); }
a.g-row { text-decoration: none; }
.back-home:has(~ * .pg-back), body:has(.pg-back) .back-home { display: none; }
.hbars .nl span:first-child { font-weight: 400; } .hbars .nl b { font-weight: 400; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.badge-c { padding: 9px 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); font-size: .86rem; color: var(--muted); opacity: .7; }
.badge-c.on { color: var(--ink); opacity: 1; box-shadow: var(--shadow); }
/* ---- This week, Ideas ---- */
.wk-nav { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 10px; }
.wk-nav .btn.sm { min-height: 32px; padding: 0 12px; }
.g-row.is-today .g-t b { font-weight: 500; }
.wk-miss { margin: -4px 4px 14px; }
.day-acts { gap: 10px; justify-content: flex-start; min-height: 0; padding: 4px 0 14px; border-top: 0; }
.g-ico.has-ph { overflow: hidden; padding: 0; }
.g-ico.has-ph img { width: 100%; height: 100%; object-fit: cover; }
.g-ico.rc { width: 44px; height: 44px; font-size: 1.2rem; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; }
.idea-search { margin-bottom: 12px; }
.pg-back .back-c { width: 44px; height: 44px; min-height: 0; flex: none; padding: 0; border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow); color: var(--ink); display: grid; place-items: center; }
/* ---- Cycle ---- */
.cy-hero2 { padding: 22px; }
.cy-ph { font-size: 2.1rem; font-weight: 300; letter-spacing: -.02em; margin: 4px 0 6px; line-height: 1.1; }
.cy-dots { display: flex; gap: 3px; margin: 14px 0 4px; }
.cy-dots i { flex: 1; height: 10px; border-radius: 3px; background: var(--line); }
.cy-dots i.per { background: #C8506A; }
.cy-dots i.ovu { background: var(--accent-soft); }
.cy-dots i.now { background: var(--accent); transform: scaleY(1.6); }
.cy-act2 { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.cy-more { padding: 14px 18px; }
.cy-more .cy-lead { margin: 0 0 4px; }
.g-num { width: 64px; min-height: 40px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); text-align: right; padding: 0 10px; font: inherit; }
.g-txt { width: 42%; min-height: 40px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 0 10px; font: inherit; }
.g-row[aria-pressed="true"] { background: transparent; }
.gu { min-width: 52px; } .g-row .g-num + .gu { margin-left: -4px; }
/* ---- Friends, Posts, Goals ---- */
.feed { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.post { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 26px; box-shadow: var(--shadow); padding: 16px 18px; }
.post h3 { font-weight: 400; font-size: 1.05rem; }
.post header b { font-weight: 500; }
.post-ph { border-radius: 18px; }
.g-row .av { width: 40px; height: 40px; font-weight: 500; }
.g-list .g-row input.g-num { flex: none; width: 76px; min-height: 40px; margin: 0; padding: 0 10px; }
.g-list .g-row input.g-txt { flex: none; width: 46%; min-height: 40px; margin: 0; padding: 0 10px; }
.g-list .g-row input.tgl { width: 46px; min-height: 0; padding: 0; }
input.g-input, textarea.g-input { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 18px; padding: 0 18px; min-height: 52px; box-shadow: var(--shadow); }
textarea.g-input { padding: 12px 18px; }
.g-list .g-row input.g-num { background: transparent; }
/* ---- Shopping list ---- */
.gl-list { padding-top: 2px; padding-bottom: 2px; }
.gi.gl { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; background: none; border-radius: 0; margin: 0; box-shadow: none; }
.gi.gl:first-child { border-top: 0; }
.gl-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; background: none; border: 0; padding: 0; color: var(--ink); font: inherit; }
.gl-t b { font-weight: 400; font-size: 1rem; }
.gl-t small { color: var(--muted); font-size: .8rem; }
.gi.gl.done .gl-t b { text-decoration: line-through; color: var(--muted); }
.gi.gl .step { width: 100%; display: flex; gap: 8px; justify-content: flex-end; }
.gl-sum { margin: 2px 4px 14px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
/* settings: checkboxes become switches on the right */
.set label.check { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; }
.set label.check input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; min-height: 0; border-radius: 999px; background: var(--line); position: relative; flex: none; margin: 0; padding: 0; border: 0; transition: background .2s; cursor: pointer; }
.set label.check input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.set label.check input[type=checkbox]:checked { background: var(--accent); }
.set label.check input[type=checkbox]:checked::after { transform: translateX(18px); }
/* ---- welcome cards ---- */
.w4 { min-height: calc(100vh - 80px); display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 8px; text-align: left; }
.w4-top { display: flex; justify-content: space-between; min-height: 28px; color: var(--muted); font-size: .9rem; }
.w4-top .linkish { text-decoration: none; color: var(--muted); }
.w4-hero { height: 250px; border-radius: 30px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow); display: grid; place-items: center; margin: 8px 0 12px; }
.w4-orb { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: radial-gradient(circle at 35% 30%, #fff, var(--accent-soft)); box-shadow: 0 12px 30px rgba(80, 90, 200, .18); }
.w4 h1 { font-size: 1.9rem; font-weight: 300; line-height: 1.15; margin: 0; letter-spacing: -.02em; }
.w4 p { line-height: 1.5; margin: 0; }
.w4 .grow { flex: 1; }
.w4-dots { display: flex; gap: 6px; justify-content: center; margin: 6px 0; }
.w4-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .2s; }
.w4-dots i.on { width: 26px; background: var(--accent); }
.w4 .col-btns { display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: center; }
.w4 .col-btns .linkish { text-decoration: none; color: var(--muted); padding: 6px; }
.w4 .btn.wide { min-height: 54px; }
.welcome.w4 { align-items: stretch; text-align: left; } .w4 > * { width: 100%; } .w4 .col-btns > * { align-self: stretch; text-align: center; justify-content: center; }
.off-line span { flex: 1; }
