:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #182820;
  background: #f4f5ee;
  color-scheme: light;
  --bg: #f4f5ee;
  --surface: #fff;
  --ink: #182820;
  --muted: #526057;
  --line: #e2e6dd;
  --forest: #19372b;
  --forest-deep: #132c22;
  --leaf: #d9f778;
  --lime-soft: #e8f2db;
  --accent: #275944;
  --fill: #edf2e9;
  --kcal: #286445;
  --carbs: #995117;
  --protein: #295f8a;
  --fat: #893667;
  --danger: #9d2539;
  --gutter: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-size: calc(65px + var(--safe-bottom));
  --dock-size: 63px;
  --ease: cubic-bezier(.2,.65,.25,1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
html { scroll-padding-bottom: calc(var(--nav-size) + 12px); }
html:has(.workout-dock) { scroll-padding-bottom: calc(var(--nav-size) + var(--dock-size) + 12px); }
main { padding: 14px max(var(--gutter),env(safe-area-inset-right)) calc(var(--nav-size) + 24px) max(var(--gutter),env(safe-area-inset-left)); }
main:has(.workout-dock) {
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
  padding-bottom: calc(var(--nav-size) + var(--dock-size) + 10px);
}
.frame { width: min(100%, 980px); margin-inline: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
h1 { font-size: clamp(2.15rem,8vw,2.7rem); font-weight: 760; letter-spacing: -.057em; line-height: 1.04; }
h2 { font-size: 1.2rem; font-weight: 730; letter-spacing: -.029em; line-height: 1.2; }
h3 { font-size: 1rem; font-weight: 710; letter-spacing: -.015em; line-height: 1.25; }
p { line-height: 1.45; }
small, .sub, .muted { color: var(--muted); font-size: .81rem; }
.sub { margin-top: 3px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wrap { flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 10px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 10; top: 10px; left: 10px; background: var(--surface); padding: 12px; border-radius: 10px; }
.icon { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--accent); font-weight: 650; }
button, input, select, textarea { font: inherit; }
button, .link-button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button {
  min-height: 44px; padding: 8px 13px; border: 0; border-radius: 13px;
  color: var(--ink); background: var(--fill); font-weight: 660; cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease), transform 150ms var(--ease);
}
button:active:not(:disabled) { transform: scale(.975); }
button:disabled { opacity: .55; cursor: default; }
:where(button,input,select,textarea,a,summary):focus-visible { outline: 2px solid #32664f; outline-offset: 3px; }
:where(main,h1,#dialog-title):focus { outline: none; }
.icon-button { width: 44px; height: 44px; flex: 0 0 44px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; }
.icon-button .icon { width: 20px; height: 20px; }
.icon-button.add, .heading-action { color: var(--forest); background: var(--lime-soft); }
.heading-action { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; }
.heading-action .icon { width: 18px; height: 18px; }
.icon-button.on-dark { color: #f1f7ea; background: #2c4a3b; }
.on-dark:focus-visible, .hero-action:focus-visible { outline-color: var(--leaf); }
.primary { color: #fff; background: var(--forest); }
.secondary { color: var(--accent); background: var(--fill); }
.text-button, .compact-link, .ghost { color: var(--accent); background: transparent; padding-inline: 8px; }
.danger { color: var(--danger); }
.full { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.full .icon { width: 17px; height: 17px; }
.small { font-size: .84rem; }
.link-button { min-height: 44px; padding: 8px 12px; border-radius: 13px; text-decoration: none; }
.icon-tile, .step-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; display: grid; place-items: center; color: var(--accent); background: var(--fill); }
.icon-tile .icon, .step-icon .icon { width: 20px; height: 20px; }
.green, .purple, .step-icon.active { color: var(--accent); background: var(--lime-soft); }
.blue { color: #2f5975; background: #e8f1f5; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 8px; background: var(--fill); color: var(--muted); font-size: .75rem; line-height: 1.18; font-weight: 700; }
.pill.live, .pill.purple { color: #25533e; background: var(--lime-soft); }
.pill .icon { width: 14px; height: 14px; }
.surface, .card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 15px; }
.page-heading, .active-heading { display: flex; gap: 10px; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.date-label { color: var(--muted); font-size: .82rem; font-weight: 650; line-height: 1.35; margin-bottom: 5px; }
.section-heading { display: flex; min-height: 39px; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; }
.section-heading h2 { padding-block: 6px; }
.section-count { color: var(--muted); font-size: .76rem; }
.bar, .hero-track, .macro-track { height: 5px; border-radius: 5px; overflow: hidden; background: var(--line); }
.bar i, .hero-track i, .macro-track i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

/* App shell */
.shell {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top,0px)) max(var(--gutter),env(safe-area-inset-right)) 9px max(var(--gutter),env(safe-area-inset-left));
}
.brand, .shell-tools { display: flex; align-items: center; gap: 8px; }
.mark { display: grid; place-items: center; border-radius: 12px; width: 38px; height: 38px; background: var(--forest); color: var(--leaf); }
.mark svg { width: 30px; height: 30px; }
.wordmark { font-size: 1.13rem; font-weight: 820; letter-spacing: -.055em; white-space: nowrap; }
.wordmark span { font-weight: 570; }
.shell-tools .icon-button { background: #e9eee5; }
.sample-label { display: inline-flex; min-height: 44px; padding: 5px; align-items: center; font-size: .72rem; color: var(--muted); text-decoration: none; }
nav {
  position: fixed; z-index: 4; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%,540px); min-height: var(--nav-size); display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
  padding: 4px max(7px,env(safe-area-inset-right)) calc(5px + var(--safe-bottom)) max(7px,env(safe-area-inset-left));
  background: #fbfcf8; border: 1px solid var(--line); border-bottom: 0;
}
nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: transparent; font-size: .69rem; color: #4a5b52; padding: 0; min-height: 54px; }
nav button[aria-current="page"] { color: var(--forest-deep); font-weight: 760; }
.tab-icon { display: grid; place-items: center; width: 44px; height: 29px; border-radius: 11px; }
nav button[aria-current="page"] .tab-icon { background: var(--leaf); }
nav .icon { width: 20px; height: 20px; }

/* Today */
.today-layout { display: grid; }
.nutrition-hero, .workout-welcome, .program-banner { border-radius: 25px; padding: 16px; color: #f6faef; background: var(--forest-deep); }
.nutrition-hero { background: radial-gradient(ellipse at 98% 0%,#264a36 0%,#19372b 44%,#132c22 100%); display: flex; flex-direction: column; }
.hero-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; letter-spacing: -.015em; }
.hero-heading .icon { color: #e3f6ba; width: 20px; }
.hero-intake { display: flex; align-items: center; gap: 8px; margin-block: 6px 9px; min-height: 94px; }
.hero-number { font-size: clamp(2.1rem,10.5vw,3.6rem); font-weight: 750; letter-spacing: -.065em; line-height: 1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hero-number small { color: #dce6dc; font-size: .9rem; letter-spacing: 0; font-weight: 620; }
.hero-muted { color: #d0ddd3; margin-top: 7px; font-size: .81rem; }
.ring { width: 94px; flex: 0 0 94px; aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.ring svg { position: absolute; inset: 0; width: 100%; fill: none; transform: rotate(-90deg); }
.ring-track { stroke: #4b6656; stroke-width: 6; }
.ring-tick { stroke: #a4bca4; stroke-width: 2; }
.ring-value { stroke: var(--leaf); stroke-width: 6; stroke-linecap: round; }
.ring div { display: grid; text-align: center; gap: 2px; }
.ring b { font-size: 1.17rem; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.ring small { font-size: .63rem; color: #dce6dc; }
.hero-macros { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; padding-block: 13px; border-top: 1px solid #526a5b; }
.hero-macros > div { display: grid; align-content: start; gap: 3px; color: #f6faef; }
.hero-macros span { font-size: .76rem; color: #dee8dd; }
.hero-macros b { font-size: 1.05rem; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.hero-macros b small { color: #dce6dc; font-size: .73rem; }
.hero-track { margin-top: 4px; background: #4b6656; height: 3px; }
.hero-macros .carbs i { background: #f6c68b; }
.hero-macros .protein i { background: #a6d6f2; }
.hero-macros .fat i { background: #edb9d9; }
.hero-action { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; color: var(--forest-deep); background: var(--leaf); min-height: 46px; margin-top: auto; }
.hero-action .icon { width: 18px; height: 18px; }
.training-today { display: grid; gap: 11px; }
.training-today .primary { justify-content: space-between; padding-inline: 14px; }
.weight-value { font-size: 1.53rem; line-height: 1.1; letter-spacing: -.04em; font-weight: 750; font-variant-numeric: tabular-nums; }
.weight-value small { font-size: .84rem; letter-spacing: 0; font-weight: 660; }
.weight-today { padding-block: 10px; }
.activity-list, .log-list, .history-list { padding: 0 12px; }
.activity-row, .log-entry { display: flex; align-items: center; gap: 9px; min-height: 56px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child, .log-entry:last-child { border-bottom: 0; }
.activity-row > b { font-size: .81rem; text-align: right; white-space: nowrap; }
.activity-row .icon-tile, .log-entry .icon-tile { height: 34px; width: 34px; flex-basis: 34px; border-radius: 10px; }
.activity-row .icon-tile .icon, .log-entry .icon-tile .icon { width: 17px; height: 17px; }

/* Nutrition */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 2px; padding: 3px; background: #e8ece3; border-radius: 14px; margin-bottom: 10px; }
.tabs button { min-width: 0; font-size: .82rem; padding: 4px 2px; border-radius: 11px; background: transparent; color: #4e5f55; overflow-wrap: anywhere; }
.tabs button.selected { background: var(--surface); box-shadow: 0 1px 3px #1728201b; color: var(--forest-deep); font-weight: 750; }
.date-control { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 7px; margin-bottom: 10px; }
.date-control button { background: var(--surface); border: 1px solid var(--line); }
.date-center { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; padding-inline: 5px; color: var(--forest); font-size: .83rem; }
.date-center .icon { width: 16px; height: 16px; }
.nutrition-summary { margin-bottom: 10px; }
.nutrition-summary .row h2 { font-size: 1rem; }
.macrogrid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.kcal { --nutrient: var(--kcal); color: var(--kcal); }
.carbs { --nutrient: var(--carbs); color: var(--carbs); }
.protein { --nutrient: var(--protein); color: var(--protein); }
.fat { --nutrient: var(--fat); color: var(--fat); }
.macro { display: grid; align-content: start; gap: 5px; min-width: 0; }
.macro-label { display: flex; align-items: center; gap: 4px; font-size: .73rem; font-weight: 670; }
.macro-label i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 100%; background: var(--nutrient); }
.macro b { font-size: 1.13rem; letter-spacing: -.045em; line-height: 1.06; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.macro b small { color: inherit; font-size: .64rem; letter-spacing: 0; }
.macro > small { font-size: .63rem; overflow-wrap: anywhere; }
.macro-track { height: 4px; }
.macro-track i { background: var(--nutrient); }
.nutrition-lists { display: grid; gap: 5px 14px; }
.nutrition-lists .section-heading { margin-top: 0; }
.entry-title { gap: 5px; align-items: baseline; }
.entry-time { color: var(--muted); font-size: .72rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inline-macros { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; margin-top: 5px; font-size: .72rem; font-weight: 670; }
.inline-macros span { white-space: nowrap; }
.entry-edit { background: transparent; color: var(--accent); }
.entry-edit .icon { width: 17px; }
.entry-tools { display: flex; align-items: center; gap: 4px; }
.inline-add { display: flex; align-items: center; gap: 5px; background: transparent; color: var(--accent); width: 100%; padding-inline: 7px; font-size: .88rem; }
.inline-add .icon { width: 17px; height: 17px; }
.empty { padding: 15px 8px; color: var(--muted); font-size: .88rem; line-height: 1.35; }
.search-field { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; }
.search-field input { margin: 0; padding-left: 1px; border: 0; background: transparent; }
.search-field:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-field input:focus-visible { outline: none; }
.chart-card { margin-bottom: 12px; }
.chart-card .tabs { margin-top: 10px; }
.chart { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; padding-top: 8px; }
.chart > div { min-width: 0; height: 151px; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 5px; }
.chart i { width: min(58%,35px); display: block; background: var(--nutrient); border-radius: 5px 5px 2px 2px; }
.chart i.unknown { background: var(--line); }
.chart small { width: 100%; text-align: center; font-variant-numeric: tabular-nums; font-size: .66rem; color: var(--muted); }

/* Workout console */
.workout-welcome { display: grid; gap: 13px; margin-bottom: 11px; }
.workout-welcome p { color: #dce6dc; margin-top: 5px; font-size: .89rem; }
.routine-card, .reference-link { margin-bottom: 8px; padding-block: 11px; }
.active-heading { margin-bottom: 6px; align-items: center; }
.active-heading h1 { font-size: clamp(1.48rem,5.9vw,2rem); letter-spacing: -.047em; }
.active-heading .date-label { margin-bottom: 3px; }
.session-meta { color: var(--muted); font-size: .78rem; }
.session-meta b { color: var(--forest); }
.session-bar { margin-block: 6px 9px; }
.session-bar i { background: #4d8052; }
.active-card { border: 1px solid var(--line); background: var(--surface); border-radius: 22px; padding: 13px; }
.set-console {
  margin-top: auto; border: 1px solid var(--line); background: var(--surface);
  border-radius: 22px; padding: 10px 13px 5px;
}
.active-card:has(+ .set-console) { margin-bottom: 10px; }
.set-kicker { justify-content: start; flex-wrap: wrap; gap: 5px; }
.active-card h2 { margin-block: 7px 4px; font-size: clamp(1.46rem,6vw,2.04rem); line-height: 1.06; letter-spacing: -.044em; }
.target-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: .79rem; }
.target-line b { color: var(--ink); }
.set-dots { display: flex; gap: 4px; flex-wrap: wrap; margin-block: 10px; }
.set-dots span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); background: var(--fill); font-size: .71rem; font-weight: 690; }
.set-dots .current { color: #14291c; background: var(--leaf); }
.set-dots .done { color: #fff; background: var(--accent); }
.set-dots .skipped { color: #85470e; background: #f8ebd8; }
.set-dots .icon { width: 15px; height: 15px; }
.previous-line { padding-block: 7px; color: var(--muted); font-size: .77rem; }
.compact-link { font-size: .84rem; }
.set-inputs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.set-input { min-width: 0; border-radius: 14px; background: var(--fill); padding: 6px 3px 3px; }
.set-input label { margin: 0 0 2px; text-align: center; color: var(--muted); font-size: .78rem; font-weight: 680; }
.set-input label small { font-size: .7rem; }
.stepper { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; }
.stepper button { padding: 0; color: var(--forest); background: #dfe9db; font-size: 1.22rem; }
.stepper input { text-align: center; background: transparent; border: 0; margin: 0; padding: 0 1px; font-size: clamp(1.02rem,5.3vw,1.34rem); font-weight: 730; font-variant-numeric: tabular-nums; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { appearance: none; }
.set-options { margin-top: 8px; }
.rir-row { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink); font-size: .88rem; font-weight: 660; }
.rir-row small { font-size: .75rem; font-weight: 500; }
.rir-row input { width: 68px; padding: 5px; margin: 0; text-align: center; }
.next-line { border-top: 1px solid var(--line); margin-top: 7px; padding-top: 3px; }
.next-line small, .next-line b { display: block; }
.next-line b { margin-top: 2px; font-size: .81rem; line-height: 1.2; }
.next-line .text-button { flex: 0 0 auto; font-size: .86rem; }
.rest-panel { display: flex; align-items: center; gap: 5px; padding: 2px 4px 2px 9px; border-radius: 12px; background: #e6f1df; color: #234b37; font-size: .82rem; font-weight: 650; }
.rest-panel:not([hidden]) { animation: enter 160ms var(--ease); }
.rest-adjust { min-width: 44px; padding-inline: 3px; color: #234b37; background: #d5e7cd; font-size: .77rem; }
.timer { font-size: 1.18rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.workout-dock {
  position: fixed; z-index: 3; bottom: var(--nav-size); left: 50%; transform: translateX(-50%);
  width: min(100%,540px); background: var(--bg); border-top: 1px solid var(--line);
  padding: 7px max(var(--gutter),env(safe-area-inset-right)) 6px max(var(--gutter),env(safe-area-inset-left));
}
.workout-dock button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.workout-dock .save-set { background: var(--forest-deep); color: #fff; }
.workout-dock .rest-action { background: var(--leaf); color: var(--forest-deep); }
.workout-dock .icon { width: 19px; height: 19px; }
.info-card .row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.info-card .row span { color: var(--muted); }
.info-card .row b { text-align: right; overflow-wrap: anywhere; }
.info-card .full { margin-top: 10px; }

/* Progress and exercise reference */
.range-control { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.range-control > span { color: var(--muted); font-weight: 600; font-size: .82rem; }
.range-control .tabs { flex: 1; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-bottom: 10px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 10px; }
.stat .icon-tile { width: 31px; height: 31px; flex: 0 0 31px; border-radius: 10px; }
.stat .icon-tile .icon { width: 17px; height: 17px; }
.stat > span:not(.icon-tile) { color: var(--muted); font-size: .74rem; font-weight: 650; }
.stat > b { font-size: 1.28rem; letter-spacing: -.04em; line-height: 1.13; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat > b small { display: block; letter-spacing: 0; font-weight: 600; font-size: .65rem; }
.progress-grid { display: grid; gap: 0 12px; }
.chart-card .weight-value { margin-top: 5px; }
.trend-label { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; color: var(--muted); font-size: .77rem; margin-top: 11px; }
.trend-label b { color: var(--ink); }
.line-chart { display: block; width: 100%; margin-top: 5px; overflow: visible; }
.axis-label { fill: var(--muted); font-size: 10px; }
.chart-gridline { stroke: #cfdbd2; stroke-dasharray: 3 4; }
.chart-fade { stop-color: #4d895d; stop-opacity: .24; }
.chart-fade.end { stop-opacity: .01; }
.chart-line { fill: none; stroke: #2a654a; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: #2a654a; stroke: var(--surface); stroke-width: 1.5; }
.chart-dates { color: var(--muted); font-size: .74rem; padding-inline: 14% 3%; }
.chart-data { margin-top: 6px; }
.chart-data summary { font-size: .81rem; color: var(--accent); }
.chart-data table { width: 100%; border-collapse: collapse; font-size: .8rem; text-align: left; }
.chart-data :where(td,th) { padding: 6px 3px; border-bottom: 1px solid var(--line); }
.chart-data :where(td,th):last-child { text-align: right; }
.exposure { margin-top: 9px; }
.exposure .row { margin-bottom: 4px; font-size: .82rem; }
.exposure .row span { overflow-wrap: anywhere; }
.exposure .bar { height: 4px; }
.program-banner { margin-bottom: 10px; }
.label-row { display: flex; align-items: center; gap: 6px; color: #dbe8d9; font-size: .74rem; font-weight: 730; letter-spacing: .07em; }
.label-row .icon { width: 18px; height: 18px; }
.program-banner h2 { font-size: 1.46rem; margin: 8px 0; }
.program-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.program-stats b, .program-stats small { display: block; }
.program-stats b { color: var(--leaf); font-size: 1.28rem; }
.program-stats small { color: #dbe8d9; }
.notice { border-radius: 13px; padding: 10px; color: #5d4827; background: #f7f0dd; font-size: .81rem; margin-bottom: 8px; }
.notice p { margin-top: 3px; }
.routine-card details { margin-top: 4px; }
summary { min-height: 44px; padding-block: 11px; cursor: pointer; }
.prescription { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 36px; padding-block: 6px; border-bottom: 1px solid var(--line); font-size: .84rem; }
.prescription:last-child { border-bottom: 0; }
.prescription > div { min-width: 0; overflow-wrap: anywhere; }
.prescription > div:last-child { text-align: right; }
.prescription small, .exercise-detail small, .history-entry small { display: block; }
.rest-day { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; padding-block: 9px; }
.rest-day .muted { margin-left: auto; }
.exercise-detail { margin-bottom: 7px; padding: 0 13px; }
.exercise-detail summary, .history-entry summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; }
.exercise-detail summary::-webkit-details-marker, .history-entry summary::-webkit-details-marker { display: none; }
.exercise-detail summary::after, .history-entry summary::after { content: ''; width: 7px; height: 7px; flex: 0 0 7px; transform: rotate(45deg); border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); margin-right: 3px; }
.exercise-detail[open] summary::after, .history-entry[open] summary::after { transform: rotate(135deg); }
.exercise-detail[open] { padding-bottom: 9px; }
.exercise-detail[open] p { font-size: .83rem; margin-block: 4px; }
.exercise-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin-block: 7px; }
.exercise-metrics > div { padding: 7px; border-radius: 9px; background: var(--fill); }
.exercise-metrics b { display: block; margin-top: 2px; font-size: .89rem; }
.history-entry:not(:last-child) { border-bottom: 1px solid var(--line); }
.muscle-layout { margin-top: 10px; }
.anatomy-board { display: flex; justify-content: center; gap: clamp(12px,8vw,55px); padding: 15px 10px 8px; border-radius: 15px; background: radial-gradient(ellipse at 50% 20%,#f4f8eb,#edf1e8); }
.anatomy-figure { width: min(38%,118px); text-align: center; }
.anatomy-figure svg { display: block; width: 100%; overflow: visible; }
.anatomy-figure span { display: block; color: var(--muted); font-size: .72rem; font-weight: 650; margin-top: 3px; }
.anatomy-base { fill: #d9e4d9; stroke: #718478; stroke-width: 1; }
.anatomy-detail { fill: none; stroke: #5c7264; stroke-width: .8; stroke-linecap: round; opacity: .72; }
.anatomy-zone { fill: var(--zone); stroke: #f7f9f2; stroke-width: 1; transition: fill 160ms var(--ease), stroke 160ms var(--ease); }
.anatomy-board:not([data-selected=""]) .anatomy-zone { fill: #cedbd0; }
.anatomy-board[data-selected="chest"] .chest,
.anatomy-board[data-selected="shoulders"] .shoulders,
.anatomy-board[data-selected="back"] .back,
.anatomy-board[data-selected="arms"] .arms,
.anatomy-board[data-selected="core"] .core,
.anatomy-board[data-selected="glutes"] .glutes,
.anatomy-board[data-selected="legs"] .legs { fill: var(--zone); stroke: #294938; }
.chest { --zone: #87ae61; }
.shoulders { --zone: #d89663; }
.back { --zone: #648f9b; }
.arms { --zone: #bf89aa; }
.core { --zone: #b4ad60; }
.glutes { --zone: #8794b8; }
.legs { --zone: #75a995; }
.muscle-legend { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.muscle-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; padding-inline: 7px; background: transparent; border: 1px solid var(--line); }
.muscle-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--zone); }
.muscle-chip[aria-pressed="true"] { background: var(--lime-soft); border-color: var(--accent); }
.muscle-layout.compact .anatomy-figure { width: min(38%,85px); }

/* Dialogs, forms and feedback */
label { display: block; margin-block: 7px; color: var(--muted); min-width: 0; }
.label { display: block; font-size: .83rem; font-weight: 660; }
input, select, textarea {
  display: block; width: 100%; min-width: 0; min-height: 44px; margin-top: 4px; padding: 7px 9px;
  border: 1px solid #cbd5c9; border-radius: 10px; background: #f9fbf8; color: var(--ink); font-size: 1rem;
}
input[type=number] { appearance: textfield; }
.set-input .stepper input { margin: 0; padding: 0 1px; border: 0; background: transparent; }
.check-label { display: flex; min-height: 44px; align-items: center; gap: 8px; }
.check-label input { width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--accent); }
.exercise-row { padding: 10px; margin-bottom: 6px; }
.settings-stack { display: grid; gap: 7px; }
.modal-item { display: flex; align-items: center; gap: 8px; }
.nutrition-preview { min-height: 32px; padding: 5px 8px; border-radius: 9px; background: var(--fill); }
dialog {
  width: min(100% - 22px,500px); max-height: 82vh; max-height: 82dvh; overflow: auto; overscroll-behavior: contain;
  padding: 17px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--ink);
  box-shadow: 0 20px 55px #10231748;
}
dialog::backdrop { background: #14241c75; }
dialog[open] { animation: enter 180ms var(--ease); }
@keyframes enter { from { opacity: .75; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
dialog h2 { margin-bottom: 10px; }
dialog form > .row:last-of-type { margin-top: 12px; justify-content: flex-end; }
#modal-error { color: var(--danger); }
#toast {
  display: none; position: fixed; z-index: 5; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-size) + 10px);
  max-width: calc(100% - 24px); width: max-content; border-radius: 14px; background: #19372b; color: #fff;
  padding: 9px 13px; font-size: .85rem; box-shadow: 0 5px 13px #18312336;
}
body[data-active="true"] #toast {
  top: max(12px,env(safe-area-inset-top)); bottom: auto;
}
.toast-undo { color: var(--leaf); background: #355745; margin-left: 6px; }

@media (max-width: 360px) {
  :root { --gutter: 11px; }
  .surface, .card, .active-card { padding: 10px; }
  .log-list, .activity-list, .history-list { padding: 0 8px; }
  .nutrition-hero { padding: 12px; }
  .macrogrid { gap: 5px; }
  .entry-tools { flex-direction: column; }
  .macro-label { font-size: .67rem; }
  .set-inputs { gap: 5px; }
  .active-heading { margin-bottom: 3px; }
  .active-heading h1 { font-size: 1.37rem; }
  .session-bar { margin-block: 5px 6px; }
  .active-card {
    display: grid; grid-template-areas: "badges dots" "lift lift" "targets targets";
    grid-template-columns: minmax(0,1fr) auto; align-items: center;
  }
  .active-card .set-kicker { grid-area: badges; }
  .active-card h2 { grid-area: lift; }
  .active-card .target-line { grid-area: targets; }
  .active-card .set-dots { grid-area: dots; justify-self: end; justify-content: end; max-width: 99px; margin: 0; }
  .set-console { padding: 7px 9px 4px; }
  .set-console .previous-line { padding-block: 5px; }
  .set-options { margin-top: 4px; }
  .set-console .next-line { margin-top: 4px; }
}
@media (max-width: 739px) {
  body[data-active="true"] .shell { display: none; }
  body[data-active="true"] main { padding-top: max(14px,env(safe-area-inset-top)); }
  dialog { margin: auto auto max(8px,var(--safe-bottom)); padding-bottom: 13px; }
}
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .today-layout { grid-template-columns: 1.15fr 1fr; gap: 15px; align-items: stretch; }
  .today-side .section-heading:first-child { margin-top: 0; }
  .nutrition-lists, .progress-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .nutrition-lists > section:only-child { grid-column: 1 / -1; }
  .workout-welcome { grid-template-columns: 1fr auto; align-items: center; }
  .workout-welcome .hero-action { margin-top: 0; }
  nav { border-radius: 16px 16px 0 0; }
  body:has(.workout-dock) nav { border-radius: 0; }
  .workout-dock { border-radius: 17px 17px 0 0; }
  body[data-active="true"] main { max-width: 650px; margin: auto; }
}
@media (min-width: 740px) {
  main:has(.workout-dock) { min-height: calc(100dvh - 63px); }
}
@media (max-width: 749px) and (max-height: 510px) {
  :root { --nav-size: calc(50px + var(--safe-bottom)); }
  nav { padding-block: 2px calc(2px + var(--safe-bottom)); }
  nav button { min-height: 44px; flex-direction: row; gap: 4px; }
  .tab-icon { width: 30px; }
}
@media (hover: hover) {
  button:not(.primary):not(.hero-action):hover { background-image: linear-gradient(#33664b10,#33664b10); }
  .primary:hover { filter: brightness(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  button:active:not(:disabled) { transform: none; }
}

/* 0.4.1 — visual identity. Layout and interaction logic stay on 0.4.0. */
:root {
  font-family: "Avenir Next", Avenir, "Trebuchet MS", Lato, sans-serif;
  --bg:#f5f5f1; --surface:#ffffff; --ink:#202821; --muted:#56625a;
  --line:#e0e4dd; --fill:#edf0eb; --accent:#2d6248;
  --forest:#203b2e; --forest-deep:#193024; --leaf:#d9f778;
  --lime-soft:#e4eddb; --nav-bg:#fbfcf9;
  --button-bg:#d9f778; --button-ink:#19291b;
  --hero-bg:#20372b; --hero-line:#53695b; --hero-ink:#f6f9ef;
  color:var(--ink);background:var(--bg);
}
:root[data-theme="dark"] {
  color-scheme:dark;
  --bg:#101311; --surface:#191e1a; --ink:#f0f3ec; --muted:#aab6ab;
  --line:#303a32; --fill:#222b24; --accent:#d0ed99;
  --forest:#d0ed99; --forest-deep:#20362a; --leaf:#d9f778;
  --lime-soft:#283b29; --nav-bg:#151a16; --button-bg:#d9f778; --button-ink:#152319;
  --kcal:#b5df86; --carbs:#f4c27e; --protein:#8bc5f2; --fat:#f0aacc; --danger:#ff9d9d;
  --hero-bg:#1c2a20; --hero-line:#405346; --hero-ink:#f0f3ec;
}
body {color:var(--ink);background:var(--bg);font-weight:500;}
h1 {font-size:clamp(2.15rem,9vw,2.85rem);font-weight:750;letter-spacing:-.052em;line-height:1.03;}
h2 {font-weight:700;letter-spacing:-.035em;} h3{font-weight:700;}
.wordmark {font-size:1.2rem;letter-spacing:-.055em;font-weight:800;} .wordmark span{font-weight:500;color:var(--muted);letter-spacing:-.04em;}
.mark {width:40px;height:40px;border-radius:12px;background:#20382b;color:#d9f778;border:1px solid #62805b40;box-shadow:inset 0 1px 0 #d9f77818;}
.mark svg{width:32px;height:32px;}
.shell {border-bottom:1px solid var(--line);padding-bottom:10px;}
.shell-tools .icon-button{background:var(--surface);border:1px solid var(--line);color:var(--ink);}
.sample-label{font-size:.7rem;letter-spacing:.025em;}
:where(button,input,select,textarea,a,summary):focus-visible {outline-color:var(--accent);}
nav{background:var(--nav-bg);border-color:var(--line);}
nav button{color:var(--muted);font-weight:600;font-size:.72rem;position:relative;gap:3px;}
nav button[aria-current="page"]{color:var(--accent);font-weight:750;}
nav button[aria-current="page"] .tab-icon{background:transparent;}
nav button[aria-current="page"]::before{content:'';position:absolute;top:0;width:17px;height:2px;background:var(--accent);border-radius:3px;}
nav .icon{width:23px;height:23px;stroke-width:1.65;}
.surface,.card{border-radius:19px;border-color:var(--line);}
.page-heading{margin-bottom:14px;} .date-label{font-size:.78rem;font-weight:600;letter-spacing:.015em;}
.nutrition-hero,.workout-welcome,.program-banner{background:var(--hero-bg);color:var(--hero-ink);border:1px solid var(--hero-line);border-radius:22px;}
.hero-number{font-size:clamp(2.3rem,11vw,3.65rem);font-weight:750;letter-spacing:-.07em;}
.hero-macros{border-color:var(--hero-line);} .hero-macros .carbs b{color:#f4c27e}.hero-macros .protein b{color:#8bc5f2}.hero-macros .fat b{color:#f0aacc}
.hero-macros b small{color:#d5dfd1;}
.hero-action,.primary,.workout-dock .save-set,.workout-dock .rest-action{background:var(--button-bg);color:var(--button-ink);font-weight:750;border-radius:13px;}
.training-today .primary{background:var(--fill);color:var(--ink);border:1px solid var(--line);}
.heading-action,.icon-button.add{background:var(--button-bg);color:var(--button-ink);}
.icon-tile,.step-icon{background:var(--fill);color:var(--accent);}
:root[data-theme="dark"] .blue{background:#203546;color:#a1d1ff;}
:root[data-theme="dark"] .purple{background:#342e41;color:#cbb9f4;}
.pill.live,.pill.purple{color:var(--accent);background:var(--lime-soft);}
.tabs{border-radius:0;background:none;border-bottom:1px solid var(--line);padding:0;gap:5px;margin-bottom:8px;}
.tabs button{border-radius:0;position:relative;color:var(--muted);font-weight:600;}
.tabs button.selected{color:var(--accent);background:none;box-shadow:none;font-weight:750;}
.tabs button.selected::after{content:'';position:absolute;bottom:0;left:13%;right:13%;height:2px;background:var(--accent);border-radius:2px;}
.range-control .tabs{border-bottom:0;}.range-control .tabs button.selected{background:var(--lime-soft);border-radius:9px;}.range-control .tabs button.selected::after{display:none;}
.date-control button{background:transparent;border:0;color:var(--ink);}
.macrogrid{gap:8px;}.macro b{font-size:clamp(.99rem,4.5vw,1.27rem);letter-spacing:-.06em;font-weight:750;}
.macro > small{font-size:.64rem;line-height:1.3;}.macro-label{font-size:.73rem;letter-spacing:-.025em;}
.macro-track{background:var(--fill);}
.log-list,.activity-list,.library-group{background:transparent;border:0;padding:0;}
.log-entry,.activity-row{gap:10px;padding:10px 0;align-items:center;}
.log-entry .grow,.activity-row .grow{min-width:0;}
.food-art{display:grid;place-items:center;width:46px;height:46px;flex:0 0 46px;border-radius:13px;background:var(--art-bg);}
.food-art svg{width:34px;height:34px;}
:root[data-theme="light"] .food-art{background:color-mix(in srgb,var(--art-bg) 16%,#f5f5f1);}
.inline-macros{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));gap:3px 9px;font-size:.73rem;font-weight:700;line-height:1.3;}
.entry-title b{font-size:.96rem;}.entry-time{font-size:.73rem;}.entry-edit{color:var(--muted);}
.library-category{margin:14px 0 3px;color:var(--muted);font-size:.78rem;font-weight:700;letter-spacing:.025em;}
.library-section .entry-tools{gap:0;}
.library-section .icon-button.add{background:var(--lime-soft);color:var(--accent);}
.search-field{background:var(--surface);border-color:var(--line);}
.inline-add{background:transparent;color:var(--accent);}
.active-heading h1{font-size:clamp(1.4rem,5.6vw,2rem);letter-spacing:-.04em;}
.active-card{background:transparent;border:0;border-radius:0;padding:5px 0;}
.active-card h2{font-size:clamp(1.64rem,7vw,2.25rem);line-height:1.1;letter-spacing:-.045em;margin:6px 0 10px;}
.active-card .set-kicker .pill{background:transparent;padding:0;color:var(--accent);font-size:.78rem;}
.target-line{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;}
.target-line >div{display:grid;gap:3px;padding-inline:10px;border-left:1px solid var(--line);}
.target-line >div:first-child{border:0;padding-left:0;}.target-line small{font-size:.68rem;}.target-line b{font-size:1.15rem;line-height:1.05;}
.set-dots{gap:6px;margin:10px 0 4px;}.set-dots span{border-radius:50%;width:25px;height:25px;}
.set-dots .done{color:var(--button-ink);background:var(--accent);}
.set-console{border:0;background:transparent;padding:5px 0 2px;}
.set-input{background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:7px 4px 4px;}
.stepper button{background:var(--fill);color:var(--accent);border-radius:10px;}
.stepper input{font-size:clamp(1.25rem,5.5vw,1.75rem);letter-spacing:-.045em;font-weight:750;}
.previous-line{font-size:.79rem;}.next-line{border-color:var(--line);}
.rest-panel{background:var(--lime-soft);color:var(--accent);}.rest-adjust{background:var(--fill);color:var(--accent);}
.timer{font-size:1.55rem;line-height:1;font-weight:750;}
.workout-dock{background:var(--bg);border:0;}
.stat{border:0;background:var(--surface);border-radius:15px;}.stat>b{font-size:1.48rem;}
.chart-gridline{stroke:var(--line);}.chart-fade{stop-color:var(--accent);}.chart-line{stroke:var(--accent);}.chart-point{fill:var(--accent);}
.anatomy-board{background:var(--fill);}.anatomy-base{fill:#8b9a8b;stroke:#b3c2b3;}.anatomy-detail{stroke:#3d5041;}.anatomy-zone{stroke:var(--surface);}
:root[data-theme="dark"] .anatomy-board:not([data-selected=""]) .anatomy-zone{fill:#596a5d;}
input,select,textarea{background:var(--bg);color:var(--ink);border-color:var(--line);}
.theme-options{display:flex;gap:5px;}.theme-options button[aria-pressed="true"]{color:var(--button-ink);background:var(--button-bg);}
.appearance-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 0;}
:root[data-theme="dark"] .notice{background:var(--fill);color:var(--muted);border-color:var(--line);}
:root[data-theme="dark"] .notice b{color:var(--ink);}
:root[data-theme="dark"] dialog::backdrop{background:#0009;}
@media(min-width:375px){.log-entry:not(:has(.entry-tools)) .inline-macros{grid-template-columns:repeat(4,minmax(0,max-content));font-size:.66rem;gap:3px 5px;}}
@media(max-width:360px){.food-art{width:39px;height:39px;flex-basis:39px;}.food-art svg{width:29px;height:29px;}.active-card h2{font-size:1.52rem;margin:4px 0 6px;}.active-card{grid-template-areas:"badges dots" "lift lift" "targets targets";}.target-line small{font-size:.65rem;}.set-input{padding:4px 2px 2px;}.set-console{padding:3px 0 1px;}.set-console .previous-line{padding-block:4px;}.set-console .next-line{margin-top:4px;}.macrogrid{gap:5px;}}
/* Final optical and ergonomic pass */
:root[data-theme="dark"]{--bg:#101210;--surface:#1a1d1a;--line:#313a31;--fill:#232923;--nav-bg:#171b17;--muted:#adb7ad;--hero-bg:#1c2920;}
.wordmark{letter-spacing:-.04em;}.wordmark span{margin-left:1px;}
.mark{background:linear-gradient(145deg,#294334,#1a2f24);box-shadow:inset 0 1px 0 #d9f77826,0 2px 5px #0002;}
.mark svg{width:33px;height:33px;}
nav button:hover{background-image:none!important;}
.sample-label{background:transparent;border:1px solid var(--line);border-radius:9px;padding-inline:7px;min-height:34px;}
.macro-grid,.macrogrid{column-gap:8px;}.macro-label{font-size:.76rem;}.macro > small{font-size:.69rem;}
.inline-macros,.log-entry:not(:has(.entry-tools)) .inline-macros{grid-template-columns:repeat(2,minmax(0,max-content));font-size:.76rem;gap:3px 12px;line-height:1.25;}
@media(min-width:600px){.log-entry:not(:has(.entry-tools)) .inline-macros{grid-template-columns:repeat(2,minmax(0,max-content));}}
@media(max-width:360px){.inline-macros,.log-entry:not(:has(.entry-tools)) .inline-macros{font-size:.71rem;gap:3px 8px;}.macro-label{font-size:.68rem;}.macro > small{font-size:.62rem;}}
.previous-line{display:flex;justify-content:space-between;align-items:center;gap:6px;line-height:1.25;}
.previous-line span{display:flex;align-items:center;gap:5px;white-space:nowrap;}.previous-line .icon{width:14px;height:14px;}.previous-line b{color:var(--ink);font-size:.78rem;font-weight:650;text-align:right;}
.rest-panel{flex:0 0 auto;justify-content:space-between;gap:8px;margin-top:auto;padding:5px 7px 5px 10px;background:var(--surface);border:1px solid var(--line);}
.rest-label{display:flex;align-items:center;gap:6px;flex:1;}.rest-label .icon{width:17px;height:17px;}.rest-controls{display:flex;gap:4px;}.rest-adjust{min-height:44px;min-width:44px;}.timer{font-size:1.6rem;white-space:nowrap;color:var(--accent);}
.rest-panel:not([hidden]) + .set-console{margin-top:8px;}
@media(min-height:790px) and (min-width:361px){
 .active-card{padding-block:12px 14px;}.active-card h2{font-size:clamp(1.9rem,8vw,2.4rem);margin:12px 0 20px;}
 .target-line b{font-size:1.35rem;}.target-line small{font-size:.74rem;}.set-dots{margin-top:16px;}
 .rest-panel:not([hidden]){display:grid;grid-template-areas:"label controls" "timer controls";grid-template-columns:1fr auto;padding:11px 12px;}
 .rest-label{grid-area:label;}.timer{grid-area:timer;font-size:2.5rem;line-height:1.03;}.rest-controls{grid-area:controls;align-items:center;}
 .set-input{padding:10px 4px 6px;}.stepper input{font-size:1.9rem;}.previous-line{padding-block:9px;}
}
@media(max-height:720px){.rest-panel{gap:4px;padding:2px 3px 2px 6px;}.rest-label{font-size:.72rem;gap:3px;}.rest-label .icon{width:13px;height:13px;}.rest-controls{gap:3px;}.timer{font-size:1.23rem;}.rest-panel:not([hidden])+.set-console{margin-top:3px;}}

/* 0.4.2 • Semantic icon system / iOS-oriented typography / focused layouts. */
:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Variable","Segoe UI",Lato,sans-serif;--gutter:18px;--display-font:"Avenir Next",Avenir,Cabin,"Segoe UI Variable",Lato,sans-serif;}
:root[data-theme="dark"]{--bg:#101113;--surface:#191b1d;--fill:#24272a;--line:#303336;--ink:#f1f3f0;--muted:#b0b6b5;--nav-bg:#151719;--accent:#d2ed9b;--lime-soft:#29352b;--button-bg:#d6f48c;--button-ink:#19251a;--hero-bg:#202923;--hero-line:#424f43;--kcal:#bde98b;--carbs:#f5c481;--protein:#8bcaff;--fat:#f4aed1;}
body{font-weight:400;line-height:1.42;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}
h1,h2,h3,.wordmark,.hero-number,.weight-value,.timer,.stepper input,.stat>b,.macro b{font-family:var(--display-font);font-variant-numeric:tabular-nums;}
h1{letter-spacing:-.045em;font-weight:700;font-size:clamp(2.25rem,9vw,2.8rem);line-height:1.04;}h2,h3{letter-spacing:-.025em;font-weight:650;}
.wordmark{font-weight:700;letter-spacing:-.035em;}.wordmark span{font-weight:500;}
.mark{background:#253b2e;color:#d6f48c;border:1px solid #61705b60;box-shadow:none;}
.mark svg{width:32px;height:32px;}
.shell{border-bottom:0;}.page-heading{margin-bottom:13px;}.date-label{font-weight:550;}
.nav-icon,.icon{stroke-width:1.65;}
nav{border:0;border-top:1px solid var(--line);background:var(--nav-bg);}
nav button{font-size:.74rem;letter-spacing:.005em;}nav button[aria-current="page"]{font-weight:700;}
nav button[aria-current="page"] .tab-icon{color:var(--accent);}
nav button[aria-current="page"]::before{width:20px;}
.macro-icon{width:16px;height:16px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.macro-label{display:flex;align-items:center;gap:5px;font-size:.76rem;letter-spacing:0;line-height:1.15;}
.macro-label .macro-icon{width:17px;height:17px;}.macro b{letter-spacing:-.025em;font-size:clamp(1.02rem,4vw,1.26rem);font-weight:700;}
.macrogrid{gap:8px;margin-top:14px;}.macro{gap:6px;}.macro > small{font-size:.68rem;}.macro-track{height:4px;}
.hero-heading .macro-icon{width:20px;height:20px;color:#d6f48c;}.hero-macro-label{display:flex;align-items:center;gap:6px;line-height:1.3;}.hero-macro-label .macro-icon{width:17px;height:17px;color:var(--nutrient);}
.hero-number{font-weight:700;letter-spacing:-.045em;}.hero-macros b{font-family:var(--display-font);font-variant-numeric:tabular-nums;font-size:1.18rem;}
.inline-macros,.log-entry:not(:has(.entry-tools)) .inline-macros{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:8px;row-gap:4px;font-size:.76rem;font-weight:600;margin-top:6px;}
.macro-chip{display:flex;align-items:center;gap:4px;line-height:1.35;min-width:0;}.macro-chip .macro-icon{width:14px;height:14px;}.macro-chip>span{white-space:normal;overflow-wrap:anywhere;}
.macro-field{display:flex;align-items:center;gap:6px;}.macro-field .macro-icon{width:18px;height:18px;}
.tabs button{display:flex;align-items:center;justify-content:center;gap:5px;font-size:.84rem;font-weight:550;min-height:44px;white-space:nowrap;}.tabs button .icon,.tabs button .macro-icon{width:16px;height:16px;}.tabs button.selected{font-weight:700;}
.nutrient-tabs button{flex-direction:column;gap:3px;min-height:50px;}.nutrient-tabs button .macro-icon{width:18px;height:18px;}.nutrient-tabs button.selected{color:var(--nutrient);}.nutrient-tabs button.selected:after{background:var(--nutrient);}
.nutrition-section-heading h2,.library-category{display:flex;align-items:center;gap:8px;}.nutrition-section-heading h2 .icon{width:19px;height:19px;color:var(--accent);}.library-category .icon{width:15px;height:15px;}
.log-entry,.activity-row{padding-block:12px;gap:10px;}.entry-title b{font-size:1rem;letter-spacing:-.01em;font-weight:650;}.food-art{border-radius:14px;width:46px;height:46px;flex-basis:46px;}.entry-time{font-size:.76rem;}
.nutrition-summary{border:0;background:var(--surface);padding:14px 13px;border-radius:18px;}
.nutrition-lists .section-heading{margin-top:10px;}.library-category{margin-top:18px;}
.add-choices{display:grid;gap:10px;margin-block:15px;}.choice{display:flex;align-items:center;gap:12px;text-align:left;padding:12px;background:var(--surface);border:1px solid var(--line);border-radius:15px;color:var(--ink);}.choice>span:nth-child(2){display:grid;gap:3px;flex:1;}.choice .icon:last-child{width:18px;height:18px;}.choice b{font-size:1.04rem;}.choice small{font-size:.8rem;}
.repeat-quantity{display:flex;align-items:center;justify-content:center;gap:7px;font-size:.82rem;color:var(--accent);}.repeat-quantity .icon{width:17px;height:17px;}
.nutrition-preview .inline-macros{margin:4px 0;}
.active-heading h1{font-weight:700;letter-spacing:-.035em;}.active-card h2{font-weight:700;letter-spacing:-.04em;}.target-line small{display:flex;align-items:center;gap:4px;white-space:nowrap;}.target-line small .icon{width:13px;height:13px;}.target-line b{font-family:var(--display-font);font-size:1.26rem;}
.active-focus{display:none;}.active-focus .focus-art .anatomy-board{background:transparent;gap:3px;padding:0;}.active-focus .anatomy-figure svg{height:112px;width:auto;}.active-focus .anatomy-figure span{display:none;}.focus-label{display:flex;align-items:center;gap:5px;font-size:.78rem;color:var(--muted);}.focus-label .icon{width:15px;height:15px;}.focus-copy{min-width:0;display:grid;align-content:center;gap:5px;}.focus-copy strong{font-size:1.08rem;line-height:1.15;}.focus-copy small{line-height:1.25;}.focus-copy button{justify-content:flex-start;text-align:left;padding:0;min-height:44px;display:flex;align-items:center;gap:4px;font-size:.81rem;}.focus-copy button .icon{width:14px;height:14px;}
.set-input label{font-weight:600;}.stepper input{font-weight:700;letter-spacing:-.025em;}.set-input{border:0;background:var(--surface);}.stepper button{font-size:1.4rem;}.timer{font-weight:700;}
.stat-grid .stat{border-radius:17px;}.chart-card h3{font-family:var(--display-font);font-weight:700;}
@media(min-height:810px) and (min-width:361px){.active-focus:not([hidden]){display:grid;grid-template-columns:108px minmax(0,1fr);align-items:center;gap:10px;padding:7px 12px;margin:4px 0 9px;border:1px solid var(--line);background:var(--surface);border-radius:16px;}.active-card h2{margin-bottom:14px;}.set-dots{margin-top:12px;}.active-focus .focus-art{overflow:hidden;}}
@media(max-width:375px){.tabs button{font-size:.76rem;gap:3px;}.tabs button .icon{width:13px;height:13px;}.macro-label{font-size:.69rem;gap:3px;}.macro-label .macro-icon{width:14px;height:14px;}.inline-macros,.log-entry:not(:has(.entry-tools)) .inline-macros{font-size:.72rem;column-gap:4px;}.macro-chip{gap:3px;}.macro-chip .macro-icon{width:12px;height:12px;}.target-line small .icon{display:none;}.food-art{width:39px;height:39px;flex-basis:39px;}.entry-title b{font-size:.92rem;}.library-section .entry-tools{flex-direction:column;}.library-section .entry-tools .icon-button{height:44px;width:44px;flex-basis:44px;}}
@media(max-width:340px){.macrogrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 15px;}.macro-label{font-size:.8rem;}.macro-label .macro-icon{width:16px;height:16px;}.macro b{font-size:1.2rem;}.macro > small{font-size:.72rem;}.nutrition-summary{padding:11px;}.tabs button{gap:3px;}.tabs button .icon{display:none;}.hero-macro-label{font-size:.74rem;gap:3px;}.hero-macro-label .macro-icon{width:14px;height:14px;}}
@media(prefers-reduced-motion:no-preference){.macro-track i,.hero-track i,.bar i{transition:width 200ms ease-out;}button{transition:background-color 130ms,color 130ms,transform 130ms;}}

/* 0.4.2 review pass 2: contrast, anatomy selection, density, visual rhythm. */
:root[data-theme="dark"] .anatomy-base{fill:#59645e;stroke:#86958c;}:root[data-theme="dark"] .anatomy-board:not([data-selected=""]) .anatomy-zone{fill:#414c47;}
:root[data-theme="dark"] .anatomy-board[data-selected="chest"] .chest,
:root[data-theme="dark"] .anatomy-board[data-selected="shoulders"] .shoulders,
:root[data-theme="dark"] .anatomy-board[data-selected="back"] .back,
:root[data-theme="dark"] .anatomy-board[data-selected="arms"] .arms,
:root[data-theme="dark"] .anatomy-board[data-selected="core"] .core,
:root[data-theme="dark"] .anatomy-board[data-selected="glutes"] .glutes,
:root[data-theme="dark"] .anatomy-board[data-selected="legs"] .legs{fill:var(--zone);stroke:#cfe1cc;stroke-width:.85;}
:root[data-theme="dark"] .anatomy-detail{stroke:#a3afa6;opacity:.5;}
.nutrition-hero .carbs .macro-icon{color:#f4c27e;}.nutrition-hero .protein .macro-icon{color:#8bc5f2;}.nutrition-hero .fat .macro-icon{color:#f0aacc;}
.nutrition-hero .hero-macro-label{font-size:.8rem;}.nutrition-hero .hero-macros{gap:8px;}
.nutrition-hero{padding:16px;border-radius:21px;}.hero-intake{padding-block:8px 11px;}
body[data-page="Nutrition"] .page-heading{margin-bottom:7px;}.date-control{margin-top:0;margin-bottom:7px;}.date-center{font-weight:600;}
.nutrition-summary .macrogrid{margin-top:11px;}.nutrition-summary .macro-label .macro-icon{width:18px;height:18px;}
.nutrition-summary .macro > small{font-size:.72rem;}.nutrition-summary .macro b{font-size:clamp(1.1rem,4.2vw,1.32rem);}
.log-entry .entry-edit{border-radius:12px;}.log-entry .entry-edit:focus-visible{outline-offset:-2px;}
.log-entry,.activity-row{padding-block:10px;}.entry-title{align-items:baseline;}.entry-time{white-space:nowrap;}
.library-section .log-entry .entry-tools{gap:2px;}.library-category .icon{opacity:.9;}
.active-focus:not([hidden]) .focus-copy button{color:var(--accent);}.active-focus .focus-art .anatomy-board{justify-content:space-around;}
.active-focus .focus-art .anatomy-figure{width:48%;}.active-focus .focus-art .anatomy-figure svg{width:100%;height:105px;}
@media(min-height:810px) and (min-width:361px){.active-focus:not([hidden]){padding:7px 9px;border-radius:14px;grid-template-columns:105px minmax(0,1fr);}}
@media(max-width:375px){.nutrition-summary .macro-label .macro-icon{width:15px;height:15px;}.nutrition-summary .macro > small{font-size:.66rem;}.nutrition-hero .hero-macro-label{font-size:.73rem;}}

/* 0.4.2 review pass 3: analysis, secondary actions and interaction polish */
.today-section h2,.muscle-exposure h3{display:flex;align-items:center;gap:7px;}.today-section h2 .icon,.muscle-exposure h3 .icon{width:18px;height:18px;color:var(--accent);}
.muscle-exposure-list{display:grid;gap:9px;margin:13px 0;}.muscle-exposure .exposure{margin:0;}.muscle-exposure .exposure .row span{display:flex;align-items:center;gap:7px;}.muscle-exposure .zone-dot{display:block;width:9px;height:9px;border-radius:50%;background:var(--zone,var(--muted));}.muscle-exposure .bar i{background:var(--zone,var(--muted));}.muscle-exposure .sub:last-child{line-height:1.45;}
.settings-action{display:flex;align-items:center;text-align:left;gap:10px;width:100%;min-height:50px;background:transparent;color:var(--ink);border:0;border-bottom:1px solid var(--line);border-radius:0;padding:10px 4px;}.settings-action .icon:first-child{color:var(--accent);width:19px;height:19px;}.settings-action .icon:last-child{margin-left:auto;color:var(--muted);width:16px;height:16px;}.settings-action span{flex:1;}
.workout-dock .rest-action{background:var(--surface);color:var(--accent);border:1px solid var(--accent);}.workout-dock .rest-action:hover{filter:brightness(1.08);}
:root[data-theme="dark"] .rest-panel{background:#1d2721;border-color:#4b6050;}.rest-panel .timer{color:var(--accent);}
.hero-action,.heading-action{letter-spacing:.005em;}.nav-icon{stroke-width:1.8;}.tab-icon .icon{stroke-width:1.75;}
button:active:not(:disabled){transform:scale(.985);}
@media(prefers-reduced-motion:reduce){button:active:not(:disabled){transform:none;}}

/* Final review: explicit selected item art, separate action and calculation, compact workout context. */
.library-picker{display:flex;align-items:center;gap:9px;}.library-picker>span{flex:0 0 auto;}.library-picker select{flex:1;min-width:0;margin:0;}.library-picker .food-art{width:44px;height:44px;flex-basis:44px;}.repeat-quantity{margin:5px 0 9px;border-radius:12px;}.nutrition-preview{padding:9px 10px;margin-bottom:7px;}
@media(min-height:650px) and (max-height:809px){.active-focus:not([hidden]){display:flex;align-items:center;gap:6px;padding:0;margin:6px 0 4px;min-height:27px;}.active-focus .focus-art,.active-focus .focus-copy small,.active-focus .focus-copy button{display:none;}.active-focus .focus-copy{display:flex;align-items:center;gap:8px;}.active-focus .focus-label{font-size:.72rem;}.active-focus .focus-copy strong{font-size:.82rem;line-height:1.15;}}
@media(min-height:810px) and (max-width:360px){.active-focus:not([hidden]){display:flex;align-items:center;gap:6px;padding:0;margin:6px 0 4px;min-height:27px;}.active-focus .focus-art,.active-focus .focus-copy small,.active-focus .focus-copy button{display:none;}.active-focus .focus-copy{display:flex;align-items:center;gap:8px;}.active-focus .focus-label{font-size:.72rem;}.active-focus .focus-copy strong{font-size:.82rem;}}

.active-focus.no-art:not([hidden]){grid-template-columns:minmax(0,1fr);}
/* Stress review: two-line exercise names on compact screens need breathing room above the action dock. */
@media(max-height:720px){main:has(.workout-dock)>.tabs{margin-bottom:3px;}main:has(.workout-dock) .session-bar{margin-bottom:5px;}.active-card h2{margin-block:3px 4px;}.set-options{margin-top:5px;}.next-line{margin-top:4px;}.set-console .previous-line{padding-block:3px;}}

@media(max-width:540px){.active-card.long-name+.active-focus:not([hidden]){display:flex;align-items:center;gap:6px;padding:0;margin:6px 0 4px;min-height:27px;border:0;background:transparent;}.active-card.long-name+.active-focus .focus-art,.active-card.long-name+.active-focus .focus-copy small,.active-card.long-name+.active-focus .focus-copy button{display:none;}.active-card.long-name+.active-focus .focus-copy{display:flex;align-items:center;gap:8px;}.active-card.long-name+.active-focus .focus-label{font-size:.72rem;}.active-card.long-name+.active-focus .focus-copy strong{font-size:.82rem;}}

/* 0.4.3 — finishing pass: typographic contrast and direct numeric entry. No external fonts or trackers. */
:root {
  font-family: Inter, "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --display-font: "Inter Display", "DIN Alternate", Bahnschrift, "Avenir Next", "Segoe UI", sans-serif;
  --bg:#f1f4f6; --surface:#ffffff; --ink:#172127; --muted:#45535e;
  --fill:#e6ebef; --line:#c9d2da; --nav-bg:#ffffff;
  --accent:#245638; --lime-soft:#e1eddb; --button-bg:#d6f48c; --button-ink:#172418;
  --kcal:#286445; --carbs:#8b470e; --protein:#235d92; --fat:#87315f;
  --danger:#9d2539;
  --hero-bg:#25352d; --hero-line:#586b60;
}
:root[data-theme="dark"] {
  --bg:#0d1116; --surface:#1b222a; --fill:#2a343e; --line:#45515e;
  --ink:#f4f7fa; --muted:#c0cbd5; --nav-bg:#151b22;
  --accent:#d1f19a; --lime-soft:#2b3d33; --button-bg:#d6f48c; --button-ink:#172418;
  --hero-bg:#202e29; --hero-line:#53695c; --hero-ink:#f4f8f3;
  --kcal:#c5ef97; --carbs:#ffd098; --protein:#9ad5ff; --fat:#ffc1df; --danger:#ffb1b1;
}
h1{font-weight:700;letter-spacing:-.04em;}
h2,h3{font-weight:650;letter-spacing:-.025em;}
.hero-number,.timer,.stepper input,.stat>b,.macro b,.weight-value{font-weight:700;letter-spacing:-.035em;}
.entry-time,.macro>small,.date-label,.session-meta{font-weight:500;}
.stepper input[data-replace-value]{min-height:44px; border-radius:8px; caret-color:var(--accent); color:var(--ink);}
.stepper input[data-replace-value]:focus{outline:2px solid var(--accent); outline-offset:-2px; background:var(--fill);}
.stepper input::selection{background:var(--accent);color:var(--button-ink);}
:root[data-theme="light"] .stepper input::selection{color:#fff;}
.stepper button{border:1px solid var(--line);}
:root[data-theme="dark"] .rest-panel{background:#26352d;border-color:#637969;}
:root[data-theme="dark"] .hero-macros .carbs b,:root[data-theme="dark"] .nutrition-hero .carbs .macro-icon{color:var(--carbs);}
:root[data-theme="dark"] .hero-macros .protein b,:root[data-theme="dark"] .nutrition-hero .protein .macro-icon{color:var(--protein);}
:root[data-theme="dark"] .hero-macros .fat b,:root[data-theme="dark"] .nutrition-hero .fat .macro-icon{color:var(--fat);}

/* 0.4.4 — product typography, contextual hierarchy and measured rest. */
:root {
  font-family: -apple-system,BlinkMacSystemFont,"Inter","Segoe UI Variable","Segoe UI",sans-serif;
  --display-font: "Avenir Next",Cabin,"Inter Display","Segoe UI Variable",sans-serif;
  --number-font: "Inter Display","DIN Alternate",Bahnschrift,"Avenir Next","Segoe UI",sans-serif;
  --soft-border: color-mix(in srgb,var(--line) 65%,transparent);
}
/* Three jobs, three treatments: display titles, readable interface copy, tabular metrics. */
h1 {font-family:var(--display-font);font-weight:800;letter-spacing:-.043em;line-height:1.06;}
h2,h3,.wordmark{font-family:var(--display-font);font-weight:700;letter-spacing:-.025em;}
.wordmark span{font-weight:450;letter-spacing:-.035em;}
.hero-number,.weight-value,.timer,.stepper input,.stat>b,.macro b,.hero-macros b,.target-line b,.rest-elapsed b,.ring b{font-family:var(--number-font);font-variant-numeric:tabular-nums lining-nums;letter-spacing:-.045em;}
.hero-number{font-weight:750;}.macro b,.hero-macros b,.stat>b,.weight-value{font-weight:700;}
.date-label{font-weight:500;letter-spacing:.015em;}.entry-title b{font-weight:700;letter-spacing:-.012em;}
.hero-muted,.next-line small,.focus-copy>small,.exercise-detail>p.sub{font-style:italic;}
.section-heading h2{font-weight:750;}.section-count{font-variant-numeric:tabular-nums;font-weight:500;}
.entry-time{font-variant-numeric:tabular-nums;font-weight:500;}
/* Slight separation between grouped data and tap targets; no decorative cards added. */
.nutrition-summary{border:1px solid var(--soft-border);}.macro-track{height:5px;}
.log-entry,.activity-row{border-color:var(--soft-border);}.library-category{letter-spacing:.025em;font-weight:700;}
.tabs button[aria-selected="true"],.tabs button[aria-pressed="true"]{font-weight:750;}
:where(button,input,select,textarea,a,summary):focus-visible{outline-color:var(--accent);}
.active-heading h1{font-weight:750;}.active-card h2{font-weight:800;letter-spacing:-.035em;}
.set-kicker .pill{font-weight:750;letter-spacing:.018em;}.set-input label{font-weight:650;}
.set-input{background:var(--surface);box-shadow:inset 0 0 0 1px var(--soft-border);}
.stepper input{font-weight:750;}.previous-line b{font-family:var(--number-font);font-weight:650;}
.rest-panel:not([hidden]){display:block;position:relative;overflow:hidden;gap:0;padding:10px 11px 8px;border-radius:16px;}
.rest-readout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr) auto;align-items:center;gap:7px;}
.rest-main,.rest-elapsed{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:1px;}
.rest-label{white-space:nowrap;line-height:1.2;font-size:.75rem;gap:4px;}.rest-label .icon{width:15px;height:15px;}
.rest-main .timer{font-size:clamp(1.6rem,7.6vw,2.45rem);line-height:1.07;font-weight:750;}
.rest-elapsed{padding-left:8px;border-left:1px solid var(--line);}
.rest-elapsed small{font-size:.72rem;color:var(--muted);white-space:nowrap;font-weight:500;}
.rest-elapsed b{font-size:1.25rem;color:var(--ink);line-height:1.2;}
.rest-controls{gap:4px;}.rest-adjust{font-size:.82rem;min-width:44px;padding:0 4px;}
.rest-track{height:3px;border-radius:99px;background:var(--line);overflow:hidden;margin-top:7px;}
.rest-track i{display:block;height:100%;width:0;background:var(--accent);border-radius:inherit;}
.rest-panel[data-ready="true"] .rest-main .timer{font-size:clamp(1.4rem,6.6vw,2.15rem);}
.rest-panel[data-ready="true"] .rest-track i{opacity:.7;}
.workout-dock .rest-action{background:var(--button-bg);color:var(--button-ink);border-color:transparent;}
.last-rest{font-size:.73rem;color:var(--muted);display:flex;align-items:center;gap:5px;line-height:1.1;margin-bottom:5px;}
.last-rest .icon,.history-rest .icon{width:13px;height:13px;color:var(--accent);}.last-rest b{font-variant-numeric:tabular-nums;color:var(--accent);font-weight:700;}
.history-rest{display:flex;align-items:center;gap:4px;margin-top:3px;font-variant-numeric:tabular-nums;font-style:italic;}
.history-entry .prescription>div{min-width:0;}.history-entry .prescription>b{white-space:nowrap;}
@media(min-height:810px) and (min-width:361px){.rest-panel:not([hidden]){padding:14px 13px 10px;}.rest-main .timer{font-size:2.55rem;}.rest-elapsed b{font-size:1.55rem;}.rest-label{font-size:.83rem;}}
@media(max-width:375px){.rest-readout{gap:4px;}.rest-elapsed{padding-left:5px;}.rest-label{font-size:.67rem;}.rest-label .icon{display:none;}.rest-elapsed small{font-size:.64rem;}.rest-elapsed b{font-size:1.12rem;}.rest-controls{gap:3px;}.rest-panel:not([hidden]){padding:5px 6px;}.rest-main .timer{font-size:1.55rem;}}
@media(max-height:720px){.rest-panel:not([hidden]){padding-block:4px;}.rest-track{margin-top:3px;}.last-rest{margin-bottom:2px;}.set-console .previous-line{padding-block:2px;}.active-focus:not([hidden]){margin-block:3px;}}
@media(prefers-reduced-motion:no-preference){.rest-track i{transition:width .35s linear;} .workout-dock button{transition:background .15s ease,transform .15s ease;}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:0s!important;transition-duration:0s!important;scroll-behavior:auto!important;}}
/* Keep the editing surface clear of the fixed actions even with the new rest strip. */
@media(min-height:810px) and (max-width:540px){.rest-panel:not([hidden]){padding-block:10px 7px;}.rest-panel:not([hidden])+.set-console{margin-top:5px;}}
@media(max-width:540px){.last-rest{margin-bottom:0;}.active-focus:not([hidden])+.rest-panel[hidden]+.set-console .previous-line{padding-block:5px;}}
/* Do not inherit the former two-row timer's named grid areas. */
.rest-readout .rest-controls,.rest-readout .rest-label,.rest-readout .timer{grid-area:auto;}
.rest-readout .rest-controls{justify-self:end;align-self:center;}
.rest-main .timer,.rest-elapsed b{overflow-wrap:anywhere;white-space:normal;}
@media(min-width:376px){.rest-readout{grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr) auto;}}
/* Measured rest: context, history and a comparable period summary. */
.rest-context{display:none;}
@media(min-height:810px) and (min-width:376px){
 .rest-panel:not([hidden]){margin-top:12px;}
 .rest-context{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:.76rem;color:var(--muted);padding-bottom:9px;margin-bottom:8px;border-bottom:1px solid var(--soft-border);}
 .rest-context>span{font-weight:700;color:var(--accent);}.rest-context em{font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right;}
 .rest-panel:not([hidden])+.set-console{margin-top:auto;}
}
.rest-overview{margin-block:12px;}.rest-overview h3{display:flex;align-items:center;gap:7px;}.rest-overview h3 .icon{color:var(--accent);width:18px;height:18px;}
.rest-overview-values{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-block:12px;}.rest-overview-values>div{display:flex;flex-direction:column;gap:3px;}.rest-overview-values>div+div{border-left:1px solid var(--line);padding-left:14px;}
.rest-overview-values b{font-family:var(--number-font);font-variant-numeric:tabular-nums;font-size:1.8rem;line-height:1.1;letter-spacing:-.035em;}.rest-overview-values>div:first-child b{color:var(--accent);}.rest-overview .sub{font-style:italic;}
/* Final small-detail pass: readable units, contextual calorie balance and keyboard hints. */
.hero-muted strong{font-style:normal;font-weight:700;color:#f1f7ed;}.hero-target{display:block;margin-top:3px;font-size:.73rem;font-weight:450;font-style:normal;color:#d0ddd3;}
.macro b small,.hero-macros b small{font-family:inherit;letter-spacing:0;font-weight:500;white-space:nowrap;margin-left:2px;}
.set-input label small{font-weight:450;}.rir-row small{font-style:italic;}
@media(max-width:375px){.hero-target{font-size:.69rem;}.hero-muted{font-size:.75rem;}.macro b small{margin-left:1px;}}
/* Long exercise names get priority over the optional recovery subtitle. */
@media(max-width:540px){.active-card.long-name~.rest-panel:not([hidden]) .rest-context{display:none;}.active-card.long-name~.rest-panel:not([hidden]){margin-top:auto;}}

/* 0.4.6: common region, editorial typography, visible editing affordance */
:root{--display-font:"Avenir Next","Inter Display","Segoe UI Variable Display",Cabin,sans-serif;--number-font:"Inter","SF Pro Text","Segoe UI",sans-serif;--group-edge:#b8c4cc;--edit-edge:#637785;--hero-group-edge:#607769;}
:root[data-theme="dark"]{--group-edge:#3a4753;--edit-edge:#8293a4;--hero-group-edge:#536d5e;}
h1{font-size:clamp(2.5rem,10vw,3.15rem);font-weight:800;letter-spacing:-.055em;line-height:1.04;}
.page-heading{align-items:center;margin-bottom:19px;}.page-heading .date-label{margin:5px 0 0;font-size:.88rem;font-weight:500;letter-spacing:0;}
.section-heading h2{font-size:1.22rem;font-weight:750;letter-spacing:-.028em;}.section-count{font-size:.77rem;font-weight:500;}
.wordmark{font-weight:800;letter-spacing:-.035em;}.wordmark span{font-weight:500;}
.hero-number{font-size:clamp(2.45rem,11vw,3.7rem);font-weight:750;letter-spacing:-.055em;line-height:1.06;}.hero-number small{font-size:.86rem;font-weight:500;}
.hero-heading h2{font-size:1rem;font-weight:650;}.hero-muted{font-style:normal;font-size:.83rem;}.hero-muted strong{font-weight:700;}.hero-target{font-size:.75rem;}
.hero-macros{border:1px solid var(--hero-group-edge);border-radius:13px;padding:10px 9px;margin:4px 0 13px;gap:10px;}
.hero-macros b{font-size:clamp(1.12rem,4.7vw,1.4rem);font-weight:700;letter-spacing:-.045em;line-height:1.2;}.hero-macro-label{font-weight:550;}.hero-track{margin-top:3px;}
.nutrition-summary{padding:15px 13px;border:1px solid var(--group-edge);background:var(--surface);}.nutrition-summary .macrogrid{margin-top:12px;gap:9px;}
.macrogrid .macro>b{font-size:clamp(1.12rem,4.75vw,1.4rem);font-weight:700;letter-spacing:-.045em;line-height:1.15;}.macrogrid .macro>b small{font-size:.65rem;letter-spacing:0;font-weight:500;margin-left:1px;}
.macro-label{font-weight:600;}.macro > small{font-weight:450;font-size:.69rem;}.macro-track{height:3px;margin-top:2px;}
.macro-chip .micro-value{font-family:var(--number-font);font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.015em;}.macro-chip>span{min-width:0;overflow-wrap:anywhere;}.macro-chip{font-weight:500;}
.entry-title b{font-size:1.03rem;font-weight:700;letter-spacing:-.018em;}.entry-time{font-size:.75rem;font-weight:450;font-variant-numeric:tabular-nums;}.log-entry{padding-block:13px;}.log-entry .sub{font-size:.8rem;font-weight:450;}
.active-heading h1{font-size:1.3rem;font-weight:700;letter-spacing:-.03em;}.active-card h2{font-weight:800;letter-spacing:-.045em;font-size:clamp(1.78rem,7.8vw,2.45rem);line-height:1.08;}.set-kicker .pill{font-size:.77rem;letter-spacing:.02em;font-weight:650;}
.target-line{border:1px solid var(--group-edge);border-radius:13px;padding:8px 9px;gap:0;}.target-line>div{padding-inline:8px;gap:3px;min-width:0;}.target-line>div:first-child{padding-left:0;}.target-line>div:last-child{padding-right:0;}.target-line>div+div{border-left:1px solid var(--soft-border);}
.target-line b{font-size:clamp(1.2rem,5.4vw,1.5rem);font-weight:700;line-height:1.1;letter-spacing:-.035em;}.target-line small{font-weight:500;font-size:.71rem;}.set-dots{margin-top:8px;}.set-dots span{width:24px;height:24px;}
.set-inputs{gap:0;border:1px solid var(--group-edge);border-radius:15px;padding:4px 2px;background:transparent;}.set-input{background:transparent;box-shadow:none;border:0;border-radius:0;padding:4px 3px;}.set-input+.set-input{border-left:1px solid var(--group-edge);}.set-input label{font-weight:600;font-size:.81rem;}.set-input label small{font-weight:400;}.set-input .stepper{column-gap:1px;}
.stepper button{background:transparent;border:0;color:var(--accent);font-size:1.4rem;font-weight:500;border-radius:10px;}.set-input .stepper input[data-replace-value]{background:transparent;border:0;border-bottom:1px solid var(--edit-edge);border-radius:0;box-shadow:none;padding:0 1px;min-width:0;font-size:clamp(16px,5.4vw,29px);font-weight:700;letter-spacing:-.035em;}.set-input .stepper input[data-replace-value]:focus{background:transparent;outline:2px solid var(--accent);outline-offset:-2px;border-radius:6px;border-bottom-color:var(--accent);}.set-input:focus-within label{color:var(--accent);}
.rir-row input{background:transparent;border:0;border-bottom:1px solid var(--edit-edge);border-radius:0;font-family:var(--number-font);font-size:16px;font-variant-numeric:tabular-nums;}.previous-line b{font-weight:600;font-family:var(--number-font);}.previous-line{font-size:.78rem;}.next-line small{font-weight:450;font-style:italic;}.next-line b{font-weight:650;}
.rest-main .timer,.rest-elapsed b{font-variant-numeric:tabular-nums lining-nums;letter-spacing:-.04em;}.rest-panel:not([hidden]){border-radius:15px;}.rest-context>span{font-weight:650;}.rest-context em{font-weight:400;}.rest-adjust{background:transparent;border:1px solid var(--group-edge);font-weight:600;}
.stat-grid{gap:0;border:1px solid var(--group-edge);border-radius:16px;background:var(--surface);padding:8px 0;}.stat-grid .stat{background:transparent;border:0;box-shadow:none;border-radius:0;padding:7px 10px;}.stat-grid .stat+.stat{border-left:1px solid var(--soft-border);}.stat>b{font-size:clamp(1.4rem,5.5vw,1.9rem);font-weight:700;letter-spacing:-.045em;}.stat>b small{font-size:.73rem;font-weight:450;}
.exercise-metrics b,.program-stats b,.rest-overview-values b{font-family:var(--number-font);font-variant-numeric:tabular-nums;font-weight:700;letter-spacing:-.035em;}.exposure .row>b{font-family:var(--number-font);font-variant-numeric:tabular-nums;}
@media(max-width:375px){.hero-macros{gap:6px;padding-inline:7px;}.hero-macros b{font-size:1.11rem;}.nutrition-summary .macrogrid{gap:6px;}.macrogrid .macro>b{font-size:1.05rem;}.target-line{padding:6px 7px;}.target-line>div{padding-inline:6px;}.target-line small{font-size:.66rem;}.set-input .stepper input[data-replace-value]{font-size:clamp(16px,4.9vw,20px);}.set-inputs{padding:2px 0;}.set-input{padding:3px 1px;}}
@media(max-width:340px){.macrogrid .macro>b{font-size:1.25rem;}.target-line small{font-size:.62rem;}.active-card h2{font-size:1.55rem;}}
@media(max-height:720px){.active-card h2{margin-block:3px 5px;}.target-line{padding-block:4px;}.target-line>div{gap:1px;}.rest-panel:not([hidden]){padding-block:3px;}.set-console .previous-line{padding-block:0;}.set-console .next-line{margin-top:3px;}}
@media(max-width:540px){.rest-panel[data-long-clock="true"] .rest-context{display:none;}.rest-panel[data-long-clock="true"] .rest-main .timer{font-size:clamp(1.02rem,5.1vw,1.55rem);line-height:1.08;}.rest-panel[data-long-clock="true"] .rest-elapsed b{font-size:clamp(.88rem,4vw,1.2rem);line-height:1.1;}}
/* Second pass: set state belongs beside its label, not in a separate row. */
.active-card{display:grid;grid-template-areas:"badges dots" "lift lift" "targets targets";grid-template-columns:minmax(0,1fr) auto;align-items:center;}
.active-card .set-kicker{grid-area:badges;}.active-card h2{grid-area:lift;}.active-card .target-line{grid-area:targets;}
.active-card .set-dots{grid-area:dots;justify-self:end;justify-content:end;margin:0;max-width:140px;}
@media(min-width:376px){.active-card h2{margin-block:12px 12px;}.set-input .stepper input[data-replace-value]{font-size:clamp(22px,6.8vw,32px);}.set-inputs{padding-block:7px;}}
@media(max-height:720px){.active-card.long-name{padding-block:0;}.active-card.long-name h2{margin-block:2px 4px;line-height:1.04;}.active-card.long-name .target-line{padding-block:3px;}.active-card.long-name~.rest-panel:not([hidden])+.set-console .set-inputs{padding-block:0;}.active-card.long-name~.rest-panel:not([hidden])+.set-console .set-input{padding-block:1px;}}
/* In the large title hierarchy, italicize the short contextual phrase only. */
.hero-muted{font-style:italic;}.hero-muted strong{font-style:normal;}

/* 0.4.7 — quiet composition: hierarchy, proximity, selective common regions. */
:root{--gutter:20px;--display-font:"Avenir Next","Inter Display","Segoe UI Variable Display",Inter,sans-serif;--number-font:"Inter","SF Pro Text","Segoe UI",sans-serif;--quiet-rule:color-mix(in srgb,var(--muted) 25%,transparent)}
:root[data-theme="dark"]{--bg:#111416;--surface:#1b2023;--ink:#f2f4f3;--muted:#aeb8bc;--line:#343d41;--fill:#252d30;--nav-bg:#15191c;--accent:#d4ed9f;--button-bg:#d4ed9f;--button-ink:#1d2c1e;--group-edge:#394347;--edit-edge:#8c9a9f;--hero-bg:#1b2420;--hero-line:#3d5145}
:root[data-theme="light"]{--bg:#f8f8f5;--surface:#ffffff;--ink:#202a27;--muted:#56635e;--line:#d8ded8;--fill:#edf0eb;--group-edge:#c0c9c1;--edit-edge:#65776e}
body{font-weight:450}h1{font-size:clamp(2.25rem,9.4vw,2.9rem);font-weight:700;letter-spacing:-.042em;line-height:1.13}h2,h3{font-weight:650;letter-spacing:-.018em}.page-heading{margin-bottom:20px}.page-heading .date-label{font-size:.91rem;font-weight:450;margin-top:3px}
.shell{border:0;padding-block:10px 7px}.wordmark{font-weight:700}.wordmark span{font-weight:450}.shell-tools .icon-button{background:transparent;border:0}.sample-label{background:transparent!important;border:0!important;padding-inline:4px;letter-spacing:0;font-weight:500}
nav{border-inline:0;box-shadow:none}.tabs button{font-weight:500}.tabs button.selected{font-weight:700}.tabs button.selected::after{height:2px;left:23%;right:23%}.tabs:not(.nutrient-tabs) button>.icon{display:none}
/* Today — a single hero, then open sections. */
.nutrition-hero{border:0;background:var(--hero-bg);border-radius:20px;padding:18px 16px}.hero-heading h2{font-size:.95rem;font-weight:550}.hero-heading .on-dark{background:transparent}.hero-intake{margin-block:10px 14px}.hero-number{font-size:clamp(2.65rem,12vw,3.8rem);font-weight:650;letter-spacing:-.055em}.hero-muted{font-size:.85rem;font-style:normal}.hero-muted strong{font-weight:600}.hero-target{font-size:.76rem;font-weight:400}.ring-tick{display:none}.ring-track,.ring-value{stroke-width:4}.ring{width:83px;flex-basis:83px}.ring b{font-weight:650}
.hero-macros{border:0;border-top:1px solid var(--hero-line);border-radius:0;padding:15px 0 3px;margin:0 0 15px;gap:10px}.hero-macros b{font-weight:650;font-size:clamp(1.25rem,5.4vw,1.5rem);letter-spacing:-.03em}.hero-macros span{font-weight:450}.hero-track{height:3px}.hero-action{min-height:48px;font-weight:650}
.today-side .today-section{margin-top:22px;margin-bottom:6px}.today-side .section-heading h2{font-size:1rem;font-weight:600}.today-side .section-heading h2>.icon{display:none}.today-side .surface{border:0;background:transparent;border-radius:0;box-shadow:none;padding:8px 0 14px;border-bottom:1px solid var(--quiet-rule)}.training-today{gap:3px}.training-today .primary{min-height:44px;border:0;background:transparent;padding:0;color:var(--accent);font-weight:600;justify-content:flex-end;gap:8px}.training-today .icon-tile,.weight-today .icon-tile{background:transparent;border:0}.weight-today .icon-button.add{background:transparent;color:var(--accent)}
/* Nutrition — one outline for totals, an open diary for items. */
body[data-page="Nutrition"] .page-heading{margin-bottom:10px}.date-control{margin-block:2px 12px}.nutrition-summary{border:1px solid var(--group-edge);background:transparent;box-shadow:none;padding:13px 12px 15px;border-radius:15px}.nutrition-summary .row h2{font-size:.9rem;font-weight:600}.nutrition-summary .row>.text-button{font-weight:550}.nutrition-summary .macrogrid{margin-top:8px;gap:9px}.macrogrid .macro>b{font-size:clamp(1.15rem,4.8vw,1.45rem);font-weight:650;letter-spacing:-.045em}.macro-label{font-size:.75rem;font-weight:500}.macro>small{font-weight:400}.macro-track{height:3px}.nutrition-lists .section-heading h2{font-size:1.15rem;font-weight:650}.nutrition-lists .section-heading{margin-block:8px 0}.log-entry{align-items:center;gap:11px;padding-block:15px}.log-entry .entry-title b{font-size:1.02rem;font-weight:650;letter-spacing:-.012em}.entry-time{font-size:.75rem;font-weight:400}.log-entry .sub{font-weight:450}.inline-macros,.log-entry:not(:has(.entry-tools)) .inline-macros{font-size:.77rem;font-weight:450;row-gap:4px;column-gap:8px}.macro-chip .micro-value{font-weight:600}.log-entry .food-art{border-radius:12px}.entry-edit{opacity:.85}.log-entry,.activity-row{border-color:var(--quiet-rule)}
/* Workout — the set is the product. Muscle diagrams remain in Info. */
.active-heading{margin-bottom:6px}.active-heading h1{font-size:1.17rem;font-weight:650;letter-spacing:-.018em}.active-heading .date-label{font-size:.75rem;font-weight:400}.session-meta{font-size:.72rem}.session-bar{height:3px}.active-card{background:transparent;border:0;box-shadow:none;padding-inline:0}.active-card .set-kicker .pill{background:transparent;border:0;color:var(--muted);font-size:.8rem;font-weight:550;padding:0}.active-card .set-kicker .pair{color:var(--accent)}.active-card h2{font-size:clamp(1.85rem,8.2vw,2.5rem);font-weight:680;letter-spacing:-.035em;line-height:1.12;margin-block:11px 13px}.set-dots span{width:20px;height:20px;font-size:.67rem;font-weight:600}.target-line{border:0;border-top:1px solid var(--quiet-rule);border-bottom:1px solid var(--quiet-rule);border-radius:0;padding:10px 0}.target-line>div{padding-inline:12px}.target-line>div+div{border:0}.target-line b{font-weight:650}.target-line small{font-size:.75rem;font-weight:450}
.active-focus.focus-link:not([hidden]){display:block;background:transparent;border:0;border-radius:0;padding:0;margin:0;min-height:44px}.focus-link button{width:100%;display:flex;justify-content:space-between;align-items:center;gap:6px;padding:0;font-size:.79rem;font-weight:500}.focus-link button>span{display:flex;align-items:center;gap:5px}.focus-link button>span:first-child{color:var(--muted)}.focus-link button .icon{width:15px;height:15px}
.set-console{border:0;background:transparent;box-shadow:none;padding-inline:0}.previous-line{font-size:.82rem}.previous-line b{font-weight:550}.set-inputs{border:1px solid var(--group-edge);border-radius:16px;padding:10px 2px}.set-input label{font-size:.81rem;font-weight:500}.set-input .stepper input[data-replace-value]{font-size:clamp(20px,8.6vw,36px);font-weight:650;letter-spacing:-.04em}.stepper button{font-size:1.5rem}.rir-row{font-weight:500}.next-line{border-top:1px solid var(--quiet-rule)}.next-line small{font-style:italic;font-weight:400}.next-line b{font-weight:550}.workout-dock .save-set,.workout-dock .rest-action{font-weight:650;border-radius:14px}
/* Rest — primary timer, quiet supporting controls. */
:root[data-theme="dark"] .rest-panel:not([hidden]){background:var(--hero-bg);border-color:var(--hero-line)}.rest-panel:not([hidden]){padding:14px 12px 12px}.rest-context{border:0;padding:0;margin-bottom:8px}.rest-context>span{font-weight:550}.rest-context em{font-weight:400}.rest-main .timer{font-weight:650;font-size:clamp(2rem,10vw,3.35rem);line-height:1.05}.rest-elapsed b{font-weight:600}.rest-elapsed{border:0}.rest-adjust{border:0;background:transparent}.rest-track{height:3px;margin-top:10px}
/* Progress — analytical report, not a collection of little cards. */
.stat-grid{border:0;border-block:1px solid var(--quiet-rule);border-radius:0;background:transparent;padding:10px 0}.stat-grid .stat+.stat{border:0}.stat-grid .stat{padding:6px 4px}.stat-grid .stat .icon-tile{background:transparent;border:0}.stat>b{font-weight:650}.stat span{font-weight:450}body[data-page="Progress"] .chart-card{background:transparent;border:0;border-bottom:1px solid var(--quiet-rule);border-radius:0;padding:16px 0 20px;box-shadow:none}body[data-page="Progress"] .chart-card h3{font-size:1.13rem;font-weight:650}
@media(max-width:375px){:root{--gutter:16px}.macrogrid .macro>b{font-size:1.05rem}.nutrition-summary .macrogrid{gap:5px}.macro-label{font-size:.67rem}.hero-macros b{font-size:1.19rem}.set-inputs{padding-block:5px}.set-input .stepper input[data-replace-value]{font-size:clamp(16px,7vw,26px)}.target-line>div{padding-inline:6px}.target-line small{font-size:.65rem}.rest-panel:not([hidden]){padding:7px 7px 6px}.rest-main .timer{font-size:1.9rem}.inline-macros,.log-entry:not(:has(.entry-tools)) .inline-macros{font-size:.72rem}}
@media(max-height:720px){.active-card h2{margin-block:4px 7px}.target-line{padding-block:5px}.active-focus.focus-link:not([hidden]){margin:0}.set-console .previous-line{padding-block:0}.set-inputs{padding-block:2px}.rest-panel:not([hidden]){padding-block:5px}.rest-track{margin-top:4px}.rest-main .timer{font-size:clamp(1.5rem,7vw,2rem)}.active-card.long-name h2{font-size:clamp(1.5rem,6.5vw,2rem)}}
@media(max-width:540px){.rest-panel[data-long-clock="true"] .rest-main .timer{font-size:clamp(1.02rem,5.1vw,1.55rem)}.rest-panel[data-long-clock="true"] .rest-elapsed b{font-size:clamp(.88rem,4vw,1.2rem)}}
/* Second critique: remove an entire row of repeated navigation; keep filter in a compact native control. */
.journal-heading{display:flex;align-items:center;justify-content:space-between;margin:16px 0 6px}.journal-heading h2{font-size:1.28rem;font-weight:650}.journal-filter select{width:auto;min-height:44px;font-size:.83rem;font-weight:500;margin:0;padding:4px 8px;background:transparent;border:0;color:var(--muted);border-radius:6px}.journal-filter select:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.nutrition-lists .section-heading h2{font-size:1rem;font-weight:600}.nutrition-lists .section-heading{margin-top:0}.nutrition-lists .section-heading h2 .icon{width:16px;height:16px}
.today-side .training-today{display:grid;grid-template-columns:minmax(0,1fr) 28px;align-items:center;gap:0 8px;text-align:left;width:100%;color:var(--ink);min-height:64px;font-weight:500}.training-today>.row{grid-column:1}.training-today>.bar{grid-column:1/-1;grid-row:2;margin-block:7px 0}.training-today>.training-arrow{grid-column:2;grid-row:1;color:var(--accent);display:grid;place-items:center}.training-today h3{font-weight:650}.today-side .today-section{margin-top:16px;margin-bottom:2px}.nutrition-hero{padding:12px 16px 15px}.hero-intake{margin:4px 0 10px;min-height:90px}.hero-macros{padding-top:11px;margin-bottom:12px}.hero-heading .icon-button{min-height:44px}.focus-link button{background:transparent!important;border:0!important}.today-side .surface{padding-bottom:10px}
/* Typographic rhythm: use secondary italics for context rather than decorated labels. */
.active-heading .date-label,.entry-time{font-style:normal}.hero-muted{font-style:normal}.next-line small{font-style:italic}.section-heading .text-button{font-weight:550}
@media(max-width:375px) and (max-height:720px){.active-card.long-name h2{margin-block:2px 5px;line-height:1.04}.active-card.long-name .target-line{padding-block:3px}.active-card.long-name~.set-console .set-inputs{padding-block:0}.active-card.long-name~.set-console .next-line{margin-top:2px}}
/* The recovery state is a different task: the next exercise is context, not the headline. */
main:has(.rest-panel:not([hidden])) .active-card h2{font-size:clamp(1.22rem,5.5vw,1.65rem);font-weight:600;margin-block:8px 2px;line-height:1.15;letter-spacing:-.02em}
main:has(.rest-panel:not([hidden])) .active-card{grid-template-areas:"badges dots" "lift lift"}
main:has(.rest-panel:not([hidden])) .target-line{display:none}
main:has(.rest-panel:not([hidden])) .rest-panel{margin-block:12px 0;}
main:has(.rest-panel:not([hidden])) .next-line{justify-content:flex-end}
main:has(.rest-panel:not([hidden])) .next-line .grow{display:none}
@media(min-height:810px) and (min-width:376px){main:has(.rest-panel:not([hidden])) .rest-panel{padding:18px 14px 15px}main:has(.rest-panel:not([hidden])) .rest-main .timer{font-size:3.1rem}main:has(.rest-panel:not([hidden])) .rest-panel[data-long-clock="true"] .rest-main .timer{font-size:1.5rem}}
@media(max-height:720px){main:has(.rest-panel:not([hidden])) .active-card h2{margin-block:3px 2px}main:has(.rest-panel:not([hidden])) .rest-panel{margin-block:6px 0}}
/* Preserve thumb reach during recovery after removing nonessential context. */
main:has(.rest-panel:not([hidden])) .set-console{margin-top:auto}

/* Routine editing is separate from the uncluttered active workout. */
.routine-editor-row{border-top:1px solid var(--line, #46515c);padding:14px 0 10px;margin:8px 0 0}.routine-editor-heading{justify-content:space-between;gap:4px;margin-bottom:7px}.routine-order{gap:4px}.routine-order button{min-width:36px;min-height:44px;padding:4px 8px}.movement-picker,.routine-extra{margin:8px 0}.movement-picker summary,.routine-extra summary{cursor:pointer;min-height:44px;padding:12px 0;font-weight:600}.movement-options{max-height:220px;overflow:auto}.movement-choice{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:3px;width:100%;min-height:48px;border:0;border-bottom:1px solid var(--line,#46515c);border-radius:0;background:transparent;padding:9px 4px}.movement-choice small{font-size:12px;opacity:.8}.movement-choice:focus-visible{outline:2px solid var(--accent,#a5d680);outline-offset:-2px}.routine-editor-row .grid{gap:8px}

.routine-editor-toggle{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:3px;min-width:0;min-height:52px;border:0;background:transparent;padding:4px 0}.routine-editor-toggle b{font-size:15px;line-height:1.25;overflow-wrap:anywhere}.routine-editor-toggle small{color:var(--muted);font-size:12px}.routine-editor-toggle:after{content:'›';position:absolute;right:0;top:0}.routine-editor-toggle{position:relative;padding-right:10px}.routine-editor-toggle[aria-expanded=true]:after{transform:rotate(90deg)}.routine-editor-body{padding-top:8px}.routine-editor-body[hidden]{display:none}.routine-order button{min-width:44px}.routine-order button.small{font-size:11px;padding:4px 5px}.routine-dialog #modal-form>.row:last-of-type{position:sticky;bottom:-17px;background:var(--surface);padding:9px 0 12px;z-index:2;border-top:1px solid var(--line)}

.routine-editor-row{padding:8px 0;margin:0}.routine-editor-heading{margin:0}.routine-editor-toggle{min-height:60px;padding:5px 25px 5px 0;gap:2px}.routine-editor-toggle:after{top:50%;transform:translateY(-50%);font-size:24px;color:var(--muted)}.routine-editor-toggle[aria-expanded=true]:after{transform:translateY(-50%) rotate(90deg)}.routine-order{justify-content:flex-end;margin-bottom:9px}.routine-editor-toggle .label{font-size:11px}.routine-order button{min-width:44px}

.variant-choices{margin:12px 0}.variant-options{flex-wrap:wrap;gap:6px;margin-top:6px}.variant-options button{flex:1 1 auto;min-height:44px}.variant-options button.selected{border-color:var(--accent,#d1f19a);font-weight:700}.history-entry .prescription .row{flex-shrink:0;gap:4px}.history-entry .prescription .row .icon-button{min-width:44px;min-height:44px}
/* Routine configuration: one grouped selector; selection is visible without relying on color alone. */
.variant-options{gap:0;border:1px solid var(--group-edge);border-radius:10px;overflow:hidden;flex-wrap:nowrap}.variant-options button{flex:1 1 0;background:transparent;border:0;border-radius:0;color:var(--muted);font-weight:500;padding:8px 10px;display:flex;align-items:center;justify-content:center;gap:6px}.variant-options button+button{border-left:1px solid var(--group-edge)}.variant-options button[aria-pressed=true]{background:var(--lime-soft);color:var(--accent);font-weight:650}.variant-options button[aria-pressed=true]::after{content:'✓';font-size:.95rem}.variant-options button:focus-visible{outline-offset:-3px}.pair-control.secondary.full{background:transparent;border:0;border-bottom:1px solid var(--quiet-rule);border-radius:0;color:var(--muted);text-align:left;justify-content:flex-start;font-size:.82rem;font-weight:550;min-height:44px;padding:7px 0;margin:0 0 9px}.pair-control.secondary.full:not(:disabled){color:var(--accent)}.pair-control.secondary.full:disabled{opacity:.5}.routine-order{justify-content:flex-end}

/* Saved meals reuse the diary's open list and single grouped quantity fields. */
.saved-meal-list{margin-top:14px}.saved-meal,.meal-ingredient{padding:12px 0;border-bottom:1px solid var(--line)}.saved-meal .grow{min-width:0}.saved-meal .sub{display:block;overflow-wrap:anywhere}.saved-meal .inline-macros{margin-top:8px}.meal-ingredient .row{align-items:center}.meal-ingredient .grow{min-width:0;overflow-wrap:anywhere}.meal-add{padding-top:12px}.meal-ingredient .quantity-grid{margin-top:8px}.meal-ingredient .text-button{font-size:12px;min-height:44px}.meal-add .full{margin-top:6px}

/* Compact ingredient rows: quantity is the only prominent editable value. */
.meal-quick-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;padding:9px 0}.meal-quick-name{display:flex;align-items:center;gap:8px;min-width:0}.meal-quick-name b{font-size:14px;line-height:1.3;overflow-wrap:anywhere}.meal-quick-name .food-art{flex-shrink:0}.meal-quick-controls{display:flex;align-items:center;gap:3px}.meal-quick-controls input[type=number]{width:67px;min-width:0;font-size:16px;padding:7px 5px;text-align:center;min-height:44px;appearance:textfield}.meal-quick-controls input::-webkit-inner-spin-button,.meal-quick-controls input::-webkit-outer-spin-button{appearance:none;margin:0}.meal-unit{font-size:12px;color:var(--muted);min-width:18px;text-align:center}.meal-quick-controls select{width:49px;font-size:14px;min-height:44px;padding:4px}.meal-remove{border:0!important;background:transparent!important;color:var(--muted);font-size:23px;min-width:44px;width:44px;min-height:44px;padding:0}.meal-dialog #modal-form>.row:last-of-type{position:sticky;bottom:-15px;background:var(--surface);padding:10px 0;z-index:2;border-top:1px solid var(--line)}.meal-dialog #meal-total{margin-top:12px}.meal-dialog #modal-error{margin:4px 0}.meal-quick-name svg{max-width:38px;max-height:38px}.meal-quick-name .food-icon{flex-shrink:0}@media(max-width:350px){.meal-quick-name{gap:5px}.meal-quick-name b{font-size:13px}.meal-quick-controls input[type=number]{width:58px}.meal-quick-controls{gap:1px}}

/* Quiet routine scheduling affordance, in the existing routine metadata line. */
.routine-date{display:inline-flex;align-items:center;gap:3px;padding:3px 2px;margin:-3px 0;min-height:32px;border:0;background:transparent;color:inherit;font:inherit;text-align:left;box-shadow:none;text-decoration:underline;text-decoration-color:currentColor;text-underline-offset:3px}.routine-date .icon{width:12px;height:12px;opacity:.75}.routine-date:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.meal-add #meal-search{margin-bottom:6px}.meal-quick-name b{overflow-wrap:anywhere}.saved-meal .grow{min-width:0;overflow-wrap:anywhere}

.routine-card .routine-start{min-height:44px;display:inline-flex;align-items:center;gap:3px;padding:0 10px;font-size:.83rem;white-space:nowrap;border-radius:15px}.routine-start .icon{width:15px;height:15px}.routine-card .entry-tools{flex-shrink:0}.routine-card .grow{min-width:0}.routine-card h3{overflow-wrap:anywhere}.routine-date{min-height:44px;margin:-9px 0;padding:9px 2px}
@media(max-width:360px){.routine-card .routine-start{padding-inline:9px}.routine-start .icon{display:none}.routine-card .entry-tools{gap:4px}}

.fitness-wordmark { display:block;width:clamp(96px,24vw,148px);height:auto; }
.hub-back { min-height:44px;display:grid;place-items:center;padding-inline:7px;color:var(--muted);text-decoration:none; }
.hub-back[hidden] { display:none; }
:root[data-theme="dark"] { --bg:#111111;--button-bg:#0F5C46;--button-ink:#F8F6F0; }
:root[data-theme="light"] { --bg:#F8F6F0;--surface:#fffdf9;--fill:#E8E5DD;--button-bg:#0F5C46;--button-ink:#F8F6F0; }
#fitness-launch { position:fixed;inset:0;z-index:50;display:grid;place-items:center;pointer-events:none;
  background:radial-gradient(ellipse at 85% 92%,#0F5C46 0%,#122b23 24%,#111111 68%);
  animation:fitness-launch-fade 3s both; }
#fitness-launch[hidden] { display:none; }
#fitness-launch img { width:clamp(180px,52vw,390px);height:auto;animation:fitness-logo-reveal 1s both; }
#fitness-launch::after { content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(110deg,transparent 36%,#e8e5dd14 50%,transparent 64%);
  animation:fitness-platinum-sweep 3s both; }
@keyframes fitness-logo-reveal { from { opacity:0;transform:translateY(7px) scale(.98); } to { opacity:1;transform:none; } }
@keyframes fitness-launch-fade { from,80% { opacity:1; } to { opacity:0; } }
@keyframes fitness-platinum-sweep { 0%,33% { transform:translateX(-110%);opacity:0; } 48% { opacity:1; } 67%,100% { transform:translateX(110%);opacity:0; } }
@media (prefers-reduced-motion:reduce) { #fitness-launch,#fitness-launch img { animation:none; } #fitness-launch::after { display:none; } }


#fitness-sync[hidden],#fitness-update[hidden] { display:none; }
#fitness-update { color:var(--muted); font-size:.86rem; margin:6px 0; }
#fitness-sync[data-sync="synced"] { color:var(--accent); }
#fitness-sync[data-sync="error"],#fitness-sync[data-sync="conflict"] { color:#f3aa87; }
body[data-active="true"] #fitness-update { display:none; }
