/* Body composition and energy dashboard. Small-screen-first, no external dependencies. */
.bm-top{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:0 0 12px}
.bm-top h1{font-size:1.35rem;color:var(--text,#172848);margin:0}
.bm-top .btn{white-space:nowrap;min-height:44px}
.bm-hero{background:linear-gradient(145deg,rgba(25,134,145,.08),rgba(85,112,178,.06))}
.bm-hero h2,.bm-details summary{font-weight:750;color:var(--text,#152747)}
.bm-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:13px 0}
.bm-stat{display:flex;flex-direction:column;padding:12px 10px;border-radius:13px;background:var(--surface,#f6f9fb);min-width:0;gap:5px;border:1px solid rgba(113,136,151,.14)}
.bm-stat strong{font-size:1.27rem;color:var(--text,#14213b);letter-spacing:-.025em;line-height:1.25;word-break:keep-all}
.bm-stat .tiny{line-height:1.45}
.bm-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.bm-form-grid .field{margin-bottom:0;min-width:0}
.bm-form-grid .field span{line-height:1.35;min-height:34px;display:flex;align-items:end}
.bm-form-grid .input{width:100%;box-sizing:border-box}
.bm-select-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.bm-select-row>.field{min-width:0}
.bm-select-row select{min-width:0;width:100%}
.bm-details{margin-top:12px}
.bm-details summary{cursor:pointer;min-height:44px;display:flex;align-items:center}
.bm-details>.field{margin:12px 0}
.bm-chart{width:100%;margin:12px 0;border-radius:13px;background:var(--surface,#f6f9fb);padding:6px;box-sizing:border-box}
.bm-chart svg{display:block;width:100%;height:auto;color:var(--text,#26364d)}
.bm-record-list .kv{padding:9px 0;border-bottom:1px solid rgba(139,155,174,.17)}
.bm-record-list .kv:last-child{border-bottom:0}
[data-testid="weekly-measurement"] .btn,[data-testid="monthly-measurement"] .btn{margin-top:14px}
[data-testid="day-type"]{display:flex;gap:5px;flex-wrap:wrap}
[data-testid="day-type"] button{flex:1 1 28%;min-height:42px;font-size:.82rem}
@media(max-width:350px){
 .bm-stat strong{font-size:1.05rem}
 .bm-form-grid{gap:8px}
 .bm-stats{gap:6px}
 .bm-top{flex-wrap:wrap}
}
@media(prefers-color-scheme:dark){
 .bm-stat,.bm-chart{background:#1b2636;border-color:#334257}
 .bm-hero{background:linear-gradient(145deg,#183339,#252737)}
 .bm-top h1,.bm-stat strong,.bm-hero h2,.bm-details summary{color:#f3f7fc}
}
