@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');
:root{--paper:#f4eee6;--card:#fffaf4;--ink:#392d29;--muted:#86766e;--line:#e6d9cc;--wine:#783e4b;--terra:#b86e51;--olive:#77816a;--shadow:0 8px 28px #49352a0c}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:15px;line-height:1.5}#app{max-width:760px;margin:auto;padding:env(safe-area-inset-top) 18px 24px}.sitehead{display:flex;justify-content:space-between;align-items:center;padding:22px 2px 18px}.brand{font:700 34px 'Playfair Display',serif;letter-spacing:-1px}.brand span{color:var(--terra)}.tagline{color:var(--muted);font-size:12px}.iconbtn{border:1px solid var(--line);background:var(--card);border-radius:50%;width:42px;height:42px;color:var(--wine);font-size:20px}
nav{position:sticky;top:0;z-index:5;display:flex;gap:5px;background:#f4eee6ed;backdrop-filter:blur(12px);padding:8px 0 12px;overflow:auto}button{font:600 14px 'DM Sans';border:0;border-radius:13px;padding:12px 15px;background:var(--wine);color:#fff;cursor:pointer}button:active{transform:scale(.98)}nav button{flex:1;white-space:nowrap;background:transparent;color:var(--muted);padding:10px 8px}nav button.active{background:var(--wine);color:white}.soft{background:#eee4da;color:var(--wine)}.textbtn{background:transparent;color:var(--wine);padding:6px 2px}.page{padding:14px 0 34px}.hidden{display:none!important}.eyebrow{font-size:10px;letter-spacing:1.8px;color:var(--terra);font-weight:700;margin-bottom:8px}h1{font:700 32px 'Playfair Display';line-height:1.15;margin:4px 0 12px}h2{font:600 21px 'Playfair Display';margin:0 0 8px}h3{font-size:17px;margin:5px 0}p{color:#76665e;margin:7px 0 14px}.tiny,.small{font-size:12px;color:var(--muted)}.muted{color:var(--muted)}.card,.workout,.recipe,.daycard{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:17px;margin:13px 0;box-shadow:var(--shadow)}.auth{margin:25px 0;padding:22px}.auth input{margin:7px 0}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:20px 0}.stat{background:#eadfd4;border-radius:16px;padding:13px 10px}.stat small{display:block;color:var(--muted);font-size:9px;letter-spacing:1px}.stat strong{display:block;font:700 23px 'Playfair Display';margin:5px 0}.bar{height:5px;background:#d8c9bc;border-radius:5px}.bar i{display:block;height:100%;width:0;background:var(--wine);border-radius:5px;transition:width .4s}.row{display:flex;align-items:center;justify-content:space-between;gap:10px}.stack{display:grid;gap:8px}.workout,.recipe{margin:0}.workout button{margin-top:8px}.filters{display:flex;gap:7px;overflow:auto;padding:8px 0 14px}.filters button{background:#eadfd4;color:var(--wine);white-space:nowrap}.filters button.active{background:var(--wine);color:#fff}.meta{color:var(--muted);font-size:12px}.weeknav{display:flex;justify-content:space-between;align-items:center;margin:14px 0}.weekstrip{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.daydot{background:#f0e6dc;border-radius:12px;text-align:center;padding:8px 2px;font-size:11px}.daydot b{display:block;font-size:15px}.daydot.done{background:#e3e6dc;color:#526047}.daycard{padding:14px}.dayhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.meal-slot{display:grid;grid-template-columns:74px 1fr auto;gap:8px;align-items:center;border-top:1px solid var(--line);padding:10px 0}.meal-slot:first-of-type{border-top:0}.slotname{font-size:12px;color:var(--muted);font-weight:700}.slotmeal{font-size:13px}.slotactions{display:flex;gap:5px}.mini{padding:7px 9px;font-size:11px;border-radius:10px}.meal-select{width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fffaf4;color:var(--ink)}input,select{font:inherit;color:var(--ink);background:#fffaf4;border:1px solid var(--line);border-radius:12px;padding:12px;width:100%}label{font-size:12px;color:var(--muted)}.two{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:10px 0}.exercise{border-top:1px solid var(--line);padding:13px 0}.exercise:first-child{border-top:0}.exercise input[type=number]{width:85px;padding:8px}.setchecks{display:flex;gap:10px;flex-wrap:wrap;margin-top:9px}.setchecks label{display:flex;gap:4px;align-items:center}.setchecks input{width:auto}.recipe-hero{background:linear-gradient(135deg,#e7d4c2,#c78e73);border-radius:16px;padding:22px;margin:12px 0;color:#3f2e28}.recipe-hero .emoji{font-size:36px}.ingredient{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:8px 0;font-size:13px}.step{padding:10px 0;border-bottom:1px solid var(--line)}.step b{color:var(--terra);margin-right:8px}.qty{display:flex;align-items:center;gap:10px}.qty button{padding:5px 11px}.batchtime{font:700 20px 'Playfair Display';color:var(--olive)}.expired{color:#a34d43}.checkrow{display:flex;gap:10px;align-items:center;border-bottom:1px solid var(--line);padding:10px 0}.checkrow input{width:auto}.checkrow.done span{text-decoration:line-through;color:#9c8e85}.weeklabel{font-weight:700}.calgrid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.calcell{min-height:62px;background:#f1e8df;border-radius:9px;padding:5px;font-size:10px}.calcell.today{outline:2px solid var(--terra)}.calcell .mark{display:block;color:var(--wine);font-weight:700}.celebrate{position:fixed;inset:0;z-index:20;display:grid;place-items:center;background:#392d29a8;animation:fade .25s}.celebratebox{background:var(--card);padding:30px;border-radius:24px;text-align:center;max-width:300px;animation:pop .45s}.celebratebox .big{font-size:48px}.confetti{position:fixed;z-index:21;pointer-events:none;font-size:26px;animation:fly 1.7s ease-out forwards}@keyframes pop{0%{transform:scale(.6)}75%{transform:scale(1.06)}100%{transform:scale(1)}}@keyframes fade{from{opacity:0}to{opacity:1}}@keyframes fly{from{transform:translateY(20px) rotate(0);opacity:1}to{transform:translateY(-220px) rotate(220deg);opacity:0}}#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:10px 16px;border-radius:30px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:30}#toast.show{opacity:1}footer{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding:18px 2px;color:var(--muted);font-size:12px}
@media(min-width:600px){#app{padding-left:28px;padding-right:28px}.stats{gap:12px}.card{padding:22px}}

/* FORM v3 — atmospheric editorial redesign */
:root{--paper:#f2eee7;--card:#fffdf8;--ink:#19191d;--muted:#77747b;--line:#e5e0d8;--wine:#29212d;--terra:#d94b91;--olive:#a7cbbd;--shadow:0 12px 34px #19191d0d}
body{background:var(--paper);color:var(--ink);font-family:'DM Sans',sans-serif}
#app{max-width:760px;padding:env(safe-area-inset-top) 16px 28px}
.sitehead{padding:24px 3px 20px}.brand{font:700 35px 'Space Grotesk';letter-spacing:-2px;color:#17171b}.brand span{color:#d94b91}.tagline{font-size:11px;letter-spacing:.02em}
.iconbtn{background:#1c1c22;color:white;border:0;border-radius:16px}
nav{top:0;background:#f2eee7eF;border-bottom:1px solid #e5e0d8;padding:8px 0 11px;gap:4px}
nav button{font-size:12px;font-weight:600;letter-spacing:.01em;border-radius:999px;padding:10px 8px}
nav button.active{background:#1c1c22;color:white;box-shadow:0 5px 14px #1c1c2220}
.page{padding:19px 0 36px}
h1{font:600 clamp(34px,8vw,48px)/1.02 'Space Grotesk';letter-spacing:-2.2px;margin:7px 0 16px;max-width:620px}
h2{font:600 22px/1.12 'Space Grotesk';letter-spacing:-.6px}
h3{font:600 17px 'Space Grotesk'}
.eyebrow{font:500 10px 'DM Mono';letter-spacing:1.2px;color:#b34b80;text-transform:uppercase}
p{color:#77747b}
.card,.workout,.recipe,.daycard{background:var(--card);border:1px solid var(--line);border-radius:23px;padding:18px;margin:13px 0;box-shadow:var(--shadow)}
.stats{gap:8px;margin:18px 0}.stat{background:#1c1c22;color:#fff;border-radius:19px;padding:15px 11px;min-width:0}.stat small{color:#c4bec8;font:10px 'DM Mono';letter-spacing:.4px}.stat strong{font:600 25px 'Space Grotesk';color:white}.bar{background:#ded9d2;height:6px}.bar i{background:linear-gradient(90deg,#d94b91,#ed9e83)}
button{background:#1d1d22;border-radius:14px;font-weight:600}
.soft{background:#eeebe5;color:#28242b}.textbtn{color:#a83d75;background:transparent}
.recipe-hero{background:radial-gradient(circle at 75% 20%,#f3a4c9 0,transparent 36%),linear-gradient(135deg,#22212a,#3b3543);color:white;border-radius:23px;padding:24px}
.recipe-hero p{color:#e3dce6}
.filters button{background:#e8e3dc;color:#353039;border-radius:999px}.filters button.active{background:#1d1d22;color:white}
.workout,.recipe{border-radius:21px}
.weekstrip{gap:4px}.daydot{background:#e8e3dc;border-radius:13px}.daydot.done{background:#d8e9e1;color:#355c4e}
.meal-slot{border-color:#e8e3dc}
input,select{background:#fffefa;border:1px solid #ddd7cf;border-radius:13px;color:#1d1d22}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #d94b9166;outline-offset:2px}
.nutrition-hero{position:relative;overflow:hidden;padding:25px;border-radius:27px;color:#fff;background:radial-gradient(ellipse at 82% 18%,#e64c9c 0,transparent 36%),radial-gradient(ellipse at 8% 95%,#74a99d 0,transparent 42%),linear-gradient(135deg,#17171c,#302837);box-shadow:0 18px 40px #24202d25}
.nutrition-hero h2{font:600 29px 'Space Grotesk';max-width:280px;margin:12px 0}
.nutrition-hero p{color:#e4dfe7;max-width:400px}
.nutri-pills{display:flex;flex-wrap:wrap;gap:7px;margin-top:18px}.nutri-pills span{border:1px solid #ffffff55;background:#ffffff12;border-radius:99px;padding:7px 11px;font-size:11px}
.profile-grid,.macro-entry{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
.profile-grid label,.macro-entry label{display:flex;flex-direction:column;gap:5px;color:#77747b;font-size:12px}
.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.actions button{flex:1;min-width:140px}
.target-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin:14px 0}
.target-tile{border-radius:17px;padding:14px;background:#f0ece6;display:flex;flex-direction:column;gap:2px}
.target-tile:first-child{background:linear-gradient(135deg,#25222c,#493344);color:white;grid-column:span 2}
.target-tile span{font-size:11px;color:inherit;opacity:.75}.target-tile strong{font:600 28px 'Space Grotesk'}.target-tile small{font-size:10px;opacity:.7}
.progress-list{display:grid;gap:12px;margin-top:16px}.progress-item .bar{margin-top:5px}
footer{border-top:1px solid var(--line);padding:18px 0;color:#888}
@media(max-width:420px){#app{padding-left:13px;padding-right:13px}.stats{grid-template-columns:repeat(3,minmax(0,1fr))}.stat{padding:12px 8px}.stat strong{font-size:21px}.profile-grid,.macro-entry{gap:9px}}

/* FORM v3.1 — full visual redesign + first-run personalisation */
:root{--paper:#f1eee8;--ink:#17171c;--muted:#77737b;--line:#e3ded6;--card:#fffdf9;--pink:#df4d9c;--sage:#a8cdbd;--peach:#f0a27c;--shadow:0 16px 44px #17171c12}
body{background:var(--paper);color:var(--ink);font-family:'DM Sans',sans-serif}
#app{max-width:760px;padding:env(safe-area-inset-top) 15px 30px}
.sitehead{padding:20px 4px 18px;align-items:center}
.brand{font:700 33px 'Space Grotesk';letter-spacing:-2.5px;color:#17171c}.brand span{color:var(--pink);font-size:25px;margin-left:3px}
.tagline{font:500 9px 'DM Mono';letter-spacing:1.1px;color:#817b83}
.head-actions{display:flex;align-items:center;gap:11px}.live-dot{width:8px;height:8px;background:#86bca6;border-radius:50%;box-shadow:0 0 0 5px #86bca622}
.iconbtn{background:#19191f;color:white;border:0;border-radius:15px;width:43px;height:43px}
nav{top:0;background:#f1eee8ed;backdrop-filter:blur(18px);border-bottom:1px solid #e3ded6;padding:9px 0 12px;gap:4px}
nav button{font-size:11px;letter-spacing:.1px;padding:10px 7px;border-radius:999px}
nav button.active{background:#19191f;color:white;box-shadow:0 5px 16px #19191f26}
.page{padding:16px 0 38px}
h1{font:600 clamp(39px,9vw,54px)/.98 'Space Grotesk';letter-spacing:-2.8px;margin:8px 0 14px}
h1 em{font-style:normal;color:#d94b91}
h2{font:600 22px/1.1 'Space Grotesk';letter-spacing:-.7px}
h3{font:600 17px 'Space Grotesk'}
.eyebrow{font:500 9px 'DM Mono';letter-spacing:1.25px;color:#b04a83}
p{color:#77737b}
.card,.workout,.recipe,.daycard{background:var(--card);border:1px solid var(--line);border-radius:23px;padding:18px;margin:13px 0;box-shadow:var(--shadow)}
.home-hero{position:relative;min-height:244px;overflow:hidden;border-radius:28px;padding:25px 22px;margin:0 0 17px;background:radial-gradient(ellipse at 78% 20%,#df4d9c 0,transparent 31%),radial-gradient(ellipse at 68% 94%,#8ebbad 0,transparent 38%),linear-gradient(135deg,#1a1920,#36303a);color:white;display:flex;align-items:center}
.hero-copy{position:relative;z-index:2;max-width:70%}.hero-copy .eyebrow{color:#f0a9ce}.hero-copy h1{font-size:clamp(43px,10vw,57px);margin:13px 0}.hero-copy p{color:#e7e1e9;font-size:13px;max-width:220px}
.hero-orb{position:absolute;right:-25px;top:28px;width:170px;height:170px;border:1px solid #ffffff35;border-radius:50%;display:grid;place-items:center;transform:rotate(-20deg)}
.hero-orb:before,.hero-orb:after{content:"";position:absolute;border:1px solid #ffffff50;border-radius:50%;inset:17px;transform:rotate(35deg) scaleX(.5)}
.hero-orb:after{inset:34px;transform:rotate(-40deg) scaleX(.55)}
.hero-orb span{font-size:54px;color:#f3a6cf}.hero-orb i,.hero-orb b{position:absolute;width:9px;height:9px;background:#a8d1c2;border-radius:50%;top:22px;left:30px}.hero-orb b{width:6px;height:6px;background:#f4b18d;top:auto;left:auto;right:30px;bottom:28px}
.stats{gap:8px;margin:14px 0 18px}.stat{background:#1b1a20;color:white;border-radius:18px;padding:14px 10px}.stat small{color:#c8c1cd;font:9px 'DM Mono';letter-spacing:.4px}.stat strong{font:600 24px 'Space Grotesk';color:white}.bar{height:5px;background:#ded9d2}.bar i{background:linear-gradient(90deg,#df4d9c,#f0a27c)}
button{background:#1b1a20;border-radius:14px;font-weight:600}
.soft{background:#ece8e2;color:#29252e}.textbtn{background:transparent;color:#a83f78}
.recipe-hero{background:radial-gradient(circle at 78% 18%,#df4d9c 0,transparent 35%),linear-gradient(135deg,#1d1c23,#413644);color:white;border-radius:22px;padding:24px}
.recipe-hero p{color:#e7e0e9}
.filters button{background:#e8e3dc;color:#353039;border-radius:999px}.filters button.active{background:#1d1d22;color:white}
.weekstrip{gap:4px}.daydot{background:#e8e3dc;border-radius:13px}.daydot.done{background:#d8e9e1;color:#355c4e}
.meal-slot{border-color:#e8e3dc}
input,select{background:#fffefa;border:1px solid #ddd7cf;border-radius:13px;color:#1d1d22}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #d94b9166;outline-offset:2px}
.nutrition-hero{position:relative;overflow:hidden;padding:25px;border-radius:27px;color:#fff;background:radial-gradient(ellipse at 82% 18%,#e64c9c 0,transparent 36%),radial-gradient(ellipse at 8% 95%,#74a99d 0,transparent 42%),linear-gradient(135deg,#17171c,#302837);box-shadow:0 18px 40px #24202d25}
.nutrition-hero h2{font:600 29px 'Space Grotesk';max-width:280px;margin:12px 0}.nutrition-hero p{color:#e4dfe7;max-width:400px}
.nutri-pills{display:flex;flex-wrap:wrap;gap:7px;margin-top:18px}.nutri-pills span{border:1px solid #ffffff55;background:#ffffff12;border-radius:99px;padding:7px 11px;font-size:11px}
.profile-grid,.macro-entry,.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
.profile-grid label,.macro-entry label,.field-grid label{display:flex;flex-direction:column;gap:5px;color:#77747b;font-size:12px}
.target-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin:14px 0}
.target-tile{border-radius:17px;padding:14px;background:#f0ece6;display:flex;flex-direction:column;gap:2px}
.target-tile:first-child{background:linear-gradient(135deg,#25222c,#493344);color:white;grid-column:span 2}
.target-tile span{font-size:11px;color:inherit;opacity:.75}.target-tile strong{font:600 28px 'Space Grotesk'}.target-tile small{font-size:10px;opacity:.7}
.progress-list{display:grid;gap:12px;margin-top:16px}
.onboarding{max-width:650px;margin:0 auto;padding:22px 4px 45px;min-height:90vh}
.onboard-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:36px}.step-label{font:10px 'DM Mono';letter-spacing:1px;color:#8b838c}
.onboard-intro{padding:0 5px 16px}.onboard-intro h1{font-size:clamp(47px,12vw,68px);margin:12px 0}.onboard-intro p{max-width:410px;font-size:14px}
.onboard-panel{background:#fffdf9;border:1px solid #e4ded6;border-radius:28px;padding:20px;box-shadow:0 18px 50px #201a2410}
.field-grid{margin:0 0 15px}.field-grid label{font-weight:600;color:#343039}.field-grid label span{font:10px 'DM Mono';font-weight:400;color:#948b94}
.field-grid input,.field-grid select,.wide-field select{margin-top:2px;min-height:48px}
.wide-field{display:flex;flex-direction:column;gap:7px;margin:15px 0;color:#343039;font-size:12px;font-weight:600}
.privacy-note{font-size:11px;line-height:1.5;background:#f1eee8;border-radius:14px;padding:12px;margin:15px 0}
.form-error{color:#a33c58;font-size:12px}.onboard-cta{width:100%;display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-radius:16px;background:#1b1a20;font-size:14px}.onboard-cta span{font-size:20px;color:#f0a2c9}
.skip-setup{width:100%;background:transparent;color:#77737b;margin-top:8px}
@media(max-width:420px){#app{padding-left:12px;padding-right:12px}.stats{grid-template-columns:repeat(3,minmax(0,1fr))}.stat{padding:12px 8px}.stat strong{font-size:21px}.profile-grid,.macro-entry,.field-grid{gap:9px}.onboard-panel{padding:16px}.hero-orb{right:-66px;opacity:.8}}

/* Premium FORM finish */
:root{--ink:#19181e;--paper:#f1eee8;--line:#e3ded6}
.macro-home-card{background:#fffdf9}
.chart-range{display:flex;gap:5px;margin:12px 0 5px}.chart-range button{background:#eeeae4;color:#706b74;border-radius:99px;padding:7px 12px;font-size:10px}.chart-range button.active{background:#201e25;color:#fff}
.macro-chart{position:relative;display:flex;align-items:stretch;justify-content:space-between;gap:5px;min-height:124px;padding:12px 3px 5px;border-radius:15px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 23px,#e9e4dd 24px)}
.macro-day{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:7px}
.macro-stack{height:94px;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:2px;border-bottom:1px solid #d8d2ca;padding:0 2px}
.macro-stack span{display:block;width:clamp(3px,1.25vw,8px);max-height:100%;min-height:2px;border-radius:4px 4px 1px 1px;opacity:.92}
.macro-day small{font:9px 'DM Mono';color:#827c85}
.macro-legend{display:flex;gap:11px;flex-wrap:wrap;margin:10px 0 15px}.macro-legend span{display:flex;align-items:center;gap:5px;font-size:10px;color:#77737b}.macro-legend i{width:7px;height:7px;border-radius:2px}
.macro-current-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0}
.macro-current{padding:11px;border-radius:14px;background:#f1eee8;min-width:0}
.macro-current>span{display:block;font-size:10px;color:#77737b}.macro-current>b{display:block;font:600 18px 'Space Grotesk';margin:3px 0}.macro-current>b small{font:10px 'DM Sans';color:#8b858d}
.macro-track{height:5px;border-radius:99px;background:#ded9d2;overflow:hidden}.macro-track i{display:block;height:100%;border-radius:99px}
.last-training-card{background:#211f27;color:white;border:0;overflow:hidden}
.last-training-card h2{color:white}.last-training-card .eyebrow{color:#e6a4c9}
.last-session{display:flex;align-items:center;gap:14px;padding:14px 0 3px}
.last-session-mark{width:67px;height:67px;flex:none;border-radius:17px;background:radial-gradient(circle at 80% 20%,#d94b91,transparent 54%),linear-gradient(140deg,#5e5364,#292630);display:flex;flex-direction:column;align-items:center;justify-content:center;font:9px 'DM Mono';letter-spacing:1px;color:#f6d5e7}
.last-session-mark b{font-size:11px;color:white}
.last-session-info{min-width:0;flex:1}.last-session-info h3{font:600 19px 'Space Grotesk';margin:5px 0;color:white}.last-session-info p{margin:0;color:#c5becb;font-size:12px}
.last-check{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#d6e8df;color:#315b4a;font-size:13px}
.last-empty{display:flex;gap:13px;align-items:center;padding:12px 0}.last-empty b{color:white}.last-empty p{color:#c5becb;font-size:12px;margin:4px 0}.last-mark{font:500 22px 'DM Mono';color:#e8a5c8}
.profile-identity{display:flex;align-items:center;gap:15px;padding:19px;border-radius:22px;background:radial-gradient(circle at 88% 10%,#df4d9c,transparent 36%),linear-gradient(135deg,#201e26,#39313e);color:white;margin:16px 0}
.profile-monogram{width:58px;height:58px;border-radius:18px;background:#ffffff16;border:1px solid #ffffff30;display:grid;place-items:center;font:600 25px 'Space Grotesk';color:#f0a8cd}
.profile-identity h2{color:white;margin:4px 0}.profile-identity p{color:#d2cbd6;font-size:11px;margin:0}
.recipe-index{width:42px;height:42px;flex:none;display:grid;place-items:center;border-radius:13px;background:#f0e9e3;color:#a44d7d;font:500 12px 'DM Mono';letter-spacing:1px}
.recipe-index.large{width:68px;height:68px;border-radius:20px;background:#ffffff17;border:1px solid #ffffff30;color:#f4bdd9;font-size:18px;margin-bottom:18px}
.recipe-index.small-index{width:25px;height:25px;display:inline-grid;border-radius:8px;font-size:9px;vertical-align:middle;margin-right:4px}
.danger-zone{border-color:#ead5d5}.danger-zone .eyebrow{color:#a14b58}.danger-actions{display:grid;gap:8px}.danger-btn{background:#9b4653;color:white}.danger-btn.outline{background:transparent;color:#9b4653;border:1px solid #d9b8bd}
@media(max-width:420px){.macro-current-grid{gap:7px}.macro-current{padding:9px}.last-session-mark{width:58px;height:58px}.recipe-index{width:36px;height:36px}}

/* Intake chart: muted target corridor (80–120% of target) */
.macro-stack span{position:relative;display:block;flex:0 0 clamp(4px,1.25vw,8px);height:90px;max-height:90px;min-height:0;border-radius:4px;background:linear-gradient(to top,transparent 0 48%,#e6e0d8 48% 72%,transparent 72% 100%)}
.macro-stack span i{position:absolute;left:0;right:0;bottom:0;height:calc(var(--v)*.6%);max-height:90px;border-radius:4px 4px 1px 1px;background:var(--c)}


/* FORM v4 navigation, menu and aesthetic modes */
:root{--accent:#d94b91;--accent-soft:#f3dce8;--accent-two:#e6a16f;--accent-cool:#a8cdbd}
body.theme-boy{--accent:#4e83b7;--accent-soft:#dce9f5;--accent-two:#65a9a5;--accent-cool:#9db8d0}
body.theme-boy h1 em{color:var(--accent)}
body.theme-boy .eyebrow{color:var(--accent)}
body.theme-boy .home-hero{background:radial-gradient(ellipse at 78% 20%,#4c83b9 0,transparent 34%),radial-gradient(ellipse at 68% 94%,#5ca9a2 0,transparent 38%),linear-gradient(135deg,#171d27,#303c4b)}
body.theme-boy .nutrition-hero{background:radial-gradient(ellipse at 82% 18%,#4c83b9 0,transparent 36%),radial-gradient(ellipse at 8% 95%,#5ca9a2 0,transparent 42%),linear-gradient(135deg,#171d27,#303c4b)}
body.theme-boy .last-training-card{background:#1e2935}
body.theme-boy .hero-orb span{color:#9dc5e8}
body.theme-boy .hero-orb i{background:#70b6ad}
body.theme-boy .hero-orb b{background:#8db6dd}
body.theme-boy .target-tile:first-child{background:linear-gradient(135deg,#202d3b,#354d63)}
body.theme-boy .macro-stack span i{background:var(--accent)}
body.theme-boy .profile-identity{background:radial-gradient(circle at 88% 10%,#4c83b9,transparent 36%),linear-gradient(135deg,#202d3b,#354d63)}
body.theme-boy .profile-monogram{color:#b8d8f2}
body.theme-boy .recipe-index{color:#477da9;background:#e4edf4}
body.theme-boy .recipe-index.large{color:#c1dcf4;background:#ffffff17}
#app{padding-bottom:100px}
.sitehead{position:relative;z-index:20}
.menu-trigger{width:43px;height:43px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;background:#fffefa;border:1px solid var(--line);border-radius:15px}
.menu-trigger span{display:block;width:17px;height:2px;border-radius:2px;background:var(--ink)}
.menu-backdrop{position:fixed;inset:0;z-index:100;background:#17151c55;display:flex;justify-content:flex-end;align-items:flex-start;padding:calc(env(safe-area-inset-top) + 68px) 13px 20px}
.menu-sheet{width:min(100%,390px);max-height:calc(100dvh - 105px);overflow:auto;background:#fffdf9;border:1px solid #ffffff80;border-radius:25px;padding:18px;box-shadow:0 22px 80px #17131f38;animation:menuIn .18s ease-out}
@keyframes menuIn{from{opacity:0;transform:translateY(-7px)}to{opacity:1;transform:translateY(0)}}
.menu-sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.menu-sheet-head h2{margin:5px 0 0;font-size:25px}
.menu-close{width:35px;height:35px;border-radius:50%;background:#f0ece6;color:#28252d;font-size:23px;line-height:1}
.menu-item{width:100%;display:flex;align-items:center;gap:12px;text-align:left;background:transparent;color:#27242c;border-bottom:1px solid #eee9e2;border-radius:0;padding:13px 2px}
.menu-item>span:nth-child(2){display:grid;gap:3px;flex:1}.menu-item small{font-size:10px;color:#8a838d;font-weight:400}.menu-item i{font-style:normal;color:#a69ca7}
.menu-item-icon{width:39px;height:39px;border-radius:13px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);font:600 16px 'Space Grotesk'}
.menu-subpanel{margin:14px 0 5px;padding:15px;border-radius:18px;background:#f5f1eb}
.menu-subpanel h3{margin:7px 0}.menu-subpanel p{font-size:11px;line-height:1.5;margin:5px 0 12px}
.theme-options{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.theme-choice{display:grid;gap:7px;text-align:left;padding:11px;border:1px solid #e4ddd5;background:#fffefa;color:#29252e;border-radius:15px}
.theme-choice small{font-size:9px;color:#827b84;font-weight:400}
.theme-choice.selected{outline:2px solid var(--accent);border-color:transparent}
.theme-swatch{width:100%;height:29px;border-radius:9px;background:linear-gradient(100deg,#d94b91,#e9a77e,#b6a1d1)}
.boy-theme .theme-swatch{background:linear-gradient(100deg,#477eb8,#5ca9a2,#9ebbd5)}
.menu-sound{width:100%;margin-top:11px;display:flex;justify-content:space-between;background:#fffefa;color:#27242c;border:1px solid #e7e0d8}
.menu-sound b{color:var(--accent)}
.about-signature{font:9px 'DM Mono';letter-spacing:1px;color:#8b818c;margin-top:15px}.about-signature span{color:var(--accent)}
.menu-signout{width:100%;margin-top:13px;background:transparent;color:#9a4b58;border:1px solid #e7d5d7}
.bottom-nav{position:fixed;z-index:50;left:50%;bottom:calc(env(safe-area-inset-bottom) + 10px);transform:translateX(-50%);width:min(calc(100% - 26px),440px);display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:7px;background:#201e25;color:#fff;border:1px solid #ffffff20;border-radius:22px;box-shadow:0 10px 35px #17131f35}
.bottom-nav button{min-height:55px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:transparent;color:#bdb7c1;border-radius:15px;font-size:10px;font-weight:500}
.bottom-nav button.active{background:#ffffff17;color:#fff}
.bottom-nav .nav-glyph{font-size:19px;line-height:1.15;color:#e4a6c8}
body.theme-boy .bottom-nav .nav-glyph{color:#9dc5e8}
.section-tabs{display:flex;gap:6px;overflow-x:auto;padding:4px 0 13px;margin:10px 0 13px;scrollbar-width:none}
.section-tabs::-webkit-scrollbar{display:none}
.section-tabs button{flex:none;background:#e9e4dd;color:#77717b;border-radius:999px;padding:9px 14px;font-size:11px}
.section-tabs button.active{background:#211f27;color:#fff}
body.theme-boy .section-tabs button.active{background:#24384b}
@media(min-width:700px){.bottom-nav{width:390px}.menu-backdrop{padding-right:max(20px,calc((100vw - 700px)/2))}}

/* v5: true app-level navigation */
.bottom-nav{position:fixed!important;left:50%!important;bottom:calc(env(safe-area-inset-bottom) + 10px)!important;transform:translateX(-50%)!important;z-index:120!important}
#nav.hidden{display:none!important}
#main{padding-bottom:90px}
.menu-backdrop{z-index:150}


/* FORM v6 — hard overrides for mobile layout and hidden states */
.hidden,
.menu-backdrop.hidden,
.bottom-nav.hidden{display:none!important}
.menu-backdrop{position:fixed!important;inset:0!important;display:flex;align-items:flex-start!important;justify-content:flex-end!important;z-index:300!important}
.menu-backdrop.hidden{display:none!important}
.menu-sheet{width:min(390px,calc(100vw - 26px))!important;max-height:calc(100dvh - 100px)!important;height:auto!important;min-height:0!important;overflow-y:auto!important;align-self:flex-start!important;flex:none!important}
.bottom-nav{position:fixed!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:stretch!important;justify-content:stretch!important;left:50%!important;right:auto!important;top:auto!important;bottom:calc(env(safe-area-inset-bottom) + 10px)!important;width:min(calc(100vw - 26px),440px)!important;height:auto!important;min-height:0!important;max-height:76px!important;flex:none!important;overflow:visible!important;padding:7px!important;margin:0!important;transform:translateX(-50%)!important;z-index:200!important}
.bottom-nav button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;flex:none!important;width:100%!important;height:55px!important;min-height:55px!important;max-height:55px!important;margin:0!important;padding:5px!important;white-space:normal!important}
#main{padding-bottom:100px!important}
body:has(#onboarding:not(.hidden)) .bottom-nav{display:none!important}

/* FORM v7 nutrition engine */
.daily-kcal{font:600 21px 'Space Grotesk';letter-spacing:-.5px;margin:10px 0 14px;color:var(--ink)}
.today-meal-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.today-meal-row>span{display:grid;gap:3px}.today-meal-row small{font-size:10px;color:var(--muted)}
.eaten-label{display:inline-block;color:#4d8b72;background:#e2f0e8;border-radius:20px;padding:4px 8px;margin-top:5px;width:max-content}
.week-nutrition-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}
.week-nutrition-grid>div{background:var(--surface-2);border-radius:14px;padding:12px 8px;display:grid;gap:4px}
.week-nutrition-grid b{font:600 20px 'Space Grotesk';color:var(--ink)}
.week-nutrition-grid small{font-size:9px;color:var(--muted)}


/* FORM v8 — friendly in-app pickers, no browser prompt dialogs */
.ux-overlay{position:fixed;inset:0;z-index:500;background:rgba(28,24,31,.48);display:flex;align-items:flex-end;justify-content:center;padding:12px 12px calc(env(safe-area-inset-bottom) + 12px);backdrop-filter:blur(5px)}
.ux-overlay.hidden{display:none!important}
.ux-sheet{width:min(100%,520px);max-height:min(88dvh,820px);overflow:hidden;display:flex;flex-direction:column;background:var(--paper,#fffdf9);border:1px solid #ffffffa8;border-radius:27px;padding:20px 17px 16px;box-shadow:0 25px 80px #17131f42;animation:uxSheetIn .2s ease-out}
@keyframes uxSheetIn{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
.ux-sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.ux-sheet-head h2{margin:5px 0 3px;font-size:25px;letter-spacing:-.8px}
.ux-sheet-head p{margin:0}
.ux-close{width:36px;height:36px;flex:none;border-radius:50%;background:#f0ece6;color:#302c34;font-size:24px;line-height:1}
.ux-search{width:100%;border:1px solid var(--line);background:#f7f3ed;border-radius:14px;padding:13px 14px;font:inherit;font-size:13px;color:var(--ink);outline:none}
.ux-search:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.ux-chips{display:flex;gap:7px;overflow-x:auto;padding:12px 0 10px;scrollbar-width:none}
.ux-chips button{flex:none;border-radius:999px;padding:8px 13px;background:#eee9e2;color:#77717b;font-size:10px}
.ux-chips button.active{background:#24212a;color:white}
.ux-recipe-results{overflow-y:auto;min-height:110px;max-height:40dvh;padding:1px 1px 12px;overscroll-behavior:contain}
.ux-recipe-option{width:100%;display:flex;align-items:center;gap:11px;text-align:left;padding:12px 9px;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);border-radius:13px}
.ux-recipe-option.selected{background:var(--accent-soft);border-color:transparent}
.ux-recipe-copy{display:grid;gap:4px;min-width:0;flex:1}
.ux-recipe-copy b{font-size:12px;font-weight:600}
.ux-recipe-copy small{font-size:9px;color:var(--muted);line-height:1.4}
.ux-radio{width:23px;height:23px;flex:none;border-radius:50%;display:grid;place-items:center;border:1px solid #d9d1d8;color:white;font-size:12px}
.ux-recipe-option.selected .ux-radio{background:var(--accent);border-color:var(--accent)}
.ux-empty{padding:25px 8px;text-align:center}
.ux-selected{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding:13px 2px 10px}
.ux-selected>div:first-child{display:grid;gap:4px;min-width:0}.ux-selected b{font-size:12px;overflow:hidden;text-overflow:ellipsis}
.ux-stepper{display:flex;align-items:center;gap:13px;background:#f1ece5;border-radius:99px;padding:5px}
.ux-stepper button{width:31px;height:31px;border-radius:50%;background:#fff;color:var(--ink);font-size:18px}
.ux-stepper strong{min-width:24px;text-align:center;font:600 14px 'Space Grotesk'}
.ux-primary{width:100%;min-height:49px;border-radius:15px;background:#24212a;color:white;font-weight:600;margin-top:9px}
.ux-primary:disabled{opacity:.38}
.ux-target-sheet{max-height:85dvh}
.ux-target-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px;overflow-y:auto;padding:3px 1px 12px}
.ux-target-grid label{display:grid;gap:5px;font-size:11px;font-weight:600;color:var(--ink)}
.ux-target-grid label span{font-size:9px;color:var(--muted);font-weight:400}
.ux-target-grid input{width:100%;min-width:0;padding:12px;border-radius:12px;border:1px solid var(--line);background:#f8f5f0;color:var(--ink);font:inherit;font-size:13px}
@media(min-width:600px){.ux-overlay{align-items:center}.ux-sheet{border-radius:27px}.ux-recipe-results{max-height:45dvh}}

/* FORM v9 — day-led planning + food diary */
.diary-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:22px 2px 10px}.diary-intro h2{font-size:25px;margin:2px 0 5px}.diary-intro p{font-size:13px;max-width:390px;margin:0}.diary-date,.day-count{font:11px 'DM Mono';letter-spacing:.2px;color:#a34279;background:#f4e4ed;border-radius:999px;padding:8px 11px;white-space:nowrap}.diary-card{padding:18px}.diary-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}.diary-actions button{padding:13px 10px}.diary-recipe-btn{background:#24232a;color:white}.today-meal-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.today-meal-row:last-child{border-bottom:0}.today-meal-row b{display:block;font-size:13px}.today-meal-row small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.planner-day-picker{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin:14px 0 12px}.planner-day{padding:9px 2px 8px;background:#e9e4dd;color:#4a454b;border-radius:15px;display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}.planner-day span{font:10px 'DM Mono';text-transform:uppercase;color:#77717b}.planner-day b{font:600 20px 'Space Grotesk'}.planner-day small{font-size:8px;color:#8c838a;white-space:nowrap}.planner-day.active{background:#222128;color:white;box-shadow:0 5px 16px #211e2920}.planner-day.active span,.planner-day.active small{color:#e6b5d0}.planner-selected-day{padding:18px}.planner-selected-day .dayhead{margin-bottom:6px}.planner-selected-day .dayhead h2{font-size:25px;margin:0}.planner-selected-day .meal-slot{grid-template-columns:65px minmax(0,1fr) auto;padding:14px 0}.planner-selected-day .slotactions{align-items:center}.planner-selected-day .slotmeal{font-size:14px;font-weight:600}.food-selected{border-top:1px solid var(--line);padding-top:16px;margin-top:14px}.food-selected label{display:block;margin:12px 0}.food-preview{font-size:12px;color:var(--muted);padding:10px 0 14px}.ux-sheet .food-selected .ux-primary{width:100%}.diary-card .progress-item{margin:11px 0}.diary-card .progress-item .bar{height:7px}
@media(max-width:380px){.planner-day-picker{gap:4px}.planner-day{border-radius:12px}.planner-day small{font-size:7px}.planner-selected-day .meal-slot{grid-template-columns:55px minmax(0,1fr) auto;gap:5px}.diary-actions{grid-template-columns:1fr}.diary-date{font-size:10px}}

.auth-links{display:flex;justify-content:flex-end;margin:0 0 8px}.auth-links .textbtn{font-size:12px;text-decoration:underline;text-underline-offset:3px}.auth .actions{margin-top:10px}.auth .small{min-height:18px;line-height:1.5}

/* FORM v14 product UX refinements */
.menu-trigger.hidden{display:none!important}
.home-action-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.stat-action{appearance:none;text-align:left;width:100%;cursor:pointer;border:1px solid var(--line,rgba(0,0,0,.08));border-radius:18px;background:var(--card,#fff);padding:16px;display:flex;flex-direction:column;gap:7px;color:inherit;font:inherit;min-height:128px;transition:transform .18s ease,border-color .18s ease}
.stat-action:active{transform:scale(.985)}
.stat-action:focus-visible{outline:2px solid var(--accent,#d94b91);outline-offset:3px}
.stat-action strong{font-size:1.65rem;line-height:1.1}
.stat-action .stat-hint{font-size:.72rem;opacity:.68;margin-top:auto}
.stat-action .bar{width:100%;height:5px;border-radius:99px;overflow:hidden;background:rgba(120,120,120,.16)}
.stat-action .bar i{display:block;height:100%;border-radius:inherit;background:var(--accent,#d94b91)}
.log-food-primary{margin:18px 0 22px;padding:22px}
.log-food-primary h2{margin:.25rem 0 .4rem}
.log-food-primary .actions{display:grid;grid-template-columns:1fr;gap:9px}
.onboard-target-preview{margin:16px 0;padding:16px;background:rgba(217,75,145,.06)}
.onboard-target-preview p{margin:6px 0 0}
@media(min-width:600px){.home-action-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.log-food-primary .actions{grid-template-columns:1fr 1fr}}

/* FORM v15 quality-of-life features */
.food-result-row{display:flex;align-items:center;gap:8px}.food-result-row .ux-recipe-option{flex:1;min-width:0}.food-fav-toggle{border:1px solid var(--line,rgba(0,0,0,.1));background:var(--card,#fff);border-radius:12px;min-width:42px;min-height:42px;font-size:1.2rem;color:var(--accent,#d94b91)}
.food-shortcuts{display:grid;gap:12px;margin:12px 0}.food-shortcuts b{font-size:.82rem}.food-shortcuts .ux-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}.food-shortcuts .chip{border:1px solid var(--line,rgba(0,0,0,.12));border-radius:99px;padding:7px 11px;background:transparent;color:inherit}
.grocery-category{margin:14px 0}.grocery-category h3{font-size:.9rem;margin:0 0 8px;color:var(--muted,#777)}
.plan-actions{justify-content:flex-end;gap:8px;margin:12px 0}
.training-history-card{margin-top:22px}.batch-serving{font-size:.72rem;display:flex;align-items:center;gap:6px}.batch-serving input{width:64px;min-height:38px}
.home-week-insight{background:linear-gradient(135deg,rgba(217,75,145,.10),rgba(230,161,111,.10))}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent,#d94b91);outline-offset:3px}
button{touch-action:manipulation}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}


/* Native-app-like interaction on touch devices */
html, body {
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}
body {
  /* Allow both vertical page scroll and horizontal chips/tabs; pinch remains disabled. */
  touch-action: pan-x pan-y;
  -webkit-tap-highlight-color: transparent;
}
button, a, [role="button"], input, select, textarea {
  touch-action: manipulation;
}


/* iOS Safari auto-zooms focused form controls below 16px. Keep the visual scale stable. */
@media screen and (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

.food-source-note{margin:7px 2px 10px;color:var(--muted);font-size:10px;line-height:1.45}

/* FORM v22 — personal nutrition, recipes, pantry and data portability */
.nutrient-pref-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:14px 0}
.nutrient-pref{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:15px;background:#fffdfa;min-width:0}
.nutrient-pref input{width:18px;height:18px;accent-color:var(--pink);flex:0 0 auto}
.nutrient-pref span{display:flex;flex-direction:column;gap:2px}.nutrient-pref b{font-size:13px}.nutrient-pref small{font-size:10px;color:var(--muted)}
.recipe-actions{margin:10px 0 4px}.recipe-actions button{white-space:nowrap}
#recipe-builder .ux-sheet label{display:flex;flex-direction:column;gap:6px;margin:12px 0;font-size:12px;color:var(--muted)}
#recipe-builder textarea{width:100%;padding:12px;border:1px solid var(--line);border-radius:13px;background:#fffefa;color:var(--ink);font:13px/1.5 'DM Sans',sans-serif;resize:vertical}
#recipe-builder input,#recipe-builder select{width:100%;padding:12px;font-size:16px}
#recipe-builder .form-error{color:#a33b55;font-size:12px;min-height:18px}
.grocery-groups .checkrow{display:flex;align-items:center;justify-content:space-between;gap:10px}
@media(max-width:420px){.nutrient-pref-grid{grid-template-columns:1fr 1fr}.nutrient-pref{padding:10px 8px}}
