/* Compact shared disclosures keep the daily forms in front. */
.period-panel,.summary-item,.summary-controls{margin:20px 0;border:1px solid var(--line);border-radius:16px;background:linear-gradient(145deg,#1b2822,#111b17);overflow:hidden}.period-panel>summary,.summary-item>summary,.summary-controls>summary{font-size:15px;font-weight:700;justify-content:space-between;gap:12px}.period-panel[open]>summary,.summary-item[open]>summary,.summary-controls[open]>summary{border-bottom:1px solid var(--line)}.period-panel[open]>summary>.chevron,.plan-accordion[open]>summary>.chevron{transform:rotate(90deg)}.period-body,.summary-item-body,.summary-controls-body{padding:18px}.period-tabs{display:flex;gap:8px;margin-bottom:12px}.period-tabs button{flex:1;min-height:42px}.period-tabs button[aria-pressed=true]{background:var(--lime);color:#14200e;border-color:var(--lime)}.period-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;text-align:center}.period-nav button{min-width:42px;min-height:42px;font-size:22px;padding:4px}.period-current{border:0;background:none;color:var(--lime);font-size:12px;text-decoration:underline;padding:12px 0}.period-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.period-stats>div{background:#24372a80;border-radius:10px;padding:13px}.period-stats small{display:block;font-size:11px;color:var(--muted);line-height:1.4}.period-stats strong{display:block;font-size:19px;margin-top:7px;overflow-wrap:anywhere}.period-note,.period-range{font-size:12px;color:var(--muted);line-height:1.6}.period-row{display:flex;justify-content:space-between;gap:12px;padding:13px 0;border-top:1px solid var(--line);font-size:12px}.period-row>:last-child{text-align:right}.period-table{overflow-x:auto}.period-table table{width:100%;border-collapse:collapse;font-size:12px;line-height:1.5}.period-table th,.period-table td{padding:12px 6px;border-bottom:1px solid var(--line);text-align:left}.period-table thead{color:var(--muted)}.history.period-panel{padding:0}.history-calories{display:block;color:var(--orange);font-weight:650;margin-top:7px;font-size:12px}.guide:has(.plan-accordion){padding:0;position:static}.plan-accordion>summary{font-size:13px;font-weight:700;justify-content:space-between}.plan-body{padding:0 20px 20px}.title-explainer{display:inline-flex;align-items:center;border:0;border-radius:6px;background:transparent;padding:7px 0;color:var(--lime);text-align:left;min-height:36px}.title-explainer span{font-size:14px;margin-left:5px}.summary-cards:has(.summary-item){display:block}.summary-item{margin:10px 0;box-shadow:none}.summary-item-body{font-size:13px;line-height:1.6;color:var(--muted)}.summary-item>summary strong{color:var(--lime);font-size:15px;margin-left:auto;text-align:right}.summary-item .energy-balance{margin:0}.summary-group>.summary-cards,.summary-group>.summary-item{margin-left:12px;margin-right:12px}.summary-controls .summary-heading{margin-bottom:12px}.summary-controls h3{margin:0;font-size:15px}
#header-energy{width:min(100%,1000px);margin:0 auto;padding:8px 32px 10px}.header-energy-values{display:grid;grid-template-columns:1fr 1fr;border:1px solid #466139;border-radius:12px;background:linear-gradient(115deg,#203829,#142019);overflow:hidden}.header-energy-values>div{padding:10px 15px;min-width:0}.header-energy-values>div+div{border-left:1px solid #466139}.header-energy-values small{display:block;color:var(--muted);font-size:11px}.header-energy-values strong{display:block;color:var(--lime);font-size:18px;margin-top:4px;line-height:1.2}.header-energy-values>div+div strong{color:var(--orange)}.header-energy-stamp{display:block;color:var(--muted);font-size:10px;line-height:1.3;text-align:right;margin-top:5px}@media(max-width:520px){#header-energy{padding:4px 20px 8px}.header-energy-values>div{padding:8px 10px}.header-energy-values small{font-size:10px}.header-energy-values strong{font-size:16px}.period-body,.summary-item-body,.summary-controls-body{padding:14px}.period-stats strong{font-size:17px}.summary-item>summary{font-size:13px;flex-wrap:wrap}.summary-item>summary strong{font-size:14px}}
#screen-title.title-help{cursor:pointer;border-radius:6px}#screen-title.title-help::after{content:' ⓘ';font-size:13px;font-weight:400;color:var(--lime);margin-left:6px}#screen-title.title-help:focus-visible{outline:2px solid var(--lime);outline-offset:4px}.summary-item[open]>summary>.chevron,.summary-controls[open]>summary>.chevron{transform:rotate(90deg)}
#weight-summary.health-box{padding:0}#weight-summary>summary{font-weight:700;justify-content:space-between;font-size:15px}#weight-summary[open]>summary{border-bottom:1px solid var(--line)}.weight-summary-body{padding:18px}#weight-summary[open]>summary>.chevron{transform:rotate(90deg)}
#weight-summary>summary{padding:18px 20px}#resumo>.summary-group>summary,#resumo>.energy-editor>summary{justify-content:space-between}#resumo>.energy-editor[open]>summary>.chevron{transform:rotate(90deg)}
/* Divide the greeting from the calorie strip on every screen. */
#app-header{border-bottom:0;box-shadow:none}
#app-header .greeting{position:relative}
#app-header .greeting::after{content:"";position:absolute;left:50%;bottom:0;width:100vw;height:1px;transform:translateX(-50%);background:#52713d;pointer-events:none}
/* Give the energy row breathing room above and keep the content below close. */
#header-energy{padding:24px 32px 2px}
.header-energy-values{grid-template-columns:repeat(3,minmax(0,1fr))}
.header-energy-values>div:last-child strong{color:var(--lime)}
.header-energy-stamp{margin-top:3px}
.health-sync-note{display:block;margin:12px 0;color:var(--muted);line-height:1.6}
@media(max-width:520px){#header-energy{padding:20px 20px 2px}.header-energy-values>div{padding:9px 8px}.header-energy-values small{font-size:10px;min-height:26px}.header-energy-values strong{font-size:15px;overflow-wrap:anywhere}}
#app-scroll main{padding-top:6px}
#home-menu{margin-top:0}

/* One manual refresh control sits outside the last calorie card. */
.header-energy-row{display:flex;align-items:center;gap:8px}.header-energy-row>.header-energy-values{flex:1;min-width:0}.header-energy-refresh{flex:0 0 13.2px;width:13.2px;height:13.2px;position:relative;display:grid;place-items:center;padding:0;border:1px solid #466139;border-radius:3.6px;background:#203829;color:var(--lime);font-size:8.4px;line-height:1;cursor:pointer}.header-energy-refresh:disabled{opacity:.55;cursor:wait}.header-energy-refresh:focus-visible{outline:2px solid var(--lime);outline-offset:3px}.header-energy-status{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin-top:4px}.header-energy-status:empty{display:none}.header-energy-status a{color:var(--lime)}@media(max-width:520px){.header-energy-row{gap:6px}.header-energy-values>div{padding:9px 6px}.header-energy-values small{font-size:9px}.header-energy-values strong{font-size:13px}}

.header-energy-refresh::before,.header-energy-info::before{content:"";position:absolute;width:32px;height:26px;left:50%;top:50%;transform:translate(-50%,-50%)}

.header-energy-values small{font-size:12px;line-height:1.15;min-height:0}.header-energy-values strong{margin-top:1px}.header-energy-actions{display:flex;flex:0 0 20px;flex-direction:column;align-items:center;gap:14px}.header-energy-refresh{flex:0 0 13.2px}.header-energy-info{position:relative;width:13.2px;height:13.2px;display:grid;place-items:center;border:0;padding:0;background:transparent;color:var(--lime);font-size:13px;line-height:1;cursor:pointer}.header-energy-info:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
#header-energy-info-dialog{position:fixed;inset:0;margin:auto;width:min(340px,calc(100vw - 40px));max-height:80dvh;padding:24px;border:1px solid #52713d;border-radius:16px;background:#17261d;color:var(--ink);box-shadow:0 16px 60px #0009;overflow:auto}#header-energy-info-dialog::backdrop{background:#0008}#header-energy-info-dialog h3{font-size:17px;margin:0 28px 14px 0}#header-energy-info-dialog p{font-size:14px;line-height:1.6;color:var(--muted);margin:0}#header-energy-info-dialog a{display:inline-block;margin-top:14px;color:var(--lime);font-size:14px}#header-energy-info-dialog a[hidden]{display:none}#header-energy-info-dialog .header-energy-info-close{position:absolute;right:8px;top:8px;width:36px;height:36px;display:grid;place-items:center;border:0;background:transparent;color:var(--lime);font-size:26px;padding:0;cursor:pointer}@media(max-width:520px){.header-energy-values small{font-size:11px;min-height:0}.header-energy-values strong{margin-top:1px}}

.header-energy-stamp{text-align:center;margin-right:28px}@media(max-width:520px){.header-energy-stamp{margin-right:26px}}

.header-energy-values{grid-template-columns:repeat(4,minmax(0,1fr))}.header-energy-stamp{text-align:left}.header-energy-values>div:last-child strong{color:var(--lime)}#header-energy-info-dialog .header-energy-balance-help{margin-top:14px}#header-energy-diet-note:empty{display:none}#header-energy-info-dialog #header-energy-diet-note{margin-top:12px;color:var(--orange)}@media(max-width:520px){.header-energy-values>div{padding:8px 4px}.header-energy-values small{font-size:11px}.header-energy-values strong{font-size:12px}}
.header-energy-values strong,.header-energy-values>div:last-child strong{font-size:18px;white-space:nowrap;overflow-wrap:normal;letter-spacing:normal}
@media(max-width:520px){#header-energy{padding-right:8px}.header-energy-row{gap:4px}.header-energy-actions{flex-basis:13.2px}.header-energy-values strong,.header-energy-values>div:last-child strong{font-size:12px;letter-spacing:-.2px}.header-energy-stamp{margin-right:17.2px}}

html[data-screen="home"] #header-energy{padding-bottom:18px}
