/* The member area is an app shell: only the content scrolls. The tool dock is
   a normal grid row, so Safari cannot leave a fixed floating bar mid-screen. */
body.member-view{position:fixed;inset:0;width:100%;height:var(--visual-viewport-height,100dvh);min-height:0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overscroll-behavior:none}
body.member-view>.topbar{width:100%;position:relative;top:auto;height:auto;min-height:68px;padding:calc(10px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 10px max(18px,env(safe-area-inset-left));box-sizing:border-box}
.topbar .account-actions{display:flex;align-items:center;gap:8px}
body.member-view>.topbar .account-actions{margin-inline-start:auto}
body.member-view>.topbar .account-actions button{width:44px;height:44px}
body.member-view>main{min-height:0;min-width:0;overflow:hidden auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scroll-padding:18px 0 28px}
body.member-view .app-shell{padding:14px 24px 28px;min-height:0}
body.member-view .s4-project-footer{padding:20px 20px 26px;margin-top:20px}
[data-app-panel][hidden],#mealUnitNote[hidden]{display:none!important}
body.member-view #bottomNav{position:relative;inset:auto;bottom:auto;left:auto;transform:none;width:100%;max-width:none;box-sizing:border-box;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;margin:0;padding:7px max(12px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:flex;justify-content:center;gap:4px;background:var(--surface);color:var(--text);z-index:15}
body.member-view #bottomNav button{flex:1;max-width:110px;width:auto;min-height:54px;padding:7px 5px;color:var(--text-soft);border-radius:13px;line-height:1.25;font-size:21px}
body.member-view #bottomNav span{font-size:11px;margin-top:3px}
body.member-view #bottomNav button.active{background:var(--surface-soft);color:var(--text);font-weight:800}
[data-theme=dark] body.member-view #bottomNav{border-top-color:var(--line);background:#16291d}
[data-theme=dark] body.member-view #bottomNav button.active{background:#2b4830;color:#d8fa93}
.keyboard-open body.member-view #bottomNav{display:none}
.keyboard-open body.member-view{grid-template-rows:auto minmax(0,1fr)}
body.member-view .section{margin-top:12px}body.member-view .section-head h2{font-size:32px}
.measurement-grid,.measurement-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.measurement-grid{margin:16px 0}
.measurement-field fieldset{margin:0;padding:0;min-width:0}
.measurement-field legend{font-weight:700;margin-bottom:6px}
.measurement-field input{min-width:0;width:100%;box-sizing:border-box;font-size:16px}
.measurement-field [hidden],.profile-measurements[hidden]{display:none}
.profile-measurements{display:grid;gap:8px;margin:12px 0 16px;font-size:13px}
.profile-measurements>div{display:flex;justify-content:space-between;gap:12px}
.profile-measurements dt{color:var(--text-soft)}
.profile-measurements dd{font-weight:700;margin:0}
.chart-bars[data-display-units=imperial] span:not(:last-child) i{display:none}
.chart-bars span:last-child i{right:0}
@media(max-width:520px){
 .measurement-grid{grid-template-columns:minmax(0,1fr);gap:8px}
}
.food-log-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.food-log-actions>button{padding:12px 16px;min-height:44px;font-size:13px}
.food-log{display:grid;gap:22px}
.food-log-group{border:1px solid var(--line);border-radius:18px;background:var(--surface);overflow:hidden}
.food-log-group h3{font-size:14px;letter-spacing:-.2px;margin:0;padding:15px 17px;border-bottom:1px solid var(--line);background:var(--surface-soft)}
.food-log-group .food-log-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 17px;margin:0;border:0;border-radius:0;background:transparent;color:var(--text)}
.food-log-group .food-log-item+.food-log-item{border-top:1px solid var(--line)}
.food-log-group .food-log-item b{font-size:14px;line-height:1.45;display:block}
.food-log-group .food-log-item small{display:block;font-size:12px;line-height:1.4;color:var(--text-soft);margin-top:3px}
.food-log-group .food-log-item [data-undo-food]{font-size:12px;padding:8px 0 8px 10px;min-height:44px;flex-shrink:0;color:var(--text-soft)}
.food-log-group .food-log-item>div{min-width:0;overflow-wrap:anywhere}
.food-log-group .food-log-item:focus{outline:2px solid currentColor;outline-offset:-3px;background:var(--surface-soft)}
#livingFoodLog{min-height:44px;padding:4px 8px;font-size:12px;text-decoration:underline}
.meal-multiple{color:var(--text-soft);font-size:13px;white-space:nowrap}
.earlier-log-note{color:var(--text-soft);font-size:12px;line-height:1.65}
.earlier-log-note summary{cursor:pointer;min-height:36px}
.rollover-disclosure{margin:24px 0;border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:0 18px}
.rollover-disclosure>summary{cursor:pointer;padding:17px 0;font-size:14px;font-weight:700}
.rollover-disclosure .rollover-card{padding:10px 0 20px;margin:0;border:0;border-radius:0;background:transparent}
.rollover-disclosure .rollover-card h2{font-size:25px}
.day-totals{display:block;margin:18px 0 24px;padding:18px 20px;background:var(--surface-soft);border-color:var(--line)}
.day-energy{display:flex;align-items:center;justify-content:space-between;gap:14px}
.day-totals .day-energy small{font-size:12px;color:var(--text-soft);text-transform:none}
.day-totals .day-energy b{font-size:29px;color:var(--text);margin-top:5px}
.day-totals .day-energy b span{font-size:13px}
.day-totals .day-energy p{font-size:12px;max-width:140px;margin:0;text-align:right;line-height:1.5}
.day-totals>details{margin-top:13px;border-top:1px solid var(--line);padding-top:10px}
.day-totals summary{font-size:12px;min-height:28px;cursor:pointer;color:var(--text-soft)}
.day-macros{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:10px 0 3px}
.day-macros b{font-size:20px}.day-macros b span{display:block;font-size:11px}.day-macros small{font-size:11px;color:var(--text-soft)}
.day-meals{gap:26px}
.meal-course-group>header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.meal-course-group>header>div{display:flex;gap:10px;align-items:baseline}
.meal-course-group>header h3{font-size:20px;letter-spacing:-.4px;margin:0}
.meal-course-group>header small{font-size:12px;color:var(--text-soft)}
.meal-course-group>header button{font-size:13px;padding:8px 4px;min-height:44px}
.empty-course{padding:14px 17px;border:1px dashed var(--line);border-radius:14px;color:var(--text-soft);font-size:13px;margin:0}
.day-meals .planned-meal{display:flex;align-items:center;gap:10px;padding:13px 15px;margin-bottom:9px;overflow:visible;background:var(--surface);border-color:var(--line);position:relative}
.day-meals .planned-main{display:grid;grid-template-columns:32px minmax(0,1fr);flex:1;min-width:0;gap:11px;padding:0;align-items:center}
.day-meals .recipe-symbol{font-size:25px}
.day-meals .recipe-title{font-size:16px;letter-spacing:-.25px;line-height:1.35;overflow-wrap:anywhere;color:var(--text)}
.day-meals .planned-main p{font-size:12px;line-height:1.6;color:var(--text-soft);margin:4px 0 0}
.day-meals .planned-controls{display:flex;align-items:center;flex-wrap:nowrap;gap:5px;border:0;padding:0;background:transparent;flex-shrink:0}
.day-meals .planned-controls>button{padding:10px 13px;min-height:44px;flex:none;font-size:12px;white-space:nowrap}
.meal-options{position:relative}.meal-options>summary{display:grid;place-items:center;font-size:15px;letter-spacing:1px;list-style:none;width:38px;height:44px;cursor:pointer;border-radius:10px}
.meal-options>summary::-webkit-details-marker{display:none}.meal-options[open]>summary{background:var(--surface-soft)}
.meal-options>div{position:absolute;right:0;top:48px;z-index:5;box-sizing:border-box;width:240px;max-width:calc(100vw - 48px);padding:10px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:0 8px 24px #0002}
.day-meals .meal-options .check{font-size:12px;white-space:normal;line-height:1.4;margin:0;min-height:44px;gap:9px}
.day-meals .meal-options .check input{width:18px;height:18px;flex-shrink:0}
.day-meals .meal-options button{font-size:12px;min-height:44px;padding:8px 0;width:100%;text-align:left}
.suggestion-panel{padding:20px;margin:26px 0;background:var(--surface-soft);border:1px solid var(--line);color:var(--text)}
[data-theme=dark] .suggestion-panel{background:var(--surface-soft);border-color:var(--line)}
.suggestion-panel h3{font-size:21px;line-height:1.25;margin:0 0 8px;color:var(--text)}
.suggestion-panel p,.suggestion-panel .fineprint{font-size:12px;line-height:1.65;color:var(--text-soft);margin:8px 0}
.suggestion-items{display:block;margin:12px 0}.suggestion-items summary{font-size:13px;cursor:pointer;min-height:34px;padding-top:6px}
.suggested-course{display:grid;gap:6px;font-size:12px;padding:12px 0;border-top:1px solid var(--line)}
.suggested-course>b{font-size:12px}.suggested-course span{color:var(--text-soft)}
.suggestion-items .proposal-total{color:var(--text);font-weight:700}
.suggestion-panel .primary{min-height:46px;font-size:13px;margin:4px 0 3px}
.recipe-library{margin:22px 0}.recipe-library>summary{font-size:17px;font-weight:800;padding:17px 20px;border:1px solid var(--line);border-radius:16px;background:var(--surface);cursor:pointer}
.recipe-library .library-heading{margin-top:24px}.recipe-library .library-heading h2{font-size:27px}
.recipe-library .meal-body p{display:none}.recipe-library .meal-meta{font-size:12px}
@media(max-width:800px){body.member-view .app-shell{padding:12px 18px 24px}body.member-view .greeting{margin:12px 0 22px}body.member-view .greeting h1{font-size:32px}.food-log-section>.section-head{display:block}.food-log-actions{justify-content:flex-start;margin:18px 0}.food-log-group h3{padding:13px 15px}.food-log-group .food-log-item{padding:11px 15px}.day-totals{padding:16px}.day-totals .day-energy b{font-size:25px}.day-energy{align-items:flex-start}.day-energy p{max-width:105px;padding-top:6px}.day-meals .planned-meal{flex-wrap:wrap;gap:8px;padding:13px}.day-meals .planned-main{flex-basis:calc(100% - 24px)}.day-meals .planned-controls{width:100%;justify-content:flex-end;padding-left:43px;box-sizing:border-box}.day-meals .planned-controls>button{flex:1;max-width:none}.day-meals .meal-options{flex:none}.day-meals .recipe-title{font-size:16px}.meal-course-group>header h3{font-size:20px}.recipe-library .meal-body h3{font-size:19px}.recipe-library .meal-body .primary{min-height:44px;padding:10px 12px}.rollover-disclosure{padding:0 16px}.day-macros{gap:10px}}
@media(prefers-reduced-motion:reduce){body.member-view>main{scroll-behavior:auto}}
