/* 2026-10-20: two quick taps on a + button zoomed the page on iPhone (Brycen). manipulation turns off double-tap zoom only; pinch zoom still works. */
html{touch-action:manipulation;}
/* Gainz Train customer app shell (2026-09-16). ONE token block for every /app page; the six
   inline copies on the old pages are what this replaces. Values come from assets/css/global-light.css
   so the app and the marketing site are the same brand. Phone first: 16px inputs (iOS zoom), 44px
   targets, a fixed bottom tab bar with safe-area padding, no paragraphs. */
:root {
  --ink: #1a1614; --ink-2: #4a4440; --muted: #7a7270;
  --bg: #fafaf8; --card: #fff; --fill: #f5f2ee; --line: #ede9e3;
  --orange: #ff6b35; --orange-dark: #cc5520; --orange-soft: #fff1ea;
  --green: #16a34a; --green-soft: #f0fdf4; --amber: #b45309; --amber-soft: #fffbeb; --red: #dc2626; --red-soft: #fef2f2;
  --head: 'Barlow Condensed', sans-serif; --body: 'Inter', sans-serif;
  --r: 12px; --r-lg: 18px; --tab-h: 62px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); background: var(--bg); color: var(--ink); line-height: 1.45; -webkit-font-smoothing: antialiased; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.02; letter-spacing: -0.01em; }
a { color: var(--orange-dark); }
button { font-family: inherit; }
.hidden { display: none !important; }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 24px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: max(10px, env(safe-area-inset-top)) 16px 10px; background: rgba(250, 250, 248, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--head); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.01em; text-decoration: none; color: var(--ink); }
.brand .t { color: var(--orange); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.iconbtn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line); border-radius: 999px; font-size: 1.05rem; cursor: pointer; position: relative; color: var(--ink); }
.iconbtn .dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 999px; background: var(--orange); }

