*{box-sizing:border-box}body{margin:0;background:#f5f6f8;color:#202c39;font-family:system-ui,-apple-system,sans-serif;font-size:15px}header{display:flex;align-items:center;gap:12px;padding:18px 20px;background:#fff;position:sticky;top:0;z-index:5;border-bottom:1px solid #edf0f1}header img{width:40px;height:40px;border-radius:12px}header strong{font-size:25px}small{display:block;color:#77828c;font-size:11px;margin-top:3px}header button{margin-left:auto}main{max-width:850px;margin:auto;padding:20px 18px 110px}h1{font-size:28px;margin:0 0 8px}h2{font-size:20px;margin:0 0 14px}h3{font-size:16px;margin:0 0 8px}p{line-height:1.55}.muted{color:#77828c;font-size:13px}.card{background:white;border-radius:22px;padding:21px;margin:14px 0;box-shadow:0 2px 10px #202c3904;border:1px solid #edf0f1}.hero{background:#e8f2ed;border:0}.hero strong{font-size:30px}.eyebrow{font-size:10px;letter-spacing:1px;color:#257d67;font-weight:750;margin-bottom:9px}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}button{border:0;border-radius:13px;background:#edf2f0;color:#257d67;font:inherit;font-size:13px;font-weight:600;padding:12px 14px;cursor:pointer}button.primary{background:#257d67;color:white}button.danger{background:#fbecea;color:#a33d3d}button:disabled{opacity:.45}.pill{display:inline-block;border-radius:20px;padding:6px 10px;background:#edf2f0;color:#257d67;font-size:11px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.stat{padding:16px 10px;border-radius:16px;background:#f5f7f6}.stat b{font-size:19px;display:block}.track{height:7px;background:#e8eeeb;border-radius:8px;margin:10px 0;overflow:hidden}.track i{display:block;background:#257d67;height:100%;border-radius:8px}.line{padding:14px 0;border-top:1px solid #edf0f1}.line:first-child{border:0}label{display:block;font-size:12px;color:#77828c;margin:15px 0 6px}input,select,textarea{width:100%;padding:13px;border:1px solid #dce3df;border-radius:13px;font:inherit;font-size:15px;background:white;color:#202c39;min-height:46px}input[type=checkbox]{width:22px;min-height:22px;accent-color:#257d67}input[type=date]{color:#257d67;font-weight:550;min-width:0}textarea{min-height:90px}input:focus,select:focus,textarea:focus{outline:2px solid #84b7a4;outline-offset:1px}nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:6;background:#fff;border-top:1px solid #e7ece9;overflow-x:auto;padding:9px 8px;gap:5px;justify-content:space-around}nav button{background:white;color:#77828c;min-width:61px;padding:8px 5px;font-size:10px}nav button b{display:block;font-size:21px;margin-bottom:4px}nav button.active{background:#e8f2ed;color:#257d67}dialog{border:0;border-radius:24px;width:calc(100% - 24px);max-width:510px;max-height:90vh;padding:24px;box-shadow:0 20px 70px #0003}dialog::backdrop{background:#14251b66}dialog .actions{position:sticky;bottom:-24px;background:white;padding:15px 0 2px}.error{color:#a33d3d;white-space:pre-wrap;font-size:13px}.bubble{white-space:pre-wrap;overflow-wrap:anywhere}.photos{display:flex;gap:10px;overflow-x:auto}.photos img{width:112px;height:100px;object-fit:contain;border-radius:12px;background:#edf2f0}.photo{flex-shrink:0}.photo button{display:block;margin-top:5px}#toast{position:fixed;bottom:95px;left:20px;right:20px;background:#202c39;color:#fff;border-radius:14px;padding:14px;display:none;z-index:30;max-width:650px;margin:auto}details{padding:12px 0}summary{color:#257d67;cursor:pointer}.checkrow{display:flex;gap:10px;align-items:center}.checkrow label{margin:0;color:#202c39}.badge{font-size:11px;color:#257d67}.dob{display:grid;grid-template-columns:1fr 1.3fr 1fr;gap:8px}.toolbar{display:flex;gap:8px;align-items:center;margin:14px 0}.toolbar input{flex:1}.edit{min-width:75px}a{color:#257d67}.chart{display:flex;gap:3px;height:70px;align-items:end}.chart i{background:#89baa6;flex:1;border-radius:5px 5px 0 0;min-height:3px}@media(min-width:700px){nav{max-width:850px;margin:auto;border-radius:20px 20px 0 0}main{padding-bottom:120px}}
nav{gap:0}nav button{min-width:0;flex:1;padding:8px 2px;font-size:9px}nav button b{font-size:20px}

/* The same green, amber and violet nutrient colours as the Windows cards. */
.protein{--macro-color:#257d67;--macro-tint:#eaf4ef}.carbs{--macro-color:#a57425;--macro-tint:#faf2e4}.fat{--macro-color:#7772b1;--macro-tint:#f0eef8}
.macro-item{padding:17px 0;border-top:1px solid #edf0f1}.macro-top{display:grid;grid-template-columns:32px 1fr auto;gap:9px;align-items:center}.macro-icon{width:32px;height:32px;display:grid;place-items:center;background:var(--macro-tint);border-radius:10px;font-size:19px}.macro-name{font-size:14px;font-weight:650;color:var(--macro-color)}.macro-value{white-space:nowrap;font-variant-numeric:tabular-nums}.macro-value b{font-size:23px;font-weight:650;letter-spacing:-.5px}.macro-target{color:#77828c;font-size:12px}.macro-track{height:8px;border-radius:8px;background:var(--macro-tint);margin:12px 0 7px;overflow:hidden}.macro-track i{display:block;height:100%;border-radius:8px;background:var(--macro-color)}.macro-remaining{font-size:11px;color:var(--macro-color);margin:0 0 5px}.macro-purpose{font-size:11px;color:#77828c;margin:0;line-height:1.45}.macro-pills{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:12px 0}.macro-pill{border-radius:12px;background:var(--macro-tint);color:var(--macro-color);padding:9px 8px}.macro-pill small{color:inherit;font-size:10px;margin:0 0 4px}.macro-pill b{font-size:15px;font-weight:650;font-variant-numeric:tabular-nums}@media(max-width:360px){.macro-top{gap:6px;grid-template-columns:28px 1fr auto}.macro-icon{width:28px;height:28px}.macro-name{font-size:12px}.macro-value b{font-size:20px}.macro-target{font-size:11px}}

.energy-summary{display:grid;grid-template-columns:154px minmax(0,1fr);align-items:center;gap:20px;margin:20px 0 15px}.calorie-ring{--progress:0%;width:154px;height:154px;border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(from -90deg,#ed986e var(--progress),#d9e7df 0)}.calorie-ring:before{content:'';position:absolute;inset:12px;background:#f6faf7;border-radius:50%}.calorie-center{position:relative;display:flex;flex-direction:column;align-items:center}.hero .calorie-number{font-size:32px;font-weight:700;letter-spacing:-1px;line-height:1.1}.calorie-unit{font-size:12px;color:#667a6c;margin-top:4px}.calorie-caption{font-size:10px;color:#778b7d;margin-top:3px}.energy-details{display:grid;gap:23px}.energy-detail-label{font-size:11px;color:#667a6c;display:block;line-height:1.35;margin-bottom:4px}.energy-detail-value{white-space:nowrap;font-variant-numeric:tabular-nums}.energy-detail-value b{font-size:22px;font-weight:650;letter-spacing:-.5px}.energy-detail-value span{font-size:11px;color:#667a6c}.energy-gap b{color:#257d67}.energy-foot{text-align:center;margin:0 0 18px}.energy-percent{display:inline-block;border-radius:20px;background:#ffffff9c;color:#526f5c;padding:6px 12px;font-size:11px}.energy-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.energy-actions button{background:#fff9;padding:10px 4px;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:11px}.energy-action-icon{font-size:20px}@media(max-width:360px){.energy-summary{grid-template-columns:130px minmax(0,1fr);gap:12px}.calorie-ring{width:130px;height:130px}.calorie-ring:before{inset:10px}.hero .calorie-number{font-size:29px}.energy-detail-value b{font-size:20px}}

.energy-over .calorie-ring{background:conic-gradient(from -90deg,#d65b5b var(--progress),#f3dada 0)}.energy-over .calorie-ring:before{background:#fff6f3}.energy-over .calorie-number,.energy-over .energy-gap b{color:#bb4646}.energy-over .energy-percent{background:#fae3de;color:#a53d3d}.energy-mood{font-size:23px;line-height:1.1;margin-top:5px}.energy-assistant{width:100%;margin-top:10px;background:#fff9}#home-assistant{scroll-margin-top:100px}

.calorie-ring{background:conic-gradient(from -90deg,#257d67 var(--progress),#d9e7df 0)}.energy-caution .calorie-ring{background:conic-gradient(from -90deg,#e69b4f var(--progress),#efdfc8 0)}.energy-caution .calorie-number,.energy-caution .energy-gap b{color:#ad6b23}.energy-caution .energy-percent{background:#f9edda;color:#985e1d}.energy-details{gap:15px}.energy-maintenance .energy-detail-value b{font-size:16px}.energy-maintenance .energy-detail-label{font-size:10px}.streak-grid{display:flex;gap:9px;flex-wrap:wrap}.streak-badge{background:#edf5f0;border-radius:15px;padding:12px 10px;min-width:85px;text-align:center;flex:1}.streak-badge.diamond{background:#e9f3fa}.streak-icon{display:block;font-size:24px;margin-bottom:7px}.streak-badge b{display:block;font-size:18px;color:#257d67}.streak-badge.diamond b{color:#397aaa}.streak-badge small{font-size:10px}

@media(max-width:600px){nav{display:flex;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;padding-bottom:calc(9px + env(safe-area-inset-bottom));touch-action:pan-x}nav::-webkit-scrollbar{display:none}nav button{flex:0 0 68px;min-width:68px;font-size:10px;white-space:nowrap}main,body.has-glucose main{padding-bottom:calc(110px + env(safe-area-inset-bottom))}#toast,body.has-glucose #toast{bottom:calc(95px + env(safe-area-inset-bottom))}}
#weigh-reminder{max-width:560px}#weigh-reminder .actions{position:static}

.energy-normal .calorie-number,.energy-normal .energy-gap b{color:#257d67}.energy-normal .energy-percent{background:#e2f2e8;color:#257d67}

.assistant-compact{padding:16px}.assistant-compact h2{font-size:18px;margin-bottom:10px}.assistant-compact textarea{min-height:64px}.assistant-compact .actions{margin-top:8px;gap:6px}.assistant-compact .actions button{padding:10px;font-size:12px}

header #profile-link{margin-left:0;flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 9px;border:1px solid #bdd9cb;background:#e8f2ed}#profile-link img{width:30px;height:30px;border-radius:8px}#profile-link span{font-size:10px;font-weight:700}#profile-link:focus-visible{outline:2px solid #257d67;outline-offset:3px}@media(max-width:420px){header{padding:10px;gap:9px}header strong{font-size:22px}header small{font-size:9px}header #today{padding:10px 8px;font-size:11px}}

.proposal-details{white-space:pre-line;font-size:14px;line-height:1.65;color:#202c39;padding:10px 0;border-bottom:1px solid #e7ece9}

.meal-add-footer{border-top:1px solid #dce3df;margin-top:18px;padding-top:18px}.meal-drop-targets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:8px 0;border-bottom:1px solid #dce3df}.meal-drop-targets button{padding:12px 5px;min-height:44px;font-size:12px}.meal-drop-targets .drop-active{background:#257d67;color:white;outline:2px solid #84b7a4}.meal-grip{cursor:grab}.meal-grip:active{cursor:grabbing}@media(max-width:480px){.meal-drop-targets{grid-template-columns:repeat(2,minmax(0,1fr))}}

.meal-drop-targets{position:sticky;top:var(--app-header-height,104px);z-index:4;background:white}

#toast{pointer-events:none}
