/* Visual language of Apple Health (iOS 26): warm gradient into black, flat rounded cards with a coloured
   category label, large value + small unit, mini bar charts, big image tiles in lists, glass floating controls. */
:root {
  color-scheme: light dark;
  --blue: #007aff; --green: #34c759; --red: #ff3b30; --orange: #ff9500; --yellow: #ffcc00; --purple: #af52de; --teal: #30b0c7; --pink: #ff2d55;
  --bg: #f2f2f7; --card: #ffffff; --card-2: rgba(120, 120, 128, .08);
  --glass: rgba(255, 255, 255, .7); --glass-strong: rgba(255, 255, 255, .82); --glass-border: rgba(255, 255, 255, .8);
  --fill: rgba(120, 120, 128, .12); --fill-2: rgba(120, 120, 128, .2);
  --text: #000; --text-2: rgba(60, 60, 67, .6); --text-3: rgba(60, 60, 67, .3);
  --sep: rgba(60, 60, 67, .2);
  --shadow: 0 10px 30px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .05);
  --body-base: #d6d8de; --body-seam: rgba(0, 0, 0, .18); --body-idle: #c7cad1;
  --accent: var(--blue);
  --radius: 24px; --tab-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #0a84ff; --green: #30d158; --red: #ff453a; --orange: #ff9f0a; --yellow: #ffd60a; --purple: #bf5af2; --teal: #40c8e0; --pink: #ff375f;
    --bg: #000; --card: #1c1c1e; --card-2: #2c2c2e;
    --glass: rgba(44, 44, 46, .7); --glass-strong: rgba(50, 50, 54, .85); --glass-border: rgba(255, 255, 255, .12);
    --fill: rgba(120, 120, 128, .24); --fill-2: rgba(120, 120, 128, .36);
    --text: #fff; --text-2: rgba(235, 235, 245, .6); --text-3: rgba(235, 235, 245, .3);
    --sep: rgba(84, 84, 88, .55);
    --shadow: 0 12px 36px rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .4);
    --body-base: #2c2c30; --body-seam: rgba(0, 0, 0, .55); --body-idle: #3a3a40;
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; color: var(--text); }
body { background: transparent; }
body {
  font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  padding-bottom: calc(var(--tab-h) + 28px + env(safe-area-inset-bottom));
  overscroll-behavior-y: contain; min-height: 100vh;
}
/* gradient wash at the top of every screen, colour by section (Health: deep orange into purple into black) */
.hero { position: fixed; left: 0; right: 0; top: 0; height: 48vh; z-index: -1; pointer-events: none;
  background: linear-gradient(165deg, var(--hero-a) 0%, var(--hero-b) 50%, var(--bg) 100%); }