/* Cards and rows */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 12px; }
.card.hero { padding: 20px 18px 16px; }
.eyebrow { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.headline { font-family: var(--head); font-weight: 700; font-size: 1.85rem; line-height: 1.05; }
.sub { color: var(--ink-2); font-size: 0.95rem; margin-top: 6px; }
.note { margin-top: 10px; padding: 10px 12px; border-radius: var(--r); font-size: 0.9rem; background: var(--amber-soft); color: var(--amber); }
.note.red { background: var(--red-soft); color: var(--red); }
.note.green { background: var(--green-soft); color: var(--green); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: none; }
.row .k { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.row .v { font-size: 1rem; font-weight: 600; margin-top: 2px; }
.row .v small { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.row a.act, .row button.act { flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--fill); color: var(--ink); font-weight: 600; font-size: 0.9rem; text-decoration: none; cursor: pointer; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; background: var(--fill); color: var(--ink-2); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.orange { background: var(--orange-soft); color: var(--orange-dark); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px; border: none; border-radius: var(--r); font-family: var(--body); font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none; transition: transform .05s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--orange); color: #fff; width: 100%; }
.btn.primary:hover { background: var(--orange-dark); }
.btn.ghost { background: var(--fill); color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.5; cursor: default; }
.hero .btn { margin-top: 14px; }

/* Meal list */
.meals { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.meal { display: flex; align-items: center; gap: 12px; }
.meal .ph { width: 52px; height: 52px; border-radius: 10px; background: var(--fill); flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; overflow: hidden; }
.meal .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meal .nm { font-weight: 600; font-size: 0.95rem; flex: 1; }
.meal .q { font-family: var(--head); font-weight: 700; font-size: 1.15rem; color: var(--orange-dark); min-width: 34px; text-align: right; }

/* Tracker */
.track { display: flex; gap: 6px; margin-top: 14px; }
.track .st { flex: 1; }
.track .bar { height: 6px; border-radius: 999px; background: var(--line); }
.track .st.done .bar { background: var(--green); }
.track .st.now .bar { background: var(--orange); }
.track .lb { font-size: 0.72rem; color: var(--muted); margin-top: 6px; font-weight: 600; }
.track .st.now .lb { color: var(--ink); }

/* Forms (login) */
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); margin: 12px 0 5px; }
input, select { width: 100%; font-family: var(--body); font-size: 16px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); }
input:focus, select:focus { outline: none; border-color: var(--orange); }
.tabs { display: flex; gap: 6px; margin: 4px 0 8px; background: var(--fill); padding: 4px; border-radius: 999px; }
.tabs .tab { flex: 1; text-align: center; padding: 10px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; cursor: pointer; color: var(--ink-2); }
.tabs .tab.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.msg { margin-top: 12px; padding: 10px 12px; border-radius: var(--r); font-size: 0.9rem; display: none; }
.msg.show { display: block; }
.msg.err { background: var(--red-soft); color: var(--red); }
.msg.ok { background: var(--green-soft); color: var(--green); }
.msg.info { background: var(--fill); color: var(--ink-2); }
.switch-link { margin-top: 12px; text-align: center; font-size: 0.9rem; color: var(--muted); }
.switch-link a { cursor: pointer; font-weight: 600; }

/* Skeletons */
.sk { position: relative; overflow: hidden; background: var(--fill); border-radius: 8px; color: transparent !important; }
.sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent); animation: sk 1.2s infinite; }
@keyframes sk { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .sk::after { animation: none; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 999px; font-size: 0.92rem; font-weight: 600; opacity: 0; transition: opacity .2s, transform .2s; z-index: 40; max-width: 92vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Notification feed */
.feed { position: absolute; right: 12px; top: calc(100% + 6px); width: 340px; max-width: calc(100vw - 24px); max-height: 60vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 12px 40px rgba(0,0,0,0.12); z-index: 50; }
.feed-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.feed-head h3 { font-size: 1.1rem; }
.feed-head a { font-size: 0.82rem; cursor: pointer; font-weight: 600; }
.feed-item { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.feed-item.unread { background: var(--orange-soft); }
.feed-item .ft { font-weight: 600; font-size: 0.9rem; }
.feed-item .fb { color: var(--ink-2); font-size: 0.85rem; margin-top: 2px; }
.feed-item .fc { color: var(--muted); font-size: 0.72rem; margin-top: 4px; }
.feed-empty { padding: 28px 14px; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* Bottom tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: rgba(255,255,255,0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; min-height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 0.72rem; font-weight: 600; }
.tabbar a .ic { font-size: 1.3rem; line-height: 1; }
.tabbar a.active { color: var(--orange-dark); }
.tabbar a.active .ic { transform: translateY(-1px); }

/* Desktop: keep it a phone-shaped column */
@media (min-width: 700px) { .wrap { padding-top: 24px; } .card { padding: 22px; } }

/* ── Meals page ── */
.mealcard { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; margin-bottom: 10px; }
.mealcard.locked { opacity: 0.92; }
.mealcard .thumb { width: 76px; height: 76px; border-radius: 12px; background: var(--fill); flex: none; display: flex; align-items: center; justify-content: center; font-size: 2rem; overflow: hidden; }
.mealcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mealcard .info { flex: 1; min-width: 0; }
.mealcard h3 { font-size: 1.2rem; }
.mealcard .desc { color: var(--muted); font-size: 0.85rem; margin: 2px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.macros { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.76rem; color: var(--ink-2); }
.macros b { color: var(--ink); }
.stepper { display: flex; align-items: center; gap: 6px; flex: none; align-self: center; }
.stepbtn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-size: 1.4rem; font-weight: 700; color: var(--orange-dark); cursor: pointer; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.stepbtn:disabled { opacity: 0.3; cursor: default; }
.stepper .qn { font-family: var(--head); font-weight: 700; font-size: 1.5rem; min-width: 1.6rem; text-align: center; }
.savebar { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); z-index: 25; background: rgba(255,255,255,0.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 10px 16px; }
.savebar-inner { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.ring { width: 46px; height: 46px; flex: none; }
.ring circle { fill: none; stroke-width: 5; }
.ring .bg { stroke: var(--line); }
.ring .fg { stroke: var(--orange); stroke-linecap: round; transition: stroke-dashoffset .25s; }
.ring.ok .fg { stroke: var(--green); }
.savebar .count { flex: 1; font-size: 0.9rem; color: var(--muted); }
.savebar .count b { font-family: var(--head); font-size: 1.35rem; color: var(--ink); }
.savebar .btn { min-height: 46px; padding: 0 22px; }
body.has-savebar { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 84px); }
body.has-savebar .toast { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 88px); }

/* ── Account page ── */
.acc { border-top: 1px solid var(--line); }
.acc:first-child { border-top: none; }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; cursor: pointer; min-height: 60px; }
.acc-head .k { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.acc-head .v { font-size: 1rem; font-weight: 600; margin-top: 2px; }
.acc-head .chev { flex: none; width: 34px; height: 34px; border-radius: 999px; background: var(--fill); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); transition: transform .2s; }
.acc.open .acc-head .chev { transform: rotate(180deg); }
.acc-body { display: none; padding: 0 0 16px; }
.acc.open .acc-body { display: block; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.acts .btn { min-height: 46px; flex: 1; }
.toggle { display: flex; gap: 6px; margin: 6px 0 10px; background: var(--fill); padding: 4px; border-radius: 999px; }
.toggle .opt { flex: 1; text-align: center; padding: 11px 8px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; cursor: pointer; color: var(--ink-2); }
.toggle .opt.sel { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.ck { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; font-size: 0.95rem; cursor: pointer; }
.ck input { width: 22px; height: 22px; min-height: 0; margin-top: 1px; flex: none; accent-color: var(--orange); }
.ck small { display: block; color: var(--muted); font-size: 0.82rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.reasons .opt { padding: 12px 10px; border: 1px solid var(--line); border-radius: var(--r); font-size: 0.9rem; font-weight: 600; text-align: center; cursor: pointer; background: var(--card); }
.reasons .opt.sel { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-dark); }
@media (max-width: 380px) { .reasons { grid-template-columns: 1fr; } }
.btn.danger { background: var(--red-soft); color: var(--red); border: 1px solid #fecaca; }
.hist { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.hist:first-child { border-top: none; }
.hist .d { color: var(--ink-2); }
.hist .r { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hist a { font-size: 0.85rem; }
.section-title { font-family: var(--head); font-weight: 700; font-size: 1.15rem; margin: 4px 0 8px; }
.codebig { font-family: var(--head); font-weight: 700; font-size: 2.2rem; letter-spacing: 0.08em; }
.linkbox { word-break: break-all; font-size: 0.85rem; color: var(--muted); background: var(--fill); padding: 10px 12px; border-radius: var(--r); margin-top: 8px; }

/* After-payment card and the "how did you hear" popup on Meals (ported from the classic menu page, 2026-10-11) */
.finish { border: 2px solid var(--orange); }
.finish .blk { border-top: 1px solid var(--line); padding-top: 4px; margin-top: 14px; font-size: 0.92rem; color: var(--ink-2); }
.finish #refBlk { padding-top: 12px; }
.finish .rowb { display: flex; gap: 8px; align-items: center; }
.finish .rowb input { flex: 1; min-width: 0; }
.finish .rowb .btn { width: auto; flex: none; min-height: 48px; padding: 0 18px; }
.finish .ferr { color: var(--red); font-size: 0.85rem; font-weight: 600; margin-top: 6px; }
.finish .done { color: var(--green); font-weight: 600; font-size: 0.9rem; padding-top: 10px; }
.finish code { display: block; background: var(--fill); border-radius: var(--r); padding: 8px 10px; margin: 8px 0; font-size: 0.85rem; word-break: break-all; color: var(--ink); }
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet .card { position: relative; width: 100%; max-width: 26rem; margin: 0; }
.sheet-x { position: absolute; top: 4px; right: 6px; width: 44px; height: 44px; border: 0; background: none; font-size: 1.7rem; line-height: 1; color: var(--ink-2); cursor: pointer; }
