/* body-stats.css: the Weight & BMI sheet (body-stats.js). Same glass + glow language as the Settings panel and the tutorial card
   (--mb-* tokens with the same fallbacks), white ink, 44 px touch targets, safe areas, Reduce Motion. */
.bs-ov { position: fixed; inset: 0; z-index: 2147481500; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    background: rgba(3, 10, 32, .58); color: var(--mb-ink, #fff); font-family: inherit; -webkit-tap-highlight-color: transparent; animation: bs-fade .2s ease both; }
.bs-ov.bs-out { opacity: 0; transition: opacity .18s ease; pointer-events: none; }
.bs-sheet { position: relative; box-sizing: border-box; width: min(500px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: 0 18px 18px; background: var(--mb-surface, linear-gradient(160deg, rgba(40, 110, 210, .66), rgba(8, 20, 58, .94)));
    border: 1px solid var(--mb-rim, rgba(143, 231, 255, .55)); border-radius: var(--mb-r, 30px);
    box-shadow: var(--mb-glow, 0 0 30px 3px rgba(143, 231, 255, .24)), inset 0 0 22px rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); text-shadow: 0 1px 6px rgba(0, 30, 80, .45); animation: bs-rise .26s cubic-bezier(.2, .9, .25, 1) both; }
.bs-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -18px 4px; padding: 14px 12px 8px 18px;
    background: linear-gradient(180deg, rgba(12, 32, 80, .92), rgba(12, 32, 80, 0)); }
.bs-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .01em; }
.bs-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(143, 231, 255, .45); background: rgba(255, 255, 255, .08); color: inherit; font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.bs-body p { margin: 8px 0; font-size: 13.5px; line-height: 1.4; }
.bs-note, .bs-priv { opacity: .78; font-size: 12.5px !important; }
.bs-priv { margin-top: 14px !important; text-align: center; }
.bs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.bs-stat { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 20px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(143, 231, 255, .3); box-shadow: inset 0 0 14px rgba(143, 231, 255, .12); }
.bs-stat small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.bs-stat b { font-size: 34px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(143, 231, 255, .55); }
.bs-chip { align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; background: rgba(143, 231, 255, .2); border: 1px solid rgba(143, 231, 255, .55); }
.bs-chip.bs-soft { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); }
.bs-cat-healthy .bs-chip { background: rgba(143, 231, 255, .26); border-color: #8fe7ff; }
.bs-cat-under .bs-chip, .bs-cat-over .bs-chip { background: rgba(255, 210, 110, .2); border-color: rgba(255, 210, 110, .7); }
.bs-cat-obese .bs-chip { background: rgba(255, 150, 120, .22); border-color: rgba(255, 150, 120, .7); }
.bs-range { font-weight: 650; }
.bs-track { margin: 12px 0 6px; padding: 12px; border-radius: 22px; background: rgba(2, 10, 34, .35); border: 1px solid rgba(143, 231, 255, .28); }
.bs-lv b, .bs-lvchip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: #04122c; background: linear-gradient(135deg, #8fe7ff, #5aa9ff); box-shadow: 0 0 14px rgba(90, 169, 255, .55); text-shadow: none; }
.bs-then-now { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.bs-then-now figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.bs-then-now figcaption { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.bs-then-now figcaption small { font-size: 11px; opacity: .8; }
.bs-then-now figcaption b { font-size: 17px; font-variant-numeric: tabular-nums; }
.bs-fig { width: 86px; height: 112px; overflow: visible; }
.bs-fig circle, .bs-fig path { fill: rgba(143, 231, 255, .22); stroke: rgba(143, 231, 255, .9); stroke-width: 2; }
.bs-fig .bs-legs { fill: none; stroke-width: 7; stroke-linecap: round; }
.bs-then { opacity: .6; filter: saturate(.6); }
.bs-now circle, .bs-now path { fill: rgba(255, 220, 130, .26); stroke: #ffd77a; filter: drop-shadow(0 0 6px rgba(90, 169, 255, .7)); }
.bs-arrow { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 92px; }
.bs-arrow small { font-size: 11px; opacity: .8; }
.bs-delta { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bs-delta.bs-good { color: #8fe7ff; text-shadow: 0 0 12px rgba(143, 231, 255, .7); }
.bs-bar { height: 10px; margin-top: 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; border: 1px solid rgba(143, 231, 255, .3); }
.bs-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8fe7ff, #ffd77a); box-shadow: 0 0 10px rgba(255, 215, 122, .7); transition: width .6s ease; }
.bs-chart { display: block; width: 100%; height: 96px; margin-top: 8px; }
.bs-band { fill: rgba(143, 231, 255, .12); }
.bs-line { fill: none; stroke: #8fe7ff; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.bs-dot { fill: #8fe7ff; }
.bs-dot.bs-last { fill: #ffd77a; }
.bs-form { display: grid; gap: 10px; margin: 14px 0 4px; }
.bs-field { display: grid; grid-template-columns: 76px minmax(0, 1fr); min-width: 0; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.bs-in { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 48px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(143, 231, 255, .45); }
.bs-in:focus-within { border-color: #8fe7ff; box-shadow: 0 0 0 3px rgba(143, 231, 255, .3); }
.bs-in input { flex: 1; width: 100%; min-width: 0; height: 46px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 20px; font-weight: 750; outline: none; }
.bs-in em { font-style: normal; opacity: .75; }
.bs-hline { font-size: 13px !important; opacity: .85; }
.bs-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; border: 0; background: none; color: #8fe7ff; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.bs-sex { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.bs-sex legend { width: 100%; margin-bottom: 6px; font-size: 12.5px; opacity: .85; }
.bs-pill { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(143, 231, 255, .45); background: rgba(255, 255, 255, .07); color: inherit; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.bs-pill.on { background: rgba(143, 231, 255, .3); border-color: #8fe7ff; box-shadow: 0 0 12px rgba(143, 231, 255, .45); }
.bs-err { min-height: 0; margin: 0 !important; color: #ffd0c4; font-weight: 700; }
.bs-err:empty { display: none; }
.bs-go { min-height: 52px; border-radius: 999px; border: 0; font: inherit; font-size: 16px; font-weight: 800; color: #0b1a30; cursor: pointer;
    background: linear-gradient(135deg, #bff3ff, #8fe7ff); box-shadow: 0 0 22px rgba(143, 231, 255, .55); text-shadow: none; }
.bs-go.bs-done { background: linear-gradient(135deg, #8fe7ff, #5aa9ff); }
.bs-hist h3 { margin: 16px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.bs-hist ul { list-style: none; margin: 0; padding: 0; }
.bs-hist li { display: grid; grid-template-columns: 1fr auto 64px 44px; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid rgba(143, 231, 255, .15); font-size: 14px; }
.bs-hist li b { font-variant-numeric: tabular-nums; }
.bs-hist li em { font-style: normal; text-align: right; opacity: .8; font-variant-numeric: tabular-nums; }
.bs-x { width: 44px; height: 44px; border: 0; background: none; color: inherit; font: inherit; font-size: 20px; opacity: .6; cursor: pointer; }
.bs-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; min-height: 44px; padding: 12px 14px; border-radius: 20px; text-align: left; color: inherit; font: inherit; cursor: pointer;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(143, 231, 255, .35); box-shadow: inset 0 0 14px rgba(143, 231, 255, .12); }
.bs-card small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.bs-card b { font-size: 17px; }
.bs-card span { font-size: 12.5px; opacity: .85; }
@keyframes bs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bs-rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bs-ov, .bs-sheet { animation: none; } .bs-bar i { transition: none; } }
@media (max-width: 360px) { .bs-fig { width: 70px; height: 92px; } .bs-arrow { min-width: 78px; } .bs-stat b { font-size: 28px; } }
/* Oct 22 2026: Weight journey merged in. kg/lb in the header, the level as one line (no second bar) */
.bs-head h2 { flex: 1; min-width: 0; }
.bs-units { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(143, 231, 255, .35); }
.bs-units[hidden] { display: none; }
.bs-units button { min-width: 44px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; opacity: .75; }
.bs-units button[aria-pressed="true"] { opacity: 1; color: #04122c; background: linear-gradient(135deg, #8fe7ff, #5aa9ff); text-shadow: none; }
.bs-lvline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0; font-size: 14px; font-weight: 650; }
.bs-lvline span { opacity: .9; }