.hero.today { --hero-a: #8a3414; --hero-b: #3a2a6e; }
.hero.program { --hero-a: #10407a; --hero-b: #2a1f5c; }
.hero.history { --hero-a: #3b3f6e; --hero-b: #1b2a4a; }
.hero.progress { --hero-a: #0d5a46; --hero-b: #123a5a; }
.hero.nutrition { --hero-a: #2d6a2a; --hero-b: #6b4a10; }
.hero.coach { --hero-a: #4a1f6e; --hero-b: #1f3a6e; }
.hero.other { --hero-a: #3a3a40; --hero-b: #1c1c22; }
@media (prefers-color-scheme: light) {
  .hero.today { --hero-a: #ffc9a8; --hero-b: #e4dcff; }
  .hero.program { --hero-a: #bcd6ff; --hero-b: #e4dcff; }
  .hero.history { --hero-a: #d3d6ef; --hero-b: #dde6f6; }
  .hero.progress { --hero-a: #bdebd9; --hero-b: #d6e4f6; }
  .hero.nutrition { --hero-a: #cdeec6; --hero-b: #f6e9c8; }
  .hero.coach { --hero-a: #e3c6f5; --hero-b: #d6e0f6; }
  .hero.other { --hero-a: #e2e2e8; --hero-b: #ececf2; }
}
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 34px; font-weight: 700; letter-spacing: -.5px; margin: 0 0 8px; line-height: 1.15; }
h1 .small { font-size: 15px; font-weight: 500; letter-spacing: 0; vertical-align: 5px; margin-left: 6px; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin: 28px 6px 10px; }
h3 { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -.2px; }
p { margin: 6px 0; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page { padding: calc(16px + env(safe-area-inset-top)) 16px 24px; max-width: 640px; margin: 0 auto; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.topbar { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; min-height: 54px; }
.topbar h1 { margin: 0; }
.sec { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 6px 10px; }
.sec h2 { margin: 0; }
.sec a, .sec button { font-size: 17px; font-weight: 500; padding: 0; background: transparent; }

/* round glass buttons (back, gear, coach) */
.rb { width: 54px; height: 54px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), var(--shadow); padding: 0; }
.rb svg { width: 24px; height: 24px; }
.rb.accent { color: var(--accent); }

/* cards: flat, Health-style */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 12px; }
.card.active { box-shadow: inset 0 0 0 1.5px var(--accent); }
.card.tap { cursor: pointer; transition: transform .15s; }
.card.tap:active { transform: scale(.985); }
.ch { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.ch .lab { display: inline-flex; align-items: center; gap: 6px; }
.ch .lab svg { width: 18px; height: 18px; }
.ch .meta { margin-left: auto; color: var(--text-2); font-weight: 400; display: inline-flex; align-items: center; gap: 4px; font-size: 15px; }
.ch .meta .chev { font-size: 18px; }
.c-orange { color: var(--orange); } .c-blue { color: var(--blue); } .c-green { color: var(--green); } .c-purple { color: var(--purple); }
.c-teal { color: var(--teal); } .c-red { color: var(--red); } .c-pink { color: var(--pink); } .c-yellow { color: var(--yellow); }
.big { font-size: 32px; font-weight: 700; letter-spacing: -.8px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.big .unit { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--text-2); margin-left: 4px; }
.kv { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.kv .mini { align-self: stretch; justify-content: space-between; }
.mini { display: flex; align-items: flex-end; gap: 4px; height: 48px; }
.mini i { display: block; width: 9px; border-radius: 3px; background: var(--text-3); min-height: 3px; }
.mini i.on { background: currentColor; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 .card { margin: 0; }

/* list rows with image tiles (like medications) */
.tile { width: 56px; height: 56px; border-radius: 14px; flex: none; background: var(--card-2); display: inline-flex; align-items: center; justify-content: center; color: #fff; overflow: hidden; }
.tile.sm { width: 44px; height: 44px; border-radius: 11px; }
.tile.lg { width: 72px; height: 72px; border-radius: 18px; }
.tile.blue { background: linear-gradient(160deg, #5fb0ff, #1d6fd1); }
.tile.orange { background: linear-gradient(160deg, #ffb45f, #e4761a); }
.tile.green { background: linear-gradient(160deg, #6ee08a, #1f9d47); }
.tile.purple { background: linear-gradient(160deg, #d08cff, #7b3fc4); }
.tile svg { width: 55%; height: 55%; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: .5px solid var(--sep); }
.list-item:first-child { padding-top: 4px; }
.list-item:last-child { border-bottom: 0; padding-bottom: 4px; }
.list-item.tap { cursor: pointer; }
.list-item.tap:active { opacity: .6; }
.list-item .sub { font-size: 14px; color: var(--text-2); margin-top: 2px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.list-item .sub svg { width: 14px; height: 14px; }
.chev { color: var(--text-3); font-size: 20px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.pill.kind-barbell { color: var(--blue); } .pill.kind-dumbbell { color: var(--purple); } .pill.kind-bodyweight { color: var(--orange); }

/* week dots (like the medication calendar strip) */
.weekdots { display: flex; justify-content: space-between; margin: 4px 2px 14px; }
.weekdots div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.weekdots i { width: 36px; height: 36px; border-radius: 50%; background: var(--fill); display: block; }
.weekdots i.full { background: var(--green); }
.weekdots i.part { background: linear-gradient(135deg, var(--green) 50%, var(--fill) 50%); }
.weekdots div.today span { color: var(--text); }
.weekdots div.today i { box-shadow: 0 0 0 2px var(--text); }

/* buttons: capsules */
button, .btn {
  font: inherit; font-weight: 600; color: var(--accent); background: var(--fill);
  border: 0; border-radius: 999px; padding: 11px 16px; cursor: pointer; touch-action: manipulation; user-select: none;
  -webkit-tap-highlight-color: transparent; transition: transform .12s, filter .12s; letter-spacing: -.2px;
}
button:active { transform: scale(.97); filter: brightness(.92); }
button:disabled { opacity: .4; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red); }
.btn-primary.btn-danger { background: var(--red); color: #fff; }
.btn-block { display: block; width: 100%; padding: 15px; font-size: 17px; text-align: center; }
.btn-sm { padding: 7px 13px; font-size: 15px; }
.btn-icon { width: 38px; height: 38px; padding: 0; font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.btn-icon svg { width: 20px; height: 20px; }

/* inputs */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--fill); border: 0;
  border-radius: 12px; padding: 12px 14px; width: 100%; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type=checkbox] { width: 22px; height: 22px; border-radius: 7px; background: var(--fill-2); position: relative; flex: none; padding: 0; }
input[type=checkbox]:checked { background: var(--accent); }
input[type=checkbox]:checked::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
input[type=file] { padding: 8px; font-size: 14px; }
input[type=date] { min-height: 46px; }
input[type=time] { padding: 8px 10px; width: auto; font-variant-numeric: tabular-nums; }
label.field { display: block; }
label.field > span, .field > span { display: block; font-size: 13px; color: var(--text-2); margin: 0 4px 5px; text-transform: uppercase; letter-spacing: .3px; }
.error { color: var(--red); font-size: 15px; }

/* numeric stepper */
.num { display: flex; align-items: stretch; border-radius: 12px; overflow: hidden; background: var(--fill); }
.num button { border: 0; border-radius: 0; background: transparent; color: var(--accent); width: 42px; padding: 0; font-size: 22px; font-weight: 400; }
.num button:active { background: var(--fill-2); transform: none; }
.num input { border: 0; border-radius: 0; text-align: center; padding: 9px 2px; width: 100%; min-width: 0; font-size: 19px; font-weight: 600; background: transparent; font-variant-numeric: tabular-nums; }
.num.compact button { width: 34px; }

/* floating capsule tab bar (glass) */
.tabs {
  position: fixed; left: 0; right: 0; margin: 0 auto; bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 560px); height: var(--tab-h); border-radius: 999px; padding: 5px;
  display: flex; align-items: stretch; z-index: 10; background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), var(--shadow);
}
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-2); font-size: 10.5px; font-weight: 600; border-radius: 999px; transition: background .2s, color .2s; }
.tabs a svg { width: 26px; height: 26px; }
.tabs a.on { color: var(--accent); background: var(--fill); }
.tabs .reload-tab { flex: 0 0 46px; cursor: pointer; }
.tabs .reload-tab svg { width: 22px; height: 22px; }

/* rest timer pill */
.rest { position: fixed; left: 0; right: 0; margin: 0 auto; bottom: calc(var(--tab-h) + 24px + env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 560px); border-radius: 999px; padding: 10px 12px 10px 20px;
  display: flex; align-items: center; gap: 12px; z-index: 11; background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.rest .time { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 84px; letter-spacing: -.5px; }
.rest .bar { height: 4px; background: var(--fill-2); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.rest .bar > i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.rest.over .time { color: var(--orange); }
body.has-rest { padding-bottom: calc(var(--tab-h) + 100px + env(safe-area-inset-bottom)); }

/* workout */
.ex-head { display: flex; align-items: center; gap: 12px; }
.ex-head .t { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.ex-target { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.hint { font-size: 14px; color: var(--text-2); margin: 10px 0 8px; }
.hint b { color: var(--text); font-weight: 600; }
.set { display: grid; grid-template-columns: 24px 1fr 1fr 50px; gap: 8px; align-items: center; margin-top: 8px; }
.set .no { color: var(--text-3); font-size: 14px; text-align: center; font-weight: 600; }
.set.done .num { box-shadow: inset 0 0 0 1.5px var(--green); }
.set.done .num input { color: var(--green); }
.set .ok { height: 44px; width: 50px; padding: 0; font-size: 20px; border-radius: 12px; background: var(--fill); color: var(--text-3); }
.set.done .ok { background: var(--green); color: #fff; }
.set-labels { display: grid; grid-template-columns: 24px 1fr 1fr 50px; gap: 8px; font-size: 11px; color: var(--text-2); margin-top: 12px; text-transform: uppercase; letter-spacing: .3px; }
.set-labels span { text-align: center; }

/* chart */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--text-2); font-size: 11px; }
.chart .grid { stroke: var(--sep); stroke-width: .5; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line2 { fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .dot { fill: var(--accent); }
.bars rect { fill: var(--accent); opacity: .85; }
.stat { text-align: center; padding: 8px 4px; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--text-2); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* sheets */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; margin: 0 auto; bottom: 0; width: min(100%, 640px);
  max-height: 90vh; overflow: auto; z-index: 21; border-radius: 34px 34px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  background: var(--card); box-shadow: 0 -10px 40px rgba(0,0,0,.35); }
.sheet::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--text-3); margin: 0 auto 14px; }
.sheet h2 { margin-top: 4px; }

/* login */
.login { min-height: 86vh; display: flex; flex-direction: column; justify-content: center; }
.login form { border-radius: 30px; padding: 26px 20px; background: var(--card); }
.login .logo { width: 84px; height: 84px; border-radius: 22px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #ff9a3c, #ff5e3a 60%, #c23b8f); box-shadow: 0 10px 30px rgba(255, 94, 58, .35); }
.login .logo svg { width: 48px; height: 48px; }

/* muscles */
.body { width: 100%; max-width: 440px; display: block; margin: 0 auto; }
.body .zone { stroke: var(--body-seam); stroke-width: 3; transition: fill .4s; }
.body .zone.body { fill: var(--body-base); }
.body .zone.idle { fill: var(--body-idle); }
.body .zone.muscle { cursor: pointer; }
.body .zone.muscle:active { filter: brightness(1.2); }
.body .sel-ring { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linejoin: round; pointer-events: none; }
.body text { fill: var(--text-2); font-size: 58px; letter-spacing: .04em; }
.body-wrap { border-radius: 16px; padding: 6px 0 0; margin: -4px -4px 8px; }
.legend { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 12px; color: var(--text-2); margin: 6px 0 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-left: 8px; }
.fbar { height: 5px; background: var(--fill-2); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.fbar > i { display: block; height: 100%; border-radius: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { padding: 7px 12px; font-size: 14px; border-radius: 999px; color: var(--text); background: var(--fill); font-weight: 500; }
.chip.primary { background: var(--accent); color: #fff; }
.chip.helper { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.warn-box { background: rgba(255, 149, 0, .12); border-radius: 14px; padding: 11px 13px; font-size: 14px; }
.warn-box b { color: var(--orange); }

/* pictures */
.thumbs { display: flex; gap: 8px; margin: 10px 0 2px; cursor: pointer; }
.thumbs img { border-radius: 12px; object-fit: cover; aspect-ratio: 3/2; background: var(--fill); }
.thumb-wrap { position: relative; display: inline-block; }
.thumb-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; padding: 0; border-radius: 50%; font-size: 14px; line-height: 1; background: var(--red); color: #fff; }
.mini-img { width: 48px; height: 32px; border-radius: 8px; object-fit: cover; background: var(--fill); flex: none; display: inline-block; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gallery img { width: 100%; border-radius: 16px; }

/* coach chat */
.chat { padding-bottom: 8px; }
.msgs { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-bottom: 100px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 20px; font-size: 16px; line-height: 1.35; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--card); border-bottom-left-radius: 6px; }
.msg.typing { display: flex; gap: 5px; padding: 14px 16px; }
.msg.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .2s; } .msg.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.chat-bar { position: fixed; left: 0; right: 0; margin: 0 auto; bottom: calc(var(--tab-h) + 24px + env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 560px);
  display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border: 1px solid var(--glass-border); box-shadow: var(--shadow); z-index: 9; }
.chat-bar input { background: transparent; padding: 8px 0; }
.chat-bar button { width: 40px; height: 40px; flex: none; font-size: 20px; }
.session { margin: 2px 0 8px; }
.session summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--fill); font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; font-variant-numeric: tabular-nums; }
.session summary::-webkit-details-marker { display: none; }
.session summary i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.session.live summary { color: var(--green); }
.session.live summary i { background: var(--green); box-shadow: 0 0 0 3px rgba(52, 199, 89, .25); }
.session p { margin: 8px 4px 0; }

/* pills & water */
.check { width: 30px; height: 30px; padding: 0; border-radius: 50%; flex: none; background: transparent; box-shadow: inset 0 0 0 2px var(--text-3); color: #fff; font-size: 16px; }
.check.on { background: var(--green); box-shadow: none; }
.switch { position: relative; display: inline-block; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--fill-2); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:disabled + i { opacity: .5; }
.water-total { font-size: 28px; letter-spacing: -.5px; }
.water-total b { font-weight: 700; }
.glasses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.glasses button { padding: 11px 4px; font-size: 15px; }

/* segmented control */
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--fill); margin: 4px 0 14px; }
.seg button { flex: 1; padding: 8px 4px; font-size: 14px; border-radius: 9px; background: transparent; color: var(--text-2); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* end-of-workout feedback */
.feels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.feel { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 16px; font-size: 13px; color: var(--text); background: var(--fill); }
.feel span { font-size: 28px; line-height: 1; }
.feel.on { background: var(--accent); color: #fff; }

/* nutrition */
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.macro .fbar { margin-top: 4px; }
.scanner video { width: 100%; height: 38vh; border-radius: 16px; background: #000; object-fit: cover; display: block; }
