/* One fixed module header and white scrollable sheet, using the existing tokens. */
html:root{
 --endo-module-header-height:64px;
 --endo-module-background:radial-gradient(ellipse at 85% 10%,var(--endo-plum-light),transparent 75%),linear-gradient(125deg,var(--endo-plum-deep),var(--endo-plum));
 --endo-module-waves:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 560 26' preserveAspectRatio='none'%3E%3Cpath d='M-30 0Q240 48 590 2' fill='none' stroke='%23D8B96A' stroke-width='1.5'/%3E%3Cpath d='M-30 10Q220 32 590 0' fill='none' stroke='%23D4AF37' stroke-opacity='.65' stroke-width='1'/%3E%3C/svg%3E");
}
html :is(.planilha-page,.progress-module,.my-finance,.my-agenda,.my-benefits,.my-challenges,.endo-shop){background:var(--endo-module-background);overflow:hidden;}
html :is(.mp-shell,.evo-deck,.conquests-deck,.finance-panel,.agenda-panel,.benefits-panel,.challenge-panel,.endo-shop-panel){background:transparent;border:0;border-radius:0;box-shadow:none;max-width:var(--endo-content-width);}
html .endo-heading{
 box-sizing:border-box;position:relative;isolation:isolate;max-width:none;flex-shrink:0;
 display:flex;align-items:center;gap:var(--endo-space-3);
 height:var(--endo-module-header-height);min-height:var(--endo-module-header-height);
 padding:12px var(--endo-gutter) 0;margin:0;border:0;border-radius:0;
 background:var(--endo-module-background);color:var(--endo-white);text-align:left;
}
html .endo-heading::after{content:'';position:absolute;inset:auto 0 -24px;height:22px;background:var(--endo-module-waves) center/100% 100% no-repeat;pointer-events:none;z-index:-1;}
html .endo-heading .endo-heading-icon{width:32px;height:32px;flex:0 0 32px;border:0;border-radius:var(--endo-radius);background:color-mix(in srgb,var(--endo-white) 7%,transparent);color:var(--endo-on-card-accent);display:grid;place-items:center;}
html .endo-heading .endo-heading-icon>svg{width:24px;height:24px;stroke-width:var(--endo-icon-stroke);margin:0;}
html .endo-heading>div{min-width:0;flex:1;}
html .endo-heading :is(h1,h2){color:var(--endo-white);margin:0;font:var(--endo-page-weight) var(--endo-page-size)/var(--endo-page-line) var(--endo-font);letter-spacing:var(--endo-page-tracking);}
html .endo-heading p{color:var(--endo-on-card-muted);margin:2px 0 0;font:var(--endo-subtitle-weight) var(--endo-subtitle-size)/var(--endo-subtitle-line) var(--endo-font);white-space:nowrap;}
/* Only the body scrolls. The header and parent-return control never move. */
html :is(.finance-scroll,.agenda-scroll,.benefits-content,.challenge-content,.endo-shop-scroll){background:var(--endo-white);border-radius:var(--endo-radius-lg) var(--endo-radius-lg) 0 0;padding-top:var(--endo-space-4);}
html :is(.mp-footer,.progress-return,.finance-footer,.agenda-footer,.benefits-footer,.challenge-footer,.endo-shop-footer){background:var(--endo-white);border:0;border-radius:0 0 var(--endo-radius-lg) var(--endo-radius-lg);}
html :is(.mp-viewport,.evo-frame,.conquest-viewport){background:var(--endo-white);}
html .planilha-page .mp-heading-row{position:relative;flex:none;margin:0;}
html .planilha-page .mp-heading-with-action>.endo-heading{padding-right:calc(var(--endo-gutter) + var(--endo-touch) + 8px);}
html .planilha-page .mp-heading-refresh{position:absolute;inset:12px var(--endo-gutter) auto auto;width:44px;height:44px;min-height:44px;border:1px solid var(--endo-gold);border-radius:50%;padding:0;color:var(--endo-on-card-accent);background:transparent;}
html .planilha-page .mp-slide{padding:var(--endo-space-4) var(--endo-gutter);overflow-anchor:none;}
html .progress-module .evo-panel{padding:var(--endo-space-4) var(--endo-gutter);}
html .progress-module .conquest-slide{padding:var(--endo-space-4) var(--endo-gutter);}
html :is(.mp-slide,.evo-slide,.conquest-slide){overflow-anchor:none;}
html .progress-state{justify-content:flex-start;gap:0;background:var(--endo-white);padding-inline:0;}
html .progress-state>.endo-heading{align-self:stretch;margin:0;}
html .progress-state>.endo-back{margin-top:auto;width:calc(100% - 2 * var(--endo-gutter));}
html .planilha-page .mp-loading{padding:0;gap:0;text-align:center;justify-content:flex-start;background:var(--endo-white);}
html .planilha-page .mp-loading>.endo-heading{align-self:stretch;}
html .planilha-page .mp-loading>.mp-back{margin-top:auto;}
html .wallet .wallet-ready{flex-basis:0;grid-template-rows:minmax(0,1fr) 44px;}
html .wallet .wallet-return{margin-inline:7px;flex:none;}
html .ws-title{position:relative;display:block;margin:0 0 var(--endo-space-3);}
html .ws-editor{padding-top:env(safe-area-inset-top,0px);}
html .ws-title{margin-inline:calc(-1 * var(--endo-gutter));}
html .ws-title>.endo-heading{margin:0;padding-inline-end:calc(var(--endo-gutter) + var(--endo-touch) + var(--endo-space-2));}
html .ws-title .ws-close{position:absolute;right:var(--endo-gutter);top:12px;color:var(--endo-on-card-accent);border-color:var(--endo-gold);background:transparent;}
@media(max-width:374px){html .endo-heading p{font-size:12px;}html .endo-heading :is(h1,h2){font-size:18px;}}

html .progress-state>.endo-view-nav{align-self:stretch;}
html :is(.progress-state,.mp-loading)>p{padding:16px var(--endo-gutter);}
